Cancel notification on dismiss

This doesn't happen automatically after all on older devices

PiperOrigin-RevId: 230251258
This commit is contained in:
olly 2019-01-21 21:06:03 +00:00 committed by Oliver Woodman
parent 9fec49f326
commit 29711b922d

View File

@ -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);