Android APIs
public class

PackageStats

extends Object
implements Parcelable
java.lang.Object
   ↳ android.content.pm.PackageStats

Class Overview

implementation of PackageStats associated with a application package.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<PackageStats> CREATOR
public long cacheSize Size of cache used by the application.
public long codeSize Size of the code (e.g., APK)
public long dataSize Size of the internal data size for the application.
public long externalCacheSize Size of the external cache used by the application (i.e., on the SD card).
public long externalCodeSize Size of the secure container on external storage holding the application's code.
public long externalDataSize Size of the external data used by the application (e.g., /Android/data/)
public long externalMediaSize Size of the external media size used by the application.
public long externalObbSize Size of the package's OBBs placed on external media.
public String packageName Name of the package to which this stats applies.
Public Constructors
PackageStats(String pkgName)
PackageStats(Parcel source)
PackageStats(PackageStats pStats)
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
String toString()
Returns a string containing a concise, human-readable description of this object.
void writeToParcel(Parcel dest, int parcelableFlags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<PackageStats> CREATOR

Added in API level 1

public long cacheSize

Added in API level 1

Size of cache used by the application. (e.g., /data/data//cache)

public long codeSize

Added in API level 1

Size of the code (e.g., APK)

public long dataSize

Added in API level 1

Size of the internal data size for the application. (e.g., /data/data/)

public long externalCacheSize

Added in API level 11

Size of the external cache used by the application (i.e., on the SD card). If this is a subdirectory of the data directory, this size will be subtracted out of the external data size.

public long externalCodeSize

Added in API level 14

Size of the secure container on external storage holding the application's code.

public long externalDataSize

Added in API level 11

Size of the external data used by the application (e.g., /Android/data/)

public long externalMediaSize

Added in API level 11

Size of the external media size used by the application.

public long externalObbSize

Added in API level 11

Size of the package's OBBs placed on external media.

public String packageName

Added in API level 1

Name of the package to which this stats applies.

Public Constructors

public PackageStats (String pkgName)

Added in API level 1

public PackageStats (Parcel source)

Added in API level 1

public PackageStats (PackageStats pStats)

Added in API level 1

Public Methods

public int describeContents ()

Added in API level 1

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public String toString ()

Added in API level 1

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

   getClass().getName() + '@' + Integer.toHexString(hashCode())

See Writing a useful toString method if you intend implementing your own toString method.

Returns
  • a printable representation of this object.

public void writeToParcel (Parcel dest, int parcelableFlags)

Added in API level 1

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
parcelableFlags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.