Split checkBackgroundActivityStart
This creates 2 partial methods, to calculate the result for each brach
(PI creator, PI sender) and one to orchestrate if they are called and
which result to use.
This enables logging the cases that might be affected by requiring
explicit opt-in from the PI creator (in addition to the sender which is
enforced since Android U).
Implementation details:
I intentionally tried to not refactor a lot as the change is already
difficult (and dangerous) enough. There is lot of potential for
optimization by using the fields of the new InternalState object which
for now is only filled in the orgestration method.
I split some fields that were shared between sender and creator
branches, e.g. callerApp.
Test: atest BackgroundActivityLaunchTest
Bug: 306059525
Change-Id: I5e10e159b488812b054aee388766fa44bd853506
1 file changed