Don't schedule notification time updates if we're not actively playing.

This commit is contained in:
casey langen 2022-07-22 15:18:28 -07:00
parent e7574c286b
commit b2529a830e

View File

@ -353,13 +353,14 @@ class SystemService : Service() {
override fun run() { override fun run() {
playback?.let { pb -> playback?.let { pb ->
when (pb.state) { when (pb.state) {
PlaybackState.Playing, PlaybackState.Playing -> {
PlaybackState.Buffering,
PlaybackState.Paused -> {
updateNotificationAndSessionDebouncer.call() updateNotificationAndSessionDebouncer.call()
scheduleNotificationTimeUpdate() scheduleNotificationTimeUpdate()
} }
PlaybackState.Stopped -> Unit PlaybackState.Buffering,
PlaybackState.Paused,
PlaybackState.Stopped -> {
}
} }
} }
} }