Nutzerinformationen
public
final
class
UserInfo
extends Object
java.lang.Object | |
😎 | com.android.tradefed.device.UserInfo |
Ähnlich wie die UserInfo-Klasse der Plattform.
Dies ähnelt android.content.pm.UserInfo.
Speichert Daten und grundlegende Logik rund um die Informationen für einen Nutzer.
Zusammenfassung
Konstanten | |
---|---|
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
|
Felder | |
---|---|
public
static
final
String |
CLONE_PROFILE_TYPE
|
public
static
final
String |
COMMUNAL_PROFILE_TYPE
|
public
static
final
String |
PRIVATE_PROFILE_TYPE
|
Öffentliche Konstruktoren | |
---|---|
UserInfo(int userId, String userName, int flag, boolean isRunning)
|
|
UserInfo(int userId, String userName, int flag, boolean isRunning, String userType)
|
Öffentliche Methoden | |
---|---|
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)
Gibt zurück, ob diese Instanz den angegebenen Typ hat. |
int
|
userId()
|
String
|
userName()
|
Konstanten
FLAGGEN_NICHT_Sekundär
public static final int FLAGS_NOT_SECONDARY
Konstantenwert: 45 (0x0000002d)
FLAG_EPHEMERAL
public static final int FLAG_EPHEMERAL
Konstantenwert: 256 (0x00000100)
FLAG_FOR_TESTING
public static final int FLAG_FOR_TESTING
Konstantenwert: 32768 (0x00008000)
FLAG_GAST
public static final int FLAG_GUEST
Konstantenwert: 4. (0x00000004)
FLAG_MAIN
public static final int FLAG_MAIN
Konstantenwert: 16384 (0x00004000)
FLAG_MANAGED_PROFILE
public static final int FLAG_MANAGED_PROFILE
Konstantenwert: 32 (0x00000020)
FLAG_PRIMARY
public static final int FLAG_PRIMARY
Konstantenwert: 1. (0x00000001)
FLAG_PROFILE
public static final int FLAG_PROFILE
Konstantenwert: 4096 (0x00001000)
FLAG_EINGESCHRÄNKT
public static final int FLAG_RESTRICTED
Konstantenwert: 8 (0x00000008)
NUTZERSYSTEM
public static final int USER_SYSTEM
Konstantenwert: 0 (0x00000000)
Felder
CLONE_PROFILE_TYPE (CLONE_PROFILE_TYPE)
public static final String CLONE_PROFILE_TYPE
COMMUNAL_PROFILE_TYPE (COMMUNAL_PROFILE_TYPE)
public static final String COMMUNAL_PROFILE_TYPE
PRIVATE_PROFILE_TYPE
public static final String PRIVATE_PROFILE_TYPE
Öffentliche Konstruktoren
Nutzerinformationen
public UserInfo (int userId, String userName, int flag, boolean isRunning)
Parameter | |
---|---|
userId |
int |
userName |
String |
flag |
int |
isRunning |
boolean |
Nutzerinformationen
public UserInfo (int userId, String userName, int flag, boolean isRunning, String userType)
Parameter | |
---|---|
userId |
int |
userName |
String |
flag |
int |
isRunning |
boolean |
userType |
String |
Öffentliche Methoden
Melden
public int flag ()
Returns | |
---|---|
int |
isKlonProfil
public boolean isCloneProfile ()
Returns | |
---|---|
boolean |
isCommunalProfile
public boolean isCommunalProfile ()
Returns | |
---|---|
boolean |
ist sitzungsspezifisch
public boolean isEphemeral ()
Returns | |
---|---|
boolean |
isFlagForTesting (IsFlagForTesting)
public boolean isFlagForTesting ()
Returns | |
---|---|
boolean |
isGuest
public boolean isGuest ()
Returns | |
---|---|
boolean |
istHaupt
public boolean isMain ()
Returns | |
---|---|
boolean |
isManagedProfile
public boolean isManagedProfile ()
Returns | |
---|---|
boolean |
istprimär
public boolean isPrimary ()
Returns | |
---|---|
boolean |
isPrivateProfile
public boolean isPrivateProfile ()
Returns | |
---|---|
boolean |
wird ausgeführt
public boolean isRunning ()
Returns | |
---|---|
boolean |
istSekundär
public boolean isSecondary ()
Returns | |
---|---|
boolean |
isSystem
public boolean isSystem ()
Returns | |
---|---|
boolean |
isUserType (isUserType)
public boolean isUserType (UserInfo.UserType userType, int currentUserId)
Gibt zurück, ob diese Instanz den angegebenen Typ hat.
Parameter | |
---|---|
userType |
UserInfo.UserType |
currentUserId |
int |
Returns | |
---|---|
boolean |
Nutzer-ID
public int userId ()
Returns | |
---|---|
int |
Nutzername
public String userName ()
Returns | |
---|---|
String |