email: finish the settings activity after delete its account

Change-Id: I540f1fe9dc874093ad0067cd56c9f0920620ece1
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
This commit is contained in:
Jorge Ruesga 2015-04-19 10:36:09 +02:00 committed by Steve Kondik
parent 4e24271153
commit c60b08e059

View File

@ -1129,12 +1129,8 @@ public class AccountSettingsFragment extends MailAccountPrefsFragment
// And now we remove the system account that holds the email service // And now we remove the system account that holds the email service
accountManager.removeAccount(account, getActivity(), null, null); accountManager.removeAccount(account, getActivity(), null, null);
// We deleted the account, so we need to clear the activity stack, so just show // Finish after account is deleted
// the settings fragment and clear the activity stack getActivity().finish();
Intent intent = new Intent(getActivity(), PublicPreferenceActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK |
Intent.FLAG_ACTIVITY_CLEAR_TOP);
getActivity().startActivity(intent);
} catch (Exception ex) { } catch (Exception ex) {
LogUtils.w(LogUtils.TAG, ex, "Failed to delete account %s", mAccountEmail); LogUtils.w(LogUtils.TAG, ex, "Failed to delete account %s", mAccountEmail);
return Boolean.FALSE; return Boolean.FALSE;