diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt index 7d34c213..b16e441e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt @@ -3,7 +3,6 @@ package com.simplemobiletools.camera.helpers const val ORIENT_PORTRAIT = 0 const val ORIENT_LANDSCAPE_LEFT = 1 const val ORIENT_LANDSCAPE_RIGHT = 2 -const val RATIO_TOLERANCE = 0.1f // shared preferences const val SAVE_PHOTOS = "save_photos" diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraOne.kt b/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraOne.kt index 2b5499c7..a5bb68a6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraOne.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraOne.kt @@ -257,7 +257,7 @@ class PreviewCameraOne : ViewGroup, SurfaceHolder.Callback, MyPreview { val screenAspectRatio = mActivity!!.realScreenSize.y / mActivity!!.realScreenSize.x.toFloat() resolutions.forEachIndexed { index, size -> val diff = screenAspectRatio - (size.width / size.height.toFloat()) - if (Math.abs(diff) < RATIO_TOLERANCE) { + if (Math.abs(diff) < 0.1f) { mConfig.backPhotoResIndex = index return index }