From 971dbcd63373b292d2a415196fd89bcca4e60567 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Thu, 7 Jun 2018 23:23:39 +0000 Subject: [PATCH] Revert "Allow instant apps to send broadcasts to themselves" This reverts commit 7b40358fa316038ce6a3243b8706c6f5b7a49536. Reason for revert: False positive - this works and patch not needed. bug:109583877 Change-Id: If708350b03292cfa3bf9841199739e06c82f6c4f --- .../com/android/server/am/ActivityManagerService.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 96733e24d31e0..e95a9327cfb32 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -21021,15 +21021,9 @@ public class ActivityManagerService extends IActivityManager.Stub } private List collectReceiverComponents(Intent intent, String resolvedType, - int callingUid, boolean callerInstantApp, int[] users) { + int callingUid, int[] users) { // TODO: come back and remove this assumption to triage all broadcasts int pmFlags = STOCK_PM_FLAGS | MATCH_DEBUG_TRIAGED_MISSING; - // Instant apps should be able to send broadcasts to themselves, so we would - // match instant receivers and later the broadcast queue would enforce that - // the broadcast cannot be sent to a receiver outside the instant UID. - if (callerInstantApp) { - pmFlags |= PackageManager.MATCH_INSTANT; - } List receivers = null; try { @@ -21658,8 +21652,7 @@ public class ActivityManagerService extends IActivityManager.Stub // Need to resolve the intent to interested receivers... if ((intent.getFlags()&Intent.FLAG_RECEIVER_REGISTERED_ONLY) == 0) { - receivers = collectReceiverComponents(intent, resolvedType, callingUid, - callerInstantApp, users); + receivers = collectReceiverComponents(intent, resolvedType, callingUid, users); } if (intent.getComponent() == null) { if (userId == UserHandle.USER_ALL && callingUid == SHELL_UID) {