mirror of
				https://github.com/SimpleMobileTools/Simple-Flashlight.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	Fix MyCameraImpl crash
				
					
				
			This commit is contained in:
		| @@ -47,6 +47,9 @@ class MyCameraImpl private constructor(val context: Context, private var cameraT | ||||
|  | ||||
|     private val scope = CoroutineScope(Dispatchers.Default) | ||||
|  | ||||
|     private val _flashlightOn = MutableStateFlow(false) | ||||
|     val flashlightOnFlow = _flashlightOn.asStateFlow() | ||||
|  | ||||
|     private val cameraFlash: CameraFlash? | ||||
|         get() { | ||||
|             if (MyCameraImpl.cameraFlash == null) { | ||||
| @@ -60,9 +63,6 @@ class MyCameraImpl private constructor(val context: Context, private var cameraT | ||||
|         stroboFrequency = context.config.stroboscopeFrequency | ||||
|     } | ||||
|  | ||||
|     private val _flashlightOn = MutableStateFlow(false) | ||||
|     val flashlightOnFlow = _flashlightOn.asStateFlow() | ||||
|  | ||||
|     private val _sosDisabled = MutableSharedFlow<Unit>() | ||||
|     val sosDisabled = _sosDisabled.asSharedFlow() | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user