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

Compute PermissionInfo.FLAG_INSTALLED instead of mutating ParsedPermission.

PermissionInfo.FLAG_INSTALLED is about the current system state
instead of the permission definition itself as in its APK, so we
shouldn't be mutating the ParsedPermission object to return it.

Instead, we now follow what we did for granted permissions and gather
and pass installed permissions similarly, so that we return the right
flag in PackageInfo.permissions.

For other methods returning PermissionInfo, they are all returning
permission definitions that are registered in the system, so we can
just unconditionally add FLAG_INSTALLED to them.

This resolves the issue when the new subsystem is enabled that
PermissionController refuses to manage a permission if its definition
doesn't have FLAG_INSTALLED.

Bug: 263504888
Test: manual
Change-Id: I891fa8b3adf7095a3c09ac448e1e377d432dafdc
parent ef3dd32c
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