UserInfo

public final class UserInfo
extends Object

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


คล้ายกับคลาส UserInfo จากแพลตฟอร์ม

ซึ่งมีจุดประสงค์ให้คล้ายกับ android.content.pm.UserInfo

จัดเก็บข้อมูลและตรรกะพื้นฐานเกี่ยวกับข้อมูลของผู้ใช้ 1 ราย

สรุป

ค่าคงที่

String CLONE_PROFILE_TYPE

String COMMUNAL_PROFILE_TYPE

int FLAGS_NOT_SECONDARY

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

String PRIVATE_PROFILE_TYPE

int USER_NULL

int USER_SYSTEM

เครื่องมือสร้างสาธารณะ

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

เมธอดสาธารณะ

int flag()
boolean isCloneProfile()
boolean isCommunalProfile()
boolean isEphemeral()
boolean isFlagForTesting()
boolean isFull()
boolean isGuest()
boolean isMain()

เลิกใช้เมธอดนี้แล้ว โปรดใช้ isFull() แทน

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

แสดงผลว่าอินสแตนซ์นี้เป็นประเภทที่ระบุหรือไม่

int userId()
String userName()

ค่าคงที่

CLONE_PROFILE_TYPE

public static final String CLONE_PROFILE_TYPE

ค่าคงที่: "profile.CLONE"

COMMUNAL_PROFILE_TYPE

public static final String COMMUNAL_PROFILE_TYPE

ค่าคงที่: "profile.COMMUNAL"

FLAGS_NOT_SECONDARY

public static final int FLAGS_NOT_SECONDARY

ค่าคงที่ 45 (0x0000002d)

FLAG_EPHEMERAL

public static final int FLAG_EPHEMERAL

ค่าคงที่ 256 (0x00000100)

FLAG_FOR_TESTING

public static final int FLAG_FOR_TESTING

ค่าคงที่ 32768 (0x00008000)

FLAG_FULL

public static final int FLAG_FULL

ค่าคงที่ 1024 (0x00000400)

FLAG_GUEST

public static final int FLAG_GUEST

ค่าคงที่ 4 (0x00000004)

FLAG_MAIN

public static final int FLAG_MAIN

ค่าคงที่: 16384 (0x00004000)

FLAG_MANAGED_PROFILE

public static final int FLAG_MANAGED_PROFILE

ค่าคงที่ 32 (0x00000020)

FLAG_PRIMARY

public static final int FLAG_PRIMARY

ค่าคงที่ 1 (0x00000001)

FLAG_PROFILE

public static final int FLAG_PROFILE

ค่าคงที่ 4096 (0x00001000)

FLAG_RESTRICTED

public static final int FLAG_RESTRICTED

ค่าคงที่ 8 (0x00000008)

PRIVATE_PROFILE_TYPE

public static final String PRIVATE_PROFILE_TYPE

ค่าคงที่: "profile.PRIVATE"

USER_NULL

public static final int USER_NULL

ค่าคงที่ -10000 (0xffffd8f0)

USER_SYSTEM

public static final int USER_SYSTEM

ค่าคงที่ 0 (0x00000000)

เครื่องมือสร้างสาธารณะ

UserInfo

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

พารามิเตอร์
userId int

userName String

flag int

isRunning boolean

UserInfo

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

พารามิเตอร์
userId int

userName String

flag int

isRunning boolean

userType String

เมธอดสาธารณะ

Flag

public int flag ()

คิกรีเทิร์น
int

isCloneProfile

public boolean isCloneProfile ()

คิกรีเทิร์น
boolean

isCommunalProfile

public boolean isCommunalProfile ()

คิกรีเทิร์น
boolean

isEphemeral

public boolean isEphemeral ()

คิกรีเทิร์น
boolean

isFlagForTesting

public boolean isFlagForTesting ()

คิกรีเทิร์น
boolean

isFull

public boolean isFull ()

คิกรีเทิร์น
boolean

isGuest

public boolean isGuest ()

คิกรีเทิร์น
boolean

isMain

public boolean isMain ()

เลิกใช้เมธอดนี้แล้ว
โปรดใช้ isFull() แทน

คิกรีเทิร์น
boolean

isManagedProfile

public boolean isManagedProfile ()

คิกรีเทิร์น
boolean

isNull

public boolean isNull ()

คิกรีเทิร์น
boolean

isPrimary

public boolean isPrimary ()

คิกรีเทิร์น
boolean

isPrivateProfile

public boolean isPrivateProfile ()

คิกรีเทิร์น
boolean

isRunning

public boolean isRunning ()

คิกรีเทิร์น
boolean

isSecondary

public boolean isSecondary ()

คิกรีเทิร์น
boolean

isSystem

public boolean isSystem ()

คิกรีเทิร์น
boolean

isUserType

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

แสดงผลว่าอินสแตนซ์นี้เป็นประเภทที่ระบุหรือไม่

พารามิเตอร์
userType UserInfo.UserType

currentUserId int

คิกรีเทิร์น
boolean

userId

public int userId ()

คิกรีเทิร์น
int

userName

public String userName ()

คิกรีเทิร์น
String