Added in API level 36

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

Int

Returns the result code indicating status of the request.

Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<SetValueResult!>

Parcelable Creator for SetValueResult.

Constants

RESULT_DISABLED

Added in API level 36
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

Added in API level 36
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

Added in API level 36
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

Added in API level 36
static val RESULT_INVALID_REQUEST: Int

Request object is not valid.

Retry not advised with current parameters.

Value: 8

RESULT_OK

Added in API level 36
static val RESULT_OK: Int

Request is successful and the value was set.

Value: 0

RESULT_REQUIRE_APP_PERMISSION

Added in API level 36
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
Added in API level 36
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

Added in API level 36
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

Added in API level 36
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

Added in API level 36
static val RESULT_UNSUPPORTED: Int

Requested preference is not supported by this API.

Retry not advised.

Value: 1

Public methods

describeContents

Added in API level 36
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getResultCode

Added in API level 36
fun getResultCode(): Int

Returns the result code indicating status of the request.

Return
Int Value is one of the following:

writeToParcel

Added in API level 36
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
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_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:

Properties

CREATOR

Added in API level 36
static val CREATOR: Parcelable.Creator<SetValueResult!>

Parcelable Creator for SetValueResult.