From 6bbb44d54182674368ed5de93ee849464b714e1b Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Thu, 31 Aug 2023 21:32:50 +0200 Subject: [PATCH] fix: Fix scene mode crash on some emulators --- android/src/main/java/com/mrousavy/camera/CameraSession.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/mrousavy/camera/CameraSession.kt b/android/src/main/java/com/mrousavy/camera/CameraSession.kt index 864acbd..71a0e39 100644 --- a/android/src/main/java/com/mrousavy/camera/CameraSession.kt +++ b/android/src/main/java/com/mrousavy/camera/CameraSession.kt @@ -439,7 +439,7 @@ class CameraSession(private val context: Context, // Night/HDR Mode val sceneMode = if (hdr == true) CaptureRequest.CONTROL_SCENE_MODE_HDR else if (lowLightBoost == true) CaptureRequest.CONTROL_SCENE_MODE_NIGHT else null captureRequest.set(CaptureRequest.CONTROL_SCENE_MODE, sceneMode) - captureRequest.set(CaptureRequest.CONTROL_MODE, if (sceneMode != null) CaptureRequest.CONTROL_MODE_USE_SCENE_MODE else null) + captureRequest.set(CaptureRequest.CONTROL_MODE, if (sceneMode != null) CaptureRequest.CONTROL_MODE_USE_SCENE_MODE else CaptureRequest.CONTROL_MODE_AUTO) // Zoom if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {