catch all exceptions thrown at getting camera characteristics
This commit is contained in:
parent
c886b5f10f
commit
b07afb2906
|
@ -57,5 +57,5 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.26.19'
|
implementation 'com.simplemobiletools:commons:5.28.3'
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
|
||||||
mTextureView = textureView
|
mTextureView = textureView
|
||||||
val cameraCharacteristics = try {
|
val cameraCharacteristics = try {
|
||||||
getCameraCharacteristics(activity.config.lastUsedCamera)
|
getCameraCharacteristics(activity.config.lastUsedCamera)
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (e: Exception) {
|
||||||
mActivity.showErrorToast("Get camera characteristics $e")
|
mActivity.showErrorToast("Get camera characteristics $e")
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue