mirror of
https://github.com/jrpie/Launcher.git
synced 2025-05-17 16:01:10 +02:00
catch IllegalArgumentException when accessing torch
This commit is contained in:
parent
4d61557a70
commit
b5b65a4c42
1 changed files with 2 additions and 1 deletions
|
@ -78,7 +78,8 @@ class TorchManager(context: Context) {
|
|||
cameraManager.setTorchMode(camera, !torchEnabled)
|
||||
}
|
||||
|
||||
} catch (e: CameraAccessException) {
|
||||
} catch (e: Exception) {
|
||||
// CameraAccessException, IllegalArgumentException
|
||||
Toast.makeText(
|
||||
context,
|
||||
context.getString(R.string.alert_torch_access_exception),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue