catch all exceptions thrown at getting camera characteristics

This commit is contained in:
tibbi 2020-05-16 17:35:44 +02:00
parent c886b5f10f
commit b07afb2906
2 changed files with 2 additions and 2 deletions

View File

@ -57,5 +57,5 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.26.19'
implementation 'com.simplemobiletools:commons:5.28.3'
}

View File

@ -108,7 +108,7 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
mTextureView = textureView
val cameraCharacteristics = try {
getCameraCharacteristics(activity.config.lastUsedCamera)
} catch (e: IllegalArgumentException) {
} catch (e: Exception) {
mActivity.showErrorToast("Get camera characteristics $e")
null
}