diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2013-06-04 11:17:10 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-06-04 11:17:10 -0700 |
commit | 4b58d70b4109648b5d392d6ad4e4512d9ae5afb7 (patch) | |
tree | 3eb970ec3647c30c3b37afafbb5f887050b39d6d /services/camera | |
parent | c92ed3339b533afbfb94893de6bb10bc2c0951e9 (diff) | |
parent | cbbd6c8354f7323933081b217ce53461d99215c4 (diff) | |
download | frameworks_av-4b58d70b4109648b5d392d6ad4e4512d9ae5afb7.zip frameworks_av-4b58d70b4109648b5d392d6ad4e4512d9ae5afb7.tar.gz frameworks_av-4b58d70b4109648b5d392d6ad4e4512d9ae5afb7.tar.bz2 |
am cbbd6c83: am 8f908c0c: Merge "Camera2/3: Don\'t trigger AF when in INFINITY focus mode." into jb-mr2-dev
* commit 'cbbd6c8354f7323933081b217ce53461d99215c4':
Camera2/3: Don't trigger AF when in INFINITY focus mode.
Diffstat (limited to 'services/camera')
-rw-r--r-- | services/camera/libcameraservice/Camera2Client.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/Camera2Client.cpp b/services/camera/libcameraservice/Camera2Client.cpp index 391960e..1a837dc 100644 --- a/services/camera/libcameraservice/Camera2Client.cpp +++ b/services/camera/libcameraservice/Camera2Client.cpp @@ -1078,8 +1078,12 @@ status_t Camera2Client::autoFocus() { * If the camera does not support auto-focus, it is a no-op and * onAutoFocus(boolean, Camera) callback will be called immediately * with a fake value of success set to true. + * + * Similarly, if focus mode is set to INFINITY, there's no reason to + * bother the HAL. */ - if (l.mParameters.focusMode == Parameters::FOCUS_MODE_FIXED) { + if (l.mParameters.focusMode == Parameters::FOCUS_MODE_FIXED || + l.mParameters.focusMode == Parameters::FOCUS_MODE_INFINITY) { notifyImmediately = true; notifySuccess = true; } @@ -1139,6 +1143,11 @@ status_t Camera2Client::cancelAutoFocus() { int triggerId; { SharedParameters::Lock l(mParameters); + // Canceling does nothing in FIXED or INFINITY modes + if (l.mParameters.focusMode == Parameters::FOCUS_MODE_FIXED || + l.mParameters.focusMode == Parameters::FOCUS_MODE_INFINITY) { + return OK; + } triggerId = ++l.mParameters.afTriggerCounter; // When using triggerAfWithAuto quirk, may need to reset focus mode to |