From 8b8fa3e934e3ddf01790e647b4401dc88b24bf67 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Tue, 18 Aug 2015 18:33:49 -0700 Subject: [PATCH] Fix SysUI crash when no metadata is provided Bug: 23327474 Change-Id: I4903c0812c9677e1b31e1f645e3d6f1a03150c38 --- .../systemui/statusbar/phone/KeyguardBottomAreaView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java index 9af8ab7aa7ee3..1a2fa9726414c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java @@ -376,7 +376,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL Intent intent = getCameraIntent(); ActivityInfo targetInfo = PreviewInflater.getTargetActivityInfo(mContext, intent, KeyguardUpdateMonitor.getCurrentUser()); - if (targetInfo != null) { + if (targetInfo != null && targetInfo.metaData != null) { String clazz = targetInfo.metaData.getString( MediaStore.META_DATA_STILL_IMAGE_CAMERA_PREWARM_SERVICE); if (clazz != null) {