UserInfo
  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
      
  | 
  
    public
    static
    final
    String | 
    
      PRIVATE_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
     | 
  
    
      
      isPrivateProfile()
      
      
     | 
  
        
        
        
        
        
        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_TESTING
public static final int FLAG_FOR_TESTING
常數值: 32768 (0x00008000)
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
COMMUNAL_PROFILE_TYPE
public static final String COMMUNAL_PROFILE_TYPE
PRIVATE_PROFILE_TYPE
public static final String PRIVATE_PROFILE_TYPE
公用建構函式
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 | 
        |
isGuest
public boolean isGuest ()
| 傳回 | |
|---|---|
boolean | 
        |
isMain
public boolean isMain ()
| 傳回 | |
|---|---|
boolean | 
        |
isManagedProfile
public boolean isManagedProfile ()
| 傳回 | |
|---|---|
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 | 
        |