Skip to content
Commit 0d9d9e98 authored by Hai Zhang's avatar Hai Zhang
Browse files

Remove isRuntime for permissions state.

The distinction for whether a permission was granted as an install
permission or a runtime permission can actually be eliminated since
we are storing all permissions state as per-user now.

This is important for the persistence data scheme before we actually
make the migration.

The different between GRANT_RUNTIME and GRANT_UPGRADE is that the
latter clears the install permission state that was stored under
USER_ALL, but since that is no longer relevant in our new
implementation, we can simply remove GRANT_UPGRADE. A side effect of
the removal is that we are no longer revoking the non-platform pre-Q
activity recognition permission, which is an install permission and
shouldn't be revoked anyway.

Another small behavior change is that since we are not keep track of
whether a permission was granted as install or runtime despite its
current permission definition, we are no longer removing permission
flags when a permission definition is changed from runtime to
install. This shouldn't matter anyway because we are not downgrading
platform runtime permissions to install ones, and permission flags
isn't meaningful for app-defined install permissions anyway.

Bug: 158736025
Test: atest CtsPermissionTestCases
Test: atest CtsPermission3TestCases
Test: atest ActivityRecognitionPermissionTest
Change-Id: I515f2067ec7a961dda87f41bd76e84b32d8fc642
parent 1050e5b0
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