mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-06-05 21:59:19 +02:00
Close app when timer runs out on BrightDisplayActivity
This commit is contained in:
@ -13,6 +13,7 @@ import com.simplemobiletools.flashlight.models.Events
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
class BrightDisplayActivity : SimpleActivity() {
|
||||
private val binding by viewBinding(ActivityBrightDisplayBinding::inflate)
|
||||
@ -104,7 +105,7 @@ class BrightDisplayActivity : SimpleActivity() {
|
||||
binding.sleepTimerHolder.beVisible()
|
||||
|
||||
if (event.seconds == 0) {
|
||||
finish()
|
||||
exitProcess(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user