Skip to content

Commit 50a8f51

Browse files
committed
fix: set the exposure compensation only if it is within the valid range
1 parent b5f607f commit 50a8f51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

camposer/src/main/java/com/ujizin/camposer/state/CameraState.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,9 @@ public class CameraState(context: Context) {
448448
}
449449

450450
private fun setExposureCompensation(exposureCompensation: Int) {
451-
controller.cameraControl?.setExposureCompensationIndex(exposureCompensation)
451+
if (exposureCompensation in minExposure..maxExposure) {
452+
controller.cameraControl?.setExposureCompensationIndex(exposureCompensation)
453+
}
452454
}
453455

454456
/**

0 commit comments

Comments
 (0)