diff options
| -rw-r--r-- | core/api/system-current.txt | 3 | ||||
| -rw-r--r-- | core/api/test-current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/content/pm/UserProperties.java | 39 |
3 files changed, 42 insertions, 1 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index b8c9fc66cb57..529671251087 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -4221,11 +4221,14 @@ package android.content.pm { field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.UserProperties> CREATOR; field public static final int CROSS_PROFILE_CONTENT_SHARING_DELEGATE_FROM_PARENT = 1; // 0x1 field public static final int CROSS_PROFILE_CONTENT_SHARING_NO_DELEGATION = 0; // 0x0 + field public static final int CROSS_PROFILE_CONTENT_SHARING_UNKNOWN = -1; // 0xffffffff field public static final int SHOW_IN_QUIET_MODE_DEFAULT = 2; // 0x2 field public static final int SHOW_IN_QUIET_MODE_HIDDEN = 1; // 0x1 field public static final int SHOW_IN_QUIET_MODE_PAUSED = 0; // 0x0 + field public static final int SHOW_IN_QUIET_MODE_UNKNOWN = -1; // 0xffffffff field public static final int SHOW_IN_SHARING_SURFACES_NO = 2; // 0x2 field public static final int SHOW_IN_SHARING_SURFACES_SEPARATE = 1; // 0x1 + field public static final int SHOW_IN_SHARING_SURFACES_UNKNOWN = -1; // 0xffffffff field public static final int SHOW_IN_SHARING_SURFACES_WITH_PARENT = 0; // 0x0 } diff --git a/core/api/test-current.txt b/core/api/test-current.txt index d566216bd669..0d1d8d733139 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -1167,6 +1167,7 @@ package android.content.pm { method public int getShowInLauncher(); field public static final int SHOW_IN_LAUNCHER_NO = 2; // 0x2 field public static final int SHOW_IN_LAUNCHER_SEPARATE = 1; // 0x1 + field public static final int SHOW_IN_LAUNCHER_UNKNOWN = -1; // 0xffffffff field public static final int SHOW_IN_LAUNCHER_WITH_PARENT = 0; // 0x0 } diff --git a/core/java/android/content/pm/UserProperties.java b/core/java/android/content/pm/UserProperties.java index 57749d43eb37..269c6c27821c 100644 --- a/core/java/android/content/pm/UserProperties.java +++ b/core/java/android/content/pm/UserProperties.java @@ -123,6 +123,7 @@ public final class UserProperties implements Parcelable { * @hide */ @IntDef(prefix = "SHOW_IN_LAUNCHER_", value = { + SHOW_IN_LAUNCHER_UNKNOWN, SHOW_IN_LAUNCHER_WITH_PARENT, SHOW_IN_LAUNCHER_SEPARATE, SHOW_IN_LAUNCHER_NO, @@ -131,6 +132,13 @@ public final class UserProperties implements Parcelable { public @interface ShowInLauncher { } /** + * Indicates that the show in launcher value for this profile is unknown or unsupported. + * @hide + */ + @TestApi + @SuppressLint("UnflaggedApi") // b/306636213 + public static final int SHOW_IN_LAUNCHER_UNKNOWN = -1; + /** * Suggests that the launcher should show this user's apps in the main tab. * That is, either this user is a full user, so its apps should be presented accordingly, or, if * this user is a profile, then its apps should be shown alongside its parent's apps. @@ -157,6 +165,7 @@ public final class UserProperties implements Parcelable { * @hide */ @IntDef(prefix = "SHOW_IN_SETTINGS_", value = { + SHOW_IN_SETTINGS_UNKNOWN, SHOW_IN_SETTINGS_WITH_PARENT, SHOW_IN_SETTINGS_SEPARATE, SHOW_IN_SETTINGS_NO, @@ -165,6 +174,12 @@ public final class UserProperties implements Parcelable { public @interface ShowInSettings { } /** + * Indicates that the show in settings value for this profile is unknown or unsupported. + * @hide + */ + @SuppressLint("UnflaggedApi") // b/306636213 + public static final int SHOW_IN_SETTINGS_UNKNOWN = -1; + /** * Suggests that the Settings app should show this user's apps in the main tab. * That is, either this user is a full user, so its apps should be presented accordingly, or, if * this user is a profile, then its apps should be shown alongside its parent's apps. @@ -309,6 +324,7 @@ public final class UserProperties implements Parcelable { @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = "SHOW_IN_QUIET_MODE_", value = { + SHOW_IN_QUIET_MODE_UNKNOWN, SHOW_IN_QUIET_MODE_PAUSED, SHOW_IN_QUIET_MODE_HIDDEN, SHOW_IN_QUIET_MODE_DEFAULT, @@ -318,6 +334,12 @@ public final class UserProperties implements Parcelable { } /** + * Indicates that the show in quiet mode value for this profile is unknown. + */ + @SuppressLint("UnflaggedApi") // b/306636213 + public static final int SHOW_IN_QUIET_MODE_UNKNOWN = -1; + + /** * Indicates that the profile should still be visible in quiet mode but should be shown as * paused (e.g. by greying out its icons). */ @@ -347,6 +369,7 @@ public final class UserProperties implements Parcelable { @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = "SHOW_IN_SHARING_SURFACES_", value = { + SHOW_IN_SHARING_SURFACES_UNKNOWN, SHOW_IN_SHARING_SURFACES_SEPARATE, SHOW_IN_SHARING_SURFACES_WITH_PARENT, SHOW_IN_SHARING_SURFACES_NO, @@ -356,6 +379,12 @@ public final class UserProperties implements Parcelable { } /** + * Indicates that the show in launcher value for this profile is unknown or unsupported. + */ + @SuppressLint("UnflaggedApi") // b/306636213 + public static final int SHOW_IN_SHARING_SURFACES_UNKNOWN = SHOW_IN_LAUNCHER_UNKNOWN; + + /** * Indicates that the profile data and apps should be shown in sharing surfaces intermixed with * parent user's data and apps. */ @@ -379,7 +408,8 @@ public final class UserProperties implements Parcelable { * * @hide */ - @IntDef(prefix = {"CROSS_PROFILE_CONTENT_SHARING_STRATEGY_"}, value = { + @IntDef(prefix = {"CROSS_PROFILE_CONTENT_SHARING_"}, value = { + CROSS_PROFILE_CONTENT_SHARING_UNKNOWN, CROSS_PROFILE_CONTENT_SHARING_NO_DELEGATION, CROSS_PROFILE_CONTENT_SHARING_DELEGATE_FROM_PARENT }) @@ -388,6 +418,13 @@ public final class UserProperties implements Parcelable { } /** + * Signifies that cross-profile content sharing strategy, both to and from this profile, is + * unknown/unsupported. + */ + @SuppressLint("UnflaggedApi") // b/306636213 + public static final int CROSS_PROFILE_CONTENT_SHARING_UNKNOWN = -1; + + /** * Signifies that cross-profile content sharing strategy, both to and from this profile, should * not be delegated to any other user/profile. * For ex: |