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

Commit 93e571c5 authored by Shashank Mittal's avatar Shashank Mittal Committed by Steve Kondik
Browse files

Use checkOperation in BroadcastQueue.

ActivityManagerService uses NoteOperation before delivering a broadcast to
a package. NoteOperation can be blocking due to permisison dialog box.

Use non-blocking checkOperation in BroadcastQueue.

Change-Id: Iccded96217d99589aed771f2f3c15d0a39d9a340
parent fac873d3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -465,7 +465,7 @@ public final class BroadcastQueue {
            }
        }
        if (r.appOp != AppOpsManager.OP_NONE) {
            int mode = mService.mAppOpsService.noteOperation(r.appOp,
            int mode = mService.mAppOpsService.checkOperation(r.appOp,
                    filter.receiverList.uid, filter.packageName);
            if (mode != AppOpsManager.MODE_ALLOWED) {
                if (DEBUG_BROADCAST)  Slog.v(TAG,
@@ -790,7 +790,7 @@ public final class BroadcastQueue {
                }
            }
            if (r.appOp != AppOpsManager.OP_NONE) {
                int mode = mService.mAppOpsService.noteOperation(r.appOp,
                int mode = mService.mAppOpsService.checkOperation(r.appOp,
                        info.activityInfo.applicationInfo.uid, info.activityInfo.packageName);
                if (mode != AppOpsManager.MODE_ALLOWED) {
                    if (DEBUG_BROADCAST)  Slog.v(TAG,