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

Commit 3742ec39 authored by Nicolas Prevot's avatar Nicolas Prevot Committed by Nicolas Prévot
Browse files

Adding user consent extras to DevicePolicyManager.

Adding ACTION_PROVISIONING_USER_HAS_CONSENTED and EXTRA_PROVISIONING_TOKEN to DevicePolicyManager.
They can be used to tell ManagedProvisioning to skip user consent.

Change-Id: I5ef8ab2a14969bb29a2ee3dbdce5ca3225e0759a
parent c7771856
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5246,6 +5246,7 @@ package android.app.admin {
    field public static final java.lang.String EXTRA_DEVICE_ADMIN = "android.app.extra.DEVICE_ADMIN";
    field public static final java.lang.String EXTRA_PROVISIONING_DEFAULT_MANAGED_PROFILE_NAME = "defaultManagedProfileName";
    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME = "deviceAdminPackageName";
    field public static final java.lang.String EXTRA_PROVISIONING_TOKEN = "android.app.extra.token";
    field public static int FLAG_MANAGED_CAN_ACCESS_PARENT;
    field public static int FLAG_PARENT_CAN_ACCESS_MANAGED;
    field public static final int KEYGUARD_DISABLE_FEATURES_ALL = 2147483647; // 0x7fffffff
+18 −0
Original line number Diff line number Diff line
@@ -103,6 +103,17 @@ public class DevicePolicyManager {
    public static final String ACTION_PROVISION_MANAGED_PROFILE
        = "android.app.action.ACTION_PROVISION_MANAGED_PROFILE";

    /**
     * A broadcast intent with this action can be sent to ManagedProvisionning to specify that the
     * user has already consented to the creation of the managed profile.
     * The intent must contain the extras
     * {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME} and
     * {@link #EXTRA_PROVISIONING_TOKEN}
     * @hide
     */
    public static final String ACTION_PROVISIONING_USER_HAS_CONSENTED
        = "android.app.action.USER_HAS_CONSENTED";

    /**
     * A String extra holding the name of the package of the mobile device management application
     * that starts the managed provisioning flow. This package will be set as the profile owner.
@@ -111,6 +122,13 @@ public class DevicePolicyManager {
    public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME
        = "deviceAdminPackageName";

    /**
     * An int extra used to identify the consent of the user to create the managed profile.
     * <p>Use with {@link #ACTION_PROVISION_MANAGED_PROFILE}
     */
    public static final String EXTRA_PROVISIONING_TOKEN
        = "android.app.extra.token";

    /**
     * A String extra holding the default name of the profile that is created during managed profile
     * provisioning.