diff options
Diffstat (limited to 'core/java/android/content')
-rw-r--r-- | core/java/android/content/pm/UserInfo.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/content/pm/UserInfo.java b/core/java/android/content/pm/UserInfo.java index aa4a243..6f1d4f8 100644 --- a/core/java/android/content/pm/UserInfo.java +++ b/core/java/android/content/pm/UserInfo.java @@ -18,6 +18,7 @@ package android.content.pm; import android.os.Parcel; import android.os.Parcelable; +import android.os.SystemProperties; import android.os.UserHandle; /** @@ -116,6 +117,14 @@ public class UserInfo implements Parcelable { return (flags & FLAG_MANAGED_PROFILE) == FLAG_MANAGED_PROFILE; } + /** + * @return true if this user can be switched to. + **/ + public boolean supportsSwitchTo() { + // TODO remove fw.show_hidden_users when we have finished developing managed profiles. + return !isManagedProfile() || SystemProperties.getBoolean("fw.show_hidden_users", false); + } + public UserInfo() { } |