summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSultanxda <sultanxda@gmail.com>2015-10-04 01:16:49 -0700
committerSteve Kondik <steve@cyngn.com>2016-11-02 12:24:49 -0700
commitbd3f2306a2eb77da6681cf8d425ce9c65f246b16 (patch)
treed34c0d227295acff9a513a29c1ace5f3b5364217 /src
parent403592f3bdf11e8520145b7ec1b4e38c1b536d65 (diff)
downloadandroid_packages_apps_Snap-bd3f2306a2eb77da6681cf8d425ce9c65f246b16.tar.gz
android_packages_apps_Snap-bd3f2306a2eb77da6681cf8d425ce9c65f246b16.tar.bz2
android_packages_apps_Snap-bd3f2306a2eb77da6681cf8d425ce9c65f246b16.zip
SnapdragonCamera: Lock AE and AWB for tap-to-focus in camcorder
Lock the auto exposure (AE) and auto white balance (AWB) when tap-to-focus is used in the camcorder. Change-Id: Ieb24e04b74a06b2390eb9302e74b4f69b1486951 Signed-off-by: Sultanxda <sultanxda@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/VideoModule.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 065f3912b..e4ec96bd8 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -127,6 +127,8 @@ public class VideoModule implements CameraModule,
private Parameters mParameters;
private boolean mFocusAreaSupported;
private boolean mMeteringAreaSupported;
+ private boolean mAeLockSupported;
+ private boolean mAwbLockSupported;
private boolean mIsInReviewMode;
private boolean mSnapshotInProgress = false;
@@ -567,6 +569,20 @@ public class VideoModule implements CameraModule,
mPendingSwitchCameraId = -1;
}
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+ private void setAutoExposureLockIfSupported() {
+ if (mAeLockSupported) {
+ mParameters.setAutoExposureLock(mFocusManager.getAeAwbLock());
+ }
+ }
+
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+ private void setAutoWhiteBalanceLockIfSupported() {
+ if (mAwbLockSupported) {
+ mParameters.setAutoWhiteBalanceLock(mFocusManager.getAeAwbLock());
+ }
+ }
+
@Override
public void waitingLocationPermissionResult(boolean result) {
mLocationManager.waitingLocationPermissionResult(result);
@@ -608,6 +624,8 @@ public class VideoModule implements CameraModule,
mParameters.setFocusAreas(mFocusManager.getFocusAreas());
if (mMeteringAreaSupported)
mParameters.setMeteringAreas(mFocusManager.getMeteringAreas());
+ setAutoExposureLockIfSupported();
+ setAutoWhiteBalanceLockIfSupported();
if (mFocusAreaSupported || mMeteringAreaSupported) {
mParameters.setFocusMode(mFocusManager.getFocusMode(true));
mCameraDevice.setParameters(mParameters);
@@ -3043,6 +3061,8 @@ public class VideoModule implements CameraModule,
private void initializeCapabilities() {
mFocusAreaSupported = CameraUtil.isFocusAreaSupported(mParameters);
mMeteringAreaSupported = CameraUtil.isMeteringAreaSupported(mParameters);
+ mAeLockSupported = CameraUtil.isAutoExposureLockSupported(mParameters);
+ mAwbLockSupported = CameraUtil.isAutoWhiteBalanceLockSupported(mParameters);
}
// Preview texture has been copied. Now camera can be released and the