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

Commit 19343927 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Permission policies are for profile and device owners" into mnc-dev

parents afa81ed0 6f36d42d
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) {