ContentClassificationResult
public
final
class
ContentClassificationResult
extends Object
implements
Parcelable
| java.lang.Object | |
| ↳ | android.app.contentsafety.ContentClassificationResult |
A result reported by a Content Safety app in response to a content classification request.
Summary
Constants | |
|---|---|
int |
TYPE_ALLOWED
Indicates that the content is allowed. |
int |
TYPE_BLOCKED
Indicates that the content should be blocked. |
int |
TYPE_UNCLASSIFIED
Indicates that the content could not be classified. |
int |
TYPE_WARNING
Indicates that a warning should be issued for the content. |
Inherited constants |
|---|
Fields | |
|---|---|
public
static
final
Creator<ContentClassificationResult> |
CREATOR
|
Public constructors | |
|---|---|
ContentClassificationResult(LocusId locusId, int type)
Creates a new content classification result. |
|
Public methods | |
|---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
LocusId
|
getLocusId()
Returns the |
int
|
getType()
Returns the classification type of the content. |
void
|
writeToParcel(Parcel parcel, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
|---|---|
Constants
TYPE_ALLOWED
public static final int TYPE_ALLOWED
Indicates that the content is allowed.
Constant Value: 1 (0x00000001)
TYPE_BLOCKED
public static final int TYPE_BLOCKED
Indicates that the content should be blocked.
Constant Value: 3 (0x00000003)
TYPE_UNCLASSIFIED
public static final int TYPE_UNCLASSIFIED
Indicates that the content could not be classified.
Constant Value: 0 (0x00000000)
TYPE_WARNING
public static final int TYPE_WARNING
Indicates that a warning should be issued for the content.
Constant Value: 2 (0x00000002)
Fields
Public constructors
ContentClassificationResult
public ContentClassificationResult (LocusId locusId, int type)
Creates a new content classification result.
| Parameters | |
|---|---|
locusId |
LocusId: the LocusId of the content that was classified.
This value cannot be null. |
type |
int: the classification type of the content.
Value is one of the following: |
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
|
getLocusId
public LocusId getLocusId ()
Returns the LocusId of the content that was classified.
| Returns | |
|---|---|
LocusId |
the LocusId
This value cannot be null. |
getType
public int getType ()
Returns the classification type of the content.
| Returns | |
|---|---|
int |
the classification type.
Value is one of the following: |
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: Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:
|