パッケージ情報

public class PackageInfo
extends Object

java.lang.Object
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)

公開メソッド

addPerUserAttribute

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

パラメーター
userId int

attr String

value String

getCodePath

public String getCodePath ()

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

戻り値
String

getFirstInstallTime

public String getFirstInstallTime (int userId)

パラメーター
userId int

戻り値
String

getPackageName

public String getPackageName ()

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

戻り値
String

getVersionCode

public String getVersionCode ()

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

戻り値
String

getVersionName

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