MetadataResult


public final class MetadataResult
extends Object implements Parcelable

java.lang.Object
   ↳ 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

class MetadataResult.Builder

Builder to construct MetadataResult

Constants

int RESULT_INTERNAL_ERROR

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

int RESULT_OK

Request is successful.

int RESULT_UNSUPPORTED

No preferences in this application support this API.

Inherited constants

int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel(Parcel, int): the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)".

Fields

public static final Creator<MetadataResult> CREATOR

Parcelable Creator for MetadataResult.

Public methods

List<SettingsPreferenceMetadata> getMetadataList()

Returns the list of available Preference Metadata.

int getResultCode()

Returns the result code indicating status of the request.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

abstract int describeContents()

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

abstract void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Constants

RESULT_INTERNAL_ERROR

public static final int RESULT_INTERNAL_ERROR

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

Retry may succeed.

Constant Value: 2 (0x00000002)

RESULT_OK

public static final int RESULT_OK

Request is successful.

Constant Value: 0 (0x00000000)

RESULT_UNSUPPORTED

public static final int RESULT_UNSUPPORTED

No preferences in this application support this API.

Retry not advised.

Constant Value: 1 (0x00000001)

Fields

CREATOR

public static final Creator<MetadataResult> CREATOR

Parcelable Creator for MetadataResult.

Public methods

getMetadataList

public List<SettingsPreferenceMetadata> getMetadataList ()

Returns the list of available Preference Metadata.

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

getResultCode

public int getResultCode ()

Returns the result code indicating status of the request.