ClassifiableContent


public final class ClassifiableContent
extends Object implements Parcelable

java.lang.Object
   ↳ android.app.contentsafety.ClassifiableContent


A class representing content to be classified.

Summary

Nested classes

class ClassifiableContent.Builder

Builder for ClassifiableContent

Inherited constants

Fields

public static final Creator<ClassifiableContent> CREATOR

Public methods

int describeContents()

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

ParcelFileDescriptor getData()

Returns a ParcelFileDescriptor containing the raw data of this content.

LocusId getId()

Returns the LocusId associated with this content.

String getMimeType()

Returns the MIME type of the content.

String getOriginatingPackageName()

Returns the package name of the app that requested the classification.

Uri getUri()

Returns the Uri associated with this content.

void writeToParcel(Parcel parcel, int flags)

Flatten this object in to a Parcel.

Inherited methods

Fields

CREATOR

Added in API level 10000
public static final Creator<ClassifiableContent> CREATOR

Public methods

describeContents

Added in API level 10000
public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getData

Added in API level 10000
public ParcelFileDescriptor getData ()

Returns a ParcelFileDescriptor containing the raw data of this content.

Returns
ParcelFileDescriptor the ParcelFileDescriptor containing the content data, or null if the raw content isn't provided

getId

Added in API level 10000
public LocusId getId ()

Returns the LocusId associated with this content.

Returns
LocusId the LocusId of the content.
This value cannot be null.

getMimeType

Added in API level 10000
public String getMimeType ()

Returns the MIME type of the content.

Returns
String the MIME type.
This value cannot be null.

getOriginatingPackageName

Added in API level 10000
public String getOriginatingPackageName ()

Returns the package name of the app that requested the classification.

Returns
String the originating package name, or null if the originating package is unknown or not provided

getUri

Added in API level 10000
public Uri getUri ()

Returns the Uri associated with this content.

Returns
Uri the content Uri, or null if this content is not associated with a Uri

writeToParcel

Added in API level 10000
public void writeToParcel (Parcel parcel, 
                int flags)

Flatten this object in to a Parcel.

Parameters
parcel Parcel: This value cannot be null.

flags int: Value is either 0 or a combination of the following: