From c60b08e05909e58566e1c71389e24c62f2a1fdec Mon Sep 17 00:00:00 2001 From: Jorge Ruesga Date: Sun, 19 Apr 2015 10:36:09 +0200 Subject: [PATCH] email: finish the settings activity after delete its account Change-Id: I540f1fe9dc874093ad0067cd56c9f0920620ece1 Signed-off-by: Jorge Ruesga --- .../email/activity/setup/AccountSettingsFragment.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/com/android/email/activity/setup/AccountSettingsFragment.java b/src/com/android/email/activity/setup/AccountSettingsFragment.java index e7abc1cab..b5c3b5917 100644 --- a/src/com/android/email/activity/setup/AccountSettingsFragment.java +++ b/src/com/android/email/activity/setup/AccountSettingsFragment.java @@ -1129,12 +1129,8 @@ public class AccountSettingsFragment extends MailAccountPrefsFragment // And now we remove the system account that holds the email service accountManager.removeAccount(account, getActivity(), null, null); - // We deleted the account, so we need to clear the activity stack, so just show - // the settings fragment and clear the activity stack - Intent intent = new Intent(getActivity(), PublicPreferenceActivity.class); - intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | - Intent.FLAG_ACTIVITY_CLEAR_TOP); - getActivity().startActivity(intent); + // Finish after account is deleted + getActivity().finish(); } catch (Exception ex) { LogUtils.w(LogUtils.TAG, ex, "Failed to delete account %s", mAccountEmail); return Boolean.FALSE;