Build 1.1_r1 (from source)

android.provider
Class Settings.System

java.lang.Object
  extended by android.provider.Settings.NameValueTable
      extended by android.provider.Settings.System
All Implemented Interfaces:
BaseColumns
Enclosing class:
Settings

public static final class Settings.System
extends Settings.NameValueTable

System settings, containing miscellaneous system preferences. This table holds simple name/value pairs. There are convenience functions for accessing individual settings entries.


Field Summary
static String ACCELEROMETER_ROTATION
          Control whether the accelerometer will be used to change screen orientation.
static String ADB_ENABLED
          Deprecated. Use Settings.Secure.LOCATION_PROVIDERS_ALLOWED instead
static String AIRPLANE_MODE_ON
          Whether Airplane Mode is on.
static String AIRPLANE_MODE_RADIOS
          A comma separated list of radios that need to be disabled when airplane mode is on.
static String ALWAYS_FINISH_ACTIVITIES
          If 1, the activity manager will aggressively finish activities and processes as soon as they are no longer needed.
static String ANDROID_ID
          Deprecated. Use Settings.Secure.ANDROID_ID instead
static String APPEND_FOR_LAST_AUDIBLE
          Appended to various volume related settings to record the previous values before they the settings were affected by a silent/vibrate ringer mode change.
static String AUTO_TIME
          Value to specify if the user prefers the date, time and time zone to be automatically fetched from the network (NITZ).
static String BLUETOOTH_DISCOVERABILITY
          Determines whether remote devices may discover and/or connect to this device.
static String BLUETOOTH_DISCOVERABILITY_TIMEOUT
          Bluetooth discoverability timeout.
static String BLUETOOTH_ON
          Deprecated. Use Settings.Secure.BLUETOOTH_ON instead
static Uri CONTENT_URI
          The content:// style URL for this table
static String DATA_ROAMING
          Deprecated. Use Settings.Secure.DATA_ROAMING instead
static String DATE_FORMAT
          Date format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd
static String DEBUG_APP
          Name of an application package to be debugged.
static Uri DEFAULT_NOTIFICATION_URI
          A Uri that will point to the current default notification sound at any given time.
static Uri DEFAULT_RINGTONE_URI
          A Uri that will point to the current default ringtone at any given time.
static String DEVICE_PROVISIONED
          Deprecated. Use Settings.Secure.DEVICE_PROVISIONED instead
static String DIM_SCREEN
          Whether or not to dim the screen.
static String DTMF_TONE_WHEN_DIALING
          Whether the audible DTMF tones are played by the dialer when dialing.
static String END_BUTTON_BEHAVIOR
          What happens when the user presses the end call button if they're not on a call.
Values:
0 - The end button does nothing.
1 - The end button goes to the home screen.
2 - The end button puts the device to sleep and locks the keyguard.
3 - The end button goes to the home screen.
static String FONT_SCALE
          Scaling factor for fonts, float.
static String HTTP_PROXY
          Deprecated. Use Settings.Secure.HTTP_PROXY instead
static String INSTALL_NON_MARKET_APPS
          Deprecated. Use Settings.Secure.INSTALL_NON_MARKET_APPS instead
static String LOCATION_PROVIDERS_ALLOWED
          Deprecated. Use Settings.Secure.LOCATION_PROVIDERS_ALLOWED instead
static String LOCK_PATTERN_ENABLED
          Whether autolock is enabled (0 = false, 1 = true)
static String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED
          Whether lock pattern will vibrate as user enters (0 = false, 1 = true)
static String LOCK_PATTERN_VISIBLE
          Whether lock pattern is visible as user enters (0 = false, 1 = true)
static String LOGGING_ID
          Deprecated. Use Settings.Secure.LOGGING_ID instead
static String MODE_RINGER
          Ringer mode.
static String MODE_RINGER_STREAMS_AFFECTED
          Determines which streams are affected by ringer mode changes.
static String MUTE_STREAMS_AFFECTED
          Determines which streams are affected by mute.
static String NETWORK_PREFERENCE
          Deprecated. Use Settings.Secure.NETWORK_PREFERENCE instead
static String NEXT_ALARM_FORMATTED
          A formatted string of the next alarm that is set, or the empty string if there is no alarm set.
static String NOTIFICATION_SOUND
          Persistent store for the system-wide default notification sound.
static String NOTIFICATIONS_USE_RING_VOLUME
          Whether the notifications should use the ring volume (value of 1) or a separate notification volume (value of 0).
static String PARENTAL_CONTROL_ENABLED
          Deprecated. Use Settings.Secure.PARENTAL_CONTROL_ENABLED instead
