public class ResolveInfo extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
ResolveInfo.DisplayNameComparator |
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
ActivityInfo |
activityInfo
The activity or broadcast receiver that corresponds to this resolution
match, if this resolution is for an activity or broadcast receiver.
|
static Parcelable.Creator<ResolveInfo> |
CREATOR |
EphemeralResolveInfo |
ephemeralResolveInfo
The ephemeral application that corresponds to this resolution match.
|
IntentFilter |
filter
The IntentFilter that was matched for this ResolveInfo.
|
boolean |
handleAllWebDataURI |
int |
icon
A drawable resource identifier (in the package's resources) of this
match's icon.
|
int |
iconResourceId
Same as
icon but it will always correspond to "icon" attribute
regardless of noResourceId value. |
boolean |
isDefault
This filter has specified the Intent.CATEGORY_DEFAULT, meaning it
would like to be considered a default action that the user can
perform on this data.
|
int |
labelRes
A string resource identifier (in the package's resources) of this
match's label.
|
int |
match
The system's evaluation of how well the activity matches the
IntentFilter.
|
CharSequence |
nonLocalizedLabel
The actual string retrieve from labelRes or null if none
was provided.
|
boolean |
noResourceId
Set to true if the icon cannot be obtained by resource ids alone.
|
int |
preferredOrder
Order of result according to the user's preference.
|
int |
priority
The declared priority of this match.
|
ProviderInfo |
providerInfo
The provider that corresponds to this resolution match, if this
resolution is for a provider.
|
String |
resolvePackageName
|
ServiceInfo |
serviceInfo
The service that corresponds to this resolution match, if this resolution
is for a service.
|
int |
specificIndex
Only set when returned by
PackageManager.queryIntentActivityOptions(android.content.ComponentName, android.content.Intent[], android.content.Intent, int) , this tells you
which of the given specific intents this result came from. 0 is the
first in the list, < 0 means it came from the generic Intent query. |
boolean |
system |
int |
targetUserId
If not equal to UserHandle.USER_CURRENT, then the intent will be forwarded to this user.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
ResolveInfo() |
ResolveInfo(ResolveInfo orig) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
void |
dump(Printer pw,
String prefix) |
void |
dump(Printer pw,
String prefix,
int flags) |
ComponentInfo |
getComponentInfo() |
int |
getIconResource()
Return the icon resource identifier to use for this match.
|
Drawable |
loadIcon(PackageManager pm)
Retrieve the current graphical icon associated with this resolution.
|
CharSequence |
loadLabel(PackageManager pm)
Retrieve the current textual label associated with this resolution.
|
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel dest,
int parcelableFlags)
Flatten this object in to a Parcel.
|
public ActivityInfo activityInfo
activityInfo
, serviceInfo
, or
providerInfo
will be non-null.public ServiceInfo serviceInfo
activityInfo
,
serviceInfo
, or providerInfo
will be non-null.public ProviderInfo providerInfo
activityInfo
,
serviceInfo
, or providerInfo
will be non-null.public EphemeralResolveInfo ephemeralResolveInfo
public IntentFilter filter
public int priority
public int preferredOrder
public int match
IntentFilter.MATCH_CATEGORY_MASK
and IntentFiler.MATCH_ADJUSTMENT_MASK
.public int specificIndex
PackageManager.queryIntentActivityOptions(android.content.ComponentName, android.content.Intent[], android.content.Intent, int)
, this tells you
which of the given specific intents this result came from. 0 is the
first in the list, < 0 means it came from the generic Intent query.public boolean isDefault
public int labelRes
public CharSequence nonLocalizedLabel
public int icon
public String resolvePackageName
public int targetUserId
public boolean noResourceId
public int iconResourceId
icon
but it will always correspond to "icon" attribute
regardless of noResourceId
value.public boolean system
public boolean handleAllWebDataURI
public static final Parcelable.Creator<ResolveInfo> CREATOR
public ResolveInfo()
public ResolveInfo(ResolveInfo orig)
public ComponentInfo getComponentInfo()
public CharSequence loadLabel(PackageManager pm)
pm
- A PackageManager from which the label can be loaded; usually
the PackageManager from which you originally retrieved this item.public Drawable loadIcon(PackageManager pm)
pm
- A PackageManager from which the icon can be loaded; usually
the PackageManager from which you originally retrieved this item.public final int getIconResource()
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int parcelableFlags)
Parcelable
writeToParcel
in interface Parcelable
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.PARCELABLE_WRITE_RETURN_VALUE
.