diff options
author | codeworkx <daniel.hillenbrand@codeworkx.de> | 2017-01-28 15:47:33 +0100 |
---|---|---|
committer | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2017-02-18 14:45:45 +0000 |
commit | b6b13fc3a01a52ef376f086ff64ce59cd495333c (patch) | |
tree | 7e037cc8f2523337e74be34434199d845d240ef4 | |
parent | ebd135d893a25ee72d4a632bb62abda7cfe4ef95 (diff) | |
download | android_packages_apps_Snap-b6b13fc3a01a52ef376f086ff64ce59cd495333c.tar.gz android_packages_apps_Snap-b6b13fc3a01a52ef376f086ff64ce59cd495333c.tar.bz2 android_packages_apps_Snap-b6b13fc3a01a52ef376f086ff64ce59cd495333c.zip |
Snap: CaptureModule: enable and fix manual iso control
Change-Id: Ibf2cbed99f0205c9dc4eadc422096b03a35f0a43
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 12 | ||||
-rw-r--r-- | src/com/android/camera/CaptureUI.java | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index ee66776bf..89a6cf963 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -280,6 +280,7 @@ public class CaptureModule extends BaseModule<CaptureUI> implements PhotoControl private int mHighSpeedCaptureRate; private static final int SELFIE_FLASH_DURATION = 680; + private static final long EXPOSURE_TIME_DEFAULT = 1000000000L/30; private MediaActionSound mSound; @@ -2963,9 +2964,14 @@ public class CaptureModule extends BaseModule<CaptureUI> implements PhotoControl private void applyIso(CaptureRequest.Builder request) { String value = mSettingsManager.getValue(SettingsManager.KEY_ISO); if (value == null) return; - if (value.equals("auto")) return; - int intValue = Integer.parseInt(value); - request.set(CaptureRequest.SENSOR_SENSITIVITY, intValue); + if (value.equals("auto")) { + request.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON); + } else { + int intValue = Integer.parseInt(value); + request.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_OFF); + request.set(CaptureRequest.SENSOR_SENSITIVITY, intValue); + request.set(CaptureRequest.SENSOR_EXPOSURE_TIME, EXPOSURE_TIME_DEFAULT); + } } private void applyColorEffect(CaptureRequest.Builder request) { diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java index efaeb2e50..f0f498ac3 100644 --- a/src/com/android/camera/CaptureUI.java +++ b/src/com/android/camera/CaptureUI.java @@ -110,6 +110,7 @@ public class CaptureUI extends BaseUI implements PreviewGestures.SingleTapListen SettingsManager.KEY_CAMERA_SAVEPATH, SettingsManager.KEY_LONGSHOT, SettingsManager.KEY_EXPOSURE, + SettingsManager.KEY_ISO, SettingsManager.KEY_WHITE_BALANCE, SettingsManager.KEY_FACE_DETECTION, SettingsManager.KEY_VIDEO_HIGH_FRAME_RATE, |