Skip to content

Commit 8b2f7f5

Browse files
committed
Not shown in foreground notifications should not be simulated as shown on pre-M devices
1 parent 96db30b commit 8b2f7f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

com.unity.mobile.notifications/Runtime/Android/Plugins/com/unity/androidnotifications/UnityNotificationManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,9 +645,9 @@ protected static void notify(Context context, int id, Notification notification)
645645
boolean showInForeground = notification.extras.getBoolean(KEY_SHOW_IN_FOREGROUND, true);
646646
if (!isInForeground() || showInForeground) {
647647
getNotificationManager(context).notify(id, notification);
648-
}
649-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) synchronized (UnityNotificationManager.class) {
650-
mVisibleNotifications.add(Integer.valueOf(id));
648+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) synchronized (UnityNotificationManager.class) {
649+
mVisibleNotifications.add(Integer.valueOf(id));
650+
}
651651
}
652652

653653
try {

0 commit comments

Comments
 (0)