Add temporary fix for package verification related tests for secondary user
- Package verification related tests does not work for non-user 0 as
PMS expects package verifier to be user 0, sends
ACTION_PACKAGE_NEEDS_VERIFICATION broadcast to user 0, and only
allow user 0 to report the result.
- So all tests getting the broadcast and calling
PackageManager.verifyPendingInstall does not work properly and
verification times out.
- But time out is currently considered as passing verification, so
only tests rejecting the verification will fail if broadcast check
is passed.
- Instead of disabling all such tests, modify the broadcast
reception to be all users to that at least tests expecting
verification success or timeout can be passed with some
meaningful portion of the tests executed.
- Skip the test which requires explcit rejection for non-user 0:
#testPackageVerifierReject
- The change should have no impact when it runs as user 0.
Bug: 232317379
Test: atest android.content.pm.cts.PackageManagerShellCommandTest
for user 0 and non-user 0.
Change-Id: I86ac95617c523bd7cc2ea42420b964b47670afa2
1 file changed