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

Commit abd2b66e authored by Chad Brubaker's avatar Chad Brubaker
Browse files

Dont send broadcasts to manifest-receivers in IA

Instant Apps should only be started via user interaction and only
support having runtime receivers.

Test: Broadcast not sent to an Instant App
Change-Id: Ic2cfb33e8ca6a99045ad1cfd6c79f7d3e8d41001
parent b30ee8d0
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1152,17 +1152,14 @@ public final class BroadcastQueue {
                    skip = true;
                }
            }
            final boolean visibleToInstantApps =
                    (r.intent.getFlags() & Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS) != 0;
            if (!skip && info.activityInfo.applicationInfo.isInstantApp()
                    && !visibleToInstantApps
                    && r.callingUid != info.activityInfo.applicationInfo.uid) {
                Slog.w(TAG, "Instant App Denial: receiving "
                        + r.intent
                        + " to " + component.flattenToShortString()
                        + " due to sender " + r.callerPackage
                        + " (uid " + r.callingUid + ")"
                        + " not specifying FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS");
                        + " Instant Apps do not support manifest receivers");
                skip = true;
            }
            if (!skip && r.callerInstantApp