SettingsPreferenceMetadata
class SettingsPreferenceMetadata : Parcelable
kotlin.Any | |
↳ | android.service.settings.preferences.SettingsPreferenceMetadata |
Data object representation of a Settings Preference definition and state.
Summary
Nested classes | |
---|---|
Builder to construct |
Constants | |
---|---|
static Int |
Indicates preference is write-sensitive. |
static Int |
Indicates preference is mildly write-sensitive. |
static Int |
Indicates preference is highly write-sensitivity and carries significant user-risk. |
static Int |
Indicates preference is not write-sensitive. |
Inherited constants | |
---|---|
Public methods | |
---|---|
Bundle |
Returns any additional fields specific to this preference. |
String |
getKey() Returns the key of Preference. |
Intent? |
Returns the intent to launch the host app page for this Preference. |
MutableList<String!> |
Returns the permissions required to read this Preference's value. |
String |
Returns the screen key of Preference. |
String? |
Returns the summary of Preference. |
String? |
getTitle() Returns the title of Preference. |
MutableList<String!> |
Returns the permissions required to write this Preference's value. |
Int |
Returns the write-level sensitivity of Preference. |
Boolean |
Returns whether Preference is available. |
Boolean |
Returns whether Preference is enabled. |
Boolean |
Returns whether Preference is restricted. |
Boolean |
Returns whether Preference is writable. |
Properties | |
---|---|
static Parcelable.Creator<SettingsPreferenceMetadata!> |
Parcelable Creator for |
Constants
DEEPLINK_ONLY
static val DEEPLINK_ONLY: Int
Indicates preference is write-sensitive.
This preference cannot be changed through this API; instead a deeplink to the Preference's page should be used instead, accessible via getLaunchIntent
.
Value: 2
EXPECT_POST_CONFIRMATION
static val EXPECT_POST_CONFIRMATION: Int
Indicates preference is mildly write-sensitive.
In addition to necessary permissions, after writing its value the user should be given the option to revert back.
Value: 1
NO_DIRECT_ACCESS
static val NO_DIRECT_ACCESS: Int
Indicates preference is highly write-sensitivity and carries significant user-risk.
This Preference cannot be changed through this API and no direct deeplink is available. Other Metadata is still available.
Value: 3
NO_SENSITIVITY
static val NO_SENSITIVITY: Int
Indicates preference is not write-sensitive.
Its value is writable without explicit consent, assuming all necessary permissions are granted.
Value: 0
Public methods
getExtras
fun getExtras(): Bundle
Returns any additional fields specific to this preference.
Treat all data as optional. This may contain unstructured data for a given preference, where the type and format of this data may only known by inspecting the source code of that preference. As such, any access of this data must handle failures gracefully to account for changing or missing data.
getLaunchIntent
fun getLaunchIntent(): Intent?
Returns the intent to launch the host app page for this Preference.
getReadPermissions
fun getReadPermissions(): MutableList<String!>
Returns the permissions required to read this Preference's value.
May be empty.
getScreenKey
fun getScreenKey(): String
Returns the screen key of Preference.
getWritePermissions
fun getWritePermissions(): MutableList<String!>
Returns the permissions required to write this Preference's value.
May be empty.
getWriteSensitivity
fun getWriteSensitivity(): Int
Returns the write-level sensitivity of Preference.
isAvailable
fun isAvailable(): Boolean
Returns whether Preference is available.
isEnabled
fun isEnabled(): Boolean
Returns whether Preference is enabled.
isRestricted
fun isRestricted(): Boolean
Returns whether Preference is restricted.
If true, this means the Preference is treated as a Restricted Preference which indicates that it could be conditionally disabled/unavailable due to admin settings.
isWritable
fun isWritable(): Boolean
Returns whether Preference is writable.
Properties
CREATOR
static val CREATOR: Parcelable.Creator<SettingsPreferenceMetadata!>
Parcelable Creator for SettingsPreferenceMetadata
.