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

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

Call grantOrUpgradeDefaultRuntimePerms for new usr

... instead of always user 0

Bug: 132368462
Test: Installed work profile and made sure that
RESTRICTION_UPGRADE_EXEMPT was set on
android.permission.READ_EXTERNAL_STORAGE for com.google.android.contacts

Change-Id: Ic0489fb832c5f5192f2c2dc68b750fed8326604e
parent 8b2d80c7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -104,7 +104,8 @@ public final class PermissionPolicyService extends SystemService {
            // there as we are on the main thread and want to block until the work is
            // completed or we time out.
            final PermissionControllerManager permissionControllerManager =
                    new PermissionControllerManager(context, FgThread.getHandler());
                    new PermissionControllerManager(getUserContext(context, UserHandle.of(userId)),
                            FgThread.getHandler());
            permissionControllerManager.grantOrUpgradeDefaultRuntimePermissions(
                    FgThread.getExecutor(),
                    (Boolean success) -> {