PackageInfo

public class PackageInfo
extends Object

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


Container for an application's package info parsed from device.

Summary

Constants

int FLAG_PERSISTENT

Public methods

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

Returns where the package is located in the filesystem.

String getFirstInstallTime(int userId)
String getPackageName()

Returns the package name of the application.

String getVersionCode()

Returns the version name of the application.

String getVersionName()

Returns the version name of the application.

boolean isPersistentApp()

Returns true if this is a persistent app.

boolean isSystemApp()

Returns true if this is a system app.

boolean isUpdatedSystemApp()

Returns true if this is a system app that has been updated.

Constants

FLAG_PERSISTENT

public static final int FLAG_PERSISTENT

Constant Value: 8 (0x00000008)

Public methods

addPerUserAttribute

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

Parameters
userId int

attr String

value String

getCodePath

public String getCodePath ()

Returns where the package is located in the filesystem.

Returns
String

getFirstInstallTime

public String getFirstInstallTime (int userId)

Parameters
userId int

Returns
String

getPackageName

public String getPackageName ()

Returns the package name of the application.

Returns
String

getVersionCode

public String getVersionCode ()

Returns the version name of the application. Note: this will return null if 'versionCode' attribute was not found

Returns
String

getVersionName

public String getVersionName ()

Returns the version name of the application. Note: this will return null if 'versionName' attribute was not found, such as on froyo devices.

Returns
String

isPersistentApp

public boolean isPersistentApp ()

Returns true if this is a persistent app.

Returns
boolean

isSystemApp

public boolean isSystemApp ()

Returns true if this is a system app.

Returns
boolean

isUpdatedSystemApp

public boolean isUpdatedSystemApp ()

Returns true if this is a system app that has been updated.

Returns
boolean