パッケージ情報

public class PackageInfo
extends Object

java.lang.オブジェクト
com.android.tradefed.device.PackageInfo


デバイスから解析されたアプリケーションのパッケージ情報のコンテナー。

まとめ

定数

int FLAG_PERSISTENT

パブリックメソッド

void addPerUserAttribute (int userId, String attr, String value)
String getCodePath ()

パッケージがファイルシステム内のどこにあるかを返します。

String getFirstInstallTime (int userId)
String getPackageName ()

アプリケーションのパッケージ名を返します。

String getVersionCode ()

アプリケーションのバージョン名を返します。

String getVersionName ()

アプリケーションのバージョン名を返します。

boolean isPersistentApp ()

これが永続的なアプリの場合はtrueを返します。

boolean isSystemApp ()

これがシステム アプリの場合はtrueを返します。

boolean isUpdatedSystemApp ()

これが更新されたシステム アプリの場合はtrueを返します。

定数

FLAG_PERSISTENT

public static final int FLAG_PERSISTENT

定数値: 8 (0x00000008)

パブリックメソッド

ユーザーごとの属性を追加

public void addPerUserAttribute (int userId, 
                String attr, 
                String value)

パラメーター
userId int

attr String

value String

コードパスの取得

public String getCodePath ()

パッケージがファイルシステム内のどこにあるかを返します。

戻り値
String

getFirstInstallTime

public String getFirstInstallTime (int userId)

パラメーター
userId int

戻り値
String

getパッケージ名

public String getPackageName ()

アプリケーションのパッケージ名を返します。

戻り値
String

getVersionCode

public String getVersionCode ()

アプリケーションのバージョン名を返します。注: 「versionCode」属性が見つからなかった場合、これはnullを返します。

戻り値
String

getバージョン名

public String getVersionName ()

アプリケーションのバージョン名を返します。注: froyo デバイスなどで「versionName」属性が見つからなかった場合、これはnullを返します。

戻り値
String

isPersistentApp

public boolean isPersistentApp ()

これが永続的なアプリの場合はtrueを返します。

戻り値
boolean

isSystemApp

public boolean isSystemApp ()

これがシステム アプリの場合はtrueを返します。

戻り値
boolean

isUpdatedSystemApp

public boolean isUpdatedSystemApp ()

これが更新されたシステム アプリの場合はtrueを返します。

戻り値
boolean