The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2006 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.provider; |
| 18 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 19 | import android.annotation.SdkConstant; |
| 20 | import android.annotation.SdkConstant.SdkConstantType; |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 21 | import android.app.SearchManager; |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 22 | import android.app.WallpaperManager; |
Mike LeBeau | 5d34e9b | 2010-02-10 19:34:56 -0800 | [diff] [blame] | 23 | import android.content.ComponentName; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 24 | import android.content.ContentResolver; |
| 25 | import android.content.ContentValues; |
| 26 | import android.content.Context; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 27 | import android.content.IContentProvider; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 28 | import android.content.Intent; |
Dianne Hackborn | b8b11a0 | 2010-03-10 15:53:11 -0800 | [diff] [blame] | 29 | import android.content.pm.ActivityInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | import android.content.pm.PackageManager; |
| 31 | import android.content.pm.ResolveInfo; |
| 32 | import android.content.res.Configuration; |
| 33 | import android.content.res.Resources; |
| 34 | import android.database.Cursor; |
| 35 | import android.database.SQLException; |
David Christie | 3f7b652 | 2013-08-06 19:19:08 -0700 | [diff] [blame] | 36 | import android.location.LocationManager; |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 37 | import android.net.ConnectivityManager; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 38 | import android.net.Uri; |
Irfan Sheriff | 36f7413 | 2010-11-04 16:57:37 -0700 | [diff] [blame] | 39 | import android.net.wifi.WifiManager; |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 40 | import android.os.BatteryManager; |
| 41 | import android.os.Bundle; |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 42 | import android.os.DropBoxManager; |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 43 | import android.os.IBinder; |
Amith Yamasani | 7ab8c4a | 2012-04-06 09:27:12 -0700 | [diff] [blame] | 44 | import android.os.Process; |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 45 | import android.os.RemoteException; |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 46 | import android.os.ServiceManager; |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 47 | import android.os.SystemProperties; |
Dianne Hackborn | f02b60a | 2012-08-16 10:48:27 -0700 | [diff] [blame] | 48 | import android.os.UserHandle; |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 49 | import android.os.Build.VERSION_CODES; |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 50 | import android.speech.tts.TextToSpeech; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 51 | import android.text.TextUtils; |
| 52 | import android.util.AndroidException; |
| 53 | import android.util.Log; |
| 54 | |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 55 | import com.android.internal.widget.ILockSettings; |
| 56 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 57 | import java.net.URISyntaxException; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 58 | import java.util.HashMap; |
| 59 | import java.util.HashSet; |
Elliott Hughes | cb64d43 | 2013-08-02 10:00:44 -0700 | [diff] [blame] | 60 | import java.util.Locale; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 61 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 62 | /** |
| 63 | * The Settings provider contains global system-level device preferences. |
| 64 | */ |
| 65 | public final class Settings { |
| 66 | |
| 67 | // Intent actions for Settings |
| 68 | |
| 69 | /** |
| 70 | * Activity Action: Show system settings. |
| 71 | * <p> |
| 72 | * Input: Nothing. |
| 73 | * <p> |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 74 | * Output: Nothing. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 75 | */ |
| 76 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 77 | public static final String ACTION_SETTINGS = "android.settings.SETTINGS"; |
| 78 | |
| 79 | /** |
| 80 | * Activity Action: Show settings to allow configuration of APNs. |
| 81 | * <p> |
| 82 | * Input: Nothing. |
| 83 | * <p> |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 84 | * Output: Nothing. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 85 | */ |
| 86 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 87 | public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS"; |
| 88 | |
| 89 | /** |
| 90 | * Activity Action: Show settings to allow configuration of current location |
| 91 | * sources. |
| 92 | * <p> |
| 93 | * In some cases, a matching Activity may not exist, so ensure you |
| 94 | * safeguard against this. |
| 95 | * <p> |
| 96 | * Input: Nothing. |
| 97 | * <p> |
| 98 | * Output: Nothing. |
| 99 | */ |
| 100 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 101 | public static final String ACTION_LOCATION_SOURCE_SETTINGS = |
| 102 | "android.settings.LOCATION_SOURCE_SETTINGS"; |
| 103 | |
| 104 | /** |
| 105 | * Activity Action: Show settings to allow configuration of wireless controls |
| 106 | * such as Wi-Fi, Bluetooth and Mobile networks. |
| 107 | * <p> |
| 108 | * In some cases, a matching Activity may not exist, so ensure you |
| 109 | * safeguard against this. |
| 110 | * <p> |
| 111 | * Input: Nothing. |
| 112 | * <p> |
| 113 | * Output: Nothing. |
| 114 | */ |
| 115 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 116 | public static final String ACTION_WIRELESS_SETTINGS = |
| 117 | "android.settings.WIRELESS_SETTINGS"; |
| 118 | |
| 119 | /** |
| 120 | * Activity Action: Show settings to allow entering/exiting airplane mode. |
| 121 | * <p> |
| 122 | * In some cases, a matching Activity may not exist, so ensure you |
| 123 | * safeguard against this. |
| 124 | * <p> |
| 125 | * Input: Nothing. |
| 126 | * <p> |
| 127 | * Output: Nothing. |
| 128 | */ |
| 129 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 130 | public static final String ACTION_AIRPLANE_MODE_SETTINGS = |
| 131 | "android.settings.AIRPLANE_MODE_SETTINGS"; |
| 132 | |
| 133 | /** |
Dianne Hackborn | dd9b82c | 2009-09-03 00:18:47 -0700 | [diff] [blame] | 134 | * Activity Action: Show settings for accessibility modules. |
| 135 | * <p> |
| 136 | * In some cases, a matching Activity may not exist, so ensure you |
| 137 | * safeguard against this. |
| 138 | * <p> |
| 139 | * Input: Nothing. |
| 140 | * <p> |
| 141 | * Output: Nothing. |
| 142 | */ |
| 143 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 144 | public static final String ACTION_ACCESSIBILITY_SETTINGS = |
| 145 | "android.settings.ACCESSIBILITY_SETTINGS"; |
| 146 | |
| 147 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 148 | * Activity Action: Show settings to allow configuration of security and |
| 149 | * location privacy. |
| 150 | * <p> |
| 151 | * In some cases, a matching Activity may not exist, so ensure you |
| 152 | * safeguard against this. |
| 153 | * <p> |
| 154 | * Input: Nothing. |
| 155 | * <p> |
| 156 | * Output: Nothing. |
| 157 | */ |
| 158 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 159 | public static final String ACTION_SECURITY_SETTINGS = |
| 160 | "android.settings.SECURITY_SETTINGS"; |
| 161 | |
| 162 | /** |
Maggie Benthall | 0469f41 | 2013-09-05 15:30:26 -0400 | [diff] [blame] | 163 | * Activity Action: Show trusted credentials settings, opening to the user tab, |
| 164 | * to allow management of installed credentials. |
| 165 | * <p> |
| 166 | * In some cases, a matching Activity may not exist, so ensure you |
| 167 | * safeguard against this. |
| 168 | * <p> |
| 169 | * Input: Nothing. |
| 170 | * <p> |
| 171 | * Output: Nothing. |
| 172 | * @hide |
| 173 | */ |
| 174 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 175 | public static final String ACTION_TRUSTED_CREDENTIALS_USER = |
| 176 | "com.android.settings.TRUSTED_CREDENTIALS_USER"; |
| 177 | |
| 178 | /** |
| 179 | * Activity Action: Show dialog explaining that an installed CA cert may enable |
| 180 | * monitoring of encrypted network traffic. |
| 181 | * <p> |
| 182 | * In some cases, a matching Activity may not exist, so ensure you |
| 183 | * safeguard against this. |
| 184 | * <p> |
| 185 | * Input: Nothing. |
| 186 | * <p> |
| 187 | * Output: Nothing. |
| 188 | * @hide |
| 189 | */ |
| 190 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 191 | public static final String ACTION_MONITORING_CERT_INFO = |
| 192 | "com.android.settings.MONITORING_CERT_INFO"; |
| 193 | |
| 194 | /** |
Amith Yamasani | c15255a | 2009-09-23 15:33:19 -0700 | [diff] [blame] | 195 | * Activity Action: Show settings to allow configuration of privacy options. |
| 196 | * <p> |
| 197 | * In some cases, a matching Activity may not exist, so ensure you |
| 198 | * safeguard against this. |
| 199 | * <p> |
| 200 | * Input: Nothing. |
| 201 | * <p> |
| 202 | * Output: Nothing. |
| 203 | */ |
| 204 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 205 | public static final String ACTION_PRIVACY_SETTINGS = |
| 206 | "android.settings.PRIVACY_SETTINGS"; |
| 207 | |
| 208 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 209 | * Activity Action: Show settings to allow configuration of Wi-Fi. |
| 210 | |
| 211 | * <p> |
| 212 | * In some cases, a matching Activity may not exist, so ensure you |
| 213 | * safeguard against this. |
| 214 | * <p> |
| 215 | * Input: Nothing. |
| 216 | * <p> |
| 217 | * Output: Nothing. |
| 218 | |
| 219 | */ |
| 220 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 221 | public static final String ACTION_WIFI_SETTINGS = |
| 222 | "android.settings.WIFI_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 223 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 224 | /** |
| 225 | * Activity Action: Show settings to allow configuration of a static IP |
| 226 | * address for Wi-Fi. |
| 227 | * <p> |
| 228 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 229 | * against this. |
| 230 | * <p> |
| 231 | * Input: Nothing. |
| 232 | * <p> |
| 233 | * Output: Nothing. |
| 234 | */ |
| 235 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 236 | public static final String ACTION_WIFI_IP_SETTINGS = |
| 237 | "android.settings.WIFI_IP_SETTINGS"; |
| 238 | |
| 239 | /** |
| 240 | * Activity Action: Show settings to allow configuration of Bluetooth. |
| 241 | * <p> |
| 242 | * In some cases, a matching Activity may not exist, so ensure you |
| 243 | * safeguard against this. |
| 244 | * <p> |
| 245 | * Input: Nothing. |
| 246 | * <p> |
| 247 | * Output: Nothing. |
| 248 | */ |
| 249 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 250 | public static final String ACTION_BLUETOOTH_SETTINGS = |
| 251 | "android.settings.BLUETOOTH_SETTINGS"; |
| 252 | |
| 253 | /** |
Jeff Brown | 89d5546 | 2012-09-19 11:33:42 -0700 | [diff] [blame] | 254 | * Activity Action: Show settings to allow configuration of Wifi Displays. |
| 255 | * <p> |
| 256 | * In some cases, a matching Activity may not exist, so ensure you |
| 257 | * safeguard against this. |
| 258 | * <p> |
| 259 | * Input: Nothing. |
| 260 | * <p> |
| 261 | * Output: Nothing. |
| 262 | * @hide |
| 263 | */ |
| 264 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 265 | public static final String ACTION_WIFI_DISPLAY_SETTINGS = |
| 266 | "android.settings.WIFI_DISPLAY_SETTINGS"; |
| 267 | |
| 268 | /** |
Jeff Brown | 1a937b0 | 2014-07-01 22:13:04 -0700 | [diff] [blame] | 269 | * Activity Action: Show settings to allow configuration of |
| 270 | * {@link android.media.routing.MediaRouteService media route providers}. |
| 271 | * <p> |
| 272 | * In some cases, a matching Activity may not exist, so ensure you |
| 273 | * safeguard against this. |
| 274 | * <p> |
| 275 | * Input: Nothing. |
| 276 | * <p> |
| 277 | * Output: Nothing. |
| 278 | */ |
| 279 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 280 | public static final String ACTION_CAST_SETTINGS = |
| 281 | "android.settings.CAST_SETTINGS"; |
| 282 | |
| 283 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 284 | * Activity Action: Show settings to allow configuration of date and time. |
| 285 | * <p> |
| 286 | * In some cases, a matching Activity may not exist, so ensure you |
| 287 | * safeguard against this. |
| 288 | * <p> |
| 289 | * Input: Nothing. |
| 290 | * <p> |
| 291 | * Output: Nothing. |
| 292 | */ |
| 293 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 294 | public static final String ACTION_DATE_SETTINGS = |
| 295 | "android.settings.DATE_SETTINGS"; |
| 296 | |
| 297 | /** |
| 298 | * Activity Action: Show settings to allow configuration of sound and volume. |
| 299 | * <p> |
| 300 | * In some cases, a matching Activity may not exist, so ensure you |
| 301 | * safeguard against this. |
| 302 | * <p> |
| 303 | * Input: Nothing. |
| 304 | * <p> |
| 305 | * Output: Nothing. |
| 306 | */ |
| 307 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 308 | public static final String ACTION_SOUND_SETTINGS = |
| 309 | "android.settings.SOUND_SETTINGS"; |
| 310 | |
| 311 | /** |
| 312 | * Activity Action: Show settings to allow configuration of display. |
| 313 | * <p> |
| 314 | * In some cases, a matching Activity may not exist, so ensure you |
| 315 | * safeguard against this. |
| 316 | * <p> |
| 317 | * Input: Nothing. |
| 318 | * <p> |
| 319 | * Output: Nothing. |
| 320 | */ |
| 321 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 322 | public static final String ACTION_DISPLAY_SETTINGS = |
| 323 | "android.settings.DISPLAY_SETTINGS"; |
| 324 | |
| 325 | /** |
| 326 | * Activity Action: Show settings to allow configuration of locale. |
| 327 | * <p> |
| 328 | * In some cases, a matching Activity may not exist, so ensure you |
| 329 | * safeguard against this. |
| 330 | * <p> |
| 331 | * Input: Nothing. |
| 332 | * <p> |
| 333 | * Output: Nothing. |
| 334 | */ |
| 335 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 336 | public static final String ACTION_LOCALE_SETTINGS = |
| 337 | "android.settings.LOCALE_SETTINGS"; |
| 338 | |
| 339 | /** |
| 340 | * Activity Action: Show settings to configure input methods, in particular |
| 341 | * allowing the user to enable input methods. |
| 342 | * <p> |
| 343 | * In some cases, a matching Activity may not exist, so ensure you |
| 344 | * safeguard against this. |
| 345 | * <p> |
| 346 | * Input: Nothing. |
| 347 | * <p> |
| 348 | * Output: Nothing. |
| 349 | */ |
| 350 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 351 | public static final String ACTION_INPUT_METHOD_SETTINGS = |
| 352 | "android.settings.INPUT_METHOD_SETTINGS"; |
| 353 | |
| 354 | /** |
Tadashi G. Takaoka | f49688f | 2011-01-20 17:56:13 +0900 | [diff] [blame] | 355 | * Activity Action: Show settings to enable/disable input method subtypes. |
satok | 86417ea | 2010-10-27 14:11:03 +0900 | [diff] [blame] | 356 | * <p> |
| 357 | * In some cases, a matching Activity may not exist, so ensure you |
| 358 | * safeguard against this. |
| 359 | * <p> |
Tadashi G. Takaoka | 2548020 | 2011-01-20 23:13:02 +0900 | [diff] [blame] | 360 | * To tell which input method's subtypes are displayed in the settings, add |
| 361 | * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id. |
| 362 | * If there is no extra in this Intent, subtypes from all installed input methods |
| 363 | * will be displayed in the settings. |
| 364 | * |
| 365 | * @see android.view.inputmethod.InputMethodInfo#getId |
| 366 | * <p> |
satok | 86417ea | 2010-10-27 14:11:03 +0900 | [diff] [blame] | 367 | * Input: Nothing. |
| 368 | * <p> |
| 369 | * Output: Nothing. |
| 370 | */ |
| 371 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
Tadashi G. Takaoka | f49688f | 2011-01-20 17:56:13 +0900 | [diff] [blame] | 372 | public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS = |
| 373 | "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS"; |
satok | 86417ea | 2010-10-27 14:11:03 +0900 | [diff] [blame] | 374 | |
| 375 | /** |
satok | 7cfc0ed | 2011-06-20 21:29:36 +0900 | [diff] [blame] | 376 | * Activity Action: Show a dialog to select input method. |
| 377 | * <p> |
| 378 | * In some cases, a matching Activity may not exist, so ensure you |
| 379 | * safeguard against this. |
| 380 | * <p> |
| 381 | * Input: Nothing. |
| 382 | * <p> |
| 383 | * Output: Nothing. |
| 384 | * @hide |
| 385 | */ |
| 386 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 387 | public static final String ACTION_SHOW_INPUT_METHOD_PICKER = |
| 388 | "android.settings.SHOW_INPUT_METHOD_PICKER"; |
| 389 | |
| 390 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 391 | * Activity Action: Show settings to manage the user input dictionary. |
| 392 | * <p> |
Chet Haase | e8222dd | 2013-09-05 07:44:18 -0700 | [diff] [blame] | 393 | * Starting with {@link android.os.Build.VERSION_CODES#KITKAT}, |
Satoshi Kataoka | 2aa2bc5 | 2013-07-30 14:25:11 +0900 | [diff] [blame] | 394 | * it is guaranteed there will always be an appropriate implementation for this Intent action. |
| 395 | * In prior releases of the platform this was optional, so ensure you safeguard against it. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 396 | * <p> |
| 397 | * Input: Nothing. |
| 398 | * <p> |
| 399 | * Output: Nothing. |
| 400 | */ |
| 401 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 402 | public static final String ACTION_USER_DICTIONARY_SETTINGS = |
| 403 | "android.settings.USER_DICTIONARY_SETTINGS"; |
| 404 | |
| 405 | /** |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 406 | * Activity Action: Adds a word to the user dictionary. |
| 407 | * <p> |
| 408 | * In some cases, a matching Activity may not exist, so ensure you |
| 409 | * safeguard against this. |
| 410 | * <p> |
| 411 | * Input: An extra with key <code>word</code> that contains the word |
| 412 | * that should be added to the dictionary. |
| 413 | * <p> |
| 414 | * Output: Nothing. |
| 415 | * |
| 416 | * @hide |
| 417 | */ |
| 418 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 419 | public static final String ACTION_USER_DICTIONARY_INSERT = |
| 420 | "com.android.settings.USER_DICTIONARY_INSERT"; |
| 421 | |
| 422 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 423 | * Activity Action: Show settings to allow configuration of application-related settings. |
| 424 | * <p> |
| 425 | * In some cases, a matching Activity may not exist, so ensure you |
| 426 | * safeguard against this. |
| 427 | * <p> |
| 428 | * Input: Nothing. |
| 429 | * <p> |
| 430 | * Output: Nothing. |
| 431 | */ |
| 432 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 433 | public static final String ACTION_APPLICATION_SETTINGS = |
| 434 | "android.settings.APPLICATION_SETTINGS"; |
| 435 | |
| 436 | /** |
| 437 | * Activity Action: Show settings to allow configuration of application |
Dianne Hackborn | 8d866e5 | 2012-10-10 18:39:45 -0700 | [diff] [blame] | 438 | * development-related settings. As of |
| 439 | * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is |
| 440 | * a required part of the platform. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 441 | * <p> |
| 442 | * Input: Nothing. |
| 443 | * <p> |
| 444 | * Output: Nothing. |
| 445 | */ |
| 446 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 447 | public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS = |
| 448 | "android.settings.APPLICATION_DEVELOPMENT_SETTINGS"; |
| 449 | |
| 450 | /** |
| 451 | * Activity Action: Show settings to allow configuration of quick launch shortcuts. |
| 452 | * <p> |
| 453 | * In some cases, a matching Activity may not exist, so ensure you |
| 454 | * safeguard against this. |
| 455 | * <p> |
| 456 | * Input: Nothing. |
| 457 | * <p> |
| 458 | * Output: Nothing. |
| 459 | */ |
| 460 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 461 | public static final String ACTION_QUICK_LAUNCH_SETTINGS = |
| 462 | "android.settings.QUICK_LAUNCH_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 463 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 464 | /** |
| 465 | * Activity Action: Show settings to manage installed applications. |
| 466 | * <p> |
| 467 | * In some cases, a matching Activity may not exist, so ensure you |
| 468 | * safeguard against this. |
| 469 | * <p> |
| 470 | * Input: Nothing. |
| 471 | * <p> |
| 472 | * Output: Nothing. |
| 473 | */ |
| 474 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 475 | public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS = |
| 476 | "android.settings.MANAGE_APPLICATIONS_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 477 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 478 | /** |
Winson Chung | 44e8ff9 | 2010-09-27 14:36:52 -0700 | [diff] [blame] | 479 | * Activity Action: Show settings to manage all applications. |
| 480 | * <p> |
| 481 | * In some cases, a matching Activity may not exist, so ensure you |
| 482 | * safeguard against this. |
| 483 | * <p> |
| 484 | * Input: Nothing. |
| 485 | * <p> |
| 486 | * Output: Nothing. |
| 487 | */ |
| 488 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 489 | public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS = |
| 490 | "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS"; |
| 491 | |
| 492 | /** |
Dianne Hackborn | b7bb3b3 | 2010-06-06 22:47:50 -0700 | [diff] [blame] | 493 | * Activity Action: Show screen of details about a particular application. |
| 494 | * <p> |
| 495 | * In some cases, a matching Activity may not exist, so ensure you |
| 496 | * safeguard against this. |
| 497 | * <p> |
| 498 | * Input: The Intent's data URI specifies the application package name |
| 499 | * to be shown, with the "package" scheme. That is "package:com.my.app". |
| 500 | * <p> |
| 501 | * Output: Nothing. |
| 502 | */ |
| 503 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 504 | public static final String ACTION_APPLICATION_DETAILS_SETTINGS = |
| 505 | "android.settings.APPLICATION_DETAILS_SETTINGS"; |
| 506 | |
| 507 | /** |
Dianne Hackborn | 35654b6 | 2013-01-14 17:38:02 -0800 | [diff] [blame] | 508 | * @hide |
| 509 | * Activity Action: Show the "app ops" settings screen. |
| 510 | * <p> |
| 511 | * Input: Nothing. |
| 512 | * <p> |
| 513 | * Output: Nothing. |
| 514 | */ |
| 515 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 516 | public static final String ACTION_APP_OPS_SETTINGS = |
| 517 | "android.settings.APP_OPS_SETTINGS"; |
| 518 | |
| 519 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 520 | * Activity Action: Show settings for system update functionality. |
| 521 | * <p> |
| 522 | * In some cases, a matching Activity may not exist, so ensure you |
| 523 | * safeguard against this. |
| 524 | * <p> |
| 525 | * Input: Nothing. |
| 526 | * <p> |
| 527 | * Output: Nothing. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 528 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 529 | * @hide |
| 530 | */ |
| 531 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 532 | public static final String ACTION_SYSTEM_UPDATE_SETTINGS = |
| 533 | "android.settings.SYSTEM_UPDATE_SETTINGS"; |
| 534 | |
| 535 | /** |
| 536 | * Activity Action: Show settings to allow configuration of sync settings. |
| 537 | * <p> |
| 538 | * In some cases, a matching Activity may not exist, so ensure you |
| 539 | * safeguard against this. |
| 540 | * <p> |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 541 | * The account types available to add via the add account button may be restricted by adding an |
| 542 | * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's |
| 543 | * authorities. Only account types which can sync with that content provider will be offered to |
| 544 | * the user. |
| 545 | * <p> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 546 | * Input: Nothing. |
| 547 | * <p> |
| 548 | * Output: Nothing. |
| 549 | */ |
| 550 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 551 | public static final String ACTION_SYNC_SETTINGS = |
| 552 | "android.settings.SYNC_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 553 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 554 | /** |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 555 | * Activity Action: Show add account screen for creating a new account. |
| 556 | * <p> |
| 557 | * In some cases, a matching Activity may not exist, so ensure you |
| 558 | * safeguard against this. |
| 559 | * <p> |
| 560 | * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES} |
| 561 | * extra to the Intent with one or more syncable content provider's authorities. Only account |
| 562 | * types which can sync with that content provider will be offered to the user. |
| 563 | * <p> |
Alon Albert | 50359c2 | 2013-02-26 14:47:48 -0800 | [diff] [blame] | 564 | * Account types can also be filtered by adding an {@link #EXTRA_ACCOUNT_TYPES} extra to the |
| 565 | * Intent with one or more account types. |
| 566 | * <p> |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 567 | * Input: Nothing. |
| 568 | * <p> |
| 569 | * Output: Nothing. |
| 570 | */ |
| 571 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 572 | public static final String ACTION_ADD_ACCOUNT = |
| 573 | "android.settings.ADD_ACCOUNT_SETTINGS"; |
| 574 | |
| 575 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 576 | * Activity Action: Show settings for selecting the network operator. |
| 577 | * <p> |
| 578 | * In some cases, a matching Activity may not exist, so ensure you |
| 579 | * safeguard against this. |
| 580 | * <p> |
| 581 | * Input: Nothing. |
| 582 | * <p> |
| 583 | * Output: Nothing. |
| 584 | */ |
| 585 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 586 | public static final String ACTION_NETWORK_OPERATOR_SETTINGS = |
| 587 | "android.settings.NETWORK_OPERATOR_SETTINGS"; |
| 588 | |
| 589 | /** |
| 590 | * Activity Action: Show settings for selection of 2G/3G. |
| 591 | * <p> |
| 592 | * In some cases, a matching Activity may not exist, so ensure you |
| 593 | * safeguard against this. |
| 594 | * <p> |
| 595 | * Input: Nothing. |
| 596 | * <p> |
| 597 | * Output: Nothing. |
| 598 | */ |
| 599 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 600 | public static final String ACTION_DATA_ROAMING_SETTINGS = |
| 601 | "android.settings.DATA_ROAMING_SETTINGS"; |
| 602 | |
| 603 | /** |
| 604 | * Activity Action: Show settings for internal storage. |
| 605 | * <p> |
| 606 | * In some cases, a matching Activity may not exist, so ensure you |
| 607 | * safeguard against this. |
| 608 | * <p> |
| 609 | * Input: Nothing. |
| 610 | * <p> |
| 611 | * Output: Nothing. |
| 612 | */ |
| 613 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 614 | public static final String ACTION_INTERNAL_STORAGE_SETTINGS = |
| 615 | "android.settings.INTERNAL_STORAGE_SETTINGS"; |
| 616 | /** |
| 617 | * Activity Action: Show settings for memory card storage. |
| 618 | * <p> |
| 619 | * In some cases, a matching Activity may not exist, so ensure you |
| 620 | * safeguard against this. |
| 621 | * <p> |
| 622 | * Input: Nothing. |
| 623 | * <p> |
| 624 | * Output: Nothing. |
| 625 | */ |
| 626 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 627 | public static final String ACTION_MEMORY_CARD_SETTINGS = |
| 628 | "android.settings.MEMORY_CARD_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 629 | |
Justin Mattson | ef34035 | 2010-01-13 21:05:46 -0800 | [diff] [blame] | 630 | /** |
| 631 | * Activity Action: Show settings for global search. |
| 632 | * <p> |
| 633 | * In some cases, a matching Activity may not exist, so ensure you |
| 634 | * safeguard against this. |
| 635 | * <p> |
| 636 | * Input: Nothing. |
| 637 | * <p> |
| 638 | * Output: Nothing |
| 639 | */ |
| 640 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 641 | public static final String ACTION_SEARCH_SETTINGS = |
| 642 | "android.search.action.SEARCH_SETTINGS"; |
| 643 | |
Daniel Sandler | 9d8b876 | 2010-01-22 20:50:15 -0500 | [diff] [blame] | 644 | /** |
| 645 | * Activity Action: Show general device information settings (serial |
| 646 | * number, software version, phone number, etc.). |
| 647 | * <p> |
| 648 | * In some cases, a matching Activity may not exist, so ensure you |
| 649 | * safeguard against this. |
| 650 | * <p> |
| 651 | * Input: Nothing. |
| 652 | * <p> |
| 653 | * Output: Nothing |
| 654 | */ |
| 655 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 656 | public static final String ACTION_DEVICE_INFO_SETTINGS = |
| 657 | "android.settings.DEVICE_INFO_SETTINGS"; |
| 658 | |
Martijn Coenen | 9b3c83f | 2011-07-28 11:21:39 -0500 | [diff] [blame] | 659 | /** |
Nick Pelly | cccf01d | 2011-10-31 14:49:40 -0700 | [diff] [blame] | 660 | * Activity Action: Show NFC settings. |
| 661 | * <p> |
| 662 | * This shows UI that allows NFC to be turned on or off. |
Martijn Coenen | 9b3c83f | 2011-07-28 11:21:39 -0500 | [diff] [blame] | 663 | * <p> |
| 664 | * In some cases, a matching Activity may not exist, so ensure you |
| 665 | * safeguard against this. |
| 666 | * <p> |
| 667 | * Input: Nothing. |
| 668 | * <p> |
| 669 | * Output: Nothing |
Nick Pelly | cccf01d | 2011-10-31 14:49:40 -0700 | [diff] [blame] | 670 | * @see android.nfc.NfcAdapter#isEnabled() |
| 671 | */ |
| 672 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 673 | public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS"; |
| 674 | |
| 675 | /** |
| 676 | * Activity Action: Show NFC Sharing settings. |
| 677 | * <p> |
| 678 | * This shows UI that allows NDEF Push (Android Beam) to be turned on or |
| 679 | * off. |
| 680 | * <p> |
| 681 | * In some cases, a matching Activity may not exist, so ensure you |
| 682 | * safeguard against this. |
| 683 | * <p> |
| 684 | * Input: Nothing. |
| 685 | * <p> |
| 686 | * Output: Nothing |
| 687 | * @see android.nfc.NfcAdapter#isNdefPushEnabled() |
Martijn Coenen | 9b3c83f | 2011-07-28 11:21:39 -0500 | [diff] [blame] | 688 | */ |
| 689 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 690 | public static final String ACTION_NFCSHARING_SETTINGS = |
| 691 | "android.settings.NFCSHARING_SETTINGS"; |
| 692 | |
Daniel Sandler | c08cd02 | 2012-11-27 22:47:37 -0500 | [diff] [blame] | 693 | /** |
Martijn Coenen | 62c196a | 2013-08-09 13:43:34 -0700 | [diff] [blame] | 694 | * Activity Action: Show NFC Tap & Pay settings |
| 695 | * <p> |
| 696 | * This shows UI that allows the user to configure Tap&Pay |
| 697 | * settings. |
| 698 | * <p> |
| 699 | * In some cases, a matching Activity may not exist, so ensure you |
| 700 | * safeguard against this. |
| 701 | * <p> |
| 702 | * Input: Nothing. |
| 703 | * <p> |
| 704 | * Output: Nothing |
| 705 | */ |
| 706 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 707 | public static final String ACTION_NFC_PAYMENT_SETTINGS = |
| 708 | "android.settings.NFC_PAYMENT_SETTINGS"; |
| 709 | |
| 710 | /** |
Daniel Sandler | c08cd02 | 2012-11-27 22:47:37 -0500 | [diff] [blame] | 711 | * Activity Action: Show Daydream settings. |
| 712 | * <p> |
| 713 | * In some cases, a matching Activity may not exist, so ensure you |
| 714 | * safeguard against this. |
| 715 | * <p> |
| 716 | * Input: Nothing. |
| 717 | * <p> |
| 718 | * Output: Nothing. |
| 719 | * @see android.service.dreams.DreamService |
Daniel Sandler | c08cd02 | 2012-11-27 22:47:37 -0500 | [diff] [blame] | 720 | */ |
| 721 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 722 | public static final String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS"; |
| 723 | |
Daniel Sandler | 5feceeb | 2013-03-22 18:29:23 -0700 | [diff] [blame] | 724 | /** |
| 725 | * Activity Action: Show Notification listener settings. |
| 726 | * <p> |
| 727 | * In some cases, a matching Activity may not exist, so ensure you |
| 728 | * safeguard against this. |
| 729 | * <p> |
| 730 | * Input: Nothing. |
| 731 | * <p> |
| 732 | * Output: Nothing. |
| 733 | * @see android.service.notification.NotificationListenerService |
| 734 | * @hide |
| 735 | */ |
| 736 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 737 | public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS |
| 738 | = "android.settings.NOTIFICATION_LISTENER_SETTINGS"; |
| 739 | |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 740 | /** |
John Spurlock | 7340fc8 | 2014-04-24 18:50:12 -0400 | [diff] [blame] | 741 | * @hide |
| 742 | */ |
| 743 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 744 | public static final String ACTION_CONDITION_PROVIDER_SETTINGS |
| 745 | = "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS"; |
| 746 | |
| 747 | /** |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 748 | * Activity Action: Show settings for video captioning. |
| 749 | * <p> |
| 750 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 751 | * against this. |
| 752 | * <p> |
| 753 | * Input: Nothing. |
| 754 | * <p> |
| 755 | * Output: Nothing. |
| 756 | */ |
| 757 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 758 | public static final String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS"; |
| 759 | |
Svetoslav | 773f54d | 2013-09-03 14:01:43 -0700 | [diff] [blame] | 760 | /** |
| 761 | * Activity Action: Show the top level print settings. |
| 762 | * <p> |
| 763 | * In some cases, a matching Activity may not exist, so ensure you |
| 764 | * safeguard against this. |
| 765 | * <p> |
| 766 | * Input: Nothing. |
| 767 | * <p> |
| 768 | * Output: Nothing. |
| 769 | */ |
| 770 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 771 | public static final String ACTION_PRINT_SETTINGS = |
| 772 | "android.settings.ACTION_PRINT_SETTINGS"; |
| 773 | |
John Spurlock | de54700 | 2014-02-28 17:50:39 -0500 | [diff] [blame] | 774 | /** |
| 775 | * Activity Action: Show Zen Mode configuration settings. |
| 776 | * |
| 777 | * @hide |
| 778 | */ |
| 779 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 780 | public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS"; |
| 781 | |
Santos Cordon | a4c7524 | 2014-07-09 12:07:51 -0700 | [diff] [blame] | 782 | /** |
| 783 | * Activity Action: Show the regulatory information screen for the device. |
| 784 | * <p> |
| 785 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 786 | * against this. |
| 787 | * <p> |
| 788 | * Input: Nothing. |
| 789 | * <p> |
| 790 | * Output: Nothing. |
| 791 | */ |
Jeff Sharkey | dd77fda | 2014-04-16 17:23:08 -0700 | [diff] [blame] | 792 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 793 | public static final String |
| 794 | ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO"; |
| 795 | |
Jerome Poichet | 7974cb3 | 2014-05-14 12:04:43 -0700 | [diff] [blame] | 796 | /** |
| 797 | * Activity Action: Show Device Name Settings. |
| 798 | * <p> |
| 799 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
Tim Kilbourn | 87cd0dc | 2014-04-14 15:37:51 -0700 | [diff] [blame] | 800 | * against this. |
Jerome Poichet | 7974cb3 | 2014-05-14 12:04:43 -0700 | [diff] [blame] | 801 | * |
| 802 | * @hide |
| 803 | */ |
| 804 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 805 | public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME"; |
| 806 | |
Tim Kilbourn | 87cd0dc | 2014-04-14 15:37:51 -0700 | [diff] [blame] | 807 | /** |
| 808 | * Activity Action: Show pairing settings. |
| 809 | * <p> |
| 810 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 811 | * against this. |
| 812 | * |
| 813 | * @hide |
| 814 | */ |
| 815 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 816 | public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS"; |
| 817 | |
John Spurlock | f8f524c | 2014-06-10 14:47:29 -0400 | [diff] [blame] | 818 | /** |
| 819 | * Activity Action: Show battery saver settings. |
| 820 | * |
| 821 | * @hide |
| 822 | */ |
| 823 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 824 | public static final String ACTION_BATTERY_SAVER_SETTINGS |
| 825 | = "android.settings.BATTERY_SAVER_SETTINGS"; |
| 826 | |
Amith Yamasani | eb7b94a | 2014-07-14 18:02:08 -0700 | [diff] [blame] | 827 | /** |
| 828 | * Activity Action: Show Home selection settings. If there are multiple activities |
| 829 | * that can satisfy the {@link Intent#CATEGORY_HOME} intent, this screen allows you |
| 830 | * to pick your preferred activity. |
| 831 | */ |
| 832 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 833 | public static final String ACTION_HOME_SETTINGS |
| 834 | = "android.settings.HOME_SETTINGS"; |
| 835 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 836 | // End of Intent actions for Settings |
| 837 | |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 838 | /** |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 839 | * @hide - Private call() method on SettingsProvider to read from 'system' table. |
| 840 | */ |
| 841 | public static final String CALL_METHOD_GET_SYSTEM = "GET_system"; |
| 842 | |
| 843 | /** |
| 844 | * @hide - Private call() method on SettingsProvider to read from 'secure' table. |
| 845 | */ |
| 846 | public static final String CALL_METHOD_GET_SECURE = "GET_secure"; |
| 847 | |
| 848 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 849 | * @hide - Private call() method on SettingsProvider to read from 'global' table. |
| 850 | */ |
| 851 | public static final String CALL_METHOD_GET_GLOBAL = "GET_global"; |
| 852 | |
| 853 | /** |
| 854 | * @hide - User handle argument extra to the fast-path call()-based requests |
| 855 | */ |
| 856 | public static final String CALL_METHOD_USER_KEY = "_user"; |
| 857 | |
| 858 | /** @hide - Private call() method to write to 'system' table */ |
| 859 | public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system"; |
| 860 | |
| 861 | /** @hide - Private call() method to write to 'secure' table */ |
| 862 | public static final String CALL_METHOD_PUT_SECURE = "PUT_secure"; |
| 863 | |
| 864 | /** @hide - Private call() method to write to 'global' table */ |
| 865 | public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global"; |
| 866 | |
| 867 | /** |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 868 | * Activity Extra: Limit available options in launched activity based on the given authority. |
| 869 | * <p> |
| 870 | * This can be passed as an extra field in an Activity Intent with one or more syncable content |
| 871 | * provider's authorities as a String[]. This field is used by some intents to alter the |
| 872 | * behavior of the called activity. |
| 873 | * <p> |
| 874 | * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based |
| 875 | * on the authority given. |
| 876 | */ |
Alon Albert | 50359c2 | 2013-02-26 14:47:48 -0800 | [diff] [blame] | 877 | public static final String EXTRA_AUTHORITIES = "authorities"; |
| 878 | |
Alon Albert | d35bf1f | 2013-04-18 14:26:51 -0700 | [diff] [blame] | 879 | /** |
| 880 | * Activity Extra: Limit available options in launched activity based on the given account |
| 881 | * types. |
| 882 | * <p> |
| 883 | * This can be passed as an extra field in an Activity Intent with one or more account types |
| 884 | * as a String[]. This field is used by some intents to alter the behavior of the called |
| 885 | * activity. |
| 886 | * <p> |
| 887 | * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types to the specified |
| 888 | * list. |
| 889 | */ |
Alon Albert | 50359c2 | 2013-02-26 14:47:48 -0800 | [diff] [blame] | 890 | public static final String EXTRA_ACCOUNT_TYPES = "account_types"; |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 891 | |
Tadashi G. Takaoka | 2548020 | 2011-01-20 23:13:02 +0900 | [diff] [blame] | 892 | public static final String EXTRA_INPUT_METHOD_ID = "input_method_id"; |
| 893 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 894 | private static final String JID_RESOURCE_PREFIX = "android"; |
| 895 | |
| 896 | public static final String AUTHORITY = "settings"; |
| 897 | |
| 898 | private static final String TAG = "Settings"; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 899 | private static final boolean LOCAL_LOGV = false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 900 | |
David Christie | 3f7b652 | 2013-08-06 19:19:08 -0700 | [diff] [blame] | 901 | // Lock ensures that when enabling/disabling the master location switch, we don't end up |
| 902 | // with a partial enable/disable state in multi-threaded situations. |
| 903 | private static final Object mLocationSettingsLock = new Object(); |
| 904 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 905 | public static class SettingNotFoundException extends AndroidException { |
| 906 | public SettingNotFoundException(String msg) { |
| 907 | super(msg); |
| 908 | } |
| 909 | } |
| 910 | |
| 911 | /** |
| 912 | * Common base for tables of name/value settings. |
| 913 | */ |
| 914 | public static class NameValueTable implements BaseColumns { |
| 915 | public static final String NAME = "name"; |
| 916 | public static final String VALUE = "value"; |
| 917 | |
| 918 | protected static boolean putString(ContentResolver resolver, Uri uri, |
| 919 | String name, String value) { |
| 920 | // The database will take care of replacing duplicates. |
| 921 | try { |
| 922 | ContentValues values = new ContentValues(); |
| 923 | values.put(NAME, name); |
| 924 | values.put(VALUE, value); |
| 925 | resolver.insert(uri, values); |
| 926 | return true; |
| 927 | } catch (SQLException e) { |
Dianne Hackborn | a33e3f7 | 2009-09-29 17:28:24 -0700 | [diff] [blame] | 928 | Log.w(TAG, "Can't set key " + name + " in " + uri, e); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 929 | return false; |
| 930 | } |
| 931 | } |
| 932 | |
| 933 | public static Uri getUriFor(Uri uri, String name) { |
| 934 | return Uri.withAppendedPath(uri, name); |
| 935 | } |
| 936 | } |
| 937 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 938 | // Thread-safe. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 939 | private static class NameValueCache { |
| 940 | private final String mVersionSystemProperty; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 941 | private final Uri mUri; |
| 942 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 943 | private static final String[] SELECT_VALUE = |
| 944 | new String[] { Settings.NameValueTable.VALUE }; |
| 945 | private static final String NAME_EQ_PLACEHOLDER = "name=?"; |
| 946 | |
| 947 | // Must synchronize on 'this' to access mValues and mValuesVersion. |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 948 | private final HashMap<String, String> mValues = new HashMap<String, String>(); |
| 949 | private long mValuesVersion = 0; |
| 950 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 951 | // Initially null; set lazily and held forever. Synchronized on 'this'. |
| 952 | private IContentProvider mContentProvider = null; |
| 953 | |
| 954 | // The method we'll call (or null, to not use) on the provider |
| 955 | // for the fast path of retrieving settings. |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 956 | private final String mCallGetCommand; |
| 957 | private final String mCallSetCommand; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 958 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 959 | public NameValueCache(String versionSystemProperty, Uri uri, |
| 960 | String getCommand, String setCommand) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 961 | mVersionSystemProperty = versionSystemProperty; |
| 962 | mUri = uri; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 963 | mCallGetCommand = getCommand; |
| 964 | mCallSetCommand = setCommand; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 965 | } |
| 966 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 967 | private IContentProvider lazyGetProvider(ContentResolver cr) { |
| 968 | IContentProvider cp = null; |
| 969 | synchronized (this) { |
| 970 | cp = mContentProvider; |
| 971 | if (cp == null) { |
| 972 | cp = mContentProvider = cr.acquireProvider(mUri.getAuthority()); |
| 973 | } |
| 974 | } |
| 975 | return cp; |
| 976 | } |
| 977 | |
| 978 | public boolean putStringForUser(ContentResolver cr, String name, String value, |
| 979 | final int userHandle) { |
| 980 | try { |
| 981 | Bundle arg = new Bundle(); |
| 982 | arg.putString(Settings.NameValueTable.VALUE, value); |
Christopher Tate | d5fe147 | 2012-09-10 15:48:38 -0700 | [diff] [blame] | 983 | arg.putInt(CALL_METHOD_USER_KEY, userHandle); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 984 | IContentProvider cp = lazyGetProvider(cr); |
Dianne Hackborn | 35654b6 | 2013-01-14 17:38:02 -0800 | [diff] [blame] | 985 | cp.call(cr.getPackageName(), mCallSetCommand, name, arg); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 986 | } catch (RemoteException e) { |
| 987 | Log.w(TAG, "Can't set key " + name + " in " + mUri, e); |
| 988 | return false; |
| 989 | } |
| 990 | return true; |
| 991 | } |
| 992 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 993 | public String getStringForUser(ContentResolver cr, String name, final int userHandle) { |
Christopher Tate | 78d2a66 | 2012-09-13 16:19:44 -0700 | [diff] [blame] | 994 | final boolean isSelf = (userHandle == UserHandle.myUserId()); |
| 995 | if (isSelf) { |
| 996 | long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0); |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 997 | |
Christopher Tate | 78d2a66 | 2012-09-13 16:19:44 -0700 | [diff] [blame] | 998 | // Our own user's settings data uses a client-side cache |
| 999 | synchronized (this) { |
| 1000 | if (mValuesVersion != newValuesVersion) { |
| 1001 | if (LOCAL_LOGV || false) { |
| 1002 | Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current " |
| 1003 | + newValuesVersion + " != cached " + mValuesVersion); |
| 1004 | } |
| 1005 | |
| 1006 | mValues.clear(); |
| 1007 | mValuesVersion = newValuesVersion; |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1008 | } |
| 1009 | |
Christopher Tate | 78d2a66 | 2012-09-13 16:19:44 -0700 | [diff] [blame] | 1010 | if (mValues.containsKey(name)) { |
| 1011 | return mValues.get(name); // Could be null, that's OK -- negative caching |
| 1012 | } |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1013 | } |
Christopher Tate | 78d2a66 | 2012-09-13 16:19:44 -0700 | [diff] [blame] | 1014 | } else { |
| 1015 | if (LOCAL_LOGV) Log.v(TAG, "get setting for user " + userHandle |
| 1016 | + " by user " + UserHandle.myUserId() + " so skipping cache"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1017 | } |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1018 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1019 | IContentProvider cp = lazyGetProvider(cr); |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1020 | |
| 1021 | // Try the fast path first, not using query(). If this |
| 1022 | // fails (alternate Settings provider that doesn't support |
| 1023 | // this interface?) then we fall back to the query/table |
| 1024 | // interface. |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1025 | if (mCallGetCommand != null) { |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1026 | try { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1027 | Bundle args = null; |
Christopher Tate | 5e08af0 | 2012-09-21 17:17:22 -0700 | [diff] [blame] | 1028 | if (!isSelf) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1029 | args = new Bundle(); |
| 1030 | args.putInt(CALL_METHOD_USER_KEY, userHandle); |
| 1031 | } |
Dianne Hackborn | 35654b6 | 2013-01-14 17:38:02 -0800 | [diff] [blame] | 1032 | Bundle b = cp.call(cr.getPackageName(), mCallGetCommand, name, args); |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1033 | if (b != null) { |
| 1034 | String value = b.getPairValue(); |
Christopher Tate | 78d2a66 | 2012-09-13 16:19:44 -0700 | [diff] [blame] | 1035 | // Don't update our cache for reads of other users' data |
| 1036 | if (isSelf) { |
| 1037 | synchronized (this) { |
| 1038 | mValues.put(name, value); |
| 1039 | } |
| 1040 | } else { |
| 1041 | if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle |
| 1042 | + " by " + UserHandle.myUserId() |
| 1043 | + " so not updating cache"); |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1044 | } |
| 1045 | return value; |
| 1046 | } |
| 1047 | // If the response Bundle is null, we fall through |
| 1048 | // to the query interface below. |
| 1049 | } catch (RemoteException e) { |
| 1050 | // Not supported by the remote side? Fall through |
| 1051 | // to query(). |
| 1052 | } |
| 1053 | } |
| 1054 | |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1055 | Cursor c = null; |
| 1056 | try { |
Dianne Hackborn | 35654b6 | 2013-01-14 17:38:02 -0800 | [diff] [blame] | 1057 | c = cp.query(cr.getPackageName(), mUri, SELECT_VALUE, NAME_EQ_PLACEHOLDER, |
Jeff Brown | 75ea64f | 2012-01-25 19:37:13 -0800 | [diff] [blame] | 1058 | new String[]{name}, null, null); |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1059 | if (c == null) { |
| 1060 | Log.w(TAG, "Can't get key " + name + " from " + mUri); |
| 1061 | return null; |
| 1062 | } |
| 1063 | |
| 1064 | String value = c.moveToNext() ? c.getString(0) : null; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1065 | synchronized (this) { |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1066 | mValues.put(name, value); |
| 1067 | } |
| 1068 | if (LOCAL_LOGV) { |
| 1069 | Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " + |
| 1070 | name + " = " + (value == null ? "(null)" : value)); |
| 1071 | } |
| 1072 | return value; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1073 | } catch (RemoteException e) { |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1074 | Log.w(TAG, "Can't get key " + name + " from " + mUri, e); |
| 1075 | return null; // Return null, but don't cache it. |
| 1076 | } finally { |
| 1077 | if (c != null) c.close(); |
| 1078 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1079 | } |
| 1080 | } |
| 1081 | |
| 1082 | /** |
| 1083 | * System settings, containing miscellaneous system preferences. This |
| 1084 | * table holds simple name/value pairs. There are convenience |
| 1085 | * functions for accessing individual settings entries. |
| 1086 | */ |
| 1087 | public static final class System extends NameValueTable { |
| 1088 | public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version"; |
| 1089 | |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 1090 | /** |
| 1091 | * The content:// style URL for this table |
| 1092 | */ |
| 1093 | public static final Uri CONTENT_URI = |
| 1094 | Uri.parse("content://" + AUTHORITY + "/system"); |
| 1095 | |
| 1096 | private static final NameValueCache sNameValueCache = new NameValueCache( |
| 1097 | SYS_PROP_SETTING_VERSION, |
| 1098 | CONTENT_URI, |
| 1099 | CALL_METHOD_GET_SYSTEM, |
| 1100 | CALL_METHOD_PUT_SYSTEM); |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1101 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1102 | private static final HashSet<String> MOVED_TO_SECURE; |
| 1103 | static { |
| 1104 | MOVED_TO_SECURE = new HashSet<String>(30); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1105 | MOVED_TO_SECURE.add(Secure.ANDROID_ID); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1106 | MOVED_TO_SECURE.add(Secure.HTTP_PROXY); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1107 | MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED); |
Danielle Millett | 925a7d8 | 2012-03-19 18:02:20 -0400 | [diff] [blame] | 1108 | MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS); |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1109 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED); |
| 1110 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE); |
| 1111 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1112 | MOVED_TO_SECURE.add(Secure.LOGGING_ID); |
| 1113 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED); |
| 1114 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE); |
| 1115 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL); |
| 1116 | MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1117 | MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL); |
| 1118 | MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); |
| 1119 | MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); |
| 1120 | MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT); |
| 1121 | MOVED_TO_SECURE.add(Secure.WIFI_ON); |
| 1122 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE); |
| 1123 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT); |
| 1124 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS); |
| 1125 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED); |
| 1126 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS); |
| 1127 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT); |
| 1128 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS); |
| 1129 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON); |
| 1130 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT); |
| 1131 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS); |
| 1132 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS); |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 1133 | |
| 1134 | // At one time in System, then Global, but now back in Secure |
| 1135 | MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1136 | } |
| 1137 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1138 | private static final HashSet<String> MOVED_TO_GLOBAL; |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1139 | private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1140 | static { |
| 1141 | MOVED_TO_GLOBAL = new HashSet<String>(); |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1142 | MOVED_TO_SECURE_THEN_GLOBAL = new HashSet<String>(); |
| 1143 | |
Christopher Tate | 9219874 | 2012-09-07 12:00:13 -0700 | [diff] [blame] | 1144 | // these were originally in system but migrated to secure in the past, |
| 1145 | // so are duplicated in the Secure.* namespace |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1146 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.ADB_ENABLED); |
| 1147 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.BLUETOOTH_ON); |
| 1148 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DATA_ROAMING); |
| 1149 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DEVICE_PROVISIONED); |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1150 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED); |
| 1151 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.HTTP_PROXY); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1152 | |
Christopher Tate | 9219874 | 2012-09-07 12:00:13 -0700 | [diff] [blame] | 1153 | // these are moving directly from system to global |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1154 | MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON); |
| 1155 | MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS); |
| 1156 | MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS); |
| 1157 | MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME); |
| 1158 | MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE); |
| 1159 | MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND); |
| 1160 | MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND); |
| 1161 | MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND); |
| 1162 | MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND); |
| 1163 | MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED); |
| 1164 | MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND); |
| 1165 | MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND); |
| 1166 | MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND); |
| 1167 | MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED); |
| 1168 | MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN); |
| 1169 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY); |
Eric Laurent | bc0fab1f | 2012-09-19 11:24:41 -0700 | [diff] [blame] | 1170 | MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER); |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 1171 | MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE); |
| 1172 | MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE); |
| 1173 | MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE); |
| 1174 | MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS); |
| 1175 | MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE); |
| 1176 | MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE); |
| 1177 | MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY); |
| 1178 | MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP); |
| 1179 | MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER); |
| 1180 | MOVED_TO_GLOBAL.add(Settings.Global.SHOW_PROCESSES); |
| 1181 | MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES); |
Geremy Condra | a073511 | 2013-03-26 21:49:26 -0700 | [diff] [blame] | 1182 | MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_CONTENT_URL); |
| 1183 | MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_METADATA_URL); |
| 1184 | MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_CONTENT_URL); |
| 1185 | MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_METADATA_URL); |
| 1186 | MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL); |
| 1187 | MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL); |
| 1188 | MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_CONTENT_URL); |
| 1189 | MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1190 | } |
| 1191 | |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1192 | /** @hide */ |
| 1193 | public static void getMovedKeys(HashSet<String> outKeySet) { |
| 1194 | outKeySet.addAll(MOVED_TO_GLOBAL); |
| 1195 | outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL); |
| 1196 | } |
| 1197 | |
| 1198 | /** @hide */ |
| 1199 | public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) { |
| 1200 | outKeySet.addAll(MOVED_TO_GLOBAL); |
| 1201 | } |
| 1202 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1203 | /** |
| 1204 | * Look up a name in the database. |
| 1205 | * @param resolver to access the database with |
| 1206 | * @param name to look up in the table |
| 1207 | * @return the corresponding value, or null if not present |
| 1208 | */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 1209 | public static String getString(ContentResolver resolver, String name) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1210 | return getStringForUser(resolver, name, UserHandle.myUserId()); |
| 1211 | } |
| 1212 | |
| 1213 | /** @hide */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 1214 | public static String getStringForUser(ContentResolver resolver, String name, |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1215 | int userHandle) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1216 | if (MOVED_TO_SECURE.contains(name)) { |
| 1217 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1218 | + " to android.provider.Settings.Secure, returning read-only value."); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1219 | return Secure.getStringForUser(resolver, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1220 | } |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1221 | if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1222 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1223 | + " to android.provider.Settings.Global, returning read-only value."); |
| 1224 | return Global.getStringForUser(resolver, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1225 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1226 | return sNameValueCache.getStringForUser(resolver, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1227 | } |
| 1228 | |
| 1229 | /** |
| 1230 | * Store a name/value pair into the database. |
| 1231 | * @param resolver to access the database with |
| 1232 | * @param name to store |
| 1233 | * @param value to associate with the name |
| 1234 | * @return true if the value was set, false on database errors |
| 1235 | */ |
| 1236 | public static boolean putString(ContentResolver resolver, String name, String value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1237 | return putStringForUser(resolver, name, value, UserHandle.myUserId()); |
| 1238 | } |
| 1239 | |
| 1240 | /** @hide */ |
| 1241 | public static boolean putStringForUser(ContentResolver resolver, String name, String value, |
| 1242 | int userHandle) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1243 | if (MOVED_TO_SECURE.contains(name)) { |
| 1244 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1245 | + " to android.provider.Settings.Secure, value is unchanged."); |
| 1246 | return false; |
| 1247 | } |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1248 | if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1249 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1250 | + " to android.provider.Settings.Global, value is unchanged."); |
| 1251 | return false; |
| 1252 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1253 | return sNameValueCache.putStringForUser(resolver, name, value, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1254 | } |
| 1255 | |
| 1256 | /** |
| 1257 | * Construct the content URI for a particular name/value pair, |
| 1258 | * useful for monitoring changes with a ContentObserver. |
| 1259 | * @param name to look up in the table |
| 1260 | * @return the corresponding content URI, or null if not present |
| 1261 | */ |
| 1262 | public static Uri getUriFor(String name) { |
| 1263 | if (MOVED_TO_SECURE.contains(name)) { |
| 1264 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1265 | + " to android.provider.Settings.Secure, returning Secure URI."); |
| 1266 | return Secure.getUriFor(Secure.CONTENT_URI, name); |
| 1267 | } |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1268 | if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1269 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1270 | + " to android.provider.Settings.Global, returning read-only global URI."); |
| 1271 | return Global.getUriFor(Global.CONTENT_URI, name); |
| 1272 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1273 | return getUriFor(CONTENT_URI, name); |
| 1274 | } |
| 1275 | |
| 1276 | /** |
| 1277 | * Convenience function for retrieving a single system settings value |
| 1278 | * as an integer. Note that internally setting values are always |
| 1279 | * stored as strings; this function converts the string to an integer |
| 1280 | * for you. The default value will be returned if the setting is |
| 1281 | * not defined or not an integer. |
| 1282 | * |
| 1283 | * @param cr The ContentResolver to access. |
| 1284 | * @param name The name of the setting to retrieve. |
| 1285 | * @param def Value to return if the setting is not defined. |
| 1286 | * |
| 1287 | * @return The setting's current value, or 'def' if it is not defined |
| 1288 | * or not a valid integer. |
| 1289 | */ |
| 1290 | public static int getInt(ContentResolver cr, String name, int def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1291 | return getIntForUser(cr, name, def, UserHandle.myUserId()); |
| 1292 | } |
| 1293 | |
| 1294 | /** @hide */ |
| 1295 | public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { |
| 1296 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1297 | try { |
| 1298 | return v != null ? Integer.parseInt(v) : def; |
| 1299 | } catch (NumberFormatException e) { |
| 1300 | return def; |
| 1301 | } |
| 1302 | } |
| 1303 | |
| 1304 | /** |
| 1305 | * Convenience function for retrieving a single system settings value |
| 1306 | * as an integer. Note that internally setting values are always |
| 1307 | * stored as strings; this function converts the string to an integer |
| 1308 | * for you. |
| 1309 | * <p> |
| 1310 | * This version does not take a default value. If the setting has not |
| 1311 | * been set, or the string value is not a number, |
| 1312 | * it throws {@link SettingNotFoundException}. |
| 1313 | * |
| 1314 | * @param cr The ContentResolver to access. |
| 1315 | * @param name The name of the setting to retrieve. |
| 1316 | * |
| 1317 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 1318 | * name can't be found or the setting value is not an integer. |
| 1319 | * |
| 1320 | * @return The setting's current value. |
| 1321 | */ |
| 1322 | public static int getInt(ContentResolver cr, String name) |
| 1323 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1324 | return getIntForUser(cr, name, UserHandle.myUserId()); |
| 1325 | } |
| 1326 | |
| 1327 | /** @hide */ |
| 1328 | public static int getIntForUser(ContentResolver cr, String name, int userHandle) |
| 1329 | throws SettingNotFoundException { |
| 1330 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1331 | try { |
| 1332 | return Integer.parseInt(v); |
| 1333 | } catch (NumberFormatException e) { |
| 1334 | throw new SettingNotFoundException(name); |
| 1335 | } |
| 1336 | } |
| 1337 | |
| 1338 | /** |
| 1339 | * Convenience function for updating a single settings value as an |
| 1340 | * integer. This will either create a new entry in the table if the |
| 1341 | * given name does not exist, or modify the value of the existing row |
| 1342 | * with that name. Note that internally setting values are always |
| 1343 | * stored as strings, so this function converts the given value to a |
| 1344 | * string before storing it. |
| 1345 | * |
| 1346 | * @param cr The ContentResolver to access. |
| 1347 | * @param name The name of the setting to modify. |
| 1348 | * @param value The new value for the setting. |
| 1349 | * @return true if the value was set, false on database errors |
| 1350 | */ |
| 1351 | public static boolean putInt(ContentResolver cr, String name, int value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1352 | return putIntForUser(cr, name, value, UserHandle.myUserId()); |
| 1353 | } |
| 1354 | |
| 1355 | /** @hide */ |
| 1356 | public static boolean putIntForUser(ContentResolver cr, String name, int value, |
| 1357 | int userHandle) { |
| 1358 | return putStringForUser(cr, name, Integer.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1359 | } |
| 1360 | |
| 1361 | /** |
| 1362 | * Convenience function for retrieving a single system settings value |
| 1363 | * as a {@code long}. Note that internally setting values are always |
| 1364 | * stored as strings; this function converts the string to a {@code long} |
| 1365 | * for you. The default value will be returned if the setting is |
| 1366 | * not defined or not a {@code long}. |
| 1367 | * |
| 1368 | * @param cr The ContentResolver to access. |
| 1369 | * @param name The name of the setting to retrieve. |
| 1370 | * @param def Value to return if the setting is not defined. |
| 1371 | * |
| 1372 | * @return The setting's current value, or 'def' if it is not defined |
| 1373 | * or not a valid {@code long}. |
| 1374 | */ |
| 1375 | public static long getLong(ContentResolver cr, String name, long def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1376 | return getLongForUser(cr, name, def, UserHandle.myUserId()); |
| 1377 | } |
| 1378 | |
| 1379 | /** @hide */ |
| 1380 | public static long getLongForUser(ContentResolver cr, String name, long def, |
| 1381 | int userHandle) { |
| 1382 | String valString = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1383 | long value; |
| 1384 | try { |
| 1385 | value = valString != null ? Long.parseLong(valString) : def; |
| 1386 | } catch (NumberFormatException e) { |
| 1387 | value = def; |
| 1388 | } |
| 1389 | return value; |
| 1390 | } |
| 1391 | |
| 1392 | /** |
| 1393 | * Convenience function for retrieving a single system settings value |
| 1394 | * as a {@code long}. Note that internally setting values are always |
| 1395 | * stored as strings; this function converts the string to a {@code long} |
| 1396 | * for you. |
| 1397 | * <p> |
| 1398 | * This version does not take a default value. If the setting has not |
| 1399 | * been set, or the string value is not a number, |
| 1400 | * it throws {@link SettingNotFoundException}. |
| 1401 | * |
| 1402 | * @param cr The ContentResolver to access. |
| 1403 | * @param name The name of the setting to retrieve. |
| 1404 | * |
| 1405 | * @return The setting's current value. |
| 1406 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 1407 | * name can't be found or the setting value is not an integer. |
| 1408 | */ |
| 1409 | public static long getLong(ContentResolver cr, String name) |
| 1410 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1411 | return getLongForUser(cr, name, UserHandle.myUserId()); |
| 1412 | } |
| 1413 | |
| 1414 | /** @hide */ |
| 1415 | public static long getLongForUser(ContentResolver cr, String name, int userHandle) |
| 1416 | throws SettingNotFoundException { |
| 1417 | String valString = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1418 | try { |
| 1419 | return Long.parseLong(valString); |
| 1420 | } catch (NumberFormatException e) { |
| 1421 | throw new SettingNotFoundException(name); |
| 1422 | } |
| 1423 | } |
| 1424 | |
| 1425 | /** |
| 1426 | * Convenience function for updating a single settings value as a long |
| 1427 | * integer. This will either create a new entry in the table if the |
| 1428 | * given name does not exist, or modify the value of the existing row |
| 1429 | * with that name. Note that internally setting values are always |
| 1430 | * stored as strings, so this function converts the given value to a |
| 1431 | * string before storing it. |
| 1432 | * |
| 1433 | * @param cr The ContentResolver to access. |
| 1434 | * @param name The name of the setting to modify. |
| 1435 | * @param value The new value for the setting. |
| 1436 | * @return true if the value was set, false on database errors |
| 1437 | */ |
| 1438 | public static boolean putLong(ContentResolver cr, String name, long value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1439 | return putLongForUser(cr, name, value, UserHandle.myUserId()); |
| 1440 | } |
| 1441 | |
| 1442 | /** @hide */ |
| 1443 | public static boolean putLongForUser(ContentResolver cr, String name, long value, |
| 1444 | int userHandle) { |
| 1445 | return putStringForUser(cr, name, Long.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1446 | } |
| 1447 | |
| 1448 | /** |
| 1449 | * Convenience function for retrieving a single system settings value |
| 1450 | * as a floating point number. Note that internally setting values are |
| 1451 | * always stored as strings; this function converts the string to an |
| 1452 | * float for you. The default value will be returned if the setting |
| 1453 | * is not defined or not a valid float. |
| 1454 | * |
| 1455 | * @param cr The ContentResolver to access. |
| 1456 | * @param name The name of the setting to retrieve. |
| 1457 | * @param def Value to return if the setting is not defined. |
| 1458 | * |
| 1459 | * @return The setting's current value, or 'def' if it is not defined |
| 1460 | * or not a valid float. |
| 1461 | */ |
| 1462 | public static float getFloat(ContentResolver cr, String name, float def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1463 | return getFloatForUser(cr, name, def, UserHandle.myUserId()); |
| 1464 | } |
| 1465 | |
| 1466 | /** @hide */ |
| 1467 | public static float getFloatForUser(ContentResolver cr, String name, float def, |
| 1468 | int userHandle) { |
| 1469 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1470 | try { |
| 1471 | return v != null ? Float.parseFloat(v) : def; |
| 1472 | } catch (NumberFormatException e) { |
| 1473 | return def; |
| 1474 | } |
| 1475 | } |
| 1476 | |
| 1477 | /** |
| 1478 | * Convenience function for retrieving a single system settings value |
| 1479 | * as a float. Note that internally setting values are always |
| 1480 | * stored as strings; this function converts the string to a float |
| 1481 | * for you. |
| 1482 | * <p> |
| 1483 | * This version does not take a default value. If the setting has not |
| 1484 | * been set, or the string value is not a number, |
| 1485 | * it throws {@link SettingNotFoundException}. |
| 1486 | * |
| 1487 | * @param cr The ContentResolver to access. |
| 1488 | * @param name The name of the setting to retrieve. |
| 1489 | * |
| 1490 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 1491 | * name can't be found or the setting value is not a float. |
| 1492 | * |
| 1493 | * @return The setting's current value. |
| 1494 | */ |
| 1495 | public static float getFloat(ContentResolver cr, String name) |
| 1496 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1497 | return getFloatForUser(cr, name, UserHandle.myUserId()); |
| 1498 | } |
| 1499 | |
| 1500 | /** @hide */ |
| 1501 | public static float getFloatForUser(ContentResolver cr, String name, int userHandle) |
| 1502 | throws SettingNotFoundException { |
| 1503 | String v = getStringForUser(cr, name, userHandle); |
Brian Muramatsu | e1d4698 | 2010-12-06 17:34:20 -0800 | [diff] [blame] | 1504 | if (v == null) { |
| 1505 | throw new SettingNotFoundException(name); |
| 1506 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1507 | try { |
| 1508 | return Float.parseFloat(v); |
| 1509 | } catch (NumberFormatException e) { |
| 1510 | throw new SettingNotFoundException(name); |
| 1511 | } |
| 1512 | } |
| 1513 | |
| 1514 | /** |
| 1515 | * Convenience function for updating a single settings value as a |
| 1516 | * floating point number. This will either create a new entry in the |
| 1517 | * table if the given name does not exist, or modify the value of the |
| 1518 | * existing row with that name. Note that internally setting values |
| 1519 | * are always stored as strings, so this function converts the given |
| 1520 | * value to a string before storing it. |
| 1521 | * |
| 1522 | * @param cr The ContentResolver to access. |
| 1523 | * @param name The name of the setting to modify. |
| 1524 | * @param value The new value for the setting. |
| 1525 | * @return true if the value was set, false on database errors |
| 1526 | */ |
| 1527 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1528 | return putFloatForUser(cr, name, value, UserHandle.myUserId()); |
| 1529 | } |
| 1530 | |
| 1531 | /** @hide */ |
| 1532 | public static boolean putFloatForUser(ContentResolver cr, String name, float value, |
| 1533 | int userHandle) { |
| 1534 | return putStringForUser(cr, name, Float.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1535 | } |
| 1536 | |
| 1537 | /** |
| 1538 | * Convenience function to read all of the current |
| 1539 | * configuration-related settings into a |
| 1540 | * {@link Configuration} object. |
| 1541 | * |
| 1542 | * @param cr The ContentResolver to access. |
| 1543 | * @param outConfig Where to place the configuration settings. |
| 1544 | */ |
| 1545 | public static void getConfiguration(ContentResolver cr, Configuration outConfig) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1546 | getConfigurationForUser(cr, outConfig, UserHandle.myUserId()); |
| 1547 | } |
| 1548 | |
| 1549 | /** @hide */ |
| 1550 | public static void getConfigurationForUser(ContentResolver cr, Configuration outConfig, |
| 1551 | int userHandle) { |
| 1552 | outConfig.fontScale = Settings.System.getFloatForUser( |
| 1553 | cr, FONT_SCALE, outConfig.fontScale, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1554 | if (outConfig.fontScale < 0) { |
| 1555 | outConfig.fontScale = 1; |
| 1556 | } |
| 1557 | } |
| 1558 | |
| 1559 | /** |
Dianne Hackborn | 31ca854 | 2011-07-19 14:58:28 -0700 | [diff] [blame] | 1560 | * @hide Erase the fields in the Configuration that should be applied |
| 1561 | * by the settings. |
| 1562 | */ |
| 1563 | public static void clearConfiguration(Configuration inoutConfig) { |
| 1564 | inoutConfig.fontScale = 0; |
| 1565 | } |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 1566 | |
Dianne Hackborn | 31ca854 | 2011-07-19 14:58:28 -0700 | [diff] [blame] | 1567 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1568 | * Convenience function to write a batch of configuration-related |
| 1569 | * settings from a {@link Configuration} object. |
| 1570 | * |
| 1571 | * @param cr The ContentResolver to access. |
| 1572 | * @param config The settings to write. |
| 1573 | * @return true if the values were set, false on database errors |
| 1574 | */ |
| 1575 | public static boolean putConfiguration(ContentResolver cr, Configuration config) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1576 | return putConfigurationForUser(cr, config, UserHandle.myUserId()); |
| 1577 | } |
| 1578 | |
| 1579 | /** @hide */ |
| 1580 | public static boolean putConfigurationForUser(ContentResolver cr, Configuration config, |
| 1581 | int userHandle) { |
| 1582 | return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1583 | } |
| 1584 | |
Dianne Hackborn | b8b11a0 | 2010-03-10 15:53:11 -0800 | [diff] [blame] | 1585 | /** @hide */ |
| 1586 | public static boolean hasInterestingConfigurationChanges(int changes) { |
| 1587 | return (changes&ActivityInfo.CONFIG_FONT_SCALE) != 0; |
| 1588 | } |
Jaikumar Ganesh | 545e670 | 2010-06-04 10:23:03 -0700 | [diff] [blame] | 1589 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1590 | /** @deprecated - Do not use */ |
| 1591 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1592 | public static boolean getShowGTalkServiceStatus(ContentResolver cr) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1593 | return getShowGTalkServiceStatusForUser(cr, UserHandle.myUserId()); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1594 | } |
| 1595 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1596 | /** |
| 1597 | * @hide |
| 1598 | * @deprecated - Do not use |
| 1599 | */ |
| 1600 | public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr, |
| 1601 | int userHandle) { |
| 1602 | return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0; |
| 1603 | } |
| 1604 | |
| 1605 | /** @deprecated - Do not use */ |
| 1606 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1607 | public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) { |
Christopher Tate | c8c0838 | 2012-09-19 17:18:18 -0700 | [diff] [blame] | 1608 | setShowGTalkServiceStatusForUser(cr, flag, UserHandle.myUserId()); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1609 | } |
| 1610 | |
| 1611 | /** |
| 1612 | * @hide |
| 1613 | * @deprecated - Do not use |
| 1614 | */ |
| 1615 | @Deprecated |
| 1616 | public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag, |
| 1617 | int userHandle) { |
| 1618 | putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1619 | } |
| 1620 | |
| 1621 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1622 | * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1623 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1624 | @Deprecated |
| 1625 | public static final String STAY_ON_WHILE_PLUGGED_IN = Global.STAY_ON_WHILE_PLUGGED_IN; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1626 | |
| 1627 | /** |
| 1628 | * What happens when the user presses the end call button if they're not |
| 1629 | * on a call.<br/> |
| 1630 | * <b>Values:</b><br/> |
| 1631 | * 0 - The end button does nothing.<br/> |
| 1632 | * 1 - The end button goes to the home screen.<br/> |
| 1633 | * 2 - The end button puts the device to sleep and locks the keyguard.<br/> |
| 1634 | * 3 - The end button goes to the home screen. If the user is already on the |
| 1635 | * home screen, it puts the device to sleep. |
| 1636 | */ |
| 1637 | public static final String END_BUTTON_BEHAVIOR = "end_button_behavior"; |
| 1638 | |
| 1639 | /** |
David Brown | 458e806 | 2010-03-08 21:52:11 -0800 | [diff] [blame] | 1640 | * END_BUTTON_BEHAVIOR value for "go home". |
| 1641 | * @hide |
| 1642 | */ |
| 1643 | public static final int END_BUTTON_BEHAVIOR_HOME = 0x1; |
| 1644 | |
| 1645 | /** |
| 1646 | * END_BUTTON_BEHAVIOR value for "go to sleep". |
| 1647 | * @hide |
| 1648 | */ |
| 1649 | public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2; |
| 1650 | |
| 1651 | /** |
| 1652 | * END_BUTTON_BEHAVIOR default value. |
| 1653 | * @hide |
| 1654 | */ |
| 1655 | public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP; |
| 1656 | |
| 1657 | /** |
Joe Onorato | 9cdffa1 | 2011-04-06 18:27:27 -0700 | [diff] [blame] | 1658 | * Is advanced settings mode turned on. 0 == no, 1 == yes |
| 1659 | * @hide |
| 1660 | */ |
| 1661 | public static final String ADVANCED_SETTINGS = "advanced_settings"; |
| 1662 | |
| 1663 | /** |
| 1664 | * ADVANCED_SETTINGS default value. |
| 1665 | * @hide |
| 1666 | */ |
| 1667 | public static final int ADVANCED_SETTINGS_DEFAULT = 0; |
| 1668 | |
| 1669 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1670 | * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1671 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1672 | @Deprecated |
| 1673 | public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1674 | |
| 1675 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1676 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1677 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1678 | @Deprecated |
| 1679 | public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1680 | |
| 1681 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1682 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1683 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1684 | @Deprecated |
| 1685 | public static final String RADIO_WIFI = Global.RADIO_WIFI; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1686 | |
Robert Greenwalt | 8588e47 | 2011-11-08 10:12:25 -0800 | [diff] [blame] | 1687 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1688 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead |
Robert Greenwalt | 8588e47 | 2011-11-08 10:12:25 -0800 | [diff] [blame] | 1689 | * {@hide} |
| 1690 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1691 | @Deprecated |
| 1692 | public static final String RADIO_WIMAX = Global.RADIO_WIMAX; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1693 | |
| 1694 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1695 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead |
Nick Pelly | 8d32a01 | 2011-08-09 07:03:49 -0700 | [diff] [blame] | 1696 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1697 | @Deprecated |
| 1698 | public static final String RADIO_CELL = Global.RADIO_CELL; |
Nick Pelly | 8d32a01 | 2011-08-09 07:03:49 -0700 | [diff] [blame] | 1699 | |
| 1700 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1701 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1702 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1703 | @Deprecated |
| 1704 | public static final String RADIO_NFC = Global.RADIO_NFC; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1705 | |
| 1706 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1707 | * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead |
| 1708 | */ |
| 1709 | @Deprecated |
| 1710 | public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS; |
| 1711 | |
| 1712 | /** |
| 1713 | * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead |
Mike Lockwood | bd5ddf0 | 2009-07-29 21:37:14 -0700 | [diff] [blame] | 1714 | * |
| 1715 | * {@hide} |
| 1716 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1717 | @Deprecated |
| 1718 | public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = |
| 1719 | Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS; |
Mike Lockwood | bd5ddf0 | 2009-07-29 21:37:14 -0700 | [diff] [blame] | 1720 | |
| 1721 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1722 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1723 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1724 | @Deprecated |
| 1725 | public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1726 | |
| 1727 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1728 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1729 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1730 | @Deprecated |
| 1731 | public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1732 | |
| 1733 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1734 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1735 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1736 | @Deprecated |
| 1737 | public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = |
| 1738 | Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1739 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1740 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1741 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1742 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1743 | @Deprecated |
| 1744 | public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1745 | |
Eric Laurent | bc0fab1f | 2012-09-19 11:24:41 -0700 | [diff] [blame] | 1746 | /** |
| 1747 | * @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead |
| 1748 | */ |
| 1749 | @Deprecated |
| 1750 | public static final String MODE_RINGER = Global.MODE_RINGER; |
| 1751 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1752 | /** |
| 1753 | * Whether to use static IP and other static network attributes. |
| 1754 | * <p> |
| 1755 | * Set to 1 for true and 0 for false. |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1756 | * |
| 1757 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1758 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1759 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1760 | public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip"; |
| 1761 | |
| 1762 | /** |
| 1763 | * The static IP address. |
| 1764 | * <p> |
| 1765 | * Example: "192.168.1.51" |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1766 | * |
| 1767 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1768 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1769 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1770 | public static final String WIFI_STATIC_IP = "wifi_static_ip"; |
| 1771 | |
| 1772 | /** |
| 1773 | * If using static IP, the gateway's IP address. |
| 1774 | * <p> |
| 1775 | * Example: "192.168.1.1" |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1776 | * |
| 1777 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1778 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1779 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1780 | public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway"; |
| 1781 | |
| 1782 | /** |
| 1783 | * If using static IP, the net mask. |
| 1784 | * <p> |
| 1785 | * Example: "255.255.255.0" |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1786 | * |
| 1787 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1788 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1789 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1790 | public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask"; |
| 1791 | |
| 1792 | /** |
| 1793 | * If using static IP, the primary DNS's IP address. |
| 1794 | * <p> |
| 1795 | * Example: "192.168.1.1" |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1796 | * |
| 1797 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1798 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1799 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1800 | public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1"; |
| 1801 | |
| 1802 | /** |
| 1803 | * If using static IP, the secondary DNS's IP address. |
| 1804 | * <p> |
| 1805 | * Example: "192.168.1.2" |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1806 | * |
| 1807 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1808 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 1809 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1810 | public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2"; |
| 1811 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1812 | |
| 1813 | /** |
| 1814 | * Determines whether remote devices may discover and/or connect to |
| 1815 | * this device. |
| 1816 | * <P>Type: INT</P> |
| 1817 | * 2 -- discoverable and connectable |
| 1818 | * 1 -- connectable but not discoverable |
| 1819 | * 0 -- neither connectable nor discoverable |
| 1820 | */ |
| 1821 | public static final String BLUETOOTH_DISCOVERABILITY = |
| 1822 | "bluetooth_discoverability"; |
| 1823 | |
| 1824 | /** |
| 1825 | * Bluetooth discoverability timeout. If this value is nonzero, then |
| 1826 | * Bluetooth becomes discoverable for a certain number of seconds, |
| 1827 | * after which is becomes simply connectable. The value is in seconds. |
| 1828 | */ |
| 1829 | public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT = |
| 1830 | "bluetooth_discoverability_timeout"; |
| 1831 | |
| 1832 | /** |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1833 | * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED} |
| 1834 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1835 | */ |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1836 | @Deprecated |
| 1837 | public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1838 | |
| 1839 | /** |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1840 | * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE} |
| 1841 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1842 | */ |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1843 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1844 | public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; |
| 1845 | |
| 1846 | /** |
Jaikumar Ganesh | 545e670 | 2010-06-04 10:23:03 -0700 | [diff] [blame] | 1847 | * @deprecated Use |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1848 | * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED} |
| 1849 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1850 | */ |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1851 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1852 | public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = |
| 1853 | "lock_pattern_tactile_feedback_enabled"; |
| 1854 | |
| 1855 | |
| 1856 | /** |
| 1857 | * A formatted string of the next alarm that is set, or the empty string |
| 1858 | * if there is no alarm set. |
Adrian Roos | c42a1e1 | 2014-07-07 23:35:53 +0200 | [diff] [blame] | 1859 | * |
| 1860 | * @deprecated Use {@link android.app.AlarmManager#getNextAlarmClock()}. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1861 | */ |
Adrian Roos | c42a1e1 | 2014-07-07 23:35:53 +0200 | [diff] [blame] | 1862 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1863 | public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted"; |
| 1864 | |
| 1865 | /** |
| 1866 | * Scaling factor for fonts, float. |
| 1867 | */ |
| 1868 | public static final String FONT_SCALE = "font_scale"; |
| 1869 | |
| 1870 | /** |
| 1871 | * Name of an application package to be debugged. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 1872 | * |
| 1873 | * @deprecated Use {@link Global#DEBUG_APP} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1874 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 1875 | @Deprecated |
| 1876 | public static final String DEBUG_APP = Global.DEBUG_APP; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1877 | |
| 1878 | /** |
| 1879 | * If 1, when launching DEBUG_APP it will wait for the debugger before |
| 1880 | * starting user code. If 0, it will run normally. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 1881 | * |
| 1882 | * @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1883 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 1884 | @Deprecated |
| 1885 | public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1886 | |
| 1887 | /** |
| 1888 | * Whether or not to dim the screen. 0=no 1=yes |
Jeff Brown | 9630704 | 2012-07-27 15:51:34 -0700 | [diff] [blame] | 1889 | * @deprecated This setting is no longer used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1890 | */ |
Jeff Brown | 9630704 | 2012-07-27 15:51:34 -0700 | [diff] [blame] | 1891 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1892 | public static final String DIM_SCREEN = "dim_screen"; |
| 1893 | |
| 1894 | /** |
| 1895 | * The timeout before the screen turns off. |
| 1896 | */ |
| 1897 | public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout"; |
| 1898 | |
| 1899 | /** |
| 1900 | * The screen backlight brightness between 0 and 255. |
| 1901 | */ |
| 1902 | public static final String SCREEN_BRIGHTNESS = "screen_brightness"; |
| 1903 | |
| 1904 | /** |
Dan Murphy | 951764b | 2009-08-27 14:59:03 -0500 | [diff] [blame] | 1905 | * Control whether to enable automatic brightness mode. |
Dan Murphy | 951764b | 2009-08-27 14:59:03 -0500 | [diff] [blame] | 1906 | */ |
| 1907 | public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode"; |
| 1908 | |
| 1909 | /** |
Dianne Hackborn | d9ea468 | 2012-01-20 18:36:40 -0800 | [diff] [blame] | 1910 | * Adjustment to auto-brightness to make it generally more (>0.0 <1.0) |
| 1911 | * or less (<0.0 >-1.0) bright. |
Dianne Hackborn | 518a3d8 | 2012-05-09 16:30:49 -0700 | [diff] [blame] | 1912 | * @hide |
Dianne Hackborn | d9ea468 | 2012-01-20 18:36:40 -0800 | [diff] [blame] | 1913 | */ |
| 1914 | public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj"; |
| 1915 | |
| 1916 | /** |
Mike Lockwood | dc3494e | 2009-10-14 21:17:09 -0700 | [diff] [blame] | 1917 | * SCREEN_BRIGHTNESS_MODE value for manual mode. |
Mike Lockwood | dc3494e | 2009-10-14 21:17:09 -0700 | [diff] [blame] | 1918 | */ |
| 1919 | public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0; |
| 1920 | |
| 1921 | /** |
Scott Main | 52bfc24 | 2012-02-09 10:09:14 -0800 | [diff] [blame] | 1922 | * SCREEN_BRIGHTNESS_MODE value for automatic mode. |
Mike Lockwood | dc3494e | 2009-10-14 21:17:09 -0700 | [diff] [blame] | 1923 | */ |
| 1924 | public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; |
| 1925 | |
| 1926 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1927 | * Control whether the process CPU usage meter should be shown. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 1928 | * |
| 1929 | * @deprecated Use {@link Global#SHOW_PROCESSES} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1930 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 1931 | @Deprecated |
| 1932 | public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1933 | |
| 1934 | /** |
| 1935 | * If 1, the activity manager will aggressively finish activities and |
| 1936 | * processes as soon as they are no longer needed. If 0, the normal |
| 1937 | * extended lifetime is used. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 1938 | * |
| 1939 | * @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1940 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 1941 | @Deprecated |
| 1942 | public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1943 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1944 | /** |
| 1945 | * Determines which streams are affected by ringer mode changes. The |
| 1946 | * stream type's bit should be set to 1 if it should be muted when going |
| 1947 | * into an inaudible ringer mode. |
| 1948 | */ |
| 1949 | public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected"; |
| 1950 | |
| 1951 | /** |
| 1952 | * Determines which streams are affected by mute. The |
| 1953 | * stream type's bit should be set to 1 if it should be muted when a mute request |
| 1954 | * is received. |
| 1955 | */ |
| 1956 | public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected"; |
| 1957 | |
| 1958 | /** |
| 1959 | * Whether vibrate is on for different events. This is used internally, |
| 1960 | * changing this value will not change the vibrate. See AudioManager. |
| 1961 | */ |
| 1962 | public static final String VIBRATE_ON = "vibrate_on"; |
| 1963 | |
| 1964 | /** |
Jeff Brown | 7f6c231 | 2012-04-13 20:38:38 -0700 | [diff] [blame] | 1965 | * If 1, redirects the system vibrator to all currently attached input devices |
| 1966 | * that support vibration. If there are no such input devices, then the system |
| 1967 | * vibrator is used instead. |
| 1968 | * If 0, does not register the system vibrator. |
| 1969 | * |
| 1970 | * This setting is mainly intended to provide a compatibility mechanism for |
| 1971 | * applications that only know about the system vibrator and do not use the |
| 1972 | * input device vibrator API. |
| 1973 | * |
| 1974 | * @hide |
| 1975 | */ |
| 1976 | public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices"; |
| 1977 | |
| 1978 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1979 | * Ringer volume. This is used internally, changing this value will not |
| 1980 | * change the volume. See AudioManager. |
| 1981 | */ |
| 1982 | public static final String VOLUME_RING = "volume_ring"; |
| 1983 | |
| 1984 | /** |
| 1985 | * System/notifications volume. This is used internally, changing this |
| 1986 | * value will not change the volume. See AudioManager. |
| 1987 | */ |
| 1988 | public static final String VOLUME_SYSTEM = "volume_system"; |
| 1989 | |
| 1990 | /** |
| 1991 | * Voice call volume. This is used internally, changing this value will |
| 1992 | * not change the volume. See AudioManager. |
| 1993 | */ |
| 1994 | public static final String VOLUME_VOICE = "volume_voice"; |
| 1995 | |
| 1996 | /** |
| 1997 | * Music/media/gaming volume. This is used internally, changing this |
| 1998 | * value will not change the volume. See AudioManager. |
| 1999 | */ |
| 2000 | public static final String VOLUME_MUSIC = "volume_music"; |
| 2001 | |
| 2002 | /** |
| 2003 | * Alarm volume. This is used internally, changing this |
| 2004 | * value will not change the volume. See AudioManager. |
| 2005 | */ |
| 2006 | public static final String VOLUME_ALARM = "volume_alarm"; |
| 2007 | |
| 2008 | /** |
| 2009 | * Notification volume. This is used internally, changing this |
| 2010 | * value will not change the volume. See AudioManager. |
| 2011 | */ |
| 2012 | public static final String VOLUME_NOTIFICATION = "volume_notification"; |
| 2013 | |
| 2014 | /** |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 2015 | * Bluetooth Headset volume. This is used internally, changing this value will |
| 2016 | * not change the volume. See AudioManager. |
| 2017 | */ |
| 2018 | public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco"; |
| 2019 | |
| 2020 | /** |
Mike Lockwood | 8517e46 | 2011-10-25 14:47:19 -0400 | [diff] [blame] | 2021 | * Master volume (float in the range 0.0f to 1.0f). |
| 2022 | * @hide |
| 2023 | */ |
| 2024 | public static final String VOLUME_MASTER = "volume_master"; |
| 2025 | |
| 2026 | /** |
Justin Koh | 57978ed | 2012-04-03 17:37:58 -0700 | [diff] [blame] | 2027 | * Master volume mute (int 1 = mute, 0 = not muted). |
| 2028 | * |
| 2029 | * @hide |
| 2030 | */ |
| 2031 | public static final String VOLUME_MASTER_MUTE = "volume_master_mute"; |
| 2032 | |
| 2033 | /** |
| 2034 | * Whether the notifications should use the ring volume (value of 1) or |
| 2035 | * a separate notification volume (value of 0). In most cases, users |
| 2036 | * will have this enabled so the notification and ringer volumes will be |
| 2037 | * the same. However, power users can disable this and use the separate |
| 2038 | * notification volume control. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2039 | * <p> |
Justin Koh | 57978ed | 2012-04-03 17:37:58 -0700 | [diff] [blame] | 2040 | * Note: This is a one-off setting that will be removed in the future |
| 2041 | * when there is profile support. For this reason, it is kept hidden |
| 2042 | * from the public APIs. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2043 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2044 | * @hide |
Amith Yamasani | 42722bf | 2011-07-22 10:34:27 -0700 | [diff] [blame] | 2045 | * @deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2046 | */ |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 2047 | @Deprecated |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2048 | public static final String NOTIFICATIONS_USE_RING_VOLUME = |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2049 | "notifications_use_ring_volume"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2050 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2051 | /** |
Daniel Sandler | 6329bf7 | 2010-02-26 15:17:44 -0500 | [diff] [blame] | 2052 | * Whether silent mode should allow vibration feedback. This is used |
| 2053 | * internally in AudioService and the Sound settings activity to |
| 2054 | * coordinate decoupling of vibrate and silent modes. This setting |
| 2055 | * will likely be removed in a future release with support for |
| 2056 | * audio/vibe feedback profiles. |
| 2057 | * |
Eric Laurent | bffc3d1 | 2012-05-07 17:43:49 -0700 | [diff] [blame] | 2058 | * Not used anymore. On devices with vibrator, the user explicitly selects |
| 2059 | * silent or vibrate mode. |
| 2060 | * Kept for use by legacy database upgrade code in DatabaseHelper. |
Daniel Sandler | 6329bf7 | 2010-02-26 15:17:44 -0500 | [diff] [blame] | 2061 | * @hide |
| 2062 | */ |
| 2063 | public static final String VIBRATE_IN_SILENT = "vibrate_in_silent"; |
| 2064 | |
| 2065 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2066 | * The mapping of stream type (integer) to its setting. |
| 2067 | */ |
| 2068 | public static final String[] VOLUME_SETTINGS = { |
| 2069 | VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC, |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 2070 | VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2071 | }; |
| 2072 | |
| 2073 | /** |
| 2074 | * Appended to various volume related settings to record the previous |
| 2075 | * values before they the settings were affected by a silent/vibrate |
| 2076 | * ringer mode change. |
| 2077 | */ |
| 2078 | public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible"; |
| 2079 | |
| 2080 | /** |
| 2081 | * Persistent store for the system-wide default ringtone URI. |
| 2082 | * <p> |
| 2083 | * If you need to play the default ringtone at any given time, it is recommended |
| 2084 | * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve |
| 2085 | * to the set default ringtone at the time of playing. |
| 2086 | * |
| 2087 | * @see #DEFAULT_RINGTONE_URI |
| 2088 | */ |
| 2089 | public static final String RINGTONE = "ringtone"; |
| 2090 | |
| 2091 | /** |
| 2092 | * A {@link Uri} that will point to the current default ringtone at any |
| 2093 | * given time. |
| 2094 | * <p> |
| 2095 | * If the current default ringtone is in the DRM provider and the caller |
| 2096 | * does not have permission, the exception will be a |
| 2097 | * FileNotFoundException. |
| 2098 | */ |
| 2099 | public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE); |
| 2100 | |
| 2101 | /** |
| 2102 | * Persistent store for the system-wide default notification sound. |
| 2103 | * |
| 2104 | * @see #RINGTONE |
| 2105 | * @see #DEFAULT_NOTIFICATION_URI |
| 2106 | */ |
| 2107 | public static final String NOTIFICATION_SOUND = "notification_sound"; |
| 2108 | |
| 2109 | /** |
| 2110 | * A {@link Uri} that will point to the current default notification |
| 2111 | * sound at any given time. |
| 2112 | * |
| 2113 | * @see #DEFAULT_RINGTONE_URI |
| 2114 | */ |
| 2115 | public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND); |
| 2116 | |
| 2117 | /** |
Patrick Scott | 3156bb00 | 2009-04-13 09:57:38 -0700 | [diff] [blame] | 2118 | * Persistent store for the system-wide default alarm alert. |
| 2119 | * |
| 2120 | * @see #RINGTONE |
| 2121 | * @see #DEFAULT_ALARM_ALERT_URI |
| 2122 | */ |
| 2123 | public static final String ALARM_ALERT = "alarm_alert"; |
| 2124 | |
| 2125 | /** |
| 2126 | * A {@link Uri} that will point to the current default alarm alert at |
| 2127 | * any given time. |
| 2128 | * |
| 2129 | * @see #DEFAULT_ALARM_ALERT_URI |
| 2130 | */ |
| 2131 | public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT); |
| 2132 | |
| 2133 | /** |
Jean-Michel Trivi | d589fea | 2011-04-15 11:28:10 -0700 | [diff] [blame] | 2134 | * Persistent store for the system default media button event receiver. |
| 2135 | * |
| 2136 | * @hide |
| 2137 | */ |
| 2138 | public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver"; |
| 2139 | |
| 2140 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2141 | * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off |
| 2142 | */ |
| 2143 | public static final String TEXT_AUTO_REPLACE = "auto_replace"; |
| 2144 | |
| 2145 | /** |
| 2146 | * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off |
| 2147 | */ |
| 2148 | public static final String TEXT_AUTO_CAPS = "auto_caps"; |
| 2149 | |
| 2150 | /** |
| 2151 | * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This |
| 2152 | * feature converts two spaces to a "." and space. |
| 2153 | */ |
| 2154 | public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2155 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2156 | /** |
| 2157 | * Setting to showing password characters in text editors. 1 = On, 0 = Off |
| 2158 | */ |
| 2159 | public static final String TEXT_SHOW_PASSWORD = "show_password"; |
| 2160 | |
| 2161 | public static final String SHOW_GTALK_SERVICE_STATUS = |
| 2162 | "SHOW_GTALK_SERVICE_STATUS"; |
| 2163 | |
| 2164 | /** |
| 2165 | * Name of activity to use for wallpaper on the home screen. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2166 | * |
| 2167 | * @deprecated Use {@link WallpaperManager} instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2168 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2169 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2170 | public static final String WALLPAPER_ACTIVITY = "wallpaper_activity"; |
| 2171 | |
| 2172 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2173 | * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME} |
| 2174 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2175 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2176 | @Deprecated |
| 2177 | public static final String AUTO_TIME = Global.AUTO_TIME; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2178 | |
| 2179 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2180 | * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE} |
| 2181 | * instead |
Amith Yamasani | ad450be | 2010-09-16 16:47:00 -0700 | [diff] [blame] | 2182 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2183 | @Deprecated |
| 2184 | public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE; |
Amith Yamasani | ad450be | 2010-09-16 16:47:00 -0700 | [diff] [blame] | 2185 | |
| 2186 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2187 | * Display times as 12 or 24 hours |
| 2188 | * 12 |
| 2189 | * 24 |
| 2190 | */ |
| 2191 | public static final String TIME_12_24 = "time_12_24"; |
| 2192 | |
| 2193 | /** |
| 2194 | * Date format string |
| 2195 | * mm/dd/yyyy |
| 2196 | * dd/mm/yyyy |
| 2197 | * yyyy/mm/dd |
| 2198 | */ |
| 2199 | public static final String DATE_FORMAT = "date_format"; |
| 2200 | |
| 2201 | /** |
| 2202 | * Whether the setup wizard has been run before (on first boot), or if |
| 2203 | * it still needs to be run. |
| 2204 | * |
| 2205 | * nonzero = it has been run in the past |
| 2206 | * 0 = it has not been run in the past |
| 2207 | */ |
| 2208 | public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run"; |
| 2209 | |
| 2210 | /** |
| 2211 | * Scaling factor for normal window animations. Setting to 0 will disable window |
| 2212 | * animations. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2213 | * |
| 2214 | * @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2215 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2216 | @Deprecated |
| 2217 | public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2218 | |
| 2219 | /** |
| 2220 | * Scaling factor for activity transition animations. Setting to 0 will disable window |
| 2221 | * animations. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2222 | * |
| 2223 | * @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2224 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2225 | @Deprecated |
| 2226 | public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2227 | |
| 2228 | /** |
Chet Haase | c38fa1f | 2012-02-01 16:37:46 -0800 | [diff] [blame] | 2229 | * Scaling factor for Animator-based animations. This affects both the start delay and |
| 2230 | * duration of all such animations. Setting to 0 will cause animations to end immediately. |
| 2231 | * The default value is 1. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2232 | * |
| 2233 | * @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead |
Chet Haase | c38fa1f | 2012-02-01 16:37:46 -0800 | [diff] [blame] | 2234 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2235 | @Deprecated |
| 2236 | public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2237 | |
| 2238 | /** |
| 2239 | * Control whether the accelerometer will be used to change screen |
| 2240 | * orientation. If 0, it will not be used unless explicitly requested |
| 2241 | * by the application; if 1, it will be used by default unless explicitly |
| 2242 | * disabled by the application. |
| 2243 | */ |
| 2244 | public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; |
| 2245 | |
| 2246 | /** |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 2247 | * Default screen rotation when no other policy applies. |
| 2248 | * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a |
| 2249 | * preference, this rotation value will be used. Must be one of the |
Brian Muramatsu | e1d4698 | 2010-12-06 17:34:20 -0800 | [diff] [blame] | 2250 | * {@link android.view.Surface#ROTATION_0 Surface rotation constants}. |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 2251 | * |
| 2252 | * @see Display#getRotation |
| 2253 | */ |
| 2254 | public static final String USER_ROTATION = "user_rotation"; |
| 2255 | |
| 2256 | /** |
Jeff Brown | 207673cd | 2012-06-05 17:47:11 -0700 | [diff] [blame] | 2257 | * Control whether the rotation lock toggle in the System UI should be hidden. |
| 2258 | * Typically this is done for accessibility purposes to make it harder for |
| 2259 | * the user to accidentally toggle the rotation lock while the display rotation |
| 2260 | * has been locked for accessibility. |
| 2261 | * |
| 2262 | * If 0, then rotation lock toggle is not hidden for accessibility (although it may be |
| 2263 | * unavailable for other reasons). If 1, then the rotation lock toggle is hidden. |
| 2264 | * |
| 2265 | * @hide |
| 2266 | */ |
| 2267 | public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY = |
| 2268 | "hide_rotation_lock_toggle_for_accessibility"; |
| 2269 | |
| 2270 | /** |
Daisuke Miyakawa | 3c60eeb | 2012-05-08 12:08:25 -0700 | [diff] [blame] | 2271 | * Whether the phone vibrates when it is ringing due to an incoming call. This will |
| 2272 | * be used by Phone and Setting apps; it shouldn't affect other apps. |
| 2273 | * The value is boolean (1 or 0). |
| 2274 | * |
| 2275 | * Note: this is not same as "vibrate on ring", which had been available until ICS. |
| 2276 | * It was about AudioManager's setting and thus affected all the applications which |
| 2277 | * relied on the setting, while this is purely about the vibration setting for incoming |
| 2278 | * calls. |
| 2279 | * |
| 2280 | * @hide |
| 2281 | */ |
| 2282 | public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing"; |
| 2283 | |
| 2284 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2285 | * Whether the audible DTMF tones are played by the dialer when dialing. The value is |
| 2286 | * boolean (1 or 0). |
| 2287 | */ |
| 2288 | public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone"; |
| 2289 | |
| 2290 | /** |
David Krause | d0f6715 | 2009-06-13 18:01:13 -0500 | [diff] [blame] | 2291 | * CDMA only settings |
| 2292 | * DTMF tone type played by the dialer when dialing. |
| 2293 | * 0 = Normal |
| 2294 | * 1 = Long |
| 2295 | * @hide |
| 2296 | */ |
| 2297 | public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; |
| 2298 | |
| 2299 | /** |
David Krause | d0f6715 | 2009-06-13 18:01:13 -0500 | [diff] [blame] | 2300 | * Whether the hearing aid is enabled. The value is |
| 2301 | * boolean (1 or 0). |
| 2302 | * @hide |
| 2303 | */ |
| 2304 | public static final String HEARING_AID = "hearing_aid"; |
| 2305 | |
| 2306 | /** |
| 2307 | * CDMA only settings |
| 2308 | * TTY Mode |
| 2309 | * 0 = OFF |
| 2310 | * 1 = FULL |
| 2311 | * 2 = VCO |
| 2312 | * 3 = HCO |
| 2313 | * @hide |
| 2314 | */ |
| 2315 | public static final String TTY_MODE = "tty_mode"; |
| 2316 | |
| 2317 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2318 | * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is |
| 2319 | * boolean (1 or 0). |
| 2320 | */ |
| 2321 | public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2322 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2323 | /** |
| 2324 | * Whether the haptic feedback (long presses, ...) are enabled. The value is |
| 2325 | * boolean (1 or 0). |
| 2326 | */ |
| 2327 | public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled"; |
Sanjay Jeyakumar | 21bf241 | 2009-07-09 13:31:48 -0700 | [diff] [blame] | 2328 | |
Mike LeBeau | 48603e7 | 2009-06-05 00:27:00 +0100 | [diff] [blame] | 2329 | /** |
Bjorn Bringert | 24abb66 | 2010-09-21 12:21:18 +0100 | [diff] [blame] | 2330 | * @deprecated Each application that shows web suggestions should have its own |
| 2331 | * setting for this. |
Mike LeBeau | 48603e7 | 2009-06-05 00:27:00 +0100 | [diff] [blame] | 2332 | */ |
Bjorn Bringert | 24abb66 | 2010-09-21 12:21:18 +0100 | [diff] [blame] | 2333 | @Deprecated |
Mike LeBeau | 48603e7 | 2009-06-05 00:27:00 +0100 | [diff] [blame] | 2334 | public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2335 | |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 2336 | /** |
Amith Yamasani | ae3ed70 | 2009-12-01 19:02:05 -0800 | [diff] [blame] | 2337 | * Whether the notification LED should repeatedly flash when a notification is |
| 2338 | * pending. The value is boolean (1 or 0). |
| 2339 | * @hide |
| 2340 | */ |
| 2341 | public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; |
| 2342 | |
| 2343 | /** |
Dianne Hackborn | 90d2db3 | 2010-02-11 22:19:06 -0800 | [diff] [blame] | 2344 | * Show pointer location on screen? |
| 2345 | * 0 = no |
| 2346 | * 1 = yes |
| 2347 | * @hide |
| 2348 | */ |
| 2349 | public static final String POINTER_LOCATION = "pointer_location"; |
| 2350 | |
| 2351 | /** |
Jeff Brown | daf4a12 | 2011-08-26 17:14:14 -0700 | [diff] [blame] | 2352 | * Show touch positions on screen? |
| 2353 | * 0 = no |
| 2354 | * 1 = yes |
| 2355 | * @hide |
| 2356 | */ |
| 2357 | public static final String SHOW_TOUCHES = "show_touches"; |
| 2358 | |
| 2359 | /** |
Jeff Brown | 4519f07 | 2011-01-23 13:16:01 -0800 | [diff] [blame] | 2360 | * Log raw orientation data from {@link WindowOrientationListener} for use with the |
| 2361 | * orientationplot.py tool. |
| 2362 | * 0 = no |
| 2363 | * 1 = yes |
| 2364 | * @hide |
| 2365 | */ |
| 2366 | public static final String WINDOW_ORIENTATION_LISTENER_LOG = |
| 2367 | "window_orientation_listener_log"; |
| 2368 | |
| 2369 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2370 | * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED} |
| 2371 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2372 | * @hide |
| 2373 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2374 | @Deprecated |
| 2375 | public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2376 | |
| 2377 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2378 | * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED} |
| 2379 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2380 | * @hide |
| 2381 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2382 | @Deprecated |
| 2383 | public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2384 | |
| 2385 | /** |
| 2386 | * Whether to play sounds when the keyguard is shown and dismissed. |
| 2387 | * @hide |
| 2388 | */ |
| 2389 | public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled"; |
| 2390 | |
| 2391 | /** |
Mike Lockwood | 7bef739 | 2011-10-20 16:51:53 -0400 | [diff] [blame] | 2392 | * Whether the lockscreen should be completely disabled. |
| 2393 | * @hide |
| 2394 | */ |
| 2395 | public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled"; |
| 2396 | |
| 2397 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2398 | * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND} |
| 2399 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2400 | * @hide |
| 2401 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2402 | @Deprecated |
| 2403 | public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2404 | |
| 2405 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2406 | * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND} |
| 2407 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2408 | * @hide |
| 2409 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2410 | @Deprecated |
| 2411 | public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2412 | |
| 2413 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2414 | * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND} |
| 2415 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2416 | * @hide |
| 2417 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2418 | @Deprecated |
| 2419 | public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2420 | |
| 2421 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2422 | * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND} |
| 2423 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2424 | * @hide |
| 2425 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2426 | @Deprecated |
| 2427 | public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2428 | |
| 2429 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2430 | * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND} |
| 2431 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2432 | * @hide |
| 2433 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2434 | @Deprecated |
| 2435 | public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2436 | |
| 2437 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2438 | * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND} |
| 2439 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2440 | * @hide |
| 2441 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2442 | @Deprecated |
| 2443 | public static final String LOCK_SOUND = Global.LOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2444 | |
| 2445 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2446 | * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND} |
| 2447 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2448 | * @hide |
| 2449 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2450 | @Deprecated |
| 2451 | public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 2452 | |
| 2453 | /** |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 2454 | * Receive incoming SIP calls? |
| 2455 | * 0 = no |
| 2456 | * 1 = yes |
| 2457 | * @hide |
| 2458 | */ |
| 2459 | public static final String SIP_RECEIVE_CALLS = "sip_receive_calls"; |
| 2460 | |
| 2461 | /** |
| 2462 | * Call Preference String. |
| 2463 | * "SIP_ALWAYS" : Always use SIP with network access |
| 2464 | * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address |
| 2465 | * "SIP_ASK_ME_EACH_TIME" : Always ask me each time |
| 2466 | * @hide |
| 2467 | */ |
| 2468 | public static final String SIP_CALL_OPTIONS = "sip_call_options"; |
| 2469 | |
| 2470 | /** |
| 2471 | * One of the sip call options: Always use SIP with network access. |
| 2472 | * @hide |
| 2473 | */ |
| 2474 | public static final String SIP_ALWAYS = "SIP_ALWAYS"; |
| 2475 | |
| 2476 | /** |
| 2477 | * One of the sip call options: Only if destination is a SIP address. |
| 2478 | * @hide |
| 2479 | */ |
| 2480 | public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY"; |
| 2481 | |
| 2482 | /** |
| 2483 | * One of the sip call options: Always ask me each time. |
| 2484 | * @hide |
| 2485 | */ |
| 2486 | public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME"; |
| 2487 | |
| 2488 | /** |
Jeff Brown | 1a84fd1 | 2011-06-02 01:26:32 -0700 | [diff] [blame] | 2489 | * Pointer speed setting. |
| 2490 | * This is an integer value in a range between -7 and +7, so there are 15 possible values. |
| 2491 | * -7 = slowest |
| 2492 | * 0 = default speed |
| 2493 | * +7 = fastest |
| 2494 | * @hide |
| 2495 | */ |
| 2496 | public static final String POINTER_SPEED = "pointer_speed"; |
| 2497 | |
| 2498 | /** |
Jason Monk | 56e09b4 | 2014-07-18 10:29:14 -0400 | [diff] [blame] | 2499 | * Whether lock-to-app will be triggered by long-press on recents. |
| 2500 | * @hide |
| 2501 | */ |
| 2502 | public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled"; |
| 2503 | |
| 2504 | /** |
Jason Monk | 62515be | 2014-05-21 16:06:19 -0400 | [diff] [blame] | 2505 | * Whether lock-to-app will lock the keyguard when exiting. |
| 2506 | * @hide |
| 2507 | */ |
| 2508 | public static final String LOCK_TO_APP_EXIT_LOCKED = "lock_to_app_exit_locked"; |
| 2509 | |
| 2510 | /** |
Daniel Sandler | 2fdb68b | 2013-10-03 00:12:11 -0400 | [diff] [blame] | 2511 | * I am the lolrus. |
| 2512 | * <p> |
| 2513 | * Nonzero values indicate that the user has a bukkit. |
| 2514 | * Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>. |
| 2515 | * @hide |
| 2516 | */ |
| 2517 | public static final String EGG_MODE = "egg_mode"; |
| 2518 | |
| 2519 | /** |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 2520 | * Settings to backup. This is here so that it's in the same place as the settings |
| 2521 | * keys and easy to update. |
Svetoslav Ganov | a571a58 | 2011-09-20 18:32:20 -0700 | [diff] [blame] | 2522 | * |
| 2523 | * NOTE: Settings are backed up and restored in the order they appear |
| 2524 | * in this array. If you have one setting depending on another, |
| 2525 | * make sure that they are ordered appropriately. |
| 2526 | * |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 2527 | * @hide |
| 2528 | */ |
| 2529 | public static final String[] SETTINGS_TO_BACKUP = { |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 2530 | STAY_ON_WHILE_PLUGGED_IN, // moved to global |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 2531 | WIFI_USE_STATIC_IP, |
| 2532 | WIFI_STATIC_IP, |
| 2533 | WIFI_STATIC_GATEWAY, |
| 2534 | WIFI_STATIC_NETMASK, |
| 2535 | WIFI_STATIC_DNS1, |
| 2536 | WIFI_STATIC_DNS2, |
| 2537 | BLUETOOTH_DISCOVERABILITY, |
| 2538 | BLUETOOTH_DISCOVERABILITY_TIMEOUT, |
| 2539 | DIM_SCREEN, |
| 2540 | SCREEN_OFF_TIMEOUT, |
| 2541 | SCREEN_BRIGHTNESS, |
Christopher Tate | 362aca6 | 2009-09-25 15:58:03 -0700 | [diff] [blame] | 2542 | SCREEN_BRIGHTNESS_MODE, |
Dianne Hackborn | d9ea468 | 2012-01-20 18:36:40 -0800 | [diff] [blame] | 2543 | SCREEN_AUTO_BRIGHTNESS_ADJ, |
Jeff Brown | 7f6c231 | 2012-04-13 20:38:38 -0700 | [diff] [blame] | 2544 | VIBRATE_INPUT_DEVICES, |
Amith Yamasani | 8823c0a8 | 2009-07-07 14:30:17 -0700 | [diff] [blame] | 2545 | MODE_RINGER_STREAMS_AFFECTED, |
Amith Yamasani | 8823c0a8 | 2009-07-07 14:30:17 -0700 | [diff] [blame] | 2546 | VOLUME_VOICE, |
| 2547 | VOLUME_SYSTEM, |
| 2548 | VOLUME_RING, |
| 2549 | VOLUME_MUSIC, |
| 2550 | VOLUME_ALARM, |
| 2551 | VOLUME_NOTIFICATION, |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 2552 | VOLUME_BLUETOOTH_SCO, |
Amith Yamasani | 8823c0a8 | 2009-07-07 14:30:17 -0700 | [diff] [blame] | 2553 | VOLUME_VOICE + APPEND_FOR_LAST_AUDIBLE, |
| 2554 | VOLUME_SYSTEM + APPEND_FOR_LAST_AUDIBLE, |
| 2555 | VOLUME_RING + APPEND_FOR_LAST_AUDIBLE, |
| 2556 | VOLUME_MUSIC + APPEND_FOR_LAST_AUDIBLE, |
| 2557 | VOLUME_ALARM + APPEND_FOR_LAST_AUDIBLE, |
| 2558 | VOLUME_NOTIFICATION + APPEND_FOR_LAST_AUDIBLE, |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 2559 | VOLUME_BLUETOOTH_SCO + APPEND_FOR_LAST_AUDIBLE, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 2560 | TEXT_AUTO_REPLACE, |
| 2561 | TEXT_AUTO_CAPS, |
| 2562 | TEXT_AUTO_PUNCTUATE, |
| 2563 | TEXT_SHOW_PASSWORD, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 2564 | AUTO_TIME, // moved to global |
| 2565 | AUTO_TIME_ZONE, // moved to global |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 2566 | TIME_12_24, |
| 2567 | DATE_FORMAT, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 2568 | DTMF_TONE_WHEN_DIALING, |
| 2569 | DTMF_TONE_TYPE_WHEN_DIALING, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 2570 | HEARING_AID, |
| 2571 | TTY_MODE, |
| 2572 | SOUND_EFFECTS_ENABLED, |
| 2573 | HAPTIC_FEEDBACK_ENABLED, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 2574 | POWER_SOUNDS_ENABLED, // moved to global |
| 2575 | DOCK_SOUNDS_ENABLED, // moved to global |
Christopher Tate | 14c2d79 | 2010-02-25 16:49:44 -0800 | [diff] [blame] | 2576 | LOCKSCREEN_SOUNDS_ENABLED, |
Amith Yamasani | ae3ed70 | 2009-12-01 19:02:05 -0800 | [diff] [blame] | 2577 | SHOW_WEB_SUGGESTIONS, |
Mike Lockwood | eabe8bf | 2010-08-31 14:35:23 -0400 | [diff] [blame] | 2578 | NOTIFICATION_LIGHT_PULSE, |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 2579 | SIP_CALL_OPTIONS, |
Nick Pelly | 038cabe | 2010-09-23 16:12:11 -0700 | [diff] [blame] | 2580 | SIP_RECEIVE_CALLS, |
Jeff Brown | 1a84fd1 | 2011-06-02 01:26:32 -0700 | [diff] [blame] | 2581 | POINTER_SPEED, |
Amith Yamasani | 622bf222 | 2013-09-06 13:54:28 -0700 | [diff] [blame] | 2582 | VIBRATE_WHEN_RINGING, |
| 2583 | RINGTONE, |
| 2584 | NOTIFICATION_SOUND |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 2585 | }; |
| 2586 | |
Sailesh Nepal | 1bd7876 | 2014-02-11 22:32:21 -0800 | [diff] [blame] | 2587 | /** |
| 2588 | * When to use Wi-Fi calling |
| 2589 | * |
| 2590 | * @see android.telephony.TelephonyManager.WifiCallingChoices |
| 2591 | * @hide |
| 2592 | */ |
| 2593 | public static final String WHEN_TO_MAKE_WIFI_CALLS = "when_to_make_wifi_calls"; |
| 2594 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2595 | // Settings moved to Settings.Secure |
| 2596 | |
| 2597 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2598 | * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2599 | * instead |
| 2600 | */ |
| 2601 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2602 | public static final String ADB_ENABLED = Global.ADB_ENABLED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2603 | |
| 2604 | /** |
| 2605 | * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead |
| 2606 | */ |
| 2607 | @Deprecated |
| 2608 | public static final String ANDROID_ID = Secure.ANDROID_ID; |
| 2609 | |
| 2610 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2611 | * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2612 | */ |
| 2613 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2614 | public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2615 | |
| 2616 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2617 | * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2618 | */ |
| 2619 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2620 | public static final String DATA_ROAMING = Global.DATA_ROAMING; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2621 | |
| 2622 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2623 | * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2624 | */ |
| 2625 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2626 | public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2627 | |
| 2628 | /** |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2629 | * @deprecated Use {@link android.provider.Settings.Global#HTTP_PROXY} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2630 | */ |
| 2631 | @Deprecated |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2632 | public static final String HTTP_PROXY = Global.HTTP_PROXY; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2633 | |
| 2634 | /** |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 2635 | * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2636 | */ |
| 2637 | @Deprecated |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 2638 | public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2639 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2640 | /** |
| 2641 | * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED} |
| 2642 | * instead |
| 2643 | */ |
| 2644 | @Deprecated |
| 2645 | public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED; |
| 2646 | |
| 2647 | /** |
| 2648 | * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead |
| 2649 | */ |
| 2650 | @Deprecated |
| 2651 | public static final String LOGGING_ID = Secure.LOGGING_ID; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2652 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2653 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2654 | * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2655 | */ |
| 2656 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2657 | public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2658 | |
| 2659 | /** |
| 2660 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED} |
| 2661 | * instead |
| 2662 | */ |
| 2663 | @Deprecated |
| 2664 | public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED; |
| 2665 | |
| 2666 | /** |
| 2667 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE} |
| 2668 | * instead |
| 2669 | */ |
| 2670 | @Deprecated |
| 2671 | public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE; |
| 2672 | |
| 2673 | /** |
| 2674 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL} |
| 2675 | * instead |
| 2676 | */ |
| 2677 | @Deprecated |
| 2678 | public static final String PARENTAL_CONTROL_REDIRECT_URL = |
| 2679 | Secure.PARENTAL_CONTROL_REDIRECT_URL; |
| 2680 | |
| 2681 | /** |
| 2682 | * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead |
| 2683 | */ |
| 2684 | @Deprecated |
| 2685 | public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME; |
| 2686 | |
| 2687 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2688 | * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2689 | */ |
| 2690 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2691 | public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2692 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2693 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2694 | * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2695 | */ |
| 2696 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2697 | public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2698 | |
Dianne Hackborn | 4a51c20 | 2009-08-21 15:14:02 -0700 | [diff] [blame] | 2699 | /** |
| 2700 | * @deprecated Use |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2701 | * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead |
Dianne Hackborn | 4a51c20 | 2009-08-21 15:14:02 -0700 | [diff] [blame] | 2702 | */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2703 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2704 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2705 | |
Dianne Hackborn | 4a51c20 | 2009-08-21 15:14:02 -0700 | [diff] [blame] | 2706 | /** |
| 2707 | * @deprecated Use |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2708 | * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead |
Dianne Hackborn | 4a51c20 | 2009-08-21 15:14:02 -0700 | [diff] [blame] | 2709 | */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2710 | @Deprecated |
| 2711 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2712 | Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2713 | |
| 2714 | /** |
| 2715 | * @deprecated Use |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2716 | * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2717 | */ |
| 2718 | @Deprecated |
| 2719 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2720 | Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2721 | |
| 2722 | /** |
| 2723 | * @deprecated Use |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2724 | * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2725 | */ |
| 2726 | @Deprecated |
| 2727 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2728 | Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2729 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2730 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2731 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2732 | * instead |
| 2733 | */ |
| 2734 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2735 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = Global.WIFI_NUM_OPEN_NETWORKS_KEPT; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2736 | |
| 2737 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2738 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2739 | */ |
| 2740 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2741 | public static final String WIFI_ON = Global.WIFI_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2742 | |
| 2743 | /** |
| 2744 | * @deprecated Use |
| 2745 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE} |
| 2746 | * instead |
| 2747 | */ |
| 2748 | @Deprecated |
| 2749 | public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = |
| 2750 | Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE; |
| 2751 | |
| 2752 | /** |
| 2753 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead |
| 2754 | */ |
| 2755 | @Deprecated |
| 2756 | public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT; |
| 2757 | |
| 2758 | /** |
| 2759 | * @deprecated Use |
| 2760 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead |
| 2761 | */ |
| 2762 | @Deprecated |
| 2763 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = |
| 2764 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2765 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2766 | /** |
| 2767 | * @deprecated Use |
| 2768 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead |
| 2769 | */ |
| 2770 | @Deprecated |
| 2771 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = |
| 2772 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED; |
| 2773 | |
| 2774 | /** |
| 2775 | * @deprecated Use |
| 2776 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS} |
| 2777 | * instead |
| 2778 | */ |
| 2779 | @Deprecated |
| 2780 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = |
| 2781 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS; |
| 2782 | |
| 2783 | /** |
| 2784 | * @deprecated Use |
| 2785 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead |
| 2786 | */ |
| 2787 | @Deprecated |
| 2788 | public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = |
| 2789 | Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT; |
| 2790 | |
| 2791 | /** |
| 2792 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS} |
| 2793 | * instead |
| 2794 | */ |
| 2795 | @Deprecated |
| 2796 | public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS; |
| 2797 | |
| 2798 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2799 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2800 | */ |
| 2801 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2802 | public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2803 | |
| 2804 | /** |
| 2805 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead |
| 2806 | */ |
| 2807 | @Deprecated |
| 2808 | public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT; |
| 2809 | |
| 2810 | /** |
| 2811 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS} |
| 2812 | * instead |
| 2813 | */ |
| 2814 | @Deprecated |
| 2815 | public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS; |
| 2816 | |
| 2817 | /** |
| 2818 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS} |
| 2819 | * instead |
| 2820 | */ |
| 2821 | @Deprecated |
| 2822 | public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = |
| 2823 | Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS; |
| 2824 | } |
| 2825 | |
| 2826 | /** |
| 2827 | * Secure system settings, containing system preferences that applications |
| 2828 | * can read but are not allowed to write. These are for preferences that |
| 2829 | * the user must explicitly modify through the system UI or specialized |
| 2830 | * APIs for those values, not modified directly by applications. |
| 2831 | */ |
| 2832 | public static final class Secure extends NameValueTable { |
| 2833 | public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version"; |
| 2834 | |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 2835 | /** |
| 2836 | * The content:// style URL for this table |
| 2837 | */ |
| 2838 | public static final Uri CONTENT_URI = |
| 2839 | Uri.parse("content://" + AUTHORITY + "/secure"); |
| 2840 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 2841 | // Populated lazily, guarded by class object: |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 2842 | private static final NameValueCache sNameValueCache = new NameValueCache( |
| 2843 | SYS_PROP_SETTING_VERSION, |
| 2844 | CONTENT_URI, |
| 2845 | CALL_METHOD_GET_SECURE, |
| 2846 | CALL_METHOD_PUT_SECURE); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2847 | |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 2848 | private static ILockSettings sLockSettings = null; |
| 2849 | |
Amith Yamasani | 7ab8c4a | 2012-04-06 09:27:12 -0700 | [diff] [blame] | 2850 | private static boolean sIsSystemProcess; |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 2851 | private static final HashSet<String> MOVED_TO_LOCK_SETTINGS; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2852 | private static final HashSet<String> MOVED_TO_GLOBAL; |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 2853 | static { |
| 2854 | MOVED_TO_LOCK_SETTINGS = new HashSet<String>(3); |
| 2855 | MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED); |
| 2856 | MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE); |
| 2857 | MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2858 | |
| 2859 | MOVED_TO_GLOBAL = new HashSet<String>(); |
| 2860 | MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED); |
| 2861 | MOVED_TO_GLOBAL.add(Settings.Global.ASSISTED_GPS_ENABLED); |
| 2862 | MOVED_TO_GLOBAL.add(Settings.Global.BLUETOOTH_ON); |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 2863 | MOVED_TO_GLOBAL.add(Settings.Global.BUGREPORT_IN_POWER_MENU); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2864 | MOVED_TO_GLOBAL.add(Settings.Global.CDMA_CELL_BROADCAST_SMS); |
| 2865 | MOVED_TO_GLOBAL.add(Settings.Global.CDMA_ROAMING_MODE); |
| 2866 | MOVED_TO_GLOBAL.add(Settings.Global.CDMA_SUBSCRIPTION_MODE); |
| 2867 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE); |
| 2868 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI); |
| 2869 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_ROAMING); |
| 2870 | MOVED_TO_GLOBAL.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED); |
| 2871 | MOVED_TO_GLOBAL.add(Settings.Global.DEVICE_PROVISIONED); |
| 2872 | MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_DENSITY_FORCED); |
| 2873 | MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_SIZE_FORCED); |
| 2874 | MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE); |
| 2875 | MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2876 | MOVED_TO_GLOBAL.add(Settings.Global.MOBILE_DATA); |
| 2877 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION); |
| 2878 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_DELETE_AGE); |
| 2879 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES); |
| 2880 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE); |
| 2881 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_ENABLED); |
| 2882 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES); |
| 2883 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_POLL_INTERVAL); |
| 2884 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_REPORT_XT_OVER_DEV); |
| 2885 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_SAMPLE_ENABLED); |
| 2886 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE); |
| 2887 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION); |
| 2888 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_DELETE_AGE); |
| 2889 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES); |
| 2890 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_ROTATE_AGE); |
| 2891 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION); |
| 2892 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE); |
| 2893 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES); |
| 2894 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE); |
| 2895 | MOVED_TO_GLOBAL.add(Settings.Global.NETWORK_PREFERENCE); |
| 2896 | MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_DIFF); |
| 2897 | MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING); |
| 2898 | MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER); |
| 2899 | MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT); |
| 2900 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT); |
| 2901 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS); |
| 2902 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT); |
| 2903 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS); |
| 2904 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT); |
| 2905 | MOVED_TO_GLOBAL.add(Settings.Global.SAMPLING_PROFILER_MS); |
| 2906 | MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL); |
| 2907 | MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST); |
| 2908 | MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL); |
| 2909 | MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_APN); |
| 2910 | MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_REQUIRED); |
| 2911 | MOVED_TO_GLOBAL.add(Settings.Global.TETHER_SUPPORTED); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2912 | MOVED_TO_GLOBAL.add(Settings.Global.USB_MASS_STORAGE_ENABLED); |
| 2913 | MOVED_TO_GLOBAL.add(Settings.Global.USE_GOOGLE_MAIL); |
Robert Greenwalt | 3ea0c99 | 2013-10-03 21:13:49 +0000 | [diff] [blame] | 2914 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_COUNTRY_CODE); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2915 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS); |
| 2916 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FREQUENCY_BAND); |
| 2917 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_IDLE_MS); |
| 2918 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT); |
| 2919 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS); |
| 2920 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); |
| 2921 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); |
| 2922 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT); |
| 2923 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON); |
| 2924 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME); |
| 2925 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SAVED_STATE); |
| 2926 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS); |
| 2927 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED); |
vandwalle | 7c3606c | 2014-03-31 19:12:07 -0700 | [diff] [blame] | 2928 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ENHANCED_AUTO_JOIN); |
| 2929 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORK_SHOW_RSSI); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2930 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_ON); |
| 2931 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2932 | MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON); |
Christopher Tate | c868b64 | 2012-09-12 17:41:04 -0700 | [diff] [blame] | 2933 | MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_ENABLE); |
| 2934 | MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT); |
| 2935 | MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE); |
| 2936 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS); |
| 2937 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS); |
| 2938 | MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2939 | MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL); |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2940 | MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD); |
| 2941 | MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_THRESHOLD); |
| 2942 | MOVED_TO_GLOBAL.add(Settings.Global.SEND_ACTION_APP_ERROR); |
| 2943 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_AGE_SECONDS); |
| 2944 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_MAX_FILES); |
| 2945 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_KB); |
| 2946 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_PERCENT); |
| 2947 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_RESERVE_PERCENT); |
| 2948 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_TAG_PREFIX); |
| 2949 | MOVED_TO_GLOBAL.add(Settings.Global.ERROR_LOGCAT_PREFIX); |
| 2950 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL); |
| 2951 | MOVED_TO_GLOBAL.add(Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD); |
| 2952 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE); |
| 2953 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES); |
| 2954 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES); |
| 2955 | MOVED_TO_GLOBAL.add(Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS); |
| 2956 | MOVED_TO_GLOBAL.add(Settings.Global.CONNECTIVITY_CHANGE_DELAY); |
| 2957 | MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED); |
| 2958 | MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_SERVER); |
| 2959 | MOVED_TO_GLOBAL.add(Settings.Global.NSD_ON); |
| 2960 | MOVED_TO_GLOBAL.add(Settings.Global.SET_INSTALL_LOCATION); |
| 2961 | MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_INSTALL_LOCATION); |
| 2962 | MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY); |
| 2963 | MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY); |
| 2964 | MOVED_TO_GLOBAL.add(Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT); |
| 2965 | MOVED_TO_GLOBAL.add(Settings.Global.HTTP_PROXY); |
| 2966 | MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_HOST); |
| 2967 | MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_PORT); |
| 2968 | MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST); |
| 2969 | MOVED_TO_GLOBAL.add(Settings.Global.SET_GLOBAL_HTTP_PROXY); |
| 2970 | MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER); |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2971 | MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE); |
Selim Gurun | 178201f | 2014-05-16 11:38:44 -0700 | [diff] [blame] | 2972 | MOVED_TO_GLOBAL.add(Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2973 | } |
| 2974 | |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 2975 | /** @hide */ |
| 2976 | public static void getMovedKeys(HashSet<String> outKeySet) { |
| 2977 | outKeySet.addAll(MOVED_TO_GLOBAL); |
| 2978 | } |
| 2979 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2980 | /** |
| 2981 | * Look up a name in the database. |
| 2982 | * @param resolver to access the database with |
| 2983 | * @param name to look up in the table |
| 2984 | * @return the corresponding value, or null if not present |
| 2985 | */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 2986 | public static String getString(ContentResolver resolver, String name) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2987 | return getStringForUser(resolver, name, UserHandle.myUserId()); |
| 2988 | } |
| 2989 | |
| 2990 | /** @hide */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 2991 | public static String getStringForUser(ContentResolver resolver, String name, |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2992 | int userHandle) { |
| 2993 | if (MOVED_TO_GLOBAL.contains(name)) { |
| 2994 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" |
| 2995 | + " to android.provider.Settings.Global."); |
| 2996 | return Global.getStringForUser(resolver, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2997 | } |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 2998 | |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 2999 | if (MOVED_TO_LOCK_SETTINGS.contains(name)) { |
| 3000 | synchronized (Secure.class) { |
| 3001 | if (sLockSettings == null) { |
| 3002 | sLockSettings = ILockSettings.Stub.asInterface( |
| 3003 | (IBinder) ServiceManager.getService("lock_settings")); |
| 3004 | sIsSystemProcess = Process.myUid() == Process.SYSTEM_UID; |
| 3005 | } |
| 3006 | } |
| 3007 | if (sLockSettings != null && !sIsSystemProcess) { |
| 3008 | try { |
| 3009 | return sLockSettings.getString(name, "0", userHandle); |
| 3010 | } catch (RemoteException re) { |
| 3011 | // Fall through |
| 3012 | } |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 3013 | } |
| 3014 | } |
| 3015 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3016 | return sNameValueCache.getStringForUser(resolver, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3017 | } |
| 3018 | |
| 3019 | /** |
| 3020 | * Store a name/value pair into the database. |
| 3021 | * @param resolver to access the database with |
| 3022 | * @param name to store |
| 3023 | * @param value to associate with the name |
| 3024 | * @return true if the value was set, false on database errors |
| 3025 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3026 | public static boolean putString(ContentResolver resolver, String name, String value) { |
| 3027 | return putStringForUser(resolver, name, value, UserHandle.myUserId()); |
| 3028 | } |
| 3029 | |
| 3030 | /** @hide */ |
| 3031 | public static boolean putStringForUser(ContentResolver resolver, String name, String value, |
| 3032 | int userHandle) { |
| 3033 | if (MOVED_TO_GLOBAL.contains(name)) { |
| 3034 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 3035 | + " to android.provider.Settings.Global"); |
| 3036 | return Global.putStringForUser(resolver, name, value, userHandle); |
| 3037 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3038 | return sNameValueCache.putStringForUser(resolver, name, value, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3039 | } |
| 3040 | |
| 3041 | /** |
| 3042 | * Construct the content URI for a particular name/value pair, |
| 3043 | * useful for monitoring changes with a ContentObserver. |
| 3044 | * @param name to look up in the table |
| 3045 | * @return the corresponding content URI, or null if not present |
| 3046 | */ |
| 3047 | public static Uri getUriFor(String name) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3048 | if (MOVED_TO_GLOBAL.contains(name)) { |
| 3049 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" |
| 3050 | + " to android.provider.Settings.Global, returning global URI."); |
| 3051 | return Global.getUriFor(Global.CONTENT_URI, name); |
| 3052 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3053 | return getUriFor(CONTENT_URI, name); |
| 3054 | } |
| 3055 | |
| 3056 | /** |
| 3057 | * Convenience function for retrieving a single secure settings value |
| 3058 | * as an integer. Note that internally setting values are always |
| 3059 | * stored as strings; this function converts the string to an integer |
| 3060 | * for you. The default value will be returned if the setting is |
| 3061 | * not defined or not an integer. |
| 3062 | * |
| 3063 | * @param cr The ContentResolver to access. |
| 3064 | * @param name The name of the setting to retrieve. |
| 3065 | * @param def Value to return if the setting is not defined. |
| 3066 | * |
| 3067 | * @return The setting's current value, or 'def' if it is not defined |
| 3068 | * or not a valid integer. |
| 3069 | */ |
| 3070 | public static int getInt(ContentResolver cr, String name, int def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3071 | return getIntForUser(cr, name, def, UserHandle.myUserId()); |
| 3072 | } |
| 3073 | |
| 3074 | /** @hide */ |
| 3075 | public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 3076 | if (LOCATION_MODE.equals(name)) { |
| 3077 | // HACK ALERT: temporary hack to work around b/10491283. |
| 3078 | // TODO: once b/10491283 fixed, remove this hack |
| 3079 | return getLocationModeForUser(cr, userHandle); |
| 3080 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3081 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3082 | try { |
| 3083 | return v != null ? Integer.parseInt(v) : def; |
| 3084 | } catch (NumberFormatException e) { |
| 3085 | return def; |
| 3086 | } |
| 3087 | } |
| 3088 | |
| 3089 | /** |
| 3090 | * Convenience function for retrieving a single secure settings value |
| 3091 | * as an integer. Note that internally setting values are always |
| 3092 | * stored as strings; this function converts the string to an integer |
| 3093 | * for you. |
| 3094 | * <p> |
| 3095 | * This version does not take a default value. If the setting has not |
| 3096 | * been set, or the string value is not a number, |
| 3097 | * it throws {@link SettingNotFoundException}. |
| 3098 | * |
| 3099 | * @param cr The ContentResolver to access. |
| 3100 | * @param name The name of the setting to retrieve. |
| 3101 | * |
| 3102 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 3103 | * name can't be found or the setting value is not an integer. |
| 3104 | * |
| 3105 | * @return The setting's current value. |
| 3106 | */ |
| 3107 | public static int getInt(ContentResolver cr, String name) |
| 3108 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3109 | return getIntForUser(cr, name, UserHandle.myUserId()); |
| 3110 | } |
| 3111 | |
| 3112 | /** @hide */ |
| 3113 | public static int getIntForUser(ContentResolver cr, String name, int userHandle) |
| 3114 | throws SettingNotFoundException { |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 3115 | if (LOCATION_MODE.equals(name)) { |
| 3116 | // HACK ALERT: temporary hack to work around b/10491283. |
| 3117 | // TODO: once b/10491283 fixed, remove this hack |
| 3118 | return getLocationModeForUser(cr, userHandle); |
| 3119 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3120 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3121 | try { |
| 3122 | return Integer.parseInt(v); |
| 3123 | } catch (NumberFormatException e) { |
| 3124 | throw new SettingNotFoundException(name); |
| 3125 | } |
| 3126 | } |
| 3127 | |
| 3128 | /** |
| 3129 | * Convenience function for updating a single settings value as an |
| 3130 | * integer. This will either create a new entry in the table if the |
| 3131 | * given name does not exist, or modify the value of the existing row |
| 3132 | * with that name. Note that internally setting values are always |
| 3133 | * stored as strings, so this function converts the given value to a |
| 3134 | * string before storing it. |
| 3135 | * |
| 3136 | * @param cr The ContentResolver to access. |
| 3137 | * @param name The name of the setting to modify. |
| 3138 | * @param value The new value for the setting. |
| 3139 | * @return true if the value was set, false on database errors |
| 3140 | */ |
| 3141 | public static boolean putInt(ContentResolver cr, String name, int value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3142 | return putIntForUser(cr, name, value, UserHandle.myUserId()); |
| 3143 | } |
| 3144 | |
| 3145 | /** @hide */ |
| 3146 | public static boolean putIntForUser(ContentResolver cr, String name, int value, |
| 3147 | int userHandle) { |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 3148 | if (LOCATION_MODE.equals(name)) { |
| 3149 | // HACK ALERT: temporary hack to work around b/10491283. |
| 3150 | // TODO: once b/10491283 fixed, remove this hack |
| 3151 | return setLocationModeForUser(cr, value, userHandle); |
| 3152 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3153 | return putStringForUser(cr, name, Integer.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3154 | } |
| 3155 | |
| 3156 | /** |
| 3157 | * Convenience function for retrieving a single secure settings value |
| 3158 | * as a {@code long}. Note that internally setting values are always |
| 3159 | * stored as strings; this function converts the string to a {@code long} |
| 3160 | * for you. The default value will be returned if the setting is |
| 3161 | * not defined or not a {@code long}. |
| 3162 | * |
| 3163 | * @param cr The ContentResolver to access. |
| 3164 | * @param name The name of the setting to retrieve. |
| 3165 | * @param def Value to return if the setting is not defined. |
| 3166 | * |
| 3167 | * @return The setting's current value, or 'def' if it is not defined |
| 3168 | * or not a valid {@code long}. |
| 3169 | */ |
| 3170 | public static long getLong(ContentResolver cr, String name, long def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3171 | return getLongForUser(cr, name, def, UserHandle.myUserId()); |
| 3172 | } |
| 3173 | |
| 3174 | /** @hide */ |
| 3175 | public static long getLongForUser(ContentResolver cr, String name, long def, |
| 3176 | int userHandle) { |
| 3177 | String valString = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3178 | long value; |
| 3179 | try { |
| 3180 | value = valString != null ? Long.parseLong(valString) : def; |
| 3181 | } catch (NumberFormatException e) { |
| 3182 | value = def; |
| 3183 | } |
| 3184 | return value; |
| 3185 | } |
| 3186 | |
| 3187 | /** |
| 3188 | * Convenience function for retrieving a single secure settings value |
| 3189 | * as a {@code long}. Note that internally setting values are always |
| 3190 | * stored as strings; this function converts the string to a {@code long} |
| 3191 | * for you. |
| 3192 | * <p> |
| 3193 | * This version does not take a default value. If the setting has not |
| 3194 | * been set, or the string value is not a number, |
| 3195 | * it throws {@link SettingNotFoundException}. |
| 3196 | * |
| 3197 | * @param cr The ContentResolver to access. |
| 3198 | * @param name The name of the setting to retrieve. |
| 3199 | * |
| 3200 | * @return The setting's current value. |
| 3201 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 3202 | * name can't be found or the setting value is not an integer. |
| 3203 | */ |
| 3204 | public static long getLong(ContentResolver cr, String name) |
| 3205 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3206 | return getLongForUser(cr, name, UserHandle.myUserId()); |
| 3207 | } |
| 3208 | |
| 3209 | /** @hide */ |
| 3210 | public static long getLongForUser(ContentResolver cr, String name, int userHandle) |
| 3211 | throws SettingNotFoundException { |
| 3212 | String valString = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3213 | try { |
| 3214 | return Long.parseLong(valString); |
| 3215 | } catch (NumberFormatException e) { |
| 3216 | throw new SettingNotFoundException(name); |
| 3217 | } |
| 3218 | } |
| 3219 | |
| 3220 | /** |
| 3221 | * Convenience function for updating a secure settings value as a long |
| 3222 | * integer. This will either create a new entry in the table if the |
| 3223 | * given name does not exist, or modify the value of the existing row |
| 3224 | * with that name. Note that internally setting values are always |
| 3225 | * stored as strings, so this function converts the given value to a |
| 3226 | * string before storing it. |
| 3227 | * |
| 3228 | * @param cr The ContentResolver to access. |
| 3229 | * @param name The name of the setting to modify. |
| 3230 | * @param value The new value for the setting. |
| 3231 | * @return true if the value was set, false on database errors |
| 3232 | */ |
| 3233 | public static boolean putLong(ContentResolver cr, String name, long value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3234 | return putLongForUser(cr, name, value, UserHandle.myUserId()); |
| 3235 | } |
| 3236 | |
| 3237 | /** @hide */ |
| 3238 | public static boolean putLongForUser(ContentResolver cr, String name, long value, |
| 3239 | int userHandle) { |
| 3240 | return putStringForUser(cr, name, Long.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3241 | } |
| 3242 | |
| 3243 | /** |
| 3244 | * Convenience function for retrieving a single secure settings value |
| 3245 | * as a floating point number. Note that internally setting values are |
| 3246 | * always stored as strings; this function converts the string to an |
| 3247 | * float for you. The default value will be returned if the setting |
| 3248 | * is not defined or not a valid float. |
| 3249 | * |
| 3250 | * @param cr The ContentResolver to access. |
| 3251 | * @param name The name of the setting to retrieve. |
| 3252 | * @param def Value to return if the setting is not defined. |
| 3253 | * |
| 3254 | * @return The setting's current value, or 'def' if it is not defined |
| 3255 | * or not a valid float. |
| 3256 | */ |
| 3257 | public static float getFloat(ContentResolver cr, String name, float def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3258 | return getFloatForUser(cr, name, def, UserHandle.myUserId()); |
| 3259 | } |
| 3260 | |
| 3261 | /** @hide */ |
| 3262 | public static float getFloatForUser(ContentResolver cr, String name, float def, |
| 3263 | int userHandle) { |
| 3264 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3265 | try { |
| 3266 | return v != null ? Float.parseFloat(v) : def; |
| 3267 | } catch (NumberFormatException e) { |
| 3268 | return def; |
| 3269 | } |
| 3270 | } |
| 3271 | |
| 3272 | /** |
| 3273 | * Convenience function for retrieving a single secure settings value |
| 3274 | * as a float. Note that internally setting values are always |
| 3275 | * stored as strings; this function converts the string to a float |
| 3276 | * for you. |
| 3277 | * <p> |
| 3278 | * This version does not take a default value. If the setting has not |
| 3279 | * been set, or the string value is not a number, |
| 3280 | * it throws {@link SettingNotFoundException}. |
| 3281 | * |
| 3282 | * @param cr The ContentResolver to access. |
| 3283 | * @param name The name of the setting to retrieve. |
| 3284 | * |
| 3285 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 3286 | * name can't be found or the setting value is not a float. |
| 3287 | * |
| 3288 | * @return The setting's current value. |
| 3289 | */ |
| 3290 | public static float getFloat(ContentResolver cr, String name) |
| 3291 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3292 | return getFloatForUser(cr, name, UserHandle.myUserId()); |
| 3293 | } |
| 3294 | |
| 3295 | /** @hide */ |
| 3296 | public static float getFloatForUser(ContentResolver cr, String name, int userHandle) |
| 3297 | throws SettingNotFoundException { |
| 3298 | String v = getStringForUser(cr, name, userHandle); |
Brian Muramatsu | e1d4698 | 2010-12-06 17:34:20 -0800 | [diff] [blame] | 3299 | if (v == null) { |
| 3300 | throw new SettingNotFoundException(name); |
| 3301 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3302 | try { |
| 3303 | return Float.parseFloat(v); |
| 3304 | } catch (NumberFormatException e) { |
| 3305 | throw new SettingNotFoundException(name); |
| 3306 | } |
| 3307 | } |
| 3308 | |
| 3309 | /** |
| 3310 | * Convenience function for updating a single settings value as a |
| 3311 | * floating point number. This will either create a new entry in the |
| 3312 | * table if the given name does not exist, or modify the value of the |
| 3313 | * existing row with that name. Note that internally setting values |
| 3314 | * are always stored as strings, so this function converts the given |
| 3315 | * value to a string before storing it. |
| 3316 | * |
| 3317 | * @param cr The ContentResolver to access. |
| 3318 | * @param name The name of the setting to modify. |
| 3319 | * @param value The new value for the setting. |
| 3320 | * @return true if the value was set, false on database errors |
| 3321 | */ |
| 3322 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3323 | return putFloatForUser(cr, name, value, UserHandle.myUserId()); |
| 3324 | } |
| 3325 | |
| 3326 | /** @hide */ |
| 3327 | public static boolean putFloatForUser(ContentResolver cr, String name, float value, |
| 3328 | int userHandle) { |
| 3329 | return putStringForUser(cr, name, Float.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3330 | } |
| 3331 | |
| 3332 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3333 | * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED} |
| 3334 | * instead |
Dianne Hackborn | 895f99e | 2012-02-02 11:49:12 -0800 | [diff] [blame] | 3335 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3336 | @Deprecated |
| 3337 | public static final String DEVELOPMENT_SETTINGS_ENABLED = |
| 3338 | Global.DEVELOPMENT_SETTINGS_ENABLED; |
Dianne Hackborn | 895f99e | 2012-02-02 11:49:12 -0800 | [diff] [blame] | 3339 | |
| 3340 | /** |
Dianne Hackborn | 5773bfdb | 2012-07-13 13:24:15 -0700 | [diff] [blame] | 3341 | * When the user has enable the option to have a "bug report" command |
| 3342 | * in the power menu. |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 3343 | * @deprecated Use {@link android.provider.Settings.Global#BUGREPORT_IN_POWER_MENU} instead |
Dianne Hackborn | 5773bfdb | 2012-07-13 13:24:15 -0700 | [diff] [blame] | 3344 | * @hide |
| 3345 | */ |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 3346 | @Deprecated |
Dianne Hackborn | 5773bfdb | 2012-07-13 13:24:15 -0700 | [diff] [blame] | 3347 | public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; |
| 3348 | |
| 3349 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3350 | * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3351 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3352 | @Deprecated |
| 3353 | public static final String ADB_ENABLED = Global.ADB_ENABLED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3354 | |
| 3355 | /** |
| 3356 | * Setting to allow mock locations and location provider status to be injected into the |
| 3357 | * LocationManager service for testing purposes during application development. These |
| 3358 | * locations and status values override actual location and status information generated |
| 3359 | * by network, gps, or other location providers. |
| 3360 | */ |
| 3361 | public static final String ALLOW_MOCK_LOCATION = "mock_location"; |
| 3362 | |
| 3363 | /** |
Doug Zongker | d8893db | 2010-01-26 12:29:44 -0800 | [diff] [blame] | 3364 | * A 64-bit number (as a hex string) that is randomly |
Scott Main | 4489533 | 2013-11-12 09:23:13 -0800 | [diff] [blame] | 3365 | * generated when the user first sets up the device and should remain |
| 3366 | * constant for the lifetime of the user's device. The value may |
| 3367 | * change if a factory reset is performed on the device. |
| 3368 | * <p class="note"><strong>Note:</strong> When a device has <a |
| 3369 | * href="{@docRoot}about/versions/android-4.2.html#MultipleUsers">multiple users</a> |
| 3370 | * (available on certain devices running Android 4.2 or higher), each user appears as a |
| 3371 | * completely separate device, so the {@code ANDROID_ID} value is unique to each |
| 3372 | * user.</p> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3373 | */ |
| 3374 | public static final String ANDROID_ID = "android_id"; |
| 3375 | |
| 3376 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3377 | * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3378 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3379 | @Deprecated |
| 3380 | public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3381 | |
| 3382 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3383 | * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3384 | */ |
Jeff Sharkey | bdfce2e | 2012-09-26 15:54:06 -0700 | [diff] [blame] | 3385 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3386 | public static final String DATA_ROAMING = Global.DATA_ROAMING; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3387 | |
| 3388 | /** |
| 3389 | * Setting to record the input method used by default, holding the ID |
| 3390 | * of the desired method. |
| 3391 | */ |
| 3392 | public static final String DEFAULT_INPUT_METHOD = "default_input_method"; |
| 3393 | |
| 3394 | /** |
satok | ab751aa | 2010-09-14 19:17:36 +0900 | [diff] [blame] | 3395 | * Setting to record the input method subtype used by default, holding the ID |
| 3396 | * of the desired method. |
| 3397 | */ |
| 3398 | public static final String SELECTED_INPUT_METHOD_SUBTYPE = |
| 3399 | "selected_input_method_subtype"; |
| 3400 | |
| 3401 | /** |
satok | 723a27e | 2010-11-11 14:58:11 +0900 | [diff] [blame] | 3402 | * Setting to record the history of input method subtype, holding the pair of ID of IME |
| 3403 | * and its last used subtype. |
| 3404 | * @hide |
| 3405 | */ |
| 3406 | public static final String INPUT_METHODS_SUBTYPE_HISTORY = |
| 3407 | "input_methods_subtype_history"; |
| 3408 | |
| 3409 | /** |
satok | 5c58dfc | 2010-12-14 21:54:47 +0900 | [diff] [blame] | 3410 | * Setting to record the visibility of input method selector |
| 3411 | */ |
| 3412 | public static final String INPUT_METHOD_SELECTOR_VISIBILITY = |
| 3413 | "input_method_selector_visibility"; |
| 3414 | |
| 3415 | /** |
Dianne Hackborn | 91097de | 2014-04-04 18:02:06 -0700 | [diff] [blame] | 3416 | * The currently selected voice interaction service flattened ComponentName. |
| 3417 | * @hide |
| 3418 | */ |
| 3419 | public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service"; |
| 3420 | |
| 3421 | /** |
Zhihai Xu | af5971e | 2013-06-10 20:28:31 -0700 | [diff] [blame] | 3422 | * bluetooth HCI snoop log configuration |
| 3423 | * @hide |
| 3424 | */ |
| 3425 | public static final String BLUETOOTH_HCI_LOG = |
| 3426 | "bluetooth_hci_log"; |
| 3427 | |
| 3428 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3429 | * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3430 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3431 | @Deprecated |
| 3432 | public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3433 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3434 | /** |
Russell Brenner | de6ae44 | 2012-09-26 20:53:10 -0700 | [diff] [blame] | 3435 | * Whether the current user has been set up via setup wizard (0 = false, 1 = true) |
| 3436 | * @hide |
| 3437 | */ |
| 3438 | public static final String USER_SETUP_COMPLETE = "user_setup_complete"; |
| 3439 | |
| 3440 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3441 | * List of input methods that are currently enabled. This is a string |
| 3442 | * containing the IDs of all enabled input methods, each ID separated |
| 3443 | * by ':'. |
| 3444 | */ |
| 3445 | public static final String ENABLED_INPUT_METHODS = "enabled_input_methods"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3446 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3447 | /** |
Amith Yamasani | e861ec1 | 2010-03-24 21:39:27 -0700 | [diff] [blame] | 3448 | * List of system input methods that are currently disabled. This is a string |
| 3449 | * containing the IDs of all disabled input methods, each ID separated |
| 3450 | * by ':'. |
| 3451 | * @hide |
| 3452 | */ |
| 3453 | public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods"; |
| 3454 | |
| 3455 | /** |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 3456 | * Host name and port for global http proxy. Uses ':' seperator for |
| 3457 | * between host and port. |
| 3458 | * |
| 3459 | * @deprecated Use {@link Global#HTTP_PROXY} |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3460 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 3461 | @Deprecated |
| 3462 | public static final String HTTP_PROXY = Global.HTTP_PROXY; |
Robert Greenwalt | e90aa5e | 2010-09-01 11:34:05 -0700 | [diff] [blame] | 3463 | |
| 3464 | /** |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 3465 | * Whether applications can be installed for this user via the system's |
| 3466 | * {@link Intent#ACTION_INSTALL_PACKAGE} mechanism. |
| 3467 | * |
| 3468 | * <p>1 = permit app installation via the system package installer intent |
| 3469 | * <p>0 = do not allow use of the package installer |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3470 | */ |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 3471 | public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3472 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3473 | /** |
Tom O'Neill | 923c0dc | 2014-03-03 11:07:55 -0800 | [diff] [blame] | 3474 | * Comma-separated list of location providers that activities may access. Do not rely on |
| 3475 | * this value being present in settings.db or on ContentObserver notifications on the |
| 3476 | * corresponding Uri. |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 3477 | * |
Tom O'Neill | 923c0dc | 2014-03-03 11:07:55 -0800 | [diff] [blame] | 3478 | * @deprecated use {@link #LOCATION_MODE} and |
| 3479 | * {@link LocationManager#MODE_CHANGED_ACTION} (or |
| 3480 | * {@link LocationManager#PROVIDERS_CHANGED_ACTION}) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3481 | */ |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 3482 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3483 | public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3484 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3485 | /** |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 3486 | * The degree of location access enabled by the user. |
Tom O'Neill | 923c0dc | 2014-03-03 11:07:55 -0800 | [diff] [blame] | 3487 | * <p> |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 3488 | * When used with {@link #putInt(ContentResolver, String, int)}, must be one of {@link |
| 3489 | * #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, {@link |
| 3490 | * #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. When used with {@link |
| 3491 | * #getInt(ContentResolver, String)}, the caller must gracefully handle additional location |
| 3492 | * modes that might be added in the future. |
Tom O'Neill | 923c0dc | 2014-03-03 11:07:55 -0800 | [diff] [blame] | 3493 | * <p> |
| 3494 | * Note: do not rely on this value being present in settings.db or on ContentObserver |
| 3495 | * notifications for the corresponding Uri. Use {@link LocationManager#MODE_CHANGED_ACTION} |
| 3496 | * to receive changes in this value. |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 3497 | */ |
| 3498 | public static final String LOCATION_MODE = "location_mode"; |
| 3499 | |
| 3500 | /** |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 3501 | * Location access disabled. |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 3502 | */ |
| 3503 | public static final int LOCATION_MODE_OFF = 0; |
| 3504 | /** |
| 3505 | * Network Location Provider disabled, but GPS and other sensors enabled. |
| 3506 | */ |
| 3507 | public static final int LOCATION_MODE_SENSORS_ONLY = 1; |
| 3508 | /** |
Tom O'Neill | d575943 | 2013-09-11 11:03:03 -0700 | [diff] [blame] | 3509 | * Reduced power usage, such as limiting the number of GPS updates per hour. Requests |
| 3510 | * with {@link android.location.Criteria#POWER_HIGH} may be downgraded to |
| 3511 | * {@link android.location.Criteria#POWER_MEDIUM}. |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 3512 | */ |
| 3513 | public static final int LOCATION_MODE_BATTERY_SAVING = 2; |
| 3514 | /** |
| 3515 | * Best-effort location computation allowed. |
| 3516 | */ |
| 3517 | public static final int LOCATION_MODE_HIGH_ACCURACY = 3; |
| 3518 | |
| 3519 | /** |
Danielle Millett | 925a7d8 | 2012-03-19 18:02:20 -0400 | [diff] [blame] | 3520 | * A flag containing settings used for biometric weak |
| 3521 | * @hide |
| 3522 | */ |
| 3523 | public static final String LOCK_BIOMETRIC_WEAK_FLAGS = |
| 3524 | "lock_biometric_weak_flags"; |
| 3525 | |
| 3526 | /** |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 3527 | * Whether autolock is enabled (0 = false, 1 = true) |
| 3528 | */ |
| 3529 | public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; |
| 3530 | |
| 3531 | /** |
| 3532 | * Whether lock pattern is visible as user enters (0 = false, 1 = true) |
| 3533 | */ |
| 3534 | public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; |
| 3535 | |
| 3536 | /** |
Jeff Sharkey | 5ed9d68 | 2012-10-10 14:28:27 -0700 | [diff] [blame] | 3537 | * Whether lock pattern will vibrate as user enters (0 = false, 1 = |
| 3538 | * true) |
| 3539 | * |
| 3540 | * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the |
| 3541 | * lockscreen uses |
| 3542 | * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}. |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 3543 | */ |
Jeff Sharkey | 5ed9d68 | 2012-10-10 14:28:27 -0700 | [diff] [blame] | 3544 | @Deprecated |
| 3545 | public static final String |
| 3546 | LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 3547 | |
| 3548 | /** |
Jim Miller | bc4603b | 2010-08-30 21:21:34 -0700 | [diff] [blame] | 3549 | * This preference allows the device to be locked given time after screen goes off, |
| 3550 | * subject to current DeviceAdmin policy limits. |
| 3551 | * @hide |
| 3552 | */ |
| 3553 | public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout"; |
| 3554 | |
| 3555 | |
| 3556 | /** |
John Spurlock | 5f050e5 | 2012-10-27 10:44:19 -0400 | [diff] [blame] | 3557 | * This preference contains the string that shows for owner info on LockScreen. |
Jim Miller | 253a5ef | 2010-10-13 20:57:29 -0700 | [diff] [blame] | 3558 | * @hide |
Jim Miller | 187ec58 | 2013-04-15 18:27:54 -0700 | [diff] [blame] | 3559 | * @deprecated |
Jim Miller | 253a5ef | 2010-10-13 20:57:29 -0700 | [diff] [blame] | 3560 | */ |
| 3561 | public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info"; |
| 3562 | |
| 3563 | /** |
John Spurlock | 5f050e5 | 2012-10-27 10:44:19 -0400 | [diff] [blame] | 3564 | * Ids of the user-selected appwidgets on the lockscreen (comma-delimited). |
Jim Miller | f229e4d | 2012-09-12 20:32:50 -0700 | [diff] [blame] | 3565 | * @hide |
| 3566 | */ |
Michael Jurka | aa2859a | 2012-10-24 12:46:49 -0700 | [diff] [blame] | 3567 | public static final String LOCK_SCREEN_APPWIDGET_IDS = |
| 3568 | "lock_screen_appwidget_ids"; |
Jim Miller | f229e4d | 2012-09-12 20:32:50 -0700 | [diff] [blame] | 3569 | |
| 3570 | /** |
Jim Miller | 08fa40c | 2014-04-29 18:18:47 -0700 | [diff] [blame] | 3571 | * List of enrolled fingerprint identifiers (comma-delimited). |
| 3572 | * @hide |
| 3573 | */ |
| 3574 | public static final String USER_FINGERPRINT_IDS = "user_fingerprint_ids"; |
| 3575 | |
| 3576 | /** |
Jim Miller | 5111726 | 2012-11-04 17:58:09 -0800 | [diff] [blame] | 3577 | * Id of the appwidget shown on the lock screen when appwidgets are disabled. |
| 3578 | * @hide |
| 3579 | */ |
| 3580 | public static final String LOCK_SCREEN_FALLBACK_APPWIDGET_ID = |
| 3581 | "lock_screen_fallback_appwidget_id"; |
| 3582 | |
| 3583 | /** |
John Spurlock | 5f050e5 | 2012-10-27 10:44:19 -0400 | [diff] [blame] | 3584 | * Index of the lockscreen appwidget to restore, -1 if none. |
| 3585 | * @hide |
| 3586 | */ |
| 3587 | public static final String LOCK_SCREEN_STICKY_APPWIDGET = |
| 3588 | "lock_screen_sticky_appwidget"; |
| 3589 | |
| 3590 | /** |
| 3591 | * This preference enables showing the owner info on LockScreen. |
Jim Miller | 253a5ef | 2010-10-13 20:57:29 -0700 | [diff] [blame] | 3592 | * @hide |
Jim Miller | 187ec58 | 2013-04-15 18:27:54 -0700 | [diff] [blame] | 3593 | * @deprecated |
Jim Miller | 253a5ef | 2010-10-13 20:57:29 -0700 | [diff] [blame] | 3594 | */ |
| 3595 | public static final String LOCK_SCREEN_OWNER_INFO_ENABLED = |
| 3596 | "lock_screen_owner_info_enabled"; |
| 3597 | |
| 3598 | /** |
Dan Sandler | 5d7c3cc | 2014-02-18 17:35:15 -0500 | [diff] [blame] | 3599 | * When set by a user, allows notifications to be shown atop a securely locked screen |
| 3600 | * in their full "private" form (same as when the device is unlocked). |
Dan Sandler | fd16d56 | 2014-02-13 18:43:31 -0800 | [diff] [blame] | 3601 | * @hide |
| 3602 | */ |
| 3603 | public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = |
| 3604 | "lock_screen_allow_private_notifications"; |
| 3605 | |
| 3606 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3607 | * The Logging ID (a unique 64-bit value) as a hex string. |
| 3608 | * Used as a pseudonymous identifier for logging. |
| 3609 | * @deprecated This identifier is poorly initialized and has |
| 3610 | * many collisions. It should not be used. |
| 3611 | */ |
| 3612 | @Deprecated |
| 3613 | public static final String LOGGING_ID = "logging_id"; |
| 3614 | |
| 3615 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3616 | * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3617 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3618 | @Deprecated |
| 3619 | public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3620 | |
| 3621 | /** |
Dan Egnor | 1c9131c | 2010-02-13 10:38:55 -0800 | [diff] [blame] | 3622 | * No longer supported. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3623 | */ |
| 3624 | public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3625 | |
| 3626 | /** |
Dan Egnor | 1c9131c | 2010-02-13 10:38:55 -0800 | [diff] [blame] | 3627 | * No longer supported. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3628 | */ |
| 3629 | public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3630 | |
| 3631 | /** |
Dan Egnor | 1c9131c | 2010-02-13 10:38:55 -0800 | [diff] [blame] | 3632 | * No longer supported. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3633 | */ |
| 3634 | public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3635 | |
Jae Seo | 6057102 | 2014-07-14 16:07:19 -0700 | [diff] [blame] | 3636 | |
| 3637 | /** |
| 3638 | * Whether the TV parental control is enabled. |
| 3639 | * @hide |
| 3640 | */ |
| 3641 | public static final String TV_PARENTAL_CONTROL_ENABLED = "tv_parental_control_enabled"; |
| 3642 | |
| 3643 | /** |
| 3644 | * List of TV content ratings blocked by the user. (comma-delimited) |
| 3645 | * @hide |
| 3646 | */ |
| 3647 | public static final String TV_PARENTAL_CONTROL_BLOCKED_RATINGS = |
| 3648 | "tv_parental_control_blocked_ratings"; |
| 3649 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3650 | /** |
| 3651 | * Settings classname to launch when Settings is clicked from All |
| 3652 | * Applications. Needed because of user testing between the old |
| 3653 | * and new Settings apps. |
| 3654 | */ |
| 3655 | // TODO: 881807 |
| 3656 | public static final String SETTINGS_CLASSNAME = "settings_classname"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3657 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3658 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3659 | * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3660 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3661 | @Deprecated |
| 3662 | public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3663 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3664 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3665 | * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3666 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3667 | @Deprecated |
| 3668 | public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3669 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3670 | /** |
svetoslavganov | 75986cf | 2009-05-14 22:28:01 -0700 | [diff] [blame] | 3671 | * If accessibility is enabled. |
| 3672 | */ |
| 3673 | public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled"; |
| 3674 | |
| 3675 | /** |
Svetoslav Ganov | 00aabf7 | 2011-07-21 11:35:03 -0700 | [diff] [blame] | 3676 | * If touch exploration is enabled. |
Svetoslav Ganov | 35bfede | 2011-07-14 17:57:06 -0700 | [diff] [blame] | 3677 | */ |
Svetoslav Ganov | 00aabf7 | 2011-07-21 11:35:03 -0700 | [diff] [blame] | 3678 | public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled"; |
Svetoslav Ganov | 35bfede | 2011-07-14 17:57:06 -0700 | [diff] [blame] | 3679 | |
| 3680 | /** |
svetoslavganov | 75986cf | 2009-05-14 22:28:01 -0700 | [diff] [blame] | 3681 | * List of the enabled accessibility providers. |
| 3682 | */ |
| 3683 | public static final String ENABLED_ACCESSIBILITY_SERVICES = |
| 3684 | "enabled_accessibility_services"; |
| 3685 | |
| 3686 | /** |
Svetoslav Ganov | 7befb7d | 2012-09-27 16:49:23 -0700 | [diff] [blame] | 3687 | * List of the accessibility services to which the user has granted |
Svetoslav Ganov | 9a4c5cd | 2012-05-30 14:06:32 -0700 | [diff] [blame] | 3688 | * permission to put the device into touch exploration mode. |
| 3689 | * |
| 3690 | * @hide |
| 3691 | */ |
| 3692 | public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES = |
| 3693 | "touch_exploration_granted_accessibility_services"; |
| 3694 | |
| 3695 | /** |
Svetoslav Ganov | 55f937a | 2011-12-05 11:42:07 -0800 | [diff] [blame] | 3696 | * Whether to speak passwords while in accessibility mode. |
| 3697 | */ |
| 3698 | public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password"; |
| 3699 | |
| 3700 | /** |
Chris Craik | cce47eb | 2014-07-16 15:12:15 -0700 | [diff] [blame] | 3701 | * Whether to draw text with high contrast while in accessibility mode. |
| 3702 | * |
| 3703 | * @hide |
| 3704 | */ |
| 3705 | public static final String ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED = |
| 3706 | "high_text_contrast_enabled"; |
| 3707 | |
| 3708 | /** |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 3709 | * If injection of accessibility enhancing JavaScript screen-reader |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 3710 | * is enabled. |
| 3711 | * <p> |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 3712 | * Note: The JavaScript based screen-reader is served by the |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 3713 | * Google infrastructure and enable users with disabilities to |
Svetoslav Ganov | 7befb7d | 2012-09-27 16:49:23 -0700 | [diff] [blame] | 3714 | * efficiently navigate in and explore web content. |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 3715 | * </p> |
| 3716 | * <p> |
| 3717 | * This property represents a boolean value. |
| 3718 | * </p> |
| 3719 | * @hide |
| 3720 | */ |
| 3721 | public static final String ACCESSIBILITY_SCRIPT_INJECTION = |
| 3722 | "accessibility_script_injection"; |
| 3723 | |
| 3724 | /** |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 3725 | * The URL for the injected JavaScript based screen-reader used |
Svetoslav Ganov | 7befb7d | 2012-09-27 16:49:23 -0700 | [diff] [blame] | 3726 | * for providing accessibility of content in WebView. |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 3727 | * <p> |
| 3728 | * Note: The JavaScript based screen-reader is served by the |
| 3729 | * Google infrastructure and enable users with disabilities to |
| 3730 | * efficiently navigate in and explore web content. |
| 3731 | * </p> |
| 3732 | * <p> |
| 3733 | * This property represents a string value. |
| 3734 | * </p> |
| 3735 | * @hide |
| 3736 | */ |
| 3737 | public static final String ACCESSIBILITY_SCREEN_READER_URL = |
| 3738 | "accessibility_script_injection_url"; |
| 3739 | |
| 3740 | /** |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 3741 | * Key bindings for navigation in built-in accessibility support for web content. |
| 3742 | * <p> |
| 3743 | * Note: These key bindings are for the built-in accessibility navigation for |
| 3744 | * web content which is used as a fall back solution if JavaScript in a WebView |
| 3745 | * is not enabled or the user has not opted-in script injection from Google. |
| 3746 | * </p> |
| 3747 | * <p> |
| 3748 | * The bindings are separated by semi-colon. A binding is a mapping from |
| 3749 | * a key to a sequence of actions (for more details look at |
| 3750 | * android.webkit.AccessibilityInjector). A key is represented as the hexademical |
| 3751 | * string representation of an integer obtained from a meta state (optional) shifted |
| 3752 | * sixteen times left and bitwise ored with a key code. An action is represented |
| 3753 | * as a hexademical string representation of an integer where the first two digits |
| 3754 | * are navigation action index, the second, the third, and the fourth digit pairs |
| 3755 | * represent the action arguments. The separate actions in a binding are colon |
| 3756 | * separated. The key and the action sequence it maps to are separated by equals. |
| 3757 | * </p> |
| 3758 | * <p> |
| 3759 | * For example, the binding below maps the DPAD right button to traverse the |
| 3760 | * current navigation axis once without firing an accessibility event and to |
| 3761 | * perform the same traversal again but to fire an event: |
| 3762 | * <code> |
| 3763 | * 0x16=0x01000100:0x01000101; |
| 3764 | * </code> |
| 3765 | * </p> |
| 3766 | * <p> |
| 3767 | * The goal of this binding is to enable dynamic rebinding of keys to |
| 3768 | * navigation actions for web content without requiring a framework change. |
| 3769 | * </p> |
| 3770 | * <p> |
| 3771 | * This property represents a string value. |
| 3772 | * </p> |
| 3773 | * @hide |
| 3774 | */ |
| 3775 | public static final String ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS = |
| 3776 | "accessibility_web_content_key_bindings"; |
| 3777 | |
| 3778 | /** |
Svetoslav Ganov | 1cf70bb | 2012-08-06 10:53:34 -0700 | [diff] [blame] | 3779 | * Setting that specifies whether the display magnification is enabled. |
| 3780 | * Display magnifications allows the user to zoom in the display content |
| 3781 | * and is targeted to low vision users. The current magnification scale |
| 3782 | * is controlled by {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}. |
| 3783 | * |
| 3784 | * @hide |
| 3785 | */ |
| 3786 | public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED = |
| 3787 | "accessibility_display_magnification_enabled"; |
| 3788 | |
| 3789 | /** |
| 3790 | * Setting that specifies what the display magnification scale is. |
| 3791 | * Display magnifications allows the user to zoom in the display |
| 3792 | * content and is targeted to low vision users. Whether a display |
| 3793 | * magnification is performed is controlled by |
| 3794 | * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED} |
| 3795 | * |
| 3796 | * @hide |
| 3797 | */ |
| 3798 | public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE = |
| 3799 | "accessibility_display_magnification_scale"; |
| 3800 | |
| 3801 | /** |
| 3802 | * Setting that specifies whether the display magnification should be |
| 3803 | * automatically updated. If this fearture is enabled the system will |
| 3804 | * exit magnification mode or pan the viewport when a context change |
| 3805 | * occurs. For example, on staring a new activity or rotating the screen, |
| 3806 | * the system may zoom out so the user can see the new context he is in. |
| 3807 | * Another example is on showing a window that is not visible in the |
| 3808 | * magnified viewport the system may pan the viewport to make the window |
| 3809 | * the has popped up so the user knows that the context has changed. |
| 3810 | * Whether a screen magnification is performed is controlled by |
| 3811 | * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED} |
| 3812 | * |
| 3813 | * @hide |
| 3814 | */ |
| 3815 | public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE = |
| 3816 | "accessibility_display_magnification_auto_update"; |
| 3817 | |
| 3818 | /** |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 3819 | * Setting that specifies whether timed text (captions) should be |
| 3820 | * displayed in video content. Text display properties are controlled by |
| 3821 | * the following settings: |
| 3822 | * <ul> |
| 3823 | * <li>{@link #ACCESSIBILITY_CAPTIONING_LOCALE} |
| 3824 | * <li>{@link #ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR} |
| 3825 | * <li>{@link #ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR} |
| 3826 | * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_COLOR} |
| 3827 | * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_TYPE} |
| 3828 | * <li>{@link #ACCESSIBILITY_CAPTIONING_TYPEFACE} |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 3829 | * <li>{@link #ACCESSIBILITY_CAPTIONING_FONT_SCALE} |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 3830 | * </ul> |
| 3831 | * |
| 3832 | * @hide |
| 3833 | */ |
| 3834 | public static final String ACCESSIBILITY_CAPTIONING_ENABLED = |
| 3835 | "accessibility_captioning_enabled"; |
| 3836 | |
| 3837 | /** |
| 3838 | * Setting that specifies the language for captions as a locale string, |
| 3839 | * e.g. en_US. |
| 3840 | * |
| 3841 | * @see java.util.Locale#toString |
| 3842 | * @hide |
| 3843 | */ |
| 3844 | public static final String ACCESSIBILITY_CAPTIONING_LOCALE = |
| 3845 | "accessibility_captioning_locale"; |
| 3846 | |
| 3847 | /** |
Alan Viverette | 43a1e3d | 2013-08-02 16:45:03 -0700 | [diff] [blame] | 3848 | * Integer property that specifies the preset style for captions, one |
| 3849 | * of: |
| 3850 | * <ul> |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 3851 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESET_CUSTOM} |
| 3852 | * <li>a valid index of {@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESETS} |
Alan Viverette | 43a1e3d | 2013-08-02 16:45:03 -0700 | [diff] [blame] | 3853 | * </ul> |
| 3854 | * |
| 3855 | * @see java.util.Locale#toString |
| 3856 | * @hide |
| 3857 | */ |
| 3858 | public static final String ACCESSIBILITY_CAPTIONING_PRESET = |
| 3859 | "accessibility_captioning_preset"; |
| 3860 | |
| 3861 | /** |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 3862 | * Integer property that specifes the background color for captions as a |
| 3863 | * packed 32-bit color. |
| 3864 | * |
| 3865 | * @see android.graphics.Color#argb |
| 3866 | * @hide |
| 3867 | */ |
| 3868 | public static final String ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR = |
| 3869 | "accessibility_captioning_background_color"; |
| 3870 | |
| 3871 | /** |
| 3872 | * Integer property that specifes the foreground color for captions as a |
| 3873 | * packed 32-bit color. |
| 3874 | * |
| 3875 | * @see android.graphics.Color#argb |
| 3876 | * @hide |
| 3877 | */ |
| 3878 | public static final String ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR = |
| 3879 | "accessibility_captioning_foreground_color"; |
| 3880 | |
| 3881 | /** |
| 3882 | * Integer property that specifes the edge type for captions, one of: |
| 3883 | * <ul> |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 3884 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_NONE} |
| 3885 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE} |
| 3886 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW} |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 3887 | * </ul> |
| 3888 | * |
| 3889 | * @see #ACCESSIBILITY_CAPTIONING_EDGE_COLOR |
| 3890 | * @hide |
| 3891 | */ |
| 3892 | public static final String ACCESSIBILITY_CAPTIONING_EDGE_TYPE = |
| 3893 | "accessibility_captioning_edge_type"; |
| 3894 | |
| 3895 | /** |
| 3896 | * Integer property that specifes the edge color for captions as a |
| 3897 | * packed 32-bit color. |
| 3898 | * |
| 3899 | * @see #ACCESSIBILITY_CAPTIONING_EDGE_TYPE |
| 3900 | * @see android.graphics.Color#argb |
| 3901 | * @hide |
| 3902 | */ |
| 3903 | public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR = |
| 3904 | "accessibility_captioning_edge_color"; |
| 3905 | |
| 3906 | /** |
Alan Viverette | 55d7062 | 2013-12-11 15:22:14 -0800 | [diff] [blame] | 3907 | * Integer property that specifes the window color for captions as a |
| 3908 | * packed 32-bit color. |
| 3909 | * |
| 3910 | * @see android.graphics.Color#argb |
| 3911 | * @hide |
| 3912 | */ |
| 3913 | public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR = |
| 3914 | "accessibility_captioning_window_color"; |
| 3915 | |
| 3916 | /** |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 3917 | * String property that specifies the typeface for captions, one of: |
| 3918 | * <ul> |
| 3919 | * <li>DEFAULT |
| 3920 | * <li>MONOSPACE |
| 3921 | * <li>SANS_SERIF |
| 3922 | * <li>SERIF |
| 3923 | * </ul> |
| 3924 | * |
| 3925 | * @see android.graphics.Typeface |
| 3926 | * @hide |
| 3927 | */ |
| 3928 | public static final String ACCESSIBILITY_CAPTIONING_TYPEFACE = |
| 3929 | "accessibility_captioning_typeface"; |
| 3930 | |
| 3931 | /** |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 3932 | * Floating point property that specifies font scaling for captions. |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 3933 | * |
| 3934 | * @hide |
| 3935 | */ |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 3936 | public static final String ACCESSIBILITY_CAPTIONING_FONT_SCALE = |
| 3937 | "accessibility_captioning_font_scale"; |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 3938 | |
| 3939 | /** |
Alan Viverette | 410d4e3 | 2013-09-30 15:37:38 -0700 | [diff] [blame] | 3940 | * Setting that specifies whether display color inversion is enabled. |
Alan Viverette | 410d4e3 | 2013-09-30 15:37:38 -0700 | [diff] [blame] | 3941 | */ |
| 3942 | public static final String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = |
| 3943 | "accessibility_display_inversion_enabled"; |
| 3944 | |
| 3945 | /** |
Alan Viverette | 410d4e3 | 2013-09-30 15:37:38 -0700 | [diff] [blame] | 3946 | * Setting that specifies whether display color space adjustment is |
| 3947 | * enabled. |
| 3948 | * |
| 3949 | * @hide |
| 3950 | */ |
| 3951 | public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED = |
| 3952 | "accessibility_display_daltonizer_enabled"; |
| 3953 | |
| 3954 | /** |
| 3955 | * Integer property that specifies the type of color space adjustment to |
| 3956 | * perform. Valid values are defined in AccessibilityManager. |
| 3957 | * |
| 3958 | * @hide |
| 3959 | */ |
| 3960 | public static final String ACCESSIBILITY_DISPLAY_DALTONIZER = |
| 3961 | "accessibility_display_daltonizer"; |
| 3962 | |
| 3963 | /** |
Svetoslav Ganov | 54d068e | 2011-03-02 12:58:40 -0800 | [diff] [blame] | 3964 | * The timout for considering a press to be a long press in milliseconds. |
| 3965 | * @hide |
| 3966 | */ |
| 3967 | public static final String LONG_PRESS_TIMEOUT = "long_press_timeout"; |
| 3968 | |
| 3969 | /** |
Svetoslav Ganov | 6bd20bc | 2013-09-02 15:24:45 -0700 | [diff] [blame] | 3970 | * List of the enabled print services. |
Svetoslav Ganov | 4b9a4d1 | 2013-06-11 15:20:06 -0700 | [diff] [blame] | 3971 | * @hide |
| 3972 | */ |
| 3973 | public static final String ENABLED_PRINT_SERVICES = |
| 3974 | "enabled_print_services"; |
| 3975 | |
| 3976 | /** |
Svetoslav Ganov | 6bd20bc | 2013-09-02 15:24:45 -0700 | [diff] [blame] | 3977 | * List of the system print services we enabled on first boot. On |
| 3978 | * first boot we enable all system, i.e. bundled print services, |
| 3979 | * once, so they work out-of-the-box. |
| 3980 | * @hide |
| 3981 | */ |
| 3982 | public static final String ENABLED_ON_FIRST_BOOT_SYSTEM_PRINT_SERVICES = |
| 3983 | "enabled_on_first_boot_system_print_services"; |
| 3984 | |
| 3985 | /** |
Jean-Michel Trivi | f62ba45 | 2009-06-04 14:55:24 -0700 | [diff] [blame] | 3986 | * Setting to always use the default text-to-speech settings regardless |
| 3987 | * of the application settings. |
| 3988 | * 1 = override application settings, |
| 3989 | * 0 = use application settings (if specified). |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 3990 | * |
| 3991 | * @deprecated The value of this setting is no longer respected by |
| 3992 | * the framework text to speech APIs as of the Ice Cream Sandwich release. |
Jean-Michel Trivi | f62ba45 | 2009-06-04 14:55:24 -0700 | [diff] [blame] | 3993 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 3994 | @Deprecated |
Jean-Michel Trivi | f62ba45 | 2009-06-04 14:55:24 -0700 | [diff] [blame] | 3995 | public static final String TTS_USE_DEFAULTS = "tts_use_defaults"; |
| 3996 | |
| 3997 | /** |
| 3998 | * Default text-to-speech engine speech rate. 100 = 1x |
| 3999 | */ |
| 4000 | public static final String TTS_DEFAULT_RATE = "tts_default_rate"; |
| 4001 | |
| 4002 | /** |
| 4003 | * Default text-to-speech engine pitch. 100 = 1x |
| 4004 | */ |
| 4005 | public static final String TTS_DEFAULT_PITCH = "tts_default_pitch"; |
| 4006 | |
| 4007 | /** |
| 4008 | * Default text-to-speech engine. |
| 4009 | */ |
| 4010 | public static final String TTS_DEFAULT_SYNTH = "tts_default_synth"; |
| 4011 | |
| 4012 | /** |
Jean-Michel Trivi | f478267 | 2009-06-09 16:22:48 -0700 | [diff] [blame] | 4013 | * Default text-to-speech language. |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 4014 | * |
| 4015 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 4016 | * Sandwich release. Apps should never need to read this setting directly, |
| 4017 | * instead can query the TextToSpeech framework classes for the default |
| 4018 | * locale. {@link TextToSpeech#getLanguage()}. |
Jean-Michel Trivi | f478267 | 2009-06-09 16:22:48 -0700 | [diff] [blame] | 4019 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 4020 | @Deprecated |
Jean-Michel Trivi | f478267 | 2009-06-09 16:22:48 -0700 | [diff] [blame] | 4021 | public static final String TTS_DEFAULT_LANG = "tts_default_lang"; |
| 4022 | |
| 4023 | /** |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 4024 | * Default text-to-speech country. |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 4025 | * |
| 4026 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 4027 | * Sandwich release. Apps should never need to read this setting directly, |
| 4028 | * instead can query the TextToSpeech framework classes for the default |
| 4029 | * locale. {@link TextToSpeech#getLanguage()}. |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 4030 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 4031 | @Deprecated |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 4032 | public static final String TTS_DEFAULT_COUNTRY = "tts_default_country"; |
| 4033 | |
| 4034 | /** |
| 4035 | * Default text-to-speech locale variant. |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 4036 | * |
| 4037 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 4038 | * Sandwich release. Apps should never need to read this setting directly, |
| 4039 | * instead can query the TextToSpeech framework classes for the |
| 4040 | * locale that is in use {@link TextToSpeech#getLanguage()}. |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 4041 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 4042 | @Deprecated |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 4043 | public static final String TTS_DEFAULT_VARIANT = "tts_default_variant"; |
| 4044 | |
| 4045 | /** |
Narayan Kamath | e5b8c4d | 2011-08-22 15:37:47 +0100 | [diff] [blame] | 4046 | * Stores the default tts locales on a per engine basis. Stored as |
| 4047 | * a comma seperated list of values, each value being of the form |
| 4048 | * {@code engine_name:locale} for example, |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 4049 | * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This |
| 4050 | * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and |
| 4051 | * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this |
| 4052 | * setting directly, and can query the TextToSpeech framework classes |
| 4053 | * for the locale that is in use. |
Narayan Kamath | e5b8c4d | 2011-08-22 15:37:47 +0100 | [diff] [blame] | 4054 | * |
| 4055 | * @hide |
| 4056 | */ |
| 4057 | public static final String TTS_DEFAULT_LOCALE = "tts_default_locale"; |
| 4058 | |
| 4059 | /** |
Charles Chen | ceffa15 | 2010-03-16 21:18:10 -0700 | [diff] [blame] | 4060 | * Space delimited list of plugin packages that are enabled. |
| 4061 | */ |
| 4062 | public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins"; |
| 4063 | |
| 4064 | /** |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4065 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} |
| 4066 | * instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4067 | */ |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4068 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4069 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4070 | Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4071 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4072 | /** |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4073 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} |
| 4074 | * instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4075 | */ |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4076 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4077 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4078 | Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4079 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4080 | /** |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4081 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} |
| 4082 | * instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4083 | */ |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4084 | @Deprecated |
| 4085 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = |
| 4086 | Global.WIFI_NUM_OPEN_NETWORKS_KEPT; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4087 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4088 | /** |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4089 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} |
| 4090 | * instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4091 | */ |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4092 | @Deprecated |
| 4093 | public static final String WIFI_ON = Global.WIFI_ON; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4094 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4095 | /** |
| 4096 | * The acceptable packet loss percentage (range 0 - 100) before trying |
| 4097 | * another AP on the same network. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4098 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4099 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4100 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4101 | public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = |
| 4102 | "wifi_watchdog_acceptable_packet_loss_percentage"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4103 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4104 | /** |
| 4105 | * The number of access points required for a network in order for the |
| 4106 | * watchdog to monitor it. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4107 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4108 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4109 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4110 | public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4111 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4112 | /** |
| 4113 | * The delay between background checks. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4114 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4115 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4116 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4117 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = |
| 4118 | "wifi_watchdog_background_check_delay_ms"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4119 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4120 | /** |
| 4121 | * Whether the Wi-Fi watchdog is enabled for background checking even |
| 4122 | * after it thinks the user has connected to a good access point. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4123 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4124 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4125 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4126 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = |
| 4127 | "wifi_watchdog_background_check_enabled"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4128 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4129 | /** |
| 4130 | * The timeout for a background ping |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4131 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4132 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4133 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4134 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = |
| 4135 | "wifi_watchdog_background_check_timeout_ms"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4136 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4137 | /** |
| 4138 | * The number of initial pings to perform that *may* be ignored if they |
| 4139 | * fail. Again, if these fail, they will *not* be used in packet loss |
| 4140 | * calculation. For example, one network always seemed to time out for |
| 4141 | * the first couple pings, so this is set to 3 by default. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4142 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4143 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4144 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4145 | public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = |
| 4146 | "wifi_watchdog_initial_ignored_ping_count"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4147 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4148 | /** |
| 4149 | * The maximum number of access points (per network) to attempt to test. |
| 4150 | * If this number is reached, the watchdog will no longer monitor the |
| 4151 | * initial connection state for the network. This is a safeguard for |
| 4152 | * networks containing multiple APs whose DNS does not respond to pings. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4153 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4154 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4155 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4156 | public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4157 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4158 | /** |
Jeff Sharkey | bdfce2e | 2012-09-26 15:54:06 -0700 | [diff] [blame] | 4159 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4160 | */ |
Jeff Sharkey | bdfce2e | 2012-09-26 15:54:06 -0700 | [diff] [blame] | 4161 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4162 | public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; |
| 4163 | |
| 4164 | /** |
| 4165 | * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4166 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4167 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4168 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4169 | public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list"; |
| 4170 | |
| 4171 | /** |
| 4172 | * The number of pings to test if an access point is a good connection. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4173 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4174 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4175 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4176 | public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4177 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4178 | /** |
| 4179 | * The delay between pings. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4180 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4181 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4182 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4183 | public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4184 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4185 | /** |
| 4186 | * The timeout per ping. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4187 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4188 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 4189 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4190 | public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4191 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4192 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4193 | * @deprecated Use |
| 4194 | * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4195 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4196 | @Deprecated |
| 4197 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4198 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4199 | /** |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4200 | * @deprecated Use |
| 4201 | * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4202 | */ |
Jeff Sharkey | bdfce2e | 2012-09-26 15:54:06 -0700 | [diff] [blame] | 4203 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4204 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4205 | Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4206 | |
| 4207 | /** |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 4208 | * Whether background data usage is allowed. |
| 4209 | * |
| 4210 | * @deprecated As of {@link VERSION_CODES#ICE_CREAM_SANDWICH}, |
| 4211 | * availability of background data depends on several |
| 4212 | * combined factors. When background data is unavailable, |
| 4213 | * {@link ConnectivityManager#getActiveNetworkInfo()} will |
| 4214 | * now appear disconnected. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4215 | */ |
Jeff Sharkey | 3a844fc | 2011-08-16 14:37:57 -0700 | [diff] [blame] | 4216 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4217 | public static final String BACKGROUND_DATA = "background_data"; |
Wink Saville | 04e71b3 | 2009-04-02 11:00:54 -0700 | [diff] [blame] | 4218 | |
| 4219 | /** |
Bjorn Bringert | 98bfa39 | 2010-03-24 10:59:48 +0000 | [diff] [blame] | 4220 | * Origins for which browsers should allow geolocation by default. |
| 4221 | * The value is a space-separated list of origins. |
| 4222 | */ |
| 4223 | public static final String ALLOWED_GEOLOCATION_ORIGINS |
| 4224 | = "allowed_geolocation_origins"; |
| 4225 | |
| 4226 | /** |
Wink Saville | e9b06d7 | 2009-05-18 21:47:50 -0700 | [diff] [blame] | 4227 | * The preferred TTY mode 0 = TTy Off, CDMA default |
| 4228 | * 1 = TTY Full |
| 4229 | * 2 = TTY HCO |
| 4230 | * 3 = TTY VCO |
| 4231 | * @hide |
| 4232 | */ |
| 4233 | public static final String PREFERRED_TTY_MODE = |
| 4234 | "preferred_tty_mode"; |
| 4235 | |
Wink Saville | 04e71b3 | 2009-04-02 11:00:54 -0700 | [diff] [blame] | 4236 | /** |
Wink Saville | 04e71b3 | 2009-04-02 11:00:54 -0700 | [diff] [blame] | 4237 | * Whether the enhanced voice privacy mode is enabled. |
| 4238 | * 0 = normal voice privacy |
| 4239 | * 1 = enhanced voice privacy |
| 4240 | * @hide |
| 4241 | */ |
| 4242 | public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled"; |
| 4243 | |
| 4244 | /** |
| 4245 | * Whether the TTY mode mode is enabled. |
| 4246 | * 0 = disabled |
| 4247 | * 1 = enabled |
| 4248 | * @hide |
| 4249 | */ |
| 4250 | public static final String TTY_MODE_ENABLED = "tty_mode_enabled"; |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4251 | |
| 4252 | /** |
Christopher Tate | 8031a3d | 2009-07-06 16:36:05 -0700 | [diff] [blame] | 4253 | * Controls whether settings backup is enabled. |
Dianne Hackborn | cf09829 | 2009-07-01 19:55:20 -0700 | [diff] [blame] | 4254 | * Type: int ( 0 = disabled, 1 = enabled ) |
| 4255 | * @hide |
| 4256 | */ |
| 4257 | public static final String BACKUP_ENABLED = "backup_enabled"; |
| 4258 | |
| 4259 | /** |
Christopher Tate | cce9da5 | 2010-02-03 15:11:15 -0800 | [diff] [blame] | 4260 | * Controls whether application data is automatically restored from backup |
| 4261 | * at install time. |
| 4262 | * Type: int ( 0 = disabled, 1 = enabled ) |
| 4263 | * @hide |
| 4264 | */ |
| 4265 | public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore"; |
| 4266 | |
| 4267 | /** |
Christopher Tate | 8031a3d | 2009-07-06 16:36:05 -0700 | [diff] [blame] | 4268 | * Indicates whether settings backup has been fully provisioned. |
| 4269 | * Type: int ( 0 = unprovisioned, 1 = fully provisioned ) |
| 4270 | * @hide |
| 4271 | */ |
| 4272 | public static final String BACKUP_PROVISIONED = "backup_provisioned"; |
| 4273 | |
| 4274 | /** |
Dianne Hackborn | cf09829 | 2009-07-01 19:55:20 -0700 | [diff] [blame] | 4275 | * Component of the transport to use for backup/restore. |
| 4276 | * @hide |
| 4277 | */ |
| 4278 | public static final String BACKUP_TRANSPORT = "backup_transport"; |
Sanjay Jeyakumar | 21bf241 | 2009-07-09 13:31:48 -0700 | [diff] [blame] | 4279 | |
Dianne Hackborn | d7cd29d | 2009-07-01 11:22:45 -0700 | [diff] [blame] | 4280 | /** |
| 4281 | * Version for which the setup wizard was last shown. Bumped for |
| 4282 | * each release when there is new setup information to show. |
| 4283 | * @hide |
| 4284 | */ |
| 4285 | public static final String LAST_SETUP_SHOWN = "last_setup_shown"; |
Dianne Hackborn | cf09829 | 2009-07-01 19:55:20 -0700 | [diff] [blame] | 4286 | |
| 4287 | /** |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 4288 | * The interval in milliseconds after which Wi-Fi is considered idle. |
| 4289 | * When idle, it is possible for the device to be switched from Wi-Fi to |
| 4290 | * the mobile data network. |
| 4291 | * @hide |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 4292 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_IDLE_MS} |
| 4293 | * instead. |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 4294 | */ |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 4295 | @Deprecated |
| 4296 | public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS; |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 4297 | |
| 4298 | /** |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 4299 | * The global search provider chosen by the user (if multiple global |
| 4300 | * search providers are installed). This will be the provider returned |
| 4301 | * by {@link SearchManager#getGlobalSearchActivity()} if it's still |
| 4302 | * installed. This setting is stored as a flattened component name as |
| 4303 | * per {@link ComponentName#flattenToString()}. |
| 4304 | * |
| 4305 | * @hide |
| 4306 | */ |
| 4307 | public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY = |
| 4308 | "search_global_search_activity"; |
| 4309 | |
| 4310 | /** |
Doug Zongker | aed8f8e | 2010-01-07 18:07:50 -0800 | [diff] [blame] | 4311 | * The number of promoted sources in GlobalSearch. |
| 4312 | * @hide |
| 4313 | */ |
| 4314 | public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources"; |
| 4315 | /** |
| 4316 | * The maximum number of suggestions returned by GlobalSearch. |
| 4317 | * @hide |
| 4318 | */ |
| 4319 | public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display"; |
| 4320 | /** |
| 4321 | * The number of suggestions GlobalSearch will ask each non-web search source for. |
| 4322 | * @hide |
| 4323 | */ |
| 4324 | public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source"; |
| 4325 | /** |
| 4326 | * The number of suggestions the GlobalSearch will ask the web search source for. |
| 4327 | * @hide |
| 4328 | */ |
| 4329 | public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT = |
| 4330 | "search_web_results_override_limit"; |
| 4331 | /** |
| 4332 | * The number of milliseconds that GlobalSearch will wait for suggestions from |
| 4333 | * promoted sources before continuing with all other sources. |
| 4334 | * @hide |
| 4335 | */ |
| 4336 | public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS = |
| 4337 | "search_promoted_source_deadline_millis"; |
| 4338 | /** |
| 4339 | * The number of milliseconds before GlobalSearch aborts search suggesiton queries. |
| 4340 | * @hide |
| 4341 | */ |
| 4342 | public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis"; |
| 4343 | /** |
| 4344 | * The maximum number of milliseconds that GlobalSearch shows the previous results |
| 4345 | * after receiving a new query. |
| 4346 | * @hide |
| 4347 | */ |
| 4348 | public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis"; |
| 4349 | /** |
| 4350 | * The maximum age of log data used for shortcuts in GlobalSearch. |
| 4351 | * @hide |
| 4352 | */ |
| 4353 | public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis"; |
| 4354 | /** |
| 4355 | * The maximum age of log data used for source ranking in GlobalSearch. |
| 4356 | * @hide |
| 4357 | */ |
| 4358 | public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS = |
| 4359 | "search_max_source_event_age_millis"; |
| 4360 | /** |
| 4361 | * The minimum number of impressions needed to rank a source in GlobalSearch. |
| 4362 | * @hide |
| 4363 | */ |
| 4364 | public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING = |
| 4365 | "search_min_impressions_for_source_ranking"; |
| 4366 | /** |
| 4367 | * The minimum number of clicks needed to rank a source in GlobalSearch. |
| 4368 | * @hide |
| 4369 | */ |
| 4370 | public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING = |
| 4371 | "search_min_clicks_for_source_ranking"; |
| 4372 | /** |
| 4373 | * The maximum number of shortcuts shown by GlobalSearch. |
| 4374 | * @hide |
| 4375 | */ |
| 4376 | public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned"; |
| 4377 | /** |
| 4378 | * The size of the core thread pool for suggestion queries in GlobalSearch. |
| 4379 | * @hide |
| 4380 | */ |
| 4381 | public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE = |
| 4382 | "search_query_thread_core_pool_size"; |
| 4383 | /** |
| 4384 | * The maximum size of the thread pool for suggestion queries in GlobalSearch. |
| 4385 | * @hide |
| 4386 | */ |
| 4387 | public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE = |
| 4388 | "search_query_thread_max_pool_size"; |
| 4389 | /** |
| 4390 | * The size of the core thread pool for shortcut refreshing in GlobalSearch. |
| 4391 | * @hide |
| 4392 | */ |
| 4393 | public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE = |
| 4394 | "search_shortcut_refresh_core_pool_size"; |
| 4395 | /** |
| 4396 | * The maximum size of the thread pool for shortcut refreshing in GlobalSearch. |
| 4397 | * @hide |
| 4398 | */ |
| 4399 | public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE = |
| 4400 | "search_shortcut_refresh_max_pool_size"; |
| 4401 | /** |
| 4402 | * The maximun time that excess threads in the GlobalSeach thread pools will |
| 4403 | * wait before terminating. |
| 4404 | * @hide |
| 4405 | */ |
| 4406 | public static final String SEARCH_THREAD_KEEPALIVE_SECONDS = |
| 4407 | "search_thread_keepalive_seconds"; |
| 4408 | /** |
| 4409 | * The maximum number of concurrent suggestion queries to each source. |
| 4410 | * @hide |
| 4411 | */ |
| 4412 | public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT = |
| 4413 | "search_per_source_concurrent_query_limit"; |
| 4414 | |
San Mehat | 87734d3 | 2010-01-08 12:53:06 -0800 | [diff] [blame] | 4415 | /** |
| 4416 | * Whether or not alert sounds are played on MountService events. (0 = false, 1 = true) |
| 4417 | * @hide |
| 4418 | */ |
| 4419 | public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd"; |
| 4420 | |
| 4421 | /** |
| 4422 | * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true) |
| 4423 | * @hide |
| 4424 | */ |
| 4425 | public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart"; |
| 4426 | |
| 4427 | /** |
| 4428 | * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true) |
| 4429 | * @hide |
| 4430 | */ |
| 4431 | public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt"; |
| 4432 | |
| 4433 | /** |
| 4434 | * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true) |
| 4435 | * @hide |
| 4436 | */ |
| 4437 | public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled"; |
Doug Zongker | aed8f8e | 2010-01-07 18:07:50 -0800 | [diff] [blame] | 4438 | |
Dan Egnor | 42471dd | 2010-01-07 17:25:22 -0800 | [diff] [blame] | 4439 | /** |
| 4440 | * If nonzero, ANRs in invisible background processes bring up a dialog. |
| 4441 | * Otherwise, the process will be silently killed. |
| 4442 | * @hide |
| 4443 | */ |
| 4444 | public static final String ANR_SHOW_BACKGROUND = "anr_show_background"; |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 4445 | |
Mike LeBeau | 5d34e9b | 2010-02-10 19:34:56 -0800 | [diff] [blame] | 4446 | /** |
Selim Gurun | a83f1e3 | 2014-05-05 15:59:39 -0700 | [diff] [blame] | 4447 | * (Experimental). If nonzero, WebView uses data reduction proxy to save network |
| 4448 | * bandwidth. Otherwise, WebView does not use data reduction proxy. |
| 4449 | * @hide |
| 4450 | */ |
| 4451 | public static final String WEBVIEW_DATA_REDUCTION_PROXY = "webview_data_reduction_proxy"; |
| 4452 | |
| 4453 | /** |
Mike LeBeau | 5d34e9b | 2010-02-10 19:34:56 -0800 | [diff] [blame] | 4454 | * The {@link ComponentName} string of the service to be used as the voice recognition |
| 4455 | * service. |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 4456 | * |
Mike LeBeau | 5d34e9b | 2010-02-10 19:34:56 -0800 | [diff] [blame] | 4457 | * @hide |
| 4458 | */ |
| 4459 | public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service"; |
Dan Egnor | 42471dd | 2010-01-07 17:25:22 -0800 | [diff] [blame] | 4460 | |
William Luh | 623a428 | 2013-06-24 12:14:18 -0700 | [diff] [blame] | 4461 | /** |
| 4462 | * Stores whether an user has consented to have apps verified through PAM. |
| 4463 | * The value is boolean (1 or 0). |
| 4464 | * |
| 4465 | * @hide |
| 4466 | */ |
| 4467 | public static final String PACKAGE_VERIFIER_USER_CONSENT = |
| 4468 | "package_verifier_user_consent"; |
satok | 988323c | 2011-06-22 16:38:13 +0900 | [diff] [blame] | 4469 | |
| 4470 | /** |
satok | ada8c4e | 2011-08-23 14:56:56 +0900 | [diff] [blame] | 4471 | * The {@link ComponentName} string of the selected spell checker service which is |
| 4472 | * one of the services managed by the text service manager. |
| 4473 | * |
| 4474 | * @hide |
| 4475 | */ |
| 4476 | public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker"; |
| 4477 | |
| 4478 | /** |
| 4479 | * The {@link ComponentName} string of the selected subtype of the selected spell checker |
satok | 988323c | 2011-06-22 16:38:13 +0900 | [diff] [blame] | 4480 | * service which is one of the services managed by the text service manager. |
| 4481 | * |
| 4482 | * @hide |
| 4483 | */ |
satok | ada8c4e | 2011-08-23 14:56:56 +0900 | [diff] [blame] | 4484 | public static final String SELECTED_SPELL_CHECKER_SUBTYPE = |
| 4485 | "selected_spell_checker_subtype"; |
satok | 988323c | 2011-06-22 16:38:13 +0900 | [diff] [blame] | 4486 | |
Doug Zongker | aed8f8e | 2010-01-07 18:07:50 -0800 | [diff] [blame] | 4487 | /** |
satok | a33c4fc | 2011-08-25 16:50:11 +0900 | [diff] [blame] | 4488 | * The {@link ComponentName} string whether spell checker is enabled or not. |
| 4489 | * |
| 4490 | * @hide |
| 4491 | */ |
| 4492 | public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled"; |
| 4493 | |
| 4494 | /** |
David Brown | 458e806 | 2010-03-08 21:52:11 -0800 | [diff] [blame] | 4495 | * What happens when the user presses the Power button while in-call |
| 4496 | * and the screen is on.<br/> |
| 4497 | * <b>Values:</b><br/> |
| 4498 | * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/> |
| 4499 | * 2 - The Power button hangs up the current call.<br/> |
| 4500 | * |
| 4501 | * @hide |
| 4502 | */ |
| 4503 | public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior"; |
| 4504 | |
| 4505 | /** |
| 4506 | * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen". |
| 4507 | * @hide |
| 4508 | */ |
| 4509 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1; |
| 4510 | |
| 4511 | /** |
| 4512 | * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up". |
| 4513 | * @hide |
| 4514 | */ |
| 4515 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2; |
| 4516 | |
| 4517 | /** |
| 4518 | * INCALL_POWER_BUTTON_BEHAVIOR default value. |
| 4519 | * @hide |
| 4520 | */ |
| 4521 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT = |
| 4522 | INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF; |
| 4523 | |
| 4524 | /** |
Jeff Brown | a20dda4 | 2014-05-27 20:57:24 -0700 | [diff] [blame] | 4525 | * Whether the device should wake when the wake gesture sensor detects motion. |
| 4526 | * @hide |
| 4527 | */ |
| 4528 | public static final String WAKE_GESTURE_ENABLED = "wake_gesture_enabled"; |
| 4529 | |
| 4530 | /** |
Dianne Hackborn | 2ccda4d | 2010-03-22 21:49:15 -0700 | [diff] [blame] | 4531 | * The current night mode that has been selected by the user. Owned |
| 4532 | * and controlled by UiModeManagerService. Constants are as per |
| 4533 | * UiModeManager. |
| 4534 | * @hide |
| 4535 | */ |
| 4536 | public static final String UI_NIGHT_MODE = "ui_night_mode"; |
Suchi Amalapurapu | 40e4725 | 2010-04-07 16:15:50 -0700 | [diff] [blame] | 4537 | |
| 4538 | /** |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 4539 | * Whether screensavers are enabled. |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 4540 | * @hide |
| 4541 | */ |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 4542 | public static final String SCREENSAVER_ENABLED = "screensaver_enabled"; |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 4543 | |
| 4544 | /** |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 4545 | * The user's chosen screensaver components. |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 4546 | * |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 4547 | * These will be launched by the PhoneWindowManager after a timeout when not on |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 4548 | * battery, or upon dock insertion (if SCREENSAVER_ACTIVATE_ON_DOCK is set to 1). |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 4549 | * @hide |
| 4550 | */ |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 4551 | public static final String SCREENSAVER_COMPONENTS = "screensaver_components"; |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 4552 | |
| 4553 | /** |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 4554 | * If screensavers are enabled, whether the screensaver should be automatically launched |
| 4555 | * when the device is inserted into a (desk) dock. |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 4556 | * @hide |
| 4557 | */ |
| 4558 | public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock"; |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 4559 | |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 4560 | /** |
| 4561 | * If screensavers are enabled, whether the screensaver should be automatically launched |
| 4562 | * when the screen times out when not on battery. |
| 4563 | * @hide |
| 4564 | */ |
| 4565 | public static final String SCREENSAVER_ACTIVATE_ON_SLEEP = "screensaver_activate_on_sleep"; |
| 4566 | |
| 4567 | /** |
| 4568 | * If screensavers are enabled, the default screensaver component. |
| 4569 | * @hide |
| 4570 | */ |
| 4571 | public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component"; |
| 4572 | |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 4573 | /** |
Martijn Coenen | a739788 | 2013-07-30 20:07:47 -0700 | [diff] [blame] | 4574 | * The default NFC payment component |
| 4575 | * @hide |
| 4576 | */ |
| 4577 | public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component"; |
| 4578 | |
| 4579 | /** |
Martijn Coenen | 2f6f3a01 | 2014-04-25 17:00:21 -0700 | [diff] [blame] | 4580 | * Whether NFC payment is handled by the foreground application or a default. |
| 4581 | * @hide |
| 4582 | */ |
| 4583 | public static final String NFC_PAYMENT_FOREGROUND = "nfc_payment_foreground"; |
| 4584 | |
| 4585 | /** |
David Braun | f5d8319 | 2013-09-16 13:43:51 -0700 | [diff] [blame] | 4586 | * Specifies the package name currently configured to be the primary sms application |
| 4587 | * @hide |
| 4588 | */ |
| 4589 | public static final String SMS_DEFAULT_APPLICATION = "sms_default_application"; |
| 4590 | |
| 4591 | /** |
Daniel Sandler | 4b749ef | 2013-03-18 21:53:04 -0400 | [diff] [blame] | 4592 | * Name of a package that the current user has explicitly allowed to see all of that |
| 4593 | * user's notifications. |
| 4594 | * |
| 4595 | * @hide |
| 4596 | */ |
| 4597 | public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners"; |
| 4598 | |
John Spurlock | 7340fc8 | 2014-04-24 18:50:12 -0400 | [diff] [blame] | 4599 | /** |
| 4600 | * @hide |
| 4601 | */ |
| 4602 | public static final String ENABLED_CONDITION_PROVIDERS = "enabled_condition_providers"; |
| 4603 | |
John Spurlock | 5c45412 | 2013-06-17 07:35:46 -0400 | [diff] [blame] | 4604 | /** @hide */ |
| 4605 | public static final String BAR_SERVICE_COMPONENT = "bar_service_component"; |
| 4606 | |
John Spurlock | d67ec25 | 2013-09-05 11:31:54 -0400 | [diff] [blame] | 4607 | /** @hide */ |
John Spurlock | f1a3664 | 2013-10-12 17:50:42 -0400 | [diff] [blame] | 4608 | public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations"; |
John Spurlock | d67ec25 | 2013-09-05 11:31:54 -0400 | [diff] [blame] | 4609 | |
Yorke Lee | 647f8f3 | 2013-05-07 10:49:44 -0700 | [diff] [blame] | 4610 | /** |
Svetoslav | f43e851 | 2013-09-30 17:33:05 -0700 | [diff] [blame] | 4611 | * This is the query URI for finding a print service to install. |
| 4612 | * |
| 4613 | * @hide |
| 4614 | */ |
| 4615 | public static final String PRINT_SERVICE_SEARCH_URI = "print_service_search_uri"; |
| 4616 | |
| 4617 | /** |
| 4618 | * This is the query URI for finding a NFC payment service to install. |
| 4619 | * |
| 4620 | * @hide |
| 4621 | */ |
| 4622 | public static final String PAYMENT_SERVICE_SEARCH_URI = "payment_service_search_uri"; |
| 4623 | |
| 4624 | /** |
Amith Yamasani | 1e9c218 | 2014-06-11 17:25:51 -0700 | [diff] [blame] | 4625 | * If enabled, apps should try to skip any introductory hints on first launch. This might |
Amith Yamasani | 0c41639 | 2014-06-13 15:54:39 -0700 | [diff] [blame] | 4626 | * apply to users that are already familiar with the environment or temporary users. |
Amith Yamasani | 1e9c218 | 2014-06-11 17:25:51 -0700 | [diff] [blame] | 4627 | * <p> |
| 4628 | * Type : int (0 to show hints, 1 to skip showing hints) |
Amith Yamasani | 1e9c218 | 2014-06-11 17:25:51 -0700 | [diff] [blame] | 4629 | */ |
| 4630 | public static final String SKIP_FIRST_USE_HINTS = "skip_first_use_hints"; |
| 4631 | |
| 4632 | /** |
John Spurlock | aa5ee4d | 2014-07-25 13:05:12 -0400 | [diff] [blame] | 4633 | * Persisted playback time after a user confirmation of an unsafe volume level. |
| 4634 | * |
| 4635 | * @hide |
| 4636 | */ |
| 4637 | public static final String UNSAFE_VOLUME_MUSIC_ACTIVE_MS = "unsafe_volume_music_active_ms"; |
| 4638 | |
| 4639 | /** |
Svetoslav Ganov | a571a58 | 2011-09-20 18:32:20 -0700 | [diff] [blame] | 4640 | * This are the settings to be backed up. |
| 4641 | * |
| 4642 | * NOTE: Settings are backed up and restored in the order they appear |
| 4643 | * in this array. If you have one setting depending on another, |
| 4644 | * make sure that they are ordered appropriately. |
| 4645 | * |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4646 | * @hide |
| 4647 | */ |
| 4648 | public static final String[] SETTINGS_TO_BACKUP = { |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 4649 | BUGREPORT_IN_POWER_MENU, // moved to global |
Amith Yamasani | 8823c0a8 | 2009-07-07 14:30:17 -0700 | [diff] [blame] | 4650 | ALLOW_MOCK_LOCATION, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4651 | PARENTAL_CONTROL_ENABLED, |
| 4652 | PARENTAL_CONTROL_REDIRECT_URL, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 4653 | USB_MASS_STORAGE_ENABLED, // moved to global |
Svetoslav Ganov | 1cf70bb | 2012-08-06 10:53:34 -0700 | [diff] [blame] | 4654 | ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, |
| 4655 | ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE, |
| 4656 | ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE, |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 4657 | ACCESSIBILITY_SCRIPT_INJECTION, |
Christopher Tate | 14c2d79 | 2010-02-25 16:49:44 -0800 | [diff] [blame] | 4658 | BACKUP_AUTO_RESTORE, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4659 | ENABLED_ACCESSIBILITY_SERVICES, |
Svetoslav Ganov | 9a4c5cd | 2012-05-30 14:06:32 -0700 | [diff] [blame] | 4660 | TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES, |
Svetoslav Ganov | a28a16d | 2011-07-28 11:24:21 -0700 | [diff] [blame] | 4661 | TOUCH_EXPLORATION_ENABLED, |
Svetoslav Ganov | a571a58 | 2011-09-20 18:32:20 -0700 | [diff] [blame] | 4662 | ACCESSIBILITY_ENABLED, |
Svetoslav Ganov | 55f937a | 2011-12-05 11:42:07 -0800 | [diff] [blame] | 4663 | ACCESSIBILITY_SPEAK_PASSWORD, |
Chris Craik | cce47eb | 2014-07-16 15:12:15 -0700 | [diff] [blame] | 4664 | ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED, |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 4665 | ACCESSIBILITY_CAPTIONING_ENABLED, |
| 4666 | ACCESSIBILITY_CAPTIONING_LOCALE, |
| 4667 | ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR, |
| 4668 | ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR, |
| 4669 | ACCESSIBILITY_CAPTIONING_EDGE_TYPE, |
| 4670 | ACCESSIBILITY_CAPTIONING_EDGE_COLOR, |
| 4671 | ACCESSIBILITY_CAPTIONING_TYPEFACE, |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 4672 | ACCESSIBILITY_CAPTIONING_FONT_SCALE, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4673 | TTS_USE_DEFAULTS, |
| 4674 | TTS_DEFAULT_RATE, |
| 4675 | TTS_DEFAULT_PITCH, |
| 4676 | TTS_DEFAULT_SYNTH, |
| 4677 | TTS_DEFAULT_LANG, |
| 4678 | TTS_DEFAULT_COUNTRY, |
Charles Chen | ceffa15 | 2010-03-16 21:18:10 -0700 | [diff] [blame] | 4679 | TTS_ENABLED_PLUGINS, |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 4680 | TTS_DEFAULT_LOCALE, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 4681 | WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, // moved to global |
| 4682 | WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, // moved to global |
| 4683 | WIFI_NUM_OPEN_NETWORKS_KEPT, // moved to global |
San Mehat | 87734d3 | 2010-01-08 12:53:06 -0800 | [diff] [blame] | 4684 | MOUNT_PLAY_NOTIFICATION_SND, |
| 4685 | MOUNT_UMS_AUTOSTART, |
| 4686 | MOUNT_UMS_PROMPT, |
Dianne Hackborn | 2ccda4d | 2010-03-22 21:49:15 -0700 | [diff] [blame] | 4687 | MOUNT_UMS_NOTIFY_ENABLED, |
Yorke Lee | 35785bf | 2013-08-21 19:16:20 -0700 | [diff] [blame] | 4688 | UI_NIGHT_MODE |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4689 | }; |
| 4690 | |
| 4691 | /** |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4692 | * Helper method for determining if a location provider is enabled. |
Tom O'Neill | d575943 | 2013-09-11 11:03:03 -0700 | [diff] [blame] | 4693 | * |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4694 | * @param cr the content resolver to use |
| 4695 | * @param provider the location provider to query |
| 4696 | * @return true if the provider is enabled |
Tom O'Neill | d575943 | 2013-09-11 11:03:03 -0700 | [diff] [blame] | 4697 | * |
| 4698 | * @deprecated use {@link #LOCATION_MODE} or |
| 4699 | * {@link LocationManager#isProviderEnabled(String)} |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4700 | */ |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4701 | @Deprecated |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4702 | public static final boolean isLocationProviderEnabled(ContentResolver cr, String provider) { |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 4703 | return isLocationProviderEnabledForUser(cr, provider, UserHandle.myUserId()); |
| 4704 | } |
| 4705 | |
| 4706 | /** |
| 4707 | * Helper method for determining if a location provider is enabled. |
| 4708 | * @param cr the content resolver to use |
| 4709 | * @param provider the location provider to query |
| 4710 | * @param userId the userId to query |
| 4711 | * @return true if the provider is enabled |
Tom O'Neill | d575943 | 2013-09-11 11:03:03 -0700 | [diff] [blame] | 4712 | * @deprecated use {@link #LOCATION_MODE} or |
| 4713 | * {@link LocationManager#isProviderEnabled(String)} |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 4714 | * @hide |
| 4715 | */ |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4716 | @Deprecated |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 4717 | public static final boolean isLocationProviderEnabledForUser(ContentResolver cr, String provider, int userId) { |
| 4718 | String allowedProviders = Settings.Secure.getStringForUser(cr, |
| 4719 | LOCATION_PROVIDERS_ALLOWED, userId); |
Brad Fitzpatrick | 11fe181 | 2010-09-10 16:07:52 -0700 | [diff] [blame] | 4720 | return TextUtils.delimitedStringContains(allowedProviders, ',', provider); |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4721 | } |
| 4722 | |
| 4723 | /** |
| 4724 | * Thread-safe method for enabling or disabling a single location provider. |
| 4725 | * @param cr the content resolver to use |
| 4726 | * @param provider the location provider to enable or disable |
| 4727 | * @param enabled true if the provider should be enabled |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4728 | * @deprecated use {@link #putInt(ContentResolver, String, int)} and {@link #LOCATION_MODE} |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4729 | */ |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4730 | @Deprecated |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4731 | public static final void setLocationProviderEnabled(ContentResolver cr, |
| 4732 | String provider, boolean enabled) { |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 4733 | setLocationProviderEnabledForUser(cr, provider, enabled, UserHandle.myUserId()); |
| 4734 | } |
| 4735 | |
| 4736 | /** |
| 4737 | * Thread-safe method for enabling or disabling a single location provider. |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4738 | * |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 4739 | * @param cr the content resolver to use |
| 4740 | * @param provider the location provider to enable or disable |
| 4741 | * @param enabled true if the provider should be enabled |
| 4742 | * @param userId the userId for which to enable/disable providers |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4743 | * @return true if the value was set, false on database errors |
| 4744 | * @deprecated use {@link #putIntForUser(ContentResolver, String, int, int)} and |
| 4745 | * {@link #LOCATION_MODE} |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 4746 | * @hide |
| 4747 | */ |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4748 | @Deprecated |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4749 | public static final boolean setLocationProviderEnabledForUser(ContentResolver cr, |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 4750 | String provider, boolean enabled, int userId) { |
David Christie | 3f7b652 | 2013-08-06 19:19:08 -0700 | [diff] [blame] | 4751 | synchronized (mLocationSettingsLock) { |
| 4752 | // to ensure thread safety, we write the provider name with a '+' or '-' |
| 4753 | // and let the SettingsProvider handle it rather than reading and modifying |
| 4754 | // the list of enabled providers. |
| 4755 | if (enabled) { |
| 4756 | provider = "+" + provider; |
| 4757 | } else { |
| 4758 | provider = "-" + provider; |
| 4759 | } |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4760 | return putStringForUser(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider, |
David Christie | 3f7b652 | 2013-08-06 19:19:08 -0700 | [diff] [blame] | 4761 | userId); |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4762 | } |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4763 | } |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4764 | |
| 4765 | /** |
| 4766 | * Thread-safe method for setting the location mode to one of |
| 4767 | * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, |
| 4768 | * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. |
| 4769 | * |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4770 | * @param cr the content resolver to use |
| 4771 | * @param mode such as {@link #LOCATION_MODE_HIGH_ACCURACY} |
| 4772 | * @param userId the userId for which to change mode |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4773 | * @return true if the value was set, false on database errors |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4774 | * |
| 4775 | * @throws IllegalArgumentException if mode is not one of the supported values |
| 4776 | */ |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 4777 | private static final boolean setLocationModeForUser(ContentResolver cr, int mode, |
| 4778 | int userId) { |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4779 | synchronized (mLocationSettingsLock) { |
| 4780 | boolean gps = false; |
| 4781 | boolean network = false; |
| 4782 | switch (mode) { |
| 4783 | case LOCATION_MODE_OFF: |
| 4784 | break; |
| 4785 | case LOCATION_MODE_SENSORS_ONLY: |
| 4786 | gps = true; |
| 4787 | break; |
| 4788 | case LOCATION_MODE_BATTERY_SAVING: |
| 4789 | network = true; |
| 4790 | break; |
| 4791 | case LOCATION_MODE_HIGH_ACCURACY: |
| 4792 | gps = true; |
| 4793 | network = true; |
| 4794 | break; |
| 4795 | default: |
| 4796 | throw new IllegalArgumentException("Invalid location mode: " + mode); |
| 4797 | } |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4798 | boolean gpsSuccess = Settings.Secure.setLocationProviderEnabledForUser( |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4799 | cr, LocationManager.GPS_PROVIDER, gps, userId); |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4800 | boolean nlpSuccess = Settings.Secure.setLocationProviderEnabledForUser( |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4801 | cr, LocationManager.NETWORK_PROVIDER, network, userId); |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4802 | return gpsSuccess && nlpSuccess; |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4803 | } |
| 4804 | } |
| 4805 | |
| 4806 | /** |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4807 | * Thread-safe method for reading the location mode, returns one of |
| 4808 | * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, |
| 4809 | * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. |
| 4810 | * |
| 4811 | * @param cr the content resolver to use |
| 4812 | * @param userId the userId for which to read the mode |
| 4813 | * @return the location mode |
| 4814 | */ |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 4815 | private static final int getLocationModeForUser(ContentResolver cr, int userId) { |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4816 | synchronized (mLocationSettingsLock) { |
| 4817 | boolean gpsEnabled = Settings.Secure.isLocationProviderEnabledForUser( |
| 4818 | cr, LocationManager.GPS_PROVIDER, userId); |
| 4819 | boolean networkEnabled = Settings.Secure.isLocationProviderEnabledForUser( |
| 4820 | cr, LocationManager.NETWORK_PROVIDER, userId); |
| 4821 | if (gpsEnabled && networkEnabled) { |
| 4822 | return LOCATION_MODE_HIGH_ACCURACY; |
| 4823 | } else if (gpsEnabled) { |
| 4824 | return LOCATION_MODE_SENSORS_ONLY; |
| 4825 | } else if (networkEnabled) { |
| 4826 | return LOCATION_MODE_BATTERY_SAVING; |
| 4827 | } else { |
| 4828 | return LOCATION_MODE_OFF; |
| 4829 | } |
| 4830 | } |
| 4831 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4832 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4833 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4834 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4835 | * Global system settings, containing preferences that always apply identically |
| 4836 | * to all defined users. Applications can read these but are not allowed to write; |
| 4837 | * like the "Secure" settings, these are for preferences that the user must |
| 4838 | * explicitly modify through the system UI or specialized APIs for those values. |
| 4839 | */ |
| 4840 | public static final class Global extends NameValueTable { |
| 4841 | public static final String SYS_PROP_SETTING_VERSION = "sys.settings_global_version"; |
| 4842 | |
| 4843 | /** |
| 4844 | * The content:// style URL for global secure settings items. Not public. |
| 4845 | */ |
| 4846 | public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global"); |
| 4847 | |
| 4848 | /** |
Amith Yamasani | 23a0f05 | 2014-07-25 12:26:53 -0700 | [diff] [blame^] | 4849 | * Whether users are allowed to add more users or guest from lockscreen. |
| 4850 | * <p> |
| 4851 | * Type: int |
| 4852 | * @hide |
| 4853 | */ |
| 4854 | public static final String ADD_USERS_WHEN_LOCKED = "add_users_when_locked"; |
| 4855 | |
| 4856 | /** |
Svetoslav Ganov | 7befb7d | 2012-09-27 16:49:23 -0700 | [diff] [blame] | 4857 | * Setting whether the global gesture for enabling accessibility is enabled. |
| 4858 | * If this gesture is enabled the user will be able to perfrom it to enable |
| 4859 | * the accessibility state without visiting the settings app. |
| 4860 | * @hide |
| 4861 | */ |
| 4862 | public static final String ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED = |
| 4863 | "enable_accessibility_global_gesture_enabled"; |
| 4864 | |
| 4865 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4866 | * Whether Airplane Mode is on. |
| 4867 | */ |
| 4868 | public static final String AIRPLANE_MODE_ON = "airplane_mode_on"; |
| 4869 | |
| 4870 | /** |
| 4871 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio. |
| 4872 | */ |
| 4873 | public static final String RADIO_BLUETOOTH = "bluetooth"; |
| 4874 | |
| 4875 | /** |
| 4876 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio. |
| 4877 | */ |
| 4878 | public static final String RADIO_WIFI = "wifi"; |
| 4879 | |
| 4880 | /** |
| 4881 | * {@hide} |
| 4882 | */ |
| 4883 | public static final String RADIO_WIMAX = "wimax"; |
| 4884 | /** |
| 4885 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio. |
| 4886 | */ |
| 4887 | public static final String RADIO_CELL = "cell"; |
| 4888 | |
| 4889 | /** |
| 4890 | * Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio. |
| 4891 | */ |
| 4892 | public static final String RADIO_NFC = "nfc"; |
| 4893 | |
| 4894 | /** |
| 4895 | * A comma separated list of radios that need to be disabled when airplane mode |
| 4896 | * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are |
| 4897 | * included in the comma separated list. |
| 4898 | */ |
| 4899 | public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; |
| 4900 | |
| 4901 | /** |
| 4902 | * A comma separated list of radios that should to be disabled when airplane mode |
| 4903 | * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is |
| 4904 | * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi |
| 4905 | * will be turned off when entering airplane mode, but the user will be able to reenable |
| 4906 | * Wifi in the Settings app. |
| 4907 | * |
| 4908 | * {@hide} |
| 4909 | */ |
| 4910 | public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios"; |
| 4911 | |
| 4912 | /** |
| 4913 | * The policy for deciding when Wi-Fi should go to sleep (which will in |
| 4914 | * turn switch to using the mobile data as an Internet connection). |
| 4915 | * <p> |
| 4916 | * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT}, |
| 4917 | * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or |
| 4918 | * {@link #WIFI_SLEEP_POLICY_NEVER}. |
| 4919 | */ |
| 4920 | public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy"; |
| 4921 | |
| 4922 | /** |
| 4923 | * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep |
| 4924 | * policy, which is to sleep shortly after the turning off |
| 4925 | * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting. |
| 4926 | */ |
| 4927 | public static final int WIFI_SLEEP_POLICY_DEFAULT = 0; |
| 4928 | |
| 4929 | /** |
| 4930 | * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when |
| 4931 | * the device is on battery, and never go to sleep when the device is |
| 4932 | * plugged in. |
| 4933 | */ |
| 4934 | public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; |
| 4935 | |
| 4936 | /** |
| 4937 | * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep. |
| 4938 | */ |
| 4939 | public static final int WIFI_SLEEP_POLICY_NEVER = 2; |
| 4940 | |
| 4941 | /** |
| 4942 | * Value to specify if the user prefers the date, time and time zone |
| 4943 | * to be automatically fetched from the network (NITZ). 1=yes, 0=no |
| 4944 | */ |
| 4945 | public static final String AUTO_TIME = "auto_time"; |
| 4946 | |
| 4947 | /** |
| 4948 | * Value to specify if the user prefers the time zone |
| 4949 | * to be automatically fetched from the network (NITZ). 1=yes, 0=no |
| 4950 | */ |
| 4951 | public static final String AUTO_TIME_ZONE = "auto_time_zone"; |
| 4952 | |
| 4953 | /** |
| 4954 | * URI for the car dock "in" event sound. |
| 4955 | * @hide |
| 4956 | */ |
| 4957 | public static final String CAR_DOCK_SOUND = "car_dock_sound"; |
| 4958 | |
| 4959 | /** |
| 4960 | * URI for the car dock "out" event sound. |
| 4961 | * @hide |
| 4962 | */ |
| 4963 | public static final String CAR_UNDOCK_SOUND = "car_undock_sound"; |
| 4964 | |
| 4965 | /** |
| 4966 | * URI for the desk dock "in" event sound. |
| 4967 | * @hide |
| 4968 | */ |
| 4969 | public static final String DESK_DOCK_SOUND = "desk_dock_sound"; |
| 4970 | |
| 4971 | /** |
| 4972 | * URI for the desk dock "out" event sound. |
| 4973 | * @hide |
| 4974 | */ |
| 4975 | public static final String DESK_UNDOCK_SOUND = "desk_undock_sound"; |
| 4976 | |
| 4977 | /** |
| 4978 | * Whether to play a sound for dock events. |
| 4979 | * @hide |
| 4980 | */ |
| 4981 | public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled"; |
| 4982 | |
| 4983 | /** |
| 4984 | * URI for the "device locked" (keyguard shown) sound. |
| 4985 | * @hide |
| 4986 | */ |
| 4987 | public static final String LOCK_SOUND = "lock_sound"; |
| 4988 | |
| 4989 | /** |
| 4990 | * URI for the "device unlocked" sound. |
| 4991 | * @hide |
| 4992 | */ |
| 4993 | public static final String UNLOCK_SOUND = "unlock_sound"; |
| 4994 | |
| 4995 | /** |
| 4996 | * URI for the low battery sound file. |
| 4997 | * @hide |
| 4998 | */ |
| 4999 | public static final String LOW_BATTERY_SOUND = "low_battery_sound"; |
| 5000 | |
| 5001 | /** |
| 5002 | * Whether to play a sound for low-battery alerts. |
| 5003 | * @hide |
| 5004 | */ |
| 5005 | public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled"; |
| 5006 | |
| 5007 | /** |
Jeff Brown | 84e2756 | 2012-12-07 13:56:34 -0800 | [diff] [blame] | 5008 | * URI for the "wireless charging started" sound. |
| 5009 | * @hide |
| 5010 | */ |
| 5011 | public static final String WIRELESS_CHARGING_STARTED_SOUND = |
| 5012 | "wireless_charging_started_sound"; |
| 5013 | |
| 5014 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5015 | * Whether we keep the device on while the device is plugged in. |
| 5016 | * Supported values are: |
| 5017 | * <ul> |
| 5018 | * <li>{@code 0} to never stay on while plugged in</li> |
| 5019 | * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li> |
| 5020 | * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li> |
| 5021 | * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li> |
| 5022 | * </ul> |
| 5023 | * These values can be OR-ed together. |
| 5024 | */ |
| 5025 | public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; |
| 5026 | |
| 5027 | /** |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 5028 | * When the user has enable the option to have a "bug report" command |
| 5029 | * in the power menu. |
| 5030 | * @hide |
| 5031 | */ |
| 5032 | public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; |
| 5033 | |
| 5034 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5035 | * Whether ADB is enabled. |
| 5036 | */ |
| 5037 | public static final String ADB_ENABLED = "adb_enabled"; |
| 5038 | |
| 5039 | /** |
| 5040 | * Whether assisted GPS should be enabled or not. |
| 5041 | * @hide |
| 5042 | */ |
| 5043 | public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled"; |
| 5044 | |
| 5045 | /** |
| 5046 | * Whether bluetooth is enabled/disabled |
| 5047 | * 0=disabled. 1=enabled. |
| 5048 | */ |
| 5049 | public static final String BLUETOOTH_ON = "bluetooth_on"; |
| 5050 | |
| 5051 | /** |
| 5052 | * CDMA Cell Broadcast SMS |
| 5053 | * 0 = CDMA Cell Broadcast SMS disabled |
| 5054 | * 1 = CDMA Cell Broadcast SMS enabled |
| 5055 | * @hide |
| 5056 | */ |
| 5057 | public static final String CDMA_CELL_BROADCAST_SMS = |
| 5058 | "cdma_cell_broadcast_sms"; |
| 5059 | |
| 5060 | /** |
| 5061 | * The CDMA roaming mode 0 = Home Networks, CDMA default |
| 5062 | * 1 = Roaming on Affiliated networks |
| 5063 | * 2 = Roaming on any networks |
| 5064 | * @hide |
| 5065 | */ |
| 5066 | public static final String CDMA_ROAMING_MODE = "roaming_settings"; |
| 5067 | |
| 5068 | /** |
| 5069 | * The CDMA subscription mode 0 = RUIM/SIM (default) |
| 5070 | * 1 = NV |
| 5071 | * @hide |
| 5072 | */ |
| 5073 | public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode"; |
| 5074 | |
| 5075 | /** Inactivity timeout to track mobile data activity. |
| 5076 | * |
| 5077 | * If set to a positive integer, it indicates the inactivity timeout value in seconds to |
| 5078 | * infer the data activity of mobile network. After a period of no activity on mobile |
| 5079 | * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE} |
| 5080 | * intent is fired to indicate a transition of network status from "active" to "idle". Any |
| 5081 | * subsequent activity on mobile networks triggers the firing of {@code |
| 5082 | * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active". |
| 5083 | * |
| 5084 | * Network activity refers to transmitting or receiving data on the network interfaces. |
| 5085 | * |
| 5086 | * Tracking is disabled if set to zero or negative value. |
| 5087 | * |
| 5088 | * @hide |
| 5089 | */ |
| 5090 | public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile"; |
| 5091 | |
| 5092 | /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE} |
| 5093 | * but for Wifi network. |
| 5094 | * @hide |
| 5095 | */ |
| 5096 | public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi"; |
| 5097 | |
| 5098 | /** |
| 5099 | * Whether or not data roaming is enabled. (0 = false, 1 = true) |
| 5100 | */ |
| 5101 | public static final String DATA_ROAMING = "data_roaming"; |
| 5102 | |
| 5103 | /** |
Wink Saville | 75c1e69 | 2013-03-20 17:06:50 -0700 | [diff] [blame] | 5104 | * The value passed to a Mobile DataConnection via bringUp which defines the |
| 5105 | * number of retries to preform when setting up the initial connection. The default |
| 5106 | * value defined in DataConnectionTrackerBase#DEFAULT_MDC_INITIAL_RETRY is currently 1. |
| 5107 | * @hide |
| 5108 | */ |
| 5109 | public static final String MDC_INITIAL_MAX_RETRY = "mdc_initial_max_retry"; |
| 5110 | |
| 5111 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5112 | * Whether user has enabled development settings. |
| 5113 | */ |
| 5114 | public static final String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled"; |
| 5115 | |
| 5116 | /** |
| 5117 | * Whether the device has been provisioned (0 = false, 1 = true) |
| 5118 | */ |
| 5119 | public static final String DEVICE_PROVISIONED = "device_provisioned"; |
| 5120 | |
| 5121 | /** |
| 5122 | * The saved value for WindowManagerService.setForcedDisplayDensity(). |
| 5123 | * One integer in dpi. If unset, then use the real display density. |
| 5124 | * @hide |
| 5125 | */ |
| 5126 | public static final String DISPLAY_DENSITY_FORCED = "display_density_forced"; |
| 5127 | |
| 5128 | /** |
| 5129 | * The saved value for WindowManagerService.setForcedDisplaySize(). |
| 5130 | * Two integers separated by a comma. If unset, then use the real display size. |
| 5131 | * @hide |
| 5132 | */ |
| 5133 | public static final String DISPLAY_SIZE_FORCED = "display_size_forced"; |
| 5134 | |
| 5135 | /** |
| 5136 | * The maximum size, in bytes, of a download that the download manager will transfer over |
| 5137 | * a non-wifi connection. |
| 5138 | * @hide |
| 5139 | */ |
| 5140 | public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE = |
| 5141 | "download_manager_max_bytes_over_mobile"; |
| 5142 | |
| 5143 | /** |
| 5144 | * The recommended maximum size, in bytes, of a download that the download manager should |
| 5145 | * transfer over a non-wifi connection. Over this size, the use will be warned, but will |
| 5146 | * have the option to start the download over the mobile connection anyway. |
| 5147 | * @hide |
| 5148 | */ |
| 5149 | public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE = |
| 5150 | "download_manager_recommended_max_bytes_over_mobile"; |
| 5151 | |
| 5152 | /** |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 5153 | * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5154 | */ |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 5155 | @Deprecated |
| 5156 | public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5157 | |
| 5158 | /** |
Jinsuk Kim | b3d9177 | 2014-07-10 12:48:54 +0900 | [diff] [blame] | 5159 | * Whether HDMI control shall be enabled. If disabled, no CEC/MHL command will be |
| 5160 | * sent or processed. (0 = false, 1 = true) |
| 5161 | * @hide |
| 5162 | */ |
| 5163 | public static final String HDMI_CONTROL_ENABLED = "hdmi_control_enabled"; |
| 5164 | |
| 5165 | /** |
| 5166 | * Whether HDMI system audio is enabled. If enabled, TV internal speaker is muted, |
| 5167 | * and the output is redirected to AV Receiver connected via |
| 5168 | * {@Global#HDMI_SYSTEM_AUDIO_OUTPUT}. |
| 5169 | * @hide |
| 5170 | */ |
| 5171 | public static final String HDMI_SYSTEM_AUDIO_ENABLED = "hdmi_system_audio_enabled"; |
| 5172 | |
| 5173 | /** |
Jinsuk Kim | b3d9177 | 2014-07-10 12:48:54 +0900 | [diff] [blame] | 5174 | * Whether TV will automatically turn on upon reception of the CEC command |
| 5175 | * <Text View On> or <Image View On>. (0 = false, 1 = true) |
| 5176 | * @hide |
| 5177 | */ |
| 5178 | public static final String HDMI_CONTROL_AUTO_WAKEUP_ENABLED = |
| 5179 | "hdmi_control_auto_wakeup_enabled"; |
| 5180 | |
| 5181 | /** |
| 5182 | * Whether TV will also turn off other CEC devices when it goes to standby mode. |
| 5183 | * (0 = false, 1 = true) |
| 5184 | * @hide |
| 5185 | */ |
| 5186 | public static final String HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED = |
| 5187 | "hdmi_control_auto_device_off_enabled"; |
| 5188 | |
| 5189 | /** |
| 5190 | * Whether TV will switch to MHL port when a mobile device is plugged in. |
| 5191 | * (0 = false, 1 = true) |
| 5192 | * @hide |
| 5193 | */ |
| 5194 | public static final String MHL_INPUT_SWITCHING_ENABLED = "mhl_input_switching_enabled"; |
| 5195 | |
| 5196 | /** |
| 5197 | * Whether TV will charge the mobile device connected at MHL port. (0 = false, 1 = true) |
| 5198 | * @hide |
| 5199 | */ |
| 5200 | public static final String MHL_POWER_CHARGE_ENABLED = "mhl_power_charge_enabled"; |
| 5201 | |
| 5202 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5203 | * Whether mobile data connections are allowed by the user. See |
| 5204 | * ConnectivityManager for more info. |
| 5205 | * @hide |
| 5206 | */ |
| 5207 | public static final String MOBILE_DATA = "mobile_data"; |
| 5208 | |
| 5209 | /** {@hide} */ |
| 5210 | public static final String NETSTATS_ENABLED = "netstats_enabled"; |
| 5211 | /** {@hide} */ |
| 5212 | public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval"; |
| 5213 | /** {@hide} */ |
| 5214 | public static final String NETSTATS_TIME_CACHE_MAX_AGE = "netstats_time_cache_max_age"; |
| 5215 | /** {@hide} */ |
| 5216 | public static final String NETSTATS_GLOBAL_ALERT_BYTES = "netstats_global_alert_bytes"; |
| 5217 | /** {@hide} */ |
| 5218 | public static final String NETSTATS_SAMPLE_ENABLED = "netstats_sample_enabled"; |
| 5219 | /** {@hide} */ |
| 5220 | public static final String NETSTATS_REPORT_XT_OVER_DEV = "netstats_report_xt_over_dev"; |
| 5221 | |
| 5222 | /** {@hide} */ |
| 5223 | public static final String NETSTATS_DEV_BUCKET_DURATION = "netstats_dev_bucket_duration"; |
| 5224 | /** {@hide} */ |
| 5225 | public static final String NETSTATS_DEV_PERSIST_BYTES = "netstats_dev_persist_bytes"; |
| 5226 | /** {@hide} */ |
| 5227 | public static final String NETSTATS_DEV_ROTATE_AGE = "netstats_dev_rotate_age"; |
| 5228 | /** {@hide} */ |
| 5229 | public static final String NETSTATS_DEV_DELETE_AGE = "netstats_dev_delete_age"; |
| 5230 | |
| 5231 | /** {@hide} */ |
| 5232 | public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration"; |
| 5233 | /** {@hide} */ |
| 5234 | public static final String NETSTATS_UID_PERSIST_BYTES = "netstats_uid_persist_bytes"; |
| 5235 | /** {@hide} */ |
| 5236 | public static final String NETSTATS_UID_ROTATE_AGE = "netstats_uid_rotate_age"; |
| 5237 | /** {@hide} */ |
| 5238 | public static final String NETSTATS_UID_DELETE_AGE = "netstats_uid_delete_age"; |
| 5239 | |
| 5240 | /** {@hide} */ |
| 5241 | public static final String NETSTATS_UID_TAG_BUCKET_DURATION = "netstats_uid_tag_bucket_duration"; |
| 5242 | /** {@hide} */ |
| 5243 | public static final String NETSTATS_UID_TAG_PERSIST_BYTES = "netstats_uid_tag_persist_bytes"; |
| 5244 | /** {@hide} */ |
| 5245 | public static final String NETSTATS_UID_TAG_ROTATE_AGE = "netstats_uid_tag_rotate_age"; |
| 5246 | /** {@hide} */ |
| 5247 | public static final String NETSTATS_UID_TAG_DELETE_AGE = "netstats_uid_tag_delete_age"; |
| 5248 | |
| 5249 | /** |
| 5250 | * User preference for which network(s) should be used. Only the |
| 5251 | * connectivity service should touch this. |
| 5252 | */ |
| 5253 | public static final String NETWORK_PREFERENCE = "network_preference"; |
| 5254 | |
| 5255 | /** |
Jeff Davidson | dd6fd1e | 2014-04-14 15:14:30 -0700 | [diff] [blame] | 5256 | * Which package name to use for network scoring. If null, or if the package is not a valid |
| 5257 | * scorer app, external network scores will neither be requested nor accepted. |
| 5258 | * @hide |
| 5259 | */ |
| 5260 | public static final String NETWORK_SCORER_APP = "network_scorer_app"; |
| 5261 | |
| 5262 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5263 | * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment |
| 5264 | * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been |
| 5265 | * exceeded. |
| 5266 | * @hide |
| 5267 | */ |
| 5268 | public static final String NITZ_UPDATE_DIFF = "nitz_update_diff"; |
| 5269 | |
| 5270 | /** |
| 5271 | * The length of time in milli-seconds that automatic small adjustments to |
| 5272 | * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded. |
| 5273 | * @hide |
| 5274 | */ |
| 5275 | public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing"; |
| 5276 | |
| 5277 | /** Preferred NTP server. {@hide} */ |
| 5278 | public static final String NTP_SERVER = "ntp_server"; |
| 5279 | /** Timeout in milliseconds to wait for NTP server. {@hide} */ |
| 5280 | public static final String NTP_TIMEOUT = "ntp_timeout"; |
| 5281 | |
| 5282 | /** |
rich cannings | 4d8fc79 | 2012-09-07 14:43:43 -0700 | [diff] [blame] | 5283 | * Whether the package manager should send package verification broadcasts for verifiers to |
| 5284 | * review apps prior to installation. |
| 5285 | * 1 = request apps to be verified prior to installation, if a verifier exists. |
| 5286 | * 0 = do not verify apps before installation |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 5287 | * @hide |
rich cannings | 4d8fc79 | 2012-09-07 14:43:43 -0700 | [diff] [blame] | 5288 | */ |
| 5289 | public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable"; |
| 5290 | |
| 5291 | /** Timeout for package verification. |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 5292 | * @hide */ |
rich cannings | 4d8fc79 | 2012-09-07 14:43:43 -0700 | [diff] [blame] | 5293 | public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout"; |
| 5294 | |
| 5295 | /** Default response code for package verification. |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 5296 | * @hide */ |
rich cannings | 4d8fc79 | 2012-09-07 14:43:43 -0700 | [diff] [blame] | 5297 | public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response"; |
| 5298 | |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 5299 | /** |
| 5300 | * Show package verification setting in the Settings app. |
rich cannings | e6686b3 | 2012-09-16 14:02:20 -0700 | [diff] [blame] | 5301 | * 1 = show (default) |
| 5302 | * 0 = hide |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 5303 | * @hide |
rich cannings | e6686b3 | 2012-09-16 14:02:20 -0700 | [diff] [blame] | 5304 | */ |
| 5305 | public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible"; |
| 5306 | |
rich cannings | 4d8fc79 | 2012-09-07 14:43:43 -0700 | [diff] [blame] | 5307 | /** |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 5308 | * Run package verificaiton on apps installed through ADB/ADT/USB |
| 5309 | * 1 = perform package verification on ADB installs (default) |
| 5310 | * 0 = bypass package verification on ADB installs |
| 5311 | * @hide |
| 5312 | */ |
| 5313 | public static final String PACKAGE_VERIFIER_INCLUDE_ADB = "verifier_verify_adb_installs"; |
| 5314 | |
| 5315 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5316 | * The interval in milliseconds at which to check packet counts on the |
| 5317 | * mobile data interface when screen is on, to detect possible data |
| 5318 | * connection problems. |
| 5319 | * @hide |
| 5320 | */ |
| 5321 | public static final String PDP_WATCHDOG_POLL_INTERVAL_MS = |
| 5322 | "pdp_watchdog_poll_interval_ms"; |
| 5323 | |
| 5324 | /** |
| 5325 | * The interval in milliseconds at which to check packet counts on the |
| 5326 | * mobile data interface when screen is off, to detect possible data |
| 5327 | * connection problems. |
| 5328 | * @hide |
| 5329 | */ |
| 5330 | public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS = |
| 5331 | "pdp_watchdog_long_poll_interval_ms"; |
| 5332 | |
| 5333 | /** |
| 5334 | * The interval in milliseconds at which to check packet counts on the |
| 5335 | * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} |
| 5336 | * outgoing packets has been reached without incoming packets. |
| 5337 | * @hide |
| 5338 | */ |
| 5339 | public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS = |
| 5340 | "pdp_watchdog_error_poll_interval_ms"; |
| 5341 | |
| 5342 | /** |
| 5343 | * The number of outgoing packets sent without seeing an incoming packet |
| 5344 | * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT} |
| 5345 | * device is logged to the event log |
| 5346 | * @hide |
| 5347 | */ |
| 5348 | public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT = |
| 5349 | "pdp_watchdog_trigger_packet_count"; |
| 5350 | |
| 5351 | /** |
| 5352 | * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS}) |
| 5353 | * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before |
| 5354 | * attempting data connection recovery. |
| 5355 | * @hide |
| 5356 | */ |
| 5357 | public static final String PDP_WATCHDOG_ERROR_POLL_COUNT = |
| 5358 | "pdp_watchdog_error_poll_count"; |
| 5359 | |
| 5360 | /** |
| 5361 | * The number of failed PDP reset attempts before moving to something more |
| 5362 | * drastic: re-registering to the network. |
| 5363 | * @hide |
| 5364 | */ |
| 5365 | public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT = |
| 5366 | "pdp_watchdog_max_pdp_reset_fail_count"; |
| 5367 | |
| 5368 | /** |
| 5369 | * A positive value indicates how often the SamplingProfiler |
| 5370 | * should take snapshots. Zero value means SamplingProfiler |
| 5371 | * is disabled. |
| 5372 | * |
| 5373 | * @hide |
| 5374 | */ |
| 5375 | public static final String SAMPLING_PROFILER_MS = "sampling_profiler_ms"; |
| 5376 | |
| 5377 | /** |
| 5378 | * URL to open browser on to allow user to manage a prepay account |
| 5379 | * @hide |
| 5380 | */ |
| 5381 | public static final String SETUP_PREPAID_DATA_SERVICE_URL = |
| 5382 | "setup_prepaid_data_service_url"; |
| 5383 | |
| 5384 | /** |
| 5385 | * URL to attempt a GET on to see if this is a prepay device |
| 5386 | * @hide |
| 5387 | */ |
| 5388 | public static final String SETUP_PREPAID_DETECTION_TARGET_URL = |
| 5389 | "setup_prepaid_detection_target_url"; |
| 5390 | |
| 5391 | /** |
| 5392 | * Host to check for a redirect to after an attempt to GET |
| 5393 | * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there, |
| 5394 | * this is a prepaid device with zero balance.) |
| 5395 | * @hide |
| 5396 | */ |
| 5397 | public static final String SETUP_PREPAID_DETECTION_REDIR_HOST = |
| 5398 | "setup_prepaid_detection_redir_host"; |
| 5399 | |
| 5400 | /** |
Jake Hamby | 76a6142 | 2012-09-06 17:40:21 -0700 | [diff] [blame] | 5401 | * The interval in milliseconds at which to check the number of SMS sent out without asking |
| 5402 | * for use permit, to limit the un-authorized SMS usage. |
| 5403 | * |
| 5404 | * @hide |
| 5405 | */ |
| 5406 | public static final String SMS_OUTGOING_CHECK_INTERVAL_MS = |
| 5407 | "sms_outgoing_check_interval_ms"; |
| 5408 | |
| 5409 | /** |
| 5410 | * The number of outgoing SMS sent without asking for user permit (of {@link |
| 5411 | * #SMS_OUTGOING_CHECK_INTERVAL_MS} |
| 5412 | * |
| 5413 | * @hide |
| 5414 | */ |
| 5415 | public static final String SMS_OUTGOING_CHECK_MAX_COUNT = |
| 5416 | "sms_outgoing_check_max_count"; |
| 5417 | |
| 5418 | /** |
| 5419 | * Used to disable SMS short code confirmation - defaults to true. |
Robert Greenwalt | 026efcc | 2012-09-24 10:03:21 -0700 | [diff] [blame] | 5420 | * True indcates we will do the check, etc. Set to false to disable. |
Jake Hamby | 76a6142 | 2012-09-06 17:40:21 -0700 | [diff] [blame] | 5421 | * @see com.android.internal.telephony.SmsUsageMonitor |
| 5422 | * @hide |
| 5423 | */ |
| 5424 | public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation"; |
| 5425 | |
Robert Greenwalt | 026efcc | 2012-09-24 10:03:21 -0700 | [diff] [blame] | 5426 | /** |
| 5427 | * Used to select which country we use to determine premium sms codes. |
| 5428 | * One of com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_SIM, |
| 5429 | * com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_NETWORK, |
| 5430 | * or com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_BOTH. |
| 5431 | * @hide |
| 5432 | */ |
| 5433 | public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule"; |
| 5434 | |
Jake Hamby | 76a6142 | 2012-09-06 17:40:21 -0700 | [diff] [blame] | 5435 | /** |
JP Abgrall | 32d1ac4d | 2014-02-21 12:05:20 -0800 | [diff] [blame] | 5436 | * Used to select TCP's default initial receiver window size in segments - defaults to a build config value |
| 5437 | * @hide |
| 5438 | */ |
| 5439 | public static final String TCP_DEFAULT_INIT_RWND = "tcp_default_init_rwnd"; |
| 5440 | |
| 5441 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5442 | * Used to disable Tethering on a device - defaults to true |
| 5443 | * @hide |
| 5444 | */ |
| 5445 | public static final String TETHER_SUPPORTED = "tether_supported"; |
| 5446 | |
| 5447 | /** |
| 5448 | * Used to require DUN APN on the device or not - defaults to a build config value |
| 5449 | * which defaults to false |
| 5450 | * @hide |
| 5451 | */ |
| 5452 | public static final String TETHER_DUN_REQUIRED = "tether_dun_required"; |
| 5453 | |
| 5454 | /** |
| 5455 | * Used to hold a gservices-provisioned apn value for DUN. If set, or the |
| 5456 | * corresponding build config values are set it will override the APN DB |
| 5457 | * values. |
| 5458 | * Consists of a comma seperated list of strings: |
| 5459 | * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type" |
| 5460 | * note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" |
| 5461 | * @hide |
| 5462 | */ |
| 5463 | public static final String TETHER_DUN_APN = "tether_dun_apn"; |
| 5464 | |
| 5465 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5466 | * USB Mass Storage Enabled |
| 5467 | */ |
| 5468 | public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled"; |
| 5469 | |
| 5470 | /** |
| 5471 | * If this setting is set (to anything), then all references |
| 5472 | * to Gmail on the device must change to Google Mail. |
| 5473 | */ |
| 5474 | public static final String USE_GOOGLE_MAIL = "use_google_mail"; |
| 5475 | |
Selim Gurun | 178201f | 2014-05-16 11:38:44 -0700 | [diff] [blame] | 5476 | /** |
| 5477 | * Webview Data reduction proxy key. |
| 5478 | * @hide |
| 5479 | */ |
| 5480 | public static final String WEBVIEW_DATA_REDUCTION_PROXY_KEY = |
| 5481 | "webview_data_reduction_proxy_key"; |
| 5482 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5483 | /** |
Jeff Brown | 89d5546 | 2012-09-19 11:33:42 -0700 | [diff] [blame] | 5484 | * Whether Wifi display is enabled/disabled |
| 5485 | * 0=disabled. 1=enabled. |
| 5486 | * @hide |
| 5487 | */ |
| 5488 | public static final String WIFI_DISPLAY_ON = "wifi_display_on"; |
| 5489 | |
| 5490 | /** |
Chong Zhang | 1f3ecaa | 2013-05-03 15:55:36 -0700 | [diff] [blame] | 5491 | * Whether Wifi display certification mode is enabled/disabled |
| 5492 | * 0=disabled. 1=enabled. |
| 5493 | * @hide |
| 5494 | */ |
| 5495 | public static final String WIFI_DISPLAY_CERTIFICATION_ON = |
| 5496 | "wifi_display_certification_on"; |
| 5497 | |
| 5498 | /** |
Chong Zhang | e38af81 | 2013-08-29 17:25:17 -0700 | [diff] [blame] | 5499 | * WPS Configuration method used by Wifi display, this setting only |
| 5500 | * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled). |
| 5501 | * |
| 5502 | * Possible values are: |
| 5503 | * |
| 5504 | * WpsInfo.INVALID: use default WPS method chosen by framework |
| 5505 | * WpsInfo.PBC : use Push button |
| 5506 | * WpsInfo.KEYPAD : use Keypad |
| 5507 | * WpsInfo.DISPLAY: use Display |
| 5508 | * @hide |
| 5509 | */ |
| 5510 | public static final String WIFI_DISPLAY_WPS_CONFIG = |
| 5511 | "wifi_display_wps_config"; |
| 5512 | |
| 5513 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5514 | * Whether to notify the user of open networks. |
| 5515 | * <p> |
| 5516 | * If not connected and the scan results have an open network, we will |
| 5517 | * put this notification up. If we attempt to connect to a network or |
| 5518 | * the open network(s) disappear, we remove the notification. When we |
| 5519 | * show the notification, we will not show it again for |
| 5520 | * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time. |
| 5521 | */ |
| 5522 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 5523 | "wifi_networks_available_notification_on"; |
| 5524 | /** |
| 5525 | * {@hide} |
| 5526 | */ |
| 5527 | public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 5528 | "wimax_networks_available_notification_on"; |
| 5529 | |
| 5530 | /** |
| 5531 | * Delay (in seconds) before repeating the Wi-Fi networks available notification. |
| 5532 | * Connecting to a network will reset the timer. |
| 5533 | */ |
| 5534 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
| 5535 | "wifi_networks_available_repeat_delay"; |
| 5536 | |
| 5537 | /** |
Robert Greenwalt | 3ea0c99 | 2013-10-03 21:13:49 +0000 | [diff] [blame] | 5538 | * 802.11 country code in ISO 3166 format |
| 5539 | * @hide |
| 5540 | */ |
| 5541 | public static final String WIFI_COUNTRY_CODE = "wifi_country_code"; |
| 5542 | |
| 5543 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5544 | * The interval in milliseconds to issue wake up scans when wifi needs |
| 5545 | * to connect. This is necessary to connect to an access point when |
| 5546 | * device is on the move and the screen is off. |
| 5547 | * @hide |
| 5548 | */ |
| 5549 | public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS = |
| 5550 | "wifi_framework_scan_interval_ms"; |
| 5551 | |
| 5552 | /** |
| 5553 | * The interval in milliseconds after which Wi-Fi is considered idle. |
| 5554 | * When idle, it is possible for the device to be switched from Wi-Fi to |
| 5555 | * the mobile data network. |
| 5556 | * @hide |
| 5557 | */ |
| 5558 | public static final String WIFI_IDLE_MS = "wifi_idle_ms"; |
| 5559 | |
| 5560 | /** |
| 5561 | * When the number of open networks exceeds this number, the |
| 5562 | * least-recently-used excess networks will be removed. |
| 5563 | */ |
| 5564 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept"; |
| 5565 | |
| 5566 | /** |
| 5567 | * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this. |
| 5568 | */ |
| 5569 | public static final String WIFI_ON = "wifi_on"; |
| 5570 | |
| 5571 | /** |
Irfan Sheriff | 11aefad | 2013-03-06 07:57:41 -0800 | [diff] [blame] | 5572 | * Setting to allow scans to be enabled even wifi is turned off for connectivity. |
| 5573 | * @hide |
| 5574 | */ |
| 5575 | public static final String WIFI_SCAN_ALWAYS_AVAILABLE = |
| 5576 | "wifi_scan_always_enabled"; |
| 5577 | |
| 5578 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5579 | * Used to save the Wifi_ON state prior to tethering. |
| 5580 | * This state will be checked to restore Wifi after |
| 5581 | * the user turns off tethering. |
| 5582 | * |
| 5583 | * @hide |
| 5584 | */ |
| 5585 | public static final String WIFI_SAVED_STATE = "wifi_saved_state"; |
| 5586 | |
| 5587 | /** |
| 5588 | * The interval in milliseconds to scan as used by the wifi supplicant |
| 5589 | * @hide |
| 5590 | */ |
| 5591 | public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS = |
| 5592 | "wifi_supplicant_scan_interval_ms"; |
| 5593 | |
vandwalle | 7c3606c | 2014-03-31 19:12:07 -0700 | [diff] [blame] | 5594 | /** |
| 5595 | * whether frameworks handles wifi auto-join |
| 5596 | * @hide |
| 5597 | */ |
| 5598 | public static final String WIFI_ENHANCED_AUTO_JOIN = |
| 5599 | "wifi_enhanced_auto_join"; |
| 5600 | |
| 5601 | /** |
| 5602 | * whether settings show RSSI |
| 5603 | * @hide |
| 5604 | */ |
| 5605 | public static final String WIFI_NETWORK_SHOW_RSSI = |
| 5606 | "wifi_network_show_rssi"; |
| 5607 | |
| 5608 | /** |
Irfan Sheriff | 3809f50 | 2012-09-17 16:04:57 -0700 | [diff] [blame] | 5609 | * The interval in milliseconds to scan at supplicant when p2p is connected |
| 5610 | * @hide |
| 5611 | */ |
| 5612 | public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS = |
| 5613 | "wifi_scan_interval_p2p_connected_ms"; |
| 5614 | |
| 5615 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5616 | * Whether the Wi-Fi watchdog is enabled. |
| 5617 | */ |
| 5618 | public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; |
| 5619 | |
| 5620 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5621 | * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and |
| 5622 | * the setting needs to be set to 0 to disable it. |
| 5623 | * @hide |
| 5624 | */ |
| 5625 | public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED = |
| 5626 | "wifi_watchdog_poor_network_test_enabled"; |
| 5627 | |
| 5628 | /** |
| 5629 | * Setting to turn on suspend optimizations at screen off on Wi-Fi. Enabled by default and |
| 5630 | * needs to be set to 0 to disable it. |
| 5631 | * @hide |
| 5632 | */ |
| 5633 | public static final String WIFI_SUSPEND_OPTIMIZATIONS_ENABLED = |
| 5634 | "wifi_suspend_optimizations_enabled"; |
| 5635 | |
| 5636 | /** |
| 5637 | * The maximum number of times we will retry a connection to an access |
| 5638 | * point for which we have failed in acquiring an IP address from DHCP. |
| 5639 | * A value of N means that we will make N+1 connection attempts in all. |
| 5640 | */ |
| 5641 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; |
| 5642 | |
| 5643 | /** |
| 5644 | * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile |
| 5645 | * data connectivity to be established after a disconnect from Wi-Fi. |
| 5646 | */ |
| 5647 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
| 5648 | "wifi_mobile_data_transition_wakelock_timeout_ms"; |
| 5649 | |
| 5650 | /** |
| 5651 | * The operational wifi frequency band |
| 5652 | * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO}, |
| 5653 | * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or |
| 5654 | * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ} |
| 5655 | * |
| 5656 | * @hide |
| 5657 | */ |
| 5658 | public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band"; |
| 5659 | |
| 5660 | /** |
| 5661 | * The Wi-Fi peer-to-peer device name |
| 5662 | * @hide |
| 5663 | */ |
| 5664 | public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name"; |
| 5665 | |
| 5666 | /** |
Robert Greenwalt | c12783a | 2013-05-16 12:48:20 -0700 | [diff] [blame] | 5667 | * The min time between wifi disable and wifi enable |
| 5668 | * @hide |
| 5669 | */ |
| 5670 | public static final String WIFI_REENABLE_DELAY_MS = "wifi_reenable_delay"; |
| 5671 | |
| 5672 | /** |
Christopher Tate | c868b64 | 2012-09-12 17:41:04 -0700 | [diff] [blame] | 5673 | * The number of milliseconds to delay when checking for data stalls during |
| 5674 | * non-aggressive detection. (screen is turned off.) |
| 5675 | * @hide |
| 5676 | */ |
| 5677 | public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS = |
| 5678 | "data_stall_alarm_non_aggressive_delay_in_ms"; |
| 5679 | |
| 5680 | /** |
| 5681 | * The number of milliseconds to delay when checking for data stalls during |
| 5682 | * aggressive detection. (screen on or suspected data stall) |
| 5683 | * @hide |
| 5684 | */ |
| 5685 | public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS = |
| 5686 | "data_stall_alarm_aggressive_delay_in_ms"; |
| 5687 | |
| 5688 | /** |
Wink Saville | ce1e379 | 2013-09-03 16:41:44 -0700 | [diff] [blame] | 5689 | * The number of milliseconds to allow the provisioning apn to remain active |
| 5690 | * @hide |
| 5691 | */ |
| 5692 | public static final String PROVISIONING_APN_ALARM_DELAY_IN_MS = |
| 5693 | "provisioning_apn_alarm_delay_in_ms"; |
| 5694 | |
| 5695 | /** |
Christopher Tate | c868b64 | 2012-09-12 17:41:04 -0700 | [diff] [blame] | 5696 | * The interval in milliseconds at which to check gprs registration |
| 5697 | * after the first registration mismatch of gprs and voice service, |
| 5698 | * to detect possible data network registration problems. |
| 5699 | * |
| 5700 | * @hide |
| 5701 | */ |
| 5702 | public static final String GPRS_REGISTER_CHECK_PERIOD_MS = |
| 5703 | "gprs_register_check_period_ms"; |
| 5704 | |
| 5705 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5706 | * Nonzero causes Log.wtf() to crash. |
| 5707 | * @hide |
| 5708 | */ |
| 5709 | public static final String WTF_IS_FATAL = "wtf_is_fatal"; |
| 5710 | |
Eric Laurent | bc0fab1f | 2012-09-19 11:24:41 -0700 | [diff] [blame] | 5711 | /** |
| 5712 | * Ringer mode. This is used internally, changing this value will not |
| 5713 | * change the ringer mode. See AudioManager. |
| 5714 | */ |
| 5715 | public static final String MODE_RINGER = "mode_ringer"; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5716 | |
Jeff Brown | d493596 | 2012-09-25 13:27:20 -0700 | [diff] [blame] | 5717 | /** |
| 5718 | * Overlay display devices setting. |
| 5719 | * The associated value is a specially formatted string that describes the |
| 5720 | * size and density of simulated secondary display devices. |
| 5721 | * <p> |
| 5722 | * Format: {width}x{height}/{dpi};... |
| 5723 | * </p><p> |
| 5724 | * Example: |
| 5725 | * <ul> |
| 5726 | * <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li> |
| 5727 | * <li><code>1920x1080/320;1280x720/213</code>: make two overlays, the first |
| 5728 | * at 1080p and the second at 720p.</li> |
| 5729 | * <li>If the value is empty, then no overlay display devices are created.</li> |
| 5730 | * </ul></p> |
| 5731 | * |
| 5732 | * @hide |
| 5733 | */ |
| 5734 | public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices"; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5735 | |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 5736 | /** |
| 5737 | * Threshold values for the duration and level of a discharge cycle, |
| 5738 | * under which we log discharge cycle info. |
| 5739 | * |
| 5740 | * @hide |
| 5741 | */ |
| 5742 | public static final String |
| 5743 | BATTERY_DISCHARGE_DURATION_THRESHOLD = "battery_discharge_duration_threshold"; |
| 5744 | |
| 5745 | /** @hide */ |
| 5746 | public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold"; |
| 5747 | |
| 5748 | /** |
| 5749 | * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR |
| 5750 | * intents on application crashes and ANRs. If this is disabled, the |
| 5751 | * crash/ANR dialog will never display the "Report" button. |
| 5752 | * <p> |
| 5753 | * Type: int (0 = disallow, 1 = allow) |
| 5754 | * |
| 5755 | * @hide |
| 5756 | */ |
| 5757 | public static final String SEND_ACTION_APP_ERROR = "send_action_app_error"; |
| 5758 | |
| 5759 | /** |
| 5760 | * Maximum age of entries kept by {@link DropBoxManager}. |
| 5761 | * |
| 5762 | * @hide |
| 5763 | */ |
| 5764 | public static final String DROPBOX_AGE_SECONDS = "dropbox_age_seconds"; |
| 5765 | |
| 5766 | /** |
| 5767 | * Maximum number of entry files which {@link DropBoxManager} will keep |
| 5768 | * around. |
| 5769 | * |
| 5770 | * @hide |
| 5771 | */ |
| 5772 | public static final String DROPBOX_MAX_FILES = "dropbox_max_files"; |
| 5773 | |
| 5774 | /** |
| 5775 | * Maximum amount of disk space used by {@link DropBoxManager} no matter |
| 5776 | * what. |
| 5777 | * |
| 5778 | * @hide |
| 5779 | */ |
| 5780 | public static final String DROPBOX_QUOTA_KB = "dropbox_quota_kb"; |
| 5781 | |
| 5782 | /** |
| 5783 | * Percent of free disk (excluding reserve) which {@link DropBoxManager} |
| 5784 | * will use. |
| 5785 | * |
| 5786 | * @hide |
| 5787 | */ |
| 5788 | public static final String DROPBOX_QUOTA_PERCENT = "dropbox_quota_percent"; |
| 5789 | |
| 5790 | /** |
| 5791 | * Percent of total disk which {@link DropBoxManager} will never dip |
| 5792 | * into. |
| 5793 | * |
| 5794 | * @hide |
| 5795 | */ |
| 5796 | public static final String DROPBOX_RESERVE_PERCENT = "dropbox_reserve_percent"; |
| 5797 | |
| 5798 | /** |
| 5799 | * Prefix for per-tag dropbox disable/enable settings. |
| 5800 | * |
| 5801 | * @hide |
| 5802 | */ |
| 5803 | public static final String DROPBOX_TAG_PREFIX = "dropbox:"; |
| 5804 | |
| 5805 | /** |
| 5806 | * Lines of logcat to include with system crash/ANR/etc. reports, as a |
| 5807 | * prefix of the dropbox tag of the report type. For example, |
| 5808 | * "logcat_for_system_server_anr" controls the lines of logcat captured |
| 5809 | * with system server ANR reports. 0 to disable. |
| 5810 | * |
| 5811 | * @hide |
| 5812 | */ |
| 5813 | public static final String ERROR_LOGCAT_PREFIX = "logcat_for_"; |
| 5814 | |
| 5815 | /** |
| 5816 | * The interval in minutes after which the amount of free storage left |
| 5817 | * on the device is logged to the event log |
| 5818 | * |
| 5819 | * @hide |
| 5820 | */ |
| 5821 | public static final String SYS_FREE_STORAGE_LOG_INTERVAL = "sys_free_storage_log_interval"; |
| 5822 | |
| 5823 | /** |
| 5824 | * Threshold for the amount of change in disk free space required to |
| 5825 | * report the amount of free space. Used to prevent spamming the logs |
| 5826 | * when the disk free space isn't changing frequently. |
| 5827 | * |
| 5828 | * @hide |
| 5829 | */ |
| 5830 | public static final String |
| 5831 | DISK_FREE_CHANGE_REPORTING_THRESHOLD = "disk_free_change_reporting_threshold"; |
| 5832 | |
| 5833 | /** |
| 5834 | * Minimum percentage of free storage on the device that is used to |
| 5835 | * determine if the device is running low on storage. The default is 10. |
| 5836 | * <p> |
| 5837 | * Say this value is set to 10, the device is considered running low on |
| 5838 | * storage if 90% or more of the device storage is filled up. |
| 5839 | * |
| 5840 | * @hide |
| 5841 | */ |
| 5842 | public static final String |
| 5843 | SYS_STORAGE_THRESHOLD_PERCENTAGE = "sys_storage_threshold_percentage"; |
| 5844 | |
| 5845 | /** |
| 5846 | * Maximum byte size of the low storage threshold. This is to ensure |
| 5847 | * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in an |
| 5848 | * overly large threshold for large storage devices. Currently this must |
| 5849 | * be less than 2GB. This default is 500MB. |
| 5850 | * |
| 5851 | * @hide |
| 5852 | */ |
| 5853 | public static final String |
| 5854 | SYS_STORAGE_THRESHOLD_MAX_BYTES = "sys_storage_threshold_max_bytes"; |
| 5855 | |
| 5856 | /** |
| 5857 | * Minimum bytes of free storage on the device before the data partition |
| 5858 | * is considered full. By default, 1 MB is reserved to avoid system-wide |
| 5859 | * SQLite disk full exceptions. |
| 5860 | * |
| 5861 | * @hide |
| 5862 | */ |
| 5863 | public static final String |
| 5864 | SYS_STORAGE_FULL_THRESHOLD_BYTES = "sys_storage_full_threshold_bytes"; |
| 5865 | |
| 5866 | /** |
| 5867 | * The maximum reconnect delay for short network outages or when the |
| 5868 | * network is suspended due to phone use. |
| 5869 | * |
| 5870 | * @hide |
| 5871 | */ |
| 5872 | public static final String |
| 5873 | SYNC_MAX_RETRY_DELAY_IN_SECONDS = "sync_max_retry_delay_in_seconds"; |
| 5874 | |
| 5875 | /** |
| 5876 | * The number of milliseconds to delay before sending out |
| 5877 | * {@link ConnectivityManager#CONNECTIVITY_ACTION} broadcasts. |
| 5878 | * |
| 5879 | * @hide |
| 5880 | */ |
| 5881 | public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay"; |
| 5882 | |
Vinit Deshapnde | 1f12cb5 | 2013-08-21 13:09:01 -0700 | [diff] [blame] | 5883 | |
| 5884 | /** |
| 5885 | * Network sampling interval, in seconds. We'll generate link information |
| 5886 | * about bytes/packets sent and error rates based on data sampled in this interval |
| 5887 | * |
| 5888 | * @hide |
| 5889 | */ |
| 5890 | |
| 5891 | public static final String CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS = |
| 5892 | "connectivity_sampling_interval_in_seconds"; |
| 5893 | |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 5894 | /** |
Jason Monk | 602b232 | 2013-07-03 17:04:33 -0400 | [diff] [blame] | 5895 | * The series of successively longer delays used in retrying to download PAC file. |
| 5896 | * Last delay is used between successful PAC downloads. |
| 5897 | * |
| 5898 | * @hide |
| 5899 | */ |
| 5900 | public static final String PAC_CHANGE_DELAY = "pac_change_delay"; |
| 5901 | |
| 5902 | /** |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 5903 | * Setting to turn off captive portal detection. Feature is enabled by |
| 5904 | * default and the setting needs to be set to 0 to disable it. |
| 5905 | * |
| 5906 | * @hide |
| 5907 | */ |
| 5908 | public static final String |
| 5909 | CAPTIVE_PORTAL_DETECTION_ENABLED = "captive_portal_detection_enabled"; |
| 5910 | |
| 5911 | /** |
| 5912 | * The server used for captive portal detection upon a new conection. A |
| 5913 | * 204 response code from the server is used for validation. |
| 5914 | * |
| 5915 | * @hide |
| 5916 | */ |
| 5917 | public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server"; |
| 5918 | |
| 5919 | /** |
| 5920 | * Whether network service discovery is enabled. |
| 5921 | * |
| 5922 | * @hide |
| 5923 | */ |
| 5924 | public static final String NSD_ON = "nsd_on"; |
| 5925 | |
| 5926 | /** |
| 5927 | * Let user pick default install location. |
| 5928 | * |
| 5929 | * @hide |
| 5930 | */ |
| 5931 | public static final String SET_INSTALL_LOCATION = "set_install_location"; |
| 5932 | |
| 5933 | /** |
| 5934 | * Default install location value. |
| 5935 | * 0 = auto, let system decide |
| 5936 | * 1 = internal |
| 5937 | * 2 = sdcard |
| 5938 | * @hide |
| 5939 | */ |
| 5940 | public static final String DEFAULT_INSTALL_LOCATION = "default_install_location"; |
| 5941 | |
| 5942 | /** |
| 5943 | * ms during which to consume extra events related to Inet connection |
| 5944 | * condition after a transtion to fully-connected |
| 5945 | * |
| 5946 | * @hide |
| 5947 | */ |
| 5948 | public static final String |
| 5949 | INET_CONDITION_DEBOUNCE_UP_DELAY = "inet_condition_debounce_up_delay"; |
| 5950 | |
| 5951 | /** |
| 5952 | * ms during which to consume extra events related to Inet connection |
| 5953 | * condtion after a transtion to partly-connected |
| 5954 | * |
| 5955 | * @hide |
| 5956 | */ |
| 5957 | public static final String |
| 5958 | INET_CONDITION_DEBOUNCE_DOWN_DELAY = "inet_condition_debounce_down_delay"; |
| 5959 | |
| 5960 | /** {@hide} */ |
| 5961 | public static final String |
| 5962 | READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default"; |
| 5963 | |
| 5964 | /** |
| 5965 | * Host name and port for global http proxy. Uses ':' seperator for |
| 5966 | * between host and port. |
| 5967 | */ |
| 5968 | public static final String HTTP_PROXY = "http_proxy"; |
| 5969 | |
| 5970 | /** |
| 5971 | * Host name for global http proxy. Set via ConnectivityManager. |
| 5972 | * |
| 5973 | * @hide |
| 5974 | */ |
| 5975 | public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host"; |
| 5976 | |
| 5977 | /** |
| 5978 | * Integer host port for global http proxy. Set via ConnectivityManager. |
| 5979 | * |
| 5980 | * @hide |
| 5981 | */ |
| 5982 | public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port"; |
| 5983 | |
| 5984 | /** |
| 5985 | * Exclusion list for global proxy. This string contains a list of |
| 5986 | * comma-separated domains where the global proxy does not apply. |
| 5987 | * Domains should be listed in a comma- separated list. Example of |
| 5988 | * acceptable formats: ".domain1.com,my.domain2.com" Use |
| 5989 | * ConnectivityManager to set/get. |
| 5990 | * |
| 5991 | * @hide |
| 5992 | */ |
| 5993 | public static final String |
| 5994 | GLOBAL_HTTP_PROXY_EXCLUSION_LIST = "global_http_proxy_exclusion_list"; |
| 5995 | |
| 5996 | /** |
Jason Monk | 602b232 | 2013-07-03 17:04:33 -0400 | [diff] [blame] | 5997 | * The location PAC File for the proxy. |
| 5998 | * @hide |
| 5999 | */ |
| 6000 | public static final String |
| 6001 | GLOBAL_HTTP_PROXY_PAC = "global_proxy_pac_url"; |
| 6002 | |
| 6003 | /** |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 6004 | * Enables the UI setting to allow the user to specify the global HTTP |
| 6005 | * proxy and associated exclusion list. |
| 6006 | * |
| 6007 | * @hide |
| 6008 | */ |
| 6009 | public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy"; |
| 6010 | |
| 6011 | /** |
| 6012 | * Setting for default DNS in case nobody suggests one |
| 6013 | * |
| 6014 | * @hide |
| 6015 | */ |
| 6016 | public static final String DEFAULT_DNS_SERVER = "default_dns_server"; |
| 6017 | |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 6018 | /** {@hide} */ |
| 6019 | public static final String |
| 6020 | BLUETOOTH_HEADSET_PRIORITY_PREFIX = "bluetooth_headset_priority_"; |
| 6021 | /** {@hide} */ |
| 6022 | public static final String |
| 6023 | BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX = "bluetooth_a2dp_sink_priority_"; |
| 6024 | /** {@hide} */ |
| 6025 | public static final String |
| 6026 | BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX = "bluetooth_input_device_priority_"; |
Kim Schulz | 0d37605 | 2013-08-22 11:18:02 +0200 | [diff] [blame] | 6027 | /** {@hide} */ |
| 6028 | public static final String |
| 6029 | BLUETOOTH_MAP_PRIORITY_PREFIX = "bluetooth_map_priority_"; |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 6030 | |
| 6031 | /** |
| 6032 | * Get the key that retrieves a bluetooth headset's priority. |
| 6033 | * @hide |
| 6034 | */ |
| 6035 | public static final String getBluetoothHeadsetPriorityKey(String address) { |
Elliott Hughes | cb64d43 | 2013-08-02 10:00:44 -0700 | [diff] [blame] | 6036 | return BLUETOOTH_HEADSET_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 6037 | } |
| 6038 | |
| 6039 | /** |
| 6040 | * Get the key that retrieves a bluetooth a2dp sink's priority. |
| 6041 | * @hide |
| 6042 | */ |
| 6043 | public static final String getBluetoothA2dpSinkPriorityKey(String address) { |
Elliott Hughes | cb64d43 | 2013-08-02 10:00:44 -0700 | [diff] [blame] | 6044 | return BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 6045 | } |
| 6046 | |
| 6047 | /** |
| 6048 | * Get the key that retrieves a bluetooth Input Device's priority. |
| 6049 | * @hide |
| 6050 | */ |
| 6051 | public static final String getBluetoothInputDevicePriorityKey(String address) { |
Elliott Hughes | cb64d43 | 2013-08-02 10:00:44 -0700 | [diff] [blame] | 6052 | return BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 6053 | } |
| 6054 | |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 6055 | /** |
Kim Schulz | 0d37605 | 2013-08-22 11:18:02 +0200 | [diff] [blame] | 6056 | * Get the key that retrieves a bluetooth map priority. |
| 6057 | * @hide |
| 6058 | */ |
| 6059 | public static final String getBluetoothMapPriorityKey(String address) { |
| 6060 | return BLUETOOTH_MAP_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
| 6061 | } |
| 6062 | /** |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 6063 | * Scaling factor for normal window animations. Setting to 0 will |
| 6064 | * disable window animations. |
| 6065 | */ |
| 6066 | public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale"; |
| 6067 | |
| 6068 | /** |
| 6069 | * Scaling factor for activity transition animations. Setting to 0 will |
| 6070 | * disable window animations. |
| 6071 | */ |
| 6072 | public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; |
| 6073 | |
| 6074 | /** |
| 6075 | * Scaling factor for Animator-based animations. This affects both the |
| 6076 | * start delay and duration of all such animations. Setting to 0 will |
| 6077 | * cause animations to end immediately. The default value is 1. |
| 6078 | */ |
| 6079 | public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; |
| 6080 | |
| 6081 | /** |
| 6082 | * Scaling factor for normal window animations. Setting to 0 will |
| 6083 | * disable window animations. |
| 6084 | * |
| 6085 | * @hide |
| 6086 | */ |
| 6087 | public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations"; |
| 6088 | |
| 6089 | /** |
| 6090 | * If 0, the compatibility mode is off for all applications. |
| 6091 | * If 1, older applications run under compatibility mode. |
| 6092 | * TODO: remove this settings before code freeze (bug/1907571) |
| 6093 | * @hide |
| 6094 | */ |
| 6095 | public static final String COMPATIBILITY_MODE = "compatibility_mode"; |
| 6096 | |
| 6097 | /** |
| 6098 | * CDMA only settings |
| 6099 | * Emergency Tone 0 = Off |
| 6100 | * 1 = Alert |
| 6101 | * 2 = Vibrate |
| 6102 | * @hide |
| 6103 | */ |
| 6104 | public static final String EMERGENCY_TONE = "emergency_tone"; |
| 6105 | |
| 6106 | /** |
| 6107 | * CDMA only settings |
| 6108 | * Whether the auto retry is enabled. The value is |
| 6109 | * boolean (1 or 0). |
| 6110 | * @hide |
| 6111 | */ |
| 6112 | public static final String CALL_AUTO_RETRY = "call_auto_retry"; |
| 6113 | |
| 6114 | /** |
| 6115 | * The preferred network mode 7 = Global |
| 6116 | * 6 = EvDo only |
| 6117 | * 5 = CDMA w/o EvDo |
| 6118 | * 4 = CDMA / EvDo auto |
| 6119 | * 3 = GSM / WCDMA auto |
| 6120 | * 2 = WCDMA only |
| 6121 | * 1 = GSM only |
| 6122 | * 0 = GSM / WCDMA preferred |
| 6123 | * @hide |
| 6124 | */ |
| 6125 | public static final String PREFERRED_NETWORK_MODE = |
| 6126 | "preferred_network_mode"; |
| 6127 | |
| 6128 | /** |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 6129 | * Name of an application package to be debugged. |
| 6130 | */ |
| 6131 | public static final String DEBUG_APP = "debug_app"; |
| 6132 | |
| 6133 | /** |
| 6134 | * If 1, when launching DEBUG_APP it will wait for the debugger before |
| 6135 | * starting user code. If 0, it will run normally. |
| 6136 | */ |
| 6137 | public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger"; |
| 6138 | |
| 6139 | /** |
| 6140 | * Control whether the process CPU usage meter should be shown. |
| 6141 | */ |
| 6142 | public static final String SHOW_PROCESSES = "show_processes"; |
| 6143 | |
| 6144 | /** |
Ruchi Kandoi | 62b8a49 | 2014-04-17 18:01:40 -0700 | [diff] [blame] | 6145 | * If 1 low power mode is enabled. |
| 6146 | * @hide |
| 6147 | */ |
| 6148 | public static final String LOW_POWER_MODE = "low_power"; |
| 6149 | |
John Spurlock | f8f524c | 2014-06-10 14:47:29 -0400 | [diff] [blame] | 6150 | /** |
| 6151 | * Battery level [1-99] at which low power mode automatically turns on. |
Dianne Hackborn | 1427230 | 2014-06-10 23:13:02 -0700 | [diff] [blame] | 6152 | * If 0, it will not automatically turn on. |
John Spurlock | f8f524c | 2014-06-10 14:47:29 -0400 | [diff] [blame] | 6153 | * @hide |
| 6154 | */ |
| 6155 | public static final String LOW_POWER_MODE_TRIGGER_LEVEL = "low_power_trigger_level"; |
| 6156 | |
Ruchi Kandoi | 62b8a49 | 2014-04-17 18:01:40 -0700 | [diff] [blame] | 6157 | /** |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 6158 | * If 1, the activity manager will aggressively finish activities and |
| 6159 | * processes as soon as they are no longer needed. If 0, the normal |
| 6160 | * extended lifetime is used. |
| 6161 | */ |
| 6162 | public static final String ALWAYS_FINISH_ACTIVITIES = |
| 6163 | "always_finish_activities"; |
| 6164 | |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 6165 | /** |
Eric Laurent | 7ee1e4f | 2012-10-26 18:11:21 -0700 | [diff] [blame] | 6166 | * Use Dock audio output for media: |
| 6167 | * 0 = disabled |
| 6168 | * 1 = enabled |
| 6169 | * @hide |
| 6170 | */ |
| 6171 | public static final String DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled"; |
| 6172 | |
| 6173 | /** |
Eric Laurent | 05274f3 | 2012-11-29 12:48:18 -0800 | [diff] [blame] | 6174 | * Persisted safe headphone volume management state by AudioService |
| 6175 | * @hide |
| 6176 | */ |
| 6177 | public static final String AUDIO_SAFE_VOLUME_STATE = "audio_safe_volume_state"; |
| 6178 | |
| 6179 | /** |
Geremy Condra | a073511 | 2013-03-26 21:49:26 -0700 | [diff] [blame] | 6180 | * URL for tzinfo (time zone) updates |
| 6181 | * @hide |
| 6182 | */ |
| 6183 | public static final String TZINFO_UPDATE_CONTENT_URL = "tzinfo_content_url"; |
| 6184 | |
| 6185 | /** |
| 6186 | * URL for tzinfo (time zone) update metadata |
| 6187 | * @hide |
| 6188 | */ |
| 6189 | public static final String TZINFO_UPDATE_METADATA_URL = "tzinfo_metadata_url"; |
| 6190 | |
| 6191 | /** |
| 6192 | * URL for selinux (mandatory access control) updates |
| 6193 | * @hide |
| 6194 | */ |
| 6195 | public static final String SELINUX_UPDATE_CONTENT_URL = "selinux_content_url"; |
| 6196 | |
| 6197 | /** |
| 6198 | * URL for selinux (mandatory access control) update metadata |
| 6199 | * @hide |
| 6200 | */ |
| 6201 | public static final String SELINUX_UPDATE_METADATA_URL = "selinux_metadata_url"; |
| 6202 | |
| 6203 | /** |
| 6204 | * URL for sms short code updates |
| 6205 | * @hide |
| 6206 | */ |
| 6207 | public static final String SMS_SHORT_CODES_UPDATE_CONTENT_URL = |
| 6208 | "sms_short_codes_content_url"; |
| 6209 | |
| 6210 | /** |
| 6211 | * URL for sms short code update metadata |
| 6212 | * @hide |
| 6213 | */ |
| 6214 | public static final String SMS_SHORT_CODES_UPDATE_METADATA_URL = |
| 6215 | "sms_short_codes_metadata_url"; |
| 6216 | |
| 6217 | /** |
| 6218 | * URL for cert pinlist updates |
| 6219 | * @hide |
| 6220 | */ |
| 6221 | public static final String CERT_PIN_UPDATE_CONTENT_URL = "cert_pin_content_url"; |
| 6222 | |
| 6223 | /** |
| 6224 | * URL for cert pinlist updates |
| 6225 | * @hide |
| 6226 | */ |
| 6227 | public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url"; |
| 6228 | |
Geremy Condra | 757ee52 | 2013-03-29 16:39:45 -0700 | [diff] [blame] | 6229 | /** |
Ben Gruver | 633dc9b | 2013-04-04 12:05:49 -0700 | [diff] [blame] | 6230 | * URL for intent firewall updates |
| 6231 | * @hide |
| 6232 | */ |
| 6233 | public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL = |
| 6234 | "intent_firewall_content_url"; |
| 6235 | |
| 6236 | /** |
| 6237 | * URL for intent firewall update metadata |
| 6238 | * @hide |
| 6239 | */ |
| 6240 | public static final String INTENT_FIREWALL_UPDATE_METADATA_URL = |
| 6241 | "intent_firewall_metadata_url"; |
| 6242 | |
| 6243 | /** |
Geremy Condra | 4e7f7e8 | 2013-03-26 21:09:01 -0700 | [diff] [blame] | 6244 | * SELinux enforcement status. If 0, permissive; if 1, enforcing. |
| 6245 | * @hide |
| 6246 | */ |
| 6247 | public static final String SELINUX_STATUS = "selinux_status"; |
| 6248 | |
Geremy Condra | a073511 | 2013-03-26 21:49:26 -0700 | [diff] [blame] | 6249 | /** |
Amith Yamasani | d8415f4 | 2013-08-07 20:15:10 -0700 | [diff] [blame] | 6250 | * Developer setting to force RTL layout. |
| 6251 | * @hide |
| 6252 | */ |
| 6253 | public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl"; |
| 6254 | |
| 6255 | /** |
Daniel Sandler | dea6462 | 2013-09-23 16:05:57 -0400 | [diff] [blame] | 6256 | * Milliseconds after screen-off after which low battery sounds will be silenced. |
| 6257 | * |
| 6258 | * If zero, battery sounds will always play. |
| 6259 | * Defaults to @integer/def_low_battery_sound_timeout in SettingsProvider. |
| 6260 | * |
| 6261 | * @hide |
| 6262 | */ |
| 6263 | public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout"; |
| 6264 | |
| 6265 | /** |
Evan Charlton | cc7b043 | 2014-01-14 14:47:11 -0800 | [diff] [blame] | 6266 | * Milliseconds to wait before bouncing Wi-Fi after settings is restored. Note that after |
| 6267 | * the caller is done with this, they should call {@link ContentResolver#delete(Uri)} to |
| 6268 | * clean up any value that they may have written. |
| 6269 | * |
| 6270 | * @hide |
| 6271 | */ |
| 6272 | public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms"; |
| 6273 | |
John Spurlock | c6d1c60 | 2014-01-17 15:22:06 -0500 | [diff] [blame] | 6274 | /** |
| 6275 | * Defines global runtime overrides to window policy. |
| 6276 | * |
| 6277 | * See {@link com.android.internal.policy.impl.PolicyControl} for value format. |
| 6278 | * |
| 6279 | * @hide |
| 6280 | */ |
| 6281 | public static final String POLICY_CONTROL = "policy_control"; |
Evan Charlton | cc7b043 | 2014-01-14 14:47:11 -0800 | [diff] [blame] | 6282 | |
Dan Sandler | 5d7c3cc | 2014-02-18 17:35:15 -0500 | [diff] [blame] | 6283 | |
| 6284 | /** |
| 6285 | * This preference enables notification display even over a securely |
| 6286 | * locked screen. |
| 6287 | * @hide |
| 6288 | */ |
| 6289 | public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = |
| 6290 | "lock_screen_show_notifications"; |
| 6291 | |
Evan Charlton | cc7b043 | 2014-01-14 14:47:11 -0800 | [diff] [blame] | 6292 | /** |
John Spurlock | ae641c9 | 2014-06-30 18:11:40 -0400 | [diff] [blame] | 6293 | * Defines global zen mode. ZEN_MODE_OFF, ZEN_MODE_IMPORTANT_INTERRUPTIONS, |
| 6294 | * or ZEN_MODE_NO_INTERRUPTIONS. |
John Spurlock | e677d71 | 2014-02-13 12:52:19 -0500 | [diff] [blame] | 6295 | * |
| 6296 | * @hide |
| 6297 | */ |
| 6298 | public static final String ZEN_MODE = "zen_mode"; |
| 6299 | |
| 6300 | /** @hide */ public static final int ZEN_MODE_OFF = 0; |
John Spurlock | ae641c9 | 2014-06-30 18:11:40 -0400 | [diff] [blame] | 6301 | /** @hide */ public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; |
| 6302 | /** @hide */ public static final int ZEN_MODE_NO_INTERRUPTIONS = 2; |
John Spurlock | e677d71 | 2014-02-13 12:52:19 -0500 | [diff] [blame] | 6303 | |
| 6304 | /** @hide */ public static String zenModeToString(int mode) { |
John Spurlock | ae641c9 | 2014-06-30 18:11:40 -0400 | [diff] [blame] | 6305 | if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS"; |
| 6306 | if (mode == ZEN_MODE_NO_INTERRUPTIONS) return "ZEN_MODE_NO_INTERRUPTIONS"; |
| 6307 | return "ZEN_MODE_OFF"; |
John Spurlock | e677d71 | 2014-02-13 12:52:19 -0500 | [diff] [blame] | 6308 | } |
| 6309 | |
| 6310 | /** |
John Spurlock | 056c519 | 2014-04-20 21:52:01 -0400 | [diff] [blame] | 6311 | * Opaque value, changes when persisted zen mode configuration changes. |
| 6312 | * |
| 6313 | * @hide |
| 6314 | */ |
| 6315 | public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag"; |
| 6316 | |
| 6317 | /** |
Chris Wren | 7bd24123 | 2014-02-28 16:25:05 -0500 | [diff] [blame] | 6318 | * Defines global heads up toggle. One of HEADS_UP_OFF, HEADS_UP_ON. |
| 6319 | * |
| 6320 | * @hide |
| 6321 | */ |
Chris Wren | 10d82df | 2014-03-01 10:34:51 -0500 | [diff] [blame] | 6322 | public static final String HEADS_UP_NOTIFICATIONS_ENABLED = |
| 6323 | "heads_up_notifications_enabled"; |
Chris Wren | 7bd24123 | 2014-02-28 16:25:05 -0500 | [diff] [blame] | 6324 | |
| 6325 | /** @hide */ public static final int HEADS_UP_OFF = 0; |
| 6326 | /** @hide */ public static final int HEADS_UP_ON = 1; |
| 6327 | |
| 6328 | /** |
Jerome Poichet | 147b4d7 | 2014-05-12 18:13:27 -0700 | [diff] [blame] | 6329 | * The name of the device |
| 6330 | * |
| 6331 | * @hide |
| 6332 | */ |
| 6333 | public static final String DEVICE_NAME = "device_name"; |
| 6334 | |
| 6335 | /** |
Amith Yamasani | 1e9c218 | 2014-06-11 17:25:51 -0700 | [diff] [blame] | 6336 | * Whether it should be possible to create a guest user on the device. |
| 6337 | * <p> |
| 6338 | * Type: int (0 for disabled, 1 for enabled) |
| 6339 | * @hide |
| 6340 | */ |
| 6341 | public static final String GUEST_USER_ENABLED = "guest_user_enabled"; |
| 6342 | |
| 6343 | /** |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 6344 | * Settings to backup. This is here so that it's in the same place as the settings |
| 6345 | * keys and easy to update. |
| 6346 | * |
| 6347 | * These keys may be mentioned in the SETTINGS_TO_BACKUP arrays in System |
| 6348 | * and Secure as well. This is because those tables drive both backup and |
| 6349 | * restore, and restore needs to properly whitelist keys that used to live |
| 6350 | * in those namespaces. The keys will only actually be backed up / restored |
| 6351 | * if they are also mentioned in this table (Global.SETTINGS_TO_BACKUP). |
| 6352 | * |
| 6353 | * NOTE: Settings are backed up and restored in the order they appear |
| 6354 | * in this array. If you have one setting depending on another, |
| 6355 | * make sure that they are ordered appropriately. |
| 6356 | * |
| 6357 | * @hide |
| 6358 | */ |
| 6359 | public static final String[] SETTINGS_TO_BACKUP = { |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 6360 | BUGREPORT_IN_POWER_MENU, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 6361 | STAY_ON_WHILE_PLUGGED_IN, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 6362 | AUTO_TIME, |
| 6363 | AUTO_TIME_ZONE, |
| 6364 | POWER_SOUNDS_ENABLED, |
| 6365 | DOCK_SOUNDS_ENABLED, |
| 6366 | USB_MASS_STORAGE_ENABLED, |
| 6367 | ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED, |
| 6368 | WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, |
| 6369 | WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, |
Christopher Tate | 16eb7cd | 2012-10-09 15:26:30 -0700 | [diff] [blame] | 6370 | WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 6371 | WIFI_NUM_OPEN_NETWORKS_KEPT, |
| 6372 | EMERGENCY_TONE, |
| 6373 | CALL_AUTO_RETRY, |
Eric Laurent | 7ee1e4f | 2012-10-26 18:11:21 -0700 | [diff] [blame] | 6374 | DOCK_AUDIO_MEDIA_ENABLED |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 6375 | }; |
| 6376 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6377 | // Populated lazily, guarded by class object: |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 6378 | private static NameValueCache sNameValueCache = new NameValueCache( |
| 6379 | SYS_PROP_SETTING_VERSION, |
| 6380 | CONTENT_URI, |
| 6381 | CALL_METHOD_GET_GLOBAL, |
| 6382 | CALL_METHOD_PUT_GLOBAL); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6383 | |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 6384 | // Certain settings have been moved from global to the per-user secure namespace |
| 6385 | private static final HashSet<String> MOVED_TO_SECURE; |
| 6386 | static { |
| 6387 | MOVED_TO_SECURE = new HashSet<String>(1); |
| 6388 | MOVED_TO_SECURE.add(Settings.Global.INSTALL_NON_MARKET_APPS); |
| 6389 | } |
| 6390 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6391 | /** |
| 6392 | * Look up a name in the database. |
| 6393 | * @param resolver to access the database with |
| 6394 | * @param name to look up in the table |
| 6395 | * @return the corresponding value, or null if not present |
| 6396 | */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 6397 | public static String getString(ContentResolver resolver, String name) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6398 | return getStringForUser(resolver, name, UserHandle.myUserId()); |
| 6399 | } |
| 6400 | |
| 6401 | /** @hide */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 6402 | public static String getStringForUser(ContentResolver resolver, String name, |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6403 | int userHandle) { |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 6404 | if (MOVED_TO_SECURE.contains(name)) { |
| 6405 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" |
| 6406 | + " to android.provider.Settings.Secure, returning read-only value."); |
| 6407 | return Secure.getStringForUser(resolver, name, userHandle); |
| 6408 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6409 | return sNameValueCache.getStringForUser(resolver, name, userHandle); |
| 6410 | } |
| 6411 | |
| 6412 | /** |
| 6413 | * Store a name/value pair into the database. |
| 6414 | * @param resolver to access the database with |
| 6415 | * @param name to store |
| 6416 | * @param value to associate with the name |
| 6417 | * @return true if the value was set, false on database errors |
| 6418 | */ |
| 6419 | public static boolean putString(ContentResolver resolver, |
| 6420 | String name, String value) { |
| 6421 | return putStringForUser(resolver, name, value, UserHandle.myUserId()); |
| 6422 | } |
| 6423 | |
| 6424 | /** @hide */ |
| 6425 | public static boolean putStringForUser(ContentResolver resolver, |
| 6426 | String name, String value, int userHandle) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6427 | if (LOCAL_LOGV) { |
| 6428 | Log.v(TAG, "Global.putString(name=" + name + ", value=" + value |
| 6429 | + " for " + userHandle); |
| 6430 | } |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 6431 | // Global and Secure have the same access policy so we can forward writes |
| 6432 | if (MOVED_TO_SECURE.contains(name)) { |
| 6433 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" |
| 6434 | + " to android.provider.Settings.Secure, value is unchanged."); |
| 6435 | return Secure.putStringForUser(resolver, name, value, userHandle); |
| 6436 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6437 | return sNameValueCache.putStringForUser(resolver, name, value, userHandle); |
| 6438 | } |
| 6439 | |
| 6440 | /** |
| 6441 | * Construct the content URI for a particular name/value pair, |
| 6442 | * useful for monitoring changes with a ContentObserver. |
| 6443 | * @param name to look up in the table |
| 6444 | * @return the corresponding content URI, or null if not present |
| 6445 | */ |
| 6446 | public static Uri getUriFor(String name) { |
| 6447 | return getUriFor(CONTENT_URI, name); |
| 6448 | } |
| 6449 | |
| 6450 | /** |
| 6451 | * Convenience function for retrieving a single secure settings value |
| 6452 | * as an integer. Note that internally setting values are always |
| 6453 | * stored as strings; this function converts the string to an integer |
| 6454 | * for you. The default value will be returned if the setting is |
| 6455 | * not defined or not an integer. |
| 6456 | * |
| 6457 | * @param cr The ContentResolver to access. |
| 6458 | * @param name The name of the setting to retrieve. |
| 6459 | * @param def Value to return if the setting is not defined. |
| 6460 | * |
| 6461 | * @return The setting's current value, or 'def' if it is not defined |
| 6462 | * or not a valid integer. |
| 6463 | */ |
| 6464 | public static int getInt(ContentResolver cr, String name, int def) { |
| 6465 | String v = getString(cr, name); |
| 6466 | try { |
| 6467 | return v != null ? Integer.parseInt(v) : def; |
| 6468 | } catch (NumberFormatException e) { |
| 6469 | return def; |
| 6470 | } |
| 6471 | } |
| 6472 | |
| 6473 | /** |
| 6474 | * Convenience function for retrieving a single secure settings value |
| 6475 | * as an integer. Note that internally setting values are always |
| 6476 | * stored as strings; this function converts the string to an integer |
| 6477 | * for you. |
| 6478 | * <p> |
| 6479 | * This version does not take a default value. If the setting has not |
| 6480 | * been set, or the string value is not a number, |
| 6481 | * it throws {@link SettingNotFoundException}. |
| 6482 | * |
| 6483 | * @param cr The ContentResolver to access. |
| 6484 | * @param name The name of the setting to retrieve. |
| 6485 | * |
| 6486 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 6487 | * name can't be found or the setting value is not an integer. |
| 6488 | * |
| 6489 | * @return The setting's current value. |
| 6490 | */ |
| 6491 | public static int getInt(ContentResolver cr, String name) |
| 6492 | throws SettingNotFoundException { |
| 6493 | String v = getString(cr, name); |
| 6494 | try { |
| 6495 | return Integer.parseInt(v); |
| 6496 | } catch (NumberFormatException e) { |
| 6497 | throw new SettingNotFoundException(name); |
| 6498 | } |
| 6499 | } |
| 6500 | |
| 6501 | /** |
| 6502 | * Convenience function for updating a single settings value as an |
| 6503 | * integer. This will either create a new entry in the table if the |
| 6504 | * given name does not exist, or modify the value of the existing row |
| 6505 | * with that name. Note that internally setting values are always |
| 6506 | * stored as strings, so this function converts the given value to a |
| 6507 | * string before storing it. |
| 6508 | * |
| 6509 | * @param cr The ContentResolver to access. |
| 6510 | * @param name The name of the setting to modify. |
| 6511 | * @param value The new value for the setting. |
| 6512 | * @return true if the value was set, false on database errors |
| 6513 | */ |
| 6514 | public static boolean putInt(ContentResolver cr, String name, int value) { |
| 6515 | return putString(cr, name, Integer.toString(value)); |
| 6516 | } |
| 6517 | |
| 6518 | /** |
| 6519 | * Convenience function for retrieving a single secure settings value |
| 6520 | * as a {@code long}. Note that internally setting values are always |
| 6521 | * stored as strings; this function converts the string to a {@code long} |
| 6522 | * for you. The default value will be returned if the setting is |
| 6523 | * not defined or not a {@code long}. |
| 6524 | * |
| 6525 | * @param cr The ContentResolver to access. |
| 6526 | * @param name The name of the setting to retrieve. |
| 6527 | * @param def Value to return if the setting is not defined. |
| 6528 | * |
| 6529 | * @return The setting's current value, or 'def' if it is not defined |
| 6530 | * or not a valid {@code long}. |
| 6531 | */ |
| 6532 | public static long getLong(ContentResolver cr, String name, long def) { |
| 6533 | String valString = getString(cr, name); |
| 6534 | long value; |
| 6535 | try { |
| 6536 | value = valString != null ? Long.parseLong(valString) : def; |
| 6537 | } catch (NumberFormatException e) { |
| 6538 | value = def; |
| 6539 | } |
| 6540 | return value; |
| 6541 | } |
| 6542 | |
| 6543 | /** |
| 6544 | * Convenience function for retrieving a single secure settings value |
| 6545 | * as a {@code long}. Note that internally setting values are always |
| 6546 | * stored as strings; this function converts the string to a {@code long} |
| 6547 | * for you. |
| 6548 | * <p> |
| 6549 | * This version does not take a default value. If the setting has not |
| 6550 | * been set, or the string value is not a number, |
| 6551 | * it throws {@link SettingNotFoundException}. |
| 6552 | * |
| 6553 | * @param cr The ContentResolver to access. |
| 6554 | * @param name The name of the setting to retrieve. |
| 6555 | * |
| 6556 | * @return The setting's current value. |
| 6557 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 6558 | * name can't be found or the setting value is not an integer. |
| 6559 | */ |
| 6560 | public static long getLong(ContentResolver cr, String name) |
| 6561 | throws SettingNotFoundException { |
| 6562 | String valString = getString(cr, name); |
| 6563 | try { |
| 6564 | return Long.parseLong(valString); |
| 6565 | } catch (NumberFormatException e) { |
| 6566 | throw new SettingNotFoundException(name); |
| 6567 | } |
| 6568 | } |
| 6569 | |
| 6570 | /** |
| 6571 | * Convenience function for updating a secure settings value as a long |
| 6572 | * integer. This will either create a new entry in the table if the |
| 6573 | * given name does not exist, or modify the value of the existing row |
| 6574 | * with that name. Note that internally setting values are always |
| 6575 | * stored as strings, so this function converts the given value to a |
| 6576 | * string before storing it. |
| 6577 | * |
| 6578 | * @param cr The ContentResolver to access. |
| 6579 | * @param name The name of the setting to modify. |
| 6580 | * @param value The new value for the setting. |
| 6581 | * @return true if the value was set, false on database errors |
| 6582 | */ |
| 6583 | public static boolean putLong(ContentResolver cr, String name, long value) { |
| 6584 | return putString(cr, name, Long.toString(value)); |
| 6585 | } |
| 6586 | |
| 6587 | /** |
| 6588 | * Convenience function for retrieving a single secure settings value |
| 6589 | * as a floating point number. Note that internally setting values are |
| 6590 | * always stored as strings; this function converts the string to an |
| 6591 | * float for you. The default value will be returned if the setting |
| 6592 | * is not defined or not a valid float. |
| 6593 | * |
| 6594 | * @param cr The ContentResolver to access. |
| 6595 | * @param name The name of the setting to retrieve. |
| 6596 | * @param def Value to return if the setting is not defined. |
| 6597 | * |
| 6598 | * @return The setting's current value, or 'def' if it is not defined |
| 6599 | * or not a valid float. |
| 6600 | */ |
| 6601 | public static float getFloat(ContentResolver cr, String name, float def) { |
| 6602 | String v = getString(cr, name); |
| 6603 | try { |
| 6604 | return v != null ? Float.parseFloat(v) : def; |
| 6605 | } catch (NumberFormatException e) { |
| 6606 | return def; |
| 6607 | } |
| 6608 | } |
| 6609 | |
| 6610 | /** |
| 6611 | * Convenience function for retrieving a single secure settings value |
| 6612 | * as a float. Note that internally setting values are always |
| 6613 | * stored as strings; this function converts the string to a float |
| 6614 | * for you. |
| 6615 | * <p> |
| 6616 | * This version does not take a default value. If the setting has not |
| 6617 | * been set, or the string value is not a number, |
| 6618 | * it throws {@link SettingNotFoundException}. |
| 6619 | * |
| 6620 | * @param cr The ContentResolver to access. |
| 6621 | * @param name The name of the setting to retrieve. |
| 6622 | * |
| 6623 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 6624 | * name can't be found or the setting value is not a float. |
| 6625 | * |
| 6626 | * @return The setting's current value. |
| 6627 | */ |
| 6628 | public static float getFloat(ContentResolver cr, String name) |
| 6629 | throws SettingNotFoundException { |
| 6630 | String v = getString(cr, name); |
| 6631 | if (v == null) { |
| 6632 | throw new SettingNotFoundException(name); |
| 6633 | } |
| 6634 | try { |
| 6635 | return Float.parseFloat(v); |
| 6636 | } catch (NumberFormatException e) { |
| 6637 | throw new SettingNotFoundException(name); |
| 6638 | } |
| 6639 | } |
| 6640 | |
| 6641 | /** |
| 6642 | * Convenience function for updating a single settings value as a |
| 6643 | * floating point number. This will either create a new entry in the |
| 6644 | * table if the given name does not exist, or modify the value of the |
| 6645 | * existing row with that name. Note that internally setting values |
| 6646 | * are always stored as strings, so this function converts the given |
| 6647 | * value to a string before storing it. |
| 6648 | * |
| 6649 | * @param cr The ContentResolver to access. |
| 6650 | * @param name The name of the setting to modify. |
| 6651 | * @param value The new value for the setting. |
| 6652 | * @return true if the value was set, false on database errors |
| 6653 | */ |
| 6654 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
| 6655 | return putString(cr, name, Float.toString(value)); |
| 6656 | } |
Wink Saville | fb40dd4 | 2014-06-12 17:02:31 -0700 | [diff] [blame] | 6657 | |
| 6658 | |
| 6659 | /** |
| 6660 | * Subscription to be used for voice call on a multi sim device. The supported values |
| 6661 | * are 0 = SUB1, 1 = SUB2 and etc. |
| 6662 | * @hide |
| 6663 | */ |
| 6664 | public static final String MULTI_SIM_VOICE_CALL_SUBSCRIPTION = "multi_sim_voice_call"; |
| 6665 | |
| 6666 | /** |
| 6667 | * Used to provide option to user to select subscription during dial. |
| 6668 | * The supported values are 0 = disable or 1 = enable prompt. |
| 6669 | * @hide |
| 6670 | */ |
| 6671 | public static final String MULTI_SIM_VOICE_PROMPT = "multi_sim_voice_prompt"; |
| 6672 | |
| 6673 | /** |
| 6674 | * Subscription to be used for data call on a multi sim device. The supported values |
| 6675 | * are 0 = SUB1, 1 = SUB2 and etc. |
| 6676 | * @hide |
| 6677 | */ |
| 6678 | public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call"; |
| 6679 | |
| 6680 | /** |
| 6681 | * Subscription to be used for SMS on a multi sim device. The supported values |
| 6682 | * are 0 = SUB1, 1 = SUB2 and etc. |
| 6683 | * @hide |
| 6684 | */ |
| 6685 | public static final String MULTI_SIM_SMS_SUBSCRIPTION = "multi_sim_sms"; |
| 6686 | |
| 6687 | /** |
| 6688 | * Used to provide option to user to select subscription during send SMS. |
| 6689 | * The value 1 - enable, 0 - disable |
| 6690 | * @hide |
| 6691 | */ |
| 6692 | public static final String MULTI_SIM_SMS_PROMPT = "multi_sim_sms_prompt"; |
| 6693 | |
| 6694 | |
| 6695 | |
| 6696 | /** User preferred subscriptions setting. |
| 6697 | * This holds the details of the user selected subscription from the card and |
| 6698 | * the activation status. Each settings string have the coma separated values |
| 6699 | * iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index |
| 6700 | * @hide |
| 6701 | */ |
| 6702 | public static final String[] MULTI_SIM_USER_PREFERRED_SUBS = {"user_preferred_sub1", |
| 6703 | "user_preferred_sub2","user_preferred_sub3"}; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6704 | } |
| 6705 | |
| 6706 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6707 | * User-defined bookmarks and shortcuts. The target of each bookmark is an |
| 6708 | * Intent URL, allowing it to be either a web page or a particular |
| 6709 | * application activity. |
| 6710 | * |
| 6711 | * @hide |
| 6712 | */ |
| 6713 | public static final class Bookmarks implements BaseColumns |
| 6714 | { |
| 6715 | private static final String TAG = "Bookmarks"; |
| 6716 | |
| 6717 | /** |
| 6718 | * The content:// style URL for this table |
| 6719 | */ |
| 6720 | public static final Uri CONTENT_URI = |
| 6721 | Uri.parse("content://" + AUTHORITY + "/bookmarks"); |
| 6722 | |
| 6723 | /** |
| 6724 | * The row ID. |
| 6725 | * <p>Type: INTEGER</p> |
| 6726 | */ |
| 6727 | public static final String ID = "_id"; |
| 6728 | |
| 6729 | /** |
| 6730 | * Descriptive name of the bookmark that can be displayed to the user. |
| 6731 | * If this is empty, the title should be resolved at display time (use |
| 6732 | * {@link #getTitle(Context, Cursor)} any time you want to display the |
| 6733 | * title of a bookmark.) |
| 6734 | * <P> |
| 6735 | * Type: TEXT |
| 6736 | * </P> |
| 6737 | */ |
| 6738 | public static final String TITLE = "title"; |
| 6739 | |
| 6740 | /** |
| 6741 | * Arbitrary string (displayed to the user) that allows bookmarks to be |
| 6742 | * organized into categories. There are some special names for |
| 6743 | * standard folders, which all start with '@'. The label displayed for |
| 6744 | * the folder changes with the locale (via {@link #getLabelForFolder}) but |
| 6745 | * the folder name does not change so you can consistently query for |
| 6746 | * the folder regardless of the current locale. |
| 6747 | * |
| 6748 | * <P>Type: TEXT</P> |
| 6749 | * |
| 6750 | */ |
| 6751 | public static final String FOLDER = "folder"; |
| 6752 | |
| 6753 | /** |
| 6754 | * The Intent URL of the bookmark, describing what it points to. This |
| 6755 | * value is given to {@link android.content.Intent#getIntent} to create |
| 6756 | * an Intent that can be launched. |
| 6757 | * <P>Type: TEXT</P> |
| 6758 | */ |
| 6759 | public static final String INTENT = "intent"; |
| 6760 | |
| 6761 | /** |
| 6762 | * Optional shortcut character associated with this bookmark. |
| 6763 | * <P>Type: INTEGER</P> |
| 6764 | */ |
| 6765 | public static final String SHORTCUT = "shortcut"; |
| 6766 | |
| 6767 | /** |
| 6768 | * The order in which the bookmark should be displayed |
| 6769 | * <P>Type: INTEGER</P> |
| 6770 | */ |
| 6771 | public static final String ORDERING = "ordering"; |
| 6772 | |
| 6773 | private static final String[] sIntentProjection = { INTENT }; |
| 6774 | private static final String[] sShortcutProjection = { ID, SHORTCUT }; |
| 6775 | private static final String sShortcutSelection = SHORTCUT + "=?"; |
| 6776 | |
| 6777 | /** |
| 6778 | * Convenience function to retrieve the bookmarked Intent for a |
| 6779 | * particular shortcut key. |
| 6780 | * |
| 6781 | * @param cr The ContentResolver to query. |
| 6782 | * @param shortcut The shortcut key. |
| 6783 | * |
| 6784 | * @return Intent The bookmarked URL, or null if there is no bookmark |
| 6785 | * matching the given shortcut. |
| 6786 | */ |
| 6787 | public static Intent getIntentForShortcut(ContentResolver cr, char shortcut) |
| 6788 | { |
| 6789 | Intent intent = null; |
| 6790 | |
| 6791 | Cursor c = cr.query(CONTENT_URI, |
| 6792 | sIntentProjection, sShortcutSelection, |
| 6793 | new String[] { String.valueOf((int) shortcut) }, ORDERING); |
| 6794 | // Keep trying until we find a valid shortcut |
| 6795 | try { |
| 6796 | while (intent == null && c.moveToNext()) { |
| 6797 | try { |
| 6798 | String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT)); |
Christian Mehlmauer | a34d2c9 | 2010-05-25 19:04:20 +0200 | [diff] [blame] | 6799 | intent = Intent.parseUri(intentURI, 0); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6800 | } catch (java.net.URISyntaxException e) { |
| 6801 | // The stored URL is bad... ignore it. |
| 6802 | } catch (IllegalArgumentException e) { |
| 6803 | // Column not found |
Dianne Hackborn | a33e3f7 | 2009-09-29 17:28:24 -0700 | [diff] [blame] | 6804 | Log.w(TAG, "Intent column not found", e); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6805 | } |
| 6806 | } |
| 6807 | } finally { |
| 6808 | if (c != null) c.close(); |
| 6809 | } |
| 6810 | |
| 6811 | return intent; |
| 6812 | } |
| 6813 | |
| 6814 | /** |
| 6815 | * Add a new bookmark to the system. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 6816 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6817 | * @param cr The ContentResolver to query. |
| 6818 | * @param intent The desired target of the bookmark. |
| 6819 | * @param title Bookmark title that is shown to the user; null if none |
| 6820 | * or it should be resolved to the intent's title. |
| 6821 | * @param folder Folder in which to place the bookmark; null if none. |
| 6822 | * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If |
| 6823 | * this is non-zero and there is an existing bookmark entry |
| 6824 | * with this same shortcut, then that existing shortcut is |
| 6825 | * cleared (the bookmark is not removed). |
| 6826 | * @return The unique content URL for the new bookmark entry. |
| 6827 | */ |
| 6828 | public static Uri add(ContentResolver cr, |
| 6829 | Intent intent, |
| 6830 | String title, |
| 6831 | String folder, |
| 6832 | char shortcut, |
| 6833 | int ordering) |
| 6834 | { |
| 6835 | // If a shortcut is supplied, and it is already defined for |
| 6836 | // another bookmark, then remove the old definition. |
| 6837 | if (shortcut != 0) { |
Jeff Hamilton | 7cd51ef | 2010-05-12 17:30:27 -0500 | [diff] [blame] | 6838 | cr.delete(CONTENT_URI, sShortcutSelection, |
| 6839 | new String[] { String.valueOf((int) shortcut) }); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6840 | } |
| 6841 | |
| 6842 | ContentValues values = new ContentValues(); |
| 6843 | if (title != null) values.put(TITLE, title); |
| 6844 | if (folder != null) values.put(FOLDER, folder); |
Jean-Baptiste Queru | 3b9f0a3 | 2010-06-21 13:46:59 -0700 | [diff] [blame] | 6845 | values.put(INTENT, intent.toUri(0)); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6846 | if (shortcut != 0) values.put(SHORTCUT, (int) shortcut); |
| 6847 | values.put(ORDERING, ordering); |
| 6848 | return cr.insert(CONTENT_URI, values); |
| 6849 | } |
| 6850 | |
| 6851 | /** |
| 6852 | * Return the folder name as it should be displayed to the user. This |
| 6853 | * takes care of localizing special folders. |
| 6854 | * |
| 6855 | * @param r Resources object for current locale; only need access to |
| 6856 | * system resources. |
| 6857 | * @param folder The value found in the {@link #FOLDER} column. |
| 6858 | * |
| 6859 | * @return CharSequence The label for this folder that should be shown |
| 6860 | * to the user. |
| 6861 | */ |
| 6862 | public static CharSequence getLabelForFolder(Resources r, String folder) { |
| 6863 | return folder; |
| 6864 | } |
| 6865 | |
| 6866 | /** |
| 6867 | * Return the title as it should be displayed to the user. This takes |
| 6868 | * care of localizing bookmarks that point to activities. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 6869 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6870 | * @param context A context. |
| 6871 | * @param cursor A cursor pointing to the row whose title should be |
| 6872 | * returned. The cursor must contain at least the {@link #TITLE} |
| 6873 | * and {@link #INTENT} columns. |
| 6874 | * @return A title that is localized and can be displayed to the user, |
| 6875 | * or the empty string if one could not be found. |
| 6876 | */ |
| 6877 | public static CharSequence getTitle(Context context, Cursor cursor) { |
| 6878 | int titleColumn = cursor.getColumnIndex(TITLE); |
| 6879 | int intentColumn = cursor.getColumnIndex(INTENT); |
| 6880 | if (titleColumn == -1 || intentColumn == -1) { |
| 6881 | throw new IllegalArgumentException( |
| 6882 | "The cursor must contain the TITLE and INTENT columns."); |
| 6883 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 6884 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6885 | String title = cursor.getString(titleColumn); |
| 6886 | if (!TextUtils.isEmpty(title)) { |
| 6887 | return title; |
| 6888 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 6889 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6890 | String intentUri = cursor.getString(intentColumn); |
| 6891 | if (TextUtils.isEmpty(intentUri)) { |
| 6892 | return ""; |
| 6893 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 6894 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6895 | Intent intent; |
| 6896 | try { |
Christian Mehlmauer | a34d2c9 | 2010-05-25 19:04:20 +0200 | [diff] [blame] | 6897 | intent = Intent.parseUri(intentUri, 0); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6898 | } catch (URISyntaxException e) { |
| 6899 | return ""; |
| 6900 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 6901 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6902 | PackageManager packageManager = context.getPackageManager(); |
| 6903 | ResolveInfo info = packageManager.resolveActivity(intent, 0); |
| 6904 | return info != null ? info.loadLabel(packageManager) : ""; |
| 6905 | } |
| 6906 | } |
| 6907 | |
| 6908 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6909 | * Returns the device ID that we should use when connecting to the mobile gtalk server. |
| 6910 | * This is a string like "android-0x1242", where the hex string is the Android ID obtained |
| 6911 | * from the GoogleLoginService. |
| 6912 | * |
| 6913 | * @param androidId The Android ID for this device. |
| 6914 | * @return The device ID that should be used when connecting to the mobile gtalk server. |
| 6915 | * @hide |
| 6916 | */ |
| 6917 | public static String getGTalkDeviceId(long androidId) { |
| 6918 | return "android-" + Long.toHexString(androidId); |
| 6919 | } |
| 6920 | } |