mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
removing a redundant variable
This commit is contained in:
@ -211,9 +211,8 @@ class CameraXPreview(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun buildImageCapture(resolution: Size, rotation: Int): ImageCapture {
|
private fun buildImageCapture(resolution: Size, rotation: Int): ImageCapture {
|
||||||
val captureMode = getCaptureMode()
|
|
||||||
return Builder()
|
return Builder()
|
||||||
.setCaptureMode(captureMode)
|
.setCaptureMode(getCaptureMode())
|
||||||
.setFlashMode(flashMode)
|
.setFlashMode(flashMode)
|
||||||
.setJpegQuality(config.photoQuality)
|
.setJpegQuality(config.photoQuality)
|
||||||
.setTargetRotation(rotation)
|
.setTargetRotation(rotation)
|
||||||
@ -222,7 +221,7 @@ class CameraXPreview(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getCaptureMode(): Int {
|
private fun getCaptureMode(): Int {
|
||||||
return when(config.captureMode){
|
return when (config.captureMode) {
|
||||||
CaptureMode.MINIMISE_LATENCY -> CAPTURE_MODE_MINIMIZE_LATENCY
|
CaptureMode.MINIMISE_LATENCY -> CAPTURE_MODE_MINIMIZE_LATENCY
|
||||||
CaptureMode.MAXIMISE_QUALITY -> CAPTURE_MODE_MAXIMIZE_QUALITY
|
CaptureMode.MAXIMISE_QUALITY -> CAPTURE_MODE_MAXIMIZE_QUALITY
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user