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

Commit 6f36d42d authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Permission policies are for profile and device owners

Not just device owners

Change-Id: I78ad815651e9bdc4bd78e61d634a5067935fa33f
parent e678b41c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -6313,7 +6313,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    public void setPermissionPolicy(ComponentName admin, int policy) throws RemoteException {
        int userId = UserHandle.getCallingUserId();
        synchronized (this) {
            getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
            getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
            DevicePolicyData userPolicy = getUserData(userId);
            if (userPolicy.mPermissionPolicy != policy) {
                userPolicy.mPermissionPolicy = policy;
@@ -6336,7 +6336,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            String permission, boolean granted) throws RemoteException {
        UserHandle user = Binder.getCallingUserHandle();
        synchronized (this) {
            getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
            getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
            long ident = Binder.clearCallingIdentity();
            try {
                if (granted) {