使用者資訊

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_FOR_TESTING

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

public static final String COMMUNAL_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 isCommunalProfile ()
boolean isEphemeral ()
boolean isFlagForTesting ()
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_FOR_測試

public static final int FLAG_FOR_TESTING

常數值:32768 (0x00008000)

FLAG_GUEST

public static final int FLAG_GUEST

常數值:4 (0x00000004)

標誌_主

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)

標誌_設定檔

public static final int FLAG_PROFILE

常數值:4096 (0x00001000)

FLAG_RESTRICTED

public static final int FLAG_RESTRICTED

常量值:8 (0x00000008)

使用者係統

public static final int USER_SYSTEM

常量值:0 (0x00000000)

領域

克隆_設定檔_類型

public static final String CLONE_PROFILE_TYPE

公共設定檔類型

public static final String COMMUNAL_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

是克隆配置文件

public boolean isCloneProfile ()

退貨
boolean

是公共設定檔

public boolean isCommunalProfile ()

退貨
boolean

是短暫的

public boolean isEphemeral ()

退貨
boolean

測試標誌

public boolean isFlagForTesting ()

退貨
boolean

是客人

public boolean isGuest ()

退貨
boolean

是主

public boolean isMain ()

退貨
boolean

是託管設定檔

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