diff options
author | Rajshekar Eashwarappa <reashw@codeaurora.org> | 2018-12-12 19:07:00 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-12-17 23:20:31 -0800 |
commit | 6eed2ca62fbaeb5b3e9684ade3d1dfb29f6f295b (patch) | |
tree | 5f452fd4ae388afb9f41443182a463c739f3e375 | |
parent | 96345c8413e2336bc424844ae386a4eb9e49aecc (diff) | |
download | android_packages_apps_Snap-6eed2ca62fbaeb5b3e9684ade3d1dfb29f6f295b.tar.gz android_packages_apps_Snap-6eed2ca62fbaeb5b3e9684ade3d1dfb29f6f295b.tar.bz2 android_packages_apps_Snap-6eed2ca62fbaeb5b3e9684ade3d1dfb29f6f295b.zip |
SnapdragonCamera: Check for fixed focus
1. Check whether the lens is fixed focus or variable focus
2. If the lens is fixed focus then just check for
AE state and trigger snapshot, as AF state will always
be 0 for fixed focus lens
3. For varialbe focus lenses check for both AF & AE state
before trigger of Snapshot.
Change-Id: Iafeae46bd4283d336e4686be0a055cf31297c8c5
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 3a69a03c5..a55c9e451 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -1037,7 +1037,14 @@ public class CaptureModule implements CameraModule, PhotoController, } } - if ((CaptureResult.CONTROL_AF_STATE_FOCUSED_LOCKED == afState || + // If the lens is just fixed focus then check only + // for AE Lock else check AF & AE state before + // trigger of capture + if (mSettingsManager.isFixedFocus(getMainCameraId())) { + if (aeState == null || aeState == CaptureResult.CONTROL_AE_STATE_LOCKED) { + checkAfAeStatesAndCapture(id); + } + } else if ((CaptureResult.CONTROL_AF_STATE_FOCUSED_LOCKED == afState || CaptureResult.CONTROL_AF_STATE_NOT_FOCUSED_LOCKED == afState) && (aeState == null || aeState == CaptureResult.CONTROL_AE_STATE_LOCKED)) { checkAfAeStatesAndCapture(id); |