Skip to content

Commit fd67f25

Browse files
committed
Make saveNotification instance method
1 parent 1577897 commit fd67f25

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
@@ -337,7 +337,7 @@ void performNotificationScheduling(int id, Notification.Builder notificationBuil
337337
Intent intent = buildNotificationIntent();
338338

339339
if (intent != null) {
340-
UnityNotificationManager.saveNotification(mContext, notificationBuilder.build());
340+
saveNotification(notificationBuilder.build());
341341
scheduleAlarmWithNotification(notificationBuilder, intent, fireTime);
342342
}
343343
}
@@ -487,9 +487,9 @@ private PendingIntent getBroadcastPendingIntent(int id, Intent intent, int flags
487487

488488
// Save the notification intent to SharedPreferences if reschedule_on_restart is true,
489489
// which will be consumed by UnityNotificationRestartOnBootReceiver for device reboot.
490-
protected static synchronized void saveNotification(Context context, Notification notification) {
490+
synchronized void saveNotification(Notification notification) {
491491
String notification_id = Integer.toString(notification.extras.getInt(KEY_ID, -1));
492-
SharedPreferences prefs = context.getSharedPreferences(getSharedPrefsNameByNotificationId(notification_id), Context.MODE_PRIVATE);
492+
SharedPreferences prefs = mContext.getSharedPreferences(getSharedPrefsNameByNotificationId(notification_id), Context.MODE_PRIVATE);
493493
UnityNotificationUtilities.serializeNotification(prefs, notification);
494494
}
495495

0 commit comments

Comments
 (0)