static String PARENTAL_CONTROL_LAST_UPDATE
          Deprecated. Use Settings.Secure.PARENTAL_CONTROL_LAST_UPDATE instead
static String PARENTAL_CONTROL_REDIRECT_URL
          Deprecated. Use Settings.Secure.PARENTAL_CONTROL_REDIRECT_URL instead
static String RADIO_BLUETOOTH
          Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.
static String RADIO_CELL
          Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.
static String RADIO_WIFI
          Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio.
static String RINGTONE
          Persistent store for the system-wide default ringtone URI.
static String SCREEN_BRIGHTNESS
          The screen backlight brightness between 0 and 255.
static String SCREEN_OFF_TIMEOUT
          The timeout before the screen turns off.
static String SETTINGS_CLASSNAME
          Deprecated. Use Settings.Secure.SETTINGS_CLASSNAME instead
static String SETUP_WIZARD_HAS_RUN
          Whether the setup wizard has been run before (on first boot), or if it still needs to be run.
static String SHOW_GTALK_SERVICE_STATUS
           
static String SHOW_PROCESSES
          Control whether the process CPU usage meter should be shown.
static String SOUND_EFFECTS_ENABLED
          Whether the sounds effects (key clicks, lid open ...) are enabled.
static String STAY_ON_WHILE_PLUGGED_IN
          Whether we keep the device on while the device is plugged in.
static String SYS_PROP_SETTING_VERSION
           
static String TEXT_AUTO_CAPS
          Setting to enable Auto Caps in text editors.
static String TEXT_AUTO_PUNCTUATE
          Setting to enable Auto Punctuate in text editors.
static String TEXT_AUTO_REPLACE
          Setting to enable Auto Replace (AutoText) in text editors.
static String TEXT_SHOW_PASSWORD
          Setting to showing password characters in text editors.
static String TIME_12_24
          Display times as 12 or 24 hours 12 24
static String TRANSITION_ANIMATION_SCALE
          Scaling factor for activity transition animations.
static String USB_MASS_STORAGE_ENABLED
          Deprecated. Use Settings.Secure.USB_MASS_STORAGE_ENABLED instead
static String USE_GOOGLE_MAIL
          Deprecated. Use Settings.Secure.USE_GOOGLE_MAIL instead
static String VIBRATE_ON
          Whether vibrate is on for different events.
static String VOLUME_ALARM
          Alarm volume.
static String VOLUME_MUSIC
          Music/media/gaming volume.
static String VOLUME_NOTIFICATION
          Notification volume.
static String VOLUME_RING
          Ringer volume.
static String[] VOLUME_SETTINGS
          The mapping of stream type (integer) to its setting.
static String VOLUME_SYSTEM
          System/notifications volume.
static String VOLUME_VOICE
          Voice call volume.
static String WAIT_FOR_DEBUGGER
          If 1, when launching DEBUG_APP it will wait for the debugger before starting user code.
static String WALLPAPER_ACTIVITY
          Name of activity to use for wallpaper on the home screen.
static String WIFI_IDLE_MS
          The interval in milliseconds after which Wi-Fi is considered idle.
static String WIFI_MAX_DHCP_RETRY_COUNT
          Deprecated. 
static String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS
          Deprecated. 
static String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON
          Deprecated. Use Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON instead
static String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY
          Deprecated. Use Settings.Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY instead
static String WIFI_NUM_ALLOWED_CHANNELS
          The number of radio channels that are allowed in the local 802.11 regulatory domain.
static String WIFI_NUM_OPEN_NETWORKS_KEPT
          Deprecated. Use Settings.Secure.WIFI_NUM_OPEN_NETWORKS_KEPT instead
static String WIFI_ON
          Deprecated. Use Settings.Secure.WIFI_ON instead
static String WIFI_SLEEP_POLICY
          The policy for deciding when Wi-Fi should go to sleep (which will in turn switch to using the mobile data as an Internet connection).
static int WIFI_SLEEP_POLICY_DEFAULT
          Value for WIFI_SLEEP_POLICY to use the default Wi-Fi sleep policy, which is to sleep shortly after the turning off according to the STAY_ON_WHILE_PLUGGED_IN setting.
static int WIFI_SLEEP_POLICY_NEVER
          Value for WIFI_SLEEP_POLICY to never go to sleep.
static int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED
          Value for WIFI_SLEEP_POLICY to use the default policy when the device is on battery, and never go to sleep when the device is plugged in.
static String WIFI_STATIC_DNS1
          If using static IP, the primary DNS's IP address.
