使用者資訊
public final class UserInfo
extends Object
java.lang.Object |
↳ | com.android.tradefed.device.UserInfo |
類似於平台中的 UserInfo 類別。
這類似於 android.content.pm.UserInfo。
圍繞一個用戶的資訊儲存資料和基本邏輯。
概括
公共構造函數 |
---|
UserInfo (int userId, String userName, int flag, boolean isRunning) |
UserInfo (int userId, String userName, int flag, boolean isRunning, String userType) |
常數
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 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 boolean isCloneProfile ()
是短暫的
public boolean isEphemeral ()
測試標誌
public boolean isFlagForTesting ()
是客人
public boolean isGuest ()
是主
public boolean isMain ()
是託管設定檔
public boolean isManagedProfile ()
是主要的
public boolean isPrimary ()
在跑
public boolean isRunning ()
是次要的
public boolean isSecondary ()
是系統
public boolean isSystem ()
是使用者類型
public boolean isUserType (UserInfo.UserType userType,
int currentUserId)
傳回此實例是否屬於指定類型。
參數 |
---|
userType | UserInfo.UserType |
currentUserId | int |
使用者身分
public int userId ()
使用者名稱
public String userName ()