Prepare notification permissions

This commit is contained in:
M66B
2022-06-09 12:38:17 +02:00
parent 5b668cb5d0
commit 45b5afca61
14 changed files with 113 additions and 55 deletions

View File

@@ -149,6 +149,13 @@ class NotificationHelper {
nm.createNotificationChannelGroup(group);
}
static boolean areNotificationsEnabled(NotificationManager nm) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU)
return true;
else
return nm.areNotificationsEnabled();
}
@RequiresApi(api = Build.VERSION_CODES.O)
static void clear(Context context) {
NotificationManager nm = Helper.getSystemService(context, NotificationManager.class);