Camera2: When focus is already locked in CAF mode, do not trigger HAL.
In HAL2 CAF modes, once focus is locked by an AF trigger, additional
triggers will not cause AF notifications, since the state will not
change again until a cancelAutofocus call.
Since the old API still expects to see a notification, short-circuit
this at the service and send an immediate success notification.
Bug: 7318298
Change-Id: Ib209a24eaf2a35a247d06aea671efe80a33d751e
diff --git a/services/camera/libcameraservice/camera2/Parameters.h b/services/camera/libcameraservice/camera2/Parameters.h
index fd02744..8a8645e 100644
--- a/services/camera/libcameraservice/camera2/Parameters.h
+++ b/services/camera/libcameraservice/camera2/Parameters.h
@@ -88,6 +88,8 @@
FOCUS_MODE_INVALID = -1
} focusMode;
+ uint8_t focusState; // Latest focus state from HAL
+
// For use with triggerAfWithAuto quirk
focusMode_t shadowFocusMode;