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…
Reference in New Issue