Loading services/camera/libcameraservice/Camera2Client.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -1007,7 +1007,8 @@ status_t Camera2Client::autoFocus() { */ if (l.mParameters.quirks.triggerAfWithAuto && l.mParameters.sceneMode != ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED && l.mParameters.focusMode != Parameters::FOCUS_MODE_AUTO) { l.mParameters.focusMode != Parameters::FOCUS_MODE_AUTO && !l.mParameters.focusingAreas[0].isEmpty()) { ALOGV("%s: Quirk: Switching from focusMode %d to AUTO", __FUNCTION__, l.mParameters.focusMode); l.mParameters.shadowFocusMode = l.mParameters.focusMode; Loading Loading @@ -1038,13 +1039,16 @@ status_t Camera2Client::cancelAutoFocus() { triggerId = ++l.mParameters.afTriggerCounter; // When using triggerAfWithAuto quirk, may need to reset focus mode to // the real state at this point. // the real state at this point. No need to cancel explicitly if // changing the AF mode. if (l.mParameters.shadowFocusMode != Parameters::FOCUS_MODE_INVALID) { ALOGV("%s: Quirk: Restoring focus mode to %d", __FUNCTION__, l.mParameters.shadowFocusMode); l.mParameters.focusMode = l.mParameters.shadowFocusMode; l.mParameters.shadowFocusMode = Parameters::FOCUS_MODE_INVALID; updateRequests(l.mParameters); return OK; } } syncWithDevice(); Loading services/camera/libcameraservice/camera2/Parameters.h +3 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,9 @@ struct Parameters { Area(int left, int top, int right, int bottom, int weight): left(left), top(top), right(right), bottom(bottom), weight(weight) {} bool isEmpty() const { return (left == 0) && (top == 0) && (right == 0) && (bottom == 0); } }; Vector<Area> focusingAreas; Loading Loading
services/camera/libcameraservice/Camera2Client.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -1007,7 +1007,8 @@ status_t Camera2Client::autoFocus() { */ if (l.mParameters.quirks.triggerAfWithAuto && l.mParameters.sceneMode != ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED && l.mParameters.focusMode != Parameters::FOCUS_MODE_AUTO) { l.mParameters.focusMode != Parameters::FOCUS_MODE_AUTO && !l.mParameters.focusingAreas[0].isEmpty()) { ALOGV("%s: Quirk: Switching from focusMode %d to AUTO", __FUNCTION__, l.mParameters.focusMode); l.mParameters.shadowFocusMode = l.mParameters.focusMode; Loading Loading @@ -1038,13 +1039,16 @@ status_t Camera2Client::cancelAutoFocus() { triggerId = ++l.mParameters.afTriggerCounter; // When using triggerAfWithAuto quirk, may need to reset focus mode to // the real state at this point. // the real state at this point. No need to cancel explicitly if // changing the AF mode. if (l.mParameters.shadowFocusMode != Parameters::FOCUS_MODE_INVALID) { ALOGV("%s: Quirk: Restoring focus mode to %d", __FUNCTION__, l.mParameters.shadowFocusMode); l.mParameters.focusMode = l.mParameters.shadowFocusMode; l.mParameters.shadowFocusMode = Parameters::FOCUS_MODE_INVALID; updateRequests(l.mParameters); return OK; } } syncWithDevice(); Loading
services/camera/libcameraservice/camera2/Parameters.h +3 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,9 @@ struct Parameters { Area(int left, int top, int right, int bottom, int weight): left(left), top(top), right(right), bottom(bottom), weight(weight) {} bool isEmpty() const { return (left == 0) && (top == 0) && (right == 0) && (bottom == 0); } }; Vector<Area> focusingAreas; Loading