UserInfo
public
final
class
UserInfo
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.UserInfo |
Semblable à la classe UserInfo de la plate-forme.
Il est censé être semblable à android.content.pm.UserInfo.
Stocke les données et la logique de base concernant les informations d'un utilisateur.
Résumé
Constantes | |
|---|---|
int |
FLAGS_NOT_SECONDARY
|
int |
FLAG_EPHEMERAL
|
int |
FLAG_FOR_TESTING
|
int |
FLAG_GUEST
|
int |
FLAG_MAIN
|
int |
FLAG_MANAGED_PROFILE
|
int |
FLAG_PRIMARY
|
int |
FLAG_PROFILE
|
int |
FLAG_RESTRICTED
|
int |
USER_SYSTEM
|
Champs | |
|---|---|
public
static
final
String |
CLONE_PROFILE_TYPE
|
public
static
final
String |
COMMUNAL_PROFILE_TYPE
|
public
static
final
String |
PRIVATE_PROFILE_TYPE
|
Constructeurs publics | |
|---|---|
UserInfo(int userId, String userName, int flag, boolean isRunning)
|
|
UserInfo(int userId, String userName, int flag, boolean isRunning, String userType)
|
|
Méthodes publiques | |
|---|---|
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)
Indique si cette instance est de type spécifié. |
int
|
userId()
|
String
|
userName()
|
Constantes
FLAGS_NOT_SECONDARY
public static final int FLAGS_NOT_SECONDARY
Valeur constante : 45 (0x0000002d)
FLAG_EPHEMERAL
public static final int FLAG_EPHEMERAL
Valeur constante : 256 (0x00000100)
FLAG_FOR_TESTING
public static final int FLAG_FOR_TESTING
Valeur constante : 32 768 (0x00008000)
FLAG_GUEST
public static final int FLAG_GUEST
Valeur constante : 4 (0x00000004)
FLAG_MAIN
public static final int FLAG_MAIN
Valeur constante : 16 384 (0x00004000)
FLAG_MANAGED_PROFILE
public static final int FLAG_MANAGED_PROFILE
Valeur constante : 32 (0x00000020)
FLAG_PRIMARY
public static final int FLAG_PRIMARY
Valeur constante : 1 (0x00000001)
FLAG_PROFILE
public static final int FLAG_PROFILE
Valeur constante : 4 096 (0x00001000)
FLAG_RESTRICTED
public static final int FLAG_RESTRICTED
Valeur constante : 8 (0x00000008)
USER_SYSTEM
public static final int USER_SYSTEM
Valeur constante : 0 (0x00000000)
Champs
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
Constructeurs publics
UserInfo
public UserInfo (int userId,
String userName,
int flag,
boolean isRunning)| Paramètres | |
|---|---|
userId |
int |
userName |
String |
flag |
int |
isRunning |
boolean |
UserInfo
public UserInfo (int userId,
String userName,
int flag,
boolean isRunning,
String userType)| Paramètres | |
|---|---|
userId |
int |
userName |
String |
flag |
int |
isRunning |
boolean |
userType |
String |
Méthodes publiques
indicateur
public int flag ()
| Renvoie | |
|---|---|
int |
|
isCloneProfile
public boolean isCloneProfile ()
| Renvoie | |
|---|---|
boolean |
|
isCommunalProfile
public boolean isCommunalProfile ()
| Renvoie | |
|---|---|
boolean |
|
isEphemeral
public boolean isEphemeral ()
| Renvoie | |
|---|---|
boolean |
|
isFlagForTesting
public boolean isFlagForTesting ()
| Renvoie | |
|---|---|
boolean |
|
isGuest
public boolean isGuest ()
| Renvoie | |
|---|---|
boolean |
|
isMain
public boolean isMain ()
| Renvoie | |
|---|---|
boolean |
|
isManagedProfile
public boolean isManagedProfile ()
| Renvoie | |
|---|---|
boolean |
|
isPrimary
public boolean isPrimary ()
| Renvoie | |
|---|---|
boolean |
|
isPrivateProfile
public boolean isPrivateProfile ()
| Renvoie | |
|---|---|
boolean |
|
isRunning
public boolean isRunning ()
| Renvoie | |
|---|---|
boolean |
|
isSecondary
public boolean isSecondary ()
| Renvoie | |
|---|---|
boolean |
|
isSystem
public boolean isSystem ()
| Renvoie | |
|---|---|
boolean |
|
isUserType
public boolean isUserType (UserInfo.UserType userType, int currentUserId)
Indique si cette instance est de type spécifié.
| Paramètres | |
|---|---|
userType |
UserInfo.UserType |
currentUserId |
int |
| Renvoie | |
|---|---|
boolean |
|
userId
public int userId ()
| Renvoie | |
|---|---|
int |
|
userName
public String userName ()
| Renvoie | |
|---|---|
String |
|