Skip to content

Commit 1b025ab

Browse files
committed
Fix null exception
1 parent 1e23869 commit 1b025ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ public int scheduleNotification(Notification.Builder notificationBuilder) {
321321
extras.putInt(KEY_ID, id);
322322
}
323323

324-
// don't replace existing, only put null as placeholder so we properly report status as being scheduled
325-
mScheduledNotifications.putIfAbsent(Integer.valueOf(id), null);
324+
// don't replace, put builder as placeholder to report the status correctly
325+
mScheduledNotifications.putIfAbsent(Integer.valueOf(id), notificationBuilder);
326326
mBackgroundThread.enqueueNotification(id, notificationBuilder);
327327
return id;
328328
}

0 commit comments

Comments
 (0)