SetValueResult


class SetValueResult : Parcelable
kotlin.Any
   ↳ android.service.settings.preferences.SetValueResult

Result object given a corresponding SetValueRequest.

  • If the request was successful, getResultCode will be RESULT_OK.
  • 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

Builder to construct SetValueResult.

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 SetValueResult.

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: 2

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: 7

RESULT_INTERNAL_ERROR

static val RESULT_INTERNAL_ERROR: Int

API call failed due to an issue with the service binding.

Retry may succeed.

Value: 9

RESULT_INVALID_REQUEST

static val RESULT_INVALID_REQUEST: Int

Request object is not valid.

Retry not advised with current parameters.

Value: 8

RESULT_OK

static val RESULT_OK: Int

Request is successful and the value was set.

Value: 0

RESULT_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: 5
static val RESULT_REQUIRE_USER_CONSENT: Int

User consent was not approved for this operation.

Retry may succeed if user provides consent.

Value: 6

RESULT_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: 3

RESULT_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: 4

RESULT_UNSUPPORTED

static val RESULT_UNSUPPORTED: Int

Requested preference is not supported by this API.

Retry not advised.

Value: 1

Public methods

Properties

CREATOR

static val CREATOR: Parcelable.Creator<SetValueResult!>

Parcelable Creator for SetValueResult.