UserInfo

public final class UserInfo
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.UserInfo


Es similar a la clase UserInfo de la plataforma.

Se diseñó para que sea similar a android.content.pm.UserInfo.

Almacena datos y lógica básica en torno a la información de un usuario.

Resumen

Campos

public static final String CLONE_PROFILE_TYPE

public static final String COMMUNAL_PROFILE_TYPE

public static final String PRIVATE_PROFILE_TYPE

Constructores públicos

UserInfo(int userId, String userName, int flag, boolean isRunning)
UserInfo(int userId, String userName, int flag, boolean isRunning, String userType)

Métodos públicos

int flag()
boolean isCloneProfile()
boolean isCommunalProfile()
boolean isEphemeral()
boolean isFlagForTesting()
boolean isGuest()
boolean isMain()
boolean isManagedProfile()
boolean isPrimary()
boolean isPrivateProfile()
boolean isRunning()
boolean isSecondary()
boolean isSystem()
boolean isUserType(UserInfo.UserType userType, int currentUserId)

Muestra si esta instancia es del tipo especificado.

int userId()
String userName()

Constantes

FLAGS_NOT_SECONDARY

public static final int FLAGS_NOT_SECONDARY

Valor constante: 45 (0x0000002d)

FLAG_EPHEMERAL

public static final int FLAG_EPHEMERAL

Valor constante: 256 (0x00000100)

FLAG_FOR_TESTING

public static final int FLAG_FOR_TESTING

Valor constante: 32768 (0x00008000)

FLAG_GUEST

public static final int FLAG_GUEST

Valor constante: 4 (0x00000004)

FLAG_MAIN

public static final int FLAG_MAIN

Valor constante: 16384 (0x00004000)

FLAG_MANAGED_PROFILE

public static final int FLAG_MANAGED_PROFILE

Valor constante: 32 (0x00000020)

FLAG_PRIMARY

public static final int FLAG_PRIMARY

Valor constante: 1 (0x00000001)

FLAG_PROFILE

public static final int FLAG_PROFILE

Valor constante: 4096 (0x00001000)

FLAG_RESTRICTED

public static final int FLAG_RESTRICTED

Valor constante: 8 (0x00000008)

USER_SYSTEM

public static final int USER_SYSTEM

Valor constante: 0 (0x00000000)

Campos

CLONE_PROFILE_TYPE

public static final String CLONE_PROFILE_TYPE

COMMUNAL_PROFILE_TYPE

public static final String COMMUNAL_PROFILE_TYPE

PRIVATE_PROFILE_TYPE

public static final String PRIVATE_PROFILE_TYPE

Constructores públicos

UserInfo

public UserInfo (int userId, 
                String userName, 
                int flag, 
                boolean isRunning)

Parámetros
userId int

userName String

flag int

isRunning boolean

UserInfo

public UserInfo (int userId, 
                String userName, 
                int flag, 
                boolean isRunning, 
                String userType)

Parámetros
userId int

userName String

flag int

isRunning boolean

userType String

Métodos públicos

marcar

public int flag ()

Muestra
int

isCloneProfile

public boolean isCloneProfile ()

Muestra
boolean

isCommunalProfile

public boolean isCommunalProfile ()

Muestra
boolean

isEphemeral

public boolean isEphemeral ()

Muestra
boolean

isFlagForTesting

public boolean isFlagForTesting ()

Muestra
boolean

isGuest

public boolean isGuest ()

Muestra
boolean

isMain

public boolean isMain ()

Muestra
boolean

isManagedProfile

public boolean isManagedProfile ()

Muestra
boolean

isPrimary

public boolean isPrimary ()

Muestra
boolean

isPrivateProfile

public boolean isPrivateProfile ()

Muestra
boolean

isRunning

public boolean isRunning ()

Muestra
boolean

isSecondary

public boolean isSecondary ()

Muestra
boolean

isSystem

public boolean isSystem ()

Muestra
boolean

isUserType

public boolean isUserType (UserInfo.UserType userType, 
                int currentUserId)

Muestra si esta instancia es del tipo especificado.

Parámetros
userType UserInfo.UserType

currentUserId int

Muestra
boolean

userId

public int userId ()

Muestra
int

userName

public String userName ()

Muestra
String