Loading services/java/com/android/server/am/ActivityManagerService.java +6 −6 Original line number Diff line number Diff line Loading @@ -12371,7 +12371,7 @@ public final class ActivityManagerService extends ActivityManagerNative Intent intent = (Intent)allSticky.get(i); BroadcastQueue queue = broadcastQueueForIntent(intent); BroadcastRecord r = new BroadcastRecord(queue, intent, null, null, -1, -1, null, AppOpsManager.OP_NONE, receivers, null, 0, null, -1, -1, null, null, AppOpsManager.OP_NONE, receivers, null, 0, null, null, false, true, true, -1); queue.enqueueParallelBroadcastLocked(r); queue.scheduleBroadcastsLocked(); Loading Loading @@ -12804,8 +12804,8 @@ public final class ActivityManagerService extends ActivityManagerNative // components to be launched. final BroadcastQueue queue = broadcastQueueForIntent(intent); BroadcastRecord r = new BroadcastRecord(queue, intent, callerApp, callerPackage, callingPid, callingUid, requiredPermission, appOp, registeredReceivers, resultTo, resultCode, resultData, map, callerPackage, callingPid, callingUid, resolvedType, requiredPermission, appOp, registeredReceivers, resultTo, resultCode, resultData, map, ordered, sticky, false, userId); if (DEBUG_BROADCAST) Slog.v( TAG, "Enqueueing parallel broadcast " + r); Loading Loading @@ -12894,9 +12894,9 @@ public final class ActivityManagerService extends ActivityManagerNative || resultTo != null) { BroadcastQueue queue = broadcastQueueForIntent(intent); BroadcastRecord r = new BroadcastRecord(queue, intent, callerApp, callerPackage, callingPid, callingUid, requiredPermission, appOp, receivers, resultTo, resultCode, resultData, map, ordered, sticky, false, userId); callerPackage, callingPid, callingUid, resolvedType, requiredPermission, appOp, receivers, resultTo, resultCode, resultData, map, ordered, sticky, false, userId); if (DEBUG_BROADCAST) Slog.v( TAG, "Enqueueing ordered broadcast " + r + ": prev had " + queue.mOrderedBroadcasts.size()); services/java/com/android/server/am/BroadcastQueue.java +8 −0 Original line number Diff line number Diff line Loading @@ -421,6 +421,10 @@ public final class BroadcastQueue { skip = true; } } if (!skip) { skip = !mService.mIntentFirewall.checkBroadcast(r.intent, r.callingUid, r.callingPid, r.resolvedType, filter.receiverList.uid); } if (!skip) { // If this is not being sent as an ordered broadcast, then we Loading Loading @@ -729,6 +733,10 @@ public final class BroadcastQueue { skip = true; } } if (!skip) { skip = !mService.mIntentFirewall.checkBroadcast(r.intent, r.callingUid, r.callingPid, r.resolvedType, info.activityInfo.applicationInfo.uid); } boolean isSingleton = false; try { isSingleton = mService.isSingleton(info.activityInfo.processName, Loading services/java/com/android/server/am/BroadcastRecord.java +4 −2 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ final class BroadcastRecord extends Binder { final boolean sticky; // originated from existing sticky data? final boolean initialSticky; // initial broadcast from register to sticky? final int userId; // user id this broadcast was for final String resolvedType; // the resolved data type final String requiredPermission; // a permission the caller has required final int appOp; // an app op that is associated with this broadcast final List receivers; // contains BroadcastFilter and ResolveInfo Loading Loading @@ -171,8 +172,8 @@ final class BroadcastRecord extends Binder { BroadcastRecord(BroadcastQueue _queue, Intent _intent, ProcessRecord _callerApp, String _callerPackage, int _callingPid, int _callingUid, String _requiredPermission, int _appOp, List _receivers, IIntentReceiver _resultTo, int _resultCode, int _callingPid, int _callingUid, String _resolvedType, String _requiredPermission, int _appOp, List _receivers, IIntentReceiver _resultTo, int _resultCode, String _resultData, Bundle _resultExtras, boolean _serialized, boolean _sticky, boolean _initialSticky, int _userId) { Loading @@ -183,6 +184,7 @@ final class BroadcastRecord extends Binder { callerPackage = _callerPackage; callingPid = _callingPid; callingUid = _callingUid; resolvedType = _resolvedType; requiredPermission = _requiredPermission; appOp = _appOp; receivers = _receivers; Loading services/java/com/android/server/firewall/AndFilter.java +2 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.server.firewall; import android.content.ComponentName; import android.content.Intent; import android.content.pm.ApplicationInfo; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; Loading @@ -27,10 +26,10 @@ import java.io.IOException; class AndFilter extends FilterList { @Override public boolean matches(IntentFirewall ifw, ComponentName resolvedComponent, Intent intent, int callerUid, int callerPid, String resolvedType, ApplicationInfo resolvedApp) { int callerUid, int callerPid, String resolvedType, int receivingUid) { for (int i=0; i<children.size(); i++) { if (!children.get(i).matches(ifw, resolvedComponent, intent, callerUid, callerPid, resolvedType, resolvedApp)) { resolvedType, receivingUid)) { return false; } } Loading services/java/com/android/server/firewall/CategoryFilter.java +1 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.server.firewall; import android.content.ComponentName; import android.content.Intent; import android.content.pm.ApplicationInfo; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; Loading @@ -36,7 +35,7 @@ class CategoryFilter implements Filter { @Override public boolean matches(IntentFirewall ifw, ComponentName resolvedComponent, Intent intent, int callerUid, int callerPid, String resolvedType, ApplicationInfo resolvedApp) { int callerUid, int callerPid, String resolvedType, int receivingUid) { Set<String> categories = intent.getCategories(); if (categories == null) { return false; Loading Loading
services/java/com/android/server/am/ActivityManagerService.java +6 −6 Original line number Diff line number Diff line Loading @@ -12371,7 +12371,7 @@ public final class ActivityManagerService extends ActivityManagerNative Intent intent = (Intent)allSticky.get(i); BroadcastQueue queue = broadcastQueueForIntent(intent); BroadcastRecord r = new BroadcastRecord(queue, intent, null, null, -1, -1, null, AppOpsManager.OP_NONE, receivers, null, 0, null, -1, -1, null, null, AppOpsManager.OP_NONE, receivers, null, 0, null, null, false, true, true, -1); queue.enqueueParallelBroadcastLocked(r); queue.scheduleBroadcastsLocked(); Loading Loading @@ -12804,8 +12804,8 @@ public final class ActivityManagerService extends ActivityManagerNative // components to be launched. final BroadcastQueue queue = broadcastQueueForIntent(intent); BroadcastRecord r = new BroadcastRecord(queue, intent, callerApp, callerPackage, callingPid, callingUid, requiredPermission, appOp, registeredReceivers, resultTo, resultCode, resultData, map, callerPackage, callingPid, callingUid, resolvedType, requiredPermission, appOp, registeredReceivers, resultTo, resultCode, resultData, map, ordered, sticky, false, userId); if (DEBUG_BROADCAST) Slog.v( TAG, "Enqueueing parallel broadcast " + r); Loading Loading @@ -12894,9 +12894,9 @@ public final class ActivityManagerService extends ActivityManagerNative || resultTo != null) { BroadcastQueue queue = broadcastQueueForIntent(intent); BroadcastRecord r = new BroadcastRecord(queue, intent, callerApp, callerPackage, callingPid, callingUid, requiredPermission, appOp, receivers, resultTo, resultCode, resultData, map, ordered, sticky, false, userId); callerPackage, callingPid, callingUid, resolvedType, requiredPermission, appOp, receivers, resultTo, resultCode, resultData, map, ordered, sticky, false, userId); if (DEBUG_BROADCAST) Slog.v( TAG, "Enqueueing ordered broadcast " + r + ": prev had " + queue.mOrderedBroadcasts.size());
services/java/com/android/server/am/BroadcastQueue.java +8 −0 Original line number Diff line number Diff line Loading @@ -421,6 +421,10 @@ public final class BroadcastQueue { skip = true; } } if (!skip) { skip = !mService.mIntentFirewall.checkBroadcast(r.intent, r.callingUid, r.callingPid, r.resolvedType, filter.receiverList.uid); } if (!skip) { // If this is not being sent as an ordered broadcast, then we Loading Loading @@ -729,6 +733,10 @@ public final class BroadcastQueue { skip = true; } } if (!skip) { skip = !mService.mIntentFirewall.checkBroadcast(r.intent, r.callingUid, r.callingPid, r.resolvedType, info.activityInfo.applicationInfo.uid); } boolean isSingleton = false; try { isSingleton = mService.isSingleton(info.activityInfo.processName, Loading
services/java/com/android/server/am/BroadcastRecord.java +4 −2 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ final class BroadcastRecord extends Binder { final boolean sticky; // originated from existing sticky data? final boolean initialSticky; // initial broadcast from register to sticky? final int userId; // user id this broadcast was for final String resolvedType; // the resolved data type final String requiredPermission; // a permission the caller has required final int appOp; // an app op that is associated with this broadcast final List receivers; // contains BroadcastFilter and ResolveInfo Loading Loading @@ -171,8 +172,8 @@ final class BroadcastRecord extends Binder { BroadcastRecord(BroadcastQueue _queue, Intent _intent, ProcessRecord _callerApp, String _callerPackage, int _callingPid, int _callingUid, String _requiredPermission, int _appOp, List _receivers, IIntentReceiver _resultTo, int _resultCode, int _callingPid, int _callingUid, String _resolvedType, String _requiredPermission, int _appOp, List _receivers, IIntentReceiver _resultTo, int _resultCode, String _resultData, Bundle _resultExtras, boolean _serialized, boolean _sticky, boolean _initialSticky, int _userId) { Loading @@ -183,6 +184,7 @@ final class BroadcastRecord extends Binder { callerPackage = _callerPackage; callingPid = _callingPid; callingUid = _callingUid; resolvedType = _resolvedType; requiredPermission = _requiredPermission; appOp = _appOp; receivers = _receivers; Loading
services/java/com/android/server/firewall/AndFilter.java +2 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.server.firewall; import android.content.ComponentName; import android.content.Intent; import android.content.pm.ApplicationInfo; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; Loading @@ -27,10 +26,10 @@ import java.io.IOException; class AndFilter extends FilterList { @Override public boolean matches(IntentFirewall ifw, ComponentName resolvedComponent, Intent intent, int callerUid, int callerPid, String resolvedType, ApplicationInfo resolvedApp) { int callerUid, int callerPid, String resolvedType, int receivingUid) { for (int i=0; i<children.size(); i++) { if (!children.get(i).matches(ifw, resolvedComponent, intent, callerUid, callerPid, resolvedType, resolvedApp)) { resolvedType, receivingUid)) { return false; } } Loading
services/java/com/android/server/firewall/CategoryFilter.java +1 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.server.firewall; import android.content.ComponentName; import android.content.Intent; import android.content.pm.ApplicationInfo; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; Loading @@ -36,7 +35,7 @@ class CategoryFilter implements Filter { @Override public boolean matches(IntentFirewall ifw, ComponentName resolvedComponent, Intent intent, int callerUid, int callerPid, String resolvedType, ApplicationInfo resolvedApp) { int callerUid, int callerPid, String resolvedType, int receivingUid) { Set<String> categories = intent.getCategories(); if (categories == null) { return false; Loading