UserInfo
public
final
class
UserInfo
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.UserInfo |
Simile alla classe UserInfo della piattaforma.
Questo è pensato per essere simile a android.content.pm.UserInfo.
Memorizza i dati e la logica di base relativi alle informazioni di un utente.
Riepilogo
Costanti | |
|---|---|
String |
CLONE_PROFILE_TYPE
|
String |
COMMUNAL_PROFILE_TYPE
|
int |
FLAGS_NOT_SECONDARY
|
int |
FLAG_ADMIN
|
int |
FLAG_EPHEMERAL
|
int |
FLAG_FOR_TESTING
|
int |
FLAG_FULL
|
int |
FLAG_GUEST
|
int |
FLAG_MAIN
|
int |
FLAG_MANAGED_PROFILE
|
int |
FLAG_PRIMARY
|
int |
FLAG_PROFILE
|
int |
FLAG_RESTRICTED
|
int |
PER_USER_RANGE
|
String |
PRIVATE_PROFILE_TYPE
|
int |
USER_ALL
|
int |
USER_CURRENT
|
int |
USER_CURRENT_OR_SELF
|
int |
USER_NULL
|
int |
USER_SYSTEM
|
String |
USER_TYPE_FULL_SECONDARY
|
String |
USER_TYPE_SHORT_SECONDARY
|
Costruttori pubblici | |
|---|---|
UserInfo(int userId, String userName, int flag, boolean isRunning)
|
|
UserInfo(int userId, String userName, int flag, boolean isRunning, String userType)
|
|
Metodi pubblici | |
|---|---|
int
|
flag()
|
boolean
|
isAdmin()
|
boolean
|
isCloneProfile()
|
boolean
|
isCommunalProfile()
|
boolean
|
isEphemeral()
|
boolean
|
isFlagForTesting()
|
boolean
|
isFull()
|
boolean
|
isGuest()
|
boolean
|
isMain()
Questo metodo è obsoleto.
Utilizza invece |
boolean
|
isManagedProfile()
|
boolean
|
isNull()
|
boolean
|
isPrimary()
|
boolean
|
isPrivateProfile()
|
boolean
|
isRunning()
|
boolean
|
isSecondary()
|
boolean
|
isSystem()
|
boolean
|
isUserType(UserInfo.UserType userType, int currentUserId)
Restituisce un valore che indica se questa istanza è del tipo specificato. |
String
|
toString()
|
int
|
userId()
|
String
|
userName()
|
Costanti
CLONE_PROFILE_TYPE
public static final String CLONE_PROFILE_TYPE
Valore costante: "profile.CLONE"
COMMUNAL_PROFILE_TYPE
public static final String COMMUNAL_PROFILE_TYPE
Valore costante: "profile.COMMUNAL"
FLAGS_NOT_SECONDARY
public static final int FLAGS_NOT_SECONDARY
Valore costante: 45 (0x0000002d)
FLAG_ADMIN
public static final int FLAG_ADMIN
Valore costante: 2 (0x00000002)
FLAG_EPHEMERAL
public static final int FLAG_EPHEMERAL
Valore costante: 256 (0x00000100)
FLAG_FOR_TESTING
public static final int FLAG_FOR_TESTING
Constant Value: 32768 (0x00008000)
FLAG_FULL
public static final int FLAG_FULL
Constant Value: 1024 (0x00000400)
FLAG_GUEST
public static final int FLAG_GUEST
Valore costante: 4 (0x00000004)
FLAG_MAIN
public static final int FLAG_MAIN
Constant Value: 16384 (0x00004000)
FLAG_MANAGED_PROFILE
public static final int FLAG_MANAGED_PROFILE
Constant Value: 32 (0x00000020)
FLAG_PRIMARY
public static final int FLAG_PRIMARY
Constant Value: 1 (0x00000001)
FLAG_PROFILE
public static final int FLAG_PROFILE
Constant Value: 4096 (0x00001000)
FLAG_RESTRICTED
public static final int FLAG_RESTRICTED
Valore costante: 8 (0x00000008)
PER_USER_RANGE
public static final int PER_USER_RANGE
Valore costante: 100000 (0x000186a0)
PRIVATE_PROFILE_TYPE
public static final String PRIVATE_PROFILE_TYPE
Valore costante: "profile.PRIVATE"
USER_ALL
public static final int USER_ALL
Valore costante: -1 (0xffffffff)
USER_CURRENT
public static final int USER_CURRENT
Constant Value: -2 (0xfffffffe)
USER_CURRENT_OR_SELF
public static final int USER_CURRENT_OR_SELF
Valore costante: -3 (0xfffffffd)
USER_NULL
public static final int USER_NULL
Valore costante: -10000 (0xffffd8f0)
USER_SYSTEM
public static final int USER_SYSTEM
Valore costante: 0 (0x00000000)
USER_TYPE_FULL_SECONDARY
public static final String USER_TYPE_FULL_SECONDARY
Valore costante: "android.os.usertype.full.SECONDARY"
USER_TYPE_SHORT_SECONDARY
public static final String USER_TYPE_SHORT_SECONDARY
Valore costante: "full.SECONDARY"
Costruttori pubblici
UserInfo
public UserInfo (int userId,
String userName,
int flag,
boolean isRunning)| Parametri | |
|---|---|
userId |
int |
userName |
String |
flag |
int |
isRunning |
boolean |
UserInfo
public UserInfo (int userId,
String userName,
int flag,
boolean isRunning,
String userType)| Parametri | |
|---|---|
userId |
int |
userName |
String |
flag |
int |
isRunning |
boolean |
userType |
String |
Metodi pubblici
flag
public int flag ()
| Resi | |
|---|---|
int |
|
isAdmin
public boolean isAdmin ()
| Resi | |
|---|---|
boolean |
|
isCloneProfile
public boolean isCloneProfile ()
| Resi | |
|---|---|
boolean |
|
isCommunalProfile
public boolean isCommunalProfile ()
| Resi | |
|---|---|
boolean |
|
isEphemeral
public boolean isEphemeral ()
| Resi | |
|---|---|
boolean |
|
isFlagForTesting
public boolean isFlagForTesting ()
| Resi | |
|---|---|
boolean |
|
isFull
public boolean isFull ()
| Resi | |
|---|---|
boolean |
|
isGuest
public boolean isGuest ()
| Resi | |
|---|---|
boolean |
|
isManagedProfile
public boolean isManagedProfile ()
| Resi | |
|---|---|
boolean |
|
isNull
public boolean isNull ()
| Resi | |
|---|---|
boolean |
|
isPrimary
public boolean isPrimary ()
| Resi | |
|---|---|
boolean |
|
isPrivateProfile
public boolean isPrivateProfile ()
| Resi | |
|---|---|
boolean |
|
isRunning
public boolean isRunning ()
| Resi | |
|---|---|
boolean |
|
isSecondary
public boolean isSecondary ()
| Resi | |
|---|---|
boolean |
|
isSystem
public boolean isSystem ()
| Resi | |
|---|---|
boolean |
|
isUserType
public boolean isUserType (UserInfo.UserType userType, int currentUserId)
Restituisce un valore che indica se questa istanza è del tipo specificato.
| Parametri | |
|---|---|
userType |
UserInfo.UserType |
currentUserId |
int |
| Resi | |
|---|---|
boolean |
|
toString
public String toString ()
| Resi | |
|---|---|
String |
|
userId
public int userId ()
| Resi | |
|---|---|
int |
|
userName
public String userName ()
| Resi | |
|---|---|
String |
|