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

Commit 5a61b4de authored by Amith Yamasani's avatar Amith Yamasani Committed by Android Git Automerger
Browse files

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

* commit '19343927':
  Permission policies are for profile and device owners
parents 0e25adf1 19343927
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) {