用戶信息

public final class UserInfo
extends Object

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


類似於平台的 UserInfo 類。

這旨在類似於 android.content.pm.UserInfo。

圍繞一個用戶的信息存儲數據和基本邏輯。

概括

常量

int FLAGS_NOT_SECONDARY

int FLAG_EPHEMERAL

int FLAG_GUEST

int FLAG_MAIN

int FLAG_MANAGED_PROFILE

int FLAG_PRIMARY

int FLAG_PROFILE

int FLAG_RESTRICTED

int USER_SYSTEM

字段

public static final String CLONE_PROFILE_TYPE

公共構造函數

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 isEphemeral ()
boolean isGuest ()
boolean isMain ()
boolean isManagedProfile ()
boolean isPrimary ()
boolean isRunning ()
boolean isSecondary ()
boolean isSystem ()
boolean isUserType ( UserInfo.UserType userType, int currentUserId)

返回此實例是否為指定類型。

int userId ()
String userName ()

常量

FLAGS_NOT_SECONDARY

public static final int FLAGS_NOT_SECONDARY

常數值:45 (0x0000002d)

FLAG_EPHEMERAL

public static final int FLAG_EPHEMERAL

常數值:256 (0x00000100)

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)

USER_SYSTEM

public static final int USER_SYSTEM

常數值:0 (0x00000000)

領域

CLONE_PROFILE_TYPE

public static final String CLONE_PROFILE_TYPE

公共構造函數

用戶信息

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

參數
userId int

userName String

flag int

isRunning boolean

用戶信息

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

參數
userId int

userName String

flag int

isRunning boolean

userType String

公共方法

旗幟

public int flag ()

退貨
int

isCloneProfile

public boolean isCloneProfile ()

退貨
boolean

是短暫的

public boolean isEphemeral ()

退貨
boolean

是客人

public boolean isGuest ()

退貨
boolean

是主要的

public boolean isMain ()

退貨
boolean

isManagedProfile

public boolean isManagedProfile ()

退貨
boolean

是主要的

public boolean isPrimary ()

退貨
boolean

在跑

public boolean isRunning ()

退貨
boolean

是次要的

public boolean isSecondary ()

退貨
boolean

是系統

public boolean isSystem ()

退貨
boolean

是用戶類型

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

返回此實例是否為指定類型。

參數
userType UserInfo.UserType

currentUserId int

退貨
boolean

用戶身份

public int userId ()

退貨
int

用戶名

public String userName ()

退貨
String