mirror of
https://github.com/androidx/media.git
synced 2025-05-06 23:20:42 +08:00
Cancel notification on dismiss
This doesn't happen automatically after all on older devices PiperOrigin-RevId: 230251258
This commit is contained in:
parent
9fec49f326
commit
29711b922d
@ -928,10 +928,8 @@ public class PlayerNotificationManager {
|
|||||||
|
|
||||||
private void stopNotification(boolean dismissedByUser) {
|
private void stopNotification(boolean dismissedByUser) {
|
||||||
if (isNotificationStarted) {
|
if (isNotificationStarted) {
|
||||||
if (!dismissedByUser) {
|
|
||||||
notificationManager.cancel(notificationId);
|
|
||||||
}
|
|
||||||
isNotificationStarted = false;
|
isNotificationStarted = false;
|
||||||
|
notificationManager.cancel(notificationId);
|
||||||
context.unregisterReceiver(notificationBroadcastReceiver);
|
context.unregisterReceiver(notificationBroadcastReceiver);
|
||||||
if (notificationListener != null) {
|
if (notificationListener != null) {
|
||||||
notificationListener.onNotificationCancelled(notificationId, dismissedByUser);
|
notificationListener.onNotificationCancelled(notificationId, dismissedByUser);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user