diff --git a/core/api/system-current.txt b/core/api/system-current.txt index d094f4bad5117..3359179201a92 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -1162,6 +1162,7 @@ package android.app.admin { field public static final String REQUIRED_APP_MANAGED_PROFILE = "android.app.REQUIRED_APP_MANAGED_PROFILE"; field public static final String REQUIRED_APP_MANAGED_USER = "android.app.REQUIRED_APP_MANAGED_USER"; field public static final int RESULT_DEVICE_OWNER_SET = 123; // 0x7b + field public static final int RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_PROVISIONING_DISABLED = 3; // 0x3 field public static final int RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_RECOVERABLE_ERROR = 1; // 0x1 field public static final int RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_UNRECOVERABLE_ERROR = 2; // 0x2 field public static final int RESULT_UPDATE_ROLE_HOLDER = 2; // 0x2 diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 88b5377fbb31d..13aae5cabefab 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -3295,9 +3295,11 @@ public class DevicePolicyManager { *
The activity must handle the device policy management role holder update and set the * intent result to either {@link Activity#RESULT_OK} if the update was successful, {@link * #RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_RECOVERABLE_ERROR} if it encounters a - * problem that may be solved by relaunching it again, or {@link - * #RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_UNRECOVERABLE_ERROR} if it encounters a - * problem that will not be solved by relaunching it again. + * problem that may be solved by relaunching it again, {@link + * #RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_PROVISIONING_DISABLED} if role holder + * provisioning is disabled, or {@link + * #RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_UNRECOVERABLE_ERROR} if it encounters + * any other problem that will not be solved by relaunching it again. * *
If this activity has additional internal conditions which are not met, it should return * {@link #RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_UNRECOVERABLE_ERROR}. @@ -3332,6 +3334,17 @@ public class DevicePolicyManager { public static final int RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_UNRECOVERABLE_ERROR = 2; + /** + * Result code that can be returned by the {@link + * #ACTION_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER} handler if role holder provisioning + * is disabled. + * + * @hide + */ + @SystemApi + public static final int + RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_PROVISIONING_DISABLED = 3; + /** * An {@link Intent} extra which resolves to a custom user consent screen. *