From aaebfd8d8f83918171184d5c4b1538a0027ce284 Mon Sep 17 00:00:00 2001 From: kaiyiz Date: Fri, 30 May 2014 18:04:20 +0800 Subject: Email: Do not set the empty name got from database as name content The activity will restart and get the name from database when rotate screen. If name is null, do not set username text and the input message will disappear. CRs-Fixed: 670717 Change-Id: Ib1fb6724c51f0ecdcfb2b57108cf71ac7b4f991b --- src/com/android/email/activity/setup/AccountSetupNames.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/activity/setup/AccountSetupNames.java b/src/com/android/email/activity/setup/AccountSetupNames.java index b901fec46..e75f84f5d 100644 --- a/src/com/android/email/activity/setup/AccountSetupNames.java +++ b/src/com/android/email/activity/setup/AccountSetupNames.java @@ -155,7 +155,10 @@ public class AccountSetupNames extends AccountSetupActivity { @Override public void onSuccess(String result) { // Views can only be modified on the main thread. - mName.setText(result); + // Get the name from database,if name is not null,set it into text view. + if (!TextUtils.isEmpty(result)) { + mName.setText(result); + } } }.executeParallel((Void[]) null); } -- cgit v1.2.3