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

Commit eed2a8e1 authored by Benjamin Franz's avatar Benjamin Franz
Browse files

Make user provisioning state SystemApi

These APIs are used by the SUW. To go with the convention that all SUW
APIs should be SystemApi, adding it to these ones.

Bug: 25858670
Change-Id: Icffc9cdc13fa87da3543d92308f87dd0c9764c81
parent fa272e5c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -6025,6 +6025,7 @@ package android.app.admin {
    method public int getStorageEncryptionStatus();
    method public android.app.admin.SystemUpdatePolicy getSystemUpdatePolicy();
    method public java.util.List<android.os.PersistableBundle> getTrustAgentConfiguration(android.content.ComponentName, android.content.ComponentName);
    method public int getUserProvisioningState();
    method public android.os.Bundle getUserRestrictions(android.content.ComponentName);
    method public java.lang.String getWifiMacAddress();
    method public boolean hasCaCertInstalled(android.content.ComponentName, byte[]);
@@ -6111,6 +6112,7 @@ package android.app.admin {
    field public static final java.lang.String ACTION_ADD_DEVICE_ADMIN = "android.app.action.ADD_DEVICE_ADMIN";
    field public static final java.lang.String ACTION_DEVICE_OWNER_CHANGED = "android.app.action.DEVICE_OWNER_CHANGED";
    field public static final java.lang.String ACTION_MANAGED_PROFILE_PROVISIONED = "android.app.action.MANAGED_PROFILE_PROVISIONED";
    field public static final java.lang.String ACTION_PROVISION_FINALIZATION = "android.app.action.PROVISION_FINALIZATION";
    field public static final java.lang.String ACTION_PROVISION_MANAGED_DEVICE = "android.app.action.PROVISION_MANAGED_DEVICE";
    field public static final java.lang.String ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE = "android.app.action.PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE";
    field public static final java.lang.String ACTION_PROVISION_MANAGED_PROFILE = "android.app.action.PROVISION_MANAGED_PROFILE";
@@ -6180,6 +6182,11 @@ package android.app.admin {
    field public static final int RESET_PASSWORD_DO_NOT_ASK_CREDENTIALS_ON_BOOT = 2; // 0x2
    field public static final int RESET_PASSWORD_REQUIRE_ENTRY = 1; // 0x1
    field public static final int SKIP_SETUP_WIZARD = 1; // 0x1
    field public static final int STATE_USER_PROFILE_COMPLETE = 4; // 0x4
    field public static final int STATE_USER_SETUP_COMPLETE = 2; // 0x2
    field public static final int STATE_USER_SETUP_FINALIZED = 3; // 0x3
    field public static final int STATE_USER_SETUP_INCOMPLETE = 1; // 0x1
    field public static final int STATE_USER_UNMANAGED = 0; // 0x0
    field public static final int WIPE_EXTERNAL_STORAGE = 1; // 0x1
    field public static final int WIPE_RESET_PROTECTION_DATA = 2; // 0x2
  }
+7 −0
Original line number Diff line number Diff line
@@ -341,6 +341,7 @@ public class DevicePolicyManager {
     *
     * @hide
     */
    @SystemApi
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_PROVISION_FINALIZATION
            = "android.app.action.PROVISION_FINALIZATION";
@@ -932,30 +933,35 @@ public class DevicePolicyManager {
     * No management for current user in-effect. This is the default.
     * @hide
     */
    @SystemApi
    public static final int STATE_USER_UNMANAGED = 0;

    /**
     * Management partially setup, user setup needs to be completed.
     * @hide
     */
    @SystemApi
    public static final int STATE_USER_SETUP_INCOMPLETE = 1;

    /**
     * Management partially setup, user setup completed.
     * @hide
     */
    @SystemApi
    public static final int STATE_USER_SETUP_COMPLETE = 2;

    /**
     * Management setup and active on current user.
     * @hide
     */
    @SystemApi
    public static final int STATE_USER_SETUP_FINALIZED = 3;

    /**
     * Management partially setup on a managed profile.
     * @hide
     */
    @SystemApi
    public static final int STATE_USER_PROFILE_COMPLETE = 4;

    /**
@@ -5897,6 +5903,7 @@ public class DevicePolicyManager {
     *         return {@link #STATE_USER_UNMANAGED}
     * @hide
     */
    @SystemApi
    @UserProvisioningState
    public int getUserProvisioningState() {
        if (mService != null) {