Close app when timer runs out on BrightDisplayActivity

This commit is contained in:
Ensar Sarajčić 2023-09-06 10:49:22 +02:00
parent 174b2ac803
commit 77c8d50cf4
1 changed files with 2 additions and 1 deletions

View File

@ -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)
}
}
}