From 0721a9463099e94f37b6c48d0aceaa04161bbda0 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Tue, 20 Jan 2015 14:29:22 -0800 Subject: [PATCH] Don't try to launch broadcast receivers during boot It turns out that sysUI visibility / interactivity is racing with boot, and it's possible in some circumstances for the user to start the secure camera swipe gesture before formal boot-completed. Make sure we only send the camera-related broadcast to registered receivers in that case, otherwise we'll implicitly be asking to launch other apps before boot, which is forbidden. Bug 19060618 Change-Id: I7fcf13b5af7b2edfbb4aac06ef04a0fde2c6a0f7 --- .../systemui/statusbar/phone/SecureCameraLaunchManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java index 3f5cf3f808ac1..4a43c4784af58 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java @@ -175,6 +175,7 @@ public class SecureCameraLaunchManager { public void run() { Intent intent = new Intent(); intent.setAction(CLOSE_CAMERA_ACTION_NAME); + intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mContext.sendBroadcast(intent); } });