am 91b5fab9: Merge "Check if the Activity is finishing before showDialog()"

* commit '91b5fab9b0e8338850fe2838311a0801fddf31d4':
  Check if the Activity is finishing before showDialog()
This commit is contained in:
Amith Yamasani
2013-04-16 06:43:04 -07:00
committed by Android Git Automerger

View File

@@ -115,7 +115,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();