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

Commit b6c01eeb authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Return early in SaferIntentUtils.blockNullAction when action is not null" into main

parents 63a50129 81fe96be
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -213,6 +213,7 @@ public class SaferIntentUtils {
     * CTS tests. The code in this method shall properly avoid control flows using these arguments.
     */
    public static void blockNullAction(IntentArgs args, List componentList) {
        if (args.intent.getAction() != null) return;
        if (ActivityManager.canAccessUnexportedComponents(args.callingUid)) return;

        final Computer computer = (Computer) args.snapshot;
@@ -235,15 +236,12 @@ public class SaferIntentUtils {
                }
                final ParsedMainComponent comp = infoToComponent(
                        resolveInfo.getComponentInfo(), resolver, args.isReceiver);
                if (comp != null && !comp.getIntents().isEmpty()
                        && args.intent.getAction() == null) {
                if (comp != null && !comp.getIntents().isEmpty()) {
                    match = false;
                }
            } else if (c instanceof IntentFilter) {
                if (args.intent.getAction() == null) {
                match = false;
            }
            }

            if (!match) {
                args.reportEvent(