diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-05-27 11:38:26 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-05-28 19:16:42 -0700 |
commit | e8296d0749fe6c4d6c0cb4fb500a60fa648936ca (patch) | |
tree | 21bf4813f4175d9d68bd678795e416a22567e352 /src | |
parent | 0542ce1f6f50af1ef45d8623ff3cdc2cc3a92f6b (diff) | |
download | android_packages_apps_Snap-e8296d0749fe6c4d6c0cb4fb500a60fa648936ca.tar.gz android_packages_apps_Snap-e8296d0749fe6c4d6c0cb4fb500a60fa648936ca.tar.bz2 android_packages_apps_Snap-e8296d0749fe6c4d6c0cb4fb500a60fa648936ca.zip |
Camera2: fix flashlight widget status error after luanch camera
Flashlight will be initialized when we luanch camera.But flashlight
widget do not know the flashlight has been turned off.So the widget's
status still in turn-on.
Send a broadcast to make flashlight widget know that flashlight has
been closed.So the status can be right.
CRs-Fixed: 670735
Change-Id: I8a6b7f49111071f23bc55c6d61b01a38d807cb57
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index cd0511536..5b8cf06d4 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -1279,6 +1279,14 @@ public class CameraActivity extends Activity } mLocalImagesObserver.setActivityPaused(false); mLocalVideosObserver.setActivityPaused(false); + + //This is a temporal solution to share LED resource + //as Android doesn’t have any default intent to share the state. + // if the led flash light is open, turn it off + Log.d(TAG, "send the turn off LED Flashlight the broadcast"); + Intent intent = new Intent("qualcomm.android.LEDFlashlight.appWidgetUpdate"); + intent.putExtra("camera_led", true); + sendBroadcast(intent); } @Override |