static String WIFI_STATIC_DNS2
          If using static IP, the secondary DNS's IP address.
static String WIFI_STATIC_GATEWAY
          If using static IP, the gateway's IP address.
static String WIFI_STATIC_IP
          The static IP address.
static String WIFI_STATIC_NETMASK
          If using static IP, the net mask.
static String WIFI_USE_STATIC_IP
          Whether to use static IP and other static network attributes.
static String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE instead
static String WIFI_WATCHDOG_AP_COUNT
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_AP_COUNT instead
static String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS instead
static String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED instead
static String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS instead
static String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT instead
static String WIFI_WATCHDOG_MAX_AP_CHECKS
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_MAX_AP_CHECKS instead
static String WIFI_WATCHDOG_ON
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_ON instead
static String WIFI_WATCHDOG_PING_COUNT
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_PING_COUNT instead
static String WIFI_WATCHDOG_PING_DELAY_MS
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_PING_DELAY_MS instead
static String WIFI_WATCHDOG_PING_TIMEOUT_MS
          Deprecated. Use Settings.Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS instead
static String WINDOW_ANIMATION_SCALE
          Scaling factor for normal window animations.
 
Fields inherited from class android.provider.Settings.NameValueTable
NAME, VALUE
 
Fields inherited from interface android.provider.BaseColumns
_COUNT, _ID
 
Constructor Summary
Settings.System()
           
 
Method Summary
static void getConfiguration(ContentResolver cr, Configuration outConfig)
          Convenience function to read all of the current configuration-related settings into a Configuration object.
static float getFloat(ContentResolver cr, String name)
          Convenience function for retrieving a single system settings value as a float.
static float getFloat(ContentResolver cr, String name, float def)
          Convenience function for retrieving a single system settings value as a floating point number.
static int getInt(ContentResolver cr, String name)
          Convenience function for retrieving a single system settings value as an integer.
static int getInt(ContentResolver cr, String name, int def)
          Convenience function for retrieving a single system settings value as an integer.
static long getLong(ContentResolver cr, String name)
          Convenience function for retrieving a single system settings value as a long.
static long getLong(ContentResolver cr, String name, long def)
          Convenience function for retrieving a single system settings value as a long.
static boolean getShowGTalkServiceStatus(ContentResolver cr)
           
static String getString(ContentResolver resolver, String name)
          Look up a name in the database.
static Uri getUriFor(String name)
          Construct the content URI for a particular name/value pair, useful for monitoring changes with a ContentObserver.
static boolean putConfiguration(ContentResolver cr, Configuration config)
          Convenience function to write a batch of configuration-related settings from a Configuration object.
static boolean putFloat(ContentResolver cr, String name, float value)
          Convenience function for updating a single settings value as a floating point number.
static boolean putInt(ContentResolver cr, String name, int value)
          Convenience function for updating a single settings value as an integer.
static boolean putLong(ContentResolver cr, String name, long value)
          Convenience function for updating a single settings value as a long integer.
static boolean putString(ContentResolver resolver, String name, String value)
          Store a name/value pair into the database.
static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag)
           
 
Methods inherited from class android.provider.Settings.NameValueTable
getUriFor, putString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYS_PROP_SETTING_VERSION

public static final String SYS_PROP_SETTING_VERSION
See Also:
Constant Field Values

CONTENT_URI

public static final Uri CONTENT_URI
The content:// style URL for this table


STAY_ON_WHILE_PLUGGED_IN

public static final String STAY_ON_WHILE_PLUGGED_IN
Whether we keep the device on while the device is plugged in. Supported values are: These values can be OR-ed together.

See Also:
Constant Field Values

END_BUTTON_BEHAVIOR

public static final String END_BUTTON_BEHAVIOR
What happens when the user presses the end call button if they're not on a call.
Values:
0 - The end button does nothing.
1 - The end button goes to the home screen.
2 - The end button puts the device to sleep and locks the keyguard.
3 - The end button goes to the home screen. If the user is already on the home screen, it puts the device to sleep.

See Also:
Constant Field Values

AIRPLANE_MODE_ON

public static final String AIRPLANE_MODE_ON
Whether Airplane Mode is on.

See Also:
Constant Field Values

RADIO_BLUETOOTH

public static final String RADIO_BLUETOOTH
Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.

See Also:
Constant Field Values

RADIO_WIFI

public static final String RADIO_WIFI
Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio.

See Also:
Constant Field Values

RADIO_CELL

public static final String RADIO_CELL
Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.

See Also:
Constant Field Values

AIRPLANE_MODE_RADIOS

