blob: d773d4aef5c2c459f4296079c115b11f80291613 [file] [log] [blame]
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.provider;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.app.SearchManager;
import android.app.WallpaperManager;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.IContentProvider;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.database.Cursor;
import android.database.SQLException;
import android.location.LocationManager;
import android.net.ConnectivityManager;
import android.net.Uri;
import android.net.wifi.WifiManager;
import android.os.BatteryManager;
import android.os.Bundle;
import android.os.DropBoxManager;
import android.os.IBinder;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.Build.VERSION_CODES;
import android.speech.tts.TextToSpeech;
import android.text.TextUtils;
import android.util.AndroidException;
import android.util.Log;
import com.android.internal.widget.ILockSettings;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
/**
* The Settings provider contains global system-level device preferences.
*/
public final class Settings {
// Intent actions for Settings
/**
* Activity Action: Show system settings.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_SETTINGS = "android.settings.SETTINGS";
/**
* Activity Action: Show settings to allow configuration of APNs.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of current location
* sources.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_LOCATION_SOURCE_SETTINGS =
"android.settings.LOCATION_SOURCE_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of wireless controls
* such as Wi-Fi, Bluetooth and Mobile networks.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_WIRELESS_SETTINGS =
"android.settings.WIRELESS_SETTINGS";
/**
* Activity Action: Show settings to allow entering/exiting airplane mode.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_AIRPLANE_MODE_SETTINGS =
"android.settings.AIRPLANE_MODE_SETTINGS";
/**
* @hide
* Activity Action: Modify Airplane mode settings using the users voice.
* <p>
* In some cases, a matching Activity may not exist, so ensure you safeguard against this.
* <p>
* This intent MUST be started using
* {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
* startVoiceActivity}.
* <p>
* To tell which state airplane mode should be set to, add the
* {@link #EXTRA_AIRPLANE_MODE_ENABLED} extra to this Intent with the state specified.
* If there is no extra in this Intent, no changes will be made.
* <p>
* The activity should verify that
* {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before
* modifying the setting.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
@SystemApi
public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE =
"android.settings.VOICE_CONTROL_AIRPLANE_MODE";
/**
* Activity Action: Show settings for accessibility modules.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_ACCESSIBILITY_SETTINGS =
"android.settings.ACCESSIBILITY_SETTINGS";
/**
* Activity Action: Show settings to control access to usage information.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_USAGE_ACCESS_SETTINGS =
"android.settings.USAGE_ACCESS_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of security and
* location privacy.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_SECURITY_SETTINGS =
"android.settings.SECURITY_SETTINGS";
/**
* Activity Action: Show trusted credentials settings, opening to the user tab,
* to allow management of installed credentials.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_TRUSTED_CREDENTIALS_USER =
"com.android.settings.TRUSTED_CREDENTIALS_USER";
/**
* Activity Action: Show dialog explaining that an installed CA cert may enable
* monitoring of encrypted network traffic.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_MONITORING_CERT_INFO =
"com.android.settings.MONITORING_CERT_INFO";
/**
* Activity Action: Show settings to allow configuration of privacy options.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_PRIVACY_SETTINGS =
"android.settings.PRIVACY_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of Wi-Fi.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_WIFI_SETTINGS =
"android.settings.WIFI_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of a static IP
* address for Wi-Fi.
* <p>
* In some cases, a matching Activity may not exist, so ensure you safeguard
* against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_WIFI_IP_SETTINGS =
"android.settings.WIFI_IP_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of Bluetooth.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_BLUETOOTH_SETTINGS =
"android.settings.BLUETOOTH_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of Wifi Displays.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_WIFI_DISPLAY_SETTINGS =
"android.settings.WIFI_DISPLAY_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of
* cast endpoints.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_CAST_SETTINGS =
"android.settings.CAST_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of date and time.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_DATE_SETTINGS =
"android.settings.DATE_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of sound and volume.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_SOUND_SETTINGS =
"android.settings.SOUND_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of display.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_DISPLAY_SETTINGS =
"android.settings.DISPLAY_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of locale.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_LOCALE_SETTINGS =
"android.settings.LOCALE_SETTINGS";
/**
* Activity Action: Show settings to configure input methods, in particular
* allowing the user to enable input methods.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_VOICE_INPUT_SETTINGS =
"android.settings.VOICE_INPUT_SETTINGS";
/**
* Activity Action: Show settings to configure input methods, in particular
* allowing the user to enable input methods.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_INPUT_METHOD_SETTINGS =
"android.settings.INPUT_METHOD_SETTINGS";
/**
* Activity Action: Show settings to enable/disable input method subtypes.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* To tell which input method's subtypes are displayed in the settings, add
* {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id.
* If there is no extra in this Intent, subtypes from all installed input methods
* will be displayed in the settings.
*
* @see android.view.inputmethod.InputMethodInfo#getId
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS =
"android.settings.INPUT_METHOD_SUBTYPE_SETTINGS";
/**
* Activity Action: Show a dialog to select input method.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_SHOW_INPUT_METHOD_PICKER =
"android.settings.SHOW_INPUT_METHOD_PICKER";
/**
* Activity Action: Show settings to manage the user input dictionary.
* <p>
* Starting with {@link android.os.Build.VERSION_CODES#KITKAT},
* it is guaranteed there will always be an appropriate implementation for this Intent action.
* In prior releases of the platform this was optional, so ensure you safeguard against it.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_USER_DICTIONARY_SETTINGS =
"android.settings.USER_DICTIONARY_SETTINGS";
/**
* Activity Action: Adds a word to the user dictionary.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: An extra with key <code>word</code> that contains the word
* that should be added to the dictionary.
* <p>
* Output: Nothing.
*
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_USER_DICTIONARY_INSERT =
"com.android.settings.USER_DICTIONARY_INSERT";
/**
* Activity Action: Show settings to allow configuration of application-related settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_APPLICATION_SETTINGS =
"android.settings.APPLICATION_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of application
* development-related settings. As of
* {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is
* a required part of the platform.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS =
"android.settings.APPLICATION_DEVELOPMENT_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of quick launch shortcuts.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_QUICK_LAUNCH_SETTINGS =
"android.settings.QUICK_LAUNCH_SETTINGS";
/**
* Activity Action: Show settings to manage installed applications.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS =
"android.settings.MANAGE_APPLICATIONS_SETTINGS";
/**
* Activity Action: Show settings to manage all applications.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS =
"android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS";
/**
* Activity Action: Show screen of details about a particular application.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: The Intent's data URI specifies the application package name
* to be shown, with the "package" scheme. That is "package:com.my.app".
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_APPLICATION_DETAILS_SETTINGS =
"android.settings.APPLICATION_DETAILS_SETTINGS";
/**
* @hide
* Activity Action: Show the "app ops" settings screen.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_APP_OPS_SETTINGS =
"android.settings.APP_OPS_SETTINGS";
/**
* Activity Action: Show settings for system update functionality.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_SYSTEM_UPDATE_SETTINGS =
"android.settings.SYSTEM_UPDATE_SETTINGS";
/**
* Activity Action: Show settings to allow configuration of sync settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* The account types available to add via the add account button may be restricted by adding an
* {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's
* authorities. Only account types which can sync with that content provider will be offered to
* the user.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_SYNC_SETTINGS =
"android.settings.SYNC_SETTINGS";
/**
* Activity Action: Show add account screen for creating a new account.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES}
* extra to the Intent with one or more syncable content provider's authorities. Only account
* types which can sync with that content provider will be offered to the user.
* <p>
* Account types can also be filtered by adding an {@link #EXTRA_ACCOUNT_TYPES} extra to the
* Intent with one or more account types.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_ADD_ACCOUNT =
"android.settings.ADD_ACCOUNT_SETTINGS";
/**
* Activity Action: Show settings for selecting the network operator.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_NETWORK_OPERATOR_SETTINGS =
"android.settings.NETWORK_OPERATOR_SETTINGS";
/**
* Activity Action: Show settings for selection of 2G/3G.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_DATA_ROAMING_SETTINGS =
"android.settings.DATA_ROAMING_SETTINGS";
/**
* Activity Action: Show settings for internal storage.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_INTERNAL_STORAGE_SETTINGS =
"android.settings.INTERNAL_STORAGE_SETTINGS";
/**
* Activity Action: Show settings for memory card storage.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_MEMORY_CARD_SETTINGS =
"android.settings.MEMORY_CARD_SETTINGS";
/**
* Activity Action: Show settings for global search.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_SEARCH_SETTINGS =
"android.search.action.SEARCH_SETTINGS";
/**
* Activity Action: Show general device information settings (serial
* number, software version, phone number, etc.).
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_DEVICE_INFO_SETTINGS =
"android.settings.DEVICE_INFO_SETTINGS";
/**
* Activity Action: Show NFC settings.
* <p>
* This shows UI that allows NFC to be turned on or off.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing
* @see android.nfc.NfcAdapter#isEnabled()
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS";
/**
* Activity Action: Show NFC Sharing settings.
* <p>
* This shows UI that allows NDEF Push (Android Beam) to be turned on or
* off.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing
* @see android.nfc.NfcAdapter#isNdefPushEnabled()
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_NFCSHARING_SETTINGS =
"android.settings.NFCSHARING_SETTINGS";
/**
* Activity Action: Show NFC Tap & Pay settings
* <p>
* This shows UI that allows the user to configure Tap&Pay
* settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_NFC_PAYMENT_SETTINGS =
"android.settings.NFC_PAYMENT_SETTINGS";
/**
* Activity Action: Show Daydream settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
* @see android.service.dreams.DreamService
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS";
/**
* Activity Action: Show Notification listener settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
* @see android.service.notification.NotificationListenerService
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS
= "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS";
/**
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_CONDITION_PROVIDER_SETTINGS
= "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS";
/**
* Activity Action: Show settings for video captioning.
* <p>
* In some cases, a matching Activity may not exist, so ensure you safeguard
* against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS";
/**
* Activity Action: Show the top level print settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_PRINT_SETTINGS =
"android.settings.ACTION_PRINT_SETTINGS";
/**
* Activity Action: Show Zen Mode configuration settings.
*
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS";
/**
* Activity Action: Show the regulatory information screen for the device.
* <p>
* In some cases, a matching Activity may not exist, so ensure you safeguard
* against this.
* <p>
* Input: Nothing.
* <p>
* Output: Nothing.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String
ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO";
/**
* Activity Action: Show Device Name Settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you safeguard
* against this.
*
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME";
/**
* Activity Action: Show pairing settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you safeguard
* against this.
*
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS";
/**
* Activity Action: Show battery saver settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you safeguard
* against this.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_BATTERY_SAVER_SETTINGS
= "android.settings.BATTERY_SAVER_SETTINGS";
/**
* Activity Action: Show Home selection settings. If there are multiple activities
* that can satisfy the {@link Intent#CATEGORY_HOME} intent, this screen allows you
* to pick your preferred activity.
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_HOME_SETTINGS
= "android.settings.HOME_SETTINGS";
/**
* Activity Action: Show notification settings.
*
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_NOTIFICATION_SETTINGS
= "android.settings.NOTIFICATION_SETTINGS";
/**
* Activity Action: Show notification settings for a single app.
*
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_APP_NOTIFICATION_SETTINGS
= "android.settings.APP_NOTIFICATION_SETTINGS";
/**
* Activity Action: Show notification redaction settings.
*
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_APP_NOTIFICATION_REDACTION
= "android.settings.ACTION_APP_NOTIFICATION_REDACTION";
/** @hide */ public static final String EXTRA_APP_UID = "app_uid";
/** @hide */ public static final String EXTRA_APP_PACKAGE = "app_package";
// End of Intent actions for Settings
/**
* @hide - Private call() method on SettingsProvider to read from 'system' table.
*/
public static final String CALL_METHOD_GET_SYSTEM = "GET_system";
/**
* @hide - Private call() method on SettingsProvider to read from 'secure' table.
*/
public static final String CALL_METHOD_GET_SECURE = "GET_secure";
/**
* @hide - Private call() method on SettingsProvider to read from 'global' table.
*/
public static final String CALL_METHOD_GET_GLOBAL = "GET_global";
/**
* @hide - User handle argument extra to the fast-path call()-based requests
*/
public static final String CALL_METHOD_USER_KEY = "_user";
/** @hide - Private call() method to write to 'system' table */
public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system";
/** @hide - Private call() method to write to 'secure' table */
public static final String CALL_METHOD_PUT_SECURE = "PUT_secure";
/** @hide - Private call() method to write to 'global' table */
public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global";
/**
* Activity Extra: Limit available options in launched activity based on the given authority.
* <p>
* This can be passed as an extra field in an Activity Intent with one or more syncable content
* provider's authorities as a String[]. This field is used by some intents to alter the
* behavior of the called activity.
* <p>
* Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based
* on the authority given.
*/
public static final String EXTRA_AUTHORITIES = "authorities";
/**
* Activity Extra: Limit available options in launched activity based on the given account
* types.
* <p>
* This can be passed as an extra field in an Activity Intent with one or more account types
* as a String[]. This field is used by some intents to alter the behavior of the called
* activity.
* <p>
* Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types to the specified
* list.
*/
public static final String EXTRA_ACCOUNT_TYPES = "account_types";
public static final String EXTRA_INPUT_METHOD_ID = "input_method_id";
/**
* Activity Extra: The device identifier to act upon.
* <p>
* This can be passed as an extra field in an Activity Intent with a single
* InputDeviceIdentifier. This field is used by some activities to jump straight into the
* settings for the given device.
* <p>
* Example: The {@link #ACTION_INPUT_METHOD_SETTINGS} intent opens the keyboard layout
* dialog for the given device.
* @hide
*/
public static final String EXTRA_INPUT_DEVICE_IDENTIFIER = "input_device_identifier";
/**
* @hide
* Activity Extra: Enable or disable Airplane Mode.
* <p>
* This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE}
* intent as a boolean.
*/
@SystemApi
public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled";
private static final String JID_RESOURCE_PREFIX = "android";
public static final String AUTHORITY = "settings";
private static final String TAG = "Settings";
private static final boolean LOCAL_LOGV = false;
// Lock ensures that when enabling/disabling the master location switch, we don't end up
// with a partial enable/disable state in multi-threaded situations.
private static final Object mLocationSettingsLock = new Object();
public static class SettingNotFoundException extends AndroidException {
public SettingNotFoundException(String msg) {
super(msg);
}
}
/**
* Common base for tables of name/value settings.
*/
public static class NameValueTable implements BaseColumns {
public static final String NAME = "name";
public static final String VALUE = "value";
protected static boolean putString(ContentResolver resolver, Uri uri,
String name, String value) {
// The database will take care of replacing duplicates.
try {
ContentValues values = new ContentValues();
values.put(NAME, name);
values.put(VALUE, value);
resolver.insert(uri, values);
return true;
} catch (SQLException e) {
Log.w(TAG, "Can't set key " + name + " in " + uri, e);
return false;
}
}
public static Uri getUriFor(Uri uri, String name) {
return Uri.withAppendedPath(uri, name);
}
}
// Thread-safe.
private static class NameValueCache {
private final String mVersionSystemProperty;
private final Uri mUri;
private static final String[] SELECT_VALUE =
new String[] { Settings.NameValueTable.VALUE };
private static final String NAME_EQ_PLACEHOLDER = "name=?";
// Must synchronize on 'this' to access mValues and mValuesVersion.
private final HashMap<String, String> mValues = new HashMap<String, String>();
private long mValuesVersion = 0;
// Initially null; set lazily and held forever. Synchronized on 'this'.
private IContentProvider mContentProvider = null;
// The method we'll call (or null, to not use) on the provider
// for the fast path of retrieving settings.
private final String mCallGetCommand;
private final String mCallSetCommand;
public NameValueCache(String versionSystemProperty, Uri uri,
String getCommand, String setCommand) {
mVersionSystemProperty = versionSystemProperty;
mUri = uri;
mCallGetCommand = getCommand;
mCallSetCommand = setCommand;
}
private IContentProvider lazyGetProvider(ContentResolver cr) {
IContentProvider cp = null;
synchronized (this) {
cp = mContentProvider;
if (cp == null) {
cp = mContentProvider = cr.acquireProvider(mUri.getAuthority());
}
}
return cp;
}
public boolean putStringForUser(ContentResolver cr, String name, String value,
final int userHandle) {
try {
Bundle arg = new Bundle();
arg.putString(Settings.NameValueTable.VALUE, value);
arg.putInt(CALL_METHOD_USER_KEY, userHandle);
IContentProvider cp = lazyGetProvider(cr);
cp.call(cr.getPackageName(), mCallSetCommand, name, arg);
} catch (RemoteException e) {
Log.w(TAG, "Can't set key " + name + " in " + mUri, e);
return false;
}
return true;
}
public String getStringForUser(ContentResolver cr, String name, final int userHandle) {
final boolean isSelf = (userHandle == UserHandle.myUserId());
if (isSelf) {
long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0);
// Our own user's settings data uses a client-side cache
synchronized (this) {
if (mValuesVersion != newValuesVersion) {
if (LOCAL_LOGV || false) {
Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current "
+ newValuesVersion + " != cached " + mValuesVersion);
}
mValues.clear();
mValuesVersion = newValuesVersion;
}
if (mValues.containsKey(name)) {
return mValues.get(name); // Could be null, that's OK -- negative caching
}
}
} else {
if (LOCAL_LOGV) Log.v(TAG, "get setting for user " + userHandle
+ " by user " + UserHandle.myUserId() + " so skipping cache");
}
IContentProvider cp = lazyGetProvider(cr);
// Try the fast path first, not using query(). If this
// fails (alternate Settings provider that doesn't support
// this interface?) then we fall back to the query/table
// interface.
if (mCallGetCommand != null) {
try {
Bundle args = null;
if (!isSelf) {
args = new Bundle();
args.putInt(CALL_METHOD_USER_KEY, userHandle);
}
Bundle b = cp.call(cr.getPackageName(), mCallGetCommand, name, args);
if (b != null) {
String value = b.getPairValue();
// Don't update our cache for reads of other users' data
if (isSelf) {
synchronized (this) {
mValues.put(name, value);
}
} else {
if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle
+ " by " + UserHandle.myUserId()
+ " so not updating cache");
}
return value;
}
// If the response Bundle is null, we fall through
// to the query interface below.
} catch (RemoteException e) {
// Not supported by the remote side? Fall through
// to query().
}
}
Cursor c = null;
try {
c = cp.query(cr.getPackageName(), mUri, SELECT_VALUE, NAME_EQ_PLACEHOLDER,
new String[]{name}, null, null);
if (c == null) {
Log.w(TAG, "Can't get key " + name + " from " + mUri);
return null;
}
String value = c.moveToNext() ? c.getString(0) : null;
synchronized (this) {
mValues.put(name, value);
}
if (LOCAL_LOGV) {
Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " +
name + " = " + (value == null ? "(null)" : value));
}
return value;
} catch (RemoteException e) {
Log.w(TAG, "Can't get key " + name + " from " + mUri, e);
return null; // Return null, but don't cache it.
} finally {
if (c != null) c.close();
}
}
}
/**
* System settings, containing miscellaneous system preferences. This
* table holds simple name/value pairs. There are convenience
* functions for accessing individual settings entries.
*/
public static final class System extends NameValueTable {
public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version";
/**
* The content:// style URL for this table
*/
public static final Uri CONTENT_URI =
Uri.parse("content://" + AUTHORITY + "/system");
private static final NameValueCache sNameValueCache = new NameValueCache(
SYS_PROP_SETTING_VERSION,
CONTENT_URI,
CALL_METHOD_GET_SYSTEM,
CALL_METHOD_PUT_SYSTEM);
private static final HashSet<String> MOVED_TO_SECURE;
static {
MOVED_TO_SECURE = new HashSet<String>(30);
MOVED_TO_SECURE.add(Secure.ANDROID_ID);
MOVED_TO_SECURE.add(Secure.HTTP_PROXY);
MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED);
MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS);
MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED);
MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE);
MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
MOVED_TO_SECURE.add(Secure.LOGGING_ID);
MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED);
MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE);
MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL);
MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME);
MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL);
MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON);
MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY);
MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT);
MOVED_TO_SECURE.add(Secure.WIFI_ON);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS);
MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS);
// At one time in System, then Global, but now back in Secure
MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS);
}
private static final HashSet<String> MOVED_TO_GLOBAL;
private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL;
static {
MOVED_TO_GLOBAL = new HashSet<String>();
MOVED_TO_SECURE_THEN_GLOBAL = new HashSet<String>();
// these were originally in system but migrated to secure in the past,
// so are duplicated in the Secure.* namespace
MOVED_TO_SECURE_THEN_GLOBAL.add(Global.ADB_ENABLED);
MOVED_TO_SECURE_THEN_GLOBAL.add(Global.BLUETOOTH_ON);
MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DATA_ROAMING);
MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DEVICE_PROVISIONED);
MOVED_TO_SECURE_THEN_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED);
MOVED_TO_SECURE_THEN_GLOBAL.add(Global.HTTP_PROXY);
// these are moving directly from system to global
MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON);
MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS);
MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS);
MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME);
MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE);
MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND);
MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND);
MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND);
MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND);
MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED);
MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND);
MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND);
MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND);
MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED);
MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN);
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY);
MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER);
MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE);
MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE);
MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE);
MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS);
MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE);
MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE);
MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY);
MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP);
MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER);
MOVED_TO_GLOBAL.add(Settings.Global.SHOW_PROCESSES);
MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES);
MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_CONTENT_URL);
MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_METADATA_URL);
MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_CONTENT_URL);
MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_METADATA_URL);
MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL);
MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL);
MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_CONTENT_URL);
MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL);
}
/** @hide */
public static void getMovedKeys(HashSet<String> outKeySet) {
outKeySet.addAll(MOVED_TO_GLOBAL);
outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL);
}
/** @hide */
public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) {
outKeySet.addAll(MOVED_TO_GLOBAL);
}
/**
* Look up a name in the database.
* @param resolver to access the database with
* @param name to look up in the table
* @return the corresponding value, or null if not present
*/
public static String getString(ContentResolver resolver, String name) {
return getStringForUser(resolver, name, UserHandle.myUserId());
}
/** @hide */
public static String getStringForUser(ContentResolver resolver, String name,
int userHandle) {
if (MOVED_TO_SECURE.contains(name)) {
Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
+ " to android.provider.Settings.Secure, returning read-only value.");
return Secure.getStringForUser(resolver, name, userHandle);
}
if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
+ " to android.provider.Settings.Global, returning read-only value.");
return Global.getStringForUser(resolver, name, userHandle);
}
return sNameValueCache.getStringForUser(resolver, name, userHandle);
}
/**
* Store a name/value pair into the database.
* @param resolver to access the database with
* @param name to store
* @param value to associate with the name
* @return true if the value was set, false on database errors
*/
public static boolean putString(ContentResolver resolver, String name, String value) {
return putStringForUser(resolver, name, value, UserHandle.myUserId());
}
/** @hide */
public static boolean putStringForUser(ContentResolver resolver, String name, String value,
int userHandle) {
if (MOVED_TO_SECURE.contains(name)) {
Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
+ " to android.provider.Settings.Secure, value is unchanged.");
return false;
}
if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
+ " to android.provider.Settings.Global, value is unchanged.");
return false;
}
return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
}
/**
* Construct the content URI for a particular name/value pair,
* useful for monitoring changes with a ContentObserver.
* @param name to look up in the table
* @return the corresponding content URI, or null if not present
*/
public static Uri getUriFor(String name) {
if (MOVED_TO_SECURE.contains(name)) {
Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
+ " to android.provider.Settings.Secure, returning Secure URI.");
return Secure.getUriFor(Secure.CONTENT_URI, name);
}
if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
+ " to android.provider.Settings.Global, returning read-only global URI.");
return Global.getUriFor(Global.CONTENT_URI, name);
}
return getUriFor(CONTENT_URI, name);
}
/**
* 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.
*
* @param cr The ContentResolver to access.
* @param name The name of the setting to retrieve.
* @param def Value to return if the setting is not defined.
*
* @return The setting's current value, or 'def' if it is not defined
* or not a valid integer.
*/
public static int getInt(ContentResolver cr, String name, int def) {
return getIntForUser(cr, name, def, UserHandle.myUserId());
}
/** @hide */
public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
String v = getStringForUser(cr, name, userHandle);
try {
return v != null ? Integer.parseInt(v) : def;
} catch (NumberFormatException e) {
return 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.
* <p>
* 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 {@link SettingNotFoundException}.
*
* @param cr The ContentResolver to access.
* @param name The name of the setting to retrieve.
*
* @throws SettingNotFoundException Thrown if a setting by the given
* name can't be found or the setting value is not an integer.
*
* @return The setting's current value.
*/
public static int getInt(ContentResolver cr, String name)
throws SettingNotFoundException {
return getIntForUser(cr, name, UserHandle.myUserId());
}
/** @hide */
public static int getIntForUser(ContentResolver cr, String name, int userHandle)
throws SettingNotFoundException {
String v = getStringForUser(cr, name, userHandle);
try {
return Integer.parseInt(v);
} catch (NumberFormatException e) {
throw new SettingNotFoundException(name);
}
}
/**
* 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.
*
* @param cr The ContentResolver to access.
* @param name The name of the setting to modify.
* @param value The new value for the setting.
* @return true if the value was set, false on database errors
*/
public static boolean putInt(ContentResolver cr, String name, int value) {
return putIntForUser(cr, name, value, UserHandle.myUserId());
}
/** @hide */
public static boolean putIntForUser(ContentResolver cr, String name, int value,
int userHandle) {
return putStringForUser(cr, name, Integer.toString(value), userHandle);
}
/**
* Convenience function for retrieving a single system settings value
* as a {@code long}. Note that internally setting values are always
* stored as strings; this function converts the string to a {@code long}
* for you. The default value will be returned if the setting is
* not defined or not a {@code long}.
*
* @param cr The ContentResolver to access.
* @param name The name of the setting to retrieve.
* @param def Value to return if the setting is not defined.
*
* @return The setting's current value, or 'def' if it is not defined
* or not a valid {@code long}.
*/
public static long getLong(ContentResolver cr, String name, long def) {
return getLongForUser(cr, name, def, UserHandle.myUserId());
}
/** @hide */
public static long getLongForUser(ContentResolver cr, String name, long def,
int userHandle) {
String valString = getStringForUser(cr, name, userHandle);
long value;
try {
value = valString != null ? Long.parseLong(valString) : def;
} catch (NumberFormatException e) {
value = def;
}
return value;
}
/**
* Convenience function for retrieving a single system settings value
* as a {@code long}. Note that internally setting values are always
* stored as strings; this function converts the string to a {@code long}
* for you.
* <p>
* 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 {@link SettingNotFoundException}.
*
* @param cr The ContentResolver to access.
* @param name The name of the setting to retrieve.
*
* @return The setting's current value.
* @throws SettingNotFoundException Thrown if a setting by the given
* name can't be found or the setting value is not an integer.
*/
public static long getLong(ContentResolver cr, String name)
throws SettingNotFoundException {
return getLongForUser(cr, name, UserHandle.myUserId());
}
/** @hide */
public static long getLongForUser(ContentResolver cr, String name, int userHandle)
throws SettingNotFoundException {
String valString = getStringForUser(cr, name, userHandle);
try {
return Long.parseLong(valString);
} catch (NumberFormatException e) {
throw new SettingNotFoundException(name);
}
}
/**
* 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.
*
* @param cr The ContentResolver to access.
* @param name The name of the setting to modify.
* @param value The new value for the setting.
* @return true if the value was set, false on database errors
*/
public static boolean putLong(ContentResolver cr, String name, long value) {
return putLongForUser(cr, name, value, UserHandle.myUserId());
}
/** @hide */
public static boolean putLongForUser(ContentResolver cr, String name, long value,
int userHandle) {
return putStringForUser(cr, name, Long.toString(value), userHandle);
}
/**
* 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.
*
* @param cr The ContentResolver to access.
* @param name The name of the setting to retrieve.
* @param def Value to return if the setting is not defined.
*
* @return The setting's current value, or 'def' if it is not defined
* or not a valid float.
*/
public static float getFloat(ContentResolver cr, String name, float def) {
return getFloatForUser(cr, name, def, UserHandle.myUserId());
}
/** @hide */
public static float getFloatForUser(ContentResolver cr, String name, float def,
int userHandle) {
String v = getStringForUser(cr, name, userHandle);
try {
return v != null ? Float.parseFloat(v) : def;
} catch (NumberFormatException e) {
return def;
}
}
/**
* 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.
* <p>
* 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 {@link SettingNotFoundException}.
*
* @param cr The ContentResolver to access.
* @param name The name of the setting to retrieve.
*
* @throws SettingNotFoundException Thrown if a setting by the given
* name can't be found or the setting value is not a float.
*
* @return The setting's current value.
*/
public static float getFloat(ContentResolver cr, String name)
throws SettingNotFoundException {
return getFloatForUser(cr, name, UserHandle.myUserId());
}
/** @hide */
public static float getFloatForUser(ContentResolver cr, String name, int userHandle)
throws SettingNotFoundException {
String v = getStringForUser(cr, name, userHandle);
if (v == null) {
throw new SettingNotFoundException(name);
}
try {
return Float.parseFloat(v);
} catch (NumberFormatException e) {
throw new SettingNotFoundException(name);
}
}
/**
* 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.
*
* @param cr The ContentResolver to access.
* @param name The name of the setting to modify.
* @param value The new value for the setting.
* @return true if the value was set, false on database errors
*/
public static boolean putFloat(ContentResolver cr, String name, float value) {
return putFloatForUser(cr, name, value, UserHandle.myUserId());
}
/** @hide */
public static boolean putFloatForUser(ContentResolver cr, String name, float value,
int userHandle) {
return putStringForUser(cr, name, Float.toString(value), userHandle);
}
/**
* Convenience function to read all of the current
* configuration-related settings into a
* {@link Configuration} object.
*
* @param cr The ContentResolver to access.
* @param outConfig Where to place the configuration settings.
*/
public static void getConfiguration(ContentResolver cr, Configuration outConfig) {
getConfigurationForUser(cr, outConfig, UserHandle.myUserId());
}
/** @hide */
public static void getConfigurationForUser(ContentResolver cr, Configuration outConfig,
int userHandle) {
outConfig.fontScale = Settings.System.getFloatForUser(
cr, FONT_SCALE, outConfig.fontScale, userHandle);
if (outConfig.fontScale < 0) {
outConfig.fontScale = 1;
}
}
/**
* @hide Erase the fields in the Configuration that should be applied
* by the settings.
*/
public static void clearConfiguration(Configuration inoutConfig) {
inoutConfig.fontScale = 0;
}
/**
* Convenience function to write a batch of configuration-related
* settings from a {@link Configuration} object.
*
* @param cr The ContentResolver to access.
* @param config The settings to write.
* @return true if the values were set, false on database errors
*/
public static boolean putConfiguration(ContentResolver cr, Configuration config) {
return putConfigurationForUser(cr, config, UserHandle.myUserId());
}
/** @hide */
public static boolean putConfigurationForUser(ContentResolver cr, Configuration config,
int userHandle) {
return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle);
}
/** @hide */
public static boolean hasInterestingConfigurationChanges(int changes) {
return (changes&ActivityInfo.CONFIG_FONT_SCALE) != 0;
}
/** @deprecated - Do not use */
@Deprecated
public static boolean getShowGTalkServiceStatus(ContentResolver cr) {
return getShowGTalkServiceStatusForUser(cr, UserHandle.myUserId());
}
/**
* @hide
* @deprecated - Do not use
*/
public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr,
int userHandle) {
return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0;
}
/** @deprecated - Do not use */
@Deprecated
public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) {
setShowGTalkServiceStatusForUser(cr, flag, UserHandle.myUserId());
}
/**
* @hide
* @deprecated - Do not use
*/
@Deprecated
public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag,
int userHandle) {
putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle);
}
/**
* @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead
*/
@Deprecated
public static final String STAY_ON_WHILE_PLUGGED_IN = Global.STAY_ON_WHILE_PLUGGED_IN;
/**
* What happens when the user presses the end call button if they're not
* on a call.<br/>
* <b>Values:</b><br/>
* 0 - The end button does nothing.<br/>
* 1 - The end button goes to the home screen.<br/>
* 2 - The end button puts the device to sleep and locks the keyguard.<br/>
* 3 - The end button goes to the home screen. If the user is already on the
* home screen, it puts the device to sleep.
*/
public static final String END_BUTTON_BEHAVIOR = "end_button_behavior";
/**
* END_BUTTON_BEHAVIOR value for "go home".
* @hide
*/
public static final int END_BUTTON_BEHAVIOR_HOME = 0x1;
/**
* END_BUTTON_BEHAVIOR value for "go to sleep".
* @hide
*/
public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2;
/**
* END_BUTTON_BEHAVIOR default value.
* @hide
*/
public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP;
/**
* Is advanced settings mode turned on. 0 == no, 1 == yes
* @hide
*/
public static final String ADVANCED_SETTINGS = "advanced_settings";
/**
* ADVANCED_SETTINGS default value.
* @hide
*/
public static final int ADVANCED_SETTINGS_DEFAULT = 0;
/**
* @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead
*/
@Deprecated
public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON;
/**
* @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead
*/
@Deprecated
public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH;
/**
* @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead
*/
@Deprecated
public static final String RADIO_WIFI = Global.RADIO_WIFI;
/**
* @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead
* {@hide}
*/
@Deprecated
public static final String RADIO_WIMAX = Global.RADIO_WIMAX;
/**
* @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead
*/
@Deprecated
public static final String RADIO_CELL = Global.RADIO_CELL;
/**
* @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead
*/
@Deprecated
public static final String RADIO_NFC = Global.RADIO_NFC;
/**
* @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead
*/
@Deprecated
public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS;
/**
* @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead
*
* {@hide}
*/
@Deprecated
public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS =
Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS;
/**
* @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead
*/
@Deprecated
public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY;
/**
* @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead
*/
@Deprecated
public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT;
/**
* @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead
*/
@Deprecated
public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED =
Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED;
/**
* @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead
*/
@Deprecated
public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER;
/**
* @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead
*/
@Deprecated
public static final String MODE_RINGER = Global.MODE_RINGER;
/**
* Whether to use static IP and other static network attributes.
* <p>
* Set to 1 for true and 0 for false.
*
* @deprecated Use {@link WifiManager} instead
*/
@Deprecated
public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip";
/**
* The static IP address.
* <p>
* Example: "192.168.1.51"
*
* @deprecated Use {@link WifiManager} instead
*/
@Deprecated
public static final String WIFI_STATIC_IP = "wifi_static_ip";
/**
* If using static IP, the gateway's IP address.
* <p>
* Example: "192.168.1.1"
*
* @deprecated Use {@link WifiManager} instead
*/
@Deprecated
public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway";
/**
* If using static IP, the net mask.
* <p>
* Example: "255.255.255.0"
*
* @deprecated Use {@link WifiManager} instead
*/
@Deprecated
public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask";
/**
* If using static IP, the primary DNS's IP address.
* <p>
* Example: "192.168.1.1"
*
* @deprecated Use {@link WifiManager} instead
*/
@Deprecated
public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1";
/**
* If using static IP, the secondary DNS's IP address.
* <p>
* Example: "192.168.1.2"
*
* @deprecated Use {@link WifiManager} instead
*/
@Deprecated
public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2";
/**
* Determines whether remote devices may discover and/or connect to
* this device.
* <P>Type: INT</P>
* 2 -- discoverable and connectable
* 1 -- connectable but not discoverable
* 0 -- neither connectable nor discoverable
*/
public static final String BLUETOOTH_DISCOVERABILITY =
"bluetooth_discoverability";
/**
* 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.
*/
public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT =
"bluetooth_discoverability_timeout";
/**
* @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED}
* instead
*/
@Deprecated
public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED;
/**
* @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE}
* instead
*/
@Deprecated
public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
/**
* @deprecated Use
* {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED}
* instead
*/
@Deprecated
public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED =
"lock_pattern_tactile_feedback_enabled";
/**
* A formatted string of the next alarm that is set, or the empty string
* if there is no alarm set.
*
* @deprecated Use {@link android.app.AlarmManager#getNextAlarmClock()}.
*/
@Deprecated
public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted";
/**
* Scaling factor for fonts, float.
*/
public static final String FONT_SCALE = "font_scale";
/**
* Name of an application package to be debugged.
*
* @deprecated Use {@link Global#DEBUG_APP} instead
*/
@Deprecated
public static final String DEBUG_APP = Global.DEBUG_APP;
/**
* If 1, when launching DEBUG_APP it will wait for the debugger before
* starting user code. If 0, it will run normally.
*
* @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead
*/
@Deprecated
public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER;
/**
* Whether or not to dim the screen. 0=no 1=yes
* @deprecated This setting is no longer used.
*/
@Deprecated
public static final String DIM_SCREEN = "dim_screen";
/**
* The amount of time in milliseconds before the device goes to sleep or begins
* to dream after a period of inactivity. This value is also known as the
* user activity timeout period since the screen isn't necessarily turned off
* when it expires.
*/
public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout";
/**
* The screen backlight brightness between 0 and 255.
*/
public static final String SCREEN_BRIGHTNESS = "screen_brightness";
/**
* Control whether to enable automatic brightness mode.
*/
public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode";
/**
* Adjustment to auto-brightness to make it generally more (>0.0 <1.0)
* or less (<0.0 >-1.0) bright.
* @hide
*/
public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj";
/**
* SCREEN_BRIGHTNESS_MODE value for manual mode.
*/
public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0;
/**
* SCREEN_BRIGHTNESS_MODE value for automatic mode.
*/
public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1;
/**
* Control whether the process CPU usage meter should be shown.
*
* @deprecated Use {@link Global#SHOW_PROCESSES} instead
*/
@Deprecated
public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES;
/**
* 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.
*
* @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead
*/
@Deprecated
public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES;
/**
* 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.
*/
public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_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.
*/
public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected";
/**
* Whether vibrate is on for different events. This is used internally,
* changing this value will not change the vibrate. See AudioManager.
*/
public static final String VIBRATE_ON = "vibrate_on";
/**
* If 1, redirects the system vibrator to all currently attached input devices
* that support vibration. If there are no such input devices, then the system
* vibrator is used instead.
* If 0, does not register the system vibrator.
*
* This setting is mainly intended to provide a compatibility mechanism for
* applications that only know about the system vibrator and do not use the
* input device vibrator API.
*
* @hide
*/
public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices";
/**
* Ringer volume. This is used internally, changing this value will not
* change the volume. See AudioManager.
*/
public static final String VOLUME_RING = "volume_ring";
/**
* System/notifications volume. This is used internally, changing this
* value will not change the volume. See AudioManager.
*/
public static final String VOLUME_SYSTEM = "volume_system";
/**
* Voice call volume. This is used internally, changing this value will
* not change the volume. See AudioManager.
*/
public static final String VOLUME_VOICE = "volume_voice";
/**
* Music/media/gaming volume. This is used internally, changing this
* value will not change the volume. See AudioManager.
*/
public static final String VOLUME_MUSIC = "volume_music";
/**
* Alarm volume. This is used internally, changing this
* value will not change the volume. See AudioManager.
*/
public static final String VOLUME_ALARM = "volume_alarm";
/**
* Notification volume. This is used internally, changing this
* value will not change the volume. See AudioManager.
*/
public static final String VOLUME_NOTIFICATION = "volume_notification";
/**
* Bluetooth Headset volume. This is used internally, changing this value will
* not change the volume. See AudioManager.
*/
public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco";
/**
* Master volume (float in the range 0.0f to 1.0f).
* @hide
*/
public static final String VOLUME_MASTER = "volume_master";
/**
* Master volume mute (int 1 = mute, 0 = not muted).
*
* @hide
*/
public static final String VOLUME_MASTER_MUTE = "volume_master_mute";
/**
* Microphone mute (int 1 = mute, 0 = not muted).
*
* @hide
*/
public static final String MICROPHONE_MUTE = "microphone_mute";
/**
* 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.
* <p>
* 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.
*
* @hide
* @deprecated
*/
@Deprecated
public static final String NOTIFICATIONS_USE_RING_VOLUME =
"notifications_use_ring_volume";
/**
* Whether silent mode should allow vibration feedback. This is used
* internally in AudioService and the Sound settings activity to
* coordinate decoupling of vibrate and silent modes. This setting
* will likely be removed in a future release with support for
* audio/vibe feedback profiles.
*
* Not used anymore. On devices with vibrator, the user explicitly selects
* silent or vibrate mode.
* Kept for use by legacy database upgrade code in DatabaseHelper.
* @hide
*/
public static final String VIBRATE_IN_SILENT = "vibrate_in_silent";
/**
* The mapping of stream type (integer) to its setting.
*/
public static final String[] VOLUME_SETTINGS = {
VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC,
VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO
};
/**
* Appended to various volume related settings to record the previous
* values before they the settings were affected by a silent/vibrate
* ringer mode change.
*/
public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible";
/**
* Persistent store for the system-wide default ringtone URI.
* <p>
* If you need to play the default ringtone at any given time, it is recommended
* you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve
* to the set default ringtone at the time of playing.
*
* @see #DEFAULT_RINGTONE_URI
*/
public static final String RINGTONE = "ringtone";
/**
* A {@link Uri} that will point to the current default ringtone at any
* given time.
* <p>
* If the current default ringtone is in the DRM provider and the caller
* does not have permission, the exception will be a
* FileNotFoundException.
*/
public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE);
/**
* Persistent store for the system-wide default notification sound.
*
* @see #RINGTONE
* @see #DEFAULT_NOTIFICATION_URI
*/
public static final String NOTIFICATION_SOUND = "notification_sound";
/**
* A {@link Uri} that will point to the current default notification
* sound at any given time.
*
* @see #DEFAULT_RINGTONE_URI
*/
public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND);
/**
* Persistent store for the system-wide default alarm alert.
*
* @see #RINGTONE
* @see #DEFAULT_ALARM_ALERT_URI
*/
public static final String ALARM_ALERT = "alarm_alert";
/**
* A {@link Uri} that will point to the current default alarm alert at
* any given time.
*
* @see #DEFAULT_ALARM_ALERT_URI
*/
public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT);
/**
* Persistent store for the system default media button event receiver.
*
* @hide
*/
public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver";
/**
* Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off
*/
public static final String TEXT_AUTO_REPLACE = "auto_replace";
/**
* Setting to enable Auto Caps in text editors. 1 = On, 0 = Off
*/
public static final String TEXT_AUTO_CAPS = "auto_caps";
/**
* Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This
* feature converts two spaces to a "." and space.
*/
public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate";
/**
* Setting to showing password characters in text editors. 1 = On, 0 = Off
*/
public static final String TEXT_SHOW_PASSWORD = "show_password";
public static final String SHOW_GTALK_SERVICE_STATUS =
"SHOW_GTALK_SERVICE_STATUS";
/**
* Name of activity to use for wallpaper on the home screen.
*
* @deprecated Use {@link WallpaperManager} instead.
*/
@Deprecated
public static final String WALLPAPER_ACTIVITY = "wallpaper_activity";
/**
* @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME}
* instead
*/
@Deprecated
public static final String AUTO_TIME = Global.AUTO_TIME;
/**
* @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE}
* instead
*/
@Deprecated
public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE;
/**
* Display times as 12 or 24 hours
* 12
* 24
*/
public static final String TIME_12_24 = "time_12_24";
/**
* Date format string
* mm/dd/yyyy
* dd/mm/yyyy
* yyyy/mm/dd
*/
public static final String DATE_FORMAT = "date_format";
/**
* 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
*/
public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run";
/**
* Scaling factor for normal window animations. Setting to 0 will disable window
* animations.
*
* @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead
*/
@Deprecated
public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE;
/**
* Scaling factor for activity transition animations. Setting to 0 will disable window
* animations.
*
* @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead
*/
@Deprecated
public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE;
/**
* Scaling factor for Animator-based animations. This affects both the start delay and
* duration of all such animations. Setting to 0 will cause animations to end immediately.
* The default value is 1.
*
* @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead
*/
@Deprecated
public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE;
/**
* 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.
*/
public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation";
/**
* Default screen rotation when no other policy applies.
* When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a
* preference, this rotation value will be used. Must be one of the
* {@link android.view.Surface#ROTATION_0 Surface rotation constants}.
*
* @see android.view.Display#getRotation
*/
public static final String USER_ROTATION = "user_rotation";
/**
* Control whether the rotation lock toggle in the System UI should be hidden.
* Typically this is done for accessibility purposes to make it harder for
* the user to accidentally toggle the rotation lock while the display rotation
* has been locked for accessibility.
*
* If 0, then rotation lock toggle is not hidden for accessibility (although it may be
* unavailable for other reasons). If 1, then the rotation lock toggle is hidden.
*
* @hide
*/
public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY =
"hide_rotation_lock_toggle_for_accessibility";
/**
* Whether the phone vibrates when it is ringing due to an incoming call. This will
* be used by Phone and Setting apps; it shouldn't affect other apps.
* The value is boolean (1 or 0).
*
* Note: this is not same as "vibrate on ring", which had been available until ICS.
* It was about AudioManager's setting and thus affected all the applications which
* relied on the setting, while this is purely about the vibration setting for incoming
* calls.
*
* @hide
*/
public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
/**
* Whether the audible DTMF tones are played by the dialer when dialing. The value is
* boolean (1 or 0).
*/
public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone";
/**
* CDMA only settings
* DTMF tone type played by the dialer when dialing.
* 0 = Normal
* 1 = Long
* @hide
*/
public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type";
/**
* Whether the hearing aid is enabled. The value is
* boolean (1 or 0).
* @hide
*/
public static final String HEARING_AID = "hearing_aid";
/**
* CDMA only settings
* TTY Mode
* 0 = OFF
* 1 = FULL
* 2 = VCO
* 3 = HCO
* @hide
*/
public static final String TTY_MODE = "tty_mode";
/**
* Whether the sounds effects (key clicks, lid open ...) are enabled. The value is
* boolean (1 or 0).
*/
public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled";
/**
* Whether the haptic feedback (long presses, ...) are enabled. The value is
* boolean (1 or 0).
*/
public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled";
/**
* @deprecated Each application that shows web suggestions should have its own
* setting for this.
*/
@Deprecated
public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions";
/**
* Whether the notification LED should repeatedly flash when a notification is
* pending. The value is boolean (1 or 0).
* @hide
*/
public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse";
/**
* Show pointer location on screen?
* 0 = no
* 1 = yes
* @hide
*/
public static final String POINTER_LOCATION = "pointer_location";
/**
* Show touch positions on screen?
* 0 = no
* 1 = yes
* @hide
*/
public static final String SHOW_TOUCHES = "show_touches";
/**
* Log raw orientation data from
* {@link com.android.internal.policy.impl.WindowOrientationListener} for use with the
* orientationplot.py tool.
* 0 = no
* 1 = yes
* @hide
*/
public static final String WINDOW_ORIENTATION_LISTENER_LOG =
"window_orientation_listener_log";
/**
* @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED}
* instead
* @hide
*/
@Deprecated
public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED;
/**
* @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED}
* instead
* @hide
*/
@Deprecated
public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED;
/**
* Whether to play sounds when the keyguard is shown and dismissed.
* @hide
*/
public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled";
/**
* Whether the lockscreen should be completely disabled.
* @hide
*/
public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled";
/**
* @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND}
* instead
* @hide
*/
@Deprecated
public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND;
/**
* @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND}
* instead
* @hide
*/
@Deprecated
public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND;
/**
* @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND}
* instead
* @hide
*/
@Deprecated
public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND;
/**
* @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND}
* instead
* @hide
*/
@Deprecated
public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND;
/**
* @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND}
* instead
* @hide
*/
@Deprecated
public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND;
/**
* @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND}
* instead
* @hide
*/
@Deprecated
public static final String LOCK_SOUND = Global.LOCK_SOUND;
/**
* @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND}
* instead
* @hide
*/
@Deprecated
public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND;
/**
* Receive incoming SIP calls?
* 0 = no
* 1 = yes
* @hide
*/
public static final String SIP_RECEIVE_CALLS = "sip_receive_calls";
/**
* Call Preference String.
* "SIP_ALWAYS" : Always use SIP with network access
* "SIP_ADDRESS_ONLY" : Only if destination is a SIP address
* @hide
*/
public static final String SIP_CALL_OPTIONS = "sip_call_options";
/**
* One of the sip call options: Always use SIP with network access.
* @hide
*/
public static final String SIP_ALWAYS = "SIP_ALWAYS";
/**
* One of the sip call options: Only if destination is a SIP address.
* @hide
*/
public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY";
/**
* @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that
* the user should be prompted each time a call is made whether it should be placed using
* SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with
* SIP_ADDRESS_ONLY.
* @hide
*/
@Deprecated
public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME";
/**
* Pointer speed setting.
* This is an integer value in a range between -7 and +7, so there are 15 possible values.
* -7 = slowest
* 0 = default speed
* +7 = fastest
* @hide
*/
public static final String POINTER_SPEED = "pointer_speed";
/**
* Whether lock-to-app will be triggered by long-press on recents.
* @hide
*/
public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled";
/**
* I am the lolrus.
* <p>
* Nonzero values indicate that the user has a bukkit.
* Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>.
* @hide
*/
public static final String EGG_MODE = "egg_mode";
/**
* Settings to backup. This is here so that it's in the same place as the settings
* keys and easy to update.
*
* NOTE: Settings are backed up and restored in the order they appear
* in this array. If you have one setting depending on another,
* make sure that they are ordered appropriately.
*
* @hide
*/
public static final String[] SETTINGS_TO_BACKUP = {
STAY_ON_WHILE_PLUGGED_IN, // moved to global
WIFI_USE_STATIC_IP,
WIFI_STATIC_IP,
WIFI_STATIC_GATEWAY,
WIFI_STATIC_NETMASK,
WIFI_STATIC_DNS1,
WIFI_STATIC_DNS2,
BLUETOOTH_DISCOVERABILITY,
BLUETOOTH_DISCOVERABILITY_TIMEOUT,
DIM_SCREEN,
SCREEN_OFF_TIMEOUT,
SCREEN_BRIGHTNESS,
SCREEN_BRIGHTNESS_MODE,
SCREEN_AUTO_BRIGHTNESS_ADJ,
VIBRATE_INPUT_DEVICES,
MODE_RINGER_STREAMS_AFFECTED,
VOLUME_VOICE,
VOLUME_SYSTEM,
VOLUME_RING,
VOLUME_MUSIC,
VOLUME_ALARM,
VOLUME_NOTIFICATION,
VOLUME_BLUETOOTH_SCO,
VOLUME_VOICE + APPEND_FOR_LAST_AUDIBLE,
VOLUME_SYSTEM + APPEND_FOR_LAST_AUDIBLE,
VOLUME_RING + APPEND_FOR_LAST_AUDIBLE,
VOLUME_MUSIC + APPEND_FOR_LAST_AUDIBLE,
VOLUME_ALARM + APPEND_FOR_LAST_AUDIBLE,
VOLUME_NOTIFICATION + APPEND_FOR_LAST_AUDIBLE,
VOLUME_BLUETOOTH_SCO + APPEND_FOR_LAST_AUDIBLE,
TEXT_AUTO_REPLACE,
TEXT_AUTO_CAPS,
TEXT_AUTO_PUNCTUATE,
TEXT_SHOW_PASSWORD,
AUTO_TIME, // moved to global
AUTO_TIME_ZONE, // moved to global
TIME_12_24,
DATE_FORMAT,
DTMF_TONE_WHEN_DIALING,
DTMF_TONE_TYPE_WHEN_DIALING,
HEARING_AID,
TTY_MODE,
SOUND_EFFECTS_ENABLED,
HAPTIC_FEEDBACK_ENABLED,
POWER_SOUNDS_ENABLED, // moved to global
DOCK_SOUNDS_ENABLED, // moved to global
LOCKSCREEN_SOUNDS_ENABLED,
SHOW_WEB_SUGGESTIONS,
NOTIFICATION_LIGHT_PULSE,
SIP_CALL_OPTIONS,
SIP_RECEIVE_CALLS,
POINTER_SPEED,
VIBRATE_WHEN_RINGING,
RINGTONE,
LOCK_TO_APP_ENABLED,
NOTIFICATION_SOUND
};
/**
* These entries are considered common between the personal and the managed profile,
* since the managed profile doesn't get to change them.
* @hide
*/
public static final String[] CLONE_TO_MANAGED_PROFILE = {
DATE_FORMAT,
HAPTIC_FEEDBACK_ENABLED,
SOUND_EFFECTS_ENABLED,
TEXT_SHOW_PASSWORD,
TIME_12_24
};
/**
* When to use Wi-Fi calling
*
* @see android.telephony.TelephonyManager.WifiCallingChoices
* @hide
*/
public static final String WHEN_TO_MAKE_WIFI_CALLS = "when_to_make_wifi_calls";
// Settings moved to Settings.Secure
/**
* @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED}
* instead
*/
@Deprecated
public static final String ADB_ENABLED = Global.ADB_ENABLED;
/**
* @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead
*/
@Deprecated
public static final String ANDROID_ID = Secure.ANDROID_ID;
/**
* @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead
*/
@Deprecated
public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON;
/**
* @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead
*/
@Deprecated
public static final String DATA_ROAMING = Global.DATA_ROAMING;
/**
* @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead
*/
@Deprecated
public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED;
/**
* @deprecated Use {@link android.provider.Settings.Global#HTTP_PROXY} instead
*/
@Deprecated
public static final String HTTP_PROXY = Global.HTTP_PROXY;
/**
* @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead
*/
@Deprecated
public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS;
/**
* @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED}
* instead
*/
@Deprecated
public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED;
/**
* @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead
*/
@Deprecated
public static final String LOGGING_ID = Secure.LOGGING_ID;
/**
* @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead
*/
@Deprecated
public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE;
/**
* @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED}
* instead
*/
@Deprecated
public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED;
/**
* @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE}
* instead
*/
@Deprecated
public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE;
/**
* @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL}
* instead
*/
@Deprecated
public static final String PARENTAL_CONTROL_REDIRECT_URL =
Secure.PARENTAL_CONTROL_REDIRECT_URL;
/**
* @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead
*/
@Deprecated
public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME;
/**
* @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead
*/
@Deprecated
public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED;
/**
* @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead
*/
@Deprecated
public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL;
/**
* @deprecated Use
* {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead
*/
@Deprecated
public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT;
/**
* @deprecated Use
* {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead
*/
@Deprecated
public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS;
/**
* @deprecated Use
* {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead
*/
@Deprecated
public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
/**
* @deprecated Use
* {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead
*/
@Deprecated
public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
/**
* @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT}
* instead
*/
@Deprecated
public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = Global.WIFI_NUM_OPEN_NETWORKS_KEPT;
/**
* @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead
*/
@Deprecated
public static final String WIFI_ON = Global.WIFI_ON;
/**
* @deprecated Use
* {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE}
* instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE;
/**
* @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT;
/**
* @deprecated Use
* {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS;
/**
* @deprecated Use
* {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED;
/**
* @deprecated Use
* {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS}
* instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS;
/**
* @deprecated Use
* {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT;
/**
* @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS}
* instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS;
/**
* @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON;
/**
* @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT;
/**
* @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS}
* instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS;
/**
* @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS}
* instead
*/
@Deprecated
public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS =
Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS;
}
/**
* Secure system settings, containing system preferences that applications
* can read but are not allowed to write. These are for preferences that
* the user must explicitly modify through the system UI or specialized
* APIs for those values, not modified directly by applications.
*/
public static final class Secure extends NameValueTable {
public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
/**
* The content:// style URL for this table
*/
public static final Uri CONTENT_URI =
Uri.parse("content://" + AUTHORITY + "/secure");
// Populated lazily, guarded by class object:
private static final NameValueCache sNameValueCache = new NameValueCache(
SYS_PROP_SETTING_VERSION,
CONTENT_URI,
CALL_METHOD_GET_SECURE,
CALL_METHOD_PUT_SECURE);
private static ILockSettings sLockSettings = null;
private static boolean sIsSystemProcess;
private static final HashSet<String> MOVED_TO_LOCK_SETTINGS;
private static final HashSet<String> MOVED_TO_GLOBAL;
static {
MOVED_TO_LOCK_SETTINGS = new HashSet<String>(3);
MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED);
MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE);
MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
MOVED_TO_GLOBAL = new HashSet<String>();
MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED);
MOVED_TO_GLOBAL.add(Settings.Global