diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java index c01aabc9f2..97e36a17b3 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java @@ -928,10 +928,8 @@ public class PlayerNotificationManager { private void stopNotification(boolean dismissedByUser) { if (isNotificationStarted) { - if (!dismissedByUser) { - notificationManager.cancel(notificationId); - } isNotificationStarted = false; + notificationManager.cancel(notificationId); context.unregisterReceiver(notificationBroadcastReceiver); if (notificationListener != null) { notificationListener.onNotificationCancelled(notificationId, dismissedByUser);