java.lang.Object | ||
↳ | android.provider.Settings.NameValueTable | |
↳ | lineageos.providers.LineageSettings.System |
System settings, containing miscellaneous Lineage system preferences. This table holds simple name/value pairs. There are convenience functions for accessing individual settings entries.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | APP_SWITCH_WAKE_SCREEN | Whether to wake the screen with the app switch key, the value is boolean. | |||||||||
String | ASSIST_WAKE_SCREEN | Whether to wake the screen with the assist key, the value is boolean. | |||||||||
String | BACK_WAKE_SCREEN | Whether to wake the screen with the back key, the value is boolean. | |||||||||
String | BATTERY_LIGHT_BRIGHTNESS_LEVEL | Contains the battery light maximum brightness to use. | |||||||||
String | BATTERY_LIGHT_BRIGHTNESS_LEVEL_ZEN | Contains the battery light maximum brightness to use when Do Not Disturb is active. | |||||||||
String | BATTERY_LIGHT_ENABLED | Whether the battery light should be enabled (if hardware supports it) The value is boolean (1 or 0). | |||||||||
String | BATTERY_LIGHT_FULL_COLOR | What color to use for the battery LED while charging - full | |||||||||
String | BATTERY_LIGHT_LOW_COLOR | What color to use for the battery LED while charging - low | |||||||||
String | BATTERY_LIGHT_MEDIUM_COLOR | What color to use for the battery LED while charging - medium | |||||||||
String | BATTERY_LIGHT_PULSE | Whether the battery LED should repeatedly flash when the battery is low on charge. | |||||||||
String | BERRY_CURRENT_ACCENT | Current accent package name | |||||||||
String | BERRY_GLOBAL_STYLE | Whether to use dark theme 0: automatic - based on wallpaper 1: time - based on LiveDisplay status 2: force light 3: force dark | |||||||||
String | BERRY_MANAGED_BY_APP | Current application managing the style | |||||||||
String | BLUETOOTH_ACCEPT_ALL_FILES | If all file types can be accepted over Bluetooth OBEX. | |||||||||
String | BUTTON_BACKLIGHT_ONLY_WHEN_PRESSED | Whether the button backlight is only lit when pressed (and not when screen is touched) The value is boolean (1 or 0). | |||||||||
String | CALL_RECORDING_FORMAT | Call recording format value 0: AMR_WB 1: MPEG_4 Default: 0 | |||||||||
String | CAMERA_LAUNCH | Whether to launch secure camera app when key is longpressed 0 = 0ff, 1 = on | |||||||||
String | CAMERA_SLEEP_ON_RELEASE | Whether or not to send device back to sleep if Camera button is released ("Peek") 0 = 0ff, 1 = on | |||||||||
String | CAMERA_WAKE_SCREEN | Whether to wake the screen with the camera key half-press. | |||||||||
String | DIALER_OPENCNAM_ACCOUNT_SID | The OpenCNAM paid account ID to be utilized by the Dialer | |||||||||
String | DIALER_OPENCNAM_AUTH_TOKEN | The OpenCNAM authentication token to be utilized by the Dialer | |||||||||
String | DISPLAY_AUTO_CONTRAST | Use auto contrast optimization feature of display 0 = 0ff, 1 = on | |||||||||
String | DISPLAY_AUTO_OUTDOOR_MODE | Automatic outdoor mode 0 = 0ff, 1 = on | |||||||||
String | DISPLAY_CABC | Use display power saving features such as CABC or CABL 0 = 0ff, 1 = on | |||||||||
String | DISPLAY_COLOR_ADJUSTMENT | Manual display color adjustments (RGB values as floats, separated by spaces) | |||||||||
String | DISPLAY_COLOR_ENHANCE | Use color enhancement feature of display 0 = 0ff, 1 = on | |||||||||
String | DISPLAY_LOW_POWER |
This constant was deprecated
in API level 8.
Use DISPLAY_CABC instead
|
|||||||||
String | DISPLAY_PICTURE_ADJUSTMENT | The current custom picture adjustment values as a delimited string | |||||||||
String | DISPLAY_TEMPERATURE_DAY | Color temperature of the display during the day | |||||||||
String | DISPLAY_TEMPERATURE_MODE | Display color temperature adjustment mode, one of DAY (default), NIGHT, or AUTO. | |||||||||
String | DISPLAY_TEMPERATURE_NIGHT | Color temperature of the display at night | |||||||||
String | DOUBLE_TAP_SLEEP_GESTURE | Enable statusbar double tap gesture on to put device to sleep 0 = 0ff, 1 = on | |||||||||
String | ENABLE_FORWARD_LOOKUP | Enable looking up of phone numbers of nearby places 0 = 0ff, 1 = on | |||||||||
String | ENABLE_PEOPLE_LOOKUP | Enable looking up of phone numbers of people 0 = 0ff, 1 = on | |||||||||
String | ENABLE_REVERSE_LOOKUP | Enable looking up of information of phone numbers not in the contacts 0 = 0ff, 1 = on | |||||||||
String | FORWARD_LOOKUP_PROVIDER | The forward lookup provider to be utilized by the Dialer | |||||||||
String | HEADSET_CONNECT_PLAYER | Whether or not to launch default music player when headset is connected | |||||||||
String | HIGH_TOUCH_SENSITIVITY_ENABLE | Whether the HighTouchSensitivity is activated or not. | |||||||||
String | HOME_WAKE_SCREEN | Whether to wake the screen with the home key, the value is boolean. | |||||||||
String | INCREASING_RING | Whether the phone ringtone should be played in an increasing manner 0 = 0ff, 1 = on | |||||||||
String | INCREASING_RING_RAMP_UP_TIME | Ramp up time (seconds) for increasing ring | |||||||||
String | INCREASING_RING_START_VOLUME | Start volume fraction for increasing ring volume | |||||||||
String | KEY_APP_SWITCH_ACTION | Action to perform when the app switch key is pressed. | |||||||||
String | KEY_APP_SWITCH_LONG_PRESS_ACTION | Action to perform when the app switch key is long-pressed. | |||||||||
String | KEY_ASSIST_ACTION | Action to perform when the assistant (search) key is pressed. | |||||||||
String | KEY_ASSIST_LONG_PRESS_ACTION | Action to perform when the assistant (search) key is long-pressed. | |||||||||
String | KEY_HOME_DOUBLE_TAP_ACTION | Action to perform when the home key is double-tapped. | |||||||||
String | KEY_HOME_LONG_PRESS_ACTION | Action to perform when the home key is long-pressed. | |||||||||
String | KEY_MENU_ACTION | Action to perform when the menu key is pressed. | |||||||||
String | KEY_MENU_LONG_PRESS_ACTION | Action to perform when the menu key is long-pressed. | |||||||||
String | LOCKSCREEN_PIN_SCRAMBLE_LAYOUT | Whether to scramble a pin unlock layout 0 = 0ff, 1 = on | |||||||||
String | LOCKSCREEN_ROTATION | Whether keyguard will rotate to landscape mode 0 = false, 1 = true | |||||||||
String | MENU_WAKE_SCREEN | Whether to wake the screen with the menu key, the value is boolean. | |||||||||
String | NAVBAR_LEFT_IN_LANDSCAPE | Whether navigation bar is placed on the left side in landscape mode 0 = 0ff, 1 = on | |||||||||
String | NAVIGATION_BAR_MENU_ARROW_KEYS | boolean value. | |||||||||
String | NAV_BUTTONS | Navigation controls to Use | |||||||||
String | NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL | Contains the notifications light maximum brightness to use. | |||||||||
String | NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL_ZEN | Contains the notifications light maximum brightness to use when Do Not Disturb is active. | |||||||||
String | NOTIFICATION_LIGHT_PULSE_CALL_COLOR | What color to use for the missed call notification LED | |||||||||
String | NOTIFICATION_LIGHT_PULSE_CALL_LED_OFF | How long to wait between flashes for the missed call notification LED | |||||||||
String | NOTIFICATION_LIGHT_PULSE_CALL_LED_ON | How long to flash the missed call notification LED | |||||||||
String | NOTIFICATION_LIGHT_PULSE_CUSTOM_ENABLE | Whether to use the custom LED values for the notification pulse LED. | |||||||||
String | NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES | Which custom LED values to use for the notification pulse LED. | |||||||||
String | NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR | What color to use for the notification LED by default | |||||||||
String | NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_OFF | How long to wait between flashes for the notification LED by default | |||||||||
String | NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_ON | How long to flash the notification LED by default | |||||||||
String | NOTIFICATION_LIGHT_PULSE_VMAIL_COLOR | What color to use for the voicemail notification LED | |||||||||
String | NOTIFICATION_LIGHT_PULSE_VMAIL_LED_OFF | How long to wait between flashes for the voicemail notification LED | |||||||||
String | NOTIFICATION_LIGHT_PULSE_VMAIL_LED_ON | How long to flash the voicemail notification LED | |||||||||
String | NOTIFICATION_LIGHT_SCREEN_ON | Whether to allow notifications with the screen on or DayDreams. | |||||||||
String | NOTIFICATION_PLAY_QUEUE | Whether to attach a queue to media notifications. | |||||||||
String | PEOPLE_LOOKUP_PROVIDER | The people lookup provider to be utilized by the Dialer | |||||||||
String | PROXIMITY_ON_WAKE | Check the proximity sensor during wakeup 0 = 0ff, 1 = on | |||||||||
String | QS_SHOW_BRIGHTNESS_SLIDER | Whether to show the brightness slider in quick settings panel. | |||||||||
String | RECENTS_SHOW_SEARCH_BAR | Show search bar in recents 0 = 0ff, 1 = on | |||||||||
String | REVERSE_LOOKUP_PROVIDER | The reverse lookup provider to be utilized by the Dialer | |||||||||
String | SHOW_ALARM_ICON | Whether to show the alarm clock icon in the status bar. | |||||||||
String | STATUS_BAR_AM_PM | Display style of AM/PM next to clock in status bar 0: Normal display (Eclair stock) 1: Small display (Froyo stock) 2: No display (Gingerbread/ICS stock) default: 2 | |||||||||
String | STATUS_BAR_BATTERY_STYLE | Display style of the status bar battery information 0: Display the battery an icon in portrait mode 2: Display the battery as a circle 4: Hide the battery status information 5: Display the battery an icon in landscape mode 6: Display the battery as plain text default: 0 | |||||||||
String | STATUS_BAR_BRIGHTNESS_CONTROL | Whether to control brightness from status bar 0 = 0ff, 1 = on | |||||||||
String | STATUS_BAR_CLOCK | Whether to show the clock in the right or left position or show it in the center 0: show the clock in the right position (LTR) 1: show the clock in the center 2: show the clock in the left position (LTR) default: 0 | |||||||||
String | STATUS_BAR_IME_SWITCHER | Whether to show the IME switcher in the status bar 0 = 0ff, 1 = on | |||||||||
String | STATUS_BAR_NOTIF_COUNT | Show the pending notification counts as overlays on the status bar | |||||||||
String | STATUS_BAR_QUICK_QS_PULLDOWN | Whether to allow one finger quick settings expansion on the side of the statusbar. | |||||||||
String | STATUS_BAR_SHOW_BATTERY_PERCENT | Status bar battery % 0: Hide the battery percentage 1: Display the battery percentage inside the icon 2: Display the battery percentage next to the icon | |||||||||
String | STATUS_BAR_SHOW_WEATHER | Boolean value on whether to show weather in the statusbar 0 = 0ff, 1 = on | |||||||||
String | STYLUS_ICON_ENABLED | Show icon when stylus is used The value is boolean (1 or 0). | |||||||||
String | SWAP_VOLUME_KEYS_ON_ROTATION | Swap volume buttons when the screen is rotated 0 - Disabled 1 - Enabled (screen is rotated by 90 or 180 degrees: phone, hybrid) 2 - Enabled (screen is rotated by 180 or 270 degrees: tablet) | |||||||||
String | SYSTEMUI_BURNIN_PROTECTION | Whether to enable burnin protection 0 = 0ff, 1 = on | |||||||||
String | SYSTEM_PROFILES_ENABLED | Whether to enable system profiles feature 0 = off, 1 = on | |||||||||
String | SYS_PROP_LINEAGE_SETTING_VERSION | ||||||||||
String | T9_SEARCH_INPUT_LOCALE | Locale for secondary overlay on dialer for t9 search input | |||||||||
String | TORCH_LONG_PRESS_POWER_GESTURE | Activate torchlight when power button is long-pressed while the display is off The value is boolean (1 or 0). | |||||||||
String | TORCH_LONG_PRESS_POWER_TIMEOUT | When the torch has been turned on by long press on power, automatically turn off after a configurable number of seconds. | |||||||||
String | TOUCHSCREEN_GESTURE_HAPTIC_FEEDBACK | Whether or not to vibrate when a touchscreen gesture is detected | |||||||||
String | USE_EDGE_SERVICE_FOR_GESTURES | Use EdgeGesture Service for system gestures in PhoneWindowManager 0 = 0ff, 1 = on | |||||||||
String | VOLBTN_MUSIC_CONTROLS | Whether or not volume button music controls should be enabled to seek media tracks 0 = 0ff, 1 = on | |||||||||
String | VOLUME_ADJUST_SOUNDS_ENABLED | Volume Adjust Sounds Enable, This is the noise made when using volume hard buttons Defaults to 1 - sounds enabled | |||||||||
String | VOLUME_ANSWER_CALL | Whether to answer the call with the volume keys, the value is boolean. | |||||||||
String | VOLUME_KEYS_CONTROL_RING_STREAM | Volume key controls ringtone or media sound stream | |||||||||
String | VOLUME_WAKE_SCREEN | Whether to wake the screen with the volume keys, the value is boolean. | |||||||||
String | ZEN_ALLOW_LIGHTS | Whether the notification light will be allowed when in zen mode during downtime | |||||||||
String | ZEN_PRIORITY_ALLOW_LIGHTS | Whether the notification light will be allowed when in zen priority mode during downtime |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.provider.Settings.NameValueTable
| |||||||||||
From interface
android.provider.BaseColumns
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CONTENT_URI |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Convenience function for retrieving a single settings value
as a floating point number.
| |||||||||||
Convenience function for retrieving a single system settings value
as a float.
| |||||||||||
Convenience function for retrieving a single settings value
as an integer.
| |||||||||||
Convenience function for retrieving a single settings value
as an integer.
| |||||||||||
Convenience function for retrieving a single settings value
as a
long .
| |||||||||||
Convenience function for retrieving a single settings value
as a
long .
| |||||||||||
Look up a name in the database.
| |||||||||||
Construct the content URI for a particular name/value pair, useful for monitoring changes
with a ContentObserver.
| |||||||||||
Convenience function for updating a single settings value as a
floating point number.
| |||||||||||
Convenience function for updating a single settings value as an
integer.
| |||||||||||
Convenience function for updating a single settings value as a long
integer.
| |||||||||||
Store a name/value pair into the database.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.provider.Settings.NameValueTable
| |||||||||||
From class
java.lang.Object
|
Whether to wake the screen with the app switch key, the value is boolean. 0 = 0ff, 1 = on
Whether to wake the screen with the assist key, the value is boolean. 0 = 0ff, 1 = on
Whether to wake the screen with the back key, the value is boolean. 0 = 0ff, 1 = on
Contains the battery light maximum brightness to use. Values range from 1 to 255
Contains the battery light maximum brightness to use when Do Not Disturb is active. Values range from 1 to 255
Whether the battery light should be enabled (if hardware supports it) The value is boolean (1 or 0).
What color to use for the battery LED while charging - full
What color to use for the battery LED while charging - low
What color to use for the battery LED while charging - medium
Whether the battery LED should repeatedly flash when the battery is low on charge. The value is boolean (1 or 0).
Current accent package name
Whether to use dark theme 0: automatic - based on wallpaper 1: time - based on LiveDisplay status 2: force light 3: force dark
Current application managing the style
If all file types can be accepted over Bluetooth OBEX. 0 = 0ff, 1 = on
Whether the button backlight is only lit when pressed (and not when screen is touched) The value is boolean (1 or 0).
Call recording format value 0: AMR_WB 1: MPEG_4 Default: 0
Whether to launch secure camera app when key is longpressed 0 = 0ff, 1 = on
Whether or not to send device back to sleep if Camera button is released ("Peek") 0 = 0ff, 1 = on
Whether to wake the screen with the camera key half-press. 0 = 0ff, 1 = on
The OpenCNAM paid account ID to be utilized by the Dialer
The OpenCNAM authentication token to be utilized by the Dialer
Use auto contrast optimization feature of display 0 = 0ff, 1 = on
Automatic outdoor mode 0 = 0ff, 1 = on
Use display power saving features such as CABC or CABL 0 = 0ff, 1 = on
Manual display color adjustments (RGB values as floats, separated by spaces)
Use color enhancement feature of display 0 = 0ff, 1 = on
This constant was deprecated
in API level 8.
Use DISPLAY_CABC
instead
The current custom picture adjustment values as a delimited string
Color temperature of the display during the day
Display color temperature adjustment mode, one of DAY (default), NIGHT, or AUTO.
Color temperature of the display at night
Enable statusbar double tap gesture on to put device to sleep 0 = 0ff, 1 = on
Enable looking up of phone numbers of nearby places 0 = 0ff, 1 = on
Enable looking up of phone numbers of people 0 = 0ff, 1 = on
Enable looking up of information of phone numbers not in the contacts 0 = 0ff, 1 = on
The forward lookup provider to be utilized by the Dialer
Whether or not to launch default music player when headset is connected
Whether the HighTouchSensitivity is activated or not. 0 = off, 1 = on
Whether to wake the screen with the home key, the value is boolean. 0 = 0ff, 1 = on
Whether the phone ringtone should be played in an increasing manner 0 = 0ff, 1 = on
Ramp up time (seconds) for increasing ring
Start volume fraction for increasing ring volume
Action to perform when the app switch key is pressed. (Default is 2) (See KEY_HOME_LONG_PRESS_ACTION for valid values)
Action to perform when the app switch key is long-pressed. (Default is 0) (See KEY_HOME_LONG_PRESS_ACTION for valid values)
Action to perform when the assistant (search) key is pressed. (Default is 3) (See KEY_HOME_LONG_PRESS_ACTION for valid values)
Action to perform when the assistant (search) key is long-pressed. (Default is 4) (See KEY_HOME_LONG_PRESS_ACTION for valid values)
Action to perform when the home key is double-tapped. (Default can be configured via config_doubleTapOnHomeBehavior) (See KEY_HOME_LONG_PRESS_ACTION for valid values)
Action to perform when the home key is long-pressed. (Default can be configured via config_longPressOnHomeBehavior) 0 - Nothing 1 - Menu 2 - App-switch 3 - Search 4 - Voice search 5 - In-app search 6 - Launch Camera 7 - Action Sleep 8 - Last app 9 - Toggle split screen 10 - Single hand (left) 11 - Single hand (right)
Action to perform when the menu key is pressed. (Default is 1) (See KEY_HOME_LONG_PRESS_ACTION for valid values)
Action to perform when the menu key is long-pressed. (Default is 0 on devices with a search key, 3 on devices without) (See KEY_HOME_LONG_PRESS_ACTION for valid values)
Whether to scramble a pin unlock layout 0 = 0ff, 1 = on
Whether keyguard will rotate to landscape mode 0 = false, 1 = true
Whether to wake the screen with the menu key, the value is boolean. 0 = 0ff, 1 = on
Whether navigation bar is placed on the left side in landscape mode 0 = 0ff, 1 = on
boolean value. toggles using arrow key locations on nav bar as left and right dpad keys
Navigation controls to Use
Contains the notifications light maximum brightness to use. Values range from 1 to 255
Contains the notifications light maximum brightness to use when Do Not Disturb is active. Values range from 1 to 255
What color to use for the missed call notification LED
How long to wait between flashes for the missed call notification LED
How long to flash the missed call notification LED
Whether to use the custom LED values for the notification pulse LED. 0 = 0ff, 1 = on
Which custom LED values to use for the notification pulse LED.
What color to use for the notification LED by default
How long to wait between flashes for the notification LED by default
How long to flash the notification LED by default
What color to use for the voicemail notification LED
How long to wait between flashes for the voicemail notification LED
How long to flash the voicemail notification LED
Whether to allow notifications with the screen on or DayDreams. The value is boolean (1 or 0). Default will always be false.
Whether to attach a queue to media notifications. 0 = 0ff, 1 = on
The people lookup provider to be utilized by the Dialer
Check the proximity sensor during wakeup 0 = 0ff, 1 = on
Whether to show the brightness slider in quick settings panel. 0 = 0ff, 1 = on
Show search bar in recents 0 = 0ff, 1 = on
The reverse lookup provider to be utilized by the Dialer
Whether to show the alarm clock icon in the status bar. 0 = 0ff, 1 = on
Display style of AM/PM next to clock in status bar 0: Normal display (Eclair stock) 1: Small display (Froyo stock) 2: No display (Gingerbread/ICS stock) default: 2
Display style of the status bar battery information 0: Display the battery an icon in portrait mode 2: Display the battery as a circle 4: Hide the battery status information 5: Display the battery an icon in landscape mode 6: Display the battery as plain text default: 0
Whether to control brightness from status bar 0 = 0ff, 1 = on
Whether to show the clock in the right or left position or show it in the center 0: show the clock in the right position (LTR) 1: show the clock in the center 2: show the clock in the left position (LTR) default: 0
Whether to show the IME switcher in the status bar 0 = 0ff, 1 = on
Show the pending notification counts as overlays on the status bar
Whether to allow one finger quick settings expansion on the side of the statusbar. 0 = 0ff, 1 = right, 2 = left
Status bar battery % 0: Hide the battery percentage 1: Display the battery percentage inside the icon 2: Display the battery percentage next to the icon
Boolean value on whether to show weather in the statusbar 0 = 0ff, 1 = on
Show icon when stylus is used The value is boolean (1 or 0).
Swap volume buttons when the screen is rotated 0 - Disabled 1 - Enabled (screen is rotated by 90 or 180 degrees: phone, hybrid) 2 - Enabled (screen is rotated by 180 or 270 degrees: tablet)
Whether to enable burnin protection 0 = 0ff, 1 = on
Whether to enable system profiles feature 0 = off, 1 = on
Locale for secondary overlay on dialer for t9 search input
Activate torchlight when power button is long-pressed while the display is off The value is boolean (1 or 0).
When the torch has been turned on by long press on power, automatically turn off after a configurable number of seconds. The value is an integer number of seconds in the range 0-3600. 0 means never automatically turn off.
Whether or not to vibrate when a touchscreen gesture is detected
Use EdgeGesture Service for system gestures in PhoneWindowManager 0 = 0ff, 1 = on
Whether or not volume button music controls should be enabled to seek media tracks 0 = 0ff, 1 = on
Volume Adjust Sounds Enable, This is the noise made when using volume hard buttons Defaults to 1 - sounds enabled
Whether to answer the call with the volume keys, the value is boolean. 0 = 0ff, 1 = on
Volume key controls ringtone or media sound stream
Whether to wake the screen with the volume keys, the value is boolean. 0 = 0ff, 1 = on
Whether the notification light will be allowed when in zen mode during downtime
Whether the notification light will be allowed when in zen priority mode during downtime
Convenience function for retrieving a single settings value as a floating point number. Note that internally setting values are always stored as strings; this function converts the string to an float for you. The default value will be returned if the setting is not defined or not a valid float.
Parameters | |
---|---|
cr |
ContentResolver : The ContentResolver to access. |
name |
String : The name of the setting to retrieve. |
def |
float : Value to return if the setting is not defined. |
Returns | |
---|---|
float |
The setting's current value, or 'def' if it is not defined or not a valid float. |
Convenience function for retrieving a single system settings value as a float. Note that internally setting values are always stored as strings; this function converts the string to a float for you.
This version does not take a default value. If the setting has not
been set, or the string value is not a number,
it throws LineageSettings.LineageSettingNotFoundException
.
Parameters | |
---|---|
cr |
ContentResolver : The ContentResolver to access. |
name |
String : The name of the setting to retrieve. |
Returns | |
---|---|
float |
The setting's current value. |
Throws | |
---|---|
LineageSettings.LineageSettingNotFoundException |
Thrown if a setting by the given name can't be found or the setting value is not a float. |
Convenience function for retrieving a single settings value as an integer. Note that internally setting values are always stored as strings; this function converts the string to an integer for you.
This version does not take a default value. If the setting has not
been set, or the string value is not a number,
it throws LineageSettings.LineageSettingNotFoundException
.
Parameters | |
---|---|
cr |
ContentResolver : The ContentResolver to access. |
name |
String : The name of the setting to retrieve. |
Returns | |
---|---|
int |
The setting's current value. |
Throws | |
---|---|
LineageSettings.LineageSettingNotFoundException |
Thrown if a setting by the given name can't be found or the setting value is not an integer. |
Convenience function for retrieving a single settings value as an integer. Note that internally setting values are always stored as strings; this function converts the string to an integer for you. The default value will be returned if the setting is not defined or not an integer.
Parameters | |
---|---|
cr |
ContentResolver : The ContentResolver to access. |
name |
String : The name of the setting to retrieve. |
def |
int : Value to return if the setting is not defined. |
Returns | |
---|---|
int |
The setting's current value, or 'def' if it is not defined or not a valid integer. |
Convenience function for retrieving a single settings value
as a long
. Note that internally setting values are always
stored as strings; this function converts the string to a long
for you.
This version does not take a default value. If the setting has not
been set, or the string value is not a number,
it throws LineageSettings.LineageSettingNotFoundException
.
Parameters | |
---|---|
cr |
ContentResolver : The ContentResolver to access. |
name |
String : The name of the setting to retrieve. |
Returns | |
---|---|
long |
The setting's current value. |
Throws | |
---|---|
LineageSettings.LineageSettingNotFoundException |
Thrown if a setting by the given name can't be found or the setting value is not an integer. |
Convenience function for retrieving a single settings value
as a long
. Note that internally setting values are always
stored as strings; this function converts the string to a long
for you. The default value will be returned if the setting is
not defined or not a long
.
Parameters | |
---|---|
cr |
ContentResolver : The ContentResolver to access. |
name |
String : The name of the setting to retrieve. |
def |
long : Value to return if the setting is not defined. |
Returns | |
---|---|
long |
The setting's current value, or 'def' if it is not defined
or not a valid long .
|
Look up a name in the database.
Parameters | |
---|---|
resolver |
ContentResolver : to access the database with |
name |
String : to look up in the table |
Returns | |
---|---|
String |
the corresponding value, or null if not present |
Construct the content URI for a particular name/value pair, useful for monitoring changes with a ContentObserver.
Parameters | |
---|---|
name |
String : to look up in the table |
Returns | |
---|---|
Uri |
the corresponding content URI |
Convenience function for updating a single settings value as a floating point number. This will either create a new entry in the table if the given name does not exist, or modify the value of the existing row with that name. Note that internally setting values are always stored as strings, so this function converts the given value to a string before storing it.
Parameters | |
---|---|
cr |
ContentResolver : The ContentResolver to access. |
name |
String : The name of the setting to modify. |
value |
float : The new value for the setting. |
Returns | |
---|---|
boolean |
true if the value was set, false on database errors |
Convenience function for updating a single settings value as an integer. This will either create a new entry in the table if the given name does not exist, or modify the value of the existing row with that name. Note that internally setting values are always stored as strings, so this function converts the given value to a string before storing it.
Parameters | |
---|---|
cr |
ContentResolver : The ContentResolver to access. |
name |
String : The name of the setting to modify. |
value |
int : The new value for the setting. |
Returns | |
---|---|
boolean |
true if the value was set, false on database errors |
Convenience function for updating a single settings value as a long integer. This will either create a new entry in the table if the given name does not exist, or modify the value of the existing row with that name. Note that internally setting values are always stored as strings, so this function converts the given value to a string before storing it.
Parameters | |
---|---|
cr |
ContentResolver : The ContentResolver to access. |
name |
String : The name of the setting to modify. |
value |
long : The new value for the setting. |
Returns | |
---|---|
boolean |
true if the value was set, false on database errors |
Store a name/value pair into the database.
Parameters | |
---|---|
resolver |
ContentResolver : to access the database with |
name |
String : to store |
value |
String : to associate with the name |
Returns | |
---|---|
boolean |
true if the value was set, false on database errors |