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

Commit 1464113b authored by Felipe Leme's avatar Felipe Leme Committed by Android (Google) Code Review
Browse files

Merge "Hide REMOVE_RESULT_ERROR_LAST_ADMIN_USER." into main

parents 1e12296f cbfa19f6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -12186,7 +12186,6 @@ package android.os {
    field public static final String DISALLOW_RUN_IN_BACKGROUND = "no_run_in_background";
    field public static final int REMOVE_RESULT_ALREADY_BEING_REMOVED = 2; // 0x2
    field public static final int REMOVE_RESULT_DEFERRED = 1; // 0x1
    field @FlaggedApi("android.multiuser.disallow_removing_last_admin_user") public static final int REMOVE_RESULT_ERROR_LAST_ADMIN_USER = -6; // 0xfffffffa
    field public static final int REMOVE_RESULT_ERROR_MAIN_USER_PERMANENT_ADMIN = -5; // 0xfffffffb
    field public static final int REMOVE_RESULT_ERROR_SYSTEM_USER = -4; // 0xfffffffc
    field public static final int REMOVE_RESULT_ERROR_UNKNOWN = -1; // 0xffffffff
+5 −6
Original line number Diff line number Diff line
@@ -2442,6 +2442,10 @@ public class UserManager {
    @SystemApi
    public static final int REMOVE_RESULT_ERROR_MAIN_USER_PERMANENT_ADMIN = -5;

    // TODO(b/444663119): expose as @SystemApi
    // TODO(b/419105275): Currently, the headless system user is also an admin user. When we
    // disallow the removal of last admin user, we mean the last admin user that's not the HSU.
    // If/When b/419105275 removes the admin flag from HSU, this comment should be removed.
    /**
     * A response code from {@link #removeUserWhenPossible(UserHandle, boolean)} indicating that
     * user being removed cannot be removed because it is
@@ -2449,14 +2453,9 @@ public class UserManager {
     *
     * @hide
     */
    // TODO(b/419105275): Currently, the headless system user is also an admin user. When we
    // disallow the removal of last admin user, we mean the last admin user that's not the HSU.
    // If/When b/419105275 removes the admin flag from HSU, this comment should be removed.
    @FlaggedApi(android.multiuser.Flags.FLAG_DISALLOW_REMOVING_LAST_ADMIN_USER)
    @SystemApi
    public static final int REMOVE_RESULT_ERROR_LAST_ADMIN_USER = -6;

    // TODO(b/435271558): expose as @SystemApi
    // TODO(b/444663119): expose as @SystemApi
    /**
     * A response code from {@link #removeUserWhenPossible(UserHandle, boolean)} indicating that
     * user being removed cannot be removed because it is the Device Owner on this device.