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  GUEST

guest user. 

UserInfo.UserType  MAIN

user flagged as main user on the device; on non-hsum main user = system user = user 0 on hsum main user = first human user. 

UserInfo.UserType  MANAGED_PROFILE

managed profile user, e.g. work profile. 

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 isGuest()
boolean isMain()
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

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

user flagged as main user on the device; on non-hsum main user = system user = user 0 on hsum main user = first human user.

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

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

isGuest

public boolean isGuest ()

Returns
boolean

isMain

public boolean isMain ()

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[]