public static final String AIRPLANE_MODE_RADIOS
A comma separated list of radios that need to be disabled when airplane mode is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are included in the comma separated list.

See Also:
Constant Field Values

WIFI_IDLE_MS

public static final String WIFI_IDLE_MS
The interval in milliseconds after which Wi-Fi is considered idle. When idle, it is possible for the device to be switched from Wi-Fi to the mobile data network.

See Also:
Constant Field Values

WIFI_SLEEP_POLICY

public static final String WIFI_SLEEP_POLICY
The policy for deciding when Wi-Fi should go to sleep (which will in turn switch to using the mobile data as an Internet connection).

Set to one of WIFI_SLEEP_POLICY_DEFAULT, WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED, or WIFI_SLEEP_POLICY_NEVER.

See Also:
Constant Field Values

WIFI_SLEEP_POLICY_DEFAULT

public static final int WIFI_SLEEP_POLICY_DEFAULT
Value for WIFI_SLEEP_POLICY to use the default Wi-Fi sleep policy, which is to sleep shortly after the turning off according to the STAY_ON_WHILE_PLUGGED_IN setting.

See Also:
Constant Field Values

WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED

public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED
Value for WIFI_SLEEP_POLICY to use the default policy when the device is on battery, and never go to sleep when the device is plugged in.

See Also:
Constant Field Values

WIFI_SLEEP_POLICY_NEVER

public static final int WIFI_SLEEP_POLICY_NEVER
Value for WIFI_SLEEP_POLICY to never go to sleep.

See Also:
Constant Field Values

WIFI_USE_STATIC_IP

public static final String WIFI_USE_STATIC_IP
Whether to use static IP and other static network attributes.

Set to 1 for true and 0 for false.

See Also:
Constant Field Values

WIFI_STATIC_IP

public static final String WIFI_STATIC_IP
The static IP address.

Example: "192.168.1.51"

See Also:
Constant Field Values

WIFI_STATIC_GATEWAY

public static final String WIFI_STATIC_GATEWAY
If using static IP, the gateway's IP address.

Example: "192.168.1.1"

See Also:
Constant Field Values

WIFI_STATIC_NETMASK

public static final String WIFI_STATIC_NETMASK
If using static IP, the net mask.

Example: "255.255.255.0"

See Also:
Constant Field Values

WIFI_STATIC_DNS1

public static final String WIFI_STATIC_DNS1
If using static IP, the primary DNS's IP address.

Example: "192.168.1.1"

See Also:
Constant Field Values

WIFI_STATIC_DNS2

public static final String WIFI_STATIC_DNS2
If using static IP, the secondary DNS's IP address.

Example: "192.168.1.2"

See Also:
Constant Field Values

WIFI_NUM_ALLOWED_CHANNELS

public static final String WIFI_NUM_ALLOWED_CHANNELS
The number of radio channels that are allowed in the local 802.11 regulatory domain.

See Also:
Constant Field Values

BLUETOOTH_DISCOVERABILITY

public static final String BLUETOOTH_DISCOVERABILITY
Determines whether remote devices may discover and/or connect to this device.

Type: INT

2 -- discoverable and connectable 1 -- connectable but not discoverable 0 -- neither connectable nor discoverable

See Also:
Constant Field Values

BLUETOOTH_DISCOVERABILITY_TIMEOUT

public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT
Bluetooth discoverability timeout. If this value is nonzero, then Bluetooth becomes discoverable for a certain number of seconds, after which is becomes simply connectable. The value is in seconds.

See Also:
Constant Field Values

LOCK_PATTERN_ENABLED

public static final String LOCK_PATTERN_ENABLED
Whether autolock is enabled (0 = false, 1 = true)

See Also:
Constant Field Values

LOCK_PATTERN_VISIBLE

public static final String LOCK_PATTERN_VISIBLE
Whether lock pattern is visible as user enters (0 = false, 1 = true)

See Also:
Constant Field Values

LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED

public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED
Whether lock pattern will vibrate as user enters (0 = false, 1 = true)

See Also:
Constant Field Values

NEXT_ALARM_FORMATTED

public static final String NEXT_ALARM_FORMATTED
A formatted string of the next alarm that is set, or the empty string if there is no alarm set.

See Also:
Constant Field Values

FONT_SCALE

public static final String FONT_SCALE
Scaling factor for fonts, float.

See Also:
Constant Field Values

DEBUG_APP

public static final String DEBUG_APP
Name of an application package to be debugged.

See Also:
Constant Field Values

WAIT_FOR_DEBUGGER

public static final String WAIT_FOR_DEBUGGER
If 1, when launching DEBUG_APP it will wait for the debugger before starting user code. If 0, it will run normally.

