Fail startup via ResolverActivity.super_onCreate()
`ResolverActivity` provides this mechanism so that we can bail out
of activity creation if we determine that the request is invalid.
That elides a lot of the internal (~"template method") calls that
the base class dispatches down to `ChooserActivity` during setup,
where we've had to deal with annoying null-check/lazy-initialization
requirements even when we intended to fail out.
This generally should not affect our behavior for valid requests.
Interestingly, there's a test changed in this CL because it appears
to have been set up incorrectly, and in the original version of that
test we can see that certain Chooser Intents that `ChooserActivity`
attempts to reject as invalid, that nevertheless would end up getting
handled by the base `ResolverActivity` during the failure flow.
Because `ChooserActivity` immediately calls `finish()` as part of this
flow, that behavior should only be observable for autolaunch, and
otherwise the intent will be rejected as-planned; I conclude that this
probably isn't intended as a mechanism to support autolaunch, and so
it's OK to "regress" as long as the test is fixed. [EDIT: since this
CL was originally uploaded, an intervening change by ayepin@ already
fixed this same test.]
The CL also cleans up one case I know we had null-checking
specifically for this reason; there are probably others left to clean
up later.
Test: atest IntentResolverUnitTests
Bug: 202167050
Change-Id: I28c7b1eff50e516d6bf0043aa141d13f1afce076
1 file changed