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

Commit a633a44b authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Rechecks if the intent component specified" into main

parents 56c66c78 5f156c24
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -698,6 +698,10 @@ class ActivityStarter {
                        mRequest.intent, caller, callingUid);
            }

            if (mRequest.intent != null) {
                mRequest.componentSpecified |= mRequest.intent.getComponent() != null;
            }

            // If the caller hasn't already resolved the activity, we're willing
            // to do so here. If the caller is already holding the WM lock here,
            // and we need to check dynamic Uri permissions, then we're forced
+4 −0
Original line number Diff line number Diff line
@@ -1332,6 +1332,10 @@ public class ActivityStarterTests extends WindowTestsBase {
        starter.setReason("testNoActivityInfo").setIntent(intent)
                .setActivityInfo(null).execute();
        verify(starter.mRequest).resolveActivity(any());

        // Also verifies the value of Request#componentSpecified should be true even the
        // ActivityStarter#setComponentSpecified is not explicitly set.
        assertTrue(starter.mRequest.componentSpecified);
    }

    @Test