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

Commit e798933b authored by arangelov's avatar arangelov
Browse files

Add API constants for metadata for mainline modules

The constants will allow mainline modules to declare whether
they should be uninstalled or not during the provisioning
process.

Bug: 179653892
Test: compiled
Change-Id: Id7de12204b2e9481935cc5a56831ab4899b3dfb6
parent b938d78c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -942,6 +942,9 @@ package android.app.admin {
    field @Deprecated public static final int PROVISIONING_TRIGGER_PERSISTENT_DEVICE_OWNER = 3; // 0x3
    field public static final int PROVISIONING_TRIGGER_QR_CODE = 2; // 0x2
    field public static final int PROVISIONING_TRIGGER_UNSPECIFIED = 0; // 0x0
    field public static final String REQUIRED_APP_MANAGED_DEVICE = "android.app.REQUIRED_APP_MANAGED_DEVICE";
    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 STATE_USER_PROFILE_COMPLETE = 4; // 0x4
    field public static final int STATE_USER_PROFILE_FINALIZED = 5; // 0x5
    field public static final int STATE_USER_SETUP_COMPLETE = 2; // 0x2
+35 −0
Original line number Diff line number Diff line
@@ -3281,6 +3281,41 @@ public class DevicePolicyManager {
    public static final String ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_DISALLOWED =
            "android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED";
    /**
     * A {@code boolean} metadata to be included in a mainline module's {@code <application>}
     * manifest element, which declares that the module should be considered a required app for
     * managed users.
     * <p>Being declared as a required app prevents removal of this package during the
     * provisioning process.
     * @hide
     */
    @SystemApi
    public static final String REQUIRED_APP_MANAGED_USER = "android.app.REQUIRED_APP_MANAGED_USER";
    /**
     * A {@code boolean} metadata to be included in a mainline module's {@code <application>}
     * manifest element, which declares that the module should be considered a required app for
     * managed devices.
     * <p>Being declared as a required app prevents removal of this package during the
     * provisioning process.
     * @hide
     */
    @SystemApi
    public static final String REQUIRED_APP_MANAGED_DEVICE =
            "android.app.REQUIRED_APP_MANAGED_DEVICE";
    /**
     * A {@code boolean} metadata to be included in a mainline module's {@code <application>}
     * manifest element, which declares that the module should be considered a required app for
     * managed profiles.
     * <p>Being declared as a required app prevents removal of this package during the
     * provisioning process.
     * @hide
     */
    @SystemApi
    public static final String REQUIRED_APP_MANAGED_PROFILE =
            "android.app.REQUIRED_APP_MANAGED_PROFILE";
    /**
     * Called by an application that is administering the device to set the password restrictions it
     * is imposing. After setting this, the user will not be able to enter a new password that is