ContentClassificationResult
class ContentClassificationResult : Parcelable
| kotlin.Any | |
| ↳ | android.app.contentsafety.ContentClassificationResult |
A result reported by a Content Safety app in response to a content classification request.
Summary
| Constants | |
|---|---|
| static Int |
Indicates that the content is allowed. |
| static Int |
Indicates that the content should be blocked. |
| static Int |
Indicates that the content could not be classified. |
| static Int |
Indicates that a warning should be issued for the content. |
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
ContentClassificationResult(locusId: LocusId, type: Int)Creates a new content classification result. |
|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| LocusId |
Returns the |
| Int |
getType()Returns the classification type of the content. |
| Unit |
writeToParcel(parcel: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<ContentClassificationResult!> | |
Constants
TYPE_ALLOWED
static val TYPE_ALLOWED: Int
Indicates that the content is allowed.
Value: 1TYPE_BLOCKED
static val TYPE_BLOCKED: Int
Indicates that the content should be blocked.
Value: 3TYPE_UNCLASSIFIED
static val TYPE_UNCLASSIFIED: Int
Indicates that the content could not be classified.
Value: 0TYPE_WARNING
static val TYPE_WARNING: Int
Indicates that a warning should be issued for the content.
Value: 2Public constructors
ContentClassificationResult
ContentClassificationResult(
locusId: LocusId,
type: Int)
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
fun describeContents(): Int
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.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
getLocusId
fun getLocusId(): LocusId
Returns the LocusId of the content that was classified.
| Return | |
|---|---|
LocusId |
the LocusId This value cannot be null. |
getType
fun getType(): Int
Returns the classification type of the content.
| Return | |
|---|---|
Int |
the classification type. Value is one of the following: |
writeToParcel
fun writeToParcel(
parcel: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
The Parcel in which the object should be written. This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|
parcel |
Parcel: This value cannot be null. |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<ContentClassificationResult!>