commandStartFaceDetectionL returned the wrong value when face detection is not supported by the HAL.
This caused the JNI function to fail since it expected a BAD_VALUE response in that case.
Change-Id: I53107a3958d541c25930b81eda638d4b6a394254
Signed-off-by: Igor Murashkin <iam@google.com>
diff --git a/services/camera/libcameraservice/Camera2Client.cpp b/services/camera/libcameraservice/Camera2Client.cpp
index 056271d..d3adbdc 100644
--- a/services/camera/libcameraservice/Camera2Client.cpp
+++ b/services/camera/libcameraservice/Camera2Client.cpp
@@ -1255,7 +1255,7 @@
ANDROID_STATISTICS_FACE_DETECT_MODE_OFF) {
ALOGE("%s: Camera %d: Face detection not supported",
__FUNCTION__, mCameraId);
- return INVALID_OPERATION;
+ return BAD_VALUE;
}
if (l.mParameters.enableFaceDetect) return OK;