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

Commit d4398f1c authored by Adam Bookatz's avatar Adam Bookatz
Browse files

isVisibleBackgroundUsersSupported is only for full

Clarifies that isVisibleBackgroundUsers* is specifically about FULL
users. It is totally unrelated to other background visible users.
In particular, its value has nothing to do with the existence of a
Communal Profile.

Bug: 323391957
Test: N/A. Just javadoc.
Change-Id: I1c970ecc36bfff2e298ee9eac15c343ba9e01afd
parent 761fadd2
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -3438,6 +3438,7 @@ public class UserManager {
    }

    /**
     * @see #isVisibleBackgroundUsersSupported()
     * @hide
     */
    public static boolean isVisibleBackgroundUsersEnabled() {
@@ -3447,14 +3448,21 @@ public class UserManager {
    }

    /**
     * Returns whether the device allows (full) users to be started in background visible in a given
     * Returns whether the device allows full users to be started in background visible in a given
     * display (which would allow them to launch activities in that display).
     *
     * @return {@code false} for most devices, except on automotive builds for vehiches with
     * Note that this is specifically about allowing <b>full</b> users to be background visible.
     * Even if it is false, there can still be background visible users.
     *
     * In particular, the Communal Profile is a background visible user, and it can be supported
     * unrelated to the value of this method.
     *
     * @return {@code false} for most devices, except on automotive builds for vehicles with
     * passenger displays.
     *
     * @hide
     */
    // TODO(b/310249114): Rename to isVisibleBackgroundFullUsersSupported
    @TestApi
    public boolean isVisibleBackgroundUsersSupported() {
        return isVisibleBackgroundUsersEnabled();
@@ -3470,12 +3478,13 @@ public class UserManager {
    }

    /**
     * Returns whether the device allows (full) users to be started in background visible in the
     * Returns whether the device allows full users to be started in background visible in the
     * {@link android.view.Display#DEFAULT_DISPLAY default display}.
     *
     * @return {@code false} for most devices, except passenger-only automotive build (i.e., when
     * Android runs in a separate system in the back seat to manage the passenger displays).
     *
     * @see #isVisibleBackgroundUsersSupported()
     * @hide
     */
    @TestApi
+3 −2
Original line number Diff line number Diff line
@@ -2998,12 +2998,13 @@
         will be locked. -->
    <bool name="config_multiuserDelayUserDataLocking">false</bool>

    <!-- Whether the device allows users to start in background visible on displays.
    <!-- Whether the device allows full users to start in background visible on displays.
         Note: this flag does NOT control the Communal Profile, which is not a full user.
         Should be false for all devices in production. Can be enabled only for development use
         in automotive vehicles with passenger displays. -->
    <bool name="config_multiuserVisibleBackgroundUsers">false</bool>

    <!-- Whether the device allows users to start in background visible on the default display.
    <!-- Whether the device allows full users to start in background visible on the default display.
         Should be false for all devices in production. Can be enabled only for development use
         in passenger-only automotive build (i.e., when Android runs in a separate system in the
         back seat to manage the passenger displays).