mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
add a zoom check before trying to get zoom ratios
This commit is contained in:
@ -141,7 +141,10 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
||||
|
||||
mParameters = mCamera!!.parameters
|
||||
mMaxZoom = mParameters!!.maxZoom
|
||||
mZoomRatios = mParameters!!.zoomRatios as ArrayList<Int>
|
||||
|
||||
if (mParameters!!.isZoomSupported)
|
||||
mZoomRatios = mParameters!!.zoomRatios as ArrayList<Int>
|
||||
|
||||
mSupportedPreviewSizes = mParameters!!.supportedPreviewSizes.sortedByDescending { it.width * it.height }
|
||||
refreshPreview()
|
||||
|
||||
|
Reference in New Issue
Block a user