File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
app/src/main/kotlin/com/simplemobiletools/flashlight/helpers Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package com.simplemobiletools.flashlight.helpers
22
33import android.annotation.TargetApi
44import android.content.Context
5- import android.hardware.camera2.CameraAccessException
65import android.hardware.camera2.CameraManager
76import android.os.Build
87import android.os.Handler
@@ -18,15 +17,15 @@ internal class MarshmallowCamera constructor(val context: Context) {
1817 init {
1918 try {
2019 cameraId = manager.cameraIdList[0 ] ? : " 0"
21- } catch (ignored: CameraAccessException ) {
20+ } catch (ignored: Exception ) {
2221 }
2322 }
2423
2524 @TargetApi(Build .VERSION_CODES .M )
2625 fun toggleMarshmallowFlashlight (bus : Bus , enable : Boolean ) {
2726 try {
2827 manager.setTorchMode(cameraId!! , enable)
29- } catch (e: CameraAccessException ) {
28+ } catch (e: Exception ) {
3029 val mainRunnable = Runnable {
3130 bus.post(Events .CameraUnavailable ())
3231 }
Original file line number Diff line number Diff line change 11// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
33buildscript {
4- ext. kotlin_version = ' 1.2.20 '
4+ ext. kotlin_version = ' 1.2.21 '
55
66 repositories {
77 jcenter()
You can’t perform that action at this time.
0 commit comments