diff options
author | Andrew Lee <anwlee@google.com> | 2014-12-16 18:47:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-12-16 18:47:12 +0000 |
commit | 7594d78c155773244ad1ef714e75f1ed30b51c15 (patch) | |
tree | ef713eb963df46a82b443bb630c04084343d801b /src | |
parent | e23b42bdfffcd959e184474ecd92a007c3d42ac8 (diff) | |
parent | 1d4cd7cfc00f957b97351912e91eb2d7612147db (diff) |
Merge "Check for cases before clearing dialog." into lmp-mr1-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/calllog/ClearCallLogDialog.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/dialer/calllog/ClearCallLogDialog.java b/src/com/android/dialer/calllog/ClearCallLogDialog.java index e6b4ce29c..f4c75d10d 100644 --- a/src/com/android/dialer/calllog/ClearCallLogDialog.java +++ b/src/com/android/dialer/calllog/ClearCallLogDialog.java @@ -67,7 +67,13 @@ public class ClearCallLogDialog extends DialogFragment { } @Override protected void onPostExecute(Void result) { - progressDialog.dismiss(); + if (getActivity() == null || getActivity().isDestroyed()) { + return; + } + + if (progressDialog != null && progressDialog.isShowing()) { + progressDialog.dismiss(); + } } }; // TODO: Once we have the API, we should configure this ProgressDialog |