mirror of
				https://github.com/SimpleMobileTools/Simple-Flashlight.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	disable sos or strobo if the other one is enabled
This commit is contained in:
		| @@ -248,6 +248,8 @@ class MainActivity : SimpleActivity() { | ||||
|         window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) | ||||
|         mIsFlashlightOn = true | ||||
|  | ||||
|         sos_btn.setTextColor(getContrastColor()) | ||||
|  | ||||
|         changeIconColor(getContrastColor(), stroboscope_btn) | ||||
|         stroboscope_bar.beInvisible() | ||||
|     } | ||||
|   | ||||
| @@ -57,6 +57,11 @@ class MyCameraImpl(val context: Context) { | ||||
|     } | ||||
|  | ||||
|     fun toggleStroboscope(): Boolean { | ||||
|         if (isSOSRunning) { | ||||
|             stopSOS() | ||||
|             return false | ||||
|         } | ||||
|  | ||||
|         isStroboSOS = false | ||||
|         if (!isStroboscopeRunning) { | ||||
|             disableFlashlight() | ||||
| @@ -81,6 +86,11 @@ class MyCameraImpl(val context: Context) { | ||||
|     } | ||||
|  | ||||
|     fun toggleSOS(): Boolean { | ||||
|         if (isStroboscopeRunning) { | ||||
|             stopStroboscope() | ||||
|             return false | ||||
|         } | ||||
|  | ||||
|         isStroboSOS = true | ||||
|         if (isStroboscopeRunning) { | ||||
|             stopStroboscope() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user