summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2015-09-01 14:45:18 -0700
committerSvetoslav <svetoslavganov@google.com>2015-09-01 14:45:21 -0700
commitfb9ec50795142c24b56dd28e45f5012b9b445380 (patch)
treef41e209666cec5f3baf6488c9fc373c160f2504a /services
parente7078e181cd00d20ce7764efa9835e2604a3cb83 (diff)
downloadframeworks_base-fb9ec50795142c24b56dd28e45f5012b9b445380.zip
frameworks_base-fb9ec50795142c24b56dd28e45f5012b9b445380.tar.gz
frameworks_base-fb9ec50795142c24b56dd28e45f5012b9b445380.tar.bz2
Incorrect app op check in broadcast queue
An intent broadcaster can specify which permissions should be held by a receiver to get the broadcast. These permissions may have corresponding app ops and if this is the case we also check the app ops. There is a bug in broadcast queue where if a permission does not have an app op we still try to check this app op and get an exception as the app op does not exist. This did not manifest often because the broadcast API takes an optional app op against which is compared the app op for each permission and if they differ the app op for the permission is checked. bug:23725305 Change-Id: Iec56ee354bbc11e7bc245134cf3afd2c11eecbc4
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/am/BroadcastQueue.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/BroadcastQueue.java b/services/core/java/com/android/server/am/BroadcastQueue.java
index a956c56..960cbf1 100644
--- a/services/core/java/com/android/server/am/BroadcastQueue.java
+++ b/services/core/java/com/android/server/am/BroadcastQueue.java
@@ -509,7 +509,7 @@ public final class BroadcastQueue {
break;
}
int appOp = AppOpsManager.permissionToOpCode(requiredPermission);
- if (appOp != r.appOp
+ if (appOp != AppOpsManager.OP_NONE && appOp != r.appOp
&& mService.mAppOpsService.noteOperation(appOp,
filter.receiverList.uid, filter.packageName)
!= AppOpsManager.MODE_ALLOWED) {