If the calling process isn't whitelisted for background
activity start, check the other processes of calling UID
too
Since looking at whitelisted processes can be computationally
more expensive than other checks in the barrier, move them
to be last - if callingUid is allowed to open bg activity via
other means, like permission, we'll bail quicker, especially
for apps like gmscore.
Bug: 129853314
Test: atest WmTests:ActivityStarterTests
Test: atest BackgroundActivityLaunchTest
Test: atest CtsActivityManagerDeviceTestCases:ActivityStarterTests
Test: atest WmTests:WindowProcessControllerMapTests
Test: manual (repro the quoted bug, and see that while
com.google.android.googlequicksearchbox:search isn't
whitelisted, AGSA had other whitelisting process,
com.google.android.googlequicksearchbox:interactor)
Change-Id: Ic7d6c12e76cb707f06e0f216c9958d5d2f21a840
6 files changed