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
Loading
Please register or sign in to comment