public class AssistContent extends Object implements Parcelable
Activity.onProvideAssistContent
.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<AssistContent> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
AssistContent() |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
ClipData |
getClipData()
Return the current
setClipData(android.content.ClipData) , which you can modify in-place. |
Bundle |
getExtras()
Return Bundle for extra vendor-specific data that can be modified and examined.
|
Intent |
getIntent()
Returns the current
setIntent(android.content.Intent) if one is set, else the default Intent obtained from
Activity.getIntent . |
String |
getStructuredData()
Returns the current
setStructuredData(java.lang.String) . |
Uri |
getWebUri()
Return the content's web URI as per
setWebUri(android.net.Uri) , or null if
there is none. |
boolean |
isAppProvidedIntent()
Returns whether or not the current Intent was explicitly provided in
Activity.onProvideAssistContent . |
boolean |
isAppProvidedWebUri()
Returns whether or not the current
getWebUri() was explicitly provided in
Activity.onProvideAssistContent . |
void |
setClipData(ClipData clip)
Optional additional content items that are involved with
the current UI.
|
void |
setDefaultIntent(Intent intent) |
void |
setIntent(Intent intent)
Sets the Intent associated with the content, describing the current top-level context of
the activity.
|
void |
setStructuredData(String structuredData)
Sets optional structured data regarding the content being viewed.
|
void |
setWebUri(Uri uri)
Set a web URI associated with the current data being shown to the user.
|
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public static final Parcelable.Creator<AssistContent> CREATOR
public void setDefaultIntent(Intent intent)
public void setIntent(Intent intent)
Intent.FLAG_GRANT_READ_URI_PERMISSION
so the accessibility
service can access it.public Intent getIntent()
setIntent(android.content.Intent)
if one is set, else the default Intent obtained from
Activity.getIntent
. Can be modified in-place.public boolean isAppProvidedIntent()
Activity.onProvideAssistContent
. If not,
the Intent was automatically set based on
Activity.getIntent
.public void setClipData(ClipData clip)
Intent.FLAG_GRANT_READ_URI_PERMISSION
.public ClipData getClipData()
setClipData(android.content.ClipData)
, which you can modify in-place.public void setStructuredData(String structuredData)
public String getStructuredData()
setStructuredData(java.lang.String)
.public void setWebUri(Uri uri)
Intent.ACTION_VIEW
Intent, to show the same data that is currently
being displayed by it. The URI here should be something that is transportable
off the device into other environments to acesss the same data as is currently
being shown in the app; if the app does not have such a representation, it should
leave the null and only report the local intent and clip data.public Uri getWebUri()
setWebUri(android.net.Uri)
, or null if
there is none.public boolean isAppProvidedWebUri()
getWebUri()
was explicitly provided in
Activity.onProvideAssistContent
. If not,
the Intent was automatically set based on
Activity.getIntent
.public Bundle getExtras()
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 flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.