Add PackageInstaller.SessionParams.setPermissionState
Allows an installer to request specific permissions be granted or denied during installation. This deprecates and replaces the old setGrantedRuntimePermissions. The usage of that method is now mapped to call setPermissionState with PERMISSION_STATE_GRANTED. However, there is no equivalent in the new API for granting all requested permissions. This is probably not a great pattern to maintain, but the behavior has been preserved for existing callers like shell by reusing the existing flag and effectively disabling the new API if it's used. Modern app stores should use setPermissionState, and privilieged stores that need to maintain compatibility should use a compat utility to branch the logic between the old and new APIs. Bug: 266955680 Test: atest PackageInstallerSessionTest Change-Id: I27775eab73462f053a517a4185f6e3c509e16ba7
Loading
Please register or sign in to comment