Explicit scene modes should override the implicit face priority scene
mode from enabling face detection, to match application/API
expectations.
Change-Id: I6f0f44fadeacfdc0594dd2fdc280e294d2d87df6
&reqControlMode, 1);
if (res != OK) return res;
- uint8_t reqSceneMode = enableFaceDetect ?
- (uint8_t)ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY : sceneMode;
+ uint8_t reqSceneMode =
+ (sceneMode !=
+ (uint8_t)ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED) ? sceneMode :
+ enableFaceDetect ? (uint8_t)ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY :
+ (uint8_t)ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED;
res = request->update(ANDROID_CONTROL_SCENE_MODE,
&reqSceneMode, 1);
if (res != OK) return res;