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