diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-06-18 09:46:45 +0800 |
---|---|---|
committer | Abhisek Devkota <ciwrl@cyanogenmod.com> | 2014-10-21 00:21:04 +0000 |
commit | b5e5e5936b9b48159a7397d8515b96c43ed1433f (patch) | |
tree | c457ba25660f592236867ff584eb67f8bfb09df7 | |
parent | 0b9bae7b23b2d95ab7d8c62e591198080bb8c437 (diff) | |
download | android_packages_apps_Camera2-b5e5e5936b9b48159a7397d8515b96c43ed1433f.tar.gz android_packages_apps_Camera2-b5e5e5936b9b48159a7397d8515b96c43ed1433f.tar.bz2 android_packages_apps_Camera2-b5e5e5936b9b48159a7397d8515b96c43ed1433f.zip |
Camera2: fix flash light turn on after resume camera activity
If user choose an app to open video, onResume will be called after
the choose dialog is dismiss. The function opencamera will be called
and the value mPreviewFocused will be set true, which lead to flash
light turn on when setCameraParameters.
The value mPreviewFocused won't be true if not in Camera Preview, we
can use the visible of mCameraControls to judge.
CRs-Fixed: 680450
Change-Id: Ia04ae0fb77f05fb991e5262f86cbe6f308db7709
-rw-r--r-- | src/com/android/camera/VideoModule.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 2e6e27330..68bc4c39c 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -242,7 +242,7 @@ public class VideoModule implements CameraModule, return; } mParameters = mCameraDevice.getParameters(); - mPreviewFocused = true; + mPreviewFocused = arePreviewControlsVisible(); initializeCapabilities(); } |