See Also:
Constant Field Values

DIM_SCREEN

public static final String DIM_SCREEN
Whether or not to dim the screen. 0=no 1=yes

See Also:
Constant Field Values

SCREEN_OFF_TIMEOUT

public static final String SCREEN_OFF_TIMEOUT
The timeout before the screen turns off.

See Also:
Constant Field Values

SCREEN_BRIGHTNESS

public static final String SCREEN_BRIGHTNESS
The screen backlight brightness between 0 and 255.

See Also:
Constant Field Values

SHOW_PROCESSES

public static final String SHOW_PROCESSES
Control whether the process CPU usage meter should be shown.

See Also:
Constant Field Values

ALWAYS_FINISH_ACTIVITIES

public static final String ALWAYS_FINISH_ACTIVITIES
If 1, the activity manager will aggressively finish activities and processes as soon as they are no longer needed. If 0, the normal extended lifetime is used.

See Also:
Constant Field Values

MODE_RINGER

public static final String MODE_RINGER
Ringer mode. This is used internally, changing this value will not change the ringer mode. See AudioManager.

See Also:
Constant Field Values

MODE_RINGER_STREAMS_AFFECTED

public static final String MODE_RINGER_STREAMS_AFFECTED
Determines which streams are affected by ringer mode changes. The stream type's bit should be set to 1 if it should be muted when going into an inaudible ringer mode.

See Also:
Constant Field Values

MUTE_STREAMS_AFFECTED

public static final String MUTE_STREAMS_AFFECTED
Determines which streams are affected by mute. The stream type's bit should be set to 1 if it should be muted when a mute request is received.

See Also:
Constant Field Values

VIBRATE_ON

public static final String VIBRATE_ON
Whether vibrate is on for different events. This is used internally, changing this value will not change the vibrate. See AudioManager.

See Also:
Constant Field Values

VOLUME_RING

public static final String VOLUME_RING
Ringer volume. This is used internally, changing this value will not change the volume. See AudioManager.

See Also:
Constant Field Values

VOLUME_SYSTEM

public static final String VOLUME_SYSTEM
System/notifications volume. This is used internally, changing this value will not change the volume. See AudioManager.

See Also:
Constant Field Values

VOLUME_VOICE

public static final String VOLUME_VOICE
Voice call volume. This is used internally, changing this value will not change the volume. See AudioManager.

See Also:
Constant Field Values

VOLUME_MUSIC

public static final String VOLUME_MUSIC
Music/media/gaming volume. This is used internally, changing this value will not change the volume. See AudioManager.

See Also:
Constant Field Values

VOLUME_ALARM

public static final String VOLUME_ALARM
Alarm volume. This is used internally, changing this value will not change the volume. See AudioManager.

See Also:
Constant Field Values

VOLUME_NOTIFICATION

public static final String VOLUME_NOTIFICATION
Notification volume. This is used internally, changing this value will not change the volume. See AudioManager.

See Also:
Constant Field Values

NOTIFICATIONS_USE_RING_VOLUME

public static final String NOTIFICATIONS_USE_RING_VOLUME
Whether the notifications should use the ring volume (value of 1) or a separate notification volume (value of 0). In most cases, users will have this enabled so the notification and ringer volumes will be the same. However, power users can disable this and use the separate notification volume control.

Note: This is a one-off setting that will be removed in the future when there is profile support. For this reason, it is kept hidden from the public APIs.

See Also:
Constant Field Values

VOLUME_SETTINGS

public static final String[] VOLUME_SETTINGS
The mapping of stream type (integer) to its setting.


APPEND_FOR_LAST_AUDIBLE

public static final String APPEND_FOR_LAST_AUDIBLE
Appended to various volume related settings to record the previous values before they the settings were affected by a silent/vibrate ringer mode change.

See Also:
Constant Field Values

RINGTONE

public static final String RINGTONE
Persistent store for the system-wide default ringtone URI.

If you need to play the default ringtone at any given time, it is recommended you give DEFAULT_RINGTONE_URI to the media player. It will resolve to the set default ringtone at the time of playing.

See Also:
DEFAULT_RINGTONE_URI, Constant Field Values

DEFAULT_RINGTONE_URI

public static final Uri DEFAULT_RINGTONE_URI
A Uri that will point to the current default ringtone at any given time.

If the current default ringtone is in the DRM provider and the caller does not have permission, the exception will be a FileNotFoundException.


NOTIFICATION_SOUND

public static final String NOTIFICATION_SOUND
Persistent store for the system-wide default notification sound.

