diff options
| author | kaiyiz <kaiyiz@codeaurora.org> | 2014-06-07 13:30:12 +0800 |
|---|---|---|
| committer | Roman Birg <roman@cyngn.com> | 2014-09-02 11:53:44 -0700 |
| commit | 390f989ba108a1e14f45e4445230f40b7dbd0214 (patch) | |
| tree | 8ff35d067f2844b3f1718e43e2cb850184fa5a4c | |
| parent | b978860437787013eef0d1815e4d40c2396ccea6 (diff) | |
| download | packages_apps_Contacts-390f989ba108a1e14f45e4445230f40b7dbd0214.tar.gz packages_apps_Contacts-390f989ba108a1e14f45e4445230f40b7dbd0214.tar.bz2 packages_apps_Contacts-390f989ba108a1e14f45e4445230f40b7dbd0214.zip | |
Contacts: Show the new added account timely in account list
The new account has been created successfully, but it isn't shown timely.
Show the new added account timely in account list.
CRs-Fixed: 672510
Change-Id: I798fdf2abe92e79ac8c586e65249711571036278
| -rw-r--r-- | src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java b/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java index 3e03891c7..519b12fb5 100644 --- a/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java +++ b/src/com/android/contacts/activities/ContactEditorAccountsChangedActivity.java @@ -140,6 +140,12 @@ public class ContactEditorAccountsChangedActivity extends Activity { // If the user canceled the account setup process, then keep this activity visible to // the user. if (resultCode != RESULT_OK) { + // refresh the account list when come back + if (mAccountListView != null) { + mAccountListAdapter = new AccountsListAdapter(this, + AccountListFilter.ACCOUNTS_CONTACT_WRITABLE); + mAccountListView.setAdapter(mAccountListAdapter); + } return; } // Subactivity was successful, so pass the result back and finish the activity. @@ -157,11 +163,6 @@ public class ContactEditorAccountsChangedActivity extends Activity { // Save this as the default account mEditorUtils.saveDefaultAndAllAccounts(account); - if (mAccountListView != null) { - mAccountListAdapter = new AccountsListAdapter(this, - AccountListFilter.ACCOUNTS_CONTACT_WRITABLE); - mAccountListView.setAdapter(mAccountListAdapter); - } // Pass account info in activity result intent Intent intent = new Intent(); intent.putExtra(Intents.Insert.ACCOUNT, account); |
