mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-03-16 16:40:08 +01:00
catch exceptions thrown at trying to zoom manually
This commit is contained in:
parent
3295e58306
commit
b18f0cc4a3
@ -248,7 +248,10 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
||||
newZoomFactor = Math.max(newZoomFactor, 0)
|
||||
newZoomFactor = Math.min(mMaxZoom, newZoomFactor)
|
||||
|
||||
mParameters!!.zoom = newZoomFactor
|
||||
try {
|
||||
mParameters!!.zoom = newZoomFactor
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
mCamera?.parameters = mParameters
|
||||
return true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user