java.lang.Object | ||
↳ | android.provider.Settings.NameValueTable | |
↳ | cyanogenmod.providers.CMSettings.Global |
Global settings, containing miscellaneous CM global preferences. This table holds simple name/value pairs. There are convenience functions for accessing individual settings entries.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | SYS_PROP_CM_SETTING_VERSION | ||||||||||
String | WEATHER_TEMPERATURE_UNIT | Global temperature unit in which the weather data will be reported Valid values are: |
[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
|
Global temperature unit in which the weather data will be reported Valid values are:
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.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
def | Value to return if the setting is not defined. |
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 CMSettings.CMSettingNotFoundException
.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
CMSettings.CMSettingNotFoundException | 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. The default value will be returned if the setting is not defined or not an integer.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
def | Value to return if the setting is not defined. |
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 CMSettings.CMSettingNotFoundException
.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
CMSettings.CMSettingNotFoundException | 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
.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
def | Value to return if the setting is not defined. |
long
.
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 CMSettings.CMSettingNotFoundException
.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to retrieve. |
CMSettings.CMSettingNotFoundException | Thrown if a setting by the given name can't be found or the setting value is not an integer. |
---|
Look up a name in the database.
resolver | to access the database with |
---|---|
name | to look up in the table |
Construct the content URI for a particular name/value pair, useful for monitoring changes with a ContentObserver.
name | to look up in the table |
---|
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.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to modify. |
value | The new value for the setting. |
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.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to modify. |
value | The new value for the setting. |
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.
cr | The ContentResolver to access. |
---|---|
name | The name of the setting to modify. |
value | The new value for the setting. |
Store a name/value pair into the database.
resolver | to access the database with |
---|---|
name | to store |
value | to associate with the name |