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 |
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 |
LocusId
|
getId()
Returns the |
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 |
void
|
writeToParcel(Parcel parcel, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
|---|---|
Fields
Public methods
describeContents
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
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
public LocusId getId ()
Returns the LocusId associated with this content.
| Returns | |
|---|---|
LocusId |
the LocusId of the content.
This value cannot be null. |
getMimeType
public String getMimeType ()
Returns the MIME type of the content.
| Returns | |
|---|---|
String |
the MIME type.
This value cannot be null. |
getOriginatingPackageName
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
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
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:
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-08-14 UTC.