Skip to content

Commit

Permalink
fix: set the exposure compensation only if it is within the valid range
Browse files Browse the repository at this point in the history
  • Loading branch information
ujizin committed Sep 8, 2024
1 parent b5f607f commit 50a8f51
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,9 @@ public class CameraState(context: Context) {
}

private fun setExposureCompensation(exposureCompensation: Int) {
controller.cameraControl?.setExposureCompensationIndex(exposureCompensation)
if (exposureCompensation in minExposure..maxExposure) {
controller.cameraControl?.setExposureCompensationIndex(exposureCompensation)
}
}

/**
Expand Down

0 comments on commit 50a8f51

Please sign in to comment.