diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 3359179201a92..3081f91aeea69 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -1149,6 +1149,7 @@ package android.app.admin { field public static final String EXTRA_RESTRICTION = "android.app.extra.RESTRICTION"; field public static final String EXTRA_ROLE_HOLDER_PROVISIONING_INITIATOR_PACKAGE = "android.app.extra.ROLE_HOLDER_PROVISIONING_INITIATOR_PACKAGE"; field public static final String EXTRA_ROLE_HOLDER_STATE = "android.app.extra.ROLE_HOLDER_STATE"; + field public static final String EXTRA_ROLE_HOLDER_UPDATE_RESULT_CODE = "android.app.extra.ROLE_HOLDER_UPDATE_RESULT_CODE"; field public static final int FLAG_SUPPORTED_MODES_DEVICE_OWNER = 4; // 0x4 field public static final int FLAG_SUPPORTED_MODES_ORGANIZATION_OWNED = 1; // 0x1 field public static final int FLAG_SUPPORTED_MODES_PERSONALLY_OWNED = 2; // 0x2 diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index af381676aa67f..6c61254e96c3f 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -3345,6 +3345,34 @@ public class DevicePolicyManager { public static final int RESULT_UPDATE_DEVICE_POLICY_MANAGEMENT_ROLE_HOLDER_PROVISIONING_DISABLED = 3; + /** + * An {@code int} extra which contains the result code of the last attempt to update + * the device policy management role holder. + * + *
This extra is provided to the device policy management role holder via either {@link + * #ACTION_ROLE_HOLDER_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE} or {@link + * #ACTION_ROLE_HOLDER_PROVISION_MANAGED_PROFILE} when started after the role holder + * had previously returned {@link #RESULT_UPDATE_ROLE_HOLDER}. + * + *
If the role holder update had failed, the role holder can use the value of this extra to + * make a decision whether to fail the provisioning flow or to carry on with the older version + * of the role holder. + * + *
Possible values can be: + *