From d1ca9ab56b3b0d14c1b70607bc308093805d5819 Mon Sep 17 00:00:00 2001 From: jens Date: Sat, 11 Jun 2022 13:55:02 +0200 Subject: [PATCH] removed function --- .../java/com/jens/automation2/Actions.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/app/src/main/java/com/jens/automation2/Actions.java b/app/src/main/java/com/jens/automation2/Actions.java index 535cd44b..6ed43ee9 100644 --- a/app/src/main/java/com/jens/automation2/Actions.java +++ b/app/src/main/java/com/jens/automation2/Actions.java @@ -781,31 +781,6 @@ public class Actions return false; } - @RequiresApi(api = Build.VERSION_CODES.M) - public static void setDoNotDisturb(Context context, int desiredSetting) - { - NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); - - // Check if the notification policy access has been granted for the app. -/* if (!notificationManager.isNotificationPolicyAccessGranted()) - { - Intent intent = new Intent(android.provider.Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS); - startActivity(intent); - return; - }*/ - - notificationManager.setInterruptionFilter(desiredSetting); - - /*if (notificationManager.getCurrentInterruptionFilter() == NotificationManager.INTERRUPTION_FILTER_ALL) - { - notificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_NONE); - } - else - { - notificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_ALL); - }*/ - } - @RequiresApi(api = Build.VERSION_CODES.M) public static boolean isDoNotDisturbActive(Context context) {