UserInfo

public final class UserInfo
extends Object

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


platform の 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

パブリック メソッド

フラグ

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