Loading core/api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -380,6 +380,7 @@ package android.app.admin { field public static final String ACTION_DATA_SHARING_RESTRICTION_APPLIED = "android.app.action.DATA_SHARING_RESTRICTION_APPLIED"; field public static final int OPERATION_CREATE_AND_MANAGE_USER = 5; // 0x5 field public static final int OPERATION_LOCK_NOW = 1; // 0x1 field public static final int OPERATION_REBOOT = 7; // 0x7 field public static final int OPERATION_REMOVE_USER = 6; // 0x6 field public static final int OPERATION_START_USER_IN_BACKGROUND = 3; // 0x3 field public static final int OPERATION_STOP_USER = 4; // 0x4 Loading core/java/android/app/admin/DevicePolicyManager.java +5 −1 Original line number Diff line number Diff line Loading @@ -2610,6 +2610,9 @@ public class DevicePolicyManager { /** @hide */ @TestApi public static final int OPERATION_REMOVE_USER = 6; /** @hide */ @TestApi public static final int OPERATION_REBOOT = 7; private static final String PREFIX_OPERATION = "OPERATION_"; Loading @@ -2620,7 +2623,8 @@ public class DevicePolicyManager { OPERATION_START_USER_IN_BACKGROUND, OPERATION_STOP_USER, OPERATION_CREATE_AND_MANAGE_USER, OPERATION_REMOVE_USER OPERATION_REMOVE_USER, OPERATION_REBOOT }) @Retention(RetentionPolicy.SOURCE) public static @interface DevicePolicyOperation { Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -12564,7 +12564,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { Objects.requireNonNull(admin, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(admin); Preconditions.checkCallAuthorization(isDeviceOwner(caller)); checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_REBOOT); mInjector.binderWithCleanCallingIdentity(() -> { // Make sure there are no ongoing calls on the device. if (mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE) { Loading
core/api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -380,6 +380,7 @@ package android.app.admin { field public static final String ACTION_DATA_SHARING_RESTRICTION_APPLIED = "android.app.action.DATA_SHARING_RESTRICTION_APPLIED"; field public static final int OPERATION_CREATE_AND_MANAGE_USER = 5; // 0x5 field public static final int OPERATION_LOCK_NOW = 1; // 0x1 field public static final int OPERATION_REBOOT = 7; // 0x7 field public static final int OPERATION_REMOVE_USER = 6; // 0x6 field public static final int OPERATION_START_USER_IN_BACKGROUND = 3; // 0x3 field public static final int OPERATION_STOP_USER = 4; // 0x4 Loading
core/java/android/app/admin/DevicePolicyManager.java +5 −1 Original line number Diff line number Diff line Loading @@ -2610,6 +2610,9 @@ public class DevicePolicyManager { /** @hide */ @TestApi public static final int OPERATION_REMOVE_USER = 6; /** @hide */ @TestApi public static final int OPERATION_REBOOT = 7; private static final String PREFIX_OPERATION = "OPERATION_"; Loading @@ -2620,7 +2623,8 @@ public class DevicePolicyManager { OPERATION_START_USER_IN_BACKGROUND, OPERATION_STOP_USER, OPERATION_CREATE_AND_MANAGE_USER, OPERATION_REMOVE_USER OPERATION_REMOVE_USER, OPERATION_REBOOT }) @Retention(RetentionPolicy.SOURCE) public static @interface DevicePolicyOperation { Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -12564,7 +12564,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { Objects.requireNonNull(admin, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(admin); Preconditions.checkCallAuthorization(isDeviceOwner(caller)); checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_REBOOT); mInjector.binderWithCleanCallingIdentity(() -> { // Make sure there are no ongoing calls on the device. if (mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE) {