summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-03-04 23:09:19 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-04 23:09:19 +0000
commitbd438742870a51eacea3554376f671bd1be0e30c (patch)
treee0872f613f97b55794029d5ecf79199d746a2a80 /packages
parentb214417a6e1a7cca5bac961c2b32b72d8baea2dd (diff)
parentb879e7395fa9446952b840b1d576ff225b039774 (diff)
downloadframeworks_base-bd438742870a51eacea3554376f671bd1be0e30c.zip
frameworks_base-bd438742870a51eacea3554376f671bd1be0e30c.tar.gz
frameworks_base-bd438742870a51eacea3554376f671bd1be0e30c.tar.bz2
am b879e739: am c974ac11: MediaProjectionPermissionActivity: Fix NPE.
* commit 'b879e7395fa9446952b840b1d576ff225b039774': MediaProjectionPermissionActivity: Fix NPE.
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java8
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();
}
}