mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-04-13 06:52:05 +02:00
add a zoom check before trying to get zoom ratios
This commit is contained in:
parent
0fb37c7c20
commit
b6834e2099
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user