See Also:
RINGTONE, DEFAULT_NOTIFICATION_URI, Constant Field Values

DEFAULT_NOTIFICATION_URI

public static final Uri DEFAULT_NOTIFICATION_URI
A Uri that will point to the current default notification sound at any given time.

See Also:
DEFAULT_RINGTONE_URI

TEXT_AUTO_REPLACE

public static final String TEXT_AUTO_REPLACE
Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off

See Also:
Constant Field Values

TEXT_AUTO_CAPS

public static final String TEXT_AUTO_CAPS
Setting to enable Auto Caps in text editors. 1 = On, 0 = Off

See Also:
Constant Field Values

TEXT_AUTO_PUNCTUATE

public static final String TEXT_AUTO_PUNCTUATE
Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This feature converts two spaces to a "." and space.

See Also:
Constant Field Values

TEXT_SHOW_PASSWORD

public static final String TEXT_SHOW_PASSWORD
Setting to showing password characters in text editors. 1 = On, 0 = Off

See Also:
Constant Field Values

SHOW_GTALK_SERVICE_STATUS

public static final String SHOW_GTALK_SERVICE_STATUS
See Also:
Constant Field Values

WALLPAPER_ACTIVITY

public static final String WALLPAPER_ACTIVITY
Name of activity to use for wallpaper on the home screen.

See Also:
Constant Field Values

AUTO_TIME

public static final String AUTO_TIME
Value to specify if the user prefers the date, time and time zone to be automatically fetched from the network (NITZ). 1=yes, 0=no

See Also:
Constant Field Values

TIME_12_24

public static final String TIME_12_24
Display times as 12 or 24 hours 12 24

See Also:
Constant Field Values

DATE_FORMAT

public static final String DATE_FORMAT
Date format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd

See Also:
Constant Field Values

SETUP_WIZARD_HAS_RUN

public static final String SETUP_WIZARD_HAS_RUN
Whether the setup wizard has been run before (on first boot), or if it still needs to be run. nonzero = it has been run in the past 0 = it has not been run in the past

See Also:
Constant Field Values

WINDOW_ANIMATION_SCALE

public static final String WINDOW_ANIMATION_SCALE
Scaling factor for normal window animations. Setting to 0 will disable window animations.

See Also:
Constant Field Values

TRANSITION_ANIMATION_SCALE

public static final String TRANSITION_ANIMATION_SCALE
Scaling factor for activity transition animations. Setting to 0 will disable window animations.

See Also:
Constant Field Values

ACCELEROMETER_ROTATION

public static final String ACCELEROMETER_ROTATION
Control whether the accelerometer will be used to change screen orientation. If 0, it will not be used unless explicitly requested by the application; if 1, it will be used by default unless explicitly disabled by the application.

See Also:
Constant Field Values

DTMF_TONE_WHEN_DIALING

public static final String DTMF_TONE_WHEN_DIALING
Whether the audible DTMF tones are played by the dialer when dialing. The value is boolean (1 or 0).

See Also:
Constant Field Values

SOUND_EFFECTS_ENABLED

public static final String SOUND_EFFECTS_ENABLED
Whether the sounds effects (key clicks, lid open ...) are enabled. The value is boolean (1 or 0).

See Also:
Constant Field Values

ADB_ENABLED

@Deprecated
public static final String ADB_ENABLED
Deprecated. Use Settings.Secure.LOCATION_PROVIDERS_ALLOWED instead
See Also:
Constant Field Values

ANDROID_ID

@Deprecated
public static final String ANDROID_ID
Deprecated. Use Settings.Secure.ANDROID_ID instead
See Also:
Constant Field Values

BLUETOOTH_ON

@Deprecated
public static final String BLUETOOTH_ON
Deprecated. Use Settings.Secure.BLUETOOTH_ON instead
See Also:
Constant Field Values

DATA_ROAMING

@Deprecated
public static final String DATA_ROAMING
Deprecated. Use Settings.Secure.DATA_ROAMING instead
See Also:
Constant Field Values

DEVICE_PROVISIONED

@Deprecated
public static final String DEVICE_PROVISIONED
Deprecated. Use Settings.Secure.DEVICE_PROVISIONED instead
See Also:
Constant Field Values

HTTP_PROXY

@Deprecated
public static final String HTTP_PROXY
Deprecated. Use Settings.Secure.HTTP_PROXY instead
See Also:
Constant Field Values

INSTALL_NON_MARKET_APPS

@Deprecated
public static final String INSTALL_NON_MARKET_APPS
Deprecated. Use Settings.Secure.INSTALL_NON_MARKET_APPS instead
See Also:
Constant Field Values

