@@ -416,7 +416,7 @@ protected static Intent buildOpenAppIntent(Context context, Class className) {
416
416
void performNotificationHousekeeping (Set <String > ids ) {
417
417
Log .d (TAG_UNITY , "Checking for invalid notification IDs still hanging around" );
418
418
419
- Set <String > invalid = findInvalidNotificationIds (mContext , ids );
419
+ Set <String > invalid = findInvalidNotificationIds (ids );
420
420
synchronized (UnityNotificationManager .class ) {
421
421
Set <String > currentIds = new HashSet <>(ids );
422
422
for (String id : invalid ) {
@@ -430,20 +430,20 @@ void performNotificationHousekeeping(Set<String> ids) {
430
430
deleteExpiredNotificationIntent (id );
431
431
}
432
432
433
- private static Set <String > findInvalidNotificationIds (Context context , Set <String > ids ) {
434
- Intent intent = buildNotificationIntent (context );
433
+ private Set <String > findInvalidNotificationIds (Set <String > ids ) {
434
+ Intent intent = buildNotificationIntent (mContext );
435
435
HashSet <String > invalid = new HashSet <String >();
436
436
for (String id : ids ) {
437
437
// Get the given broadcast PendingIntent by id as request code.
438
438
// FLAG_NO_CREATE is set to return null if the described PendingIntent doesn't exist.
439
- PendingIntent broadcast = getBroadcastPendingIntent (context , Integer .valueOf (id ), intent , PendingIntent .FLAG_NO_CREATE );
439
+ PendingIntent broadcast = getBroadcastPendingIntent (mContext , Integer .valueOf (id ), intent , PendingIntent .FLAG_NO_CREATE );
440
440
if (broadcast == null ) {
441
441
invalid .add (id );
442
442
}
443
443
}
444
444
445
445
if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ) {
446
- StatusBarNotification [] active = getNotificationManager (context ).getActiveNotifications ();
446
+ StatusBarNotification [] active = getNotificationManager ().getActiveNotifications ();
447
447
for (StatusBarNotification notification : active ) {
448
448
// any notifications in status bar are still valid
449
449
String id = String .valueOf (notification .getId ());
0 commit comments