Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +8 −0 Original line number Diff line number Diff line Loading @@ -1033,6 +1033,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); filter.addAction(Intent.ACTION_SCREEN_OFF); filter.addAction(Intent.ACTION_SCREEN_ON); // receive broadcast from SnapdragonCamera filter.addAction(FlashlightController.ACTION_CLOSE_FLASHLIGHT); if (DEBUG_MEDIA_FAKE_ARTWORK) { filter.addAction("fake_artwork"); } Loading Loading @@ -3286,6 +3288,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, if (DEBUG_MEDIA_FAKE_ARTWORK) { updateMediaMetaData(true); } } else if (FlashlightController.ACTION_CLOSE_FLASHLIGHT.equals(action)) { Bundle bundle = intent.getExtras(); if (bundle != null) { if (bundle.getBoolean("camera_led", false)) mFlashlightController.killFlashlight(); } } } }; Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java +3 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ public class FlashlightController { private static final int DISPATCH_OFF = 1; private static final int DISPATCH_AVAILABILITY_CHANGED = 2; public static final String ACTION_CLOSE_FLASHLIGHT = "org.codeaurora.snapcam.action.CLOSE_FLASHLIGHT"; private final CameraManager mCameraManager; /** Call {@link #ensureHandler()} before using */ private Handler mHandler; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +8 −0 Original line number Diff line number Diff line Loading @@ -1033,6 +1033,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); filter.addAction(Intent.ACTION_SCREEN_OFF); filter.addAction(Intent.ACTION_SCREEN_ON); // receive broadcast from SnapdragonCamera filter.addAction(FlashlightController.ACTION_CLOSE_FLASHLIGHT); if (DEBUG_MEDIA_FAKE_ARTWORK) { filter.addAction("fake_artwork"); } Loading Loading @@ -3286,6 +3288,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, if (DEBUG_MEDIA_FAKE_ARTWORK) { updateMediaMetaData(true); } } else if (FlashlightController.ACTION_CLOSE_FLASHLIGHT.equals(action)) { Bundle bundle = intent.getExtras(); if (bundle != null) { if (bundle.getBoolean("camera_led", false)) mFlashlightController.killFlashlight(); } } } }; Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java +3 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,9 @@ public class FlashlightController { private static final int DISPATCH_OFF = 1; private static final int DISPATCH_AVAILABILITY_CHANGED = 2; public static final String ACTION_CLOSE_FLASHLIGHT = "org.codeaurora.snapcam.action.CLOSE_FLASHLIGHT"; private final CameraManager mCameraManager; /** Call {@link #ensureHandler()} before using */ private Handler mHandler; Loading