Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +8 −5 Original line number Diff line number Diff line Loading @@ -12320,7 +12320,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { if (Flags.headlessDeviceOwnerSingleUserEnabled()) { // Block this method if the device is in headless main user mode Preconditions.checkCallAuthorization( getHeadlessDeviceOwnerModeForDeviceOwner() !mInjector.userManagerIsHeadlessSystemUserMode() || getHeadlessDeviceOwnerModeForDeviceOwner() != HEADLESS_DEVICE_OWNER_MODE_SINGLE_USER, "createAndManageUser was called while in headless single user mode"); } Loading Loading @@ -23319,11 +23320,13 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } private boolean hasAdminPolicy(int adminPolicy, String callerPackageName) { synchronized (getLockObject()) { CallerIdentity caller = getCallerIdentity(callerPackageName); ActiveAdmin deviceAdmin = getActiveAdminWithPolicyForUidLocked( null, adminPolicy, caller.getUid()); return deviceAdmin != null; } } /** * Return whether the calling process has been granted permission to apply a device policy on Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +8 −5 Original line number Diff line number Diff line Loading @@ -12320,7 +12320,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { if (Flags.headlessDeviceOwnerSingleUserEnabled()) { // Block this method if the device is in headless main user mode Preconditions.checkCallAuthorization( getHeadlessDeviceOwnerModeForDeviceOwner() !mInjector.userManagerIsHeadlessSystemUserMode() || getHeadlessDeviceOwnerModeForDeviceOwner() != HEADLESS_DEVICE_OWNER_MODE_SINGLE_USER, "createAndManageUser was called while in headless single user mode"); } Loading Loading @@ -23319,11 +23320,13 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } private boolean hasAdminPolicy(int adminPolicy, String callerPackageName) { synchronized (getLockObject()) { CallerIdentity caller = getCallerIdentity(callerPackageName); ActiveAdmin deviceAdmin = getActiveAdminWithPolicyForUidLocked( null, adminPolicy, caller.getUid()); return deviceAdmin != null; } } /** * Return whether the calling process has been granted permission to apply a device policy on