UserInfo.UserType
public
static
final
enum
UserInfo.UserType
extends Enum<UserInfo.UserType>
| java.lang.Object | ||
| ↳ | java.lang.Enum<com.android.tradefed.device.UserInfo.UserType> | |
| ↳ | com.android.tradefed.device.UserInfo.UserType | |
Supported variants of a user's type in external APIs.
Summary
Enum values | |
|---|---|
UserInfo.UserType |
CLONE_PROFILE
clone profile user |
UserInfo.UserType |
COMMUNAL_PROFILE
communal profile user |
UserInfo.UserType |
CURRENT
current foreground user of the device |
UserInfo.UserType |
FULL
Indicates a "full" user, which is a non-profile, human user. |
UserInfo.UserType |
GUEST
guest user. |
UserInfo.UserType |
MAIN
This field is deprecated. Use FULL instead. |
UserInfo.UserType |
MANAGED_PROFILE
managed profile user, e.g. work profile. |
UserInfo.UserType |
NULL
undefined user id |
UserInfo.UserType |
PRIMARY
user flagged as primary on the device; most often primary = system user = user 0 |
UserInfo.UserType |
PRIVATE_PROFILE
private profile user |
UserInfo.UserType |
SECONDARY
secondary user, i.e. |
UserInfo.UserType |
SYSTEM
system user = user 0 |
Public methods | |
|---|---|
boolean
|
isCloneProfile()
|
boolean
|
isCurrent()
|
boolean
|
isFull()
|
boolean
|
isGuest()
|
boolean
|
isMain()
This method is deprecated.
Use |
boolean
|
isManagedProfile()
|
boolean
|
isPrimary()
|
boolean
|
isPrivateProfile()
|
boolean
|
isProfile()
Return whether this instance is of profile type. |
boolean
|
isSecondary()
|
boolean
|
isSystem()
|
static
UserInfo.UserType
|
valueOf(String name)
|
static
final
UserType[]
|
values()
|
Enum values
FULL
public static final UserInfo.UserType FULL
Indicates a "full" user, which is a non-profile, human user.
GUEST
public static final UserInfo.UserType GUEST
guest user. Only one can exist at a time, may be ephemeral and have more restrictions.
MAIN
public static final UserInfo.UserType MAIN
This field is deprecated.
Use FULL instead.
Indicates the "main" user, which is the designated primary user on the device, as defined
by ERROR(/UserManager#getMainUser()).
MANAGED_PROFILE
public static final UserInfo.UserType MANAGED_PROFILE
managed profile user, e.g. work profile.
PRIMARY
public static final UserInfo.UserType PRIMARY
user flagged as primary on the device; most often primary = system user = user 0
SECONDARY
public static final UserInfo.UserType SECONDARY
secondary user, i.e. non-primary and non-system.
Public methods
isCloneProfile
public boolean isCloneProfile ()
| Returns | |
|---|---|
boolean |
|
isCurrent
public boolean isCurrent ()
| Returns | |
|---|---|
boolean |
|
isFull
public boolean isFull ()
| Returns | |
|---|---|
boolean |
|
isGuest
public boolean isGuest ()
| Returns | |
|---|---|
boolean |
|
isManagedProfile
public boolean isManagedProfile ()
| Returns | |
|---|---|
boolean |
|
isPrimary
public boolean isPrimary ()
| Returns | |
|---|---|
boolean |
|
isPrivateProfile
public boolean isPrivateProfile ()
| Returns | |
|---|---|
boolean |
|
isProfile
public boolean isProfile ()
Return whether this instance is of profile type.
| Returns | |
|---|---|
boolean |
|
isSecondary
public boolean isSecondary ()
| Returns | |
|---|---|
boolean |
|
isSystem
public boolean isSystem ()
| Returns | |
|---|---|
boolean |
|
valueOf
public static UserInfo.UserType valueOf (String name)
| Parameters | |
|---|---|
name |
String |
| Returns | |
|---|---|
UserInfo.UserType |
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-12-04 UTC.