summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
authorjunjiez <junjiez@codeaurora.org>2017-01-19 20:26:55 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-02 23:08:02 -0800
commit23c7ef58ec6f4f10eb1196a3b34171f853d79145 (patch)
treedd005c8b65de79d5afa63818ea9bffb155ee5a76 /src/com/android/camera/CaptureModule.java
parentaca636015e3d82552f7066f35429129aab976313 (diff)
downloadandroid_packages_apps_Snap-23c7ef58ec6f4f10eb1196a3b34171f853d79145.tar.gz
android_packages_apps_Snap-23c7ef58ec6f4f10eb1196a3b34171f853d79145.tar.bz2
android_packages_apps_Snap-23c7ef58ec6f4f10eb1196a3b34171f853d79145.zip
Snapdragon: Add auto HDR to Dev option
When auto HDR is enabled, disable ZSL, and if scene is auto, get isHdrScene from HAL and if HAL return true, apply HDS scene mode. Change-Id: Iac4eef5bf9266ba9ed4779a3b59a93a6ae3eac72
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index e4c162a5b..a5fc251cc 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -239,6 +239,8 @@ public class CaptureModule implements CameraModule, PhotoController,
new CameraCharacteristics.Key<>("org.codeaurora.qcamera3.histogram.max_count", Integer.class);
public static CaptureResult.Key<int[]> histogramStats =
new CaptureResult.Key<>("org.codeaurora.qcamera3.histogram.stats", int[].class);
+ public static CameraCharacteristics.Key<Integer> isHdrScene =
+ new CameraCharacteristics.Key<>("org.codeaurora.qcamera3.stats.is_hdr_scene", Integer.class);
private boolean[] mTakingPicture = new boolean[MAX_NUM_CAM];
private int mControlAFMode = CameraMetadata.CONTROL_AF_MODE_CONTINUOUS_PICTURE;
private int mLastResultAFState = -1;
@@ -4014,8 +4016,16 @@ public class CaptureModule implements CameraModule, PhotoController,
private void applySceneMode(CaptureRequest.Builder request) {
String value = mSettingsManager.getValue(SettingsManager.KEY_SCENE_MODE);
+ String autoHdr = mSettingsManager.getValue(SettingsManager.KEY_AUTO_HDR);
if (value == null) return;
int mode = Integer.parseInt(value);
+ if (autoHdr != null && "enable".equals(autoHdr) && "0".equals(value)) {
+ if (mSettingsManager.isHdrScene(getMainCameraId())) {
+ request.set(CaptureRequest.CONTROL_SCENE_MODE, CaptureRequest.CONTROL_SCENE_MODE_HDR);
+ request.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_USE_SCENE_MODE);
+ }
+ return;
+ }
if(getPostProcFilterId(mode) != PostProcessor.FILTER_NONE || mCaptureHDRTestEnable) {
request.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_AUTO);
return;
@@ -4289,6 +4299,7 @@ public class CaptureModule implements CameraModule, PhotoController,
updateVideoFlash();
return;
case SettingsManager.KEY_FLASH_MODE:
+ case SettingsManager.KEY_AUTO_HDR:
case SettingsManager.KEY_SAVERAW:
case SettingsManager.KEY_HDR:
if (count == 0) restartSession(false);