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 | |
|---|---|
List<SettingsPreferenceMetadata> | getMetadataList() Returns the list of available Preference Metadata. |
int | getResultCode() Returns the result code indicating status of the request. |
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
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 RESULT_OK, RESULT_UNSUPPORTED, or RESULT_INTERNAL_ERROR |
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 2025-03-13 UTC.