Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0aebc6b authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Propagate whitelisted perms during install

Before there were only two choices: All or none

Fixes: 135618953
Test: atest CtsPermission2TestCases:android.permission2.cts.RestrictedPermissionsTest
Change-Id: I0989cb2c303bf508674042a2a07fbddec3e5be64
parent 61a87812
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1507,7 +1507,8 @@ public class PackageManagerService extends IPackageManager.Stub
                        final List<String> whitelistedRestrictedPermissions = ((args.installFlags
                                & PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS) != 0
                                    && parentRes.pkg != null)
                                ? parentRes.pkg.requestedPermissions : null;
                                ? parentRes.pkg.requestedPermissions
                                : args.whitelistedRestrictedPermissions;
                        // Handle the parent package
                        handlePackagePostInstall(parentRes, grantPermissions,