Update notification play/pause button with matching player state
Issue: androidx/media#192 PiperOrigin-RevId: 508649684
This commit is contained in:
parent
574424f626
commit
e1d12fc395
@ -81,6 +81,8 @@
|
||||
([#233](https://github.com/androidx/media/issues/233)).
|
||||
* Make `QueueTimeline` more robust in case of a shady legacy session state
|
||||
([#241](https://github.com/androidx/media/issues/241)).
|
||||
* Fix a bug where notification play/pause button doesn't update with
|
||||
player state ([#192](https://github.com/androidx/media/issues/192)).
|
||||
* Metadata:
|
||||
* Parse multiple null-separated values from ID3 frames, as permitted by
|
||||
ID3 v2.4.
|
||||
|
@ -219,9 +219,11 @@ import java.util.concurrent.TimeoutException;
|
||||
if (startInForegroundRequired) {
|
||||
startForeground(mediaNotification);
|
||||
} else {
|
||||
maybeStopForegroundService(/* removeNotifications= */ false);
|
||||
// Notification manager has to be updated first to avoid missing updates
|
||||
// (https://github.com/androidx/media/issues/192).
|
||||
notificationManagerCompat.notify(
|
||||
mediaNotification.notificationId, mediaNotification.notification);
|
||||
maybeStopForegroundService(/* removeNotifications= */ false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user