summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2016-02-21 11:17:12 +0100
committercodeworkx <codeworkx@cyanogenmod.org>2016-02-21 11:17:12 +0100
commit0b3e47286dfa59c23c6e25d913aa8f37817e6484 (patch)
tree273b69743ed8866b4990040c06a93f86133ee5af
parent11f6404c9e81b0a4b407eb0c48be44cfd9aa59e8 (diff)
downloadandroid_packages_apps_Snap-0b3e47286dfa59c23c6e25d913aa8f37817e6484.zip
android_packages_apps_Snap-0b3e47286dfa59c23c6e25d913aa8f37817e6484.tar.gz
android_packages_apps_Snap-0b3e47286dfa59c23c6e25d913aa8f37817e6484.tar.bz2
Snap: fix camera hang on LGE G4 when flash got used
Change-Id: I23e53333a0bbe2a12e64e87ec8594aeaa503e9fc
-rw-r--r--src/com/android/camera/PhotoModule.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 4890d74..b1d1011 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1631,9 +1631,16 @@ public class PhotoModule
new JpegPictureCallback(loc));
setCameraState(SNAPSHOT_IN_PROGRESS);
- // LGE G4: Preview needs to be restarted when flash got used while luminance is low
- if (CameraUtil.isLowLuminance(mParameters)) {
- setupPreview();
+ // LGE G4: Preview needs to be restarted when flash got used
+ if (CameraUtil.isSupported(mParameters, CameraSettings.KEY_LUMINANCE_CONITION)) {
+ String flashMode = mPreferences.getString(
+ CameraSettings.KEY_FLASH_MODE,
+ mActivity.getString(R.string.pref_camera_flashmode_default));
+ if (flashMode.equals(Parameters.FLASH_MODE_ON) ||
+ (!flashMode.equals(Parameters.FLASH_MODE_OFF) &&
+ CameraUtil.isLowLuminance(mParameters))) {
+ setupPreview();
+ }
}
}