LOCATION_PROVIDERS_ALLOWED

@Deprecated
public static final String LOCATION_PROVIDERS_ALLOWED
Deprecated. Use Settings.Secure.LOCATION_PROVIDERS_ALLOWED instead
See Also:
Constant Field Values

LOGGING_ID

@Deprecated
public static final String LOGGING_ID
Deprecated. Use Settings.Secure.LOGGING_ID instead
See Also:
Constant Field Values

NETWORK_PREFERENCE

@Deprecated
public static final String NETWORK_PREFERENCE
Deprecated. Use Settings.Secure.NETWORK_PREFERENCE instead
See Also:
Constant Field Values

PARENTAL_CONTROL_ENABLED

@Deprecated
public static final String PARENTAL_CONTROL_ENABLED
Deprecated. Use Settings.Secure.PARENTAL_CONTROL_ENABLED instead
See Also:
Constant Field Values

PARENTAL_CONTROL_LAST_UPDATE

@Deprecated
public static final String PARENTAL_CONTROL_LAST_UPDATE
Deprecated. Use Settings.Secure.PARENTAL_CONTROL_LAST_UPDATE instead
See Also:
Constant Field Values

PARENTAL_CONTROL_REDIRECT_URL

@Deprecated
public static final String PARENTAL_CONTROL_REDIRECT_URL
Deprecated. Use Settings.Secure.PARENTAL_CONTROL_REDIRECT_URL instead
See Also:
Constant Field Values

SETTINGS_CLASSNAME

@Deprecated
public static final String SETTINGS_CLASSNAME
Deprecated. Use Settings.Secure.SETTINGS_CLASSNAME instead
See Also:
Constant Field Values

USB_MASS_STORAGE_ENABLED

@Deprecated
public static final String USB_MASS_STORAGE_ENABLED
Deprecated. Use Settings.Secure.USB_MASS_STORAGE_ENABLED instead
See Also:
Constant Field Values

USE_GOOGLE_MAIL

@Deprecated
public static final String USE_GOOGLE_MAIL
Deprecated. Use Settings.Secure.USE_GOOGLE_MAIL instead
See Also:
Constant Field Values

WIFI_MAX_DHCP_RETRY_COUNT

@Deprecated
public static final String WIFI_MAX_DHCP_RETRY_COUNT
Deprecated. 
See Also:
Constant Field Values

WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS

@Deprecated
public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS
Deprecated. 
See Also:
Constant Field Values

WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON

@Deprecated
public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON
Deprecated. Use Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON instead
See Also:
Constant Field Values

WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY

@Deprecated
public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY
Deprecated. Use Settings.Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY instead
See Also:
Constant Field Values

WIFI_NUM_OPEN_NETWORKS_KEPT

@Deprecated
public static final String WIFI_NUM_OPEN_NETWORKS_KEPT
Deprecated. Use Settings.Secure.WIFI_NUM_OPEN_NETWORKS_KEPT instead
See Also:
Constant Field Values

WIFI_ON

@Deprecated
public static final String WIFI_ON
Deprecated. Use Settings.Secure.WIFI_ON instead
See Also:
Constant Field Values

WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE

@Deprecated
public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE instead
See Also:
Constant Field Values

WIFI_WATCHDOG_AP_COUNT

@Deprecated
public static final String WIFI_WATCHDOG_AP_COUNT
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_AP_COUNT instead
See Also:
Constant Field Values

WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS

@Deprecated
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS instead
See Also:
Constant Field Values

WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED

@Deprecated
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED instead
See Also:
Constant Field Values

WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS

@Deprecated
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS instead
See Also:
Constant Field Values

WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT

@Deprecated
public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT instead
See Also:
Constant Field Values

WIFI_WATCHDOG_MAX_AP_CHECKS

@Deprecated
public static final String WIFI_WATCHDOG_MAX_AP_CHECKS
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_MAX_AP_CHECKS instead
See Also:
Constant Field Values

WIFI_WATCHDOG_ON

@Deprecated
public static final String WIFI_WATCHDOG_ON
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_ON instead
See Also:
Constant Field Values

WIFI_WATCHDOG_PING_COUNT

@Deprecated
public static final String WIFI_WATCHDOG_PING_COUNT
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_PING_COUNT instead
See Also:
Constant Field Values

WIFI_WATCHDOG_PING_DELAY_MS

@Deprecated
public static final String WIFI_WATCHDOG_PING_DELAY_MS
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_PING_DELAY_MS instead
See Also:
Constant Field Values

WIFI_WATCHDOG_PING_TIMEOUT_MS

