Probably finally fixed the double notification bug.
This commit is contained in:
parent
cbe8751ce0
commit
ee1e0d4267
3 changed files with 11 additions and 7 deletions
|
|
@ -45,7 +45,7 @@ public class PlayingNotificationHelper {
|
|||
|
||||
private final NotificationManager notificationManager;
|
||||
private Notification notification;
|
||||
private int notificationId = hashCode();
|
||||
private int notificationId = 1;
|
||||
|
||||
private RemoteViews notificationLayout;
|
||||
private RemoteViews notificationLayoutBig;
|
||||
|
|
@ -262,7 +262,9 @@ public class PlayingNotificationHelper {
|
|||
if (notificationLayoutBig != null) {
|
||||
notificationLayoutBig.setImageViewResource(R.id.action_play_pause, playPauseRes);
|
||||
}
|
||||
notificationManager.notify(notificationId, notification);
|
||||
if (notification != null) {
|
||||
notificationManager.notify(notificationId, notification);
|
||||
}
|
||||
}
|
||||
|
||||
private void setNotificationTextDark(boolean setDark) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue