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; |
Mike LeBeau | 5d34e9b | 2010-02-10 19:34:56 -0800 | [diff] [blame] | 22 | import android.content.ComponentName; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 23 | import android.content.ContentResolver; |
| 24 | import android.content.ContentValues; |
| 25 | import android.content.Context; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 26 | import android.content.IContentProvider; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 27 | import android.content.Intent; |
Dianne Hackborn | b8b11a0 | 2010-03-10 15:53:11 -0800 | [diff] [blame] | 28 | import android.content.pm.ActivityInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 29 | import android.content.pm.PackageManager; |
| 30 | import android.content.pm.ResolveInfo; |
| 31 | import android.content.res.Configuration; |
| 32 | import android.content.res.Resources; |
| 33 | import android.database.Cursor; |
| 34 | import android.database.SQLException; |
| 35 | import android.net.Uri; |
Irfan Sheriff | 36f7413 | 2010-11-04 16:57:37 -0700 | [diff] [blame] | 36 | import android.net.wifi.WifiManager; |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 37 | import android.os.BatteryManager; |
| 38 | import android.os.Bundle; |
| 39 | import android.os.RemoteException; |
| 40 | import android.os.SystemProperties; |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 41 | import android.speech.tts.TextToSpeech; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 42 | import android.text.TextUtils; |
| 43 | import android.util.AndroidException; |
| 44 | import android.util.Log; |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 45 | import android.view.WindowOrientationListener; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 46 | |
| 47 | import java.net.URISyntaxException; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 48 | import java.util.HashMap; |
| 49 | import java.util.HashSet; |
| 50 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 51 | /** |
| 52 | * The Settings provider contains global system-level device preferences. |
| 53 | */ |
| 54 | public final class Settings { |
| 55 | |
| 56 | // Intent actions for Settings |
| 57 | |
| 58 | /** |
| 59 | * Activity Action: Show system settings. |
| 60 | * <p> |
| 61 | * Input: Nothing. |
| 62 | * <p> |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 63 | * Output: Nothing. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 64 | */ |
| 65 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 66 | public static final String ACTION_SETTINGS = "android.settings.SETTINGS"; |
| 67 | |
| 68 | /** |
| 69 | * Activity Action: Show settings to allow configuration of APNs. |
| 70 | * <p> |
| 71 | * Input: Nothing. |
| 72 | * <p> |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 73 | * Output: Nothing. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 74 | */ |
| 75 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 76 | public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS"; |
| 77 | |
| 78 | /** |
| 79 | * Activity Action: Show settings to allow configuration of current location |
| 80 | * sources. |
| 81 | * <p> |
| 82 | * In some cases, a matching Activity may not exist, so ensure you |
| 83 | * safeguard against this. |
| 84 | * <p> |
| 85 | * Input: Nothing. |
| 86 | * <p> |
| 87 | * Output: Nothing. |
| 88 | */ |
| 89 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 90 | public static final String ACTION_LOCATION_SOURCE_SETTINGS = |
| 91 | "android.settings.LOCATION_SOURCE_SETTINGS"; |
| 92 | |
| 93 | /** |
| 94 | * Activity Action: Show settings to allow configuration of wireless controls |
| 95 | * such as Wi-Fi, Bluetooth and Mobile networks. |
| 96 | * <p> |
| 97 | * In some cases, a matching Activity may not exist, so ensure you |
| 98 | * safeguard against this. |
| 99 | * <p> |
| 100 | * Input: Nothing. |
| 101 | * <p> |
| 102 | * Output: Nothing. |
| 103 | */ |
| 104 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 105 | public static final String ACTION_WIRELESS_SETTINGS = |
| 106 | "android.settings.WIRELESS_SETTINGS"; |
| 107 | |
| 108 | /** |
| 109 | * Activity Action: Show settings to allow entering/exiting airplane mode. |
| 110 | * <p> |
| 111 | * In some cases, a matching Activity may not exist, so ensure you |
| 112 | * safeguard against this. |
| 113 | * <p> |
| 114 | * Input: Nothing. |
| 115 | * <p> |
| 116 | * Output: Nothing. |
| 117 | */ |
| 118 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 119 | public static final String ACTION_AIRPLANE_MODE_SETTINGS = |
| 120 | "android.settings.AIRPLANE_MODE_SETTINGS"; |
| 121 | |
| 122 | /** |
Dianne Hackborn | dd9b82c | 2009-09-03 00:18:47 -0700 | [diff] [blame] | 123 | * Activity Action: Show settings for accessibility modules. |
| 124 | * <p> |
| 125 | * In some cases, a matching Activity may not exist, so ensure you |
| 126 | * safeguard against this. |
| 127 | * <p> |
| 128 | * Input: Nothing. |
| 129 | * <p> |
| 130 | * Output: Nothing. |
| 131 | */ |
| 132 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 133 | public static final String ACTION_ACCESSIBILITY_SETTINGS = |
| 134 | "android.settings.ACCESSIBILITY_SETTINGS"; |
| 135 | |
| 136 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 137 | * Activity Action: Show settings to allow configuration of security and |
| 138 | * location privacy. |
| 139 | * <p> |
| 140 | * In some cases, a matching Activity may not exist, so ensure you |
| 141 | * safeguard against this. |
| 142 | * <p> |
| 143 | * Input: Nothing. |
| 144 | * <p> |
| 145 | * Output: Nothing. |
| 146 | */ |
| 147 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 148 | public static final String ACTION_SECURITY_SETTINGS = |
| 149 | "android.settings.SECURITY_SETTINGS"; |
| 150 | |
| 151 | /** |
Amith Yamasani | c15255a | 2009-09-23 15:33:19 -0700 | [diff] [blame] | 152 | * Activity Action: Show settings to allow configuration of privacy options. |
| 153 | * <p> |
| 154 | * In some cases, a matching Activity may not exist, so ensure you |
| 155 | * safeguard against this. |
| 156 | * <p> |
| 157 | * Input: Nothing. |
| 158 | * <p> |
| 159 | * Output: Nothing. |
| 160 | */ |
| 161 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 162 | public static final String ACTION_PRIVACY_SETTINGS = |
| 163 | "android.settings.PRIVACY_SETTINGS"; |
| 164 | |
| 165 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 166 | * Activity Action: Show settings to allow configuration of Wi-Fi. |
| 167 | |
| 168 | * <p> |
| 169 | * In some cases, a matching Activity may not exist, so ensure you |
| 170 | * safeguard against this. |
| 171 | * <p> |
| 172 | * Input: Nothing. |
| 173 | * <p> |
| 174 | * Output: Nothing. |
| 175 | |
| 176 | */ |
| 177 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 178 | public static final String ACTION_WIFI_SETTINGS = |
| 179 | "android.settings.WIFI_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 180 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 181 | /** |
| 182 | * Activity Action: Show settings to allow configuration of a static IP |
| 183 | * address for Wi-Fi. |
| 184 | * <p> |
| 185 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 186 | * against this. |
| 187 | * <p> |
| 188 | * Input: Nothing. |
| 189 | * <p> |
| 190 | * Output: Nothing. |
| 191 | */ |
| 192 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 193 | public static final String ACTION_WIFI_IP_SETTINGS = |
| 194 | "android.settings.WIFI_IP_SETTINGS"; |
| 195 | |
| 196 | /** |
| 197 | * Activity Action: Show settings to allow configuration of Bluetooth. |
| 198 | * <p> |
| 199 | * In some cases, a matching Activity may not exist, so ensure you |
| 200 | * safeguard against this. |
| 201 | * <p> |
| 202 | * Input: Nothing. |
| 203 | * <p> |
| 204 | * Output: Nothing. |
| 205 | */ |
| 206 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 207 | public static final String ACTION_BLUETOOTH_SETTINGS = |
| 208 | "android.settings.BLUETOOTH_SETTINGS"; |
| 209 | |
| 210 | /** |
| 211 | * Activity Action: Show settings to allow configuration of date and time. |
| 212 | * <p> |
| 213 | * In some cases, a matching Activity may not exist, so ensure you |
| 214 | * safeguard against this. |
| 215 | * <p> |
| 216 | * Input: Nothing. |
| 217 | * <p> |
| 218 | * Output: Nothing. |
| 219 | */ |
| 220 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 221 | public static final String ACTION_DATE_SETTINGS = |
| 222 | "android.settings.DATE_SETTINGS"; |
| 223 | |
| 224 | /** |
| 225 | * Activity Action: Show settings to allow configuration of sound and volume. |
| 226 | * <p> |
| 227 | * In some cases, a matching Activity may not exist, so ensure you |
| 228 | * safeguard against this. |
| 229 | * <p> |
| 230 | * Input: Nothing. |
| 231 | * <p> |
| 232 | * Output: Nothing. |
| 233 | */ |
| 234 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 235 | public static final String ACTION_SOUND_SETTINGS = |
| 236 | "android.settings.SOUND_SETTINGS"; |
| 237 | |
| 238 | /** |
| 239 | * Activity Action: Show settings to allow configuration of display. |
| 240 | * <p> |
| 241 | * In some cases, a matching Activity may not exist, so ensure you |
| 242 | * safeguard against this. |
| 243 | * <p> |
| 244 | * Input: Nothing. |
| 245 | * <p> |
| 246 | * Output: Nothing. |
| 247 | */ |
| 248 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 249 | public static final String ACTION_DISPLAY_SETTINGS = |
| 250 | "android.settings.DISPLAY_SETTINGS"; |
| 251 | |
| 252 | /** |
| 253 | * Activity Action: Show settings to allow configuration of locale. |
| 254 | * <p> |
| 255 | * In some cases, a matching Activity may not exist, so ensure you |
| 256 | * safeguard against this. |
| 257 | * <p> |
| 258 | * Input: Nothing. |
| 259 | * <p> |
| 260 | * Output: Nothing. |
| 261 | */ |
| 262 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 263 | public static final String ACTION_LOCALE_SETTINGS = |
| 264 | "android.settings.LOCALE_SETTINGS"; |
| 265 | |
| 266 | /** |
| 267 | * Activity Action: Show settings to configure input methods, in particular |
| 268 | * allowing the user to enable input methods. |
| 269 | * <p> |
| 270 | * In some cases, a matching Activity may not exist, so ensure you |
| 271 | * safeguard against this. |
| 272 | * <p> |
| 273 | * Input: Nothing. |
| 274 | * <p> |
| 275 | * Output: Nothing. |
| 276 | */ |
| 277 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 278 | public static final String ACTION_INPUT_METHOD_SETTINGS = |
| 279 | "android.settings.INPUT_METHOD_SETTINGS"; |
| 280 | |
| 281 | /** |
Tadashi G. Takaoka | f49688f | 2011-01-20 17:56:13 +0900 | [diff] [blame] | 282 | * Activity Action: Show settings to enable/disable input method subtypes. |
satok | 86417ea | 2010-10-27 14:11:03 +0900 | [diff] [blame] | 283 | * <p> |
| 284 | * In some cases, a matching Activity may not exist, so ensure you |
| 285 | * safeguard against this. |
| 286 | * <p> |
Tadashi G. Takaoka | 2548020 | 2011-01-20 23:13:02 +0900 | [diff] [blame] | 287 | * To tell which input method's subtypes are displayed in the settings, add |
| 288 | * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id. |
| 289 | * If there is no extra in this Intent, subtypes from all installed input methods |
| 290 | * will be displayed in the settings. |
| 291 | * |
| 292 | * @see android.view.inputmethod.InputMethodInfo#getId |
| 293 | * <p> |
satok | 86417ea | 2010-10-27 14:11:03 +0900 | [diff] [blame] | 294 | * Input: Nothing. |
| 295 | * <p> |
| 296 | * Output: Nothing. |
| 297 | */ |
| 298 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
Tadashi G. Takaoka | f49688f | 2011-01-20 17:56:13 +0900 | [diff] [blame] | 299 | public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS = |
| 300 | "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS"; |
satok | 86417ea | 2010-10-27 14:11:03 +0900 | [diff] [blame] | 301 | |
| 302 | /** |
satok | 7cfc0ed | 2011-06-20 21:29:36 +0900 | [diff] [blame] | 303 | * Activity Action: Show a dialog to select input method. |
| 304 | * <p> |
| 305 | * In some cases, a matching Activity may not exist, so ensure you |
| 306 | * safeguard against this. |
| 307 | * <p> |
| 308 | * Input: Nothing. |
| 309 | * <p> |
| 310 | * Output: Nothing. |
| 311 | * @hide |
| 312 | */ |
| 313 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 314 | public static final String ACTION_SHOW_INPUT_METHOD_PICKER = |
| 315 | "android.settings.SHOW_INPUT_METHOD_PICKER"; |
| 316 | |
| 317 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 318 | * Activity Action: Show settings to manage the user input dictionary. |
| 319 | * <p> |
| 320 | * In some cases, a matching Activity may not exist, so ensure you |
| 321 | * safeguard against this. |
| 322 | * <p> |
| 323 | * Input: Nothing. |
| 324 | * <p> |
| 325 | * Output: Nothing. |
| 326 | */ |
| 327 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 328 | public static final String ACTION_USER_DICTIONARY_SETTINGS = |
| 329 | "android.settings.USER_DICTIONARY_SETTINGS"; |
| 330 | |
| 331 | /** |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 332 | * Activity Action: Adds a word to the user dictionary. |
| 333 | * <p> |
| 334 | * In some cases, a matching Activity may not exist, so ensure you |
| 335 | * safeguard against this. |
| 336 | * <p> |
| 337 | * Input: An extra with key <code>word</code> that contains the word |
| 338 | * that should be added to the dictionary. |
| 339 | * <p> |
| 340 | * Output: Nothing. |
| 341 | * |
| 342 | * @hide |
| 343 | */ |
| 344 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 345 | public static final String ACTION_USER_DICTIONARY_INSERT = |
| 346 | "com.android.settings.USER_DICTIONARY_INSERT"; |
| 347 | |
| 348 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 349 | * Activity Action: Show settings to allow configuration of application-related settings. |
| 350 | * <p> |
| 351 | * In some cases, a matching Activity may not exist, so ensure you |
| 352 | * safeguard against this. |
| 353 | * <p> |
| 354 | * Input: Nothing. |
| 355 | * <p> |
| 356 | * Output: Nothing. |
| 357 | */ |
| 358 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 359 | public static final String ACTION_APPLICATION_SETTINGS = |
| 360 | "android.settings.APPLICATION_SETTINGS"; |
| 361 | |
| 362 | /** |
| 363 | * Activity Action: Show settings to allow configuration of application |
| 364 | * development-related settings. |
| 365 | * <p> |
| 366 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 367 | * against this. |
| 368 | * <p> |
| 369 | * Input: Nothing. |
| 370 | * <p> |
| 371 | * Output: Nothing. |
| 372 | */ |
| 373 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 374 | public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS = |
| 375 | "android.settings.APPLICATION_DEVELOPMENT_SETTINGS"; |
| 376 | |
| 377 | /** |
| 378 | * Activity Action: Show settings to allow configuration of quick launch shortcuts. |
| 379 | * <p> |
| 380 | * In some cases, a matching Activity may not exist, so ensure you |
| 381 | * safeguard against this. |
| 382 | * <p> |
| 383 | * Input: Nothing. |
| 384 | * <p> |
| 385 | * Output: Nothing. |
| 386 | */ |
| 387 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 388 | public static final String ACTION_QUICK_LAUNCH_SETTINGS = |
| 389 | "android.settings.QUICK_LAUNCH_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 390 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 391 | /** |
| 392 | * Activity Action: Show settings to manage installed applications. |
| 393 | * <p> |
| 394 | * In some cases, a matching Activity may not exist, so ensure you |
| 395 | * safeguard against this. |
| 396 | * <p> |
| 397 | * Input: Nothing. |
| 398 | * <p> |
| 399 | * Output: Nothing. |
| 400 | */ |
| 401 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 402 | public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS = |
| 403 | "android.settings.MANAGE_APPLICATIONS_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 404 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 405 | /** |
Winson Chung | 44e8ff9 | 2010-09-27 14:36:52 -0700 | [diff] [blame] | 406 | * Activity Action: Show settings to manage all applications. |
| 407 | * <p> |
| 408 | * In some cases, a matching Activity may not exist, so ensure you |
| 409 | * safeguard against this. |
| 410 | * <p> |
| 411 | * Input: Nothing. |
| 412 | * <p> |
| 413 | * Output: Nothing. |
| 414 | */ |
| 415 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 416 | public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS = |
| 417 | "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS"; |
| 418 | |
| 419 | /** |
Dianne Hackborn | b7bb3b3 | 2010-06-06 22:47:50 -0700 | [diff] [blame] | 420 | * Activity Action: Show screen of details about a particular application. |
| 421 | * <p> |
| 422 | * In some cases, a matching Activity may not exist, so ensure you |
| 423 | * safeguard against this. |
| 424 | * <p> |
| 425 | * Input: The Intent's data URI specifies the application package name |
| 426 | * to be shown, with the "package" scheme. That is "package:com.my.app". |
| 427 | * <p> |
| 428 | * Output: Nothing. |
| 429 | */ |
| 430 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 431 | public static final String ACTION_APPLICATION_DETAILS_SETTINGS = |
| 432 | "android.settings.APPLICATION_DETAILS_SETTINGS"; |
| 433 | |
| 434 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 435 | * Activity Action: Show settings for system update functionality. |
| 436 | * <p> |
| 437 | * In some cases, a matching Activity may not exist, so ensure you |
| 438 | * safeguard against this. |
| 439 | * <p> |
| 440 | * Input: Nothing. |
| 441 | * <p> |
| 442 | * Output: Nothing. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 443 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 444 | * @hide |
| 445 | */ |
| 446 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 447 | public static final String ACTION_SYSTEM_UPDATE_SETTINGS = |
| 448 | "android.settings.SYSTEM_UPDATE_SETTINGS"; |
| 449 | |
| 450 | /** |
| 451 | * Activity Action: Show settings to allow configuration of sync settings. |
| 452 | * <p> |
| 453 | * In some cases, a matching Activity may not exist, so ensure you |
| 454 | * safeguard against this. |
| 455 | * <p> |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 456 | * The account types available to add via the add account button may be restricted by adding an |
| 457 | * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's |
| 458 | * authorities. Only account types which can sync with that content provider will be offered to |
| 459 | * the user. |
| 460 | * <p> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 461 | * Input: Nothing. |
| 462 | * <p> |
| 463 | * Output: Nothing. |
| 464 | */ |
| 465 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 466 | public static final String ACTION_SYNC_SETTINGS = |
| 467 | "android.settings.SYNC_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 468 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 469 | /** |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 470 | * Activity Action: Show add account screen for creating a new account. |
| 471 | * <p> |
| 472 | * In some cases, a matching Activity may not exist, so ensure you |
| 473 | * safeguard against this. |
| 474 | * <p> |
| 475 | * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES} |
| 476 | * extra to the Intent with one or more syncable content provider's authorities. Only account |
| 477 | * types which can sync with that content provider will be offered to the user. |
| 478 | * <p> |
| 479 | * Input: Nothing. |
| 480 | * <p> |
| 481 | * Output: Nothing. |
| 482 | */ |
| 483 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 484 | public static final String ACTION_ADD_ACCOUNT = |
| 485 | "android.settings.ADD_ACCOUNT_SETTINGS"; |
| 486 | |
| 487 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 488 | * Activity Action: Show settings for selecting the network operator. |
| 489 | * <p> |
| 490 | * In some cases, a matching Activity may not exist, so ensure you |
| 491 | * safeguard against this. |
| 492 | * <p> |
| 493 | * Input: Nothing. |
| 494 | * <p> |
| 495 | * Output: Nothing. |
| 496 | */ |
| 497 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 498 | public static final String ACTION_NETWORK_OPERATOR_SETTINGS = |
| 499 | "android.settings.NETWORK_OPERATOR_SETTINGS"; |
| 500 | |
| 501 | /** |
| 502 | * Activity Action: Show settings for selection of 2G/3G. |
| 503 | * <p> |
| 504 | * In some cases, a matching Activity may not exist, so ensure you |
| 505 | * safeguard against this. |
| 506 | * <p> |
| 507 | * Input: Nothing. |
| 508 | * <p> |
| 509 | * Output: Nothing. |
| 510 | */ |
| 511 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 512 | public static final String ACTION_DATA_ROAMING_SETTINGS = |
| 513 | "android.settings.DATA_ROAMING_SETTINGS"; |
| 514 | |
| 515 | /** |
| 516 | * Activity Action: Show settings for internal storage. |
| 517 | * <p> |
| 518 | * In some cases, a matching Activity may not exist, so ensure you |
| 519 | * safeguard against this. |
| 520 | * <p> |
| 521 | * Input: Nothing. |
| 522 | * <p> |
| 523 | * Output: Nothing. |
| 524 | */ |
| 525 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 526 | public static final String ACTION_INTERNAL_STORAGE_SETTINGS = |
| 527 | "android.settings.INTERNAL_STORAGE_SETTINGS"; |
| 528 | /** |
| 529 | * Activity Action: Show settings for memory card storage. |
| 530 | * <p> |
| 531 | * In some cases, a matching Activity may not exist, so ensure you |
| 532 | * safeguard against this. |
| 533 | * <p> |
| 534 | * Input: Nothing. |
| 535 | * <p> |
| 536 | * Output: Nothing. |
| 537 | */ |
| 538 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 539 | public static final String ACTION_MEMORY_CARD_SETTINGS = |
| 540 | "android.settings.MEMORY_CARD_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 541 | |
Justin Mattson | ef34035 | 2010-01-13 21:05:46 -0800 | [diff] [blame] | 542 | /** |
| 543 | * Activity Action: Show settings for global search. |
| 544 | * <p> |
| 545 | * In some cases, a matching Activity may not exist, so ensure you |
| 546 | * safeguard against this. |
| 547 | * <p> |
| 548 | * Input: Nothing. |
| 549 | * <p> |
| 550 | * Output: Nothing |
| 551 | */ |
| 552 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 553 | public static final String ACTION_SEARCH_SETTINGS = |
| 554 | "android.search.action.SEARCH_SETTINGS"; |
| 555 | |
Daniel Sandler | 9d8b876 | 2010-01-22 20:50:15 -0500 | [diff] [blame] | 556 | /** |
| 557 | * Activity Action: Show general device information settings (serial |
| 558 | * number, software version, phone number, etc.). |
| 559 | * <p> |
| 560 | * In some cases, a matching Activity may not exist, so ensure you |
| 561 | * safeguard against this. |
| 562 | * <p> |
| 563 | * Input: Nothing. |
| 564 | * <p> |
| 565 | * Output: Nothing |
| 566 | */ |
| 567 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 568 | public static final String ACTION_DEVICE_INFO_SETTINGS = |
| 569 | "android.settings.DEVICE_INFO_SETTINGS"; |
| 570 | |
Martijn Coenen | 9b3c83f | 2011-07-28 11:21:39 -0500 | [diff] [blame] | 571 | /** |
Nick Pelly | cccf01d | 2011-10-31 14:49:40 -0700 | [diff] [blame] | 572 | * Activity Action: Show NFC settings. |
| 573 | * <p> |
| 574 | * This shows UI that allows NFC to be turned on or off. |
Martijn Coenen | 9b3c83f | 2011-07-28 11:21:39 -0500 | [diff] [blame] | 575 | * <p> |
| 576 | * In some cases, a matching Activity may not exist, so ensure you |
| 577 | * safeguard against this. |
| 578 | * <p> |
| 579 | * Input: Nothing. |
| 580 | * <p> |
| 581 | * Output: Nothing |
Nick Pelly | cccf01d | 2011-10-31 14:49:40 -0700 | [diff] [blame] | 582 | * @see android.nfc.NfcAdapter#isEnabled() |
| 583 | */ |
| 584 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 585 | public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS"; |
| 586 | |
| 587 | /** |
| 588 | * Activity Action: Show NFC Sharing settings. |
| 589 | * <p> |
| 590 | * This shows UI that allows NDEF Push (Android Beam) to be turned on or |
| 591 | * off. |
| 592 | * <p> |
| 593 | * In some cases, a matching Activity may not exist, so ensure you |
| 594 | * safeguard against this. |
| 595 | * <p> |
| 596 | * Input: Nothing. |
| 597 | * <p> |
| 598 | * Output: Nothing |
| 599 | * @see android.nfc.NfcAdapter#isNdefPushEnabled() |
Martijn Coenen | 9b3c83f | 2011-07-28 11:21:39 -0500 | [diff] [blame] | 600 | */ |
| 601 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 602 | public static final String ACTION_NFCSHARING_SETTINGS = |
| 603 | "android.settings.NFCSHARING_SETTINGS"; |
| 604 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 605 | // End of Intent actions for Settings |
| 606 | |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 607 | /** |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 608 | * @hide - Private call() method on SettingsProvider to read from 'system' table. |
| 609 | */ |
| 610 | public static final String CALL_METHOD_GET_SYSTEM = "GET_system"; |
| 611 | |
| 612 | /** |
| 613 | * @hide - Private call() method on SettingsProvider to read from 'secure' table. |
| 614 | */ |
| 615 | public static final String CALL_METHOD_GET_SECURE = "GET_secure"; |
| 616 | |
| 617 | /** |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 618 | * Activity Extra: Limit available options in launched activity based on the given authority. |
| 619 | * <p> |
| 620 | * This can be passed as an extra field in an Activity Intent with one or more syncable content |
| 621 | * provider's authorities as a String[]. This field is used by some intents to alter the |
| 622 | * behavior of the called activity. |
| 623 | * <p> |
| 624 | * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based |
| 625 | * on the authority given. |
| 626 | */ |
| 627 | public static final String EXTRA_AUTHORITIES = |
| 628 | "authorities"; |
| 629 | |
Tadashi G. Takaoka | 2548020 | 2011-01-20 23:13:02 +0900 | [diff] [blame] | 630 | public static final String EXTRA_INPUT_METHOD_ID = "input_method_id"; |
| 631 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 632 | private static final String JID_RESOURCE_PREFIX = "android"; |
| 633 | |
| 634 | public static final String AUTHORITY = "settings"; |
| 635 | |
| 636 | private static final String TAG = "Settings"; |
Joe Onorato | 43a1765 | 2011-04-06 19:22:23 -0700 | [diff] [blame] | 637 | private static final boolean LOCAL_LOGV = false || false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 638 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 639 | public static class SettingNotFoundException extends AndroidException { |
| 640 | public SettingNotFoundException(String msg) { |
| 641 | super(msg); |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | /** |
| 646 | * Common base for tables of name/value settings. |
| 647 | */ |
| 648 | public static class NameValueTable implements BaseColumns { |
| 649 | public static final String NAME = "name"; |
| 650 | public static final String VALUE = "value"; |
| 651 | |
| 652 | protected static boolean putString(ContentResolver resolver, Uri uri, |
| 653 | String name, String value) { |
| 654 | // The database will take care of replacing duplicates. |
| 655 | try { |
| 656 | ContentValues values = new ContentValues(); |
| 657 | values.put(NAME, name); |
| 658 | values.put(VALUE, value); |
| 659 | resolver.insert(uri, values); |
| 660 | return true; |
| 661 | } catch (SQLException e) { |
Dianne Hackborn | a33e3f7 | 2009-09-29 17:28:24 -0700 | [diff] [blame] | 662 | 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] | 663 | return false; |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | public static Uri getUriFor(Uri uri, String name) { |
| 668 | return Uri.withAppendedPath(uri, name); |
| 669 | } |
| 670 | } |
| 671 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 672 | // Thread-safe. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 673 | private static class NameValueCache { |
| 674 | private final String mVersionSystemProperty; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 675 | private final Uri mUri; |
| 676 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 677 | private static final String[] SELECT_VALUE = |
| 678 | new String[] { Settings.NameValueTable.VALUE }; |
| 679 | private static final String NAME_EQ_PLACEHOLDER = "name=?"; |
| 680 | |
| 681 | // Must synchronize on 'this' to access mValues and mValuesVersion. |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 682 | private final HashMap<String, String> mValues = new HashMap<String, String>(); |
| 683 | private long mValuesVersion = 0; |
| 684 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 685 | // Initially null; set lazily and held forever. Synchronized on 'this'. |
| 686 | private IContentProvider mContentProvider = null; |
| 687 | |
| 688 | // The method we'll call (or null, to not use) on the provider |
| 689 | // for the fast path of retrieving settings. |
| 690 | private final String mCallCommand; |
| 691 | |
| 692 | public NameValueCache(String versionSystemProperty, Uri uri, String callCommand) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 693 | mVersionSystemProperty = versionSystemProperty; |
| 694 | mUri = uri; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 695 | mCallCommand = callCommand; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 696 | } |
| 697 | |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 698 | public String getString(ContentResolver cr, String name) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 699 | long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0); |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 700 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 701 | synchronized (this) { |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 702 | if (mValuesVersion != newValuesVersion) { |
| 703 | if (LOCAL_LOGV) { |
| 704 | Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current " + |
| 705 | newValuesVersion + " != cached " + mValuesVersion); |
| 706 | } |
| 707 | |
| 708 | mValues.clear(); |
| 709 | mValuesVersion = newValuesVersion; |
| 710 | } |
| 711 | |
| 712 | if (mValues.containsKey(name)) { |
| 713 | return mValues.get(name); // Could be null, that's OK -- negative caching |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 714 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 715 | } |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 716 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 717 | IContentProvider cp = null; |
| 718 | synchronized (this) { |
| 719 | cp = mContentProvider; |
| 720 | if (cp == null) { |
| 721 | cp = mContentProvider = cr.acquireProvider(mUri.getAuthority()); |
| 722 | } |
| 723 | } |
| 724 | |
| 725 | // Try the fast path first, not using query(). If this |
| 726 | // fails (alternate Settings provider that doesn't support |
| 727 | // this interface?) then we fall back to the query/table |
| 728 | // interface. |
| 729 | if (mCallCommand != null) { |
| 730 | try { |
| 731 | Bundle b = cp.call(mCallCommand, name, null); |
| 732 | if (b != null) { |
| 733 | String value = b.getPairValue(); |
| 734 | synchronized (this) { |
| 735 | mValues.put(name, value); |
| 736 | } |
| 737 | return value; |
| 738 | } |
| 739 | // If the response Bundle is null, we fall through |
| 740 | // to the query interface below. |
| 741 | } catch (RemoteException e) { |
| 742 | // Not supported by the remote side? Fall through |
| 743 | // to query(). |
| 744 | } |
| 745 | } |
| 746 | |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 747 | Cursor c = null; |
| 748 | try { |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 749 | c = cp.query(mUri, SELECT_VALUE, NAME_EQ_PLACEHOLDER, |
| 750 | new String[]{name}, null); |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 751 | if (c == null) { |
| 752 | Log.w(TAG, "Can't get key " + name + " from " + mUri); |
| 753 | return null; |
| 754 | } |
| 755 | |
| 756 | String value = c.moveToNext() ? c.getString(0) : null; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 757 | synchronized (this) { |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 758 | mValues.put(name, value); |
| 759 | } |
| 760 | if (LOCAL_LOGV) { |
| 761 | Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " + |
| 762 | name + " = " + (value == null ? "(null)" : value)); |
| 763 | } |
| 764 | return value; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 765 | } catch (RemoteException e) { |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 766 | Log.w(TAG, "Can't get key " + name + " from " + mUri, e); |
| 767 | return null; // Return null, but don't cache it. |
| 768 | } finally { |
| 769 | if (c != null) c.close(); |
| 770 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 771 | } |
| 772 | } |
| 773 | |
| 774 | /** |
| 775 | * System settings, containing miscellaneous system preferences. This |
| 776 | * table holds simple name/value pairs. There are convenience |
| 777 | * functions for accessing individual settings entries. |
| 778 | */ |
| 779 | public static final class System extends NameValueTable { |
| 780 | public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version"; |
| 781 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 782 | // Populated lazily, guarded by class object: |
| 783 | private static NameValueCache sNameValueCache = null; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 784 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 785 | private static final HashSet<String> MOVED_TO_SECURE; |
| 786 | static { |
| 787 | MOVED_TO_SECURE = new HashSet<String>(30); |
| 788 | MOVED_TO_SECURE.add(Secure.ADB_ENABLED); |
| 789 | MOVED_TO_SECURE.add(Secure.ANDROID_ID); |
| 790 | MOVED_TO_SECURE.add(Secure.BLUETOOTH_ON); |
| 791 | MOVED_TO_SECURE.add(Secure.DATA_ROAMING); |
| 792 | MOVED_TO_SECURE.add(Secure.DEVICE_PROVISIONED); |
| 793 | MOVED_TO_SECURE.add(Secure.HTTP_PROXY); |
| 794 | MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS); |
| 795 | MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED); |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 796 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED); |
| 797 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE); |
| 798 | 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] | 799 | MOVED_TO_SECURE.add(Secure.LOGGING_ID); |
| 800 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED); |
| 801 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE); |
| 802 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL); |
| 803 | MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME); |
| 804 | MOVED_TO_SECURE.add(Secure.USB_MASS_STORAGE_ENABLED); |
| 805 | MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL); |
| 806 | MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); |
| 807 | MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); |
| 808 | MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT); |
| 809 | MOVED_TO_SECURE.add(Secure.WIFI_ON); |
| 810 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE); |
| 811 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT); |
| 812 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS); |
| 813 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED); |
| 814 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS); |
| 815 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT); |
| 816 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS); |
| 817 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON); |
| 818 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT); |
| 819 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS); |
| 820 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS); |
| 821 | } |
| 822 | |
| 823 | /** |
| 824 | * Look up a name in the database. |
| 825 | * @param resolver to access the database with |
| 826 | * @param name to look up in the table |
| 827 | * @return the corresponding value, or null if not present |
| 828 | */ |
| 829 | public synchronized static String getString(ContentResolver resolver, String name) { |
| 830 | if (MOVED_TO_SECURE.contains(name)) { |
| 831 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 832 | + " to android.provider.Settings.Secure, returning read-only value."); |
| 833 | return Secure.getString(resolver, name); |
| 834 | } |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 835 | if (sNameValueCache == null) { |
| 836 | sNameValueCache = new NameValueCache(SYS_PROP_SETTING_VERSION, CONTENT_URI, |
| 837 | CALL_METHOD_GET_SYSTEM); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 838 | } |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 839 | return sNameValueCache.getString(resolver, name); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 840 | } |
| 841 | |
| 842 | /** |
| 843 | * Store a name/value pair into the database. |
| 844 | * @param resolver to access the database with |
| 845 | * @param name to store |
| 846 | * @param value to associate with the name |
| 847 | * @return true if the value was set, false on database errors |
| 848 | */ |
| 849 | public static boolean putString(ContentResolver resolver, String name, String value) { |
| 850 | if (MOVED_TO_SECURE.contains(name)) { |
| 851 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 852 | + " to android.provider.Settings.Secure, value is unchanged."); |
| 853 | return false; |
| 854 | } |
| 855 | return putString(resolver, CONTENT_URI, name, value); |
| 856 | } |
| 857 | |
| 858 | /** |
| 859 | * Construct the content URI for a particular name/value pair, |
| 860 | * useful for monitoring changes with a ContentObserver. |
| 861 | * @param name to look up in the table |
| 862 | * @return the corresponding content URI, or null if not present |
| 863 | */ |
| 864 | public static Uri getUriFor(String name) { |
| 865 | if (MOVED_TO_SECURE.contains(name)) { |
| 866 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 867 | + " to android.provider.Settings.Secure, returning Secure URI."); |
| 868 | return Secure.getUriFor(Secure.CONTENT_URI, name); |
| 869 | } |
| 870 | return getUriFor(CONTENT_URI, name); |
| 871 | } |
| 872 | |
| 873 | /** |
| 874 | * Convenience function for retrieving a single system settings value |
| 875 | * as an integer. Note that internally setting values are always |
| 876 | * stored as strings; this function converts the string to an integer |
| 877 | * for you. The default value will be returned if the setting is |
| 878 | * not defined or not an integer. |
| 879 | * |
| 880 | * @param cr The ContentResolver to access. |
| 881 | * @param name The name of the setting to retrieve. |
| 882 | * @param def Value to return if the setting is not defined. |
| 883 | * |
| 884 | * @return The setting's current value, or 'def' if it is not defined |
| 885 | * or not a valid integer. |
| 886 | */ |
| 887 | public static int getInt(ContentResolver cr, String name, int def) { |
| 888 | String v = getString(cr, name); |
| 889 | try { |
| 890 | return v != null ? Integer.parseInt(v) : def; |
| 891 | } catch (NumberFormatException e) { |
| 892 | return def; |
| 893 | } |
| 894 | } |
| 895 | |
| 896 | /** |
| 897 | * Convenience function for retrieving a single system settings value |
| 898 | * as an integer. Note that internally setting values are always |
| 899 | * stored as strings; this function converts the string to an integer |
| 900 | * for you. |
| 901 | * <p> |
| 902 | * This version does not take a default value. If the setting has not |
| 903 | * been set, or the string value is not a number, |
| 904 | * it throws {@link SettingNotFoundException}. |
| 905 | * |
| 906 | * @param cr The ContentResolver to access. |
| 907 | * @param name The name of the setting to retrieve. |
| 908 | * |
| 909 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 910 | * name can't be found or the setting value is not an integer. |
| 911 | * |
| 912 | * @return The setting's current value. |
| 913 | */ |
| 914 | public static int getInt(ContentResolver cr, String name) |
| 915 | throws SettingNotFoundException { |
| 916 | String v = getString(cr, name); |
| 917 | try { |
| 918 | return Integer.parseInt(v); |
| 919 | } catch (NumberFormatException e) { |
| 920 | throw new SettingNotFoundException(name); |
| 921 | } |
| 922 | } |
| 923 | |
| 924 | /** |
| 925 | * Convenience function for updating a single settings value as an |
| 926 | * integer. This will either create a new entry in the table if the |
| 927 | * given name does not exist, or modify the value of the existing row |
| 928 | * with that name. Note that internally setting values are always |
| 929 | * stored as strings, so this function converts the given value to a |
| 930 | * string before storing it. |
| 931 | * |
| 932 | * @param cr The ContentResolver to access. |
| 933 | * @param name The name of the setting to modify. |
| 934 | * @param value The new value for the setting. |
| 935 | * @return true if the value was set, false on database errors |
| 936 | */ |
| 937 | public static boolean putInt(ContentResolver cr, String name, int value) { |
| 938 | return putString(cr, name, Integer.toString(value)); |
| 939 | } |
| 940 | |
| 941 | /** |
| 942 | * Convenience function for retrieving a single system settings value |
| 943 | * as a {@code long}. Note that internally setting values are always |
| 944 | * stored as strings; this function converts the string to a {@code long} |
| 945 | * for you. The default value will be returned if the setting is |
| 946 | * not defined or not a {@code long}. |
| 947 | * |
| 948 | * @param cr The ContentResolver to access. |
| 949 | * @param name The name of the setting to retrieve. |
| 950 | * @param def Value to return if the setting is not defined. |
| 951 | * |
| 952 | * @return The setting's current value, or 'def' if it is not defined |
| 953 | * or not a valid {@code long}. |
| 954 | */ |
| 955 | public static long getLong(ContentResolver cr, String name, long def) { |
| 956 | String valString = getString(cr, name); |
| 957 | long value; |
| 958 | try { |
| 959 | value = valString != null ? Long.parseLong(valString) : def; |
| 960 | } catch (NumberFormatException e) { |
| 961 | value = def; |
| 962 | } |
| 963 | return value; |
| 964 | } |
| 965 | |
| 966 | /** |
| 967 | * Convenience function for retrieving a single system settings value |
| 968 | * as a {@code long}. Note that internally setting values are always |
| 969 | * stored as strings; this function converts the string to a {@code long} |
| 970 | * for you. |
| 971 | * <p> |
| 972 | * This version does not take a default value. If the setting has not |
| 973 | * been set, or the string value is not a number, |
| 974 | * it throws {@link SettingNotFoundException}. |
| 975 | * |
| 976 | * @param cr The ContentResolver to access. |
| 977 | * @param name The name of the setting to retrieve. |
| 978 | * |
| 979 | * @return The setting's current value. |
| 980 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 981 | * name can't be found or the setting value is not an integer. |
| 982 | */ |
| 983 | public static long getLong(ContentResolver cr, String name) |
| 984 | throws SettingNotFoundException { |
| 985 | String valString = getString(cr, name); |
| 986 | try { |
| 987 | return Long.parseLong(valString); |
| 988 | } catch (NumberFormatException e) { |
| 989 | throw new SettingNotFoundException(name); |
| 990 | } |
| 991 | } |
| 992 | |
| 993 | /** |
| 994 | * Convenience function for updating a single settings value as a long |
| 995 | * integer. This will either create a new entry in the table if the |
| 996 | * given name does not exist, or modify the value of the existing row |
| 997 | * with that name. Note that internally setting values are always |
| 998 | * stored as strings, so this function converts the given value to a |
| 999 | * string before storing it. |
| 1000 | * |
| 1001 | * @param cr The ContentResolver to access. |
| 1002 | * @param name The name of the setting to modify. |
| 1003 | * @param value The new value for the setting. |
| 1004 | * @return true if the value was set, false on database errors |
| 1005 | */ |
| 1006 | public static boolean putLong(ContentResolver cr, String name, long value) { |
| 1007 | return putString(cr, name, Long.toString(value)); |
| 1008 | } |
| 1009 | |
| 1010 | /** |
| 1011 | * Convenience function for retrieving a single system settings value |
| 1012 | * as a floating point number. Note that internally setting values are |
| 1013 | * always stored as strings; this function converts the string to an |
| 1014 | * float for you. The default value will be returned if the setting |
| 1015 | * is not defined or not a valid float. |
| 1016 | * |
| 1017 | * @param cr The ContentResolver to access. |
| 1018 | * @param name The name of the setting to retrieve. |
| 1019 | * @param def Value to return if the setting is not defined. |
| 1020 | * |
| 1021 | * @return The setting's current value, or 'def' if it is not defined |
| 1022 | * or not a valid float. |
| 1023 | */ |
| 1024 | public static float getFloat(ContentResolver cr, String name, float def) { |
| 1025 | String v = getString(cr, name); |
| 1026 | try { |
| 1027 | return v != null ? Float.parseFloat(v) : def; |
| 1028 | } catch (NumberFormatException e) { |
| 1029 | return def; |
| 1030 | } |
| 1031 | } |
| 1032 | |
| 1033 | /** |
| 1034 | * Convenience function for retrieving a single system settings value |
| 1035 | * as a float. Note that internally setting values are always |
| 1036 | * stored as strings; this function converts the string to a float |
| 1037 | * for you. |
| 1038 | * <p> |
| 1039 | * This version does not take a default value. If the setting has not |
| 1040 | * been set, or the string value is not a number, |
| 1041 | * it throws {@link SettingNotFoundException}. |
| 1042 | * |
| 1043 | * @param cr The ContentResolver to access. |
| 1044 | * @param name The name of the setting to retrieve. |
| 1045 | * |
| 1046 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 1047 | * name can't be found or the setting value is not a float. |
| 1048 | * |
| 1049 | * @return The setting's current value. |
| 1050 | */ |
| 1051 | public static float getFloat(ContentResolver cr, String name) |
| 1052 | throws SettingNotFoundException { |
| 1053 | String v = getString(cr, name); |
Brian Muramatsu | e1d4698 | 2010-12-06 17:34:20 -0800 | [diff] [blame] | 1054 | if (v == null) { |
| 1055 | throw new SettingNotFoundException(name); |
| 1056 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1057 | try { |
| 1058 | return Float.parseFloat(v); |
| 1059 | } catch (NumberFormatException e) { |
| 1060 | throw new SettingNotFoundException(name); |
| 1061 | } |
| 1062 | } |
| 1063 | |
| 1064 | /** |
| 1065 | * Convenience function for updating a single settings value as a |
| 1066 | * floating point number. This will either create a new entry in the |
| 1067 | * table if the given name does not exist, or modify the value of the |
| 1068 | * existing row with that name. Note that internally setting values |
| 1069 | * are always stored as strings, so this function converts the given |
| 1070 | * value to a string before storing it. |
| 1071 | * |
| 1072 | * @param cr The ContentResolver to access. |
| 1073 | * @param name The name of the setting to modify. |
| 1074 | * @param value The new value for the setting. |
| 1075 | * @return true if the value was set, false on database errors |
| 1076 | */ |
| 1077 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
| 1078 | return putString(cr, name, Float.toString(value)); |
| 1079 | } |
| 1080 | |
| 1081 | /** |
| 1082 | * Convenience function to read all of the current |
| 1083 | * configuration-related settings into a |
| 1084 | * {@link Configuration} object. |
| 1085 | * |
| 1086 | * @param cr The ContentResolver to access. |
| 1087 | * @param outConfig Where to place the configuration settings. |
| 1088 | */ |
| 1089 | public static void getConfiguration(ContentResolver cr, Configuration outConfig) { |
| 1090 | outConfig.fontScale = Settings.System.getFloat( |
| 1091 | cr, FONT_SCALE, outConfig.fontScale); |
| 1092 | if (outConfig.fontScale < 0) { |
| 1093 | outConfig.fontScale = 1; |
| 1094 | } |
| 1095 | } |
| 1096 | |
| 1097 | /** |
Dianne Hackborn | 31ca854 | 2011-07-19 14:58:28 -0700 | [diff] [blame] | 1098 | * @hide Erase the fields in the Configuration that should be applied |
| 1099 | * by the settings. |
| 1100 | */ |
| 1101 | public static void clearConfiguration(Configuration inoutConfig) { |
| 1102 | inoutConfig.fontScale = 0; |
| 1103 | } |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 1104 | |
Dianne Hackborn | 31ca854 | 2011-07-19 14:58:28 -0700 | [diff] [blame] | 1105 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1106 | * Convenience function to write a batch of configuration-related |
| 1107 | * settings from a {@link Configuration} object. |
| 1108 | * |
| 1109 | * @param cr The ContentResolver to access. |
| 1110 | * @param config The settings to write. |
| 1111 | * @return true if the values were set, false on database errors |
| 1112 | */ |
| 1113 | public static boolean putConfiguration(ContentResolver cr, Configuration config) { |
| 1114 | return Settings.System.putFloat(cr, FONT_SCALE, config.fontScale); |
| 1115 | } |
| 1116 | |
Dianne Hackborn | b8b11a0 | 2010-03-10 15:53:11 -0800 | [diff] [blame] | 1117 | /** @hide */ |
| 1118 | public static boolean hasInterestingConfigurationChanges(int changes) { |
| 1119 | return (changes&ActivityInfo.CONFIG_FONT_SCALE) != 0; |
| 1120 | } |
Jaikumar Ganesh | 545e670 | 2010-06-04 10:23:03 -0700 | [diff] [blame] | 1121 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1122 | public static boolean getShowGTalkServiceStatus(ContentResolver cr) { |
| 1123 | return getInt(cr, SHOW_GTALK_SERVICE_STATUS, 0) != 0; |
| 1124 | } |
| 1125 | |
| 1126 | public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) { |
| 1127 | putInt(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0); |
| 1128 | } |
| 1129 | |
| 1130 | /** |
| 1131 | * The content:// style URL for this table |
| 1132 | */ |
| 1133 | public static final Uri CONTENT_URI = |
| 1134 | Uri.parse("content://" + AUTHORITY + "/system"); |
| 1135 | |
| 1136 | /** |
| 1137 | * Whether we keep the device on while the device is plugged in. |
| 1138 | * Supported values are: |
| 1139 | * <ul> |
| 1140 | * <li>{@code 0} to never stay on while plugged in</li> |
| 1141 | * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li> |
| 1142 | * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li> |
| 1143 | * </ul> |
| 1144 | * These values can be OR-ed together. |
| 1145 | */ |
| 1146 | public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; |
| 1147 | |
| 1148 | /** |
| 1149 | * What happens when the user presses the end call button if they're not |
| 1150 | * on a call.<br/> |
| 1151 | * <b>Values:</b><br/> |
| 1152 | * 0 - The end button does nothing.<br/> |
| 1153 | * 1 - The end button goes to the home screen.<br/> |
| 1154 | * 2 - The end button puts the device to sleep and locks the keyguard.<br/> |
| 1155 | * 3 - The end button goes to the home screen. If the user is already on the |
| 1156 | * home screen, it puts the device to sleep. |
| 1157 | */ |
| 1158 | public static final String END_BUTTON_BEHAVIOR = "end_button_behavior"; |
| 1159 | |
| 1160 | /** |
David Brown | 458e806 | 2010-03-08 21:52:11 -0800 | [diff] [blame] | 1161 | * END_BUTTON_BEHAVIOR value for "go home". |
| 1162 | * @hide |
| 1163 | */ |
| 1164 | public static final int END_BUTTON_BEHAVIOR_HOME = 0x1; |
| 1165 | |
| 1166 | /** |
| 1167 | * END_BUTTON_BEHAVIOR value for "go to sleep". |
| 1168 | * @hide |
| 1169 | */ |
| 1170 | public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2; |
| 1171 | |
| 1172 | /** |
| 1173 | * END_BUTTON_BEHAVIOR default value. |
| 1174 | * @hide |
| 1175 | */ |
| 1176 | public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP; |
| 1177 | |
| 1178 | /** |
Joe Onorato | 9cdffa1 | 2011-04-06 18:27:27 -0700 | [diff] [blame] | 1179 | * Is advanced settings mode turned on. 0 == no, 1 == yes |
| 1180 | * @hide |
| 1181 | */ |
| 1182 | public static final String ADVANCED_SETTINGS = "advanced_settings"; |
| 1183 | |
| 1184 | /** |
| 1185 | * ADVANCED_SETTINGS default value. |
| 1186 | * @hide |
| 1187 | */ |
| 1188 | public static final int ADVANCED_SETTINGS_DEFAULT = 0; |
| 1189 | |
| 1190 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1191 | * Whether Airplane Mode is on. |
| 1192 | */ |
| 1193 | public static final String AIRPLANE_MODE_ON = "airplane_mode_on"; |
| 1194 | |
| 1195 | /** |
| 1196 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio. |
| 1197 | */ |
| 1198 | public static final String RADIO_BLUETOOTH = "bluetooth"; |
| 1199 | |
| 1200 | /** |
| 1201 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio. |
| 1202 | */ |
| 1203 | public static final String RADIO_WIFI = "wifi"; |
| 1204 | |
Robert Greenwalt | 8588e47 | 2011-11-08 10:12:25 -0800 | [diff] [blame] | 1205 | /** |
| 1206 | * {@hide} |
| 1207 | */ |
tk.mun | 148c7d0 | 2011-10-13 22:51:57 +0900 | [diff] [blame] | 1208 | public static final String RADIO_WIMAX = "wimax"; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1209 | /** |
| 1210 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio. |
| 1211 | */ |
| 1212 | public static final String RADIO_CELL = "cell"; |
| 1213 | |
| 1214 | /** |
Nick Pelly | 8d32a01 | 2011-08-09 07:03:49 -0700 | [diff] [blame] | 1215 | * Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio. |
| 1216 | */ |
| 1217 | public static final String RADIO_NFC = "nfc"; |
| 1218 | |
| 1219 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1220 | * A comma separated list of radios that need to be disabled when airplane mode |
| 1221 | * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are |
| 1222 | * included in the comma separated list. |
| 1223 | */ |
| 1224 | public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; |
| 1225 | |
| 1226 | /** |
Mike Lockwood | bd5ddf0 | 2009-07-29 21:37:14 -0700 | [diff] [blame] | 1227 | * A comma separated list of radios that should to be disabled when airplane mode |
| 1228 | * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is |
| 1229 | * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi |
| 1230 | * will be turned off when entering airplane mode, but the user will be able to reenable |
| 1231 | * Wifi in the Settings app. |
| 1232 | * |
| 1233 | * {@hide} |
| 1234 | */ |
| 1235 | public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios"; |
| 1236 | |
| 1237 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1238 | * The policy for deciding when Wi-Fi should go to sleep (which will in |
| 1239 | * turn switch to using the mobile data as an Internet connection). |
| 1240 | * <p> |
| 1241 | * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT}, |
| 1242 | * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or |
| 1243 | * {@link #WIFI_SLEEP_POLICY_NEVER}. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1244 | */ |
| 1245 | public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy"; |
| 1246 | |
| 1247 | /** |
| 1248 | * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep |
| 1249 | * policy, which is to sleep shortly after the turning off |
| 1250 | * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1251 | */ |
| 1252 | public static final int WIFI_SLEEP_POLICY_DEFAULT = 0; |
| 1253 | |
| 1254 | /** |
| 1255 | * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when |
| 1256 | * the device is on battery, and never go to sleep when the device is |
| 1257 | * plugged in. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1258 | */ |
| 1259 | public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1260 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1261 | /** |
| 1262 | * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1263 | */ |
| 1264 | public static final int WIFI_SLEEP_POLICY_NEVER = 2; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1265 | |
Irfan Sheriff | 31b6232 | 2010-08-30 12:26:00 -0700 | [diff] [blame] | 1266 | //TODO: deprecate static IP constants |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1267 | /** |
| 1268 | * Whether to use static IP and other static network attributes. |
| 1269 | * <p> |
| 1270 | * Set to 1 for true and 0 for false. |
| 1271 | */ |
| 1272 | public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip"; |
| 1273 | |
| 1274 | /** |
| 1275 | * The static IP address. |
| 1276 | * <p> |
| 1277 | * Example: "192.168.1.51" |
| 1278 | */ |
| 1279 | public static final String WIFI_STATIC_IP = "wifi_static_ip"; |
| 1280 | |
| 1281 | /** |
| 1282 | * If using static IP, the gateway's IP address. |
| 1283 | * <p> |
| 1284 | * Example: "192.168.1.1" |
| 1285 | */ |
| 1286 | public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway"; |
| 1287 | |
| 1288 | /** |
| 1289 | * If using static IP, the net mask. |
| 1290 | * <p> |
| 1291 | * Example: "255.255.255.0" |
| 1292 | */ |
| 1293 | public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask"; |
| 1294 | |
| 1295 | /** |
| 1296 | * If using static IP, the primary DNS's IP address. |
| 1297 | * <p> |
| 1298 | * Example: "192.168.1.1" |
| 1299 | */ |
| 1300 | public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1"; |
| 1301 | |
| 1302 | /** |
| 1303 | * If using static IP, the secondary DNS's IP address. |
| 1304 | * <p> |
| 1305 | * Example: "192.168.1.2" |
| 1306 | */ |
| 1307 | public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2"; |
| 1308 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1309 | |
| 1310 | /** |
| 1311 | * Determines whether remote devices may discover and/or connect to |
| 1312 | * this device. |
| 1313 | * <P>Type: INT</P> |
| 1314 | * 2 -- discoverable and connectable |
| 1315 | * 1 -- connectable but not discoverable |
| 1316 | * 0 -- neither connectable nor discoverable |
| 1317 | */ |
| 1318 | public static final String BLUETOOTH_DISCOVERABILITY = |
| 1319 | "bluetooth_discoverability"; |
| 1320 | |
| 1321 | /** |
| 1322 | * Bluetooth discoverability timeout. If this value is nonzero, then |
| 1323 | * Bluetooth becomes discoverable for a certain number of seconds, |
| 1324 | * after which is becomes simply connectable. The value is in seconds. |
| 1325 | */ |
| 1326 | public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT = |
| 1327 | "bluetooth_discoverability_timeout"; |
| 1328 | |
| 1329 | /** |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1330 | * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED} |
| 1331 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1332 | */ |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1333 | @Deprecated |
| 1334 | 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] | 1335 | |
| 1336 | /** |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1337 | * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE} |
| 1338 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1339 | */ |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1340 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1341 | public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; |
| 1342 | |
| 1343 | /** |
Jaikumar Ganesh | 545e670 | 2010-06-04 10:23:03 -0700 | [diff] [blame] | 1344 | * @deprecated Use |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1345 | * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED} |
| 1346 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1347 | */ |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1348 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1349 | public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = |
| 1350 | "lock_pattern_tactile_feedback_enabled"; |
| 1351 | |
| 1352 | |
| 1353 | /** |
| 1354 | * A formatted string of the next alarm that is set, or the empty string |
| 1355 | * if there is no alarm set. |
| 1356 | */ |
| 1357 | public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted"; |
| 1358 | |
| 1359 | /** |
| 1360 | * Scaling factor for fonts, float. |
| 1361 | */ |
| 1362 | public static final String FONT_SCALE = "font_scale"; |
| 1363 | |
| 1364 | /** |
| 1365 | * Name of an application package to be debugged. |
| 1366 | */ |
| 1367 | public static final String DEBUG_APP = "debug_app"; |
| 1368 | |
| 1369 | /** |
| 1370 | * If 1, when launching DEBUG_APP it will wait for the debugger before |
| 1371 | * starting user code. If 0, it will run normally. |
| 1372 | */ |
| 1373 | public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger"; |
| 1374 | |
| 1375 | /** |
| 1376 | * Whether or not to dim the screen. 0=no 1=yes |
| 1377 | */ |
| 1378 | public static final String DIM_SCREEN = "dim_screen"; |
| 1379 | |
| 1380 | /** |
| 1381 | * The timeout before the screen turns off. |
| 1382 | */ |
| 1383 | public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout"; |
| 1384 | |
| 1385 | /** |
Mitsuru Oshima | e5fb328 | 2009-06-09 21:16:08 -0700 | [diff] [blame] | 1386 | * If 0, the compatibility mode is off for all applications. |
| 1387 | * If 1, older applications run under compatibility mode. |
| 1388 | * TODO: remove this settings before code freeze (bug/1907571) |
| 1389 | * @hide |
| 1390 | */ |
| 1391 | public static final String COMPATIBILITY_MODE = "compatibility_mode"; |
| 1392 | |
| 1393 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1394 | * The screen backlight brightness between 0 and 255. |
| 1395 | */ |
| 1396 | public static final String SCREEN_BRIGHTNESS = "screen_brightness"; |
| 1397 | |
| 1398 | /** |
Dan Murphy | 951764b | 2009-08-27 14:59:03 -0500 | [diff] [blame] | 1399 | * Control whether to enable automatic brightness mode. |
Dan Murphy | 951764b | 2009-08-27 14:59:03 -0500 | [diff] [blame] | 1400 | */ |
| 1401 | public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode"; |
| 1402 | |
| 1403 | /** |
Mike Lockwood | dc3494e | 2009-10-14 21:17:09 -0700 | [diff] [blame] | 1404 | * SCREEN_BRIGHTNESS_MODE value for manual mode. |
Mike Lockwood | dc3494e | 2009-10-14 21:17:09 -0700 | [diff] [blame] | 1405 | */ |
| 1406 | public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0; |
| 1407 | |
| 1408 | /** |
| 1409 | * SCREEN_BRIGHTNESS_MODE value for manual mode. |
Mike Lockwood | dc3494e | 2009-10-14 21:17:09 -0700 | [diff] [blame] | 1410 | */ |
| 1411 | public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; |
| 1412 | |
| 1413 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1414 | * Control whether the process CPU usage meter should be shown. |
| 1415 | */ |
| 1416 | public static final String SHOW_PROCESSES = "show_processes"; |
| 1417 | |
| 1418 | /** |
| 1419 | * If 1, the activity manager will aggressively finish activities and |
| 1420 | * processes as soon as they are no longer needed. If 0, the normal |
| 1421 | * extended lifetime is used. |
| 1422 | */ |
| 1423 | public static final String ALWAYS_FINISH_ACTIVITIES = |
| 1424 | "always_finish_activities"; |
| 1425 | |
| 1426 | |
| 1427 | /** |
| 1428 | * Ringer mode. This is used internally, changing this value will not |
| 1429 | * change the ringer mode. See AudioManager. |
| 1430 | */ |
| 1431 | public static final String MODE_RINGER = "mode_ringer"; |
| 1432 | |
| 1433 | /** |
| 1434 | * Determines which streams are affected by ringer mode changes. The |
| 1435 | * stream type's bit should be set to 1 if it should be muted when going |
| 1436 | * into an inaudible ringer mode. |
| 1437 | */ |
| 1438 | public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected"; |
| 1439 | |
| 1440 | /** |
| 1441 | * Determines which streams are affected by mute. The |
| 1442 | * stream type's bit should be set to 1 if it should be muted when a mute request |
| 1443 | * is received. |
| 1444 | */ |
| 1445 | public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected"; |
| 1446 | |
| 1447 | /** |
| 1448 | * Whether vibrate is on for different events. This is used internally, |
| 1449 | * changing this value will not change the vibrate. See AudioManager. |
| 1450 | */ |
| 1451 | public static final String VIBRATE_ON = "vibrate_on"; |
| 1452 | |
| 1453 | /** |
| 1454 | * Ringer volume. This is used internally, changing this value will not |
| 1455 | * change the volume. See AudioManager. |
| 1456 | */ |
| 1457 | public static final String VOLUME_RING = "volume_ring"; |
| 1458 | |
| 1459 | /** |
| 1460 | * System/notifications volume. This is used internally, changing this |
| 1461 | * value will not change the volume. See AudioManager. |
| 1462 | */ |
| 1463 | public static final String VOLUME_SYSTEM = "volume_system"; |
| 1464 | |
| 1465 | /** |
| 1466 | * Voice call volume. This is used internally, changing this value will |
| 1467 | * not change the volume. See AudioManager. |
| 1468 | */ |
| 1469 | public static final String VOLUME_VOICE = "volume_voice"; |
| 1470 | |
| 1471 | /** |
| 1472 | * Music/media/gaming volume. This is used internally, changing this |
| 1473 | * value will not change the volume. See AudioManager. |
| 1474 | */ |
| 1475 | public static final String VOLUME_MUSIC = "volume_music"; |
| 1476 | |
| 1477 | /** |
| 1478 | * Alarm volume. This is used internally, changing this |
| 1479 | * value will not change the volume. See AudioManager. |
| 1480 | */ |
| 1481 | public static final String VOLUME_ALARM = "volume_alarm"; |
| 1482 | |
| 1483 | /** |
| 1484 | * Notification volume. This is used internally, changing this |
| 1485 | * value will not change the volume. See AudioManager. |
| 1486 | */ |
| 1487 | public static final String VOLUME_NOTIFICATION = "volume_notification"; |
| 1488 | |
| 1489 | /** |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 1490 | * Bluetooth Headset volume. This is used internally, changing this value will |
| 1491 | * not change the volume. See AudioManager. |
| 1492 | */ |
| 1493 | public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco"; |
| 1494 | |
| 1495 | /** |
Amith Yamasani | 42722bf | 2011-07-22 10:34:27 -0700 | [diff] [blame] | 1496 | * Whether the notifications should use the ring volume (value of 1) or a separate |
| 1497 | * notification volume (value of 0). In most cases, users will have this enabled so the |
| 1498 | * notification and ringer volumes will be the same. However, power users can disable this |
| 1499 | * and use the separate notification volume control. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1500 | * <p> |
Amith Yamasani | 42722bf | 2011-07-22 10:34:27 -0700 | [diff] [blame] | 1501 | * Note: This is a one-off setting that will be removed in the future when there is profile |
| 1502 | * support. For this reason, it is kept hidden from the public APIs. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1503 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1504 | * @hide |
Amith Yamasani | 42722bf | 2011-07-22 10:34:27 -0700 | [diff] [blame] | 1505 | * @deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1506 | */ |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 1507 | @Deprecated |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1508 | public static final String NOTIFICATIONS_USE_RING_VOLUME = |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1509 | "notifications_use_ring_volume"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1510 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1511 | /** |
Daniel Sandler | 6329bf7 | 2010-02-26 15:17:44 -0500 | [diff] [blame] | 1512 | * Whether silent mode should allow vibration feedback. This is used |
| 1513 | * internally in AudioService and the Sound settings activity to |
| 1514 | * coordinate decoupling of vibrate and silent modes. This setting |
| 1515 | * will likely be removed in a future release with support for |
| 1516 | * audio/vibe feedback profiles. |
| 1517 | * |
| 1518 | * @hide |
| 1519 | */ |
| 1520 | public static final String VIBRATE_IN_SILENT = "vibrate_in_silent"; |
| 1521 | |
| 1522 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1523 | * The mapping of stream type (integer) to its setting. |
| 1524 | */ |
| 1525 | public static final String[] VOLUME_SETTINGS = { |
| 1526 | VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC, |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 1527 | VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1528 | }; |
| 1529 | |
| 1530 | /** |
| 1531 | * Appended to various volume related settings to record the previous |
| 1532 | * values before they the settings were affected by a silent/vibrate |
| 1533 | * ringer mode change. |
| 1534 | */ |
| 1535 | public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible"; |
| 1536 | |
| 1537 | /** |
| 1538 | * Persistent store for the system-wide default ringtone URI. |
| 1539 | * <p> |
| 1540 | * If you need to play the default ringtone at any given time, it is recommended |
| 1541 | * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve |
| 1542 | * to the set default ringtone at the time of playing. |
| 1543 | * |
| 1544 | * @see #DEFAULT_RINGTONE_URI |
| 1545 | */ |
| 1546 | public static final String RINGTONE = "ringtone"; |
| 1547 | |
| 1548 | /** |
| 1549 | * A {@link Uri} that will point to the current default ringtone at any |
| 1550 | * given time. |
| 1551 | * <p> |
| 1552 | * If the current default ringtone is in the DRM provider and the caller |
| 1553 | * does not have permission, the exception will be a |
| 1554 | * FileNotFoundException. |
| 1555 | */ |
| 1556 | public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE); |
| 1557 | |
| 1558 | /** |
| 1559 | * Persistent store for the system-wide default notification sound. |
| 1560 | * |
| 1561 | * @see #RINGTONE |
| 1562 | * @see #DEFAULT_NOTIFICATION_URI |
| 1563 | */ |
| 1564 | public static final String NOTIFICATION_SOUND = "notification_sound"; |
| 1565 | |
| 1566 | /** |
| 1567 | * A {@link Uri} that will point to the current default notification |
| 1568 | * sound at any given time. |
| 1569 | * |
| 1570 | * @see #DEFAULT_RINGTONE_URI |
| 1571 | */ |
| 1572 | public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND); |
| 1573 | |
| 1574 | /** |
Patrick Scott | 3156bb00 | 2009-04-13 09:57:38 -0700 | [diff] [blame] | 1575 | * Persistent store for the system-wide default alarm alert. |
| 1576 | * |
| 1577 | * @see #RINGTONE |
| 1578 | * @see #DEFAULT_ALARM_ALERT_URI |
| 1579 | */ |
| 1580 | public static final String ALARM_ALERT = "alarm_alert"; |
| 1581 | |
| 1582 | /** |
| 1583 | * A {@link Uri} that will point to the current default alarm alert at |
| 1584 | * any given time. |
| 1585 | * |
| 1586 | * @see #DEFAULT_ALARM_ALERT_URI |
| 1587 | */ |
| 1588 | public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT); |
| 1589 | |
| 1590 | /** |
Jean-Michel Trivi | d589fea | 2011-04-15 11:28:10 -0700 | [diff] [blame] | 1591 | * Persistent store for the system default media button event receiver. |
| 1592 | * |
| 1593 | * @hide |
| 1594 | */ |
| 1595 | public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver"; |
| 1596 | |
| 1597 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1598 | * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off |
| 1599 | */ |
| 1600 | public static final String TEXT_AUTO_REPLACE = "auto_replace"; |
| 1601 | |
| 1602 | /** |
| 1603 | * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off |
| 1604 | */ |
| 1605 | public static final String TEXT_AUTO_CAPS = "auto_caps"; |
| 1606 | |
| 1607 | /** |
| 1608 | * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This |
| 1609 | * feature converts two spaces to a "." and space. |
| 1610 | */ |
| 1611 | public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1612 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1613 | /** |
| 1614 | * Setting to showing password characters in text editors. 1 = On, 0 = Off |
| 1615 | */ |
| 1616 | public static final String TEXT_SHOW_PASSWORD = "show_password"; |
| 1617 | |
| 1618 | public static final String SHOW_GTALK_SERVICE_STATUS = |
| 1619 | "SHOW_GTALK_SERVICE_STATUS"; |
| 1620 | |
| 1621 | /** |
| 1622 | * Name of activity to use for wallpaper on the home screen. |
| 1623 | */ |
| 1624 | public static final String WALLPAPER_ACTIVITY = "wallpaper_activity"; |
| 1625 | |
| 1626 | /** |
| 1627 | * Value to specify if the user prefers the date, time and time zone |
| 1628 | * to be automatically fetched from the network (NITZ). 1=yes, 0=no |
| 1629 | */ |
| 1630 | public static final String AUTO_TIME = "auto_time"; |
| 1631 | |
| 1632 | /** |
Amith Yamasani | ad450be | 2010-09-16 16:47:00 -0700 | [diff] [blame] | 1633 | * Value to specify if the user prefers the time zone |
| 1634 | * to be automatically fetched from the network (NITZ). 1=yes, 0=no |
| 1635 | */ |
| 1636 | public static final String AUTO_TIME_ZONE = "auto_time_zone"; |
| 1637 | |
| 1638 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1639 | * Display times as 12 or 24 hours |
| 1640 | * 12 |
| 1641 | * 24 |
| 1642 | */ |
| 1643 | public static final String TIME_12_24 = "time_12_24"; |
| 1644 | |
| 1645 | /** |
| 1646 | * Date format string |
| 1647 | * mm/dd/yyyy |
| 1648 | * dd/mm/yyyy |
| 1649 | * yyyy/mm/dd |
| 1650 | */ |
| 1651 | public static final String DATE_FORMAT = "date_format"; |
| 1652 | |
| 1653 | /** |
| 1654 | * Whether the setup wizard has been run before (on first boot), or if |
| 1655 | * it still needs to be run. |
| 1656 | * |
| 1657 | * nonzero = it has been run in the past |
| 1658 | * 0 = it has not been run in the past |
| 1659 | */ |
| 1660 | public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run"; |
| 1661 | |
| 1662 | /** |
| 1663 | * Scaling factor for normal window animations. Setting to 0 will disable window |
| 1664 | * animations. |
| 1665 | */ |
| 1666 | public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale"; |
| 1667 | |
| 1668 | /** |
| 1669 | * Scaling factor for activity transition animations. Setting to 0 will disable window |
| 1670 | * animations. |
| 1671 | */ |
| 1672 | public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; |
| 1673 | |
| 1674 | /** |
| 1675 | * Scaling factor for normal window animations. Setting to 0 will disable window |
| 1676 | * animations. |
| 1677 | * @hide |
| 1678 | */ |
| 1679 | public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations"; |
| 1680 | |
| 1681 | /** |
| 1682 | * Control whether the accelerometer will be used to change screen |
| 1683 | * orientation. If 0, it will not be used unless explicitly requested |
| 1684 | * by the application; if 1, it will be used by default unless explicitly |
| 1685 | * disabled by the application. |
| 1686 | */ |
| 1687 | public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; |
| 1688 | |
| 1689 | /** |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 1690 | * Default screen rotation when no other policy applies. |
| 1691 | * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a |
| 1692 | * preference, this rotation value will be used. Must be one of the |
Brian Muramatsu | e1d4698 | 2010-12-06 17:34:20 -0800 | [diff] [blame] | 1693 | * {@link android.view.Surface#ROTATION_0 Surface rotation constants}. |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 1694 | * |
| 1695 | * @see Display#getRotation |
| 1696 | */ |
| 1697 | public static final String USER_ROTATION = "user_rotation"; |
| 1698 | |
| 1699 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1700 | * Whether the audible DTMF tones are played by the dialer when dialing. The value is |
| 1701 | * boolean (1 or 0). |
| 1702 | */ |
| 1703 | public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone"; |
| 1704 | |
| 1705 | /** |
David Krause | d0f6715 | 2009-06-13 18:01:13 -0500 | [diff] [blame] | 1706 | * CDMA only settings |
| 1707 | * DTMF tone type played by the dialer when dialing. |
| 1708 | * 0 = Normal |
| 1709 | * 1 = Long |
| 1710 | * @hide |
| 1711 | */ |
| 1712 | public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; |
| 1713 | |
| 1714 | /** |
| 1715 | * CDMA only settings |
| 1716 | * Emergency Tone 0 = Off |
| 1717 | * 1 = Alert |
| 1718 | * 2 = Vibrate |
| 1719 | * @hide |
| 1720 | */ |
| 1721 | public static final String EMERGENCY_TONE = "emergency_tone"; |
| 1722 | |
| 1723 | /** |
| 1724 | * CDMA only settings |
| 1725 | * Whether the auto retry is enabled. The value is |
| 1726 | * boolean (1 or 0). |
| 1727 | * @hide |
| 1728 | */ |
| 1729 | public static final String CALL_AUTO_RETRY = "call_auto_retry"; |
| 1730 | |
| 1731 | /** |
| 1732 | * Whether the hearing aid is enabled. The value is |
| 1733 | * boolean (1 or 0). |
| 1734 | * @hide |
| 1735 | */ |
| 1736 | public static final String HEARING_AID = "hearing_aid"; |
| 1737 | |
| 1738 | /** |
| 1739 | * CDMA only settings |
| 1740 | * TTY Mode |
| 1741 | * 0 = OFF |
| 1742 | * 1 = FULL |
| 1743 | * 2 = VCO |
| 1744 | * 3 = HCO |
| 1745 | * @hide |
| 1746 | */ |
| 1747 | public static final String TTY_MODE = "tty_mode"; |
| 1748 | |
| 1749 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1750 | * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is |
| 1751 | * boolean (1 or 0). |
| 1752 | */ |
| 1753 | public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1754 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1755 | /** |
| 1756 | * Whether the haptic feedback (long presses, ...) are enabled. The value is |
| 1757 | * boolean (1 or 0). |
| 1758 | */ |
| 1759 | public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled"; |
Sanjay Jeyakumar | 21bf241 | 2009-07-09 13:31:48 -0700 | [diff] [blame] | 1760 | |
Mike LeBeau | 48603e7 | 2009-06-05 00:27:00 +0100 | [diff] [blame] | 1761 | /** |
Bjorn Bringert | 24abb66 | 2010-09-21 12:21:18 +0100 | [diff] [blame] | 1762 | * @deprecated Each application that shows web suggestions should have its own |
| 1763 | * setting for this. |
Mike LeBeau | 48603e7 | 2009-06-05 00:27:00 +0100 | [diff] [blame] | 1764 | */ |
Bjorn Bringert | 24abb66 | 2010-09-21 12:21:18 +0100 | [diff] [blame] | 1765 | @Deprecated |
Mike LeBeau | 48603e7 | 2009-06-05 00:27:00 +0100 | [diff] [blame] | 1766 | public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1767 | |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 1768 | /** |
Amith Yamasani | ae3ed70 | 2009-12-01 19:02:05 -0800 | [diff] [blame] | 1769 | * Whether the notification LED should repeatedly flash when a notification is |
| 1770 | * pending. The value is boolean (1 or 0). |
| 1771 | * @hide |
| 1772 | */ |
| 1773 | public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; |
| 1774 | |
| 1775 | /** |
Dianne Hackborn | 90d2db3 | 2010-02-11 22:19:06 -0800 | [diff] [blame] | 1776 | * Show pointer location on screen? |
| 1777 | * 0 = no |
| 1778 | * 1 = yes |
| 1779 | * @hide |
| 1780 | */ |
| 1781 | public static final String POINTER_LOCATION = "pointer_location"; |
| 1782 | |
| 1783 | /** |
Jeff Brown | daf4a12 | 2011-08-26 17:14:14 -0700 | [diff] [blame] | 1784 | * Show touch positions on screen? |
| 1785 | * 0 = no |
| 1786 | * 1 = yes |
| 1787 | * @hide |
| 1788 | */ |
| 1789 | public static final String SHOW_TOUCHES = "show_touches"; |
| 1790 | |
| 1791 | /** |
Jeff Brown | 4519f07 | 2011-01-23 13:16:01 -0800 | [diff] [blame] | 1792 | * Log raw orientation data from {@link WindowOrientationListener} for use with the |
| 1793 | * orientationplot.py tool. |
| 1794 | * 0 = no |
| 1795 | * 1 = yes |
| 1796 | * @hide |
| 1797 | */ |
| 1798 | public static final String WINDOW_ORIENTATION_LISTENER_LOG = |
| 1799 | "window_orientation_listener_log"; |
| 1800 | |
| 1801 | /** |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 1802 | * Whether to play a sound for low-battery alerts. |
| 1803 | * @hide |
| 1804 | */ |
| 1805 | public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled"; |
| 1806 | |
| 1807 | /** |
| 1808 | * Whether to play a sound for dock events. |
| 1809 | * @hide |
| 1810 | */ |
| 1811 | public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled"; |
| 1812 | |
| 1813 | /** |
| 1814 | * Whether to play sounds when the keyguard is shown and dismissed. |
| 1815 | * @hide |
| 1816 | */ |
| 1817 | public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled"; |
| 1818 | |
| 1819 | /** |
| 1820 | * URI for the low battery sound file. |
| 1821 | * @hide |
| 1822 | */ |
| 1823 | public static final String LOW_BATTERY_SOUND = "low_battery_sound"; |
| 1824 | |
| 1825 | /** |
| 1826 | * URI for the desk dock "in" event sound. |
| 1827 | * @hide |
| 1828 | */ |
| 1829 | public static final String DESK_DOCK_SOUND = "desk_dock_sound"; |
| 1830 | |
| 1831 | /** |
| 1832 | * URI for the desk dock "out" event sound. |
| 1833 | * @hide |
| 1834 | */ |
| 1835 | public static final String DESK_UNDOCK_SOUND = "desk_undock_sound"; |
| 1836 | |
| 1837 | /** |
| 1838 | * URI for the car dock "in" event sound. |
| 1839 | * @hide |
| 1840 | */ |
| 1841 | public static final String CAR_DOCK_SOUND = "car_dock_sound"; |
| 1842 | |
| 1843 | /** |
| 1844 | * URI for the car dock "out" event sound. |
| 1845 | * @hide |
| 1846 | */ |
| 1847 | public static final String CAR_UNDOCK_SOUND = "car_undock_sound"; |
| 1848 | |
| 1849 | /** |
| 1850 | * URI for the "device locked" (keyguard shown) sound. |
| 1851 | * @hide |
| 1852 | */ |
| 1853 | public static final String LOCK_SOUND = "lock_sound"; |
| 1854 | |
| 1855 | /** |
| 1856 | * URI for the "device unlocked" (keyguard dismissed) sound. |
| 1857 | * @hide |
| 1858 | */ |
| 1859 | public static final String UNLOCK_SOUND = "unlock_sound"; |
| 1860 | |
| 1861 | /** |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 1862 | * Receive incoming SIP calls? |
| 1863 | * 0 = no |
| 1864 | * 1 = yes |
| 1865 | * @hide |
| 1866 | */ |
| 1867 | public static final String SIP_RECEIVE_CALLS = "sip_receive_calls"; |
| 1868 | |
| 1869 | /** |
| 1870 | * Call Preference String. |
| 1871 | * "SIP_ALWAYS" : Always use SIP with network access |
| 1872 | * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address |
| 1873 | * "SIP_ASK_ME_EACH_TIME" : Always ask me each time |
| 1874 | * @hide |
| 1875 | */ |
| 1876 | public static final String SIP_CALL_OPTIONS = "sip_call_options"; |
| 1877 | |
| 1878 | /** |
| 1879 | * One of the sip call options: Always use SIP with network access. |
| 1880 | * @hide |
| 1881 | */ |
| 1882 | public static final String SIP_ALWAYS = "SIP_ALWAYS"; |
| 1883 | |
| 1884 | /** |
| 1885 | * One of the sip call options: Only if destination is a SIP address. |
| 1886 | * @hide |
| 1887 | */ |
| 1888 | public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY"; |
| 1889 | |
| 1890 | /** |
| 1891 | * One of the sip call options: Always ask me each time. |
| 1892 | * @hide |
| 1893 | */ |
| 1894 | public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME"; |
| 1895 | |
| 1896 | /** |
Jeff Brown | 1a84fd1 | 2011-06-02 01:26:32 -0700 | [diff] [blame] | 1897 | * Pointer speed setting. |
| 1898 | * This is an integer value in a range between -7 and +7, so there are 15 possible values. |
| 1899 | * -7 = slowest |
| 1900 | * 0 = default speed |
| 1901 | * +7 = fastest |
| 1902 | * @hide |
| 1903 | */ |
| 1904 | public static final String POINTER_SPEED = "pointer_speed"; |
| 1905 | |
| 1906 | /** |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 1907 | * Settings to backup. This is here so that it's in the same place as the settings |
| 1908 | * keys and easy to update. |
Svetoslav Ganov | a571a58 | 2011-09-20 18:32:20 -0700 | [diff] [blame] | 1909 | * |
| 1910 | * NOTE: Settings are backed up and restored in the order they appear |
| 1911 | * in this array. If you have one setting depending on another, |
| 1912 | * make sure that they are ordered appropriately. |
| 1913 | * |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 1914 | * @hide |
| 1915 | */ |
| 1916 | public static final String[] SETTINGS_TO_BACKUP = { |
| 1917 | STAY_ON_WHILE_PLUGGED_IN, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 1918 | WIFI_USE_STATIC_IP, |
| 1919 | WIFI_STATIC_IP, |
| 1920 | WIFI_STATIC_GATEWAY, |
| 1921 | WIFI_STATIC_NETMASK, |
| 1922 | WIFI_STATIC_DNS1, |
| 1923 | WIFI_STATIC_DNS2, |
| 1924 | BLUETOOTH_DISCOVERABILITY, |
| 1925 | BLUETOOTH_DISCOVERABILITY_TIMEOUT, |
| 1926 | DIM_SCREEN, |
| 1927 | SCREEN_OFF_TIMEOUT, |
| 1928 | SCREEN_BRIGHTNESS, |
Christopher Tate | 362aca6 | 2009-09-25 15:58:03 -0700 | [diff] [blame] | 1929 | SCREEN_BRIGHTNESS_MODE, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 1930 | VIBRATE_ON, |
Amith Yamasani | 8823c0a8 | 2009-07-07 14:30:17 -0700 | [diff] [blame] | 1931 | MODE_RINGER, |
| 1932 | MODE_RINGER_STREAMS_AFFECTED, |
| 1933 | MUTE_STREAMS_AFFECTED, |
| 1934 | VOLUME_VOICE, |
| 1935 | VOLUME_SYSTEM, |
| 1936 | VOLUME_RING, |
| 1937 | VOLUME_MUSIC, |
| 1938 | VOLUME_ALARM, |
| 1939 | VOLUME_NOTIFICATION, |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 1940 | VOLUME_BLUETOOTH_SCO, |
Amith Yamasani | 8823c0a8 | 2009-07-07 14:30:17 -0700 | [diff] [blame] | 1941 | VOLUME_VOICE + APPEND_FOR_LAST_AUDIBLE, |
| 1942 | VOLUME_SYSTEM + APPEND_FOR_LAST_AUDIBLE, |
| 1943 | VOLUME_RING + APPEND_FOR_LAST_AUDIBLE, |
| 1944 | VOLUME_MUSIC + APPEND_FOR_LAST_AUDIBLE, |
| 1945 | VOLUME_ALARM + APPEND_FOR_LAST_AUDIBLE, |
| 1946 | VOLUME_NOTIFICATION + APPEND_FOR_LAST_AUDIBLE, |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 1947 | VOLUME_BLUETOOTH_SCO + APPEND_FOR_LAST_AUDIBLE, |
Daniel Sandler | 1c7fa48 | 2010-03-10 09:45:01 -0500 | [diff] [blame] | 1948 | VIBRATE_IN_SILENT, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 1949 | TEXT_AUTO_REPLACE, |
| 1950 | TEXT_AUTO_CAPS, |
| 1951 | TEXT_AUTO_PUNCTUATE, |
| 1952 | TEXT_SHOW_PASSWORD, |
| 1953 | AUTO_TIME, |
Amith Yamasani | ad450be | 2010-09-16 16:47:00 -0700 | [diff] [blame] | 1954 | AUTO_TIME_ZONE, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 1955 | TIME_12_24, |
| 1956 | DATE_FORMAT, |
| 1957 | ACCELEROMETER_ROTATION, |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 1958 | USER_ROTATION, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 1959 | DTMF_TONE_WHEN_DIALING, |
| 1960 | DTMF_TONE_TYPE_WHEN_DIALING, |
| 1961 | EMERGENCY_TONE, |
| 1962 | CALL_AUTO_RETRY, |
| 1963 | HEARING_AID, |
| 1964 | TTY_MODE, |
| 1965 | SOUND_EFFECTS_ENABLED, |
| 1966 | HAPTIC_FEEDBACK_ENABLED, |
Christopher Tate | 14c2d79 | 2010-02-25 16:49:44 -0800 | [diff] [blame] | 1967 | POWER_SOUNDS_ENABLED, |
| 1968 | DOCK_SOUNDS_ENABLED, |
| 1969 | LOCKSCREEN_SOUNDS_ENABLED, |
Amith Yamasani | ae3ed70 | 2009-12-01 19:02:05 -0800 | [diff] [blame] | 1970 | SHOW_WEB_SUGGESTIONS, |
Mike Lockwood | eabe8bf | 2010-08-31 14:35:23 -0400 | [diff] [blame] | 1971 | NOTIFICATION_LIGHT_PULSE, |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 1972 | SIP_CALL_OPTIONS, |
Nick Pelly | 038cabe | 2010-09-23 16:12:11 -0700 | [diff] [blame] | 1973 | SIP_RECEIVE_CALLS, |
Jeff Brown | 1a84fd1 | 2011-06-02 01:26:32 -0700 | [diff] [blame] | 1974 | POINTER_SPEED, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 1975 | }; |
| 1976 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1977 | // Settings moved to Settings.Secure |
| 1978 | |
| 1979 | /** |
Mike Lockwood | 460ae0c | 2009-04-02 22:33:27 -0700 | [diff] [blame] | 1980 | * @deprecated Use {@link android.provider.Settings.Secure#ADB_ENABLED} |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1981 | * instead |
| 1982 | */ |
| 1983 | @Deprecated |
| 1984 | public static final String ADB_ENABLED = Secure.ADB_ENABLED; |
| 1985 | |
| 1986 | /** |
| 1987 | * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead |
| 1988 | */ |
| 1989 | @Deprecated |
| 1990 | public static final String ANDROID_ID = Secure.ANDROID_ID; |
| 1991 | |
| 1992 | /** |
| 1993 | * @deprecated Use {@link android.provider.Settings.Secure#BLUETOOTH_ON} instead |
| 1994 | */ |
| 1995 | @Deprecated |
| 1996 | public static final String BLUETOOTH_ON = Secure.BLUETOOTH_ON; |
| 1997 | |
| 1998 | /** |
| 1999 | * @deprecated Use {@link android.provider.Settings.Secure#DATA_ROAMING} instead |
| 2000 | */ |
| 2001 | @Deprecated |
| 2002 | public static final String DATA_ROAMING = Secure.DATA_ROAMING; |
| 2003 | |
| 2004 | /** |
| 2005 | * @deprecated Use {@link android.provider.Settings.Secure#DEVICE_PROVISIONED} instead |
| 2006 | */ |
| 2007 | @Deprecated |
| 2008 | public static final String DEVICE_PROVISIONED = Secure.DEVICE_PROVISIONED; |
| 2009 | |
| 2010 | /** |
| 2011 | * @deprecated Use {@link android.provider.Settings.Secure#HTTP_PROXY} instead |
| 2012 | */ |
| 2013 | @Deprecated |
| 2014 | public static final String HTTP_PROXY = Secure.HTTP_PROXY; |
| 2015 | |
| 2016 | /** |
| 2017 | * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead |
| 2018 | */ |
| 2019 | @Deprecated |
| 2020 | 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] | 2021 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2022 | /** |
| 2023 | * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED} |
| 2024 | * instead |
| 2025 | */ |
| 2026 | @Deprecated |
| 2027 | public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED; |
| 2028 | |
| 2029 | /** |
| 2030 | * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead |
| 2031 | */ |
| 2032 | @Deprecated |
| 2033 | public static final String LOGGING_ID = Secure.LOGGING_ID; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2034 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2035 | /** |
| 2036 | * @deprecated Use {@link android.provider.Settings.Secure#NETWORK_PREFERENCE} instead |
| 2037 | */ |
| 2038 | @Deprecated |
| 2039 | public static final String NETWORK_PREFERENCE = Secure.NETWORK_PREFERENCE; |
| 2040 | |
| 2041 | /** |
| 2042 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED} |
| 2043 | * instead |
| 2044 | */ |
| 2045 | @Deprecated |
| 2046 | public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED; |
| 2047 | |
| 2048 | /** |
| 2049 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE} |
| 2050 | * instead |
| 2051 | */ |
| 2052 | @Deprecated |
| 2053 | public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE; |
| 2054 | |
| 2055 | /** |
| 2056 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL} |
| 2057 | * instead |
| 2058 | */ |
| 2059 | @Deprecated |
| 2060 | public static final String PARENTAL_CONTROL_REDIRECT_URL = |
| 2061 | Secure.PARENTAL_CONTROL_REDIRECT_URL; |
| 2062 | |
| 2063 | /** |
| 2064 | * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead |
| 2065 | */ |
| 2066 | @Deprecated |
| 2067 | public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME; |
| 2068 | |
| 2069 | /** |
| 2070 | * @deprecated Use {@link android.provider.Settings.Secure#USB_MASS_STORAGE_ENABLED} instead |
| 2071 | */ |
| 2072 | @Deprecated |
| 2073 | public static final String USB_MASS_STORAGE_ENABLED = Secure.USB_MASS_STORAGE_ENABLED; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2074 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2075 | /** |
| 2076 | * @deprecated Use {@link android.provider.Settings.Secure#USE_GOOGLE_MAIL} instead |
| 2077 | */ |
| 2078 | @Deprecated |
| 2079 | public static final String USE_GOOGLE_MAIL = Secure.USE_GOOGLE_MAIL; |
| 2080 | |
Dianne Hackborn | 4a51c20 | 2009-08-21 15:14:02 -0700 | [diff] [blame] | 2081 | /** |
| 2082 | * @deprecated Use |
| 2083 | * {@link android.provider.Settings.Secure#WIFI_MAX_DHCP_RETRY_COUNT} instead |
| 2084 | */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2085 | @Deprecated |
| 2086 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = Secure.WIFI_MAX_DHCP_RETRY_COUNT; |
| 2087 | |
Dianne Hackborn | 4a51c20 | 2009-08-21 15:14:02 -0700 | [diff] [blame] | 2088 | /** |
| 2089 | * @deprecated Use |
| 2090 | * {@link android.provider.Settings.Secure#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead |
| 2091 | */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2092 | @Deprecated |
| 2093 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
| 2094 | Secure.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; |
| 2095 | |
| 2096 | /** |
| 2097 | * @deprecated Use |
| 2098 | * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead |
| 2099 | */ |
| 2100 | @Deprecated |
| 2101 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 2102 | Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; |
| 2103 | |
| 2104 | /** |
| 2105 | * @deprecated Use |
| 2106 | * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead |
| 2107 | */ |
| 2108 | @Deprecated |
| 2109 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
| 2110 | Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2111 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2112 | /** |
| 2113 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_NUM_OPEN_NETWORKS_KEPT} |
| 2114 | * instead |
| 2115 | */ |
| 2116 | @Deprecated |
| 2117 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = Secure.WIFI_NUM_OPEN_NETWORKS_KEPT; |
| 2118 | |
| 2119 | /** |
| 2120 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_ON} instead |
| 2121 | */ |
| 2122 | @Deprecated |
| 2123 | public static final String WIFI_ON = Secure.WIFI_ON; |
| 2124 | |
| 2125 | /** |
| 2126 | * @deprecated Use |
| 2127 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE} |
| 2128 | * instead |
| 2129 | */ |
| 2130 | @Deprecated |
| 2131 | public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = |
| 2132 | Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE; |
| 2133 | |
| 2134 | /** |
| 2135 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead |
| 2136 | */ |
| 2137 | @Deprecated |
| 2138 | public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT; |
| 2139 | |
| 2140 | /** |
| 2141 | * @deprecated Use |
| 2142 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead |
| 2143 | */ |
| 2144 | @Deprecated |
| 2145 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = |
| 2146 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2147 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2148 | /** |
| 2149 | * @deprecated Use |
| 2150 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead |
| 2151 | */ |
| 2152 | @Deprecated |
| 2153 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = |
| 2154 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED; |
| 2155 | |
| 2156 | /** |
| 2157 | * @deprecated Use |
| 2158 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS} |
| 2159 | * instead |
| 2160 | */ |
| 2161 | @Deprecated |
| 2162 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = |
| 2163 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS; |
| 2164 | |
| 2165 | /** |
| 2166 | * @deprecated Use |
| 2167 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead |
| 2168 | */ |
| 2169 | @Deprecated |
| 2170 | public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = |
| 2171 | Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT; |
| 2172 | |
| 2173 | /** |
| 2174 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS} |
| 2175 | * instead |
| 2176 | */ |
| 2177 | @Deprecated |
| 2178 | public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS; |
| 2179 | |
| 2180 | /** |
| 2181 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ON} instead |
| 2182 | */ |
| 2183 | @Deprecated |
| 2184 | public static final String WIFI_WATCHDOG_ON = Secure.WIFI_WATCHDOG_ON; |
| 2185 | |
| 2186 | /** |
| 2187 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead |
| 2188 | */ |
| 2189 | @Deprecated |
| 2190 | public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT; |
| 2191 | |
| 2192 | /** |
| 2193 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS} |
| 2194 | * instead |
| 2195 | */ |
| 2196 | @Deprecated |
| 2197 | public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS; |
| 2198 | |
| 2199 | /** |
| 2200 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS} |
| 2201 | * instead |
| 2202 | */ |
| 2203 | @Deprecated |
| 2204 | public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = |
| 2205 | Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS; |
| 2206 | } |
| 2207 | |
| 2208 | /** |
| 2209 | * Secure system settings, containing system preferences that applications |
| 2210 | * can read but are not allowed to write. These are for preferences that |
| 2211 | * the user must explicitly modify through the system UI or specialized |
| 2212 | * APIs for those values, not modified directly by applications. |
| 2213 | */ |
| 2214 | public static final class Secure extends NameValueTable { |
| 2215 | public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version"; |
| 2216 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 2217 | // Populated lazily, guarded by class object: |
| 2218 | private static NameValueCache sNameValueCache = null; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2219 | |
| 2220 | /** |
| 2221 | * Look up a name in the database. |
| 2222 | * @param resolver to access the database with |
| 2223 | * @param name to look up in the table |
| 2224 | * @return the corresponding value, or null if not present |
| 2225 | */ |
| 2226 | public synchronized static String getString(ContentResolver resolver, String name) { |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 2227 | if (sNameValueCache == null) { |
| 2228 | sNameValueCache = new NameValueCache(SYS_PROP_SETTING_VERSION, CONTENT_URI, |
| 2229 | CALL_METHOD_GET_SECURE); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2230 | } |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 2231 | return sNameValueCache.getString(resolver, name); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2232 | } |
| 2233 | |
| 2234 | /** |
| 2235 | * Store a name/value pair into the database. |
| 2236 | * @param resolver to access the database with |
| 2237 | * @param name to store |
| 2238 | * @param value to associate with the name |
| 2239 | * @return true if the value was set, false on database errors |
| 2240 | */ |
| 2241 | public static boolean putString(ContentResolver resolver, |
| 2242 | String name, String value) { |
| 2243 | return putString(resolver, CONTENT_URI, name, value); |
| 2244 | } |
| 2245 | |
| 2246 | /** |
| 2247 | * Construct the content URI for a particular name/value pair, |
| 2248 | * useful for monitoring changes with a ContentObserver. |
| 2249 | * @param name to look up in the table |
| 2250 | * @return the corresponding content URI, or null if not present |
| 2251 | */ |
| 2252 | public static Uri getUriFor(String name) { |
| 2253 | return getUriFor(CONTENT_URI, name); |
| 2254 | } |
| 2255 | |
| 2256 | /** |
| 2257 | * Convenience function for retrieving a single secure settings value |
| 2258 | * as an integer. Note that internally setting values are always |
| 2259 | * stored as strings; this function converts the string to an integer |
| 2260 | * for you. The default value will be returned if the setting is |
| 2261 | * not defined or not an integer. |
| 2262 | * |
| 2263 | * @param cr The ContentResolver to access. |
| 2264 | * @param name The name of the setting to retrieve. |
| 2265 | * @param def Value to return if the setting is not defined. |
| 2266 | * |
| 2267 | * @return The setting's current value, or 'def' if it is not defined |
| 2268 | * or not a valid integer. |
| 2269 | */ |
| 2270 | public static int getInt(ContentResolver cr, String name, int def) { |
| 2271 | String v = getString(cr, name); |
| 2272 | try { |
| 2273 | return v != null ? Integer.parseInt(v) : def; |
| 2274 | } catch (NumberFormatException e) { |
| 2275 | return def; |
| 2276 | } |
| 2277 | } |
| 2278 | |
| 2279 | /** |
| 2280 | * Convenience function for retrieving a single secure settings value |
| 2281 | * as an integer. Note that internally setting values are always |
| 2282 | * stored as strings; this function converts the string to an integer |
| 2283 | * for you. |
| 2284 | * <p> |
| 2285 | * This version does not take a default value. If the setting has not |
| 2286 | * been set, or the string value is not a number, |
| 2287 | * it throws {@link SettingNotFoundException}. |
| 2288 | * |
| 2289 | * @param cr The ContentResolver to access. |
| 2290 | * @param name The name of the setting to retrieve. |
| 2291 | * |
| 2292 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 2293 | * name can't be found or the setting value is not an integer. |
| 2294 | * |
| 2295 | * @return The setting's current value. |
| 2296 | */ |
| 2297 | public static int getInt(ContentResolver cr, String name) |
| 2298 | throws SettingNotFoundException { |
| 2299 | String v = getString(cr, name); |
| 2300 | try { |
| 2301 | return Integer.parseInt(v); |
| 2302 | } catch (NumberFormatException e) { |
| 2303 | throw new SettingNotFoundException(name); |
| 2304 | } |
| 2305 | } |
| 2306 | |
| 2307 | /** |
| 2308 | * Convenience function for updating a single settings value as an |
| 2309 | * integer. This will either create a new entry in the table if the |
| 2310 | * given name does not exist, or modify the value of the existing row |
| 2311 | * with that name. Note that internally setting values are always |
| 2312 | * stored as strings, so this function converts the given value to a |
| 2313 | * string before storing it. |
| 2314 | * |
| 2315 | * @param cr The ContentResolver to access. |
| 2316 | * @param name The name of the setting to modify. |
| 2317 | * @param value The new value for the setting. |
| 2318 | * @return true if the value was set, false on database errors |
| 2319 | */ |
| 2320 | public static boolean putInt(ContentResolver cr, String name, int value) { |
| 2321 | return putString(cr, name, Integer.toString(value)); |
| 2322 | } |
| 2323 | |
| 2324 | /** |
| 2325 | * Convenience function for retrieving a single secure settings value |
| 2326 | * as a {@code long}. Note that internally setting values are always |
| 2327 | * stored as strings; this function converts the string to a {@code long} |
| 2328 | * for you. The default value will be returned if the setting is |
| 2329 | * not defined or not a {@code long}. |
| 2330 | * |
| 2331 | * @param cr The ContentResolver to access. |
| 2332 | * @param name The name of the setting to retrieve. |
| 2333 | * @param def Value to return if the setting is not defined. |
| 2334 | * |
| 2335 | * @return The setting's current value, or 'def' if it is not defined |
| 2336 | * or not a valid {@code long}. |
| 2337 | */ |
| 2338 | public static long getLong(ContentResolver cr, String name, long def) { |
| 2339 | String valString = getString(cr, name); |
| 2340 | long value; |
| 2341 | try { |
| 2342 | value = valString != null ? Long.parseLong(valString) : def; |
| 2343 | } catch (NumberFormatException e) { |
| 2344 | value = def; |
| 2345 | } |
| 2346 | return value; |
| 2347 | } |
| 2348 | |
| 2349 | /** |
| 2350 | * Convenience function for retrieving a single secure settings value |
| 2351 | * as a {@code long}. Note that internally setting values are always |
| 2352 | * stored as strings; this function converts the string to a {@code long} |
| 2353 | * for you. |
| 2354 | * <p> |
| 2355 | * This version does not take a default value. If the setting has not |
| 2356 | * been set, or the string value is not a number, |
| 2357 | * it throws {@link SettingNotFoundException}. |
| 2358 | * |
| 2359 | * @param cr The ContentResolver to access. |
| 2360 | * @param name The name of the setting to retrieve. |
| 2361 | * |
| 2362 | * @return The setting's current value. |
| 2363 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 2364 | * name can't be found or the setting value is not an integer. |
| 2365 | */ |
| 2366 | public static long getLong(ContentResolver cr, String name) |
| 2367 | throws SettingNotFoundException { |
| 2368 | String valString = getString(cr, name); |
| 2369 | try { |
| 2370 | return Long.parseLong(valString); |
| 2371 | } catch (NumberFormatException e) { |
| 2372 | throw new SettingNotFoundException(name); |
| 2373 | } |
| 2374 | } |
| 2375 | |
| 2376 | /** |
| 2377 | * Convenience function for updating a secure settings value as a long |
| 2378 | * integer. This will either create a new entry in the table if the |
| 2379 | * given name does not exist, or modify the value of the existing row |
| 2380 | * with that name. Note that internally setting values are always |
| 2381 | * stored as strings, so this function converts the given value to a |
| 2382 | * string before storing it. |
| 2383 | * |
| 2384 | * @param cr The ContentResolver to access. |
| 2385 | * @param name The name of the setting to modify. |
| 2386 | * @param value The new value for the setting. |
| 2387 | * @return true if the value was set, false on database errors |
| 2388 | */ |
| 2389 | public static boolean putLong(ContentResolver cr, String name, long value) { |
| 2390 | return putString(cr, name, Long.toString(value)); |
| 2391 | } |
| 2392 | |
| 2393 | /** |
| 2394 | * Convenience function for retrieving a single secure settings value |
| 2395 | * as a floating point number. Note that internally setting values are |
| 2396 | * always stored as strings; this function converts the string to an |
| 2397 | * float for you. The default value will be returned if the setting |
| 2398 | * is not defined or not a valid float. |
| 2399 | * |
| 2400 | * @param cr The ContentResolver to access. |
| 2401 | * @param name The name of the setting to retrieve. |
| 2402 | * @param def Value to return if the setting is not defined. |
| 2403 | * |
| 2404 | * @return The setting's current value, or 'def' if it is not defined |
| 2405 | * or not a valid float. |
| 2406 | */ |
| 2407 | public static float getFloat(ContentResolver cr, String name, float def) { |
| 2408 | String v = getString(cr, name); |
| 2409 | try { |
| 2410 | return v != null ? Float.parseFloat(v) : def; |
| 2411 | } catch (NumberFormatException e) { |
| 2412 | return def; |
| 2413 | } |
| 2414 | } |
| 2415 | |
| 2416 | /** |
| 2417 | * Convenience function for retrieving a single secure settings value |
| 2418 | * as a float. Note that internally setting values are always |
| 2419 | * stored as strings; this function converts the string to a float |
| 2420 | * for you. |
| 2421 | * <p> |
| 2422 | * This version does not take a default value. If the setting has not |
| 2423 | * been set, or the string value is not a number, |
| 2424 | * it throws {@link SettingNotFoundException}. |
| 2425 | * |
| 2426 | * @param cr The ContentResolver to access. |
| 2427 | * @param name The name of the setting to retrieve. |
| 2428 | * |
| 2429 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 2430 | * name can't be found or the setting value is not a float. |
| 2431 | * |
| 2432 | * @return The setting's current value. |
| 2433 | */ |
| 2434 | public static float getFloat(ContentResolver cr, String name) |
| 2435 | throws SettingNotFoundException { |
| 2436 | String v = getString(cr, name); |
Brian Muramatsu | e1d4698 | 2010-12-06 17:34:20 -0800 | [diff] [blame] | 2437 | if (v == null) { |
| 2438 | throw new SettingNotFoundException(name); |
| 2439 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2440 | try { |
| 2441 | return Float.parseFloat(v); |
| 2442 | } catch (NumberFormatException e) { |
| 2443 | throw new SettingNotFoundException(name); |
| 2444 | } |
| 2445 | } |
| 2446 | |
| 2447 | /** |
| 2448 | * Convenience function for updating a single settings value as a |
| 2449 | * floating point number. This will either create a new entry in the |
| 2450 | * table if the given name does not exist, or modify the value of the |
| 2451 | * existing row with that name. Note that internally setting values |
| 2452 | * are always stored as strings, so this function converts the given |
| 2453 | * value to a string before storing it. |
| 2454 | * |
| 2455 | * @param cr The ContentResolver to access. |
| 2456 | * @param name The name of the setting to modify. |
| 2457 | * @param value The new value for the setting. |
| 2458 | * @return true if the value was set, false on database errors |
| 2459 | */ |
| 2460 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
| 2461 | return putString(cr, name, Float.toString(value)); |
| 2462 | } |
| 2463 | |
| 2464 | /** |
| 2465 | * The content:// style URL for this table |
| 2466 | */ |
| 2467 | public static final Uri CONTENT_URI = |
| 2468 | Uri.parse("content://" + AUTHORITY + "/secure"); |
| 2469 | |
| 2470 | /** |
| 2471 | * Whether ADB is enabled. |
| 2472 | */ |
| 2473 | public static final String ADB_ENABLED = "adb_enabled"; |
| 2474 | |
| 2475 | /** |
| 2476 | * Setting to allow mock locations and location provider status to be injected into the |
| 2477 | * LocationManager service for testing purposes during application development. These |
| 2478 | * locations and status values override actual location and status information generated |
| 2479 | * by network, gps, or other location providers. |
| 2480 | */ |
| 2481 | public static final String ALLOW_MOCK_LOCATION = "mock_location"; |
| 2482 | |
| 2483 | /** |
Doug Zongker | d8893db | 2010-01-26 12:29:44 -0800 | [diff] [blame] | 2484 | * A 64-bit number (as a hex string) that is randomly |
| 2485 | * generated on the device's first boot and should remain |
| 2486 | * constant for the lifetime of the device. (The value may |
| 2487 | * change if a factory reset is performed on the device.) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2488 | */ |
| 2489 | public static final String ANDROID_ID = "android_id"; |
| 2490 | |
| 2491 | /** |
| 2492 | * Whether bluetooth is enabled/disabled |
| 2493 | * 0=disabled. 1=enabled. |
| 2494 | */ |
| 2495 | public static final String BLUETOOTH_ON = "bluetooth_on"; |
| 2496 | |
| 2497 | /** |
| 2498 | * Get the key that retrieves a bluetooth headset's priority. |
| 2499 | * @hide |
| 2500 | */ |
| 2501 | public static final String getBluetoothHeadsetPriorityKey(String address) { |
| 2502 | return ("bluetooth_headset_priority_" + address.toUpperCase()); |
| 2503 | } |
| 2504 | |
| 2505 | /** |
| 2506 | * Get the key that retrieves a bluetooth a2dp sink's priority. |
| 2507 | * @hide |
| 2508 | */ |
| 2509 | public static final String getBluetoothA2dpSinkPriorityKey(String address) { |
| 2510 | return ("bluetooth_a2dp_sink_priority_" + address.toUpperCase()); |
| 2511 | } |
| 2512 | |
| 2513 | /** |
Jaikumar Ganesh | 545e670 | 2010-06-04 10:23:03 -0700 | [diff] [blame] | 2514 | * Get the key that retrieves a bluetooth Input Device's priority. |
| 2515 | * @hide |
| 2516 | */ |
| 2517 | public static final String getBluetoothInputDevicePriorityKey(String address) { |
| 2518 | return ("bluetooth_input_device_priority_" + address.toUpperCase()); |
| 2519 | } |
| 2520 | |
| 2521 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2522 | * Whether or not data roaming is enabled. (0 = false, 1 = true) |
| 2523 | */ |
| 2524 | public static final String DATA_ROAMING = "data_roaming"; |
| 2525 | |
| 2526 | /** |
| 2527 | * Setting to record the input method used by default, holding the ID |
| 2528 | * of the desired method. |
| 2529 | */ |
| 2530 | public static final String DEFAULT_INPUT_METHOD = "default_input_method"; |
| 2531 | |
| 2532 | /** |
satok | ab751aa | 2010-09-14 19:17:36 +0900 | [diff] [blame] | 2533 | * Setting to record the input method subtype used by default, holding the ID |
| 2534 | * of the desired method. |
| 2535 | */ |
| 2536 | public static final String SELECTED_INPUT_METHOD_SUBTYPE = |
| 2537 | "selected_input_method_subtype"; |
| 2538 | |
| 2539 | /** |
satok | 723a27e | 2010-11-11 14:58:11 +0900 | [diff] [blame] | 2540 | * Setting to record the history of input method subtype, holding the pair of ID of IME |
| 2541 | * and its last used subtype. |
| 2542 | * @hide |
| 2543 | */ |
| 2544 | public static final String INPUT_METHODS_SUBTYPE_HISTORY = |
| 2545 | "input_methods_subtype_history"; |
| 2546 | |
| 2547 | /** |
satok | 5c58dfc | 2010-12-14 21:54:47 +0900 | [diff] [blame] | 2548 | * Setting to record the visibility of input method selector |
| 2549 | */ |
| 2550 | public static final String INPUT_METHOD_SELECTOR_VISIBILITY = |
| 2551 | "input_method_selector_visibility"; |
| 2552 | |
| 2553 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2554 | * Whether the device has been provisioned (0 = false, 1 = true) |
| 2555 | */ |
| 2556 | public static final String DEVICE_PROVISIONED = "device_provisioned"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2557 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2558 | /** |
| 2559 | * List of input methods that are currently enabled. This is a string |
| 2560 | * containing the IDs of all enabled input methods, each ID separated |
| 2561 | * by ':'. |
| 2562 | */ |
| 2563 | public static final String ENABLED_INPUT_METHODS = "enabled_input_methods"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2564 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2565 | /** |
Amith Yamasani | e861ec1 | 2010-03-24 21:39:27 -0700 | [diff] [blame] | 2566 | * List of system input methods that are currently disabled. This is a string |
| 2567 | * containing the IDs of all disabled input methods, each ID separated |
| 2568 | * by ':'. |
| 2569 | * @hide |
| 2570 | */ |
| 2571 | public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods"; |
| 2572 | |
| 2573 | /** |
Robert Greenwalt | 434203a | 2010-10-11 16:00:27 -0700 | [diff] [blame] | 2574 | * Host name and port for global http proxy. Uses ':' seperator for between host and port |
| 2575 | * TODO - deprecate in favor of global_http_proxy_host, etc |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2576 | */ |
| 2577 | public static final String HTTP_PROXY = "http_proxy"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2578 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2579 | /** |
Robert Greenwalt | 434203a | 2010-10-11 16:00:27 -0700 | [diff] [blame] | 2580 | * Host name for global http proxy. Set via ConnectivityManager. |
| 2581 | * @hide |
| 2582 | */ |
| 2583 | public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host"; |
| 2584 | |
| 2585 | /** |
| 2586 | * Integer host port for global http proxy. Set via ConnectivityManager. |
| 2587 | * @hide |
| 2588 | */ |
| 2589 | public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port"; |
| 2590 | |
| 2591 | /** |
Oscar Montemayor | 16fb791 | 2010-08-02 09:38:48 -0700 | [diff] [blame] | 2592 | * Exclusion list for global proxy. This string contains a list of comma-separated |
| 2593 | * domains where the global proxy does not apply. Domains should be listed in a comma- |
| 2594 | * separated list. Example of acceptable formats: ".domain1.com,my.domain2.com" |
Robert Greenwalt | 434203a | 2010-10-11 16:00:27 -0700 | [diff] [blame] | 2595 | * Use ConnectivityManager to set/get. |
Oscar Montemayor | 16fb791 | 2010-08-02 09:38:48 -0700 | [diff] [blame] | 2596 | * @hide |
| 2597 | */ |
Robert Greenwalt | 434203a | 2010-10-11 16:00:27 -0700 | [diff] [blame] | 2598 | public static final String GLOBAL_HTTP_PROXY_EXCLUSION_LIST = |
| 2599 | "global_http_proxy_exclusion_list"; |
Oscar Montemayor | 16fb791 | 2010-08-02 09:38:48 -0700 | [diff] [blame] | 2600 | |
| 2601 | /** |
| 2602 | * Enables the UI setting to allow the user to specify the global HTTP proxy |
| 2603 | * and associated exclusion list. |
| 2604 | * @hide |
| 2605 | */ |
| 2606 | public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy"; |
| 2607 | |
| 2608 | /** |
Robert Greenwalt | e90aa5e | 2010-09-01 11:34:05 -0700 | [diff] [blame] | 2609 | * Setting for default DNS in case nobody suggests one |
| 2610 | * @hide |
| 2611 | */ |
| 2612 | public static final String DEFAULT_DNS_SERVER = "default_dns_server"; |
| 2613 | |
| 2614 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2615 | * Whether the package installer should allow installation of apps downloaded from |
| 2616 | * sources other than the Android Market (vending machine). |
| 2617 | * |
| 2618 | * 1 = allow installing from other sources |
| 2619 | * 0 = only allow installing from the Android Market |
| 2620 | */ |
| 2621 | public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2622 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2623 | /** |
| 2624 | * Comma-separated list of location providers that activities may access. |
| 2625 | */ |
| 2626 | public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2627 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2628 | /** |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 2629 | * Whether autolock is enabled (0 = false, 1 = true) |
| 2630 | */ |
| 2631 | public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; |
| 2632 | |
| 2633 | /** |
| 2634 | * Whether lock pattern is visible as user enters (0 = false, 1 = true) |
| 2635 | */ |
| 2636 | public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; |
| 2637 | |
| 2638 | /** |
| 2639 | * Whether lock pattern will vibrate as user enters (0 = false, 1 = true) |
| 2640 | */ |
| 2641 | public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = |
| 2642 | "lock_pattern_tactile_feedback_enabled"; |
| 2643 | |
| 2644 | /** |
Jim Miller | bc4603b | 2010-08-30 21:21:34 -0700 | [diff] [blame] | 2645 | * This preference allows the device to be locked given time after screen goes off, |
| 2646 | * subject to current DeviceAdmin policy limits. |
| 2647 | * @hide |
| 2648 | */ |
| 2649 | public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout"; |
| 2650 | |
| 2651 | |
| 2652 | /** |
Jim Miller | 253a5ef | 2010-10-13 20:57:29 -0700 | [diff] [blame] | 2653 | * This preference contains the string that shows for owner info on LockScren. |
| 2654 | * @hide |
| 2655 | */ |
| 2656 | public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info"; |
| 2657 | |
| 2658 | /** |
| 2659 | * This preference enables showing the owner info on LockScren. |
| 2660 | * @hide |
| 2661 | */ |
| 2662 | public static final String LOCK_SCREEN_OWNER_INFO_ENABLED = |
| 2663 | "lock_screen_owner_info_enabled"; |
| 2664 | |
| 2665 | /** |
Joe Onorato | 571ae90 | 2011-05-24 13:48:43 -0700 | [diff] [blame] | 2666 | * The saved value for WindowManagerService.setForcedDisplaySize(). |
| 2667 | * Two integers separated by a comma. If unset, then use the real display size. |
| 2668 | * @hide |
| 2669 | */ |
| 2670 | public static final String DISPLAY_SIZE_FORCED = "display_size_forced"; |
| 2671 | |
| 2672 | /** |
Mike Lockwood | bcab8df | 2009-06-25 16:39:09 -0400 | [diff] [blame] | 2673 | * Whether assisted GPS should be enabled or not. |
| 2674 | * @hide |
| 2675 | */ |
| 2676 | public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled"; |
| 2677 | |
| 2678 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2679 | * The Logging ID (a unique 64-bit value) as a hex string. |
| 2680 | * Used as a pseudonymous identifier for logging. |
| 2681 | * @deprecated This identifier is poorly initialized and has |
| 2682 | * many collisions. It should not be used. |
| 2683 | */ |
| 2684 | @Deprecated |
| 2685 | public static final String LOGGING_ID = "logging_id"; |
| 2686 | |
| 2687 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2688 | * User preference for which network(s) should be used. Only the |
| 2689 | * connectivity service should touch this. |
| 2690 | */ |
| 2691 | public static final String NETWORK_PREFERENCE = "network_preference"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2692 | |
| 2693 | /** |
Robert Greenwalt | 2a091d7 | 2010-02-11 18:18:40 -0800 | [diff] [blame] | 2694 | * Used to disable Tethering on a device - defaults to true |
| 2695 | * @hide |
| 2696 | */ |
| 2697 | public static final String TETHER_SUPPORTED = "tether_supported"; |
| 2698 | |
| 2699 | /** |
Robert Greenwalt | 77b32dd | 2010-06-03 18:57:26 -0700 | [diff] [blame] | 2700 | * Used to require DUN APN on the device or not - defaults to a build config value |
| 2701 | * which defaults to false |
| 2702 | * @hide |
| 2703 | */ |
| 2704 | public static final String TETHER_DUN_REQUIRED = "tether_dun_required"; |
| 2705 | |
| 2706 | /** |
| 2707 | * Used to hold a gservices-provisioned apn value for DUN. If set, or the |
| 2708 | * corresponding build config values are set it will override the APN DB |
| 2709 | * values. |
| 2710 | * Consists of a comma seperated list of strings: |
| 2711 | * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type" |
| 2712 | * note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" |
| 2713 | * @hide |
| 2714 | */ |
| 2715 | public static final String TETHER_DUN_APN = "tether_dun_apn"; |
| 2716 | |
| 2717 | /** |
Dan Egnor | 1c9131c | 2010-02-13 10:38:55 -0800 | [diff] [blame] | 2718 | * No longer supported. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2719 | */ |
| 2720 | public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2721 | |
| 2722 | /** |
Dan Egnor | 1c9131c | 2010-02-13 10:38:55 -0800 | [diff] [blame] | 2723 | * No longer supported. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2724 | */ |
| 2725 | public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2726 | |
| 2727 | /** |
Dan Egnor | 1c9131c | 2010-02-13 10:38:55 -0800 | [diff] [blame] | 2728 | * No longer supported. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2729 | */ |
| 2730 | public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2731 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2732 | /** |
Brad Fitzpatrick | d7ad0d2 | 2010-12-02 15:30:23 -0800 | [diff] [blame] | 2733 | * A positive value indicates how often the SamplingProfiler |
| 2734 | * should take snapshots. Zero value means SamplingProfiler |
| 2735 | * is disabled. |
Sen Hu | bde7570 | 2010-05-28 01:54:03 -0700 | [diff] [blame] | 2736 | * |
| 2737 | * @hide |
| 2738 | */ |
Brad Fitzpatrick | d7ad0d2 | 2010-12-02 15:30:23 -0800 | [diff] [blame] | 2739 | public static final String SAMPLING_PROFILER_MS = "sampling_profiler_ms"; |
Sen Hu | bde7570 | 2010-05-28 01:54:03 -0700 | [diff] [blame] | 2740 | |
| 2741 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2742 | * Settings classname to launch when Settings is clicked from All |
| 2743 | * Applications. Needed because of user testing between the old |
| 2744 | * and new Settings apps. |
| 2745 | */ |
| 2746 | // TODO: 881807 |
| 2747 | public static final String SETTINGS_CLASSNAME = "settings_classname"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2748 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2749 | /** |
| 2750 | * USB Mass Storage Enabled |
| 2751 | */ |
| 2752 | public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2753 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2754 | /** |
| 2755 | * If this setting is set (to anything), then all references |
| 2756 | * to Gmail on the device must change to Google Mail. |
| 2757 | */ |
| 2758 | public static final String USE_GOOGLE_MAIL = "use_google_mail"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2759 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2760 | /** |
svetoslavganov | 75986cf | 2009-05-14 22:28:01 -0700 | [diff] [blame] | 2761 | * If accessibility is enabled. |
| 2762 | */ |
| 2763 | public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled"; |
| 2764 | |
| 2765 | /** |
Svetoslav Ganov | 00aabf7 | 2011-07-21 11:35:03 -0700 | [diff] [blame] | 2766 | * If touch exploration is enabled. |
Svetoslav Ganov | 35bfede | 2011-07-14 17:57:06 -0700 | [diff] [blame] | 2767 | */ |
Svetoslav Ganov | 00aabf7 | 2011-07-21 11:35:03 -0700 | [diff] [blame] | 2768 | public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled"; |
Svetoslav Ganov | 35bfede | 2011-07-14 17:57:06 -0700 | [diff] [blame] | 2769 | |
| 2770 | /** |
svetoslavganov | 75986cf | 2009-05-14 22:28:01 -0700 | [diff] [blame] | 2771 | * List of the enabled accessibility providers. |
| 2772 | */ |
| 2773 | public static final String ENABLED_ACCESSIBILITY_SERVICES = |
| 2774 | "enabled_accessibility_services"; |
| 2775 | |
| 2776 | /** |
Svetoslav Ganov | 55f937a | 2011-12-05 11:42:07 -0800 | [diff] [blame] | 2777 | * Whether to speak passwords while in accessibility mode. |
| 2778 | */ |
| 2779 | public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password"; |
| 2780 | |
| 2781 | /** |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 2782 | * If injection of accessibility enhancing JavaScript screen-reader |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 2783 | * is enabled. |
| 2784 | * <p> |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 2785 | * Note: The JavaScript based screen-reader is served by the |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 2786 | * Google infrastructure and enable users with disabilities to |
| 2787 | * efficiantly navigate in and explore web content. |
| 2788 | * </p> |
| 2789 | * <p> |
| 2790 | * This property represents a boolean value. |
| 2791 | * </p> |
| 2792 | * @hide |
| 2793 | */ |
| 2794 | public static final String ACCESSIBILITY_SCRIPT_INJECTION = |
| 2795 | "accessibility_script_injection"; |
| 2796 | |
| 2797 | /** |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 2798 | * The URL for the injected JavaScript based screen-reader used |
| 2799 | * for providing accessiblity of content in WebView. |
| 2800 | * <p> |
| 2801 | * Note: The JavaScript based screen-reader is served by the |
| 2802 | * Google infrastructure and enable users with disabilities to |
| 2803 | * efficiently navigate in and explore web content. |
| 2804 | * </p> |
| 2805 | * <p> |
| 2806 | * This property represents a string value. |
| 2807 | * </p> |
| 2808 | * @hide |
| 2809 | */ |
| 2810 | public static final String ACCESSIBILITY_SCREEN_READER_URL = |
| 2811 | "accessibility_script_injection_url"; |
| 2812 | |
| 2813 | /** |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 2814 | * Key bindings for navigation in built-in accessibility support for web content. |
| 2815 | * <p> |
| 2816 | * Note: These key bindings are for the built-in accessibility navigation for |
| 2817 | * web content which is used as a fall back solution if JavaScript in a WebView |
| 2818 | * is not enabled or the user has not opted-in script injection from Google. |
| 2819 | * </p> |
| 2820 | * <p> |
| 2821 | * The bindings are separated by semi-colon. A binding is a mapping from |
| 2822 | * a key to a sequence of actions (for more details look at |
| 2823 | * android.webkit.AccessibilityInjector). A key is represented as the hexademical |
| 2824 | * string representation of an integer obtained from a meta state (optional) shifted |
| 2825 | * sixteen times left and bitwise ored with a key code. An action is represented |
| 2826 | * as a hexademical string representation of an integer where the first two digits |
| 2827 | * are navigation action index, the second, the third, and the fourth digit pairs |
| 2828 | * represent the action arguments. The separate actions in a binding are colon |
| 2829 | * separated. The key and the action sequence it maps to are separated by equals. |
| 2830 | * </p> |
| 2831 | * <p> |
| 2832 | * For example, the binding below maps the DPAD right button to traverse the |
| 2833 | * current navigation axis once without firing an accessibility event and to |
| 2834 | * perform the same traversal again but to fire an event: |
| 2835 | * <code> |
| 2836 | * 0x16=0x01000100:0x01000101; |
| 2837 | * </code> |
| 2838 | * </p> |
| 2839 | * <p> |
| 2840 | * The goal of this binding is to enable dynamic rebinding of keys to |
| 2841 | * navigation actions for web content without requiring a framework change. |
| 2842 | * </p> |
| 2843 | * <p> |
| 2844 | * This property represents a string value. |
| 2845 | * </p> |
| 2846 | * @hide |
| 2847 | */ |
| 2848 | public static final String ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS = |
| 2849 | "accessibility_web_content_key_bindings"; |
| 2850 | |
| 2851 | /** |
Svetoslav Ganov | 54d068e | 2011-03-02 12:58:40 -0800 | [diff] [blame] | 2852 | * The timout for considering a press to be a long press in milliseconds. |
| 2853 | * @hide |
| 2854 | */ |
| 2855 | public static final String LONG_PRESS_TIMEOUT = "long_press_timeout"; |
| 2856 | |
| 2857 | /** |
Jean-Michel Trivi | f62ba45 | 2009-06-04 14:55:24 -0700 | [diff] [blame] | 2858 | * Setting to always use the default text-to-speech settings regardless |
| 2859 | * of the application settings. |
| 2860 | * 1 = override application settings, |
| 2861 | * 0 = use application settings (if specified). |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 2862 | * |
| 2863 | * @deprecated The value of this setting is no longer respected by |
| 2864 | * 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] | 2865 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 2866 | @Deprecated |
Jean-Michel Trivi | f62ba45 | 2009-06-04 14:55:24 -0700 | [diff] [blame] | 2867 | public static final String TTS_USE_DEFAULTS = "tts_use_defaults"; |
| 2868 | |
| 2869 | /** |
| 2870 | * Default text-to-speech engine speech rate. 100 = 1x |
| 2871 | */ |
| 2872 | public static final String TTS_DEFAULT_RATE = "tts_default_rate"; |
| 2873 | |
| 2874 | /** |
| 2875 | * Default text-to-speech engine pitch. 100 = 1x |
| 2876 | */ |
| 2877 | public static final String TTS_DEFAULT_PITCH = "tts_default_pitch"; |
| 2878 | |
| 2879 | /** |
| 2880 | * Default text-to-speech engine. |
| 2881 | */ |
| 2882 | public static final String TTS_DEFAULT_SYNTH = "tts_default_synth"; |
| 2883 | |
| 2884 | /** |
Jean-Michel Trivi | f478267 | 2009-06-09 16:22:48 -0700 | [diff] [blame] | 2885 | * Default text-to-speech language. |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 2886 | * |
| 2887 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 2888 | * Sandwich release. Apps should never need to read this setting directly, |
| 2889 | * instead can query the TextToSpeech framework classes for the default |
| 2890 | * locale. {@link TextToSpeech#getLanguage()}. |
Jean-Michel Trivi | f478267 | 2009-06-09 16:22:48 -0700 | [diff] [blame] | 2891 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 2892 | @Deprecated |
Jean-Michel Trivi | f478267 | 2009-06-09 16:22:48 -0700 | [diff] [blame] | 2893 | public static final String TTS_DEFAULT_LANG = "tts_default_lang"; |
| 2894 | |
| 2895 | /** |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 2896 | * Default text-to-speech country. |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 2897 | * |
| 2898 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 2899 | * Sandwich release. Apps should never need to read this setting directly, |
| 2900 | * instead can query the TextToSpeech framework classes for the default |
| 2901 | * locale. {@link TextToSpeech#getLanguage()}. |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 2902 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 2903 | @Deprecated |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 2904 | public static final String TTS_DEFAULT_COUNTRY = "tts_default_country"; |
| 2905 | |
| 2906 | /** |
| 2907 | * Default text-to-speech locale variant. |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 2908 | * |
| 2909 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 2910 | * Sandwich release. Apps should never need to read this setting directly, |
| 2911 | * instead can query the TextToSpeech framework classes for the |
| 2912 | * locale that is in use {@link TextToSpeech#getLanguage()}. |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 2913 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 2914 | @Deprecated |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 2915 | public static final String TTS_DEFAULT_VARIANT = "tts_default_variant"; |
| 2916 | |
| 2917 | /** |
Narayan Kamath | e5b8c4d | 2011-08-22 15:37:47 +0100 | [diff] [blame] | 2918 | * Stores the default tts locales on a per engine basis. Stored as |
| 2919 | * a comma seperated list of values, each value being of the form |
| 2920 | * {@code engine_name:locale} for example, |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 2921 | * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This |
| 2922 | * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and |
| 2923 | * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this |
| 2924 | * setting directly, and can query the TextToSpeech framework classes |
| 2925 | * for the locale that is in use. |
Narayan Kamath | e5b8c4d | 2011-08-22 15:37:47 +0100 | [diff] [blame] | 2926 | * |
| 2927 | * @hide |
| 2928 | */ |
| 2929 | public static final String TTS_DEFAULT_LOCALE = "tts_default_locale"; |
| 2930 | |
| 2931 | /** |
Charles Chen | ceffa15 | 2010-03-16 21:18:10 -0700 | [diff] [blame] | 2932 | * Space delimited list of plugin packages that are enabled. |
| 2933 | */ |
| 2934 | public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins"; |
| 2935 | |
| 2936 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2937 | * Whether to notify the user of open networks. |
| 2938 | * <p> |
| 2939 | * If not connected and the scan results have an open network, we will |
| 2940 | * put this notification up. If we attempt to connect to a network or |
| 2941 | * the open network(s) disappear, we remove the notification. When we |
| 2942 | * show the notification, we will not show it again for |
| 2943 | * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time. |
| 2944 | */ |
| 2945 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 2946 | "wifi_networks_available_notification_on"; |
Robert Greenwalt | 8588e47 | 2011-11-08 10:12:25 -0800 | [diff] [blame] | 2947 | /** |
| 2948 | * {@hide} |
| 2949 | */ |
tk.mun | 148c7d0 | 2011-10-13 22:51:57 +0900 | [diff] [blame] | 2950 | public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 2951 | "wimax_networks_available_notification_on"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2952 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2953 | /** |
| 2954 | * Delay (in seconds) before repeating the Wi-Fi networks available notification. |
| 2955 | * Connecting to a network will reset the timer. |
| 2956 | */ |
| 2957 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
| 2958 | "wifi_networks_available_repeat_delay"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2959 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2960 | /** |
Irfan Sheriff | ed4f28b | 2010-10-29 15:32:10 -0700 | [diff] [blame] | 2961 | * 802.11 country code in ISO 3166 format |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2962 | * @hide |
| 2963 | */ |
Irfan Sheriff | ed4f28b | 2010-10-29 15:32:10 -0700 | [diff] [blame] | 2964 | public static final String WIFI_COUNTRY_CODE = "wifi_country_code"; |
| 2965 | |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2966 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2967 | /** |
| 2968 | * When the number of open networks exceeds this number, the |
| 2969 | * least-recently-used excess networks will be removed. |
| 2970 | */ |
| 2971 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2972 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2973 | /** |
| 2974 | * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this. |
| 2975 | */ |
| 2976 | public static final String WIFI_ON = "wifi_on"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2977 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2978 | /** |
Irfan Sheriff | a3bd409 | 2010-03-24 17:58:59 -0700 | [diff] [blame] | 2979 | * Used to save the Wifi_ON state prior to tethering. |
| 2980 | * This state will be checked to restore Wifi after |
| 2981 | * the user turns off tethering. |
Irfan Sheriff | 5321aef | 2010-02-12 12:35:59 -0800 | [diff] [blame] | 2982 | * |
| 2983 | * @hide |
| 2984 | */ |
Irfan Sheriff | a3bd409 | 2010-03-24 17:58:59 -0700 | [diff] [blame] | 2985 | public static final String WIFI_SAVED_STATE = "wifi_saved_state"; |
Irfan Sheriff | 5321aef | 2010-02-12 12:35:59 -0800 | [diff] [blame] | 2986 | |
| 2987 | /** |
Irfan Sheriff | 9ab518ad | 2010-03-12 15:48:17 -0800 | [diff] [blame] | 2988 | * AP SSID |
| 2989 | * |
| 2990 | * @hide |
| 2991 | */ |
| 2992 | public static final String WIFI_AP_SSID = "wifi_ap_ssid"; |
| 2993 | |
| 2994 | /** |
| 2995 | * AP security |
| 2996 | * |
| 2997 | * @hide |
| 2998 | */ |
| 2999 | public static final String WIFI_AP_SECURITY = "wifi_ap_security"; |
| 3000 | |
| 3001 | /** |
| 3002 | * AP passphrase |
| 3003 | * |
| 3004 | * @hide |
| 3005 | */ |
| 3006 | public static final String WIFI_AP_PASSWD = "wifi_ap_passwd"; |
| 3007 | |
| 3008 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3009 | * The acceptable packet loss percentage (range 0 - 100) before trying |
| 3010 | * another AP on the same network. |
| 3011 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3012 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3013 | public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = |
| 3014 | "wifi_watchdog_acceptable_packet_loss_percentage"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3015 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3016 | /** |
| 3017 | * The number of access points required for a network in order for the |
| 3018 | * watchdog to monitor it. |
| 3019 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3020 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3021 | public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3022 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3023 | /** |
| 3024 | * The delay between background checks. |
| 3025 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3026 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3027 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = |
| 3028 | "wifi_watchdog_background_check_delay_ms"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3029 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3030 | /** |
| 3031 | * Whether the Wi-Fi watchdog is enabled for background checking even |
| 3032 | * after it thinks the user has connected to a good access point. |
| 3033 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3034 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3035 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = |
| 3036 | "wifi_watchdog_background_check_enabled"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3037 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3038 | /** |
| 3039 | * The timeout for a background ping |
| 3040 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3041 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3042 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = |
| 3043 | "wifi_watchdog_background_check_timeout_ms"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3044 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3045 | /** |
| 3046 | * The number of initial pings to perform that *may* be ignored if they |
| 3047 | * fail. Again, if these fail, they will *not* be used in packet loss |
| 3048 | * calculation. For example, one network always seemed to time out for |
| 3049 | * the first couple pings, so this is set to 3 by default. |
| 3050 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3051 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3052 | public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = |
| 3053 | "wifi_watchdog_initial_ignored_ping_count"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3054 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3055 | /** |
| 3056 | * The maximum number of access points (per network) to attempt to test. |
| 3057 | * If this number is reached, the watchdog will no longer monitor the |
| 3058 | * initial connection state for the network. This is a safeguard for |
| 3059 | * networks containing multiple APs whose DNS does not respond to pings. |
| 3060 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3061 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3062 | 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] | 3063 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3064 | /** |
| 3065 | * Whether the Wi-Fi watchdog is enabled. |
| 3066 | */ |
| 3067 | public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; |
| 3068 | |
| 3069 | /** |
| 3070 | * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3071 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3072 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3073 | public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list"; |
| 3074 | |
| 3075 | /** |
| 3076 | * The number of pings to test if an access point is a good connection. |
| 3077 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3078 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3079 | public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3080 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3081 | /** |
| 3082 | * The delay between pings. |
| 3083 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3084 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3085 | 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] | 3086 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3087 | /** |
| 3088 | * The timeout per ping. |
| 3089 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3090 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3091 | 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] | 3092 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3093 | /** |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3094 | * ms delay before rechecking an 'online' wifi connection when it is thought to be unstable. |
| 3095 | * @hide |
| 3096 | */ |
| 3097 | public static final String WIFI_WATCHDOG_DNS_CHECK_SHORT_INTERVAL_MS = |
| 3098 | "wifi_watchdog_dns_check_short_interval_ms"; |
| 3099 | |
| 3100 | /** |
| 3101 | * ms delay before rechecking an 'online' wifi connection when it is thought to be stable. |
| 3102 | * @hide |
| 3103 | */ |
| 3104 | public static final String WIFI_WATCHDOG_DNS_CHECK_LONG_INTERVAL_MS = |
| 3105 | "wifi_watchdog_dns_check_long_interval_ms"; |
| 3106 | |
| 3107 | /** |
| 3108 | * ms delay before rechecking a connect SSID for walled garden with a http download. |
| 3109 | * @hide |
| 3110 | */ |
| 3111 | public static final String WIFI_WATCHDOG_WALLED_GARDEN_INTERVAL_MS = |
| 3112 | "wifi_watchdog_walled_garden_interval_ms"; |
| 3113 | |
| 3114 | /** |
| 3115 | * max blacklist calls on an SSID before full dns check failures disable the network. |
| 3116 | * @hide |
| 3117 | */ |
| 3118 | public static final String WIFI_WATCHDOG_MAX_SSID_BLACKLISTS = |
| 3119 | "wifi_watchdog_max_ssid_blacklists"; |
| 3120 | |
| 3121 | /** |
| 3122 | * Number of dns pings per check. |
| 3123 | * @hide |
| 3124 | */ |
| 3125 | public static final String WIFI_WATCHDOG_NUM_DNS_PINGS = "wifi_watchdog_num_dns_pings"; |
| 3126 | |
| 3127 | /** |
| 3128 | * Minimum number of responses to the dns pings to consider the test 'successful'. |
| 3129 | * @hide |
| 3130 | */ |
| 3131 | public static final String WIFI_WATCHDOG_MIN_DNS_RESPONSES = |
| 3132 | "wifi_watchdog_min_dns_responses"; |
| 3133 | |
| 3134 | /** |
| 3135 | * Timeout on dns pings |
| 3136 | * @hide |
| 3137 | */ |
| 3138 | public static final String WIFI_WATCHDOG_DNS_PING_TIMEOUT_MS = |
| 3139 | "wifi_watchdog_dns_ping_timeout_ms"; |
| 3140 | |
| 3141 | /** |
| 3142 | * We consider action from a 'blacklist' call to have finished by the end of |
| 3143 | * this interval. If we are connected to the same AP with no network connection, |
| 3144 | * we are likely stuck on an SSID with no external connectivity. |
| 3145 | * @hide |
| 3146 | */ |
| 3147 | public static final String WIFI_WATCHDOG_BLACKLIST_FOLLOWUP_INTERVAL_MS = |
| 3148 | "wifi_watchdog_blacklist_followup_interval_ms"; |
| 3149 | |
| 3150 | /** |
Irfan Sheriff | 19380da | 2011-12-06 14:41:14 -0800 | [diff] [blame] | 3151 | * Setting to turn off poor network avoidance on Wi-Fi. Feature is disabled by default and |
| 3152 | * the setting needs to be set to 1 to enable it. |
| 3153 | * @hide |
| 3154 | */ |
| 3155 | public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED = |
| 3156 | "wifi_watchdog_poor_network_test_enabled"; |
| 3157 | |
| 3158 | /** |
Irfan Sheriff | 5ea65d6 | 2011-06-05 21:29:56 -0700 | [diff] [blame] | 3159 | * Setting to turn off walled garden test on Wi-Fi. Feature is enabled by default and |
| 3160 | * the setting needs to be set to 0 to disable it. |
| 3161 | * @hide |
| 3162 | */ |
| 3163 | public static final String WIFI_WATCHDOG_WALLED_GARDEN_TEST_ENABLED = |
| 3164 | "wifi_watchdog_walled_garden_test_enabled"; |
| 3165 | |
| 3166 | /** |
| 3167 | * The URL used for walled garden check upon a new conection. WifiWatchdogService |
| 3168 | * fetches the URL and checks to see if {@link #WIFI_WATCHDOG_WALLED_GARDEN_PATTERN} |
| 3169 | * is not part of the title string to notify the user on the presence of a walled garden. |
| 3170 | * @hide |
| 3171 | */ |
| 3172 | public static final String WIFI_WATCHDOG_WALLED_GARDEN_URL = |
| 3173 | "wifi_watchdog_walled_garden_url"; |
| 3174 | |
| 3175 | /** |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3176 | * Boolean to determine whether to notify on disabling a network. Secure setting used |
Isaac Levy | 8dc6a1b | 2011-07-27 08:00:03 -0700 | [diff] [blame] | 3177 | * to notify user only once. |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 3178 | * @hide |
| 3179 | */ |
| 3180 | public static final String WIFI_WATCHDOG_SHOW_DISABLED_NETWORK_POPUP = |
| 3181 | "wifi_watchdog_show_disabled_network_popup"; |
| 3182 | |
| 3183 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3184 | * The maximum number of times we will retry a connection to an access |
| 3185 | * point for which we have failed in acquiring an IP address from DHCP. |
| 3186 | * A value of N means that we will make N+1 connection attempts in all. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3187 | */ |
| 3188 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3189 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3190 | /** |
Irfan Sheriff | 36f7413 | 2010-11-04 16:57:37 -0700 | [diff] [blame] | 3191 | * The operational wifi frequency band |
| 3192 | * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO}, |
| 3193 | * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or |
| 3194 | * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ} |
| 3195 | * |
| 3196 | * @hide |
| 3197 | */ |
| 3198 | public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band"; |
| 3199 | |
| 3200 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3201 | * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile |
| 3202 | * data connectivity to be established after a disconnect from Wi-Fi. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3203 | */ |
| 3204 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
| 3205 | "wifi_mobile_data_transition_wakelock_timeout_ms"; |
| 3206 | |
| 3207 | /** |
| 3208 | * Whether background data usage is allowed by the user. See |
| 3209 | * ConnectivityManager for more info. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3210 | */ |
Jeff Sharkey | 3a844fc | 2011-08-16 14:37:57 -0700 | [diff] [blame] | 3211 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3212 | public static final String BACKGROUND_DATA = "background_data"; |
Wink Saville | 04e71b3 | 2009-04-02 11:00:54 -0700 | [diff] [blame] | 3213 | |
| 3214 | /** |
Bjorn Bringert | 98bfa39 | 2010-03-24 10:59:48 +0000 | [diff] [blame] | 3215 | * Origins for which browsers should allow geolocation by default. |
| 3216 | * The value is a space-separated list of origins. |
| 3217 | */ |
| 3218 | public static final String ALLOWED_GEOLOCATION_ORIGINS |
| 3219 | = "allowed_geolocation_origins"; |
| 3220 | |
| 3221 | /** |
Robert Greenwalt | c03fa50 | 2010-02-23 18:58:05 -0800 | [diff] [blame] | 3222 | * Whether mobile data connections are allowed by the user. See |
| 3223 | * ConnectivityManager for more info. |
| 3224 | * @hide |
| 3225 | */ |
| 3226 | public static final String MOBILE_DATA = "mobile_data"; |
| 3227 | |
| 3228 | /** |
Wink Saville | 04e71b3 | 2009-04-02 11:00:54 -0700 | [diff] [blame] | 3229 | * The CDMA roaming mode 0 = Home Networks, CDMA default |
| 3230 | * 1 = Roaming on Affiliated networks |
| 3231 | * 2 = Roaming on any networks |
| 3232 | * @hide |
| 3233 | */ |
| 3234 | public static final String CDMA_ROAMING_MODE = "roaming_settings"; |
| 3235 | |
| 3236 | /** |
| 3237 | * The CDMA subscription mode 0 = RUIM/SIM (default) |
| 3238 | * 1 = NV |
| 3239 | * @hide |
| 3240 | */ |
| 3241 | public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode"; |
| 3242 | |
| 3243 | /** |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3244 | * The preferred network mode 7 = Global |
| 3245 | * 6 = EvDo only |
| 3246 | * 5 = CDMA w/o EvDo |
| 3247 | * 4 = CDMA / EvDo auto |
| 3248 | * 3 = GSM / WCDMA auto |
| 3249 | * 2 = WCDMA only |
| 3250 | * 1 = GSM only |
| 3251 | * 0 = GSM / WCDMA preferred |
Wink Saville | 04e71b3 | 2009-04-02 11:00:54 -0700 | [diff] [blame] | 3252 | * @hide |
| 3253 | */ |
| 3254 | public static final String PREFERRED_NETWORK_MODE = |
| 3255 | "preferred_network_mode"; |
| 3256 | |
| 3257 | /** |
Wink Saville | e9b06d7 | 2009-05-18 21:47:50 -0700 | [diff] [blame] | 3258 | * The preferred TTY mode 0 = TTy Off, CDMA default |
| 3259 | * 1 = TTY Full |
| 3260 | * 2 = TTY HCO |
| 3261 | * 3 = TTY VCO |
| 3262 | * @hide |
| 3263 | */ |
| 3264 | public static final String PREFERRED_TTY_MODE = |
| 3265 | "preferred_tty_mode"; |
| 3266 | |
| 3267 | |
| 3268 | /** |
Wink Saville | 04e71b3 | 2009-04-02 11:00:54 -0700 | [diff] [blame] | 3269 | * CDMA Cell Broadcast SMS |
| 3270 | * 0 = CDMA Cell Broadcast SMS disabled |
| 3271 | * 1 = CDMA Cell Broadcast SMS enabled |
| 3272 | * @hide |
| 3273 | */ |
| 3274 | public static final String CDMA_CELL_BROADCAST_SMS = |
| 3275 | "cdma_cell_broadcast_sms"; |
| 3276 | |
| 3277 | /** |
| 3278 | * The cdma subscription 0 = Subscription from RUIM, when available |
| 3279 | * 1 = Subscription from NV |
| 3280 | * @hide |
| 3281 | */ |
| 3282 | public static final String PREFERRED_CDMA_SUBSCRIPTION = |
| 3283 | "preferred_cdma_subscription"; |
| 3284 | |
| 3285 | /** |
| 3286 | * Whether the enhanced voice privacy mode is enabled. |
| 3287 | * 0 = normal voice privacy |
| 3288 | * 1 = enhanced voice privacy |
| 3289 | * @hide |
| 3290 | */ |
| 3291 | public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled"; |
| 3292 | |
| 3293 | /** |
| 3294 | * Whether the TTY mode mode is enabled. |
| 3295 | * 0 = disabled |
| 3296 | * 1 = enabled |
| 3297 | * @hide |
| 3298 | */ |
| 3299 | public static final String TTY_MODE_ENABLED = "tty_mode_enabled"; |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 3300 | |
| 3301 | /** |
Wink Saville | 628b085 | 2011-08-04 15:01:58 -0700 | [diff] [blame] | 3302 | * The number of milliseconds to delay before sending out Connectivyt Change broadcasts |
| 3303 | * @hide |
| 3304 | */ |
| 3305 | public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay"; |
| 3306 | |
| 3307 | /** |
| 3308 | * Default value for CONNECTIVITY_CHANGE_DELAY in milliseconds. |
| 3309 | * @hide |
| 3310 | */ |
| 3311 | public static final int CONNECTIVITY_CHANGE_DELAY_DEFAULT = 3000; |
| 3312 | |
| 3313 | /** |
Christopher Tate | 8031a3d | 2009-07-06 16:36:05 -0700 | [diff] [blame] | 3314 | * Controls whether settings backup is enabled. |
Dianne Hackborn | cf09829 | 2009-07-01 19:55:20 -0700 | [diff] [blame] | 3315 | * Type: int ( 0 = disabled, 1 = enabled ) |
| 3316 | * @hide |
| 3317 | */ |
| 3318 | public static final String BACKUP_ENABLED = "backup_enabled"; |
| 3319 | |
| 3320 | /** |
Christopher Tate | cce9da5 | 2010-02-03 15:11:15 -0800 | [diff] [blame] | 3321 | * Controls whether application data is automatically restored from backup |
| 3322 | * at install time. |
| 3323 | * Type: int ( 0 = disabled, 1 = enabled ) |
| 3324 | * @hide |
| 3325 | */ |
| 3326 | public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore"; |
| 3327 | |
| 3328 | /** |
Christopher Tate | 8031a3d | 2009-07-06 16:36:05 -0700 | [diff] [blame] | 3329 | * Indicates whether settings backup has been fully provisioned. |
| 3330 | * Type: int ( 0 = unprovisioned, 1 = fully provisioned ) |
| 3331 | * @hide |
| 3332 | */ |
| 3333 | public static final String BACKUP_PROVISIONED = "backup_provisioned"; |
| 3334 | |
| 3335 | /** |
Dianne Hackborn | cf09829 | 2009-07-01 19:55:20 -0700 | [diff] [blame] | 3336 | * Component of the transport to use for backup/restore. |
| 3337 | * @hide |
| 3338 | */ |
| 3339 | public static final String BACKUP_TRANSPORT = "backup_transport"; |
Sanjay Jeyakumar | 21bf241 | 2009-07-09 13:31:48 -0700 | [diff] [blame] | 3340 | |
Dianne Hackborn | d7cd29d | 2009-07-01 11:22:45 -0700 | [diff] [blame] | 3341 | /** |
| 3342 | * Version for which the setup wizard was last shown. Bumped for |
| 3343 | * each release when there is new setup information to show. |
| 3344 | * @hide |
| 3345 | */ |
| 3346 | public static final String LAST_SETUP_SHOWN = "last_setup_shown"; |
Dianne Hackborn | cf09829 | 2009-07-01 19:55:20 -0700 | [diff] [blame] | 3347 | |
| 3348 | /** |
Doug Zongker | f688889 | 2010-01-06 16:38:14 -0800 | [diff] [blame] | 3349 | * How frequently (in seconds) to check the memory status of the |
| 3350 | * device. |
| 3351 | * @hide |
| 3352 | */ |
| 3353 | public static final String MEMCHECK_INTERVAL = "memcheck_interval"; |
| 3354 | |
| 3355 | /** |
| 3356 | * Max frequency (in seconds) to log memory check stats, in realtime |
| 3357 | * seconds. This allows for throttling of logs when the device is |
| 3358 | * running for large amounts of time. |
| 3359 | * @hide |
| 3360 | */ |
| 3361 | public static final String MEMCHECK_LOG_REALTIME_INTERVAL = |
| 3362 | "memcheck_log_realtime_interval"; |
| 3363 | |
| 3364 | /** |
| 3365 | * Boolean indicating whether rebooting due to system memory checks |
| 3366 | * is enabled. |
| 3367 | * @hide |
| 3368 | */ |
| 3369 | public static final String MEMCHECK_SYSTEM_ENABLED = "memcheck_system_enabled"; |
| 3370 | |
| 3371 | /** |
| 3372 | * How many bytes the system process must be below to avoid scheduling |
| 3373 | * a soft reboot. This reboot will happen when it is next determined |
| 3374 | * to be a good time. |
| 3375 | * @hide |
| 3376 | */ |
| 3377 | public static final String MEMCHECK_SYSTEM_SOFT_THRESHOLD = "memcheck_system_soft"; |
| 3378 | |
| 3379 | /** |
| 3380 | * How many bytes the system process must be below to avoid scheduling |
| 3381 | * a hard reboot. This reboot will happen immediately. |
| 3382 | * @hide |
| 3383 | */ |
| 3384 | public static final String MEMCHECK_SYSTEM_HARD_THRESHOLD = "memcheck_system_hard"; |
| 3385 | |
| 3386 | /** |
| 3387 | * How many bytes the phone process must be below to avoid scheduling |
| 3388 | * a soft restart. This restart will happen when it is next determined |
| 3389 | * to be a good time. |
| 3390 | * @hide |
| 3391 | */ |
| 3392 | public static final String MEMCHECK_PHONE_SOFT_THRESHOLD = "memcheck_phone_soft"; |
| 3393 | |
| 3394 | /** |
| 3395 | * How many bytes the phone process must be below to avoid scheduling |
| 3396 | * a hard restart. This restart will happen immediately. |
| 3397 | * @hide |
| 3398 | */ |
| 3399 | public static final String MEMCHECK_PHONE_HARD_THRESHOLD = "memcheck_phone_hard"; |
| 3400 | |
| 3401 | /** |
| 3402 | * Boolean indicating whether restarting the phone process due to |
| 3403 | * memory checks is enabled. |
| 3404 | * @hide |
| 3405 | */ |
| 3406 | public static final String MEMCHECK_PHONE_ENABLED = "memcheck_phone_enabled"; |
| 3407 | |
| 3408 | /** |
| 3409 | * First time during the day it is okay to kill processes |
| 3410 | * or reboot the device due to low memory situations. This number is |
| 3411 | * in seconds since midnight. |
| 3412 | * @hide |
| 3413 | */ |
| 3414 | public static final String MEMCHECK_EXEC_START_TIME = "memcheck_exec_start_time"; |
| 3415 | |
| 3416 | /** |
| 3417 | * Last time during the day it is okay to kill processes |
| 3418 | * or reboot the device due to low memory situations. This number is |
| 3419 | * in seconds since midnight. |
| 3420 | * @hide |
| 3421 | */ |
| 3422 | public static final String MEMCHECK_EXEC_END_TIME = "memcheck_exec_end_time"; |
| 3423 | |
| 3424 | /** |
| 3425 | * How long the screen must have been off in order to kill processes |
| 3426 | * or reboot. This number is in seconds. A value of -1 means to |
| 3427 | * entirely disregard whether the screen is on. |
| 3428 | * @hide |
| 3429 | */ |
| 3430 | public static final String MEMCHECK_MIN_SCREEN_OFF = "memcheck_min_screen_off"; |
| 3431 | |
| 3432 | /** |
| 3433 | * How much time there must be until the next alarm in order to kill processes |
| 3434 | * or reboot. This number is in seconds. Note: this value must be |
| 3435 | * smaller than {@link #MEMCHECK_RECHECK_INTERVAL} or else it will |
| 3436 | * always see an alarm scheduled within its time. |
| 3437 | * @hide |
| 3438 | */ |
| 3439 | public static final String MEMCHECK_MIN_ALARM = "memcheck_min_alarm"; |
| 3440 | |
| 3441 | /** |
| 3442 | * How frequently to check whether it is a good time to restart things, |
| 3443 | * if the device is in a bad state. This number is in seconds. Note: |
| 3444 | * this value must be larger than {@link #MEMCHECK_MIN_ALARM} or else |
| 3445 | * the alarm to schedule the recheck will always appear within the |
| 3446 | * minimum "do not execute now" time. |
| 3447 | * @hide |
| 3448 | */ |
| 3449 | public static final String MEMCHECK_RECHECK_INTERVAL = "memcheck_recheck_interval"; |
| 3450 | |
| 3451 | /** |
| 3452 | * How frequently (in DAYS) to reboot the device. If 0, no reboots |
| 3453 | * will occur. |
| 3454 | * @hide |
| 3455 | */ |
| 3456 | public static final String REBOOT_INTERVAL = "reboot_interval"; |
| 3457 | |
| 3458 | /** |
| 3459 | * First time during the day it is okay to force a reboot of the |
| 3460 | * device (if REBOOT_INTERVAL is set). This number is |
| 3461 | * in seconds since midnight. |
| 3462 | * @hide |
| 3463 | */ |
| 3464 | public static final String REBOOT_START_TIME = "reboot_start_time"; |
| 3465 | |
| 3466 | /** |
| 3467 | * The window of time (in seconds) after each REBOOT_INTERVAL in which |
| 3468 | * a reboot can be executed. If 0, a reboot will always be executed at |
| 3469 | * exactly the given time. Otherwise, it will only be executed if |
| 3470 | * the device is idle within the window. |
| 3471 | * @hide |
| 3472 | */ |
| 3473 | public static final String REBOOT_WINDOW = "reboot_window"; |
| 3474 | |
| 3475 | /** |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 3476 | * Threshold values for the duration and level of a discharge cycle, under |
| 3477 | * which we log discharge cycle info. |
| 3478 | * @hide |
| 3479 | */ |
| 3480 | public static final String BATTERY_DISCHARGE_DURATION_THRESHOLD = |
| 3481 | "battery_discharge_duration_threshold"; |
| 3482 | /** @hide */ |
| 3483 | public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold"; |
| 3484 | |
| 3485 | /** |
| 3486 | * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR intents |
| 3487 | * on application crashes and ANRs. If this is disabled, the crash/ANR dialog |
| 3488 | * will never display the "Report" button. |
| 3489 | * Type: int ( 0 = disallow, 1 = allow ) |
| 3490 | * @hide |
| 3491 | */ |
| 3492 | public static final String SEND_ACTION_APP_ERROR = "send_action_app_error"; |
| 3493 | |
| 3494 | /** |
| 3495 | * Nonzero causes Log.wtf() to crash. |
| 3496 | * @hide |
| 3497 | */ |
| 3498 | public static final String WTF_IS_FATAL = "wtf_is_fatal"; |
| 3499 | |
| 3500 | /** |
Jake Hamby | bb37163 | 2010-08-23 18:16:48 -0700 | [diff] [blame] | 3501 | * Maximum age of entries kept by {@link com.android.internal.os.IDropBoxManagerService}. |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 3502 | * @hide |
| 3503 | */ |
| 3504 | public static final String DROPBOX_AGE_SECONDS = |
| 3505 | "dropbox_age_seconds"; |
| 3506 | /** |
Jake Hamby | bb37163 | 2010-08-23 18:16:48 -0700 | [diff] [blame] | 3507 | * Maximum number of entry files which {@link com.android.internal.os.IDropBoxManagerService} will keep around. |
Dan Egnor | 3a8b0c1 | 2010-03-24 17:48:20 -0700 | [diff] [blame] | 3508 | * @hide |
| 3509 | */ |
| 3510 | public static final String DROPBOX_MAX_FILES = |
| 3511 | "dropbox_max_files"; |
| 3512 | /** |
Jake Hamby | bb37163 | 2010-08-23 18:16:48 -0700 | [diff] [blame] | 3513 | * Maximum amount of disk space used by {@link com.android.internal.os.IDropBoxManagerService} no matter what. |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 3514 | * @hide |
| 3515 | */ |
| 3516 | public static final String DROPBOX_QUOTA_KB = |
| 3517 | "dropbox_quota_kb"; |
| 3518 | /** |
Jake Hamby | bb37163 | 2010-08-23 18:16:48 -0700 | [diff] [blame] | 3519 | * Percent of free disk (excluding reserve) which {@link com.android.internal.os.IDropBoxManagerService} will use. |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 3520 | * @hide |
| 3521 | */ |
| 3522 | public static final String DROPBOX_QUOTA_PERCENT = |
| 3523 | "dropbox_quota_percent"; |
| 3524 | /** |
Jake Hamby | bb37163 | 2010-08-23 18:16:48 -0700 | [diff] [blame] | 3525 | * Percent of total disk which {@link com.android.internal.os.IDropBoxManagerService} will never dip into. |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 3526 | * @hide |
| 3527 | */ |
| 3528 | public static final String DROPBOX_RESERVE_PERCENT = |
| 3529 | "dropbox_reserve_percent"; |
| 3530 | /** |
| 3531 | * Prefix for per-tag dropbox disable/enable settings. |
| 3532 | * @hide |
| 3533 | */ |
| 3534 | public static final String DROPBOX_TAG_PREFIX = |
| 3535 | "dropbox:"; |
Dan Egnor | a455d19 | 2010-03-12 08:52:28 -0800 | [diff] [blame] | 3536 | /** |
| 3537 | * Lines of logcat to include with system crash/ANR/etc. reports, |
| 3538 | * as a prefix of the dropbox tag of the report type. |
| 3539 | * For example, "logcat_for_system_server_anr" controls the lines |
| 3540 | * of logcat captured with system server ANR reports. 0 to disable. |
| 3541 | * @hide |
| 3542 | */ |
| 3543 | public static final String ERROR_LOGCAT_PREFIX = |
| 3544 | "logcat_for_"; |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 3545 | |
| 3546 | |
| 3547 | /** |
| 3548 | * Screen timeout in milliseconds corresponding to the |
| 3549 | * PowerManager's POKE_LOCK_SHORT_TIMEOUT flag (i.e. the fastest |
| 3550 | * possible screen timeout behavior.) |
| 3551 | * @hide |
| 3552 | */ |
| 3553 | public static final String SHORT_KEYLIGHT_DELAY_MS = |
| 3554 | "short_keylight_delay_ms"; |
| 3555 | |
| 3556 | /** |
| 3557 | * The interval in minutes after which the amount of free storage left on the |
| 3558 | * device is logged to the event log |
| 3559 | * @hide |
| 3560 | */ |
| 3561 | public static final String SYS_FREE_STORAGE_LOG_INTERVAL = |
| 3562 | "sys_free_storage_log_interval"; |
| 3563 | |
| 3564 | /** |
| 3565 | * Threshold for the amount of change in disk free space required to report the amount of |
| 3566 | * free space. Used to prevent spamming the logs when the disk free space isn't changing |
| 3567 | * frequently. |
| 3568 | * @hide |
| 3569 | */ |
| 3570 | public static final String DISK_FREE_CHANGE_REPORTING_THRESHOLD = |
| 3571 | "disk_free_change_reporting_threshold"; |
| 3572 | |
| 3573 | |
| 3574 | /** |
| 3575 | * Minimum percentage of free storage on the device that is used to determine if |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 3576 | * the device is running low on storage. The default is 10. |
| 3577 | * <p>Say this value is set to 10, the device is considered running low on storage |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 3578 | * if 90% or more of the device storage is filled up. |
| 3579 | * @hide |
| 3580 | */ |
| 3581 | public static final String SYS_STORAGE_THRESHOLD_PERCENTAGE = |
| 3582 | "sys_storage_threshold_percentage"; |
| 3583 | |
| 3584 | /** |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 3585 | * Maximum byte size of the low storage threshold. This is to ensure |
| 3586 | * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in |
| 3587 | * an overly large threshold for large storage devices. Currently this |
| 3588 | * must be less than 2GB. This default is 500MB. |
| 3589 | * @hide |
| 3590 | */ |
| 3591 | public static final String SYS_STORAGE_THRESHOLD_MAX_BYTES = |
| 3592 | "sys_storage_threshold_max_bytes"; |
| 3593 | |
| 3594 | /** |
Jake Hamby | bb37163 | 2010-08-23 18:16:48 -0700 | [diff] [blame] | 3595 | * Minimum bytes of free storage on the device before the data |
| 3596 | * partition is considered full. By default, 1 MB is reserved |
| 3597 | * to avoid system-wide SQLite disk full exceptions. |
| 3598 | * @hide |
| 3599 | */ |
| 3600 | public static final String SYS_STORAGE_FULL_THRESHOLD_BYTES = |
| 3601 | "sys_storage_full_threshold_bytes"; |
| 3602 | |
| 3603 | /** |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 3604 | * The interval in milliseconds after which Wi-Fi is considered idle. |
| 3605 | * When idle, it is possible for the device to be switched from Wi-Fi to |
| 3606 | * the mobile data network. |
| 3607 | * @hide |
| 3608 | */ |
| 3609 | public static final String WIFI_IDLE_MS = "wifi_idle_ms"; |
| 3610 | |
| 3611 | /** |
Irfan Sheriff | 2b7f638 | 2011-03-25 14:29:19 -0700 | [diff] [blame] | 3612 | * The interval in milliseconds to issue wake up scans when wifi needs |
| 3613 | * to connect. This is necessary to connect to an access point when |
| 3614 | * device is on the move and the screen is off. |
Irfan Sheriff | 4f5f7c9 | 2010-10-14 17:01:27 -0700 | [diff] [blame] | 3615 | * @hide |
| 3616 | */ |
Irfan Sheriff | 2b7f638 | 2011-03-25 14:29:19 -0700 | [diff] [blame] | 3617 | public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS = |
| 3618 | "wifi_framework_scan_interval_ms"; |
| 3619 | |
| 3620 | /** |
| 3621 | * The interval in milliseconds to scan as used by the wifi supplicant |
| 3622 | * @hide |
| 3623 | */ |
| 3624 | public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS = |
| 3625 | "wifi_supplicant_scan_interval_ms"; |
Irfan Sheriff | 4f5f7c9 | 2010-10-14 17:01:27 -0700 | [diff] [blame] | 3626 | |
| 3627 | /** |
Doug Zongker | edc5189 | 2010-01-07 13:51:16 -0800 | [diff] [blame] | 3628 | * The interval in milliseconds at which to check packet counts on the |
| 3629 | * mobile data interface when screen is on, to detect possible data |
| 3630 | * connection problems. |
| 3631 | * @hide |
| 3632 | */ |
| 3633 | public static final String PDP_WATCHDOG_POLL_INTERVAL_MS = |
| 3634 | "pdp_watchdog_poll_interval_ms"; |
| 3635 | |
| 3636 | /** |
| 3637 | * The interval in milliseconds at which to check packet counts on the |
| 3638 | * mobile data interface when screen is off, to detect possible data |
| 3639 | * connection problems. |
| 3640 | * @hide |
| 3641 | */ |
| 3642 | public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS = |
| 3643 | "pdp_watchdog_long_poll_interval_ms"; |
| 3644 | |
| 3645 | /** |
| 3646 | * The interval in milliseconds at which to check packet counts on the |
| 3647 | * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} |
| 3648 | * outgoing packets has been reached without incoming packets. |
| 3649 | * @hide |
| 3650 | */ |
| 3651 | public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS = |
| 3652 | "pdp_watchdog_error_poll_interval_ms"; |
| 3653 | |
| 3654 | /** |
| 3655 | * The number of outgoing packets sent without seeing an incoming packet |
| 3656 | * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT} |
| 3657 | * device is logged to the event log |
| 3658 | * @hide |
| 3659 | */ |
| 3660 | public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT = |
| 3661 | "pdp_watchdog_trigger_packet_count"; |
| 3662 | |
| 3663 | /** |
| 3664 | * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS}) |
| 3665 | * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before |
| 3666 | * attempting data connection recovery. |
| 3667 | * @hide |
| 3668 | */ |
| 3669 | public static final String PDP_WATCHDOG_ERROR_POLL_COUNT = |
| 3670 | "pdp_watchdog_error_poll_count"; |
| 3671 | |
| 3672 | /** |
| 3673 | * The number of failed PDP reset attempts before moving to something more |
| 3674 | * drastic: re-registering to the network. |
| 3675 | * @hide |
| 3676 | */ |
| 3677 | public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT = |
| 3678 | "pdp_watchdog_max_pdp_reset_fail_count"; |
| 3679 | |
| 3680 | /** |
Kazuhiro Ondo | 7efb89b | 2011-12-21 20:54:03 -0600 | [diff] [blame] | 3681 | * The number of milliseconds to delay when checking for data stalls during |
| 3682 | * non-aggressive detection. (screen is turned off.) |
Wink Saville | 2861d23 | 2011-11-03 18:52:58 -0700 | [diff] [blame] | 3683 | * @hide |
| 3684 | */ |
Kazuhiro Ondo | 7efb89b | 2011-12-21 20:54:03 -0600 | [diff] [blame] | 3685 | public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS = |
| 3686 | "data_stall_alarm_non_aggressive_delay_in_ms"; |
| 3687 | |
| 3688 | /** |
| 3689 | * The number of milliseconds to delay when checking for data stalls during |
| 3690 | * aggressive detection. (screen on or suspected data stall) |
| 3691 | * @hide |
| 3692 | */ |
| 3693 | public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS = |
| 3694 | "data_stall_alarm_aggressive_delay_in_ms"; |
Wink Saville | 2861d23 | 2011-11-03 18:52:58 -0700 | [diff] [blame] | 3695 | |
| 3696 | /** |
Doug Zongker | edc5189 | 2010-01-07 13:51:16 -0800 | [diff] [blame] | 3697 | * The interval in milliseconds at which to check gprs registration |
| 3698 | * after the first registration mismatch of gprs and voice service, |
| 3699 | * to detect possible data network registration problems. |
| 3700 | * |
| 3701 | * @hide |
| 3702 | */ |
| 3703 | public static final String GPRS_REGISTER_CHECK_PERIOD_MS = |
| 3704 | "gprs_register_check_period_ms"; |
| 3705 | |
| 3706 | /** |
| 3707 | * The length of time in milli-seconds that automatic small adjustments to |
| 3708 | * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded. |
| 3709 | * @hide |
| 3710 | */ |
| 3711 | public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing"; |
| 3712 | |
| 3713 | /** |
| 3714 | * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment |
| 3715 | * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been |
| 3716 | * exceeded. |
| 3717 | * @hide |
| 3718 | */ |
| 3719 | public static final String NITZ_UPDATE_DIFF = "nitz_update_diff"; |
| 3720 | |
| 3721 | /** |
| 3722 | * The maximum reconnect delay for short network outages or when the network is suspended |
| 3723 | * due to phone use. |
| 3724 | * @hide |
| 3725 | */ |
| 3726 | public static final String SYNC_MAX_RETRY_DELAY_IN_SECONDS = |
| 3727 | "sync_max_retry_delay_in_seconds"; |
| 3728 | |
| 3729 | /** |
| 3730 | * The interval in milliseconds at which to check the number of SMS sent |
| 3731 | * out without asking for use permit, to limit the un-authorized SMS |
| 3732 | * usage. |
| 3733 | * @hide |
| 3734 | */ |
| 3735 | public static final String SMS_OUTGOING_CHECK_INTERVAL_MS = |
| 3736 | "sms_outgoing_check_interval_ms"; |
| 3737 | |
| 3738 | /** |
| 3739 | * The number of outgoing SMS sent without asking for user permit |
| 3740 | * (of {@link #SMS_OUTGOING_CHECK_INTERVAL_MS} |
| 3741 | * @hide |
| 3742 | */ |
| 3743 | public static final String SMS_OUTGOING_CHECK_MAX_COUNT = |
| 3744 | "sms_outgoing_check_max_count"; |
| 3745 | |
| 3746 | /** |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 3747 | * The global search provider chosen by the user (if multiple global |
| 3748 | * search providers are installed). This will be the provider returned |
| 3749 | * by {@link SearchManager#getGlobalSearchActivity()} if it's still |
| 3750 | * installed. This setting is stored as a flattened component name as |
| 3751 | * per {@link ComponentName#flattenToString()}. |
| 3752 | * |
| 3753 | * @hide |
| 3754 | */ |
| 3755 | public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY = |
| 3756 | "search_global_search_activity"; |
| 3757 | |
| 3758 | /** |
Doug Zongker | aed8f8e | 2010-01-07 18:07:50 -0800 | [diff] [blame] | 3759 | * The number of promoted sources in GlobalSearch. |
| 3760 | * @hide |
| 3761 | */ |
| 3762 | public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources"; |
| 3763 | /** |
| 3764 | * The maximum number of suggestions returned by GlobalSearch. |
| 3765 | * @hide |
| 3766 | */ |
| 3767 | public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display"; |
| 3768 | /** |
| 3769 | * The number of suggestions GlobalSearch will ask each non-web search source for. |
| 3770 | * @hide |
| 3771 | */ |
| 3772 | public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source"; |
| 3773 | /** |
| 3774 | * The number of suggestions the GlobalSearch will ask the web search source for. |
| 3775 | * @hide |
| 3776 | */ |
| 3777 | public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT = |
| 3778 | "search_web_results_override_limit"; |
| 3779 | /** |
| 3780 | * The number of milliseconds that GlobalSearch will wait for suggestions from |
| 3781 | * promoted sources before continuing with all other sources. |
| 3782 | * @hide |
| 3783 | */ |
| 3784 | public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS = |
| 3785 | "search_promoted_source_deadline_millis"; |
| 3786 | /** |
| 3787 | * The number of milliseconds before GlobalSearch aborts search suggesiton queries. |
| 3788 | * @hide |
| 3789 | */ |
| 3790 | public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis"; |
| 3791 | /** |
| 3792 | * The maximum number of milliseconds that GlobalSearch shows the previous results |
| 3793 | * after receiving a new query. |
| 3794 | * @hide |
| 3795 | */ |
| 3796 | public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis"; |
| 3797 | /** |
| 3798 | * The maximum age of log data used for shortcuts in GlobalSearch. |
| 3799 | * @hide |
| 3800 | */ |
| 3801 | public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis"; |
| 3802 | /** |
| 3803 | * The maximum age of log data used for source ranking in GlobalSearch. |
| 3804 | * @hide |
| 3805 | */ |
| 3806 | public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS = |
| 3807 | "search_max_source_event_age_millis"; |
| 3808 | /** |
| 3809 | * The minimum number of impressions needed to rank a source in GlobalSearch. |
| 3810 | * @hide |
| 3811 | */ |
| 3812 | public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING = |
| 3813 | "search_min_impressions_for_source_ranking"; |
| 3814 | /** |
| 3815 | * The minimum number of clicks needed to rank a source in GlobalSearch. |
| 3816 | * @hide |
| 3817 | */ |
| 3818 | public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING = |
| 3819 | "search_min_clicks_for_source_ranking"; |
| 3820 | /** |
| 3821 | * The maximum number of shortcuts shown by GlobalSearch. |
| 3822 | * @hide |
| 3823 | */ |
| 3824 | public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned"; |
| 3825 | /** |
| 3826 | * The size of the core thread pool for suggestion queries in GlobalSearch. |
| 3827 | * @hide |
| 3828 | */ |
| 3829 | public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE = |
| 3830 | "search_query_thread_core_pool_size"; |
| 3831 | /** |
| 3832 | * The maximum size of the thread pool for suggestion queries in GlobalSearch. |
| 3833 | * @hide |
| 3834 | */ |
| 3835 | public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE = |
| 3836 | "search_query_thread_max_pool_size"; |
| 3837 | /** |
| 3838 | * The size of the core thread pool for shortcut refreshing in GlobalSearch. |
| 3839 | * @hide |
| 3840 | */ |
| 3841 | public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE = |
| 3842 | "search_shortcut_refresh_core_pool_size"; |
| 3843 | /** |
| 3844 | * The maximum size of the thread pool for shortcut refreshing in GlobalSearch. |
| 3845 | * @hide |
| 3846 | */ |
| 3847 | public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE = |
| 3848 | "search_shortcut_refresh_max_pool_size"; |
| 3849 | /** |
| 3850 | * The maximun time that excess threads in the GlobalSeach thread pools will |
| 3851 | * wait before terminating. |
| 3852 | * @hide |
| 3853 | */ |
| 3854 | public static final String SEARCH_THREAD_KEEPALIVE_SECONDS = |
| 3855 | "search_thread_keepalive_seconds"; |
| 3856 | /** |
| 3857 | * The maximum number of concurrent suggestion queries to each source. |
| 3858 | * @hide |
| 3859 | */ |
| 3860 | public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT = |
| 3861 | "search_per_source_concurrent_query_limit"; |
| 3862 | |
San Mehat | 87734d3 | 2010-01-08 12:53:06 -0800 | [diff] [blame] | 3863 | /** |
| 3864 | * Whether or not alert sounds are played on MountService events. (0 = false, 1 = true) |
| 3865 | * @hide |
| 3866 | */ |
| 3867 | public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd"; |
| 3868 | |
| 3869 | /** |
| 3870 | * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true) |
| 3871 | * @hide |
| 3872 | */ |
| 3873 | public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart"; |
| 3874 | |
| 3875 | /** |
| 3876 | * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true) |
| 3877 | * @hide |
| 3878 | */ |
| 3879 | public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt"; |
| 3880 | |
| 3881 | /** |
| 3882 | * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true) |
| 3883 | * @hide |
| 3884 | */ |
| 3885 | public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled"; |
Doug Zongker | aed8f8e | 2010-01-07 18:07:50 -0800 | [diff] [blame] | 3886 | |
Dan Egnor | 42471dd | 2010-01-07 17:25:22 -0800 | [diff] [blame] | 3887 | /** |
| 3888 | * If nonzero, ANRs in invisible background processes bring up a dialog. |
| 3889 | * Otherwise, the process will be silently killed. |
| 3890 | * @hide |
| 3891 | */ |
| 3892 | public static final String ANR_SHOW_BACKGROUND = "anr_show_background"; |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 3893 | |
Mike LeBeau | 5d34e9b | 2010-02-10 19:34:56 -0800 | [diff] [blame] | 3894 | /** |
| 3895 | * The {@link ComponentName} string of the service to be used as the voice recognition |
| 3896 | * service. |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 3897 | * |
Mike LeBeau | 5d34e9b | 2010-02-10 19:34:56 -0800 | [diff] [blame] | 3898 | * @hide |
| 3899 | */ |
| 3900 | public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service"; |
Dan Egnor | 42471dd | 2010-01-07 17:25:22 -0800 | [diff] [blame] | 3901 | |
satok | 988323c | 2011-06-22 16:38:13 +0900 | [diff] [blame] | 3902 | |
| 3903 | /** |
satok | ada8c4e | 2011-08-23 14:56:56 +0900 | [diff] [blame] | 3904 | * The {@link ComponentName} string of the selected spell checker service which is |
| 3905 | * one of the services managed by the text service manager. |
| 3906 | * |
| 3907 | * @hide |
| 3908 | */ |
| 3909 | public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker"; |
| 3910 | |
| 3911 | /** |
| 3912 | * The {@link ComponentName} string of the selected subtype of the selected spell checker |
satok | 988323c | 2011-06-22 16:38:13 +0900 | [diff] [blame] | 3913 | * service which is one of the services managed by the text service manager. |
| 3914 | * |
| 3915 | * @hide |
| 3916 | */ |
satok | ada8c4e | 2011-08-23 14:56:56 +0900 | [diff] [blame] | 3917 | public static final String SELECTED_SPELL_CHECKER_SUBTYPE = |
| 3918 | "selected_spell_checker_subtype"; |
satok | 988323c | 2011-06-22 16:38:13 +0900 | [diff] [blame] | 3919 | |
Doug Zongker | aed8f8e | 2010-01-07 18:07:50 -0800 | [diff] [blame] | 3920 | /** |
satok | a33c4fc | 2011-08-25 16:50:11 +0900 | [diff] [blame] | 3921 | * The {@link ComponentName} string whether spell checker is enabled or not. |
| 3922 | * |
| 3923 | * @hide |
| 3924 | */ |
| 3925 | public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled"; |
| 3926 | |
| 3927 | /** |
David Brown | 458e806 | 2010-03-08 21:52:11 -0800 | [diff] [blame] | 3928 | * What happens when the user presses the Power button while in-call |
| 3929 | * and the screen is on.<br/> |
| 3930 | * <b>Values:</b><br/> |
| 3931 | * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/> |
| 3932 | * 2 - The Power button hangs up the current call.<br/> |
| 3933 | * |
| 3934 | * @hide |
| 3935 | */ |
| 3936 | public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior"; |
| 3937 | |
| 3938 | /** |
| 3939 | * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen". |
| 3940 | * @hide |
| 3941 | */ |
| 3942 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1; |
| 3943 | |
| 3944 | /** |
| 3945 | * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up". |
| 3946 | * @hide |
| 3947 | */ |
| 3948 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2; |
| 3949 | |
| 3950 | /** |
| 3951 | * INCALL_POWER_BUTTON_BEHAVIOR default value. |
| 3952 | * @hide |
| 3953 | */ |
| 3954 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT = |
| 3955 | INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF; |
| 3956 | |
| 3957 | /** |
Dianne Hackborn | 2ccda4d | 2010-03-22 21:49:15 -0700 | [diff] [blame] | 3958 | * The current night mode that has been selected by the user. Owned |
| 3959 | * and controlled by UiModeManagerService. Constants are as per |
| 3960 | * UiModeManager. |
| 3961 | * @hide |
| 3962 | */ |
| 3963 | public static final String UI_NIGHT_MODE = "ui_night_mode"; |
Suchi Amalapurapu | 40e4725 | 2010-04-07 16:15:50 -0700 | [diff] [blame] | 3964 | |
| 3965 | /** |
| 3966 | * Let user pick default install location. |
| 3967 | * @hide |
| 3968 | */ |
| 3969 | public static final String SET_INSTALL_LOCATION = "set_install_location"; |
| 3970 | |
| 3971 | /** |
| 3972 | * Default install location value. |
| 3973 | * 0 = auto, let system decide |
| 3974 | * 1 = internal |
| 3975 | * 2 = sdcard |
| 3976 | * @hide |
| 3977 | */ |
| 3978 | public static final String DEFAULT_INSTALL_LOCATION = "default_install_location"; |
Robert Greenwalt | 9e696c2 | 2010-04-01 14:45:18 -0700 | [diff] [blame] | 3979 | |
| 3980 | /** |
| 3981 | * The bandwidth throttle polling freqency in seconds |
| 3982 | * @hide |
| 3983 | */ |
| 3984 | public static final String THROTTLE_POLLING_SEC = "throttle_polling_sec"; |
| 3985 | |
| 3986 | /** |
| 3987 | * The bandwidth throttle threshold (long) |
| 3988 | * @hide |
| 3989 | */ |
Robert Greenwalt | d3bb93f | 2010-04-12 19:20:55 -0700 | [diff] [blame] | 3990 | public static final String THROTTLE_THRESHOLD_BYTES = "throttle_threshold_bytes"; |
Robert Greenwalt | 9e696c2 | 2010-04-01 14:45:18 -0700 | [diff] [blame] | 3991 | |
| 3992 | /** |
| 3993 | * The bandwidth throttle value (kbps) |
| 3994 | * @hide |
| 3995 | */ |
Robert Greenwalt | d3bb93f | 2010-04-12 19:20:55 -0700 | [diff] [blame] | 3996 | public static final String THROTTLE_VALUE_KBITSPS = "throttle_value_kbitsps"; |
Robert Greenwalt | 9e696c2 | 2010-04-01 14:45:18 -0700 | [diff] [blame] | 3997 | |
| 3998 | /** |
| 3999 | * The bandwidth throttle reset calendar day (1-28) |
| 4000 | * @hide |
| 4001 | */ |
| 4002 | public static final String THROTTLE_RESET_DAY = "throttle_reset_day"; |
| 4003 | |
| 4004 | /** |
| 4005 | * The throttling notifications we should send |
| 4006 | * @hide |
| 4007 | */ |
| 4008 | public static final String THROTTLE_NOTIFICATION_TYPE = "throttle_notification_type"; |
| 4009 | |
| 4010 | /** |
Irfan Sheriff | c9b6851 | 2010-04-08 14:12:33 -0700 | [diff] [blame] | 4011 | * Help URI for data throttling policy |
| 4012 | * @hide |
| 4013 | */ |
| 4014 | public static final String THROTTLE_HELP_URI = "throttle_help_uri"; |
| 4015 | |
Robert Greenwalt | d1055a2 | 2010-05-25 15:54:52 -0700 | [diff] [blame] | 4016 | /** |
| 4017 | * The length of time in Sec that we allow our notion of NTP time |
| 4018 | * to be cached before we refresh it |
| 4019 | * @hide |
| 4020 | */ |
| 4021 | public static final String THROTTLE_MAX_NTP_CACHE_AGE_SEC = |
| 4022 | "throttle_max_ntp_cache_age_sec"; |
| 4023 | |
Steve Howard | 9c4e33e | 2010-07-28 15:59:29 -0700 | [diff] [blame] | 4024 | /** |
| 4025 | * The maximum size, in bytes, of a download that the download manager will transfer over |
| 4026 | * a non-wifi connection. |
| 4027 | * @hide |
| 4028 | */ |
| 4029 | public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE = |
| 4030 | "download_manager_max_bytes_over_mobile"; |
| 4031 | |
Robert Greenwalt | d7085fc | 2010-09-08 15:24:47 -0700 | [diff] [blame] | 4032 | /** |
Steve Howard | f176681 | 2010-09-17 16:46:19 -0700 | [diff] [blame] | 4033 | * The recommended maximum size, in bytes, of a download that the download manager should |
| 4034 | * transfer over a non-wifi connection. Over this size, the use will be warned, but will |
| 4035 | * have the option to start the download over the mobile connection anyway. |
| 4036 | * @hide |
| 4037 | */ |
| 4038 | public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE = |
| 4039 | "download_manager_recommended_max_bytes_over_mobile"; |
| 4040 | |
| 4041 | /** |
Robert Greenwalt | d7085fc | 2010-09-08 15:24:47 -0700 | [diff] [blame] | 4042 | * ms during which to consume extra events related to Inet connection condition |
| 4043 | * after a transtion to fully-connected |
| 4044 | * @hide |
| 4045 | */ |
| 4046 | public static final String INET_CONDITION_DEBOUNCE_UP_DELAY = |
| 4047 | "inet_condition_debounce_up_delay"; |
| 4048 | |
| 4049 | /** |
| 4050 | * ms during which to consume extra events related to Inet connection condtion |
| 4051 | * after a transtion to partly-connected |
| 4052 | * @hide |
| 4053 | */ |
| 4054 | public static final String INET_CONDITION_DEBOUNCE_DOWN_DELAY = |
| 4055 | "inet_condition_debounce_down_delay"; |
Irfan Sheriff | c9b6851 | 2010-04-08 14:12:33 -0700 | [diff] [blame] | 4056 | |
| 4057 | /** |
Freeman Ng | 96be4e0 | 2011-04-07 18:21:40 -0700 | [diff] [blame] | 4058 | * URL to open browser on to allow user to manage a prepay account |
| 4059 | * @hide |
| 4060 | */ |
| 4061 | public static final String SETUP_PREPAID_DATA_SERVICE_URL = |
| 4062 | "setup_prepaid_data_service_url"; |
| 4063 | |
| 4064 | /** |
Freeman Ng | 3b9089c | 2011-04-22 16:42:57 -0700 | [diff] [blame] | 4065 | * URL to attempt a GET on to see if this is a prepay device |
| 4066 | * @hide |
| 4067 | */ |
| 4068 | public static final String SETUP_PREPAID_DETECTION_TARGET_URL = |
| 4069 | "setup_prepaid_detection_target_url"; |
| 4070 | |
| 4071 | /** |
| 4072 | * Host to check for a redirect to after an attempt to GET |
| 4073 | * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there, |
| 4074 | * this is a prepaid device with zero balance.) |
| 4075 | * @hide |
| 4076 | */ |
| 4077 | public static final String SETUP_PREPAID_DETECTION_REDIR_HOST = |
| 4078 | "setup_prepaid_detection_redir_host"; |
| 4079 | |
| 4080 | /** |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 4081 | * Whether the screensaver is enabled. |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 4082 | * @hide |
| 4083 | */ |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 4084 | public static final String SCREENSAVER_ENABLED = "screensaver_enabled"; |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 4085 | |
| 4086 | /** |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 4087 | * The user's chosen screensaver component. |
| 4088 | * |
| 4089 | * This component will be launched by the PhoneWindowManager after a timeout when not on |
| 4090 | * 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] | 4091 | * @hide |
| 4092 | */ |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 4093 | public static final String SCREENSAVER_COMPONENT = "screensaver_component"; |
| 4094 | |
| 4095 | /** |
| 4096 | * Whether the screensaver should be automatically launched when the device is inserted |
| 4097 | * into a (desk) dock. |
| 4098 | * @hide |
| 4099 | */ |
| 4100 | public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock"; |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 4101 | |
Jeff Sharkey | 61ee0bb | 2011-05-29 22:50:42 -0700 | [diff] [blame] | 4102 | /** {@hide} */ |
Jeff Sharkey | 0a9ee12 | 2011-06-22 16:32:41 -0700 | [diff] [blame] | 4103 | public static final String NETSTATS_ENABLED = "netstats_enabled"; |
| 4104 | /** {@hide} */ |
Jeff Sharkey | 61ee0bb | 2011-05-29 22:50:42 -0700 | [diff] [blame] | 4105 | public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval"; |
| 4106 | /** {@hide} */ |
| 4107 | public static final String NETSTATS_PERSIST_THRESHOLD = "netstats_persist_threshold"; |
| 4108 | /** {@hide} */ |
Jeff Sharkey | 39ebc21 | 2011-06-11 17:25:42 -0700 | [diff] [blame] | 4109 | public static final String NETSTATS_NETWORK_BUCKET_DURATION = "netstats_network_bucket_duration"; |
Jeff Sharkey | 61ee0bb | 2011-05-29 22:50:42 -0700 | [diff] [blame] | 4110 | /** {@hide} */ |
Jeff Sharkey | 39ebc21 | 2011-06-11 17:25:42 -0700 | [diff] [blame] | 4111 | public static final String NETSTATS_NETWORK_MAX_HISTORY = "netstats_network_max_history"; |
Jeff Sharkey | 61ee0bb | 2011-05-29 22:50:42 -0700 | [diff] [blame] | 4112 | /** {@hide} */ |
Jeff Sharkey | 39ebc21 | 2011-06-11 17:25:42 -0700 | [diff] [blame] | 4113 | public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration"; |
Jeff Sharkey | 61ee0bb | 2011-05-29 22:50:42 -0700 | [diff] [blame] | 4114 | /** {@hide} */ |
Jeff Sharkey | 39ebc21 | 2011-06-11 17:25:42 -0700 | [diff] [blame] | 4115 | public static final String NETSTATS_UID_MAX_HISTORY = "netstats_uid_max_history"; |
Jeff Sharkey | d03fd3f | 2011-06-19 20:55:09 -0700 | [diff] [blame] | 4116 | /** {@hide} */ |
| 4117 | public static final String NETSTATS_TAG_MAX_HISTORY = "netstats_tag_max_history"; |
Jeff Sharkey | 61ee0bb | 2011-05-29 22:50:42 -0700 | [diff] [blame] | 4118 | |
Jeff Sharkey | 104344e | 2011-07-10 14:20:41 -0700 | [diff] [blame] | 4119 | /** Preferred NTP server. {@hide} */ |
| 4120 | public static final String NTP_SERVER = "ntp_server"; |
| 4121 | /** Timeout in milliseconds to wait for NTP server. {@hide} */ |
| 4122 | public static final String NTP_TIMEOUT = "ntp_timeout"; |
| 4123 | |
Ben Murdoch | 9999c1d | 2011-07-19 16:51:24 +0100 | [diff] [blame] | 4124 | /** Autofill server address (Used in WebView/browser). {@hide} */ |
| 4125 | public static final String WEB_AUTOFILL_QUERY_URL = |
| 4126 | "web_autofill_query_url"; |
| 4127 | |
Kenny Root | 5ab2157 | 2011-07-27 11:11:19 -0700 | [diff] [blame] | 4128 | /** Whether package verification is enabled. {@hide} */ |
| 4129 | public static final String PACKAGE_VERIFIER_ENABLE = "verifier_enable"; |
| 4130 | |
| 4131 | /** Timeout for package verification. {@hide} */ |
| 4132 | public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout"; |
| 4133 | |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 4134 | /** |
Dave Santoro | e43185e | 2011-10-10 18:11:00 -0700 | [diff] [blame] | 4135 | * Duration in milliseconds before pre-authorized URIs for the contacts |
| 4136 | * provider should expire. |
| 4137 | * @hide |
| 4138 | */ |
| 4139 | public static final String CONTACTS_PREAUTH_URI_EXPIRATION = |
| 4140 | "contacts_preauth_uri_expiration"; |
| 4141 | |
| 4142 | /** |
Svetoslav Ganov | a571a58 | 2011-09-20 18:32:20 -0700 | [diff] [blame] | 4143 | * This are the settings to be backed up. |
| 4144 | * |
| 4145 | * NOTE: Settings are backed up and restored in the order they appear |
| 4146 | * in this array. If you have one setting depending on another, |
| 4147 | * make sure that they are ordered appropriately. |
| 4148 | * |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4149 | * @hide |
| 4150 | */ |
| 4151 | public static final String[] SETTINGS_TO_BACKUP = { |
Amith Yamasani | 8823c0a8 | 2009-07-07 14:30:17 -0700 | [diff] [blame] | 4152 | ADB_ENABLED, |
| 4153 | ALLOW_MOCK_LOCATION, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4154 | PARENTAL_CONTROL_ENABLED, |
| 4155 | PARENTAL_CONTROL_REDIRECT_URL, |
| 4156 | USB_MASS_STORAGE_ENABLED, |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 4157 | ACCESSIBILITY_SCRIPT_INJECTION, |
Christopher Tate | 14c2d79 | 2010-02-25 16:49:44 -0800 | [diff] [blame] | 4158 | BACKUP_AUTO_RESTORE, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4159 | ENABLED_ACCESSIBILITY_SERVICES, |
Svetoslav Ganov | a28a16d | 2011-07-28 11:24:21 -0700 | [diff] [blame] | 4160 | TOUCH_EXPLORATION_ENABLED, |
Svetoslav Ganov | a571a58 | 2011-09-20 18:32:20 -0700 | [diff] [blame] | 4161 | ACCESSIBILITY_ENABLED, |
Svetoslav Ganov | 55f937a | 2011-12-05 11:42:07 -0800 | [diff] [blame] | 4162 | ACCESSIBILITY_SPEAK_PASSWORD, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4163 | TTS_USE_DEFAULTS, |
| 4164 | TTS_DEFAULT_RATE, |
| 4165 | TTS_DEFAULT_PITCH, |
| 4166 | TTS_DEFAULT_SYNTH, |
| 4167 | TTS_DEFAULT_LANG, |
| 4168 | TTS_DEFAULT_COUNTRY, |
Charles Chen | ceffa15 | 2010-03-16 21:18:10 -0700 | [diff] [blame] | 4169 | TTS_ENABLED_PLUGINS, |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 4170 | TTS_DEFAULT_LOCALE, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4171 | WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, |
| 4172 | WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4173 | WIFI_NUM_OPEN_NETWORKS_KEPT, |
San Mehat | 87734d3 | 2010-01-08 12:53:06 -0800 | [diff] [blame] | 4174 | MOUNT_PLAY_NOTIFICATION_SND, |
| 4175 | MOUNT_UMS_AUTOSTART, |
| 4176 | MOUNT_UMS_PROMPT, |
Dianne Hackborn | 2ccda4d | 2010-03-22 21:49:15 -0700 | [diff] [blame] | 4177 | MOUNT_UMS_NOTIFY_ENABLED, |
Amith Yamasani | aee2687 | 2011-10-11 13:53:30 -0700 | [diff] [blame] | 4178 | UI_NIGHT_MODE, |
| 4179 | LOCK_SCREEN_OWNER_INFO, |
Tom Taylor | 994da2a | 2011-11-10 11:17:38 -0800 | [diff] [blame] | 4180 | LOCK_SCREEN_OWNER_INFO_ENABLED |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 4181 | }; |
| 4182 | |
| 4183 | /** |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4184 | * Helper method for determining if a location provider is enabled. |
| 4185 | * @param cr the content resolver to use |
| 4186 | * @param provider the location provider to query |
| 4187 | * @return true if the provider is enabled |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4188 | */ |
| 4189 | public static final boolean isLocationProviderEnabled(ContentResolver cr, String provider) { |
| 4190 | String allowedProviders = Settings.Secure.getString(cr, LOCATION_PROVIDERS_ALLOWED); |
Brad Fitzpatrick | 11fe181 | 2010-09-10 16:07:52 -0700 | [diff] [blame] | 4191 | return TextUtils.delimitedStringContains(allowedProviders, ',', provider); |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4192 | } |
| 4193 | |
| 4194 | /** |
| 4195 | * Thread-safe method for enabling or disabling a single location provider. |
| 4196 | * @param cr the content resolver to use |
| 4197 | * @param provider the location provider to enable or disable |
| 4198 | * @param enabled true if the provider should be enabled |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 4199 | */ |
| 4200 | public static final void setLocationProviderEnabled(ContentResolver cr, |
| 4201 | String provider, boolean enabled) { |
| 4202 | // to ensure thread safety, we write the provider name with a '+' or '-' |
| 4203 | // and let the SettingsProvider handle it rather than reading and modifying |
| 4204 | // the list of enabled providers. |
| 4205 | if (enabled) { |
| 4206 | provider = "+" + provider; |
| 4207 | } else { |
| 4208 | provider = "-" + provider; |
| 4209 | } |
| 4210 | putString(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider); |
| 4211 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4212 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4213 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4214 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4215 | * User-defined bookmarks and shortcuts. The target of each bookmark is an |
| 4216 | * Intent URL, allowing it to be either a web page or a particular |
| 4217 | * application activity. |
| 4218 | * |
| 4219 | * @hide |
| 4220 | */ |
| 4221 | public static final class Bookmarks implements BaseColumns |
| 4222 | { |
| 4223 | private static final String TAG = "Bookmarks"; |
| 4224 | |
| 4225 | /** |
| 4226 | * The content:// style URL for this table |
| 4227 | */ |
| 4228 | public static final Uri CONTENT_URI = |
| 4229 | Uri.parse("content://" + AUTHORITY + "/bookmarks"); |
| 4230 | |
| 4231 | /** |
| 4232 | * The row ID. |
| 4233 | * <p>Type: INTEGER</p> |
| 4234 | */ |
| 4235 | public static final String ID = "_id"; |
| 4236 | |
| 4237 | /** |
| 4238 | * Descriptive name of the bookmark that can be displayed to the user. |
| 4239 | * If this is empty, the title should be resolved at display time (use |
| 4240 | * {@link #getTitle(Context, Cursor)} any time you want to display the |
| 4241 | * title of a bookmark.) |
| 4242 | * <P> |
| 4243 | * Type: TEXT |
| 4244 | * </P> |
| 4245 | */ |
| 4246 | public static final String TITLE = "title"; |
| 4247 | |
| 4248 | /** |
| 4249 | * Arbitrary string (displayed to the user) that allows bookmarks to be |
| 4250 | * organized into categories. There are some special names for |
| 4251 | * standard folders, which all start with '@'. The label displayed for |
| 4252 | * the folder changes with the locale (via {@link #getLabelForFolder}) but |
| 4253 | * the folder name does not change so you can consistently query for |
| 4254 | * the folder regardless of the current locale. |
| 4255 | * |
| 4256 | * <P>Type: TEXT</P> |
| 4257 | * |
| 4258 | */ |
| 4259 | public static final String FOLDER = "folder"; |
| 4260 | |
| 4261 | /** |
| 4262 | * The Intent URL of the bookmark, describing what it points to. This |
| 4263 | * value is given to {@link android.content.Intent#getIntent} to create |
| 4264 | * an Intent that can be launched. |
| 4265 | * <P>Type: TEXT</P> |
| 4266 | */ |
| 4267 | public static final String INTENT = "intent"; |
| 4268 | |
| 4269 | /** |
| 4270 | * Optional shortcut character associated with this bookmark. |
| 4271 | * <P>Type: INTEGER</P> |
| 4272 | */ |
| 4273 | public static final String SHORTCUT = "shortcut"; |
| 4274 | |
| 4275 | /** |
| 4276 | * The order in which the bookmark should be displayed |
| 4277 | * <P>Type: INTEGER</P> |
| 4278 | */ |
| 4279 | public static final String ORDERING = "ordering"; |
| 4280 | |
| 4281 | private static final String[] sIntentProjection = { INTENT }; |
| 4282 | private static final String[] sShortcutProjection = { ID, SHORTCUT }; |
| 4283 | private static final String sShortcutSelection = SHORTCUT + "=?"; |
| 4284 | |
| 4285 | /** |
| 4286 | * Convenience function to retrieve the bookmarked Intent for a |
| 4287 | * particular shortcut key. |
| 4288 | * |
| 4289 | * @param cr The ContentResolver to query. |
| 4290 | * @param shortcut The shortcut key. |
| 4291 | * |
| 4292 | * @return Intent The bookmarked URL, or null if there is no bookmark |
| 4293 | * matching the given shortcut. |
| 4294 | */ |
| 4295 | public static Intent getIntentForShortcut(ContentResolver cr, char shortcut) |
| 4296 | { |
| 4297 | Intent intent = null; |
| 4298 | |
| 4299 | Cursor c = cr.query(CONTENT_URI, |
| 4300 | sIntentProjection, sShortcutSelection, |
| 4301 | new String[] { String.valueOf((int) shortcut) }, ORDERING); |
| 4302 | // Keep trying until we find a valid shortcut |
| 4303 | try { |
| 4304 | while (intent == null && c.moveToNext()) { |
| 4305 | try { |
| 4306 | String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT)); |
Christian Mehlmauer | a34d2c9 | 2010-05-25 19:04:20 +0200 | [diff] [blame] | 4307 | intent = Intent.parseUri(intentURI, 0); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4308 | } catch (java.net.URISyntaxException e) { |
| 4309 | // The stored URL is bad... ignore it. |
| 4310 | } catch (IllegalArgumentException e) { |
| 4311 | // Column not found |
Dianne Hackborn | a33e3f7 | 2009-09-29 17:28:24 -0700 | [diff] [blame] | 4312 | Log.w(TAG, "Intent column not found", e); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4313 | } |
| 4314 | } |
| 4315 | } finally { |
| 4316 | if (c != null) c.close(); |
| 4317 | } |
| 4318 | |
| 4319 | return intent; |
| 4320 | } |
| 4321 | |
| 4322 | /** |
| 4323 | * Add a new bookmark to the system. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4324 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4325 | * @param cr The ContentResolver to query. |
| 4326 | * @param intent The desired target of the bookmark. |
| 4327 | * @param title Bookmark title that is shown to the user; null if none |
| 4328 | * or it should be resolved to the intent's title. |
| 4329 | * @param folder Folder in which to place the bookmark; null if none. |
| 4330 | * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If |
| 4331 | * this is non-zero and there is an existing bookmark entry |
| 4332 | * with this same shortcut, then that existing shortcut is |
| 4333 | * cleared (the bookmark is not removed). |
| 4334 | * @return The unique content URL for the new bookmark entry. |
| 4335 | */ |
| 4336 | public static Uri add(ContentResolver cr, |
| 4337 | Intent intent, |
| 4338 | String title, |
| 4339 | String folder, |
| 4340 | char shortcut, |
| 4341 | int ordering) |
| 4342 | { |
| 4343 | // If a shortcut is supplied, and it is already defined for |
| 4344 | // another bookmark, then remove the old definition. |
| 4345 | if (shortcut != 0) { |
Jeff Hamilton | 7cd51ef | 2010-05-12 17:30:27 -0500 | [diff] [blame] | 4346 | cr.delete(CONTENT_URI, sShortcutSelection, |
| 4347 | new String[] { String.valueOf((int) shortcut) }); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4348 | } |
| 4349 | |
| 4350 | ContentValues values = new ContentValues(); |
| 4351 | if (title != null) values.put(TITLE, title); |
| 4352 | if (folder != null) values.put(FOLDER, folder); |
Jean-Baptiste Queru | 3b9f0a3 | 2010-06-21 13:46:59 -0700 | [diff] [blame] | 4353 | values.put(INTENT, intent.toUri(0)); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4354 | if (shortcut != 0) values.put(SHORTCUT, (int) shortcut); |
| 4355 | values.put(ORDERING, ordering); |
| 4356 | return cr.insert(CONTENT_URI, values); |
| 4357 | } |
| 4358 | |
| 4359 | /** |
| 4360 | * Return the folder name as it should be displayed to the user. This |
| 4361 | * takes care of localizing special folders. |
| 4362 | * |
| 4363 | * @param r Resources object for current locale; only need access to |
| 4364 | * system resources. |
| 4365 | * @param folder The value found in the {@link #FOLDER} column. |
| 4366 | * |
| 4367 | * @return CharSequence The label for this folder that should be shown |
| 4368 | * to the user. |
| 4369 | */ |
| 4370 | public static CharSequence getLabelForFolder(Resources r, String folder) { |
| 4371 | return folder; |
| 4372 | } |
| 4373 | |
| 4374 | /** |
| 4375 | * Return the title as it should be displayed to the user. This takes |
| 4376 | * care of localizing bookmarks that point to activities. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4377 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4378 | * @param context A context. |
| 4379 | * @param cursor A cursor pointing to the row whose title should be |
| 4380 | * returned. The cursor must contain at least the {@link #TITLE} |
| 4381 | * and {@link #INTENT} columns. |
| 4382 | * @return A title that is localized and can be displayed to the user, |
| 4383 | * or the empty string if one could not be found. |
| 4384 | */ |
| 4385 | public static CharSequence getTitle(Context context, Cursor cursor) { |
| 4386 | int titleColumn = cursor.getColumnIndex(TITLE); |
| 4387 | int intentColumn = cursor.getColumnIndex(INTENT); |
| 4388 | if (titleColumn == -1 || intentColumn == -1) { |
| 4389 | throw new IllegalArgumentException( |
| 4390 | "The cursor must contain the TITLE and INTENT columns."); |
| 4391 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4392 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4393 | String title = cursor.getString(titleColumn); |
| 4394 | if (!TextUtils.isEmpty(title)) { |
| 4395 | return title; |
| 4396 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4397 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4398 | String intentUri = cursor.getString(intentColumn); |
| 4399 | if (TextUtils.isEmpty(intentUri)) { |
| 4400 | return ""; |
| 4401 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4402 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4403 | Intent intent; |
| 4404 | try { |
Christian Mehlmauer | a34d2c9 | 2010-05-25 19:04:20 +0200 | [diff] [blame] | 4405 | intent = Intent.parseUri(intentUri, 0); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4406 | } catch (URISyntaxException e) { |
| 4407 | return ""; |
| 4408 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4409 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4410 | PackageManager packageManager = context.getPackageManager(); |
| 4411 | ResolveInfo info = packageManager.resolveActivity(intent, 0); |
| 4412 | return info != null ? info.loadLabel(packageManager) : ""; |
| 4413 | } |
| 4414 | } |
| 4415 | |
| 4416 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4417 | * Returns the device ID that we should use when connecting to the mobile gtalk server. |
| 4418 | * This is a string like "android-0x1242", where the hex string is the Android ID obtained |
| 4419 | * from the GoogleLoginService. |
| 4420 | * |
| 4421 | * @param androidId The Android ID for this device. |
| 4422 | * @return The device ID that should be used when connecting to the mobile gtalk server. |
| 4423 | * @hide |
| 4424 | */ |
| 4425 | public static String getGTalkDeviceId(long androidId) { |
| 4426 | return "android-" + Long.toHexString(androidId); |
| 4427 | } |
| 4428 | } |