Add ComponentCaller APIs for Activity's new intents
With activities potentially receiving multiple intents at the same time, it is important to match intents to their callers correctly. Hence, this change overloads existing onNewIntent with a ComponentCaller - onNewIntent(Intent, ComponentCaller). To supplement the new overload, this CL adds these Activity APIs: - getCurrentCaller() - only works within onNewIntent(), should be used by those that don't override the new overload of onNewIntent. - setIntent(Intent, ComponentCaller) - to keep the new intent caller for future use. - getCaller() - to retrieve the caller associated with the intent from getIntent(). Finally, this change adds an Instrumentation API: callActivityOnNewIntent(Activity, Intent, ComponentCaller). Bug: 293467489 Test: atest CtsAndroidAppTestCases:android.app.cts.ShareIdentityTest Test: atest CtsAndroidAppTestCases:android.app.cts.ComponentCallerTest Test: atest CtsAppTestCases:android.app.cts.InstrumentationTest Change-Id: I6e2457171e910fa3d05430f62db8d735ce324f5a
Loading
Please register or sign in to comment