UserInfo
public
final
class
UserInfo
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.UserInfo |
Podobnie jak klasa UserInfo z platformy.
Ma ona być podobna do android.content.pm.UserInfo.
Przechowuje dane i podstawową logikę dotyczącą informacji o jednym użytkowniku.
Podsumowanie
Stałe | |
|---|---|
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
|
Fieldsem | |
|---|---|
public
static
final
String |
CLONE_PROFILE_TYPE
|
public
static
final
String |
COMMUNAL_PROFILE_TYPE
|
public
static
final
String |
PRIVATE_PROFILE_TYPE
|
Konstruktory publiczne | |
|---|---|
UserInfo(int userId, String userName, int flag, boolean isRunning)
|
|
UserInfo(int userId, String userName, int flag, boolean isRunning, String userType)
|
|
Metody publiczne | |
|---|---|
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)
Zwraca informację, czy ta instancja jest typu określonego typu. |
int
|
userId()
|
String
|
userName()
|
Stałe
FLAGS_NOT_SECONDARY
public static final int FLAGS_NOT_SECONDARY
Wartość stała: 45 (0x0000002d)
FLAG_EPHEMERAL
public static final int FLAG_EPHEMERAL
Wartość stała: 256 (0x00000100)
FLAG_FOR_TESTING
public static final int FLAG_FOR_TESTING
Wartość stała: 32768 (0x00008000)
FLAG_GUEST
public static final int FLAG_GUEST
Wartość stała: 4 (0x00000004)
FLAG_MAIN
public static final int FLAG_MAIN
Wartość stała: 16384 (0x00004000)
FLAG_MANAGED_PROFILE
public static final int FLAG_MANAGED_PROFILE
Wartość stała: 32 (0x00000020)
FLAG_PRIMARY
public static final int FLAG_PRIMARY
Wartość stała: 1 (0x00000001)
FLAG_PROFILE
public static final int FLAG_PROFILE
Wartość stała: 4096 (0x00001000)
FLAG_RESTRICTED
public static final int FLAG_RESTRICTED
Wartość stała: 8 (0x00000008)
USER_SYSTEM
public static final int USER_SYSTEM
Wartość stała: 0 (0x00000000)
Fieldsem
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
Konstruktory publiczne
UserInfo
public UserInfo (int userId,
String userName,
int flag,
boolean isRunning)| Parametry | |
|---|---|
userId |
int |
userName |
String |
flag |
int |
isRunning |
boolean |
UserInfo
public UserInfo (int userId,
String userName,
int flag,
boolean isRunning,
String userType)| Parametry | |
|---|---|
userId |
int |
userName |
String |
flag |
int |
isRunning |
boolean |
userType |
String |
Metody publiczne
flaga
public int flag ()
| Zwroty | |
|---|---|
int |
|
isCloneProfile
public boolean isCloneProfile ()
| Zwroty | |
|---|---|
boolean |
|
isCommunalProfile
public boolean isCommunalProfile ()
| Zwroty | |
|---|---|
boolean |
|
isEphemeral
public boolean isEphemeral ()
| Zwroty | |
|---|---|
boolean |
|
isFlagForTesting
public boolean isFlagForTesting ()
| Zwroty | |
|---|---|
boolean |
|
isGuest
public boolean isGuest ()
| Zwroty | |
|---|---|
boolean |
|
isMain
public boolean isMain ()
| Zwroty | |
|---|---|
boolean |
|
isManagedProfile
public boolean isManagedProfile ()
| Zwroty | |
|---|---|
boolean |
|
isPrimary
public boolean isPrimary ()
| Zwroty | |
|---|---|
boolean |
|
isPrivateProfile
public boolean isPrivateProfile ()
| Zwroty | |
|---|---|
boolean |
|
isRunning
public boolean isRunning ()
| Zwroty | |
|---|---|
boolean |
|
isSecondary
public boolean isSecondary ()
| Zwroty | |
|---|---|
boolean |
|
isSystem
public boolean isSystem ()
| Zwroty | |
|---|---|
boolean |
|
isUserType
public boolean isUserType (UserInfo.UserType userType, int currentUserId)
Zwraca informację, czy ta instancja jest typu określonego typu.
| Parametry | |
|---|---|
userType |
UserInfo.UserType |
currentUserId |
int |
| Zwroty | |
|---|---|
boolean |
|
userId
public int userId ()
| Zwroty | |
|---|---|
int |
|
userName
public String userName ()
| Zwroty | |
|---|---|
String |
|