summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-03-04 23:10:35 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-03-04 23:10:35 +0000
commit73cb9679fae917ffd72995339c92bd01a10a54e7 (patch)
treeb6bb1c3004941092dbab0682f5ae3c9b219ac1a2 /packages
parent2782f31a73ced5287cc5c78dd79b689aad4dc6c6 (diff)
parentd3c532ef254881fc5bfac198651c9032f8108db9 (diff)
downloadframeworks_base-73cb9679fae917ffd72995339c92bd01a10a54e7.zip
frameworks_base-73cb9679fae917ffd72995339c92bd01a10a54e7.tar.gz
frameworks_base-73cb9679fae917ffd72995339c92bd01a10a54e7.tar.bz2
am c974ac11: MediaProjectionPermissionActivity: Fix NPE.
automerge: d3c532e * commit 'd3c532ef254881fc5bfac198651c9032f8108db9': 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();
}
}