mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-28 01:19:23 +01:00
Do not restart sleep timer when automatically playing next episode
This commit is contained in:
parent
a0e3a04f67
commit
29bc5109a6
@ -570,6 +570,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||
} else if (mediaPlayer.getPlayable() == null) {
|
||||
startPlayingFromPreferences();
|
||||
}
|
||||
taskManager.restartSleepTimer();
|
||||
return true;
|
||||
case KeyEvent.KEYCODE_MEDIA_PLAY:
|
||||
if (status == PlayerStatus.PAUSED || status == PlayerStatus.PREPARED) {
|
||||
@ -580,6 +581,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||
} else if (mediaPlayer.getPlayable() == null) {
|
||||
startPlayingFromPreferences();
|
||||
}
|
||||
taskManager.restartSleepTimer();
|
||||
return true;
|
||||
case KeyEvent.KEYCODE_MEDIA_PAUSE:
|
||||
if (status == PlayerStatus.PLAYING) {
|
||||
@ -827,9 +829,6 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||
|
||||
@Override
|
||||
public void onPlaybackStart(@NonNull Playable playable, int position) {
|
||||
if (taskManager.isSleepTimerActive()) {
|
||||
taskManager.restartSleepTimer();
|
||||
}
|
||||
taskManager.startWidgetUpdater();
|
||||
if (position != PlaybackServiceMediaPlayer.INVALID_TIME) {
|
||||
playable.setPosition(position);
|
||||
@ -1446,10 +1445,12 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||
|
||||
public void resume() {
|
||||
mediaPlayer.resume();
|
||||
taskManager.restartSleepTimer();
|
||||
}
|
||||
|
||||
public void prepare() {
|
||||
mediaPlayer.prepare();
|
||||
taskManager.restartSleepTimer();
|
||||
}
|
||||
|
||||
public void pause(boolean abandonAudioFocus, boolean reinit) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user