Remove callWithShellPermissionIdentity() to fix flakiness.
This test is inside the in-process tests, so we can just use the
permissions granted to PermissionController and adopting the shell
permission identity is unnecessary. Specifically, PermissionController
already has the GRANT_RUNTIME_PERMISSIONS and UPDATE_APP_OPS_STATS
permissions. On the other hand, adopting shell permission identity makes
PermissionController temporarily lose the permissions granted to itself,
which when combined with work on other threads, e.g.
RoleControllerServiceImpl, would result in crashes due to missing
permissions.
Fixes: 186142321
Test: GooglePermissionControllerInProcessTests
Change-Id: I79e920979a3e2c462c2d3d33166596cc65d31a65
1 file changed