question: private void cancelPreviousWebRtcNotifications ( ) { Set < String > notificationIds = mSharedPreferences . getStringSet ( MEDIA_NOTIFICATION_IDS , null ) ; if ( notificationIds == null ) return ; Iterator < String > iterator = notificationIds . iterator ( ) ; while ( iterator . hasNext ( ) ) { mNotificationManager . cancel ( NOTIFICATION_NAMESPACE , Integer . parseInt ( iterator . next ( ) ) ) ; } SharedPreferences . Editor sharedPreferenceEditor = mSharedPreferences . edit ( ) ; sharedPreferenceEditor . remove ( MediaNotificationService . MEDIA_NOTIFICATION_IDS ) ; sharedPreferenceEditor . apply ( ) ; }
target:  Cancel all previously existing notifications. Essential while doing a clean start (may be after a browser crash which caused old notifications to exist).