Camera2: Swap AF notification order, minor bug fix.
In continuous AF modes, when an AF trigger/cancel is received in the
middle of a passive AF scan, we want to send both an AF move stop
callback and an AF done callback. Swap the order of sending to
simplify life when the app just wants to pay attention to the AF done
callback during an active AF trigger.
Bug: 6243944
Change-Id: I127d1675bc37ef828ef89c70b8cfab75f9428a2f
diff --git a/services/camera/libcameraservice/Camera2Client.cpp b/services/camera/libcameraservice/Camera2Client.cpp
index 4566c75..9c2fbcb 100644
--- a/services/camera/libcameraservice/Camera2Client.cpp
+++ b/services/camera/libcameraservice/Camera2Client.cpp
@@ -1790,14 +1790,13 @@
}
}
}
- if (sendCompletedMessage) {
- mCameraClient->notifyCallback(CAMERA_MSG_FOCUS, success ? 1 : 0, 0);
- }
if (sendMovingMessage) {
mCameraClient->notifyCallback(CAMERA_MSG_FOCUS_MOVE,
afInMotion ? 1 : 0, 0);
}
-
+ if (sendCompletedMessage) {
+ mCameraClient->notifyCallback(CAMERA_MSG_FOCUS, success ? 1 : 0, 0);
+ }
}
void Camera2Client::notifyAutoExposure(uint8_t newState, int triggerId) {