Loading app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MarshmallowCamera.kt +2 −3 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ package com.simplemobiletools.flashlight.helpers import android.annotation.TargetApi import android.content.Context import android.hardware.camera2.CameraAccessException import android.hardware.camera2.CameraManager import android.os.Build import android.os.Handler Loading @@ -18,7 +17,7 @@ internal class MarshmallowCamera constructor(val context: Context) { init { try { cameraId = manager.cameraIdList[0] ?: "0" } catch (ignored: CameraAccessException) { } catch (ignored: Exception) { } } Loading @@ -26,7 +25,7 @@ internal class MarshmallowCamera constructor(val context: Context) { fun toggleMarshmallowFlashlight(bus: Bus, enable: Boolean) { try { manager.setTorchMode(cameraId!!, enable) } catch (e: CameraAccessException) { } catch (e: Exception) { val mainRunnable = Runnable { bus.post(Events.CameraUnavailable()) } Loading build.gradle +1 −1 Original line number Diff line number Diff line // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.2.20' ext.kotlin_version = '1.2.21' repositories { jcenter() Loading Loading
app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MarshmallowCamera.kt +2 −3 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ package com.simplemobiletools.flashlight.helpers import android.annotation.TargetApi import android.content.Context import android.hardware.camera2.CameraAccessException import android.hardware.camera2.CameraManager import android.os.Build import android.os.Handler Loading @@ -18,7 +17,7 @@ internal class MarshmallowCamera constructor(val context: Context) { init { try { cameraId = manager.cameraIdList[0] ?: "0" } catch (ignored: CameraAccessException) { } catch (ignored: Exception) { } } Loading @@ -26,7 +25,7 @@ internal class MarshmallowCamera constructor(val context: Context) { fun toggleMarshmallowFlashlight(bus: Bus, enable: Boolean) { try { manager.setTorchMode(cameraId!!, enable) } catch (e: CameraAccessException) { } catch (e: Exception) { val mainRunnable = Runnable { bus.post(Events.CameraUnavailable()) } Loading
build.gradle +1 −1 Original line number Diff line number Diff line // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.2.20' ext.kotlin_version = '1.2.21' repositories { jcenter() Loading