Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d15b24d authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Remove unnecessary async" into tm-dev

parents fd9774a6 6fd71484
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -97,17 +97,13 @@ public class ZenAccessController extends BasePreferenceController {

    public static void setAccess(final Context context, final String pkg, final boolean access) {
        logSpecialPermissionChange(access, pkg, context);
        AsyncTask.execute(() -> {
        final NotificationManager mgr = context.getSystemService(NotificationManager.class);
        mgr.setNotificationPolicyAccessGranted(pkg, access);
        });
    }

    public static void deleteRules(final Context context, final String pkg) {
        AsyncTask.execute(() -> {
       final NotificationManager mgr = context.getSystemService(NotificationManager.class);
       mgr.removeAutomaticZenRules(pkg);
        });
    }

    @VisibleForTesting