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 beRESULT_OKandgetMetadataList()will be populated with metadata for all available preferences within this application. - If the request is unsuccessful,
getResultCode()be a value other thanRESULT_OK- see documentation for those possibilities to understand the cause of the failure.
Summary
Nested classes | |
|---|---|
class |
MetadataResult.Builder
Builder to construct |
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 |
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
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
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(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
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
public int getResultCode ()
Returns the result code indicating status of the request.
| Returns | |
|---|---|
int |
Value is one of the following: |
writeToParcel
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:
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-02-13 UTC.