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

Fields

public static final Creator<MetadataResult> CREATOR

Parcelable Creator for MetadataResult.

Public methods

int describeContents()

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

List<SettingsPreferenceMetadata> getMetadataList()

Returns the list of available Preference Metadata.

int getResultCode()

Returns the result code indicating status of the request.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

RESULT_INTERNAL_ERROR

Added in API level 36
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

Added in API level 36
public static final int RESULT_OK

Request is successful.

Constant Value: 0 (0x00000000)

RESULT_UNSUPPORTED

Added in API level 36
public static final int RESULT_UNSUPPORTED

No preferences in this application support this API.

Retry not advised.

Constant Value: 1 (0x00000001)

Fields

CREATOR

Added in API level 36
public static final Creator<MetadataResult> CREATOR

Parcelable Creator for MetadataResult.

Public methods

describeContents

Added in API level 36
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(android.os.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

getMetadataList

Added in API level 36
public List<SettingsPreferenceMetadata> getMetadataList ()

Returns the list of available Preference Metadata.

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

Returns
List<SettingsPreferenceMetadata>

getResultCode

Added in API level 36
public int getResultCode ()

Returns the result code indicating status of the request.

Returns
int Value is one of the following:

writeToParcel

Added in API level 36
public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

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.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following: