mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-01-01 10:07:18 +01:00
removing a redundant variable
This commit is contained in:
parent
4f1bfc3e2a
commit
cf64374411
@ -3,7 +3,6 @@ package com.simplemobiletools.camera.helpers
|
|||||||
const val ORIENT_PORTRAIT = 0
|
const val ORIENT_PORTRAIT = 0
|
||||||
const val ORIENT_LANDSCAPE_LEFT = 1
|
const val ORIENT_LANDSCAPE_LEFT = 1
|
||||||
const val ORIENT_LANDSCAPE_RIGHT = 2
|
const val ORIENT_LANDSCAPE_RIGHT = 2
|
||||||
const val RATIO_TOLERANCE = 0.1f
|
|
||||||
|
|
||||||
// shared preferences
|
// shared preferences
|
||||||
const val SAVE_PHOTOS = "save_photos"
|
const val SAVE_PHOTOS = "save_photos"
|
||||||
|
@ -257,7 +257,7 @@ class PreviewCameraOne : ViewGroup, SurfaceHolder.Callback, MyPreview {
|
|||||||
val screenAspectRatio = mActivity!!.realScreenSize.y / mActivity!!.realScreenSize.x.toFloat()
|
val screenAspectRatio = mActivity!!.realScreenSize.y / mActivity!!.realScreenSize.x.toFloat()
|
||||||
resolutions.forEachIndexed { index, size ->
|
resolutions.forEachIndexed { index, size ->
|
||||||
val diff = screenAspectRatio - (size.width / size.height.toFloat())
|
val diff = screenAspectRatio - (size.width / size.height.toFloat())
|
||||||
if (Math.abs(diff) < RATIO_TOLERANCE) {
|
if (Math.abs(diff) < 0.1f) {
|
||||||
mConfig.backPhotoResIndex = index
|
mConfig.backPhotoResIndex = index
|
||||||
return index
|
return index
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user