Mock context for permission less app's context
HelpersTest has the same sharedUserId as DownloadsProvider,
although it does not have WRITE_EXTERNAL_STORAGE and
REQUEST_INSTALL_PACKAGES permission declared in the manifest.
Declaring permissions in manifest to get the permission or the
corresponding app-op became a requirement for Android S and above. This
test fails on Android R, as even though the test app does not declare
the permissions in the manifest, it gets them granted.
Test: atest HelpersTest
(cherry picked from commit 65a9c52abe744c963cecfa8a0621c4c1be1c153f)
1 file changed