Added in API level 36

MetadataResult


class MetadataResult : Parcelable
kotlin.Any
   ↳ android.service.settings.preferences.MetadataResult

Result object given a corresponding MetadataRequest.

  • If the request was successful, getResultCode will be RESULT_OK and getMetadataList will be populated with metadata for all available preferences within this application.
  • If the request is unsuccessful, getResultCode be a value other than RESULT_OK - see documentation for those possibilities to understand the cause of the failure.

Summary

Nested classes

Builder to construct MetadataResult.

Constants
static Int

API call failed due to an issue with the service binding.

static Int

Request is successful.

static Int

No preferences in this application support this API.

Inherited constants
Public methods
Int

MutableList<SettingsPreferenceMetadata!>

Returns the list of available Preference Metadata.

Int

Returns the result code indicating status of the request.

Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<MetadataResult!>

Parcelable Creator for MetadataResult.

Constants

RESULT_INTERNAL_ERROR

Added in API level 36
static val RESULT_INTERNAL_ERROR: Int

API call failed due to an issue with the service binding.

Retry may succeed.

Value: 2

RESULT_OK

Added in API level 36
static val RESULT_OK: Int

Request is successful.

Value: 0

RESULT_UNSUPPORTED

Added in API level 36
static val RESULT_UNSUPPORTED: Int

No preferences in this application support this API.

Retry not advised.

Value: 1

Public methods

describeContents

Added in API level 36
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getMetadataList

Added in API level 36
fun getMetadataList(): MutableList<SettingsPreferenceMetadata!>

Returns the list of available Preference Metadata.

This instance is shared so this list should not be modified.

getResultCode

Added in API level 36
fun getResultCode(): Int

Returns the result code indicating status of the request.

Return
Int Value is one of the following:

writeToParcel

Added in API level 36
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
Parameters
dest Parcel: 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:

Properties

CREATOR

Added in API level 36
static val CREATOR: Parcelable.Creator<MetadataResult!>

Parcelable Creator for MetadataResult.