public final class ResolverActivity.DisplayResolveInfo extends Object implements ResolverActivity.TargetInfo
Constructor and Description |
---|
DisplayResolveInfo(Intent originalIntent,
ResolveInfo pri,
CharSequence pLabel,
CharSequence pInfo,
Intent pOrigIntent) |
Modifier and Type | Method and Description |
---|---|
void |
addAlternateSourceIntent(Intent alt) |
ResolverActivity.TargetInfo |
cloneFilledIn(Intent fillInIntent,
int flags)
Clone this target with the given fill-in information.
|
List<Intent> |
getAllSourceIntents() |
CharSequence |
getBadgeContentDescription() |
Drawable |
getBadgeIcon() |
Drawable |
getDisplayIcon() |
CharSequence |
getDisplayLabel()
Return the human-readable text label for this target.
|
CharSequence |
getExtendedInfo()
Return any extended info for this target.
|
ComponentName |
getResolvedComponentName()
Get the resolved component name that represents this target.
|
Intent |
getResolvedIntent()
Get the resolved intent that represents this target.
|
ResolveInfo |
getResolveInfo()
Return the ResolveInfo about how and why this target matched the original query
for available targets.
|
boolean |
hasDisplayIcon() |
boolean |
isPinned() |
void |
setDisplayIcon(Drawable icon) |
void |
setPinned(boolean pinned) |
boolean |
start(Activity activity,
Bundle options)
Start the activity referenced by this target.
|
boolean |
startAsCaller(Activity activity,
Bundle options,
int userId)
Start the activity referenced by this target as if the ResolverActivity's caller
was performing the start operation.
|
boolean |
startAsUser(Activity activity,
Bundle options,
UserHandle user)
Start the activity referenced by this target as a given user.
|
public DisplayResolveInfo(Intent originalIntent, ResolveInfo pri, CharSequence pLabel, CharSequence pInfo, Intent pOrigIntent)
public ResolveInfo getResolveInfo()
ResolverActivity.TargetInfo
getResolveInfo
in interface ResolverActivity.TargetInfo
public CharSequence getDisplayLabel()
ResolverActivity.TargetInfo
getDisplayLabel
in interface ResolverActivity.TargetInfo
public Drawable getDisplayIcon()
getDisplayIcon
in interface ResolverActivity.TargetInfo
public Drawable getBadgeIcon()
getBadgeIcon
in interface ResolverActivity.TargetInfo
public CharSequence getBadgeContentDescription()
getBadgeContentDescription
in interface ResolverActivity.TargetInfo
public ResolverActivity.TargetInfo cloneFilledIn(Intent fillInIntent, int flags)
ResolverActivity.TargetInfo
cloneFilledIn
in interface ResolverActivity.TargetInfo
public List<Intent> getAllSourceIntents()
getAllSourceIntents
in interface ResolverActivity.TargetInfo
public void addAlternateSourceIntent(Intent alt)
public void setDisplayIcon(Drawable icon)
public boolean hasDisplayIcon()
public CharSequence getExtendedInfo()
ResolverActivity.TargetInfo
getExtendedInfo
in interface ResolverActivity.TargetInfo
public Intent getResolvedIntent()
ResolverActivity.TargetInfo
start
methods provided;
this is the intent that will be credited with the launch.getResolvedIntent
in interface ResolverActivity.TargetInfo
public ComponentName getResolvedComponentName()
ResolverActivity.TargetInfo
start
methods provided; this is the component that will be credited with the launch.getResolvedComponentName
in interface ResolverActivity.TargetInfo
public boolean start(Activity activity, Bundle options)
ResolverActivity.TargetInfo
start
in interface ResolverActivity.TargetInfo
activity
- calling Activity performing the launchoptions
- ActivityOptions bundlepublic boolean startAsCaller(Activity activity, Bundle options, int userId)
ResolverActivity.TargetInfo
startAsCaller
in interface ResolverActivity.TargetInfo
activity
- calling Activity (actually) performing the launchoptions
- ActivityOptions bundleuserId
- userId to start as or UserHandle.USER_NULL
for activity's callerpublic boolean startAsUser(Activity activity, Bundle options, UserHandle user)
ResolverActivity.TargetInfo
startAsUser
in interface ResolverActivity.TargetInfo
activity
- calling activity performing the launchoptions
- ActivityOptions bundleuser
- handle for the user to start the activity aspublic boolean isPinned()
isPinned
in interface ResolverActivity.TargetInfo
public void setPinned(boolean pinned)