Fix missing token issue

Identified from b/377637684, apps could use Context.startActivityAsUser
to start an activity. This method does not call intent.prepareToLeaveProcess
before the IPC call and was not covered by our token generation
logic from ag/29190483, which is causing a creator token missing
issue. This CL added collectExtraIntentKeys call to cover the
activity start invocation.

Bug: 377637684
Test: manual test. FrameworksMockingServicesTests:ActivityManagerServiceTest
        FrameworksCoreTests:IntentTest
Flag: android.security.prevent_intent_redirect
Change-Id: I4555f3c648b65ff534a25dceac506885ca0169fa
1 file changed