GetValueResult
class GetValueResult : Parcelable
| kotlin.Any | |
| ↳ | android.service.settings.preferences.GetValueResult | 
Result object given a corresponding GetValueRequest. 
      
- If the request was successful, getResultCodewill beRESULT_OK,getValuewill be populated with the settings preference value andgetMetadatawill be populated with its metadata.
- If the request is unsuccessful, getResultCodebe a value other thanRESULT_OK- see documentation for those possibilities to understand the cause of the failure.
Summary
| Nested classes | |
|---|---|
| Builder to construct  | |
| Constants | |
|---|---|
| static Int | Requested preference is not allowed for access in this API under the current device policy. | 
| static Int | API call failed due to an issue with the service binding. | 
| static Int | Request object is not valid. | 
| static Int | Request is successful. | 
| static Int | Requested preference requires permissions not held by the calling application. | 
| static Int | Preference is currently not available, likely due to device state or the state of a dependency. | 
| static Int | Requested preference is not supported by this API. | 
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| SettingsPreferenceMetadata? | Returns the metadata of requested Preference if request successful. | 
| Int | Returns the result code indicating status of the request. | 
| SettingsPreferenceValue? | getValue()Returns the value of requested Preference if request successful. | 
| Properties | |
|---|---|
| static Parcelable.Creator<GetValueResult!> | Parcelable Creator for  | 
Constants
RESULT_DISALLOW
static val RESULT_DISALLOW: Int
Requested preference is not allowed for access in this API under the current device policy.
Retry may succeed if underlying conditions change.
Value: 4RESULT_INTERNAL_ERROR
static val RESULT_INTERNAL_ERROR: Int
API call failed due to an issue with the service binding.
Retry may succeed.
Value: 6RESULT_INVALID_REQUEST
static val RESULT_INVALID_REQUEST: Int
Request object is not valid.
Retry not advised with current parameters.
Value: 5RESULT_REQUIRE_APP_PERMISSION
static val RESULT_REQUIRE_APP_PERMISSION: Int
Requested preference requires permissions not held by the calling application.
Retry may succeed if necessary permissions are obtained.
Value: 3RESULT_UNAVAILABLE
static val RESULT_UNAVAILABLE: Int
Preference is currently not available, likely due to device state or the state of a dependency.
Retry may succeed if underlying conditions change.
Value: 2RESULT_UNSUPPORTED
static val RESULT_UNSUPPORTED: Int
Requested preference is not supported by this API.
Retry not advised.
Value: 1Public methods
getMetadata
fun getMetadata(): SettingsPreferenceMetadata?
Returns the metadata of requested Preference if request successful.
getResultCode
fun getResultCode(): Int
Returns the result code indicating status of the request.
getValue
fun getValue(): SettingsPreferenceValue?
Returns the value of requested Preference if request successful.
Properties
CREATOR
static val CREATOR: Parcelable.Creator<GetValueResult!>
Parcelable Creator for GetValueResult.
