Known Direct Subclasses
|
Known Indirect Subclasses
|
Class Overview
Base class containing information common to all package items held by
the package manager. This provides a very common basic set of attributes:
a label, icon, and meta-data. This class is not intended
to be used by itself; it is simply here to share common definitions
between all items returned by the package manager. As such, it does not
itself implement Parcelable, but does provide convenience methods to assist
in the implementation of Parcelable in subclasses.
Summary
Nested Classes |
class |
PackageItemInfo.DisplayNameComparator |
|
Fields |
public
int |
icon |
A drawable resource identifier (in the package's resources) of this
component's icon. |
public
int |
labelRes |
A string resource identifier (in the package's resources) of this
component's label. |
public
Bundle |
metaData |
Additional meta-data associated with this component. |
public
String |
name |
Public name of this item. |
public
CharSequence |
nonLocalizedLabel |
The string provided in the AndroidManifest file, if any. |
public
String |
packageName |
Name of the package that this item is in. |
[Expand]
Inherited Methods |
From class java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Is called before the object's memory is being reclaimed by the VM.
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class which represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
|
Fields
public
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.
public
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.
public
Bundle
metaData
Additional meta-data associated with this component. This field
will only be filled in if you set the
GET_META_DATA
flag when requesting the info.
Public name of this item. From the "android:name" attribute.
public
String
packageName
Name of the package that this item is in.
Public Constructors
public
PackageItemInfo
()
Protected Constructors
protected
PackageItemInfo
(Parcel source)
Public Methods
Retrieve the current graphical icon associated with this item. This
will call back on the given PackageManager to load the icon from
the application.
Parameters
pm
| A PackageManager from which the icon can be loaded; usually
the PackageManager from which you originally retrieved this item. |
Returns
- Returns a Drawable containing the item's icon. If the
item does not have an icon, the item's default icon is returned
such as the default activity icon.
Retrieve the current textual label associated with this item. This
will call back on the given PackageManager to load the label from
the application.
Parameters
pm
| A PackageManager from which the label can be loaded; usually
the PackageManager from which you originally retrieved this item. |
Returns
- Returns a CharSequence containing the item's label. If the
item does not have a label, its name is returned.
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.
Parameters
pm
| A PackageManager from which the XML can be loaded; usually
the PackageManager from which you originally retrieved this item. |
name
| Name of the meta-date you would like to load. |
Returns
- Returns an XmlPullParser you can use to parse the XML file
assigned as the given meta-data. If the meta-data name is not defined
or the XML resource could not be found, null is returned.
public
void
writeToParcel
(Parcel dest, int parcelableFlags)
Protected Methods