summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2018-01-15 15:33:12 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-01-15 15:33:12 -0800
commitfcefdf7887253d625dca580614963167414e7032 (patch)
treeca220df73e6b68dc765fbfb0260327aef4a04bf0
parent96afed208cd98bdd81f3468653aa686d229fcdf4 (diff)
parentaf2edc2a798403cf89d2348ecce28d6fea64b836 (diff)
downloadandroid_packages_apps_Snap-fcefdf7887253d625dca580614963167414e7032.tar.gz
android_packages_apps_Snap-fcefdf7887253d625dca580614963167414e7032.tar.bz2
android_packages_apps_Snap-fcefdf7887253d625dca580614963167414e7032.zip
Merge "SnapdragonCamera: version info 2.00.018"
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java55
-rwxr-xr-xsrc/com/android/camera/SettingsManager.java6
-rwxr-xr-xversion.mk2
3 files changed, 33 insertions, 30 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 14b1aa71c..42e206b68 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -238,8 +238,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);
+ public static CaptureResult.Key<Byte> isHdr =
+ new CaptureResult.Key<>("org.codeaurora.qcamera3.stats.is_hdr_scene", Byte.class);
public static CameraCharacteristics.Key<Byte> IS_SUPPORT_QCFA_SENSOR =
new CameraCharacteristics.Key<>("org.codeaurora.qcamera3.quadra_cfa.is_qcfa_sensor", Byte.class);
public static CameraCharacteristics.Key<int[]> QCFA_SUPPORT_DIMENSION =
@@ -548,6 +548,35 @@ public class CaptureModule implements CameraModule, PhotoController,
return mBayerCameraRegion;
}
+ private void detectHDRMode(CaptureResult result, int id) {
+ String value = mSettingsManager.getValue(SettingsManager.KEY_SCENE_MODE);
+ String autoHdr = mSettingsManager.getValue(SettingsManager.KEY_AUTO_HDR);
+ Byte hdrScene = result.get(CaptureModule.isHdr);
+ if (value == null || hdrScene == null) return;
+ mAutoHdrEnable = false;
+ Log.d(TAG, "detectHDRMode: autoHdr is " + autoHdr + ",hdrScene is " + hdrScene);
+ if (autoHdr != null && "enable".equals(autoHdr) && "0".equals(value) && hdrScene == 1) {
+ mAutoHdrEnable = true;
+ mActivity.runOnUiThread(new Runnable() {
+ public void run() {
+ if (mDrawAutoHDR2 != null) {
+ mDrawAutoHDR2.setVisibility(View.VISIBLE);
+ mDrawAutoHDR2.AutoHDR();
+ }
+ }
+ });
+ return;
+ } else {
+ mActivity.runOnUiThread( new Runnable() {
+ public void run () {
+ if (mDrawAutoHDR2 != null) {
+ mDrawAutoHDR2.setVisibility (View.INVISIBLE);
+ }
+ }
+ });
+ }
+ }
+
/**
* A {@link CameraCaptureSession.CaptureCallback} that handles events related to JPEG capture.
*/
@@ -613,6 +642,7 @@ public class CaptureModule implements CameraModule, PhotoController,
updateGraghView();
}
}
+ detectHDRMode(result, id);
processCaptureResult(result);
mPostProcessor.onMetaAvailable(result);
}
@@ -4516,30 +4546,9 @@ public class CaptureModule implements CameraModule, PhotoController,
String autoHdr = mSettingsManager.getValue(SettingsManager.KEY_AUTO_HDR);
if (value == null) return;
int mode = Integer.parseInt(value);
- mAutoHdrEnable = false;
if (autoHdr != null && "enable".equals(autoHdr) && "0".equals(value)) {
- if (mSettingsManager.isHdrScene(getMainCameraId())) {
- mAutoHdrEnable = true;
request.set(CaptureRequest.CONTROL_SCENE_MODE, CaptureRequest.CONTROL_SCENE_MODE_HDR);
request.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_USE_SCENE_MODE);
- mActivity.runOnUiThread(new Runnable() {
- public void run() {
- if (mDrawAutoHDR2 != null) {
- mDrawAutoHDR2.setVisibility(View.VISIBLE);
- mDrawAutoHDR2.AutoHDR();
- }
- }
- });
- }
- return;
- } else {
- mActivity.runOnUiThread( new Runnable() {
- public void run () {
- if (mDrawAutoHDR2 != null) {
- mDrawAutoHDR2.setVisibility (View.INVISIBLE);
- }
- }
- });
}
if(getPostProcFilterId(mode) != PostProcessor.FILTER_NONE || mCaptureHDRTestEnable) {
request.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_USE_SCENE_MODE);
diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java
index 5c3a2c7bd..da9f46e3d 100755
--- a/src/com/android/camera/SettingsManager.java
+++ b/src/com/android/camera/SettingsManager.java
@@ -1152,12 +1152,6 @@ public class SettingsManager implements ListMenu.SettingsListener {
return maxAfRegions != null && maxAfRegions > 0;
}
- public boolean isHdrScene(int id) {
- Integer hdrScene = mCharacteristics.get(id).get(
- CaptureModule.isHdrScene);
- return hdrScene != null && hdrScene == 1;
- }
-
public boolean isFixedFocus(int id) {
Float focusDistance = mCharacteristics.get(id).get(CameraCharacteristics
.LENS_INFO_MINIMUM_FOCUS_DISTANCE);
diff --git a/version.mk b/version.mk
index 729c70351..14e715b8b 100755
--- a/version.mk
+++ b/version.mk
@@ -40,7 +40,7 @@
# base_version_build is 3 digits and auto-increment for fixing CR.
base_version_major := 2
base_version_minor := 00
-base_version_build := 017
+base_version_build := 018
#####################################################
#####################################################