Merge "Remove unnecessary async" into tm-dev am: 1d15b24da2 am: 9d01ed5377

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16990592

Change-Id: Ia62d904084968418387dd231bbd58430afb98977
This commit is contained in:
Julia Reynolds
2022-02-24 16:43:23 +00:00
committed by Automerger Merge Worker

View File

@@ -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);
});
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);
});
final NotificationManager mgr = context.getSystemService(NotificationManager.class);
mgr.removeAutomaticZenRules(pkg);
}
@VisibleForTesting