Prevent multiple alarm timers running at once
This commit is contained in:
parent
8162724328
commit
c6ac2cae86
|
@ -71,6 +71,7 @@ class TimerService : Service() {
|
|||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
timerRunnable?.let { timerHandler.removeCallbacks(it) }
|
||||
secondsLeft = (intent?.getIntExtra("milliseconds", 0) ?: 0) / 1000
|
||||
currentDescription = intent?.getStringExtra("description").toString()
|
||||
secondsTotal = secondsLeft
|
||||
|
|
Loading…
Reference in New Issue
Block a user