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.

Bug: 200813547
Test: atest HelpersTest
Change-Id: I83146a4b44fb51bb2ee3eb8127fa9d20dac431a7
Merged-In: I83146a4b44fb51bb2ee3eb8127fa9d20dac431a7
(cherry picked from commit 65a9c52abe744c963cecfa8a0621c4c1be1c153f)
1 file changed