UserInfo
public
final
class
UserInfo
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.UserInfo |
Podobnie jak klasa UserInfo z platformy.
Ma to być podobne do android.content.pm.UserInfo.
Przechowuje dane i podstawową logikę dotyczącą informacji o jednym użytkowniku.
Podsumowanie
Stałe | |
|---|---|
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
|
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
|
isAdmin()
|
boolean
|
isCloneProfile()
|
boolean
|
isCommunalProfile()
|
boolean
|
isEphemeral()
|
boolean
|
isFlagForTesting()
|
boolean
|
isFull()
|
boolean
|
isGuest()
|
boolean
|
isMain()
Ta metoda została wycofana.
Użyj w zamian zasady |
boolean
|
isManagedProfile()
|
boolean
|
isNull()
|
boolean
|
isPrimary()
|
boolean
|
isPrivateProfile()
|
boolean
|
isRunning()
|
boolean
|
isSecondary()
|
boolean
|
isSystem()
|
boolean
|
isUserType(UserInfo.UserType userType, int currentUserId)
Zwraca informację, czy ta instancja jest określonego typu. |
String
|
toString()
|
int
|
userId()
|
String
|
userName()
|
Stałe
CLONE_PROFILE_TYPE
public static final String CLONE_PROFILE_TYPE
Wartość stała: "profile.CLONE"
COMMUNAL_PROFILE_TYPE
public static final String COMMUNAL_PROFILE_TYPE
Wartość stała: "profile.COMMUNAL"
FLAGS_NOT_SECONDARY
public static final int FLAGS_NOT_SECONDARY
Wartość stała: 45 (0x0000002d)
FLAG_ADMIN
public static final int FLAG_ADMIN
Wartość stała: 2 (0x00000002)
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_FULL
public static final int FLAG_FULL
Wartość stała: 1024 (0x00000400)
FLAG_GUEST
public static final int FLAG_GUEST
Constant Value: 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
Wartość stała: 4096 (0x00001000)
FLAG_RESTRICTED
public static final int FLAG_RESTRICTED
Wartość stała: 8 (0x00000008)
PER_USER_RANGE
public static final int PER_USER_RANGE
Wartość stała: 100000 (0x000186a0)
PRIVATE_PROFILE_TYPE
public static final String PRIVATE_PROFILE_TYPE
Wartość stała: "profile.PRIVATE"
USER_ALL
public static final int USER_ALL
Wartość stała: -1 (0xffffffff)
USER_CURRENT
public static final int USER_CURRENT
Wartość stała: -2 (0xfffffffe)
USER_CURRENT_OR_SELF
public static final int USER_CURRENT_OR_SELF
Wartość stała: -3 (0xfffffffd)
USER_NULL
public static final int USER_NULL
Wartość stała: -10000 (0xffffd8f0)
USER_SYSTEM
public static final int USER_SYSTEM
Constant Value: 0 (0x00000000)
USER_TYPE_FULL_SECONDARY
public static final String USER_TYPE_FULL_SECONDARY
Wartość stała: "android.os.usertype.full.SECONDARY"
USER_TYPE_SHORT_SECONDARY
public static final String USER_TYPE_SHORT_SECONDARY
Wartość stała: "full.SECONDARY"
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 ()
| Zwraca | |
|---|---|
int |
|
isAdmin
public boolean isAdmin ()
| Zwraca | |
|---|---|
boolean |
|
isCloneProfile
public boolean isCloneProfile ()
| Zwraca | |
|---|---|
boolean |
|
isCommunalProfile
public boolean isCommunalProfile ()
| Zwraca | |
|---|---|
boolean |
|
isEphemeral
public boolean isEphemeral ()
| Zwraca | |
|---|---|
boolean |
|
isFlagForTesting
public boolean isFlagForTesting ()
| Zwraca | |
|---|---|
boolean |
|
isFull
public boolean isFull ()
| Zwraca | |
|---|---|
boolean |
|
isGuest
public boolean isGuest ()
| Zwraca | |
|---|---|
boolean |
|
isMain
public boolean isMain ()
Ta metoda została wycofana.
Zamiast niej używaj zasady isFull().
| Zwraca | |
|---|---|
boolean |
|
isManagedProfile
public boolean isManagedProfile ()
| Zwraca | |
|---|---|
boolean |
|
isNull
public boolean isNull ()
| Zwraca | |
|---|---|
boolean |
|
isPrimary
public boolean isPrimary ()
| Zwraca | |
|---|---|
boolean |
|
isPrivateProfile
public boolean isPrivateProfile ()
| Zwraca | |
|---|---|
boolean |
|
isRunning
public boolean isRunning ()
| Zwraca | |
|---|---|
boolean |
|
isSecondary
public boolean isSecondary ()
| Zwraca | |
|---|---|
boolean |
|
isSystem
public boolean isSystem ()
| Zwraca | |
|---|---|
boolean |
|
isUserType
public boolean isUserType (UserInfo.UserType userType, int currentUserId)
Zwraca informację, czy ta instancja jest określonego typu.
| Parametry | |
|---|---|
userType |
UserInfo.UserType |
currentUserId |
int |
| Zwraca | |
|---|---|
boolean |
|
toString
public String toString ()
| Zwraca | |
|---|---|
String |
|
userId
public int userId ()
| Zwraca | |
|---|---|
int |
|
userName
public String userName ()
| Zwraca | |
|---|---|
String |
|