Merge "Check if the Activity is finishing before showDialog()"

This commit is contained in:
Amith Yamasani
2013-04-16 13:13:52 +00:00
committed by Gerrit Code Review

View File

@@ -114,7 +114,8 @@ public class AccountSyncSettings extends AccountPreferenceBase {
} catch (AuthenticatorException e) { } catch (AuthenticatorException e) {
// handled below // handled below
} }
if (failed) { if (failed && getActivity() != null &&
!getActivity().isFinishing()) {
showDialog(FAILED_REMOVAL_DIALOG); showDialog(FAILED_REMOVAL_DIALOG);
} else { } else {
finish(); finish();