mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 05:44:51 +02:00
Refactoring
This commit is contained in:
@@ -211,7 +211,7 @@ public class EntityAccount extends EntityOrder implements Serializable {
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
void createNotificationChannel(Context context) {
|
||||
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
NotificationManager nm = Helper.getSystemService(context, NotificationManager.class);
|
||||
|
||||
NotificationChannelGroup group = new NotificationChannelGroup("group." + id, name);
|
||||
nm.createNotificationChannelGroup(group);
|
||||
@@ -228,7 +228,7 @@ public class EntityAccount extends EntityOrder implements Serializable {
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
void deleteNotificationChannel(Context context) {
|
||||
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
NotificationManager nm = Helper.getSystemService(context, NotificationManager.class);
|
||||
nm.deleteNotificationChannel(getNotificationChannelId(id));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user