UserInfo

public final class UserInfo
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.UserInfo


Ähnlich der UserInfo-Klasse der Plattform.

Dies soll android.content.pm.UserInfo ähneln.

Speichert Daten und grundlegende Logik zu den Informationen für einen Nutzer.

Zusammenfassung

Konstanten

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

Ö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 isAdmin()
boolean isCloneProfile()
boolean isCommunalProfile()
boolean isEphemeral()
boolean isFlagForTesting()
boolean isFull()
boolean isGuest()
boolean isMain()

Diese Methode wurde eingestellt. Verwenden Sie stattdessen isFull().

boolean isManagedProfile()
boolean isNull()
boolean isPrimary()
boolean isPrivateProfile()
boolean isRunning()
boolean isSecondary()
boolean isSystem()
boolean isUserType(UserInfo.UserType userType, int currentUserId)

Gibt zurück, ob diese Instanz vom angegebenen Typ ist.

String toString()
int userId()
String userName()

Konstanten

CLONE_PROFILE_TYPE

public static final String CLONE_PROFILE_TYPE

Konstanter Wert: "profile.CLONE"

COMMUNAL_PROFILE_TYPE

public static final String COMMUNAL_PROFILE_TYPE

Konstanter Wert: "profile.COMMUNAL"

FLAGS_NOT_SECONDARY

public static final int FLAGS_NOT_SECONDARY

Konstanter Wert: 45 (0x0000002d)

FLAG_ADMIN

public static final int FLAG_ADMIN

Konstanter Wert: 2 (0x00000002)

FLAG_EPHEMERAL

public static final int FLAG_EPHEMERAL

Konstanter Wert: 256 (0x00000100)

FLAG_FOR_TESTING

public static final int FLAG_FOR_TESTING

Konstanter Wert: 32768 (0x00008000)

FLAG_FULL

public static final int FLAG_FULL

Konstanter Wert: 1024 (0x00000400)

FLAG_GUEST

public static final int FLAG_GUEST

Konstanter Wert: 4 (0x00000004)

FLAG_MAIN

public static final int FLAG_MAIN

Konstanter Wert: 16384 (0x00004000)

FLAG_MANAGED_PROFILE

public static final int FLAG_MANAGED_PROFILE

Konstanter Wert: 32 (0x00000020)

FLAG_PRIMARY

public static final int FLAG_PRIMARY

Konstanter Wert: 1 (0x00000001)

FLAG_PROFILE

public static final int FLAG_PROFILE

Konstanter Wert: 4096 (0x00001000)

FLAG_RESTRICTED

public static final int FLAG_RESTRICTED

Konstanter Wert: 8 (0x00000008)

PER_USER_RANGE

public static final int PER_USER_RANGE

Konstanter Wert: 100000 (0x000186a0)

PRIVATE_PROFILE_TYPE

public static final String PRIVATE_PROFILE_TYPE

Konstanter Wert: "profile.PRIVATE"

USER_ALL

public static final int USER_ALL

Konstanter Wert: -1 (0xffffffff)

USER_CURRENT

public static final int USER_CURRENT

Konstanter Wert: -2 (0xfffffffe)

USER_CURRENT_OR_SELF

public static final int USER_CURRENT_OR_SELF

Konstanter Wert: -3 (0xfffffffd)

USER_NULL

public static final int USER_NULL

Konstanter Wert: -10000 (0xffffd8f0)

USER_SYSTEM

public static final int USER_SYSTEM

Konstanter Wert: 0 (0x00000000)

USER_TYPE_FULL_SECONDARY

public static final String USER_TYPE_FULL_SECONDARY

Konstanter Wert: "android.os.usertype.full.SECONDARY"

USER_TYPE_SHORT_SECONDARY

public static final String USER_TYPE_SHORT_SECONDARY

Konstanter Wert: "full.SECONDARY"

Öffentliche Konstruktoren

UserInfo

public UserInfo (int userId, 
                String userName, 
                int flag, 
                boolean isRunning)

Parameter
userId int

userName String

flag int

isRunning boolean

UserInfo

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

Flag

public int flag ()

Gibt Folgendes zurück:
int

isAdmin

public boolean isAdmin ()

Gibt Folgendes zurück:
boolean

isCloneProfile

public boolean isCloneProfile ()

Gibt Folgendes zurück:
boolean

isCommunalProfile

public boolean isCommunalProfile ()

Gibt Folgendes zurück:
boolean

isEphemeral

public boolean isEphemeral ()

Gibt Folgendes zurück:
boolean

isFlagForTesting

public boolean isFlagForTesting ()

Gibt Folgendes zurück:
boolean

isFull

public boolean isFull ()

Gibt Folgendes zurück:
boolean

isGuest

public boolean isGuest ()

Gibt Folgendes zurück:
boolean

isMain

public boolean isMain ()

Diese Methode wurde eingestellt.
Verwenden Sie stattdessen isFull().

Gibt Folgendes zurück:
boolean

isManagedProfile

public boolean isManagedProfile ()

Gibt Folgendes zurück:
boolean

isNull

public boolean isNull ()

Gibt Folgendes zurück:
boolean

isPrimary

public boolean isPrimary ()

Gibt Folgendes zurück:
boolean

isPrivateProfile

public boolean isPrivateProfile ()

Gibt Folgendes zurück:
boolean

isRunning

public boolean isRunning ()

Gibt Folgendes zurück:
boolean

isSecondary

public boolean isSecondary ()

Gibt Folgendes zurück:
boolean

isSystem

public boolean isSystem ()

Gibt Folgendes zurück:
boolean

isUserType

public boolean isUserType (UserInfo.UserType userType, 
                int currentUserId)

Gibt zurück, ob diese Instanz vom angegebenen Typ ist.

Parameter
userType UserInfo.UserType

currentUserId int

Gibt Folgendes zurück:
boolean

toString

public String toString ()

Gibt Folgendes zurück:
String

userId

public int userId ()

Gibt Folgendes zurück:
int

userName

public String userName ()

Gibt Folgendes zurück:
String