@Deprecated
public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS
Deprecated. Use Settings.Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS instead
See Also:
Constant Field Values
Constructor Detail

Settings.System

public Settings.System()
Method Detail

getString

public static String getString(ContentResolver resolver,
                               String name)
Look up a name in the database.

Parameters:
resolver - to access the database with
name - to look up in the table
Returns:
the corresponding value, or null if not present

putString

public static boolean putString(ContentResolver resolver,
                                String name,
                                String value)
Store a name/value pair into the database.

Parameters:
resolver - to access the database with
name - to store
value - to associate with the name
Returns:
true if the value was set, false on database errors

getUriFor

public static Uri getUriFor(String name)
Construct the content URI for a particular name/value pair, useful for monitoring changes with a ContentObserver.

Parameters:
name - to look up in the table
Returns:
the corresponding content URI, or null if not present

getInt

public static int getInt(ContentResolver cr,
                         String name,
                         int def)
Convenience function for retrieving a single system 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 - The ContentResolver to access.
name - The name of the setting to retrieve.
def - Value to return if the setting is not defined.
Returns:
The setting's current value, or 'def' if it is not defined or not a valid integer.

getInt

public static int getInt(ContentResolver cr,
                         String name)
                  throws Settings.SettingNotFoundException
Convenience function for retrieving a single system 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 Settings.SettingNotFoundException.

Parameters:
cr - The ContentResolver to access.
name - The name of the setting to retrieve.
Returns:
The setting's current value.
Throws:
Settings.SettingNotFoundException - Thrown if a setting by the given name can't be found or the setting value is not an integer.

putInt

public static boolean putInt(ContentResolver cr,
                             String name,
                             int value)
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 - The ContentResolver to access.
name - The name of the setting to modify.
value - The new value for the setting.
Returns:
true if the value was set, false on database errors

getLong

public static long getLong(ContentResolver cr,
                           String name,
                           long def)
Convenience function for retrieving a single system 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 - The ContentResolver to access.
name - The name of the setting to retrieve.
def - Value to return if the setting is not defined.
Returns:
The setting's current value, or 'def' if it is not defined or not a valid long.

getLong

public static long getLong(ContentResolver cr,
                           String name)
                    throws Settings.SettingNotFoundException
Convenience function for retrieving a single system 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 Settings.SettingNotFoundException.

Parameters:
cr - The ContentResolver to access.
name - The name of the setting to retrieve.
Returns:
The setting's current value.
Throws:
Settings.SettingNotFoundException - Thrown if a setting by the given name can't be found or the setting value is not an integer.

putLong

public static boolean putLong(ContentResolver cr,
                              String name,
                              long value)
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 - The ContentResolver to access.
name - The name of the setting to modify.
value - The new value for the setting.
Returns:
true if the value was set, false on database errors

getFloat

public static float getFloat(ContentResolver cr,
                             String name,
                             float def)
Convenience function for retrieving a single system 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 - The ContentResolver to access.
name - The name of the setting to retrieve.
def - Value to return if the setting is not defined.
Returns:
The setting's current value, or 'def' if it is not defined or not a valid float.

getFloat

public static float getFloat(ContentResolver cr,
                             String name)
                      throws Settings.SettingNotFoundException
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 Settings.SettingNotFoundException.

Parameters:
cr - The ContentResolver to access.
name - The name of the setting to retrieve.
Returns:
The setting's current value.
Throws:
Settings.SettingNotFoundException - Thrown if a setting by the given name can't be found or the setting value is not a float.

putFloat

public static boolean putFloat(ContentResolver cr,
                               String name,
                               float value)
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 - The ContentResolver to access.
name - The name of the setting to modify.
value - The new value for the setting.
Returns:
true if the value was set, false on database errors

getConfiguration

public static void getConfiguration(ContentResolver cr,
                                    Configuration outConfig)
Convenience function to read all of the current configuration-related settings into a Configuration object.

Parameters:
cr - The ContentResolver to access.
outConfig - Where to place the configuration settings.

putConfiguration

public static boolean putConfiguration(ContentResolver cr,
                                       Configuration config)
Convenience function to write a batch of configuration-related settings from a Configuration object.

Parameters:
cr - The ContentResolver to access.
config - The settings to write.
Returns:
true if the values were set, false on database errors

getShowGTalkServiceStatus

public static boolean getShowGTalkServiceStatus(ContentResolver cr)

setShowGTalkServiceStatus

public static void setShowGTalkServiceStatus(ContentResolver cr,
                                             boolean flag)

Build 1.1_r1 (from source)

Please submit a feedback, bug or feature