From 77c8d50cf4a79277eb9d63274f52d4716fa69680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Sep 2023 10:49:22 +0200 Subject: [PATCH] Close app when timer runs out on BrightDisplayActivity --- .../flashlight/activities/BrightDisplayActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt index 0731a4e..05f870f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt @@ -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) } } }