removing a redundant variable

This commit is contained in:
Tibor Kaputa 2022-10-24 16:30:04 +02:00 committed by GitHub
parent e412cec759
commit d304088963
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -211,9 +211,8 @@ class CameraXPreview(
}
private fun buildImageCapture(resolution: Size, rotation: Int): ImageCapture {
val captureMode = getCaptureMode()
return Builder()
.setCaptureMode(captureMode)
.setCaptureMode(getCaptureMode())
.setFlashMode(flashMode)
.setJpegQuality(config.photoQuality)
.setTargetRotation(rotation)
@ -222,7 +221,7 @@ class CameraXPreview(
}
private fun getCaptureMode(): Int {
return when(config.captureMode){
return when (config.captureMode) {
CaptureMode.MINIMISE_LATENCY -> CAPTURE_MODE_MINIMIZE_LATENCY
CaptureMode.MAXIMISE_QUALITY -> CAPTURE_MODE_MAXIMIZE_QUALITY
}