Skip to content
Snippets Groups Projects
Commit 9c6ea1b6 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Remove useless global variable

parent 8008b7af
No related branches found
No related tags found
No related merge requests found
......@@ -168,24 +168,22 @@ public class NotificationHelper {
}
}
private static NotificationManager sNotificationManager;
@RequiresApi(api = Build.VERSION_CODES.O)
public static void createNotificationChannels() {
if (sNotificationManager == null)
sNotificationManager = (NotificationManager) VLCApplication.getAppContext().getSystemService(Context.NOTIFICATION_SERVICE);
final NotificationManager notificationManager = (NotificationManager) VLCApplication.getAppContext().getSystemService(Context.NOTIFICATION_SERVICE);
// Playback channel
CharSequence name = VLCApplication.getAppResources().getString(R.string.playback);
String description = VLCApplication.getAppResources().getString(R.string.playback_controls);
NotificationChannel channel = new NotificationChannel("vlc_playback", name, NotificationManager.IMPORTANCE_LOW);
channel.setDescription(description);
channel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
sNotificationManager.createNotificationChannel(channel);
notificationManager.createNotificationChannel(channel);
// Scan channel
name = VLCApplication.getAppResources().getString(R.string.medialibrary_scan);
description = VLCApplication.getAppResources().getString(R.string.Medialibrary_progress);
channel = new NotificationChannel("vlc_medialibrary", name, NotificationManager.IMPORTANCE_LOW);
channel.setDescription(description);
channel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
sNotificationManager.createNotificationChannel(channel);
notificationManager.createNotificationChannel(channel);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment