Added in API level 1

InstrumentationInfo


open class InstrumentationInfo : PackageItemInfo, Parcelable

Information you can retrieve about a particular piece of test instrumentation. This corresponds to information collected from the AndroidManifest.xml's <instrumentation> tag.

Summary

Inherited constants
Int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

Int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point.

Public methods
open Int

open String

open Unit
writeToParcel(dest: Parcel, parcelableFlags: Int)

Inherited functions
Unit dumpBack(pw: Printer!, prefix: String!)

Unit dumpFront(pw: Printer!, prefix: String!)

Drawable! loadBanner(pm: PackageManager!)

Retrieve the current graphical banner associated with this item. This will call back on the given PackageManager to load the banner from the application.

Drawable! loadIcon(pm: PackageManager!)

Retrieve the current graphical icon associated with this item. This will call back on the given PackageManager to load the icon from the application.

CharSequence loadLabel(pm: PackageManager)

Retrieve the current textual label associated with this item. This will call back on the given PackageManager to load the label from the application.

Drawable! loadLogo(pm: PackageManager!)

Retrieve the current graphical logo associated with this item. This will call back on the given PackageManager to load the logo from the application.

Drawable! loadUnbadgedIcon(pm: PackageManager!)

Retrieve the current graphical icon associated with this item without the addition of a work badge if applicable. This will call back on the given PackageManager to load the icon from the application.

XmlResourceParser! loadXmlMetaData(pm: PackageManager!, name: String!)

Load an XML resource attached to the meta-data of this item. This will retrieved the name meta-data entry, and if defined call back on the given PackageManager to load its XML file from the application.

Properties
static Parcelable.Creator<InstrumentationInfo!>

String!

Full path to a directory assigned to the package for its persistent data.

Boolean

Specifies whether or not to run this instrumentation as a functional test

Boolean

Specifies whether or not this instrumentation will handle profiling.

String!

Full path to the publicly available parts of sourceDir, including resources and manifest.

String!

Full path to the base APK for this application.

Array<String!>!

The names of all installed split APKs, ordered lexicographically.

Array<String!>!

Full path to the publicly available parts of splitSourceDirs, including resources and manifest.

Array<String!>!

Full paths to zero or more split APKs, indexed by the same order as splitNames.

String!

The name of the application package being instrumented.

String!

Names of the process(es) this instrumentation will run in.

Inherited properties
Int banner

A drawable resource identifier (in the package's resources) of this component's banner. From the "banner" attribute or, if not set, 0.

Int icon

A drawable resource identifier (in the package's resources) of this component's icon. From the "icon" attribute or, if not set, 0.

Boolean isArchived

Whether the package is currently in an archived state.

Packages can be archived through PackageInstaller.requestArchive and do not have any APKs stored on the device, but do keep the data directory.

Int labelRes

A string resource identifier (in the package's resources) of this component's label. From the "label" attribute or, if not set, 0.

Int logo

A drawable resource identifier (in the package's resources) of this component's logo. Logos may be larger/wider than icons and are displayed by certain UI elements in place of a name or name/icon combination. From the "logo" attribute or, if not set, 0.

Bundle! metaData

Additional meta-data associated with this component. This field will only be filled in if you set the PackageManager.GET_META_DATA flag when requesting the info.

String! name

Public name of this item. From the "android:name" attribute.

CharSequence! nonLocalizedLabel

The string provided in the AndroidManifest file, if any. You probably don't want to use this. You probably want PackageManager.getApplicationLabel

String! packageName

Name of the package that this item is in.

Public constructors

InstrumentationInfo

Added in API level 1
InstrumentationInfo()

InstrumentationInfo

Added in API level 1
InstrumentationInfo(orig: InstrumentationInfo!)

Public methods

describeContents

Added in API level 1
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

toString

Added in API level 1
open fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 1
open fun writeToParcel(
    dest: Parcel,
    parcelableFlags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 1
static val CREATOR: Parcelable.Creator<InstrumentationInfo!>

dataDir

Added in API level 1
var dataDir: String!

Full path to a directory assigned to the package for its persistent data.

functionalTest

Added in API level 1
var functionalTest: Boolean

Specifies whether or not to run this instrumentation as a functional test

handleProfiling

Added in API level 1
var handleProfiling: Boolean

Specifies whether or not this instrumentation will handle profiling.

publicSourceDir

Added in API level 1
var publicSourceDir: String!

Full path to the publicly available parts of sourceDir, including resources and manifest. This may be different from sourceDir if an application is forward locked.

sourceDir

Added in API level 1
var sourceDir: String!

Full path to the base APK for this application.

splitNames

Added in API level 26
var splitNames: Array<String!>!

The names of all installed split APKs, ordered lexicographically.

splitPublicSourceDirs

Added in API level 21
var splitPublicSourceDirs: Array<String!>!

Full path to the publicly available parts of splitSourceDirs, including resources and manifest. This may be different from splitSourceDirs if an application is forward locked.

See Also

splitSourceDirs

Added in API level 21
var splitSourceDirs: Array<String!>!

Full paths to zero or more split APKs, indexed by the same order as splitNames.

targetPackage

Added in API level 1
var targetPackage: String!

The name of the application package being instrumented. From the "package" attribute.

targetProcesses

Added in API level 26
var targetProcesses: String!

Names of the process(es) this instrumentation will run in. If not specified, only runs in the main process of the targetPackage. Can either be a comma-separated list of process names or '*' for any process that launches to run targetPackage code.