Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b58d70b authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android Git Automerger
Browse files

am cbbd6c83: am 8f908c0c: Merge "Camera2/3: Don\'t trigger AF when in INFINITY...

am cbbd6c83: am 8f908c0c: Merge "Camera2/3: Don\'t trigger AF when in INFINITY focus mode." into jb-mr2-dev

* commit 'cbbd6c83':
  Camera2/3: Don't trigger AF when in INFINITY focus mode.
parents c92ed333 cbbd6c83
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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