From 61a77ab51d26e142b3681a020b21366a17a39da7 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Wed, 19 Feb 2014 14:07:18 -0800 Subject: [PATCH] Fix bug #13084552 Correct list of accounts are not shown when tapping ...on type of accounts(corporate,google etc.,) in Settings under Accounts section - allow Account Type (corporate and the others...) entries to work. Basically as they are sharing the same fragment we could only hit it only once (and the first hit was winning). Change-Id: I16683fc7342564a8ed1a4853a576166ab4d91df9 --- src/com/android/settings/SettingsActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java index bbe0e749887..793709bd1dd 100644 --- a/src/com/android/settings/SettingsActivity.java +++ b/src/com/android/settings/SettingsActivity.java @@ -788,8 +788,10 @@ public class SettingsActivity extends Activity return; } if (header != null && mCurrentHeader != null && header.id == mCurrentHeader.id && - header.id != R.id.account_add) { - // This is the header we are currently displaying (except "Add Account"). Just make sure + header.id != R.id.account_add && + !header.fragment.equals(ManageAccountsSettings.class.getName())) { + // This is the header we are currently displaying (except "Add Account" or + // "Corporate"/"Google" Account entries that share the same fragment). Just make sure // to pop the stack up to its root state. getFragmentManager().popBackStack(BACK_STACK_PREFS, FragmentManager.POP_BACK_STACK_INCLUSIVE);