Remove unneeded AsyncTask
Change-Id: I962a61c7a73f1d7a464ee76284f1d4175d04e62a
This commit is contained in:
@@ -139,16 +139,14 @@ public class ApprovalPreferenceController extends BasePreferenceController {
|
|||||||
public void disable(final ComponentName cn) {
|
public void disable(final ComponentName cn) {
|
||||||
logSpecialPermissionChange(true, cn.getPackageName());
|
logSpecialPermissionChange(true, cn.getPackageName());
|
||||||
mNm.setNotificationListenerAccessGranted(cn, false);
|
mNm.setNotificationListenerAccessGranted(cn, false);
|
||||||
AsyncTask.execute(() -> {
|
if (!mNm.isNotificationPolicyAccessGrantedForPackage(
|
||||||
if (!mNm.isNotificationPolicyAccessGrantedForPackage(
|
cn.getPackageName())) {
|
||||||
cn.getPackageName())) {
|
if (android.app.Flags.modesApi()) {
|
||||||
if (android.app.Flags.modesApi()) {
|
mNm.removeAutomaticZenRules(cn.getPackageName(), /* fromUser= */ true);
|
||||||
mNm.removeAutomaticZenRules(cn.getPackageName(), /* fromUser= */ true);
|
} else {
|
||||||
} else {
|
mNm.removeAutomaticZenRules(cn.getPackageName());
|
||||||
mNm.removeAutomaticZenRules(cn.getPackageName());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void enable(ComponentName cn) {
|
protected void enable(ComponentName cn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user