mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-17 03:40:38 +01: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
|
mParameters = mCamera!!.parameters
|
||||||
mMaxZoom = mParameters!!.maxZoom
|
mMaxZoom = mParameters!!.maxZoom
|
||||||
|
|
||||||
|
if (mParameters!!.isZoomSupported)
|
||||||
mZoomRatios = mParameters!!.zoomRatios as ArrayList<Int>
|
mZoomRatios = mParameters!!.zoomRatios as ArrayList<Int>
|
||||||
|
|
||||||
mSupportedPreviewSizes = mParameters!!.supportedPreviewSizes.sortedByDescending { it.width * it.height }
|
mSupportedPreviewSizes = mParameters!!.supportedPreviewSizes.sortedByDescending { it.width * it.height }
|
||||||
refreshPreview()
|
refreshPreview()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user