Intercept chooser intents to use unbundled chooser (when enabled)
When SystemUiDeviceConfigFlags.USE_DELEGATE_CHOOSER is true (default
false), rewrite intents destined for the sytem chooser to go to the
unbundled chooser and attach a start activity permission token.
Outside of this CL we're working on removing the need for the permission
token. When unbundling is complete, there won't be any rewriting of
components, as the intent will already be destined for the unbundled chooser.
Assuming the token goes away, we could then remove the interceptor
(b/222706900).
Bug: 202165481
Bug: 222706900
Test: atest ChooserActivityTest, manual tests with the flag enabled and
not to verify that the proper sharesheet appears and functions.
Change-Id: I56e26157fc3e1b3f2b4dfeae4bb1ab555191e047
3 files changed