SetValueResult
class SetValueResult : Parcelable
| kotlin.Any | |
| ↳ | android.service.settings.preferences.SetValueResult |
Result object given a corresponding SetValueRequest.
- If the request was successful,
getResultCodewill beRESULT_OK. - 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 disabled, thus unable to be set in this state. |
| 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 and the value was set. |
| static Int |
Requested preference requires permissions not held by the calling application. |
| static Int |
User consent was not approved for this operation. |
| static Int |
Requested preference is restricted, thus unable to be set under this policy. |
| 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 | |
|---|---|
| Int |
Returns the result code indicating status of the request. |
| Properties | |
|---|---|
| static Parcelable.Creator<SetValueResult!> |
Parcelable Creator for |
Constants
RESULT_DISABLED
static val RESULT_DISABLED: Int
Requested preference is disabled, thus unable to be set in this state.
Retry may succeed if underlying conditions change.
Value: 2RESULT_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: 7RESULT_INTERNAL_ERROR
static val RESULT_INTERNAL_ERROR: Int
API call failed due to an issue with the service binding.
Retry may succeed.
Value: 9RESULT_INVALID_REQUEST
static val RESULT_INVALID_REQUEST: Int
Request object is not valid.
Retry not advised with current parameters.
Value: 8RESULT_OK
static val RESULT_OK: Int
Request is successful and the value was set.
Value: 0RESULT_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: 5RESULT_REQUIRE_USER_CONSENT
static val RESULT_REQUIRE_USER_CONSENT: Int
User consent was not approved for this operation.
Retry may succeed if user provides consent.
Value: 6RESULT_RESTRICTED
static val RESULT_RESTRICTED: Int
Requested preference is restricted, thus unable to be set under this policy.
Retry may succeed if underlying conditions change.
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: 4RESULT_UNSUPPORTED
static val RESULT_UNSUPPORTED: Int
Requested preference is not supported by this API.
Retry not advised.
Value: 1Public methods
getResultCode
fun getResultCode(): Int
Returns the result code indicating status of the request.
Properties
CREATOR
static val CREATOR: Parcelable.Creator<SetValueResult!>
Parcelable Creator for SetValueResult.