Skip to content
Snippets Groups Projects
Commit 85303b54 authored by Koen's avatar Koen
Browse files

Fixed bug in audio focus loss timers using the wrong time.

parent 90de54ac
No related branches found
No related tags found
No related merge requests found
...@@ -341,12 +341,12 @@ class MediaPlaybackService : Service() { ...@@ -341,12 +341,12 @@ class MediaPlaybackService : Service() {
if (Settings.instance.playback.restartPlaybackAfterLoss == 1) { if (Settings.instance.playback.restartPlaybackAfterLoss == 1) {
val lossTime_ms = _audioFocusLossTime_ms val lossTime_ms = _audioFocusLossTime_ms
if (lossTime_ms != null && System.currentTimeMillis() - lossTime_ms < 1000 * 30) { if (lossTime_ms != null && System.currentTimeMillis() - lossTime_ms < 1000 * 10) {
MediaControlReceiver.onPlayReceived.emit() MediaControlReceiver.onPlayReceived.emit()
} }
} else if (Settings.instance.playback.restartPlaybackAfterLoss == 2) { } else if (Settings.instance.playback.restartPlaybackAfterLoss == 2) {
val lossTime_ms = _audioFocusLossTime_ms val lossTime_ms = _audioFocusLossTime_ms
if (lossTime_ms != null && System.currentTimeMillis() - lossTime_ms < 1000 * 10) { if (lossTime_ms != null && System.currentTimeMillis() - lossTime_ms < 1000 * 30) {
MediaControlReceiver.onPlayReceived.emit() MediaControlReceiver.onPlayReceived.emit()
} }
} else if (Settings.instance.playback.restartPlaybackAfterLoss == 3) { } else if (Settings.instance.playback.restartPlaybackAfterLoss == 3) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment