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 isFull() instead.

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

CLONE_PROFILE

public static final UserInfo.UserType CLONE_PROFILE

clone profile user

COMMUNAL_PROFILE

public static final UserInfo.UserType COMMUNAL_PROFILE

communal profile user

CURRENT

public static final UserInfo.UserType CURRENT

current foreground user of the device

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.

NULL

public static final UserInfo.UserType NULL

undefined user id

PRIMARY

public static final UserInfo.UserType PRIMARY

user flagged as primary on the device; most often primary = system user = user 0

PRIVATE_PROFILE

public static final UserInfo.UserType PRIVATE_PROFILE

private profile user

SECONDARY

public static final UserInfo.UserType SECONDARY

secondary user, i.e. non-primary and non-system.

SYSTEM

public static final UserInfo.UserType SYSTEM

system user = user 0

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

isMain

public boolean isMain ()

This method is deprecated.
Use isFull() instead.

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

values

public static final UserType[] values ()

Returns
UserType[]