Update notification when timeline changes

Notification buttons for next/previous should change based on the new index of the currently played media item after another media item is added or removed from a playlist.

Issue: androidx/media#130
PiperOrigin-RevId: 485869144
This commit is contained in:
rohks 2022-11-03 14:37:30 +00:00 committed by microkatz
parent be7dd95692
commit 2633f37a2f

View File

@ -294,7 +294,8 @@ import java.util.concurrent.TimeoutException;
if (events.containsAny( if (events.containsAny(
Player.EVENT_PLAYBACK_STATE_CHANGED, Player.EVENT_PLAYBACK_STATE_CHANGED,
Player.EVENT_PLAY_WHEN_READY_CHANGED, Player.EVENT_PLAY_WHEN_READY_CHANGED,
Player.EVENT_MEDIA_METADATA_CHANGED)) { Player.EVENT_MEDIA_METADATA_CHANGED,
Player.EVENT_TIMELINE_CHANGED)) {
mediaSessionService.onUpdateNotification(session); mediaSessionService.onUpdateNotification(session);
} }
} }