Replace permission-specific methods with package change callback.
This change replaces the following PermissionManagerInternal methods: - revokeRuntimePermissionsIfGroupChanged() - revokeRuntimePermissionsIfPermissionDefinitionChanged() - addAllPermissionGroups() - addAllPermissions() - transferPermissions() with a single onPackageAdded() callback, to ensure we have an API surface that is generic enough for future new permission systems, and exposes details that will remain absolutely necessary due to compatibility. We cannot use a generic package change callback because most of the time, those callbacks should not be blocking the package changes - however permission is different and needs synchronous callbacks. Permission was tightly coupled with package manager, so that we need to keep compatibility with the behavior that the permission state and any permission changes will be ready right after package changes. Meanwhile, permission is the only system component that needs this level of integration with package manager so it doesn't make sense to build a generic package change callback that may be misused by other system components. Bug: 158736025 Test: presubmit Change-Id: Ia4b7acc0579408eca7bcd08d4fdce6108c31c209
Loading
Please register or sign in to comment