Skip to content
Commit fd6643e3 authored by Jay Thomas Sullivan's avatar Jay Thomas Sullivan
Browse files

Enforce ADJUST_RUNTIME_PERMISSIONS_POLICY

In updatePermissionFlags, we're calling clearCallingIdentity. And,
just after doing so, we're calling
enforceCallingOrSelfPermission(ADJUST_RUNTIME_PERMISSIONS_POLICY).
But, these two things don't really make sense together, because the
former nullifies the latter.

We could either:

1. Remove clearCallingIdentity but keep enforceCallingOrSelfPermission,
   or
2. Remove both

For security, this CL goes with the first option. But, doing so means
updatePermissionFlags now enforces ADJUST_RUNTIME_PERMISSIONS_POLICY.
And this breaks some CTS tests. To address this, we have to add
ADJUST_RUNTIME_PERMISSIONS_POLICY to the shell identity.

Bug: 190694761
Test: atest ActivityPermissionRationaleTest
Change-Id: I7031aebf69d9ec919334573b99eb6b7cb8be31d0
parent 1b3db4d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment