Loading core/api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -1216,7 +1216,7 @@ package android.content.pm { method public boolean isRestricted(); method @FlaggedApi("android.multiuser.allow_supervising_profile") public boolean isSupervisingProfile(); method public boolean supportsSwitchTo(); method @Deprecated public boolean supportsSwitchToByUser(); method public boolean supportsSwitchToByUser(); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.UserInfo> CREATOR; field public static final int FLAG_ADMIN = 2; // 0x2 Loading core/java/android/content/pm/UserInfo.java +6 −4 Original line number Diff line number Diff line Loading @@ -482,13 +482,15 @@ public class UserInfo implements Parcelable { } /** * @return true if this user can be switched to by end user through UI. * @deprecated Use {@link UserInfo#supportsSwitchTo} instead. * @return true if this user can be switched to by an end user through the UI. * This method checks if supportsSwitchTo() is true AND the user is a full user. * It specifically excludes the headless system user, as switching to that user * is typically a framework-level operation and not available to regular users * via the UI. */ @Deprecated @android.ravenwood.annotation.RavenwoodThrow public boolean supportsSwitchToByUser() { return supportsSwitchTo(); return supportsSwitchTo() && isFull(); } /** Loading Loading
core/api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -1216,7 +1216,7 @@ package android.content.pm { method public boolean isRestricted(); method @FlaggedApi("android.multiuser.allow_supervising_profile") public boolean isSupervisingProfile(); method public boolean supportsSwitchTo(); method @Deprecated public boolean supportsSwitchToByUser(); method public boolean supportsSwitchToByUser(); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.UserInfo> CREATOR; field public static final int FLAG_ADMIN = 2; // 0x2 Loading
core/java/android/content/pm/UserInfo.java +6 −4 Original line number Diff line number Diff line Loading @@ -482,13 +482,15 @@ public class UserInfo implements Parcelable { } /** * @return true if this user can be switched to by end user through UI. * @deprecated Use {@link UserInfo#supportsSwitchTo} instead. * @return true if this user can be switched to by an end user through the UI. * This method checks if supportsSwitchTo() is true AND the user is a full user. * It specifically excludes the headless system user, as switching to that user * is typically a framework-level operation and not available to regular users * via the UI. */ @Deprecated @android.ravenwood.annotation.RavenwoodThrow public boolean supportsSwitchToByUser() { return supportsSwitchTo(); return supportsSwitchTo() && isFull(); } /** Loading