diff options
author | John Spurlock <jspurlock@google.com> | 2015-02-24 12:14:06 -0500 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2015-03-04 18:58:18 +0000 |
commit | c974ac11f808968648d26e83a0b64a7fba02ad15 (patch) | |
tree | 0c5602b8dbc76e70f02f15bc267578a2cf8ae65d /packages | |
parent | 246a3a4a797edf5850073ec8f6b8aa997947d09b (diff) | |
download | frameworks_base-c974ac11f808968648d26e83a0b64a7fba02ad15.zip frameworks_base-c974ac11f808968648d26e83a0b64a7fba02ad15.tar.gz frameworks_base-c974ac11f808968648d26e83a0b64a7fba02ad15.tar.bz2 |
MediaProjectionPermissionActivity: Fix NPE.
Avoid dismissing a null dialog.
Bug: 19492919
Change-Id: I6642bb5194d9818ff3db1266c7c78ed752e23ecf
(cherry picked from commit 3d332f4e67a484abe597576bf329d89655afe720)
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java index 25bab17..c23f45d 100644 --- a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java +++ b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java @@ -114,7 +114,9 @@ public class MediaProjectionPermissionActivity extends Activity @Override protected void onDestroy() { super.onDestroy(); - mDialog.dismiss(); + if (mDialog != null) { + mDialog.dismiss(); + } } @Override @@ -128,7 +130,9 @@ public class MediaProjectionPermissionActivity extends Activity Log.e(TAG, "Error granting projection permission", e); setResult(RESULT_CANCELED); } finally { - mDialog.dismiss(); + if (mDialog != null) { + mDialog.dismiss(); + } finish(); } } |