Settings.java revision c0086ea9501a5c409364b1bbb0b27d5af6f205cf
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 17package android.provider; 18 19import android.annotation.SdkConstant; 20import android.annotation.SdkConstant.SdkConstantType; 21import android.app.SearchManager; 22import android.app.WallpaperManager; 23import android.content.ComponentName; 24import android.content.ContentResolver; 25import android.content.ContentValues; 26import android.content.Context; 27import android.content.IContentProvider; 28import android.content.Intent; 29import android.content.pm.ActivityInfo; 30import android.content.pm.PackageManager; 31import android.content.pm.ResolveInfo; 32import android.content.res.Configuration; 33import android.content.res.Resources; 34import android.database.Cursor; 35import android.database.SQLException; 36import android.location.LocationManager; 37import android.net.ConnectivityManager; 38import android.net.Uri; 39import android.net.wifi.WifiManager; 40import android.os.BatteryManager; 41import android.os.Bundle; 42import android.os.DropBoxManager; 43import android.os.IBinder; 44import android.os.Process; 45import android.os.RemoteException; 46import android.os.ServiceManager; 47import android.os.SystemProperties; 48import android.os.UserHandle; 49import android.os.Build.VERSION_CODES; 50import android.speech.tts.TextToSpeech; 51import android.text.TextUtils; 52import android.util.AndroidException; 53import android.util.Log; 54 55import com.android.internal.widget.ILockSettings; 56 57import java.net.URISyntaxException; 58import java.util.HashMap; 59import java.util.HashSet; 60import java.util.Locale; 61 62/** 63 * The Settings provider contains global system-level device preferences. 64 */ 65public final class Settings { 66 67 // Intent actions for Settings 68 69 /** 70 * Activity Action: Show system settings. 71 * <p> 72 * Input: Nothing. 73 * <p> 74 * Output: Nothing. 75 */ 76 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 77 public static final String ACTION_SETTINGS = "android.settings.SETTINGS"; 78 79 /** 80 * Activity Action: Show settings to allow configuration of APNs. 81 * <p> 82 * Input: Nothing. 83 * <p> 84 * Output: Nothing. 85 */ 86 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 87 public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS"; 88 89 /** 90 * Activity Action: Show settings to allow configuration of current location 91 * sources. 92 * <p> 93 * In some cases, a matching Activity may not exist, so ensure you 94 * safeguard against this. 95 * <p> 96 * Input: Nothing. 97 * <p> 98 * Output: Nothing. 99 */ 100 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 101 public static final String ACTION_LOCATION_SOURCE_SETTINGS = 102 "android.settings.LOCATION_SOURCE_SETTINGS"; 103 104 /** 105 * Activity Action: Show settings to allow configuration of wireless controls 106 * such as Wi-Fi, Bluetooth and Mobile networks. 107 * <p> 108 * In some cases, a matching Activity may not exist, so ensure you 109 * safeguard against this. 110 * <p> 111 * Input: Nothing. 112 * <p> 113 * Output: Nothing. 114 */ 115 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 116 public static final String ACTION_WIRELESS_SETTINGS = 117 "android.settings.WIRELESS_SETTINGS"; 118 119 /** 120 * Activity Action: Show settings to allow entering/exiting airplane mode. 121 * <p> 122 * In some cases, a matching Activity may not exist, so ensure you 123 * safeguard against this. 124 * <p> 125 * Input: Nothing. 126 * <p> 127 * Output: Nothing. 128 */ 129 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 130 public static final String ACTION_AIRPLANE_MODE_SETTINGS = 131 "android.settings.AIRPLANE_MODE_SETTINGS"; 132 133 /** 134 * Activity Action: Modify Airplane mode settings using the users voice. 135 * <p> 136 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 137 * <p> 138 * This intent MUST be started using 139 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity 140 * startVoiceActivity}. 141 * <p> 142 * To tell which state airplane mode should be set to, add the 143 * {@link #EXTRA_AIRPLANE_MODE_ENABLED} extra to this Intent with the state specified. 144 * If there is no extra in this Intent, no changes will be made. 145 * <p> 146 * The activity should verify that 147 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before 148 * modifying the setting. 149 * <p> 150 * Input: Nothing. 151 * <p> 152 * Output: Nothing. 153 */ 154 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 155 public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE = 156 "android.settings.VOICE_CONTROL_AIRPLANE_MODE"; 157 158 /** 159 * Activity Action: Show settings for accessibility modules. 160 * <p> 161 * In some cases, a matching Activity may not exist, so ensure you 162 * safeguard against this. 163 * <p> 164 * Input: Nothing. 165 * <p> 166 * Output: Nothing. 167 */ 168 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 169 public static final String ACTION_ACCESSIBILITY_SETTINGS = 170 "android.settings.ACCESSIBILITY_SETTINGS"; 171 172 /** 173 * Activity Action: Show settings to control access to usage information. 174 * <p> 175 * In some cases, a matching Activity may not exist, so ensure you 176 * safeguard against this. 177 * <p> 178 * Input: Nothing. 179 * <p> 180 * Output: Nothing. 181 */ 182 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 183 public static final String ACTION_USAGE_ACCESS_SETTINGS = 184 "android.settings.USAGE_ACCESS_SETTINGS"; 185 186 /** 187 * Activity Action: Show settings to allow configuration of security and 188 * location privacy. 189 * <p> 190 * In some cases, a matching Activity may not exist, so ensure you 191 * safeguard against this. 192 * <p> 193 * Input: Nothing. 194 * <p> 195 * Output: Nothing. 196 */ 197 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 198 public static final String ACTION_SECURITY_SETTINGS = 199 "android.settings.SECURITY_SETTINGS"; 200 201 /** 202 * Activity Action: Show trusted credentials settings, opening to the user tab, 203 * to allow management of installed credentials. 204 * <p> 205 * In some cases, a matching Activity may not exist, so ensure you 206 * safeguard against this. 207 * <p> 208 * Input: Nothing. 209 * <p> 210 * Output: Nothing. 211 * @hide 212 */ 213 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 214 public static final String ACTION_TRUSTED_CREDENTIALS_USER = 215 "com.android.settings.TRUSTED_CREDENTIALS_USER"; 216 217 /** 218 * Activity Action: Show dialog explaining that an installed CA cert may enable 219 * monitoring of encrypted network traffic. 220 * <p> 221 * In some cases, a matching Activity may not exist, so ensure you 222 * safeguard against this. 223 * <p> 224 * Input: Nothing. 225 * <p> 226 * Output: Nothing. 227 * @hide 228 */ 229 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 230 public static final String ACTION_MONITORING_CERT_INFO = 231 "com.android.settings.MONITORING_CERT_INFO"; 232 233 /** 234 * Activity Action: Show settings to allow configuration of privacy options. 235 * <p> 236 * In some cases, a matching Activity may not exist, so ensure you 237 * safeguard against this. 238 * <p> 239 * Input: Nothing. 240 * <p> 241 * Output: Nothing. 242 */ 243 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 244 public static final String ACTION_PRIVACY_SETTINGS = 245 "android.settings.PRIVACY_SETTINGS"; 246 247 /** 248 * Activity Action: Show settings to allow configuration of Wi-Fi. 249 * <p> 250 * In some cases, a matching Activity may not exist, so ensure you 251 * safeguard against this. 252 * <p> 253 * Input: Nothing. 254 * <p> 255 * Output: Nothing. 256 257 */ 258 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 259 public static final String ACTION_WIFI_SETTINGS = 260 "android.settings.WIFI_SETTINGS"; 261 262 /** 263 * Activity Action: Show settings to allow configuration of a static IP 264 * address for Wi-Fi. 265 * <p> 266 * In some cases, a matching Activity may not exist, so ensure you safeguard 267 * against this. 268 * <p> 269 * Input: Nothing. 270 * <p> 271 * Output: Nothing. 272 */ 273 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 274 public static final String ACTION_WIFI_IP_SETTINGS = 275 "android.settings.WIFI_IP_SETTINGS"; 276 277 /** 278 * Activity Action: Show settings to allow configuration of Bluetooth. 279 * <p> 280 * In some cases, a matching Activity may not exist, so ensure you 281 * safeguard against this. 282 * <p> 283 * Input: Nothing. 284 * <p> 285 * Output: Nothing. 286 */ 287 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 288 public static final String ACTION_BLUETOOTH_SETTINGS = 289 "android.settings.BLUETOOTH_SETTINGS"; 290 291 /** 292 * Activity Action: Show settings to allow configuration of Wifi Displays. 293 * <p> 294 * In some cases, a matching Activity may not exist, so ensure you 295 * safeguard against this. 296 * <p> 297 * Input: Nothing. 298 * <p> 299 * Output: Nothing. 300 * @hide 301 */ 302 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 303 public static final String ACTION_WIFI_DISPLAY_SETTINGS = 304 "android.settings.WIFI_DISPLAY_SETTINGS"; 305 306 /** 307 * Activity Action: Show settings to allow configuration of 308 * {@link android.media.routing.MediaRouteService media route providers}. 309 * <p> 310 * In some cases, a matching Activity may not exist, so ensure you 311 * safeguard against this. 312 * <p> 313 * Input: Nothing. 314 * <p> 315 * Output: Nothing. 316 */ 317 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 318 public static final String ACTION_CAST_SETTINGS = 319 "android.settings.CAST_SETTINGS"; 320 321 /** 322 * Activity Action: Show settings to allow configuration of date and time. 323 * <p> 324 * In some cases, a matching Activity may not exist, so ensure you 325 * safeguard against this. 326 * <p> 327 * Input: Nothing. 328 * <p> 329 * Output: Nothing. 330 */ 331 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 332 public static final String ACTION_DATE_SETTINGS = 333 "android.settings.DATE_SETTINGS"; 334 335 /** 336 * Activity Action: Show settings to allow configuration of sound and volume. 337 * <p> 338 * In some cases, a matching Activity may not exist, so ensure you 339 * safeguard against this. 340 * <p> 341 * Input: Nothing. 342 * <p> 343 * Output: Nothing. 344 */ 345 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 346 public static final String ACTION_SOUND_SETTINGS = 347 "android.settings.SOUND_SETTINGS"; 348 349 /** 350 * Activity Action: Show settings to allow configuration of display. 351 * <p> 352 * In some cases, a matching Activity may not exist, so ensure you 353 * safeguard against this. 354 * <p> 355 * Input: Nothing. 356 * <p> 357 * Output: Nothing. 358 */ 359 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 360 public static final String ACTION_DISPLAY_SETTINGS = 361 "android.settings.DISPLAY_SETTINGS"; 362 363 /** 364 * Activity Action: Show settings to allow configuration of locale. 365 * <p> 366 * In some cases, a matching Activity may not exist, so ensure you 367 * safeguard 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_LOCALE_SETTINGS = 375 "android.settings.LOCALE_SETTINGS"; 376 377 /** 378 * Activity Action: Show settings to configure input methods, in particular 379 * allowing the user to enable input methods. 380 * <p> 381 * In some cases, a matching Activity may not exist, so ensure you 382 * safeguard against this. 383 * <p> 384 * Input: Nothing. 385 * <p> 386 * Output: Nothing. 387 */ 388 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 389 public static final String ACTION_VOICE_INPUT_SETTINGS = 390 "android.settings.VOICE_INPUT_SETTINGS"; 391 392 /** 393 * Activity Action: Show settings to configure input methods, in particular 394 * allowing the user to enable input methods. 395 * <p> 396 * In some cases, a matching Activity may not exist, so ensure you 397 * safeguard against this. 398 * <p> 399 * Input: Nothing. 400 * <p> 401 * Output: Nothing. 402 */ 403 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 404 public static final String ACTION_INPUT_METHOD_SETTINGS = 405 "android.settings.INPUT_METHOD_SETTINGS"; 406 407 /** 408 * Activity Action: Show settings to enable/disable input method subtypes. 409 * <p> 410 * In some cases, a matching Activity may not exist, so ensure you 411 * safeguard against this. 412 * <p> 413 * To tell which input method's subtypes are displayed in the settings, add 414 * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id. 415 * If there is no extra in this Intent, subtypes from all installed input methods 416 * will be displayed in the settings. 417 * 418 * @see android.view.inputmethod.InputMethodInfo#getId 419 * <p> 420 * Input: Nothing. 421 * <p> 422 * Output: Nothing. 423 */ 424 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 425 public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS = 426 "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS"; 427 428 /** 429 * Activity Action: Show a dialog to select input method. 430 * <p> 431 * In some cases, a matching Activity may not exist, so ensure you 432 * safeguard against this. 433 * <p> 434 * Input: Nothing. 435 * <p> 436 * Output: Nothing. 437 * @hide 438 */ 439 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 440 public static final String ACTION_SHOW_INPUT_METHOD_PICKER = 441 "android.settings.SHOW_INPUT_METHOD_PICKER"; 442 443 /** 444 * Activity Action: Show settings to manage the user input dictionary. 445 * <p> 446 * Starting with {@link android.os.Build.VERSION_CODES#KITKAT}, 447 * it is guaranteed there will always be an appropriate implementation for this Intent action. 448 * In prior releases of the platform this was optional, so ensure you safeguard against it. 449 * <p> 450 * Input: Nothing. 451 * <p> 452 * Output: Nothing. 453 */ 454 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 455 public static final String ACTION_USER_DICTIONARY_SETTINGS = 456 "android.settings.USER_DICTIONARY_SETTINGS"; 457 458 /** 459 * Activity Action: Adds a word to the user dictionary. 460 * <p> 461 * In some cases, a matching Activity may not exist, so ensure you 462 * safeguard against this. 463 * <p> 464 * Input: An extra with key <code>word</code> that contains the word 465 * that should be added to the dictionary. 466 * <p> 467 * Output: Nothing. 468 * 469 * @hide 470 */ 471 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 472 public static final String ACTION_USER_DICTIONARY_INSERT = 473 "com.android.settings.USER_DICTIONARY_INSERT"; 474 475 /** 476 * Activity Action: Show settings to allow configuration of application-related settings. 477 * <p> 478 * In some cases, a matching Activity may not exist, so ensure you 479 * safeguard against this. 480 * <p> 481 * Input: Nothing. 482 * <p> 483 * Output: Nothing. 484 */ 485 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 486 public static final String ACTION_APPLICATION_SETTINGS = 487 "android.settings.APPLICATION_SETTINGS"; 488 489 /** 490 * Activity Action: Show settings to allow configuration of application 491 * development-related settings. As of 492 * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is 493 * a required part of the platform. 494 * <p> 495 * Input: Nothing. 496 * <p> 497 * Output: Nothing. 498 */ 499 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 500 public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS = 501 "android.settings.APPLICATION_DEVELOPMENT_SETTINGS"; 502 503 /** 504 * Activity Action: Show settings to allow configuration of quick launch shortcuts. 505 * <p> 506 * In some cases, a matching Activity may not exist, so ensure you 507 * safeguard against this. 508 * <p> 509 * Input: Nothing. 510 * <p> 511 * Output: Nothing. 512 */ 513 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 514 public static final String ACTION_QUICK_LAUNCH_SETTINGS = 515 "android.settings.QUICK_LAUNCH_SETTINGS"; 516 517 /** 518 * Activity Action: Show settings to manage installed applications. 519 * <p> 520 * In some cases, a matching Activity may not exist, so ensure you 521 * safeguard against this. 522 * <p> 523 * Input: Nothing. 524 * <p> 525 * Output: Nothing. 526 */ 527 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 528 public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS = 529 "android.settings.MANAGE_APPLICATIONS_SETTINGS"; 530 531 /** 532 * Activity Action: Show settings to manage all applications. 533 * <p> 534 * In some cases, a matching Activity may not exist, so ensure you 535 * safeguard against this. 536 * <p> 537 * Input: Nothing. 538 * <p> 539 * Output: Nothing. 540 */ 541 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 542 public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS = 543 "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS"; 544 545 /** 546 * Activity Action: Show screen of details about a particular application. 547 * <p> 548 * In some cases, a matching Activity may not exist, so ensure you 549 * safeguard against this. 550 * <p> 551 * Input: The Intent's data URI specifies the application package name 552 * to be shown, with the "package" scheme. That is "package:com.my.app". 553 * <p> 554 * Output: Nothing. 555 */ 556 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 557 public static final String ACTION_APPLICATION_DETAILS_SETTINGS = 558 "android.settings.APPLICATION_DETAILS_SETTINGS"; 559 560 /** 561 * @hide 562 * Activity Action: Show the "app ops" settings screen. 563 * <p> 564 * Input: Nothing. 565 * <p> 566 * Output: Nothing. 567 */ 568 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 569 public static final String ACTION_APP_OPS_SETTINGS = 570 "android.settings.APP_OPS_SETTINGS"; 571 572 /** 573 * Activity Action: Show settings for system update functionality. 574 * <p> 575 * In some cases, a matching Activity may not exist, so ensure you 576 * safeguard against this. 577 * <p> 578 * Input: Nothing. 579 * <p> 580 * Output: Nothing. 581 * 582 * @hide 583 */ 584 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 585 public static final String ACTION_SYSTEM_UPDATE_SETTINGS = 586 "android.settings.SYSTEM_UPDATE_SETTINGS"; 587 588 /** 589 * Activity Action: Show settings to allow configuration of sync settings. 590 * <p> 591 * In some cases, a matching Activity may not exist, so ensure you 592 * safeguard against this. 593 * <p> 594 * The account types available to add via the add account button may be restricted by adding an 595 * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's 596 * authorities. Only account types which can sync with that content provider will be offered to 597 * the user. 598 * <p> 599 * Input: Nothing. 600 * <p> 601 * Output: Nothing. 602 */ 603 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 604 public static final String ACTION_SYNC_SETTINGS = 605 "android.settings.SYNC_SETTINGS"; 606 607 /** 608 * Activity Action: Show add account screen for creating a new account. 609 * <p> 610 * In some cases, a matching Activity may not exist, so ensure you 611 * safeguard against this. 612 * <p> 613 * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES} 614 * extra to the Intent with one or more syncable content provider's authorities. Only account 615 * types which can sync with that content provider will be offered to the user. 616 * <p> 617 * Account types can also be filtered by adding an {@link #EXTRA_ACCOUNT_TYPES} extra to the 618 * Intent with one or more account types. 619 * <p> 620 * Input: Nothing. 621 * <p> 622 * Output: Nothing. 623 */ 624 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 625 public static final String ACTION_ADD_ACCOUNT = 626 "android.settings.ADD_ACCOUNT_SETTINGS"; 627 628 /** 629 * Activity Action: Show settings for selecting the network operator. 630 * <p> 631 * In some cases, a matching Activity may not exist, so ensure you 632 * safeguard against this. 633 * <p> 634 * Input: Nothing. 635 * <p> 636 * Output: Nothing. 637 */ 638 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 639 public static final String ACTION_NETWORK_OPERATOR_SETTINGS = 640 "android.settings.NETWORK_OPERATOR_SETTINGS"; 641 642 /** 643 * Activity Action: Show settings for selection of 2G/3G. 644 * <p> 645 * In some cases, a matching Activity may not exist, so ensure you 646 * safeguard against this. 647 * <p> 648 * Input: Nothing. 649 * <p> 650 * Output: Nothing. 651 */ 652 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 653 public static final String ACTION_DATA_ROAMING_SETTINGS = 654 "android.settings.DATA_ROAMING_SETTINGS"; 655 656 /** 657 * Activity Action: Show settings for internal storage. 658 * <p> 659 * In some cases, a matching Activity may not exist, so ensure you 660 * safeguard against this. 661 * <p> 662 * Input: Nothing. 663 * <p> 664 * Output: Nothing. 665 */ 666 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 667 public static final String ACTION_INTERNAL_STORAGE_SETTINGS = 668 "android.settings.INTERNAL_STORAGE_SETTINGS"; 669 /** 670 * Activity Action: Show settings for memory card storage. 671 * <p> 672 * In some cases, a matching Activity may not exist, so ensure you 673 * safeguard against this. 674 * <p> 675 * Input: Nothing. 676 * <p> 677 * Output: Nothing. 678 */ 679 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 680 public static final String ACTION_MEMORY_CARD_SETTINGS = 681 "android.settings.MEMORY_CARD_SETTINGS"; 682 683 /** 684 * Activity Action: Show settings for global search. 685 * <p> 686 * In some cases, a matching Activity may not exist, so ensure you 687 * safeguard against this. 688 * <p> 689 * Input: Nothing. 690 * <p> 691 * Output: Nothing 692 */ 693 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 694 public static final String ACTION_SEARCH_SETTINGS = 695 "android.search.action.SEARCH_SETTINGS"; 696 697 /** 698 * Activity Action: Show general device information settings (serial 699 * number, software version, phone number, etc.). 700 * <p> 701 * In some cases, a matching Activity may not exist, so ensure you 702 * safeguard against this. 703 * <p> 704 * Input: Nothing. 705 * <p> 706 * Output: Nothing 707 */ 708 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 709 public static final String ACTION_DEVICE_INFO_SETTINGS = 710 "android.settings.DEVICE_INFO_SETTINGS"; 711 712 /** 713 * Activity Action: Show NFC settings. 714 * <p> 715 * This shows UI that allows NFC to be turned on or off. 716 * <p> 717 * In some cases, a matching Activity may not exist, so ensure you 718 * safeguard against this. 719 * <p> 720 * Input: Nothing. 721 * <p> 722 * Output: Nothing 723 * @see android.nfc.NfcAdapter#isEnabled() 724 */ 725 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 726 public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS"; 727 728 /** 729 * Activity Action: Show NFC Sharing settings. 730 * <p> 731 * This shows UI that allows NDEF Push (Android Beam) to be turned on or 732 * off. 733 * <p> 734 * In some cases, a matching Activity may not exist, so ensure you 735 * safeguard against this. 736 * <p> 737 * Input: Nothing. 738 * <p> 739 * Output: Nothing 740 * @see android.nfc.NfcAdapter#isNdefPushEnabled() 741 */ 742 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 743 public static final String ACTION_NFCSHARING_SETTINGS = 744 "android.settings.NFCSHARING_SETTINGS"; 745 746 /** 747 * Activity Action: Show NFC Tap & Pay settings 748 * <p> 749 * This shows UI that allows the user to configure Tap&Pay 750 * settings. 751 * <p> 752 * In some cases, a matching Activity may not exist, so ensure you 753 * safeguard against this. 754 * <p> 755 * Input: Nothing. 756 * <p> 757 * Output: Nothing 758 */ 759 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 760 public static final String ACTION_NFC_PAYMENT_SETTINGS = 761 "android.settings.NFC_PAYMENT_SETTINGS"; 762 763 /** 764 * Activity Action: Show Daydream settings. 765 * <p> 766 * In some cases, a matching Activity may not exist, so ensure you 767 * safeguard against this. 768 * <p> 769 * Input: Nothing. 770 * <p> 771 * Output: Nothing. 772 * @see android.service.dreams.DreamService 773 */ 774 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 775 public static final String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS"; 776 777 /** 778 * Activity Action: Show Notification listener settings. 779 * <p> 780 * In some cases, a matching Activity may not exist, so ensure you 781 * safeguard against this. 782 * <p> 783 * Input: Nothing. 784 * <p> 785 * Output: Nothing. 786 * @see android.service.notification.NotificationListenerService 787 */ 788 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 789 public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS 790 = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"; 791 792 /** 793 * @hide 794 */ 795 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 796 public static final String ACTION_CONDITION_PROVIDER_SETTINGS 797 = "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS"; 798 799 /** 800 * Activity Action: Show settings for video captioning. 801 * <p> 802 * In some cases, a matching Activity may not exist, so ensure you safeguard 803 * against this. 804 * <p> 805 * Input: Nothing. 806 * <p> 807 * Output: Nothing. 808 */ 809 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 810 public static final String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS"; 811 812 /** 813 * Activity Action: Show the top level print settings. 814 * <p> 815 * In some cases, a matching Activity may not exist, so ensure you 816 * safeguard against this. 817 * <p> 818 * Input: Nothing. 819 * <p> 820 * Output: Nothing. 821 */ 822 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 823 public static final String ACTION_PRINT_SETTINGS = 824 "android.settings.ACTION_PRINT_SETTINGS"; 825 826 /** 827 * Activity Action: Show Zen Mode configuration settings. 828 * 829 * @hide 830 */ 831 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 832 public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS"; 833 834 /** 835 * Activity Action: Show the regulatory information screen for the device. 836 * <p> 837 * In some cases, a matching Activity may not exist, so ensure you safeguard 838 * against this. 839 * <p> 840 * Input: Nothing. 841 * <p> 842 * Output: Nothing. 843 */ 844 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 845 public static final String 846 ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO"; 847 848 /** 849 * Activity Action: Show Device Name Settings. 850 * <p> 851 * In some cases, a matching Activity may not exist, so ensure you safeguard 852 * against this. 853 * 854 * @hide 855 */ 856 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 857 public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME"; 858 859 /** 860 * Activity Action: Show pairing settings. 861 * <p> 862 * In some cases, a matching Activity may not exist, so ensure you safeguard 863 * against this. 864 * 865 * @hide 866 */ 867 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 868 public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS"; 869 870 /** 871 * Activity Action: Show battery saver settings. 872 * <p> 873 * In some cases, a matching Activity may not exist, so ensure you safeguard 874 * against this. 875 */ 876 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 877 public static final String ACTION_BATTERY_SAVER_SETTINGS 878 = "android.settings.BATTERY_SAVER_SETTINGS"; 879 880 /** 881 * Activity Action: Show Home selection settings. If there are multiple activities 882 * that can satisfy the {@link Intent#CATEGORY_HOME} intent, this screen allows you 883 * to pick your preferred activity. 884 */ 885 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 886 public static final String ACTION_HOME_SETTINGS 887 = "android.settings.HOME_SETTINGS"; 888 889 /** 890 * Activity Action: Show notification settings. 891 * 892 * @hide 893 */ 894 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 895 public static final String ACTION_NOTIFICATION_SETTINGS 896 = "android.settings.NOTIFICATION_SETTINGS"; 897 898 /** 899 * Activity Action: Show notification settings for a single app. 900 * 901 * @hide 902 */ 903 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 904 public static final String ACTION_APP_NOTIFICATION_SETTINGS 905 = "android.settings.APP_NOTIFICATION_SETTINGS"; 906 907 /** 908 * Activity Action: Show notification redaction settings. 909 * 910 * @hide 911 */ 912 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 913 public static final String ACTION_APP_NOTIFICATION_REDACTION 914 = "android.settings.ACTION_APP_NOTIFICATION_REDACTION"; 915 916 /** @hide */ public static final String EXTRA_APP_UID = "app_uid"; 917 /** @hide */ public static final String EXTRA_APP_PACKAGE = "app_package"; 918 919 // End of Intent actions for Settings 920 921 /** 922 * @hide - Private call() method on SettingsProvider to read from 'system' table. 923 */ 924 public static final String CALL_METHOD_GET_SYSTEM = "GET_system"; 925 926 /** 927 * @hide - Private call() method on SettingsProvider to read from 'secure' table. 928 */ 929 public static final String CALL_METHOD_GET_SECURE = "GET_secure"; 930 931 /** 932 * @hide - Private call() method on SettingsProvider to read from 'global' table. 933 */ 934 public static final String CALL_METHOD_GET_GLOBAL = "GET_global"; 935 936 /** 937 * @hide - User handle argument extra to the fast-path call()-based requests 938 */ 939 public static final String CALL_METHOD_USER_KEY = "_user"; 940 941 /** @hide - Private call() method to write to 'system' table */ 942 public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system"; 943 944 /** @hide - Private call() method to write to 'secure' table */ 945 public static final String CALL_METHOD_PUT_SECURE = "PUT_secure"; 946 947 /** @hide - Private call() method to write to 'global' table */ 948 public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global"; 949 950 /** 951 * Activity Extra: Limit available options in launched activity based on the given authority. 952 * <p> 953 * This can be passed as an extra field in an Activity Intent with one or more syncable content 954 * provider's authorities as a String[]. This field is used by some intents to alter the 955 * behavior of the called activity. 956 * <p> 957 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based 958 * on the authority given. 959 */ 960 public static final String EXTRA_AUTHORITIES = "authorities"; 961 962 /** 963 * Activity Extra: Limit available options in launched activity based on the given account 964 * types. 965 * <p> 966 * This can be passed as an extra field in an Activity Intent with one or more account types 967 * as a String[]. This field is used by some intents to alter the behavior of the called 968 * activity. 969 * <p> 970 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types to the specified 971 * list. 972 */ 973 public static final String EXTRA_ACCOUNT_TYPES = "account_types"; 974 975 public static final String EXTRA_INPUT_METHOD_ID = "input_method_id"; 976 977 /** 978 * Activity Extra: The device identifier to act upon. 979 * <p> 980 * This can be passed as an extra field in an Activity Intent with a single 981 * InputDeviceIdentifier. This field is used by some activities to jump straight into the 982 * settings for the given device. 983 * <p> 984 * Example: The {@link #ACTION_INPUT_METHOD_SETTINGS} intent opens the keyboard layout 985 * dialog for the given device. 986 * @hide 987 */ 988 public static final String EXTRA_INPUT_DEVICE_IDENTIFIER = "input_device_identifier"; 989 990 /** 991 * Activity Extra: Enable or disable Airplane Mode. 992 * <p> 993 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE} 994 * intent as a boolean. 995 */ 996 public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled"; 997 998 private static final String JID_RESOURCE_PREFIX = "android"; 999 1000 public static final String AUTHORITY = "settings"; 1001 1002 private static final String TAG = "Settings"; 1003 private static final boolean LOCAL_LOGV = false; 1004 1005 // Lock ensures that when enabling/disabling the master location switch, we don't end up 1006 // with a partial enable/disable state in multi-threaded situations. 1007 private static final Object mLocationSettingsLock = new Object(); 1008 1009 public static class SettingNotFoundException extends AndroidException { 1010 public SettingNotFoundException(String msg) { 1011 super(msg); 1012 } 1013 } 1014 1015 /** 1016 * Common base for tables of name/value settings. 1017 */ 1018 public static class NameValueTable implements BaseColumns { 1019 public static final String NAME = "name"; 1020 public static final String VALUE = "value"; 1021 1022 protected static boolean putString(ContentResolver resolver, Uri uri, 1023 String name, String value) { 1024 // The database will take care of replacing duplicates. 1025 try { 1026 ContentValues values = new ContentValues(); 1027 values.put(NAME, name); 1028 values.put(VALUE, value); 1029 resolver.insert(uri, values); 1030 return true; 1031 } catch (SQLException e) { 1032 Log.w(TAG, "Can't set key " + name + " in " + uri, e); 1033 return false; 1034 } 1035 } 1036 1037 public static Uri getUriFor(Uri uri, String name) { 1038 return Uri.withAppendedPath(uri, name); 1039 } 1040 } 1041 1042 // Thread-safe. 1043 private static class NameValueCache { 1044 private final String mVersionSystemProperty; 1045 private final Uri mUri; 1046 1047 private static final String[] SELECT_VALUE = 1048 new String[] { Settings.NameValueTable.VALUE }; 1049 private static final String NAME_EQ_PLACEHOLDER = "name=?"; 1050 1051 // Must synchronize on 'this' to access mValues and mValuesVersion. 1052 private final HashMap<String, String> mValues = new HashMap<String, String>(); 1053 private long mValuesVersion = 0; 1054 1055 // Initially null; set lazily and held forever. Synchronized on 'this'. 1056 private IContentProvider mContentProvider = null; 1057 1058 // The method we'll call (or null, to not use) on the provider 1059 // for the fast path of retrieving settings. 1060 private final String mCallGetCommand; 1061 private final String mCallSetCommand; 1062 1063 public NameValueCache(String versionSystemProperty, Uri uri, 1064 String getCommand, String setCommand) { 1065 mVersionSystemProperty = versionSystemProperty; 1066 mUri = uri; 1067 mCallGetCommand = getCommand; 1068 mCallSetCommand = setCommand; 1069 } 1070 1071 private IContentProvider lazyGetProvider(ContentResolver cr) { 1072 IContentProvider cp = null; 1073 synchronized (this) { 1074 cp = mContentProvider; 1075 if (cp == null) { 1076 cp = mContentProvider = cr.acquireProvider(mUri.getAuthority()); 1077 } 1078 } 1079 return cp; 1080 } 1081 1082 public boolean putStringForUser(ContentResolver cr, String name, String value, 1083 final int userHandle) { 1084 try { 1085 Bundle arg = new Bundle(); 1086 arg.putString(Settings.NameValueTable.VALUE, value); 1087 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 1088 IContentProvider cp = lazyGetProvider(cr); 1089 cp.call(cr.getPackageName(), mCallSetCommand, name, arg); 1090 } catch (RemoteException e) { 1091 Log.w(TAG, "Can't set key " + name + " in " + mUri, e); 1092 return false; 1093 } 1094 return true; 1095 } 1096 1097 public String getStringForUser(ContentResolver cr, String name, final int userHandle) { 1098 final boolean isSelf = (userHandle == UserHandle.myUserId()); 1099 if (isSelf) { 1100 long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0); 1101 1102 // Our own user's settings data uses a client-side cache 1103 synchronized (this) { 1104 if (mValuesVersion != newValuesVersion) { 1105 if (LOCAL_LOGV || false) { 1106 Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current " 1107 + newValuesVersion + " != cached " + mValuesVersion); 1108 } 1109 1110 mValues.clear(); 1111 mValuesVersion = newValuesVersion; 1112 } 1113 1114 if (mValues.containsKey(name)) { 1115 return mValues.get(name); // Could be null, that's OK -- negative caching 1116 } 1117 } 1118 } else { 1119 if (LOCAL_LOGV) Log.v(TAG, "get setting for user " + userHandle 1120 + " by user " + UserHandle.myUserId() + " so skipping cache"); 1121 } 1122 1123 IContentProvider cp = lazyGetProvider(cr); 1124 1125 // Try the fast path first, not using query(). If this 1126 // fails (alternate Settings provider that doesn't support 1127 // this interface?) then we fall back to the query/table 1128 // interface. 1129 if (mCallGetCommand != null) { 1130 try { 1131 Bundle args = null; 1132 if (!isSelf) { 1133 args = new Bundle(); 1134 args.putInt(CALL_METHOD_USER_KEY, userHandle); 1135 } 1136 Bundle b = cp.call(cr.getPackageName(), mCallGetCommand, name, args); 1137 if (b != null) { 1138 String value = b.getPairValue(); 1139 // Don't update our cache for reads of other users' data 1140 if (isSelf) { 1141 synchronized (this) { 1142 mValues.put(name, value); 1143 } 1144 } else { 1145 if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle 1146 + " by " + UserHandle.myUserId() 1147 + " so not updating cache"); 1148 } 1149 return value; 1150 } 1151 // If the response Bundle is null, we fall through 1152 // to the query interface below. 1153 } catch (RemoteException e) { 1154 // Not supported by the remote side? Fall through 1155 // to query(). 1156 } 1157 } 1158 1159 Cursor c = null; 1160 try { 1161 c = cp.query(cr.getPackageName(), mUri, SELECT_VALUE, NAME_EQ_PLACEHOLDER, 1162 new String[]{name}, null, null); 1163 if (c == null) { 1164 Log.w(TAG, "Can't get key " + name + " from " + mUri); 1165 return null; 1166 } 1167 1168 String value = c.moveToNext() ? c.getString(0) : null; 1169 synchronized (this) { 1170 mValues.put(name, value); 1171 } 1172 if (LOCAL_LOGV) { 1173 Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " + 1174 name + " = " + (value == null ? "(null)" : value)); 1175 } 1176 return value; 1177 } catch (RemoteException e) { 1178 Log.w(TAG, "Can't get key " + name + " from " + mUri, e); 1179 return null; // Return null, but don't cache it. 1180 } finally { 1181 if (c != null) c.close(); 1182 } 1183 } 1184 } 1185 1186 /** 1187 * System settings, containing miscellaneous system preferences. This 1188 * table holds simple name/value pairs. There are convenience 1189 * functions for accessing individual settings entries. 1190 */ 1191 public static final class System extends NameValueTable { 1192 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version"; 1193 1194 /** 1195 * The content:// style URL for this table 1196 */ 1197 public static final Uri CONTENT_URI = 1198 Uri.parse("content://" + AUTHORITY + "/system"); 1199 1200 private static final NameValueCache sNameValueCache = new NameValueCache( 1201 SYS_PROP_SETTING_VERSION, 1202 CONTENT_URI, 1203 CALL_METHOD_GET_SYSTEM, 1204 CALL_METHOD_PUT_SYSTEM); 1205 1206 private static final HashSet<String> MOVED_TO_SECURE; 1207 static { 1208 MOVED_TO_SECURE = new HashSet<String>(30); 1209 MOVED_TO_SECURE.add(Secure.ANDROID_ID); 1210 MOVED_TO_SECURE.add(Secure.HTTP_PROXY); 1211 MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED); 1212 MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS); 1213 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED); 1214 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE); 1215 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); 1216 MOVED_TO_SECURE.add(Secure.LOGGING_ID); 1217 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED); 1218 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE); 1219 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL); 1220 MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME); 1221 MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL); 1222 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); 1223 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); 1224 MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT); 1225 MOVED_TO_SECURE.add(Secure.WIFI_ON); 1226 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE); 1227 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT); 1228 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS); 1229 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED); 1230 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS); 1231 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT); 1232 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS); 1233 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON); 1234 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT); 1235 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS); 1236 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS); 1237 1238 // At one time in System, then Global, but now back in Secure 1239 MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS); 1240 } 1241 1242 private static final HashSet<String> MOVED_TO_GLOBAL; 1243 private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL; 1244 static { 1245 MOVED_TO_GLOBAL = new HashSet<String>(); 1246 MOVED_TO_SECURE_THEN_GLOBAL = new HashSet<String>(); 1247 1248 // these were originally in system but migrated to secure in the past, 1249 // so are duplicated in the Secure.* namespace 1250 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.ADB_ENABLED); 1251 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.BLUETOOTH_ON); 1252 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DATA_ROAMING); 1253 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DEVICE_PROVISIONED); 1254 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED); 1255 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.HTTP_PROXY); 1256 1257 // these are moving directly from system to global 1258 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON); 1259 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS); 1260 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS); 1261 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME); 1262 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE); 1263 MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND); 1264 MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND); 1265 MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND); 1266 MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND); 1267 MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED); 1268 MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND); 1269 MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND); 1270 MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND); 1271 MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED); 1272 MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN); 1273 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY); 1274 MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER); 1275 MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE); 1276 MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE); 1277 MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE); 1278 MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS); 1279 MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE); 1280 MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE); 1281 MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY); 1282 MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP); 1283 MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER); 1284 MOVED_TO_GLOBAL.add(Settings.Global.SHOW_PROCESSES); 1285 MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES); 1286 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_CONTENT_URL); 1287 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_METADATA_URL); 1288 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_CONTENT_URL); 1289 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_METADATA_URL); 1290 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL); 1291 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL); 1292 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_CONTENT_URL); 1293 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL); 1294 } 1295 1296 /** @hide */ 1297 public static void getMovedKeys(HashSet<String> outKeySet) { 1298 outKeySet.addAll(MOVED_TO_GLOBAL); 1299 outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL); 1300 } 1301 1302 /** @hide */ 1303 public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) { 1304 outKeySet.addAll(MOVED_TO_GLOBAL); 1305 } 1306 1307 /** 1308 * Look up a name in the database. 1309 * @param resolver to access the database with 1310 * @param name to look up in the table 1311 * @return the corresponding value, or null if not present 1312 */ 1313 public static String getString(ContentResolver resolver, String name) { 1314 return getStringForUser(resolver, name, UserHandle.myUserId()); 1315 } 1316 1317 /** @hide */ 1318 public static String getStringForUser(ContentResolver resolver, String name, 1319 int userHandle) { 1320 if (MOVED_TO_SECURE.contains(name)) { 1321 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 1322 + " to android.provider.Settings.Secure, returning read-only value."); 1323 return Secure.getStringForUser(resolver, name, userHandle); 1324 } 1325 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { 1326 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 1327 + " to android.provider.Settings.Global, returning read-only value."); 1328 return Global.getStringForUser(resolver, name, userHandle); 1329 } 1330 return sNameValueCache.getStringForUser(resolver, name, userHandle); 1331 } 1332 1333 /** 1334 * Store a name/value pair into the database. 1335 * @param resolver to access the database with 1336 * @param name to store 1337 * @param value to associate with the name 1338 * @return true if the value was set, false on database errors 1339 */ 1340 public static boolean putString(ContentResolver resolver, String name, String value) { 1341 return putStringForUser(resolver, name, value, UserHandle.myUserId()); 1342 } 1343 1344 /** @hide */ 1345 public static boolean putStringForUser(ContentResolver resolver, String name, String value, 1346 int userHandle) { 1347 if (MOVED_TO_SECURE.contains(name)) { 1348 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 1349 + " to android.provider.Settings.Secure, value is unchanged."); 1350 return false; 1351 } 1352 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { 1353 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 1354 + " to android.provider.Settings.Global, value is unchanged."); 1355 return false; 1356 } 1357 return sNameValueCache.putStringForUser(resolver, name, value, userHandle); 1358 } 1359 1360 /** 1361 * Construct the content URI for a particular name/value pair, 1362 * useful for monitoring changes with a ContentObserver. 1363 * @param name to look up in the table 1364 * @return the corresponding content URI, or null if not present 1365 */ 1366 public static Uri getUriFor(String name) { 1367 if (MOVED_TO_SECURE.contains(name)) { 1368 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 1369 + " to android.provider.Settings.Secure, returning Secure URI."); 1370 return Secure.getUriFor(Secure.CONTENT_URI, name); 1371 } 1372 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { 1373 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 1374 + " to android.provider.Settings.Global, returning read-only global URI."); 1375 return Global.getUriFor(Global.CONTENT_URI, name); 1376 } 1377 return getUriFor(CONTENT_URI, name); 1378 } 1379 1380 /** 1381 * Convenience function for retrieving a single system settings value 1382 * as an integer. Note that internally setting values are always 1383 * stored as strings; this function converts the string to an integer 1384 * for you. The default value will be returned if the setting is 1385 * not defined or not an integer. 1386 * 1387 * @param cr The ContentResolver to access. 1388 * @param name The name of the setting to retrieve. 1389 * @param def Value to return if the setting is not defined. 1390 * 1391 * @return The setting's current value, or 'def' if it is not defined 1392 * or not a valid integer. 1393 */ 1394 public static int getInt(ContentResolver cr, String name, int def) { 1395 return getIntForUser(cr, name, def, UserHandle.myUserId()); 1396 } 1397 1398 /** @hide */ 1399 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { 1400 String v = getStringForUser(cr, name, userHandle); 1401 try { 1402 return v != null ? Integer.parseInt(v) : def; 1403 } catch (NumberFormatException e) { 1404 return def; 1405 } 1406 } 1407 1408 /** 1409 * Convenience function for retrieving a single system settings value 1410 * as an integer. Note that internally setting values are always 1411 * stored as strings; this function converts the string to an integer 1412 * for you. 1413 * <p> 1414 * This version does not take a default value. If the setting has not 1415 * been set, or the string value is not a number, 1416 * it throws {@link SettingNotFoundException}. 1417 * 1418 * @param cr The ContentResolver to access. 1419 * @param name The name of the setting to retrieve. 1420 * 1421 * @throws SettingNotFoundException Thrown if a setting by the given 1422 * name can't be found or the setting value is not an integer. 1423 * 1424 * @return The setting's current value. 1425 */ 1426 public static int getInt(ContentResolver cr, String name) 1427 throws SettingNotFoundException { 1428 return getIntForUser(cr, name, UserHandle.myUserId()); 1429 } 1430 1431 /** @hide */ 1432 public static int getIntForUser(ContentResolver cr, String name, int userHandle) 1433 throws SettingNotFoundException { 1434 String v = getStringForUser(cr, name, userHandle); 1435 try { 1436 return Integer.parseInt(v); 1437 } catch (NumberFormatException e) { 1438 throw new SettingNotFoundException(name); 1439 } 1440 } 1441 1442 /** 1443 * Convenience function for updating a single settings value as an 1444 * integer. This will either create a new entry in the table if the 1445 * given name does not exist, or modify the value of the existing row 1446 * with that name. Note that internally setting values are always 1447 * stored as strings, so this function converts the given value to a 1448 * string before storing it. 1449 * 1450 * @param cr The ContentResolver to access. 1451 * @param name The name of the setting to modify. 1452 * @param value The new value for the setting. 1453 * @return true if the value was set, false on database errors 1454 */ 1455 public static boolean putInt(ContentResolver cr, String name, int value) { 1456 return putIntForUser(cr, name, value, UserHandle.myUserId()); 1457 } 1458 1459 /** @hide */ 1460 public static boolean putIntForUser(ContentResolver cr, String name, int value, 1461 int userHandle) { 1462 return putStringForUser(cr, name, Integer.toString(value), userHandle); 1463 } 1464 1465 /** 1466 * Convenience function for retrieving a single system settings value 1467 * as a {@code long}. Note that internally setting values are always 1468 * stored as strings; this function converts the string to a {@code long} 1469 * for you. The default value will be returned if the setting is 1470 * not defined or not a {@code long}. 1471 * 1472 * @param cr The ContentResolver to access. 1473 * @param name The name of the setting to retrieve. 1474 * @param def Value to return if the setting is not defined. 1475 * 1476 * @return The setting's current value, or 'def' if it is not defined 1477 * or not a valid {@code long}. 1478 */ 1479 public static long getLong(ContentResolver cr, String name, long def) { 1480 return getLongForUser(cr, name, def, UserHandle.myUserId()); 1481 } 1482 1483 /** @hide */ 1484 public static long getLongForUser(ContentResolver cr, String name, long def, 1485 int userHandle) { 1486 String valString = getStringForUser(cr, name, userHandle); 1487 long value; 1488 try { 1489 value = valString != null ? Long.parseLong(valString) : def; 1490 } catch (NumberFormatException e) { 1491 value = def; 1492 } 1493 return value; 1494 } 1495 1496 /** 1497 * Convenience function for retrieving a single system settings value 1498 * as a {@code long}. Note that internally setting values are always 1499 * stored as strings; this function converts the string to a {@code long} 1500 * for you. 1501 * <p> 1502 * This version does not take a default value. If the setting has not 1503 * been set, or the string value is not a number, 1504 * it throws {@link SettingNotFoundException}. 1505 * 1506 * @param cr The ContentResolver to access. 1507 * @param name The name of the setting to retrieve. 1508 * 1509 * @return The setting's current value. 1510 * @throws SettingNotFoundException Thrown if a setting by the given 1511 * name can't be found or the setting value is not an integer. 1512 */ 1513 public static long getLong(ContentResolver cr, String name) 1514 throws SettingNotFoundException { 1515 return getLongForUser(cr, name, UserHandle.myUserId()); 1516 } 1517 1518 /** @hide */ 1519 public static long getLongForUser(ContentResolver cr, String name, int userHandle) 1520 throws SettingNotFoundException { 1521 String valString = getStringForUser(cr, name, userHandle); 1522 try { 1523 return Long.parseLong(valString); 1524 } catch (NumberFormatException e) { 1525 throw new SettingNotFoundException(name); 1526 } 1527 } 1528 1529 /** 1530 * Convenience function for updating a single settings value as a long 1531 * integer. This will either create a new entry in the table if the 1532 * given name does not exist, or modify the value of the existing row 1533 * with that name. Note that internally setting values are always 1534 * stored as strings, so this function converts the given value to a 1535 * string before storing it. 1536 * 1537 * @param cr The ContentResolver to access. 1538 * @param name The name of the setting to modify. 1539 * @param value The new value for the setting. 1540 * @return true if the value was set, false on database errors 1541 */ 1542 public static boolean putLong(ContentResolver cr, String name, long value) { 1543 return putLongForUser(cr, name, value, UserHandle.myUserId()); 1544 } 1545 1546 /** @hide */ 1547 public static boolean putLongForUser(ContentResolver cr, String name, long value, 1548 int userHandle) { 1549 return putStringForUser(cr, name, Long.toString(value), userHandle); 1550 } 1551 1552 /** 1553 * Convenience function for retrieving a single system settings value 1554 * as a floating point number. Note that internally setting values are 1555 * always stored as strings; this function converts the string to an 1556 * float for you. The default value will be returned if the setting 1557 * is not defined or not a valid float. 1558 * 1559 * @param cr The ContentResolver to access. 1560 * @param name The name of the setting to retrieve. 1561 * @param def Value to return if the setting is not defined. 1562 * 1563 * @return The setting's current value, or 'def' if it is not defined 1564 * or not a valid float. 1565 */ 1566 public static float getFloat(ContentResolver cr, String name, float def) { 1567 return getFloatForUser(cr, name, def, UserHandle.myUserId()); 1568 } 1569 1570 /** @hide */ 1571 public static float getFloatForUser(ContentResolver cr, String name, float def, 1572 int userHandle) { 1573 String v = getStringForUser(cr, name, userHandle); 1574 try { 1575 return v != null ? Float.parseFloat(v) : def; 1576 } catch (NumberFormatException e) { 1577 return def; 1578 } 1579 } 1580 1581 /** 1582 * Convenience function for retrieving a single system settings value 1583 * as a float. Note that internally setting values are always 1584 * stored as strings; this function converts the string to a float 1585 * for you. 1586 * <p> 1587 * This version does not take a default value. If the setting has not 1588 * been set, or the string value is not a number, 1589 * it throws {@link SettingNotFoundException}. 1590 * 1591 * @param cr The ContentResolver to access. 1592 * @param name The name of the setting to retrieve. 1593 * 1594 * @throws SettingNotFoundException Thrown if a setting by the given 1595 * name can't be found or the setting value is not a float. 1596 * 1597 * @return The setting's current value. 1598 */ 1599 public static float getFloat(ContentResolver cr, String name) 1600 throws SettingNotFoundException { 1601 return getFloatForUser(cr, name, UserHandle.myUserId()); 1602 } 1603 1604 /** @hide */ 1605 public static float getFloatForUser(ContentResolver cr, String name, int userHandle) 1606 throws SettingNotFoundException { 1607 String v = getStringForUser(cr, name, userHandle); 1608 if (v == null) { 1609 throw new SettingNotFoundException(name); 1610 } 1611 try { 1612 return Float.parseFloat(v); 1613 } catch (NumberFormatException e) { 1614 throw new SettingNotFoundException(name); 1615 } 1616 } 1617 1618 /** 1619 * Convenience function for updating a single settings value as a 1620 * floating point number. This will either create a new entry in the 1621 * table if the given name does not exist, or modify the value of the 1622 * existing row with that name. Note that internally setting values 1623 * are always stored as strings, so this function converts the given 1624 * value to a string before storing it. 1625 * 1626 * @param cr The ContentResolver to access. 1627 * @param name The name of the setting to modify. 1628 * @param value The new value for the setting. 1629 * @return true if the value was set, false on database errors 1630 */ 1631 public static boolean putFloat(ContentResolver cr, String name, float value) { 1632 return putFloatForUser(cr, name, value, UserHandle.myUserId()); 1633 } 1634 1635 /** @hide */ 1636 public static boolean putFloatForUser(ContentResolver cr, String name, float value, 1637 int userHandle) { 1638 return putStringForUser(cr, name, Float.toString(value), userHandle); 1639 } 1640 1641 /** 1642 * Convenience function to read all of the current 1643 * configuration-related settings into a 1644 * {@link Configuration} object. 1645 * 1646 * @param cr The ContentResolver to access. 1647 * @param outConfig Where to place the configuration settings. 1648 */ 1649 public static void getConfiguration(ContentResolver cr, Configuration outConfig) { 1650 getConfigurationForUser(cr, outConfig, UserHandle.myUserId()); 1651 } 1652 1653 /** @hide */ 1654 public static void getConfigurationForUser(ContentResolver cr, Configuration outConfig, 1655 int userHandle) { 1656 outConfig.fontScale = Settings.System.getFloatForUser( 1657 cr, FONT_SCALE, outConfig.fontScale, userHandle); 1658 if (outConfig.fontScale < 0) { 1659 outConfig.fontScale = 1; 1660 } 1661 } 1662 1663 /** 1664 * @hide Erase the fields in the Configuration that should be applied 1665 * by the settings. 1666 */ 1667 public static void clearConfiguration(Configuration inoutConfig) { 1668 inoutConfig.fontScale = 0; 1669 } 1670 1671 /** 1672 * Convenience function to write a batch of configuration-related 1673 * settings from a {@link Configuration} object. 1674 * 1675 * @param cr The ContentResolver to access. 1676 * @param config The settings to write. 1677 * @return true if the values were set, false on database errors 1678 */ 1679 public static boolean putConfiguration(ContentResolver cr, Configuration config) { 1680 return putConfigurationForUser(cr, config, UserHandle.myUserId()); 1681 } 1682 1683 /** @hide */ 1684 public static boolean putConfigurationForUser(ContentResolver cr, Configuration config, 1685 int userHandle) { 1686 return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle); 1687 } 1688 1689 /** @hide */ 1690 public static boolean hasInterestingConfigurationChanges(int changes) { 1691 return (changes&ActivityInfo.CONFIG_FONT_SCALE) != 0; 1692 } 1693 1694 /** @deprecated - Do not use */ 1695 @Deprecated 1696 public static boolean getShowGTalkServiceStatus(ContentResolver cr) { 1697 return getShowGTalkServiceStatusForUser(cr, UserHandle.myUserId()); 1698 } 1699 1700 /** 1701 * @hide 1702 * @deprecated - Do not use 1703 */ 1704 public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr, 1705 int userHandle) { 1706 return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0; 1707 } 1708 1709 /** @deprecated - Do not use */ 1710 @Deprecated 1711 public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) { 1712 setShowGTalkServiceStatusForUser(cr, flag, UserHandle.myUserId()); 1713 } 1714 1715 /** 1716 * @hide 1717 * @deprecated - Do not use 1718 */ 1719 @Deprecated 1720 public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag, 1721 int userHandle) { 1722 putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle); 1723 } 1724 1725 /** 1726 * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead 1727 */ 1728 @Deprecated 1729 public static final String STAY_ON_WHILE_PLUGGED_IN = Global.STAY_ON_WHILE_PLUGGED_IN; 1730 1731 /** 1732 * What happens when the user presses the end call button if they're not 1733 * on a call.<br/> 1734 * <b>Values:</b><br/> 1735 * 0 - The end button does nothing.<br/> 1736 * 1 - The end button goes to the home screen.<br/> 1737 * 2 - The end button puts the device to sleep and locks the keyguard.<br/> 1738 * 3 - The end button goes to the home screen. If the user is already on the 1739 * home screen, it puts the device to sleep. 1740 */ 1741 public static final String END_BUTTON_BEHAVIOR = "end_button_behavior"; 1742 1743 /** 1744 * END_BUTTON_BEHAVIOR value for "go home". 1745 * @hide 1746 */ 1747 public static final int END_BUTTON_BEHAVIOR_HOME = 0x1; 1748 1749 /** 1750 * END_BUTTON_BEHAVIOR value for "go to sleep". 1751 * @hide 1752 */ 1753 public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2; 1754 1755 /** 1756 * END_BUTTON_BEHAVIOR default value. 1757 * @hide 1758 */ 1759 public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP; 1760 1761 /** 1762 * Is advanced settings mode turned on. 0 == no, 1 == yes 1763 * @hide 1764 */ 1765 public static final String ADVANCED_SETTINGS = "advanced_settings"; 1766 1767 /** 1768 * ADVANCED_SETTINGS default value. 1769 * @hide 1770 */ 1771 public static final int ADVANCED_SETTINGS_DEFAULT = 0; 1772 1773 /** 1774 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead 1775 */ 1776 @Deprecated 1777 public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON; 1778 1779 /** 1780 * @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead 1781 */ 1782 @Deprecated 1783 public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH; 1784 1785 /** 1786 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead 1787 */ 1788 @Deprecated 1789 public static final String RADIO_WIFI = Global.RADIO_WIFI; 1790 1791 /** 1792 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead 1793 * {@hide} 1794 */ 1795 @Deprecated 1796 public static final String RADIO_WIMAX = Global.RADIO_WIMAX; 1797 1798 /** 1799 * @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead 1800 */ 1801 @Deprecated 1802 public static final String RADIO_CELL = Global.RADIO_CELL; 1803 1804 /** 1805 * @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead 1806 */ 1807 @Deprecated 1808 public static final String RADIO_NFC = Global.RADIO_NFC; 1809 1810 /** 1811 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead 1812 */ 1813 @Deprecated 1814 public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS; 1815 1816 /** 1817 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead 1818 * 1819 * {@hide} 1820 */ 1821 @Deprecated 1822 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = 1823 Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS; 1824 1825 /** 1826 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead 1827 */ 1828 @Deprecated 1829 public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY; 1830 1831 /** 1832 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead 1833 */ 1834 @Deprecated 1835 public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT; 1836 1837 /** 1838 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead 1839 */ 1840 @Deprecated 1841 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1842 Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED; 1843 1844 /** 1845 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead 1846 */ 1847 @Deprecated 1848 public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER; 1849 1850 /** 1851 * @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead 1852 */ 1853 @Deprecated 1854 public static final String MODE_RINGER = Global.MODE_RINGER; 1855 1856 /** 1857 * Whether to use static IP and other static network attributes. 1858 * <p> 1859 * Set to 1 for true and 0 for false. 1860 * 1861 * @deprecated Use {@link WifiManager} instead 1862 */ 1863 @Deprecated 1864 public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip"; 1865 1866 /** 1867 * The static IP address. 1868 * <p> 1869 * Example: "192.168.1.51" 1870 * 1871 * @deprecated Use {@link WifiManager} instead 1872 */ 1873 @Deprecated 1874 public static final String WIFI_STATIC_IP = "wifi_static_ip"; 1875 1876 /** 1877 * If using static IP, the gateway's IP address. 1878 * <p> 1879 * Example: "192.168.1.1" 1880 * 1881 * @deprecated Use {@link WifiManager} instead 1882 */ 1883 @Deprecated 1884 public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway"; 1885 1886 /** 1887 * If using static IP, the net mask. 1888 * <p> 1889 * Example: "255.255.255.0" 1890 * 1891 * @deprecated Use {@link WifiManager} instead 1892 */ 1893 @Deprecated 1894 public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask"; 1895 1896 /** 1897 * If using static IP, the primary DNS's IP address. 1898 * <p> 1899 * Example: "192.168.1.1" 1900 * 1901 * @deprecated Use {@link WifiManager} instead 1902 */ 1903 @Deprecated 1904 public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1"; 1905 1906 /** 1907 * If using static IP, the secondary DNS's IP address. 1908 * <p> 1909 * Example: "192.168.1.2" 1910 * 1911 * @deprecated Use {@link WifiManager} instead 1912 */ 1913 @Deprecated 1914 public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2"; 1915 1916 1917 /** 1918 * Determines whether remote devices may discover and/or connect to 1919 * this device. 1920 * <P>Type: INT</P> 1921 * 2 -- discoverable and connectable 1922 * 1 -- connectable but not discoverable 1923 * 0 -- neither connectable nor discoverable 1924 */ 1925 public static final String BLUETOOTH_DISCOVERABILITY = 1926 "bluetooth_discoverability"; 1927 1928 /** 1929 * Bluetooth discoverability timeout. If this value is nonzero, then 1930 * Bluetooth becomes discoverable for a certain number of seconds, 1931 * after which is becomes simply connectable. The value is in seconds. 1932 */ 1933 public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT = 1934 "bluetooth_discoverability_timeout"; 1935 1936 /** 1937 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED} 1938 * instead 1939 */ 1940 @Deprecated 1941 public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED; 1942 1943 /** 1944 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE} 1945 * instead 1946 */ 1947 @Deprecated 1948 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; 1949 1950 /** 1951 * @deprecated Use 1952 * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED} 1953 * instead 1954 */ 1955 @Deprecated 1956 public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = 1957 "lock_pattern_tactile_feedback_enabled"; 1958 1959 1960 /** 1961 * A formatted string of the next alarm that is set, or the empty string 1962 * if there is no alarm set. 1963 * 1964 * @deprecated Use {@link android.app.AlarmManager#getNextAlarmClock()}. 1965 */ 1966 @Deprecated 1967 public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted"; 1968 1969 /** 1970 * Scaling factor for fonts, float. 1971 */ 1972 public static final String FONT_SCALE = "font_scale"; 1973 1974 /** 1975 * Name of an application package to be debugged. 1976 * 1977 * @deprecated Use {@link Global#DEBUG_APP} instead 1978 */ 1979 @Deprecated 1980 public static final String DEBUG_APP = Global.DEBUG_APP; 1981 1982 /** 1983 * If 1, when launching DEBUG_APP it will wait for the debugger before 1984 * starting user code. If 0, it will run normally. 1985 * 1986 * @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead 1987 */ 1988 @Deprecated 1989 public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER; 1990 1991 /** 1992 * Whether or not to dim the screen. 0=no 1=yes 1993 * @deprecated This setting is no longer used. 1994 */ 1995 @Deprecated 1996 public static final String DIM_SCREEN = "dim_screen"; 1997 1998 /** 1999 * The amount of time in milliseconds before the device goes to sleep or begins 2000 * to dream after a period of inactivity. This value is also known as the 2001 * user activity timeout period since the screen isn't necessarily turned off 2002 * when it expires. 2003 */ 2004 public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout"; 2005 2006 /** 2007 * The screen backlight brightness between 0 and 255. 2008 */ 2009 public static final String SCREEN_BRIGHTNESS = "screen_brightness"; 2010 2011 /** 2012 * Control whether to enable automatic brightness mode. 2013 */ 2014 public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode"; 2015 2016 /** 2017 * Adjustment to auto-brightness to make it generally more (>0.0 <1.0) 2018 * or less (<0.0 >-1.0) bright. 2019 * @hide 2020 */ 2021 public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj"; 2022 2023 /** 2024 * SCREEN_BRIGHTNESS_MODE value for manual mode. 2025 */ 2026 public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0; 2027 2028 /** 2029 * SCREEN_BRIGHTNESS_MODE value for automatic mode. 2030 */ 2031 public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; 2032 2033 /** 2034 * Control whether the process CPU usage meter should be shown. 2035 * 2036 * @deprecated Use {@link Global#SHOW_PROCESSES} instead 2037 */ 2038 @Deprecated 2039 public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES; 2040 2041 /** 2042 * If 1, the activity manager will aggressively finish activities and 2043 * processes as soon as they are no longer needed. If 0, the normal 2044 * extended lifetime is used. 2045 * 2046 * @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead 2047 */ 2048 @Deprecated 2049 public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES; 2050 2051 /** 2052 * Determines which streams are affected by ringer mode changes. The 2053 * stream type's bit should be set to 1 if it should be muted when going 2054 * into an inaudible ringer mode. 2055 */ 2056 public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected"; 2057 2058 /** 2059 * Determines which streams are affected by mute. The 2060 * stream type's bit should be set to 1 if it should be muted when a mute request 2061 * is received. 2062 */ 2063 public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected"; 2064 2065 /** 2066 * Whether vibrate is on for different events. This is used internally, 2067 * changing this value will not change the vibrate. See AudioManager. 2068 */ 2069 public static final String VIBRATE_ON = "vibrate_on"; 2070 2071 /** 2072 * If 1, redirects the system vibrator to all currently attached input devices 2073 * that support vibration. If there are no such input devices, then the system 2074 * vibrator is used instead. 2075 * If 0, does not register the system vibrator. 2076 * 2077 * This setting is mainly intended to provide a compatibility mechanism for 2078 * applications that only know about the system vibrator and do not use the 2079 * input device vibrator API. 2080 * 2081 * @hide 2082 */ 2083 public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices"; 2084 2085 /** 2086 * Ringer volume. This is used internally, changing this value will not 2087 * change the volume. See AudioManager. 2088 */ 2089 public static final String VOLUME_RING = "volume_ring"; 2090 2091 /** 2092 * System/notifications volume. This is used internally, changing this 2093 * value will not change the volume. See AudioManager. 2094 */ 2095 public static final String VOLUME_SYSTEM = "volume_system"; 2096 2097 /** 2098 * Voice call volume. This is used internally, changing this value will 2099 * not change the volume. See AudioManager. 2100 */ 2101 public static final String VOLUME_VOICE = "volume_voice"; 2102 2103 /** 2104 * Music/media/gaming volume. This is used internally, changing this 2105 * value will not change the volume. See AudioManager. 2106 */ 2107 public static final String VOLUME_MUSIC = "volume_music"; 2108 2109 /** 2110 * Alarm volume. This is used internally, changing this 2111 * value will not change the volume. See AudioManager. 2112 */ 2113 public static final String VOLUME_ALARM = "volume_alarm"; 2114 2115 /** 2116 * Notification volume. This is used internally, changing this 2117 * value will not change the volume. See AudioManager. 2118 */ 2119 public static final String VOLUME_NOTIFICATION = "volume_notification"; 2120 2121 /** 2122 * Bluetooth Headset volume. This is used internally, changing this value will 2123 * not change the volume. See AudioManager. 2124 */ 2125 public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco"; 2126 2127 /** 2128 * Master volume (float in the range 0.0f to 1.0f). 2129 * @hide 2130 */ 2131 public static final String VOLUME_MASTER = "volume_master"; 2132 2133 /** 2134 * Master volume mute (int 1 = mute, 0 = not muted). 2135 * 2136 * @hide 2137 */ 2138 public static final String VOLUME_MASTER_MUTE = "volume_master_mute"; 2139 2140 /** 2141 * Microphone mute (int 1 = mute, 0 = not muted). 2142 * 2143 * @hide 2144 */ 2145 public static final String MICROPHONE_MUTE = "microphone_mute"; 2146 2147 /** 2148 * Whether the notifications should use the ring volume (value of 1) or 2149 * a separate notification volume (value of 0). In most cases, users 2150 * will have this enabled so the notification and ringer volumes will be 2151 * the same. However, power users can disable this and use the separate 2152 * notification volume control. 2153 * <p> 2154 * Note: This is a one-off setting that will be removed in the future 2155 * when there is profile support. For this reason, it is kept hidden 2156 * from the public APIs. 2157 * 2158 * @hide 2159 * @deprecated 2160 */ 2161 @Deprecated 2162 public static final String NOTIFICATIONS_USE_RING_VOLUME = 2163 "notifications_use_ring_volume"; 2164 2165 /** 2166 * Whether silent mode should allow vibration feedback. This is used 2167 * internally in AudioService and the Sound settings activity to 2168 * coordinate decoupling of vibrate and silent modes. This setting 2169 * will likely be removed in a future release with support for 2170 * audio/vibe feedback profiles. 2171 * 2172 * Not used anymore. On devices with vibrator, the user explicitly selects 2173 * silent or vibrate mode. 2174 * Kept for use by legacy database upgrade code in DatabaseHelper. 2175 * @hide 2176 */ 2177 public static final String VIBRATE_IN_SILENT = "vibrate_in_silent"; 2178 2179 /** 2180 * The mapping of stream type (integer) to its setting. 2181 */ 2182 public static final String[] VOLUME_SETTINGS = { 2183 VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC, 2184 VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO 2185 }; 2186 2187 /** 2188 * Appended to various volume related settings to record the previous 2189 * values before they the settings were affected by a silent/vibrate 2190 * ringer mode change. 2191 */ 2192 public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible"; 2193 2194 /** 2195 * Persistent store for the system-wide default ringtone URI. 2196 * <p> 2197 * If you need to play the default ringtone at any given time, it is recommended 2198 * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve 2199 * to the set default ringtone at the time of playing. 2200 * 2201 * @see #DEFAULT_RINGTONE_URI 2202 */ 2203 public static final String RINGTONE = "ringtone"; 2204 2205 /** 2206 * A {@link Uri} that will point to the current default ringtone at any 2207 * given time. 2208 * <p> 2209 * If the current default ringtone is in the DRM provider and the caller 2210 * does not have permission, the exception will be a 2211 * FileNotFoundException. 2212 */ 2213 public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE); 2214 2215 /** 2216 * Persistent store for the system-wide default notification sound. 2217 * 2218 * @see #RINGTONE 2219 * @see #DEFAULT_NOTIFICATION_URI 2220 */ 2221 public static final String NOTIFICATION_SOUND = "notification_sound"; 2222 2223 /** 2224 * A {@link Uri} that will point to the current default notification 2225 * sound at any given time. 2226 * 2227 * @see #DEFAULT_RINGTONE_URI 2228 */ 2229 public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND); 2230 2231 /** 2232 * Persistent store for the system-wide default alarm alert. 2233 * 2234 * @see #RINGTONE 2235 * @see #DEFAULT_ALARM_ALERT_URI 2236 */ 2237 public static final String ALARM_ALERT = "alarm_alert"; 2238 2239 /** 2240 * A {@link Uri} that will point to the current default alarm alert at 2241 * any given time. 2242 * 2243 * @see #DEFAULT_ALARM_ALERT_URI 2244 */ 2245 public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT); 2246 2247 /** 2248 * Persistent store for the system default media button event receiver. 2249 * 2250 * @hide 2251 */ 2252 public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver"; 2253 2254 /** 2255 * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off 2256 */ 2257 public static final String TEXT_AUTO_REPLACE = "auto_replace"; 2258 2259 /** 2260 * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off 2261 */ 2262 public static final String TEXT_AUTO_CAPS = "auto_caps"; 2263 2264 /** 2265 * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This 2266 * feature converts two spaces to a "." and space. 2267 */ 2268 public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate"; 2269 2270 /** 2271 * Setting to showing password characters in text editors. 1 = On, 0 = Off 2272 */ 2273 public static final String TEXT_SHOW_PASSWORD = "show_password"; 2274 2275 public static final String SHOW_GTALK_SERVICE_STATUS = 2276 "SHOW_GTALK_SERVICE_STATUS"; 2277 2278 /** 2279 * Name of activity to use for wallpaper on the home screen. 2280 * 2281 * @deprecated Use {@link WallpaperManager} instead. 2282 */ 2283 @Deprecated 2284 public static final String WALLPAPER_ACTIVITY = "wallpaper_activity"; 2285 2286 /** 2287 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME} 2288 * instead 2289 */ 2290 @Deprecated 2291 public static final String AUTO_TIME = Global.AUTO_TIME; 2292 2293 /** 2294 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE} 2295 * instead 2296 */ 2297 @Deprecated 2298 public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE; 2299 2300 /** 2301 * Display times as 12 or 24 hours 2302 * 12 2303 * 24 2304 */ 2305 public static final String TIME_12_24 = "time_12_24"; 2306 2307 /** 2308 * Date format string 2309 * mm/dd/yyyy 2310 * dd/mm/yyyy 2311 * yyyy/mm/dd 2312 */ 2313 public static final String DATE_FORMAT = "date_format"; 2314 2315 /** 2316 * Whether the setup wizard has been run before (on first boot), or if 2317 * it still needs to be run. 2318 * 2319 * nonzero = it has been run in the past 2320 * 0 = it has not been run in the past 2321 */ 2322 public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run"; 2323 2324 /** 2325 * Scaling factor for normal window animations. Setting to 0 will disable window 2326 * animations. 2327 * 2328 * @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead 2329 */ 2330 @Deprecated 2331 public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE; 2332 2333 /** 2334 * Scaling factor for activity transition animations. Setting to 0 will disable window 2335 * animations. 2336 * 2337 * @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead 2338 */ 2339 @Deprecated 2340 public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE; 2341 2342 /** 2343 * Scaling factor for Animator-based animations. This affects both the start delay and 2344 * duration of all such animations. Setting to 0 will cause animations to end immediately. 2345 * The default value is 1. 2346 * 2347 * @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead 2348 */ 2349 @Deprecated 2350 public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE; 2351 2352 /** 2353 * Control whether the accelerometer will be used to change screen 2354 * orientation. If 0, it will not be used unless explicitly requested 2355 * by the application; if 1, it will be used by default unless explicitly 2356 * disabled by the application. 2357 */ 2358 public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; 2359 2360 /** 2361 * Default screen rotation when no other policy applies. 2362 * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a 2363 * preference, this rotation value will be used. Must be one of the 2364 * {@link android.view.Surface#ROTATION_0 Surface rotation constants}. 2365 * 2366 * @see android.view.Display#getRotation 2367 */ 2368 public static final String USER_ROTATION = "user_rotation"; 2369 2370 /** 2371 * Control whether the rotation lock toggle in the System UI should be hidden. 2372 * Typically this is done for accessibility purposes to make it harder for 2373 * the user to accidentally toggle the rotation lock while the display rotation 2374 * has been locked for accessibility. 2375 * 2376 * If 0, then rotation lock toggle is not hidden for accessibility (although it may be 2377 * unavailable for other reasons). If 1, then the rotation lock toggle is hidden. 2378 * 2379 * @hide 2380 */ 2381 public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY = 2382 "hide_rotation_lock_toggle_for_accessibility"; 2383 2384 /** 2385 * Whether the phone vibrates when it is ringing due to an incoming call. This will 2386 * be used by Phone and Setting apps; it shouldn't affect other apps. 2387 * The value is boolean (1 or 0). 2388 * 2389 * Note: this is not same as "vibrate on ring", which had been available until ICS. 2390 * It was about AudioManager's setting and thus affected all the applications which 2391 * relied on the setting, while this is purely about the vibration setting for incoming 2392 * calls. 2393 * 2394 * @hide 2395 */ 2396 public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing"; 2397 2398 /** 2399 * Whether the audible DTMF tones are played by the dialer when dialing. The value is 2400 * boolean (1 or 0). 2401 */ 2402 public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone"; 2403 2404 /** 2405 * CDMA only settings 2406 * DTMF tone type played by the dialer when dialing. 2407 * 0 = Normal 2408 * 1 = Long 2409 * @hide 2410 */ 2411 public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; 2412 2413 /** 2414 * Whether the hearing aid is enabled. The value is 2415 * boolean (1 or 0). 2416 * @hide 2417 */ 2418 public static final String HEARING_AID = "hearing_aid"; 2419 2420 /** 2421 * CDMA only settings 2422 * TTY Mode 2423 * 0 = OFF 2424 * 1 = FULL 2425 * 2 = VCO 2426 * 3 = HCO 2427 * @hide 2428 */ 2429 public static final String TTY_MODE = "tty_mode"; 2430 2431 /** 2432 * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is 2433 * boolean (1 or 0). 2434 */ 2435 public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; 2436 2437 /** 2438 * Whether the haptic feedback (long presses, ...) are enabled. The value is 2439 * boolean (1 or 0). 2440 */ 2441 public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled"; 2442 2443 /** 2444 * @deprecated Each application that shows web suggestions should have its own 2445 * setting for this. 2446 */ 2447 @Deprecated 2448 public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; 2449 2450 /** 2451 * Whether the notification LED should repeatedly flash when a notification is 2452 * pending. The value is boolean (1 or 0). 2453 * @hide 2454 */ 2455 public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; 2456 2457 /** 2458 * Show pointer location on screen? 2459 * 0 = no 2460 * 1 = yes 2461 * @hide 2462 */ 2463 public static final String POINTER_LOCATION = "pointer_location"; 2464 2465 /** 2466 * Show touch positions on screen? 2467 * 0 = no 2468 * 1 = yes 2469 * @hide 2470 */ 2471 public static final String SHOW_TOUCHES = "show_touches"; 2472 2473 /** 2474 * Log raw orientation data from 2475 * {@link com.android.internal.policy.impl.WindowOrientationListener} for use with the 2476 * orientationplot.py tool. 2477 * 0 = no 2478 * 1 = yes 2479 * @hide 2480 */ 2481 public static final String WINDOW_ORIENTATION_LISTENER_LOG = 2482 "window_orientation_listener_log"; 2483 2484 /** 2485 * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED} 2486 * instead 2487 * @hide 2488 */ 2489 @Deprecated 2490 public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED; 2491 2492 /** 2493 * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED} 2494 * instead 2495 * @hide 2496 */ 2497 @Deprecated 2498 public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED; 2499 2500 /** 2501 * Whether to play sounds when the keyguard is shown and dismissed. 2502 * @hide 2503 */ 2504 public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled"; 2505 2506 /** 2507 * Whether the lockscreen should be completely disabled. 2508 * @hide 2509 */ 2510 public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled"; 2511 2512 /** 2513 * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND} 2514 * instead 2515 * @hide 2516 */ 2517 @Deprecated 2518 public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND; 2519 2520 /** 2521 * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND} 2522 * instead 2523 * @hide 2524 */ 2525 @Deprecated 2526 public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND; 2527 2528 /** 2529 * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND} 2530 * instead 2531 * @hide 2532 */ 2533 @Deprecated 2534 public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND; 2535 2536 /** 2537 * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND} 2538 * instead 2539 * @hide 2540 */ 2541 @Deprecated 2542 public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND; 2543 2544 /** 2545 * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND} 2546 * instead 2547 * @hide 2548 */ 2549 @Deprecated 2550 public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND; 2551 2552 /** 2553 * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND} 2554 * instead 2555 * @hide 2556 */ 2557 @Deprecated 2558 public static final String LOCK_SOUND = Global.LOCK_SOUND; 2559 2560 /** 2561 * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND} 2562 * instead 2563 * @hide 2564 */ 2565 @Deprecated 2566 public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND; 2567 2568 /** 2569 * Receive incoming SIP calls? 2570 * 0 = no 2571 * 1 = yes 2572 * @hide 2573 */ 2574 public static final String SIP_RECEIVE_CALLS = "sip_receive_calls"; 2575 2576 /** 2577 * Call Preference String. 2578 * "SIP_ALWAYS" : Always use SIP with network access 2579 * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address 2580 * @hide 2581 */ 2582 public static final String SIP_CALL_OPTIONS = "sip_call_options"; 2583 2584 /** 2585 * One of the sip call options: Always use SIP with network access. 2586 * @hide 2587 */ 2588 public static final String SIP_ALWAYS = "SIP_ALWAYS"; 2589 2590 /** 2591 * One of the sip call options: Only if destination is a SIP address. 2592 * @hide 2593 */ 2594 public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY"; 2595 2596 /** 2597 * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that 2598 * the user should be prompted each time a call is made whether it should be placed using 2599 * SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with 2600 * SIP_ADDRESS_ONLY. 2601 * @hide 2602 */ 2603 @Deprecated 2604 public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME"; 2605 2606 /** 2607 * Pointer speed setting. 2608 * This is an integer value in a range between -7 and +7, so there are 15 possible values. 2609 * -7 = slowest 2610 * 0 = default speed 2611 * +7 = fastest 2612 * @hide 2613 */ 2614 public static final String POINTER_SPEED = "pointer_speed"; 2615 2616 /** 2617 * Whether lock-to-app will be triggered by long-press on recents. 2618 * @hide 2619 */ 2620 public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled"; 2621 2622 /** 2623 * I am the lolrus. 2624 * <p> 2625 * Nonzero values indicate that the user has a bukkit. 2626 * Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>. 2627 * @hide 2628 */ 2629 public static final String EGG_MODE = "egg_mode"; 2630 2631 /** 2632 * Settings to backup. This is here so that it's in the same place as the settings 2633 * keys and easy to update. 2634 * 2635 * NOTE: Settings are backed up and restored in the order they appear 2636 * in this array. If you have one setting depending on another, 2637 * make sure that they are ordered appropriately. 2638 * 2639 * @hide 2640 */ 2641 public static final String[] SETTINGS_TO_BACKUP = { 2642 STAY_ON_WHILE_PLUGGED_IN, // moved to global 2643 WIFI_USE_STATIC_IP, 2644 WIFI_STATIC_IP, 2645 WIFI_STATIC_GATEWAY, 2646 WIFI_STATIC_NETMASK, 2647 WIFI_STATIC_DNS1, 2648 WIFI_STATIC_DNS2, 2649 BLUETOOTH_DISCOVERABILITY, 2650 BLUETOOTH_DISCOVERABILITY_TIMEOUT, 2651 DIM_SCREEN, 2652 SCREEN_OFF_TIMEOUT, 2653 SCREEN_BRIGHTNESS, 2654 SCREEN_BRIGHTNESS_MODE, 2655 SCREEN_AUTO_BRIGHTNESS_ADJ, 2656 VIBRATE_INPUT_DEVICES, 2657 MODE_RINGER_STREAMS_AFFECTED, 2658 VOLUME_VOICE, 2659 VOLUME_SYSTEM, 2660 VOLUME_RING, 2661 VOLUME_MUSIC, 2662 VOLUME_ALARM, 2663 VOLUME_NOTIFICATION, 2664 VOLUME_BLUETOOTH_SCO, 2665 VOLUME_VOICE + APPEND_FOR_LAST_AUDIBLE, 2666 VOLUME_SYSTEM + APPEND_FOR_LAST_AUDIBLE, 2667 VOLUME_RING + APPEND_FOR_LAST_AUDIBLE, 2668 VOLUME_MUSIC + APPEND_FOR_LAST_AUDIBLE, 2669 VOLUME_ALARM + APPEND_FOR_LAST_AUDIBLE, 2670 VOLUME_NOTIFICATION + APPEND_FOR_LAST_AUDIBLE, 2671 VOLUME_BLUETOOTH_SCO + APPEND_FOR_LAST_AUDIBLE, 2672 TEXT_AUTO_REPLACE, 2673 TEXT_AUTO_CAPS, 2674 TEXT_AUTO_PUNCTUATE, 2675 TEXT_SHOW_PASSWORD, 2676 AUTO_TIME, // moved to global 2677 AUTO_TIME_ZONE, // moved to global 2678 TIME_12_24, 2679 DATE_FORMAT, 2680 DTMF_TONE_WHEN_DIALING, 2681 DTMF_TONE_TYPE_WHEN_DIALING, 2682 HEARING_AID, 2683 TTY_MODE, 2684 SOUND_EFFECTS_ENABLED, 2685 HAPTIC_FEEDBACK_ENABLED, 2686 POWER_SOUNDS_ENABLED, // moved to global 2687 DOCK_SOUNDS_ENABLED, // moved to global 2688 LOCKSCREEN_SOUNDS_ENABLED, 2689 SHOW_WEB_SUGGESTIONS, 2690 NOTIFICATION_LIGHT_PULSE, 2691 SIP_CALL_OPTIONS, 2692 SIP_RECEIVE_CALLS, 2693 POINTER_SPEED, 2694 VIBRATE_WHEN_RINGING, 2695 RINGTONE, 2696 LOCK_TO_APP_ENABLED, 2697 NOTIFICATION_SOUND 2698 }; 2699 2700 /** 2701 * These entries are considered common between the personal and the managed profile, 2702 * since the managed profile doesn't get to change them. 2703 * @hide 2704 */ 2705 public static final String[] CLONE_TO_MANAGED_PROFILE = { 2706 DATE_FORMAT, 2707 HAPTIC_FEEDBACK_ENABLED, 2708 SOUND_EFFECTS_ENABLED, 2709 TEXT_SHOW_PASSWORD, 2710 TIME_12_24 2711 }; 2712 2713 /** 2714 * When to use Wi-Fi calling 2715 * 2716 * @see android.telephony.TelephonyManager.WifiCallingChoices 2717 * @hide 2718 */ 2719 public static final String WHEN_TO_MAKE_WIFI_CALLS = "when_to_make_wifi_calls"; 2720 2721 // Settings moved to Settings.Secure 2722 2723 /** 2724 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} 2725 * instead 2726 */ 2727 @Deprecated 2728 public static final String ADB_ENABLED = Global.ADB_ENABLED; 2729 2730 /** 2731 * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead 2732 */ 2733 @Deprecated 2734 public static final String ANDROID_ID = Secure.ANDROID_ID; 2735 2736 /** 2737 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead 2738 */ 2739 @Deprecated 2740 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; 2741 2742 /** 2743 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead 2744 */ 2745 @Deprecated 2746 public static final String DATA_ROAMING = Global.DATA_ROAMING; 2747 2748 /** 2749 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead 2750 */ 2751 @Deprecated 2752 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; 2753 2754 /** 2755 * @deprecated Use {@link android.provider.Settings.Global#HTTP_PROXY} instead 2756 */ 2757 @Deprecated 2758 public static final String HTTP_PROXY = Global.HTTP_PROXY; 2759 2760 /** 2761 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead 2762 */ 2763 @Deprecated 2764 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; 2765 2766 /** 2767 * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED} 2768 * instead 2769 */ 2770 @Deprecated 2771 public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED; 2772 2773 /** 2774 * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead 2775 */ 2776 @Deprecated 2777 public static final String LOGGING_ID = Secure.LOGGING_ID; 2778 2779 /** 2780 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead 2781 */ 2782 @Deprecated 2783 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; 2784 2785 /** 2786 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED} 2787 * instead 2788 */ 2789 @Deprecated 2790 public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED; 2791 2792 /** 2793 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE} 2794 * instead 2795 */ 2796 @Deprecated 2797 public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE; 2798 2799 /** 2800 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL} 2801 * instead 2802 */ 2803 @Deprecated 2804 public static final String PARENTAL_CONTROL_REDIRECT_URL = 2805 Secure.PARENTAL_CONTROL_REDIRECT_URL; 2806 2807 /** 2808 * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead 2809 */ 2810 @Deprecated 2811 public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME; 2812 2813 /** 2814 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead 2815 */ 2816 @Deprecated 2817 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; 2818 2819 /** 2820 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead 2821 */ 2822 @Deprecated 2823 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; 2824 2825 /** 2826 * @deprecated Use 2827 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead 2828 */ 2829 @Deprecated 2830 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; 2831 2832 /** 2833 * @deprecated Use 2834 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead 2835 */ 2836 @Deprecated 2837 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = 2838 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; 2839 2840 /** 2841 * @deprecated Use 2842 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead 2843 */ 2844 @Deprecated 2845 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = 2846 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; 2847 2848 /** 2849 * @deprecated Use 2850 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead 2851 */ 2852 @Deprecated 2853 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = 2854 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; 2855 2856 /** 2857 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} 2858 * instead 2859 */ 2860 @Deprecated 2861 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = Global.WIFI_NUM_OPEN_NETWORKS_KEPT; 2862 2863 /** 2864 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead 2865 */ 2866 @Deprecated 2867 public static final String WIFI_ON = Global.WIFI_ON; 2868 2869 /** 2870 * @deprecated Use 2871 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE} 2872 * instead 2873 */ 2874 @Deprecated 2875 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = 2876 Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE; 2877 2878 /** 2879 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead 2880 */ 2881 @Deprecated 2882 public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT; 2883 2884 /** 2885 * @deprecated Use 2886 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead 2887 */ 2888 @Deprecated 2889 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = 2890 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS; 2891 2892 /** 2893 * @deprecated Use 2894 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead 2895 */ 2896 @Deprecated 2897 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = 2898 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED; 2899 2900 /** 2901 * @deprecated Use 2902 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS} 2903 * instead 2904 */ 2905 @Deprecated 2906 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = 2907 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS; 2908 2909 /** 2910 * @deprecated Use 2911 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead 2912 */ 2913 @Deprecated 2914 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = 2915 Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT; 2916 2917 /** 2918 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS} 2919 * instead 2920 */ 2921 @Deprecated 2922 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS; 2923 2924 /** 2925 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead 2926 */ 2927 @Deprecated 2928 public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON; 2929 2930 /** 2931 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead 2932 */ 2933 @Deprecated 2934 public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT; 2935 2936 /** 2937 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS} 2938 * instead 2939 */ 2940 @Deprecated 2941 public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS; 2942 2943 /** 2944 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS} 2945 * instead 2946 */ 2947 @Deprecated 2948 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = 2949 Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS; 2950 } 2951 2952 /** 2953 * Secure system settings, containing system preferences that applications 2954 * can read but are not allowed to write. These are for preferences that 2955 * the user must explicitly modify through the system UI or specialized 2956 * APIs for those values, not modified directly by applications. 2957 */ 2958 public static final class Secure extends NameValueTable { 2959 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version"; 2960 2961 /** 2962 * The content:// style URL for this table 2963 */ 2964 public static final Uri CONTENT_URI = 2965 Uri.parse("content://" + AUTHORITY + "/secure"); 2966 2967 // Populated lazily, guarded by class object: 2968 private static final NameValueCache sNameValueCache = new NameValueCache( 2969 SYS_PROP_SETTING_VERSION, 2970 CONTENT_URI, 2971 CALL_METHOD_GET_SECURE, 2972 CALL_METHOD_PUT_SECURE); 2973 2974 private static ILockSettings sLockSettings = null; 2975 2976 private static boolean sIsSystemProcess; 2977 private static final HashSet<String> MOVED_TO_LOCK_SETTINGS; 2978 private static final HashSet<String> MOVED_TO_GLOBAL; 2979 static { 2980 MOVED_TO_LOCK_SETTINGS = new HashSet<String>(3); 2981 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED); 2982 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE); 2983 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); 2984 2985 MOVED_TO_GLOBAL = new HashSet<String>(); 2986 MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED); 2987 MOVED_TO_GLOBAL.add(Settings.Global.ASSISTED_GPS_ENABLED); 2988 MOVED_TO_GLOBAL.add(Settings.Global.BLUETOOTH_ON); 2989 MOVED_TO_GLOBAL.add(Settings.Global.BUGREPORT_IN_POWER_MENU); 2990 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_CELL_BROADCAST_SMS); 2991 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_ROAMING_MODE); 2992 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_SUBSCRIPTION_MODE); 2993 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE); 2994 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI); 2995 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ROAMING); 2996 MOVED_TO_GLOBAL.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED); 2997 MOVED_TO_GLOBAL.add(Settings.Global.DEVICE_PROVISIONED); 2998 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_DENSITY_FORCED); 2999 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_SIZE_FORCED); 3000 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE); 3001 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE); 3002 MOVED_TO_GLOBAL.add(Settings.Global.MOBILE_DATA); 3003 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION); 3004 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_DELETE_AGE); 3005 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES); 3006 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE); 3007 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_ENABLED); 3008 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES); 3009 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_POLL_INTERVAL); 3010 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_SAMPLE_ENABLED); 3011 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE); 3012 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION); 3013 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_DELETE_AGE); 3014 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES); 3015 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_ROTATE_AGE); 3016 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION); 3017 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE); 3018 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES); 3019 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE); 3020 MOVED_TO_GLOBAL.add(Settings.Global.NETWORK_PREFERENCE); 3021 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_DIFF); 3022 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING); 3023 MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER); 3024 MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT); 3025 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT); 3026 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS); 3027 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT); 3028 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS); 3029 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT); 3030 MOVED_TO_GLOBAL.add(Settings.Global.SAMPLING_PROFILER_MS); 3031 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL); 3032 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST); 3033 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL); 3034 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_APN); 3035 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_REQUIRED); 3036 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_SUPPORTED); 3037 MOVED_TO_GLOBAL.add(Settings.Global.USB_MASS_STORAGE_ENABLED); 3038 MOVED_TO_GLOBAL.add(Settings.Global.USE_GOOGLE_MAIL); 3039 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_COUNTRY_CODE); 3040 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS); 3041 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FREQUENCY_BAND); 3042 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_IDLE_MS); 3043 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT); 3044 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS); 3045 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); 3046 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); 3047 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT); 3048 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON); 3049 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME); 3050 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SAVED_STATE); 3051 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS); 3052 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED); 3053 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ENHANCED_AUTO_JOIN); 3054 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORK_SHOW_RSSI); 3055 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_ON); 3056 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED); 3057 MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON); 3058 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_ENABLE); 3059 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT); 3060 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE); 3061 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS); 3062 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS); 3063 MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS); 3064 MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL); 3065 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD); 3066 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_THRESHOLD); 3067 MOVED_TO_GLOBAL.add(Settings.Global.SEND_ACTION_APP_ERROR); 3068 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_AGE_SECONDS); 3069 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_MAX_FILES); 3070 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_KB); 3071 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_PERCENT); 3072 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_RESERVE_PERCENT); 3073 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_TAG_PREFIX); 3074 MOVED_TO_GLOBAL.add(Settings.Global.ERROR_LOGCAT_PREFIX); 3075 MOVED_TO_GLOBAL.add(Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL); 3076 MOVED_TO_GLOBAL.add(Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD); 3077 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE); 3078 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES); 3079 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES); 3080 MOVED_TO_GLOBAL.add(Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS); 3081 MOVED_TO_GLOBAL.add(Settings.Global.CONNECTIVITY_CHANGE_DELAY); 3082 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED); 3083 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_SERVER); 3084 MOVED_TO_GLOBAL.add(Settings.Global.NSD_ON); 3085 MOVED_TO_GLOBAL.add(Settings.Global.SET_INSTALL_LOCATION); 3086 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_INSTALL_LOCATION); 3087 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY); 3088 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY); 3089 MOVED_TO_GLOBAL.add(Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT); 3090 MOVED_TO_GLOBAL.add(Settings.Global.HTTP_PROXY); 3091 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_HOST); 3092 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_PORT); 3093 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST); 3094 MOVED_TO_GLOBAL.add(Settings.Global.SET_GLOBAL_HTTP_PROXY); 3095 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER); 3096 MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE); 3097 MOVED_TO_GLOBAL.add(Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY); 3098 } 3099 3100 /** @hide */ 3101 public static void getMovedKeys(HashSet<String> outKeySet) { 3102 outKeySet.addAll(MOVED_TO_GLOBAL); 3103 } 3104 3105 /** 3106 * Look up a name in the database. 3107 * @param resolver to access the database with 3108 * @param name to look up in the table 3109 * @return the corresponding value, or null if not present 3110 */ 3111 public static String getString(ContentResolver resolver, String name) { 3112 return getStringForUser(resolver, name, UserHandle.myUserId()); 3113 } 3114 3115 /** @hide */ 3116 public static String getStringForUser(ContentResolver resolver, String name, 3117 int userHandle) { 3118 if (MOVED_TO_GLOBAL.contains(name)) { 3119 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" 3120 + " to android.provider.Settings.Global."); 3121 return Global.getStringForUser(resolver, name, userHandle); 3122 } 3123 3124 if (MOVED_TO_LOCK_SETTINGS.contains(name)) { 3125 synchronized (Secure.class) { 3126 if (sLockSettings == null) { 3127 sLockSettings = ILockSettings.Stub.asInterface( 3128 (IBinder) ServiceManager.getService("lock_settings")); 3129 sIsSystemProcess = Process.myUid() == Process.SYSTEM_UID; 3130 } 3131 } 3132 if (sLockSettings != null && !sIsSystemProcess) { 3133 try { 3134 return sLockSettings.getString(name, "0", userHandle); 3135 } catch (RemoteException re) { 3136 // Fall through 3137 } 3138 } 3139 } 3140 3141 return sNameValueCache.getStringForUser(resolver, name, userHandle); 3142 } 3143 3144 /** 3145 * Store a name/value pair into the database. 3146 * @param resolver to access the database with 3147 * @param name to store 3148 * @param value to associate with the name 3149 * @return true if the value was set, false on database errors 3150 */ 3151 public static boolean putString(ContentResolver resolver, String name, String value) { 3152 return putStringForUser(resolver, name, value, UserHandle.myUserId()); 3153 } 3154 3155 /** @hide */ 3156 public static boolean putStringForUser(ContentResolver resolver, String name, String value, 3157 int userHandle) { 3158 if (LOCATION_MODE.equals(name)) { 3159 // HACK ALERT: temporary hack to work around b/10491283. 3160 // TODO: once b/10491283 fixed, remove this hack 3161 return setLocationModeForUser(resolver, Integer.parseInt(value), userHandle); 3162 } 3163 if (MOVED_TO_GLOBAL.contains(name)) { 3164 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 3165 + " to android.provider.Settings.Global"); 3166 return Global.putStringForUser(resolver, name, value, userHandle); 3167 } 3168 return sNameValueCache.putStringForUser(resolver, name, value, userHandle); 3169 } 3170 3171 /** 3172 * Construct the content URI for a particular name/value pair, 3173 * useful for monitoring changes with a ContentObserver. 3174 * @param name to look up in the table 3175 * @return the corresponding content URI, or null if not present 3176 */ 3177 public static Uri getUriFor(String name) { 3178 if (MOVED_TO_GLOBAL.contains(name)) { 3179 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" 3180 + " to android.provider.Settings.Global, returning global URI."); 3181 return Global.getUriFor(Global.CONTENT_URI, name); 3182 } 3183 return getUriFor(CONTENT_URI, name); 3184 } 3185 3186 /** 3187 * Convenience function for retrieving a single secure settings value 3188 * as an integer. Note that internally setting values are always 3189 * stored as strings; this function converts the string to an integer 3190 * for you. The default value will be returned if the setting is 3191 * not defined or not an integer. 3192 * 3193 * @param cr The ContentResolver to access. 3194 * @param name The name of the setting to retrieve. 3195 * @param def Value to return if the setting is not defined. 3196 * 3197 * @return The setting's current value, or 'def' if it is not defined 3198 * or not a valid integer. 3199 */ 3200 public static int getInt(ContentResolver cr, String name, int def) { 3201 return getIntForUser(cr, name, def, UserHandle.myUserId()); 3202 } 3203 3204 /** @hide */ 3205 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { 3206 if (LOCATION_MODE.equals(name)) { 3207 // HACK ALERT: temporary hack to work around b/10491283. 3208 // TODO: once b/10491283 fixed, remove this hack 3209 return getLocationModeForUser(cr, userHandle); 3210 } 3211 String v = getStringForUser(cr, name, userHandle); 3212 try { 3213 return v != null ? Integer.parseInt(v) : def; 3214 } catch (NumberFormatException e) { 3215 return def; 3216 } 3217 } 3218 3219 /** 3220 * Convenience function for retrieving a single secure settings value 3221 * as an integer. Note that internally setting values are always 3222 * stored as strings; this function converts the string to an integer 3223 * for you. 3224 * <p> 3225 * This version does not take a default value. If the setting has not 3226 * been set, or the string value is not a number, 3227 * it throws {@link SettingNotFoundException}. 3228 * 3229 * @param cr The ContentResolver to access. 3230 * @param name The name of the setting to retrieve. 3231 * 3232 * @throws SettingNotFoundException Thrown if a setting by the given 3233 * name can't be found or the setting value is not an integer. 3234 * 3235 * @return The setting's current value. 3236 */ 3237 public static int getInt(ContentResolver cr, String name) 3238 throws SettingNotFoundException { 3239 return getIntForUser(cr, name, UserHandle.myUserId()); 3240 } 3241 3242 /** @hide */ 3243 public static int getIntForUser(ContentResolver cr, String name, int userHandle) 3244 throws SettingNotFoundException { 3245 if (LOCATION_MODE.equals(name)) { 3246 // HACK ALERT: temporary hack to work around b/10491283. 3247 // TODO: once b/10491283 fixed, remove this hack 3248 return getLocationModeForUser(cr, userHandle); 3249 } 3250 String v = getStringForUser(cr, name, userHandle); 3251 try { 3252 return Integer.parseInt(v); 3253 } catch (NumberFormatException e) { 3254 throw new SettingNotFoundException(name); 3255 } 3256 } 3257 3258 /** 3259 * Convenience function for updating a single settings value as an 3260 * integer. This will either create a new entry in the table if the 3261 * given name does not exist, or modify the value of the existing row 3262 * with that name. Note that internally setting values are always 3263 * stored as strings, so this function converts the given value to a 3264 * string before storing it. 3265 * 3266 * @param cr The ContentResolver to access. 3267 * @param name The name of the setting to modify. 3268 * @param value The new value for the setting. 3269 * @return true if the value was set, false on database errors 3270 */ 3271 public static boolean putInt(ContentResolver cr, String name, int value) { 3272 return putIntForUser(cr, name, value, UserHandle.myUserId()); 3273 } 3274 3275 /** @hide */ 3276 public static boolean putIntForUser(ContentResolver cr, String name, int value, 3277 int userHandle) { 3278 return putStringForUser(cr, name, Integer.toString(value), userHandle); 3279 } 3280 3281 /** 3282 * Convenience function for retrieving a single secure settings value 3283 * as a {@code long}. Note that internally setting values are always 3284 * stored as strings; this function converts the string to a {@code long} 3285 * for you. The default value will be returned if the setting is 3286 * not defined or not a {@code long}. 3287 * 3288 * @param cr The ContentResolver to access. 3289 * @param name The name of the setting to retrieve. 3290 * @param def Value to return if the setting is not defined. 3291 * 3292 * @return The setting's current value, or 'def' if it is not defined 3293 * or not a valid {@code long}. 3294 */ 3295 public static long getLong(ContentResolver cr, String name, long def) { 3296 return getLongForUser(cr, name, def, UserHandle.myUserId()); 3297 } 3298 3299 /** @hide */ 3300 public static long getLongForUser(ContentResolver cr, String name, long def, 3301 int userHandle) { 3302 String valString = getStringForUser(cr, name, userHandle); 3303 long value; 3304 try { 3305 value = valString != null ? Long.parseLong(valString) : def; 3306 } catch (NumberFormatException e) { 3307 value = def; 3308 } 3309 return value; 3310 } 3311 3312 /** 3313 * Convenience function for retrieving a single secure settings value 3314 * as a {@code long}. Note that internally setting values are always 3315 * stored as strings; this function converts the string to a {@code long} 3316 * for you. 3317 * <p> 3318 * This version does not take a default value. If the setting has not 3319 * been set, or the string value is not a number, 3320 * it throws {@link SettingNotFoundException}. 3321 * 3322 * @param cr The ContentResolver to access. 3323 * @param name The name of the setting to retrieve. 3324 * 3325 * @return The setting's current value. 3326 * @throws SettingNotFoundException Thrown if a setting by the given 3327 * name can't be found or the setting value is not an integer. 3328 */ 3329 public static long getLong(ContentResolver cr, String name) 3330 throws SettingNotFoundException { 3331 return getLongForUser(cr, name, UserHandle.myUserId()); 3332 } 3333 3334 /** @hide */ 3335 public static long getLongForUser(ContentResolver cr, String name, int userHandle) 3336 throws SettingNotFoundException { 3337 String valString = getStringForUser(cr, name, userHandle); 3338 try { 3339 return Long.parseLong(valString); 3340 } catch (NumberFormatException e) { 3341 throw new SettingNotFoundException(name); 3342 } 3343 } 3344 3345 /** 3346 * Convenience function for updating a secure settings value as a long 3347 * integer. This will either create a new entry in the table if the 3348 * given name does not exist, or modify the value of the existing row 3349 * with that name. Note that internally setting values are always 3350 * stored as strings, so this function converts the given value to a 3351 * string before storing it. 3352 * 3353 * @param cr The ContentResolver to access. 3354 * @param name The name of the setting to modify. 3355 * @param value The new value for the setting. 3356 * @return true if the value was set, false on database errors 3357 */ 3358 public static boolean putLong(ContentResolver cr, String name, long value) { 3359 return putLongForUser(cr, name, value, UserHandle.myUserId()); 3360 } 3361 3362 /** @hide */ 3363 public static boolean putLongForUser(ContentResolver cr, String name, long value, 3364 int userHandle) { 3365 return putStringForUser(cr, name, Long.toString(value), userHandle); 3366 } 3367 3368 /** 3369 * Convenience function for retrieving a single secure settings value 3370 * as a floating point number. Note that internally setting values are 3371 * always stored as strings; this function converts the string to an 3372 * float for you. The default value will be returned if the setting 3373 * is not defined or not a valid float. 3374 * 3375 * @param cr The ContentResolver to access. 3376 * @param name The name of the setting to retrieve. 3377 * @param def Value to return if the setting is not defined. 3378 * 3379 * @return The setting's current value, or 'def' if it is not defined 3380 * or not a valid float. 3381 */ 3382 public static float getFloat(ContentResolver cr, String name, float def) { 3383 return getFloatForUser(cr, name, def, UserHandle.myUserId()); 3384 } 3385 3386 /** @hide */ 3387 public static float getFloatForUser(ContentResolver cr, String name, float def, 3388 int userHandle) { 3389 String v = getStringForUser(cr, name, userHandle); 3390 try { 3391 return v != null ? Float.parseFloat(v) : def; 3392 } catch (NumberFormatException e) { 3393 return def; 3394 } 3395 } 3396 3397 /** 3398 * Convenience function for retrieving a single secure settings value 3399 * as a float. Note that internally setting values are always 3400 * stored as strings; this function converts the string to a float 3401 * for you. 3402 * <p> 3403 * This version does not take a default value. If the setting has not 3404 * been set, or the string value is not a number, 3405 * it throws {@link SettingNotFoundException}. 3406 * 3407 * @param cr The ContentResolver to access. 3408 * @param name The name of the setting to retrieve. 3409 * 3410 * @throws SettingNotFoundException Thrown if a setting by the given 3411 * name can't be found or the setting value is not a float. 3412 * 3413 * @return The setting's current value. 3414 */ 3415 public static float getFloat(ContentResolver cr, String name) 3416 throws SettingNotFoundException { 3417 return getFloatForUser(cr, name, UserHandle.myUserId()); 3418 } 3419 3420 /** @hide */ 3421 public static float getFloatForUser(ContentResolver cr, String name, int userHandle) 3422 throws SettingNotFoundException { 3423 String v = getStringForUser(cr, name, userHandle); 3424 if (v == null) { 3425 throw new SettingNotFoundException(name); 3426 } 3427 try { 3428 return Float.parseFloat(v); 3429 } catch (NumberFormatException e) { 3430 throw new SettingNotFoundException(name); 3431 } 3432 } 3433 3434 /** 3435 * Convenience function for updating a single settings value as a 3436 * floating point number. This will either create a new entry in the 3437 * table if the given name does not exist, or modify the value of the 3438 * existing row with that name. Note that internally setting values 3439 * are always stored as strings, so this function converts the given 3440 * value to a string before storing it. 3441 * 3442 * @param cr The ContentResolver to access. 3443 * @param name The name of the setting to modify. 3444 * @param value The new value for the setting. 3445 * @return true if the value was set, false on database errors 3446 */ 3447 public static boolean putFloat(ContentResolver cr, String name, float value) { 3448 return putFloatForUser(cr, name, value, UserHandle.myUserId()); 3449 } 3450 3451 /** @hide */ 3452 public static boolean putFloatForUser(ContentResolver cr, String name, float value, 3453 int userHandle) { 3454 return putStringForUser(cr, name, Float.toString(value), userHandle); 3455 } 3456 3457 /** 3458 * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED} 3459 * instead 3460 */ 3461 @Deprecated 3462 public static final String DEVELOPMENT_SETTINGS_ENABLED = 3463 Global.DEVELOPMENT_SETTINGS_ENABLED; 3464 3465 /** 3466 * When the user has enable the option to have a "bug report" command 3467 * in the power menu. 3468 * @deprecated Use {@link android.provider.Settings.Global#BUGREPORT_IN_POWER_MENU} instead 3469 * @hide 3470 */ 3471 @Deprecated 3472 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; 3473 3474 /** 3475 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} instead 3476 */ 3477 @Deprecated 3478 public static final String ADB_ENABLED = Global.ADB_ENABLED; 3479 3480 /** 3481 * Setting to allow mock locations and location provider status to be injected into the 3482 * LocationManager service for testing purposes during application development. These 3483 * locations and status values override actual location and status information generated 3484 * by network, gps, or other location providers. 3485 */ 3486 public static final String ALLOW_MOCK_LOCATION = "mock_location"; 3487 3488 /** 3489 * A 64-bit number (as a hex string) that is randomly 3490 * generated when the user first sets up the device and should remain 3491 * constant for the lifetime of the user's device. The value may 3492 * change if a factory reset is performed on the device. 3493 * <p class="note"><strong>Note:</strong> When a device has <a 3494 * href="{@docRoot}about/versions/android-4.2.html#MultipleUsers">multiple users</a> 3495 * (available on certain devices running Android 4.2 or higher), each user appears as a 3496 * completely separate device, so the {@code ANDROID_ID} value is unique to each 3497 * user.</p> 3498 */ 3499 public static final String ANDROID_ID = "android_id"; 3500 3501 /** 3502 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead 3503 */ 3504 @Deprecated 3505 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; 3506 3507 /** 3508 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead 3509 */ 3510 @Deprecated 3511 public static final String DATA_ROAMING = Global.DATA_ROAMING; 3512 3513 /** 3514 * Setting to record the input method used by default, holding the ID 3515 * of the desired method. 3516 */ 3517 public static final String DEFAULT_INPUT_METHOD = "default_input_method"; 3518 3519 /** 3520 * Setting to record the input method subtype used by default, holding the ID 3521 * of the desired method. 3522 */ 3523 public static final String SELECTED_INPUT_METHOD_SUBTYPE = 3524 "selected_input_method_subtype"; 3525 3526 /** 3527 * Setting to record the history of input method subtype, holding the pair of ID of IME 3528 * and its last used subtype. 3529 * @hide 3530 */ 3531 public static final String INPUT_METHODS_SUBTYPE_HISTORY = 3532 "input_methods_subtype_history"; 3533 3534 /** 3535 * Setting to record the visibility of input method selector 3536 */ 3537 public static final String INPUT_METHOD_SELECTOR_VISIBILITY = 3538 "input_method_selector_visibility"; 3539 3540 /** 3541 * The currently selected voice interaction service flattened ComponentName. 3542 * @hide 3543 */ 3544 public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service"; 3545 3546 /** 3547 * bluetooth HCI snoop log configuration 3548 * @hide 3549 */ 3550 public static final String BLUETOOTH_HCI_LOG = 3551 "bluetooth_hci_log"; 3552 3553 /** 3554 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead 3555 */ 3556 @Deprecated 3557 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; 3558 3559 /** 3560 * Whether the current user has been set up via setup wizard (0 = false, 1 = true) 3561 * @hide 3562 */ 3563 public static final String USER_SETUP_COMPLETE = "user_setup_complete"; 3564 3565 /** 3566 * List of input methods that are currently enabled. This is a string 3567 * containing the IDs of all enabled input methods, each ID separated 3568 * by ':'. 3569 */ 3570 public static final String ENABLED_INPUT_METHODS = "enabled_input_methods"; 3571 3572 /** 3573 * List of system input methods that are currently disabled. This is a string 3574 * containing the IDs of all disabled input methods, each ID separated 3575 * by ':'. 3576 * @hide 3577 */ 3578 public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods"; 3579 3580 /** 3581 * Whether to show the IME when a hard keyboard is connected. This is a boolean that 3582 * determines if the IME should be shown when a hard keyboard is attached. 3583 * @hide 3584 */ 3585 public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard"; 3586 3587 /** 3588 * Host name and port for global http proxy. Uses ':' seperator for 3589 * between host and port. 3590 * 3591 * @deprecated Use {@link Global#HTTP_PROXY} 3592 */ 3593 @Deprecated 3594 public static final String HTTP_PROXY = Global.HTTP_PROXY; 3595 3596 /** 3597 * Whether applications can be installed for this user via the system's 3598 * {@link Intent#ACTION_INSTALL_PACKAGE} mechanism. 3599 * 3600 * <p>1 = permit app installation via the system package installer intent 3601 * <p>0 = do not allow use of the package installer 3602 */ 3603 public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps"; 3604 3605 /** 3606 * Comma-separated list of location providers that activities may access. Do not rely on 3607 * this value being present in settings.db or on ContentObserver notifications on the 3608 * corresponding Uri. 3609 * 3610 * @deprecated use {@link #LOCATION_MODE} and 3611 * {@link LocationManager#MODE_CHANGED_ACTION} (or 3612 * {@link LocationManager#PROVIDERS_CHANGED_ACTION}) 3613 */ 3614 @Deprecated 3615 public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; 3616 3617 /** 3618 * The degree of location access enabled by the user. 3619 * <p> 3620 * When used with {@link #putInt(ContentResolver, String, int)}, must be one of {@link 3621 * #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, {@link 3622 * #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. When used with {@link 3623 * #getInt(ContentResolver, String)}, the caller must gracefully handle additional location 3624 * modes that might be added in the future. 3625 * <p> 3626 * Note: do not rely on this value being present in settings.db or on ContentObserver 3627 * notifications for the corresponding Uri. Use {@link LocationManager#MODE_CHANGED_ACTION} 3628 * to receive changes in this value. 3629 */ 3630 public static final String LOCATION_MODE = "location_mode"; 3631 3632 /** 3633 * Location access disabled. 3634 */ 3635 public static final int LOCATION_MODE_OFF = 0; 3636 /** 3637 * Network Location Provider disabled, but GPS and other sensors enabled. 3638 */ 3639 public static final int LOCATION_MODE_SENSORS_ONLY = 1; 3640 /** 3641 * Reduced power usage, such as limiting the number of GPS updates per hour. Requests 3642 * with {@link android.location.Criteria#POWER_HIGH} may be downgraded to 3643 * {@link android.location.Criteria#POWER_MEDIUM}. 3644 */ 3645 public static final int LOCATION_MODE_BATTERY_SAVING = 2; 3646 /** 3647 * Best-effort location computation allowed. 3648 */ 3649 public static final int LOCATION_MODE_HIGH_ACCURACY = 3; 3650 3651 /** 3652 * A flag containing settings used for biometric weak 3653 * @hide 3654 */ 3655 @Deprecated 3656 public static final String LOCK_BIOMETRIC_WEAK_FLAGS = 3657 "lock_biometric_weak_flags"; 3658 3659 /** 3660 * Whether lock-to-app will lock the keyguard when exiting. 3661 * @hide 3662 */ 3663 public static final String LOCK_TO_APP_EXIT_LOCKED = "lock_to_app_exit_locked"; 3664 3665 /** 3666 * Whether autolock is enabled (0 = false, 1 = true) 3667 * 3668 * @deprecated Use {@link android.app.KeyguardManager} to determine the state and security 3669 * level of the keyguard. 3670 */ 3671 @Deprecated 3672 public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; 3673 3674 /** 3675 * Whether lock pattern is visible as user enters (0 = false, 1 = true) 3676 */ 3677 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; 3678 3679 /** 3680 * Whether lock pattern will vibrate as user enters (0 = false, 1 = 3681 * true) 3682 * 3683 * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the 3684 * lockscreen uses 3685 * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}. 3686 */ 3687 @Deprecated 3688 public static final String 3689 LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; 3690 3691 /** 3692 * This preference allows the device to be locked given time after screen goes off, 3693 * subject to current DeviceAdmin policy limits. 3694 * @hide 3695 */ 3696 public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout"; 3697 3698 3699 /** 3700 * This preference contains the string that shows for owner info on LockScreen. 3701 * @hide 3702 * @deprecated 3703 */ 3704 public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info"; 3705 3706 /** 3707 * Ids of the user-selected appwidgets on the lockscreen (comma-delimited). 3708 * @hide 3709 */ 3710 @Deprecated 3711 public static final String LOCK_SCREEN_APPWIDGET_IDS = 3712 "lock_screen_appwidget_ids"; 3713 3714 /** 3715 * List of enrolled fingerprint identifiers (comma-delimited). 3716 * @hide 3717 */ 3718 public static final String USER_FINGERPRINT_IDS = "user_fingerprint_ids"; 3719 3720 /** 3721 * Id of the appwidget shown on the lock screen when appwidgets are disabled. 3722 * @hide 3723 */ 3724 @Deprecated 3725 public static final String LOCK_SCREEN_FALLBACK_APPWIDGET_ID = 3726 "lock_screen_fallback_appwidget_id"; 3727 3728 /** 3729 * Index of the lockscreen appwidget to restore, -1 if none. 3730 * @hide 3731 */ 3732 @Deprecated 3733 public static final String LOCK_SCREEN_STICKY_APPWIDGET = 3734 "lock_screen_sticky_appwidget"; 3735 3736 /** 3737 * This preference enables showing the owner info on LockScreen. 3738 * @hide 3739 * @deprecated 3740 */ 3741 public static final String LOCK_SCREEN_OWNER_INFO_ENABLED = 3742 "lock_screen_owner_info_enabled"; 3743 3744 /** 3745 * When set by a user, allows notifications to be shown atop a securely locked screen 3746 * in their full "private" form (same as when the device is unlocked). 3747 * @hide 3748 */ 3749 public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = 3750 "lock_screen_allow_private_notifications"; 3751 3752 /** 3753 * Set by the system to track if the user needs to see the call to action for 3754 * the lockscreen notification policy. 3755 * @hide 3756 */ 3757 public static final String SHOW_NOTE_ABOUT_NOTIFICATION_HIDING = 3758 "show_note_about_notification_hiding"; 3759 3760 /** 3761 * Set to 1 by the system after trust agents have been initialized. 3762 * @hide 3763 */ 3764 public static final String TRUST_AGENTS_INITIALIZED = 3765 "trust_agents_initialized"; 3766 3767 /** 3768 * The Logging ID (a unique 64-bit value) as a hex string. 3769 * Used as a pseudonymous identifier for logging. 3770 * @deprecated This identifier is poorly initialized and has 3771 * many collisions. It should not be used. 3772 */ 3773 @Deprecated 3774 public static final String LOGGING_ID = "logging_id"; 3775 3776 /** 3777 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead 3778 */ 3779 @Deprecated 3780 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; 3781 3782 /** 3783 * No longer supported. 3784 */ 3785 public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled"; 3786 3787 /** 3788 * No longer supported. 3789 */ 3790 public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update"; 3791 3792 /** 3793 * No longer supported. 3794 */ 3795 public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url"; 3796 3797 /** 3798 * Settings classname to launch when Settings is clicked from All 3799 * Applications. Needed because of user testing between the old 3800 * and new Settings apps. 3801 */ 3802 // TODO: 881807 3803 public static final String SETTINGS_CLASSNAME = "settings_classname"; 3804 3805 /** 3806 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead 3807 */ 3808 @Deprecated 3809 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; 3810 3811 /** 3812 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead 3813 */ 3814 @Deprecated 3815 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; 3816 3817 /** 3818 * If accessibility is enabled. 3819 */ 3820 public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled"; 3821 3822 /** 3823 * If touch exploration is enabled. 3824 */ 3825 public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled"; 3826 3827 /** 3828 * List of the enabled accessibility providers. 3829 */ 3830 public static final String ENABLED_ACCESSIBILITY_SERVICES = 3831 "enabled_accessibility_services"; 3832 3833 /** 3834 * List of the accessibility services to which the user has granted 3835 * permission to put the device into touch exploration mode. 3836 * 3837 * @hide 3838 */ 3839 public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES = 3840 "touch_exploration_granted_accessibility_services"; 3841 3842 /** 3843 * Whether to speak passwords while in accessibility mode. 3844 */ 3845 public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password"; 3846 3847 /** 3848 * Whether to draw text with high contrast while in accessibility mode. 3849 * 3850 * @hide 3851 */ 3852 public static final String ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED = 3853 "high_text_contrast_enabled"; 3854 3855 /** 3856 * If injection of accessibility enhancing JavaScript screen-reader 3857 * is enabled. 3858 * <p> 3859 * Note: The JavaScript based screen-reader is served by the 3860 * Google infrastructure and enable users with disabilities to 3861 * efficiently navigate in and explore web content. 3862 * </p> 3863 * <p> 3864 * This property represents a boolean value. 3865 * </p> 3866 * @hide 3867 */ 3868 public static final String ACCESSIBILITY_SCRIPT_INJECTION = 3869 "accessibility_script_injection"; 3870 3871 /** 3872 * The URL for the injected JavaScript based screen-reader used 3873 * for providing accessibility of content in WebView. 3874 * <p> 3875 * Note: The JavaScript based screen-reader is served by the 3876 * Google infrastructure and enable users with disabilities to 3877 * efficiently navigate in and explore web content. 3878 * </p> 3879 * <p> 3880 * This property represents a string value. 3881 * </p> 3882 * @hide 3883 */ 3884 public static final String ACCESSIBILITY_SCREEN_READER_URL = 3885 "accessibility_script_injection_url"; 3886 3887 /** 3888 * Key bindings for navigation in built-in accessibility support for web content. 3889 * <p> 3890 * Note: These key bindings are for the built-in accessibility navigation for 3891 * web content which is used as a fall back solution if JavaScript in a WebView 3892 * is not enabled or the user has not opted-in script injection from Google. 3893 * </p> 3894 * <p> 3895 * The bindings are separated by semi-colon. A binding is a mapping from 3896 * a key to a sequence of actions (for more details look at 3897 * android.webkit.AccessibilityInjector). A key is represented as the hexademical 3898 * string representation of an integer obtained from a meta state (optional) shifted 3899 * sixteen times left and bitwise ored with a key code. An action is represented 3900 * as a hexademical string representation of an integer where the first two digits 3901 * are navigation action index, the second, the third, and the fourth digit pairs 3902 * represent the action arguments. The separate actions in a binding are colon 3903 * separated. The key and the action sequence it maps to are separated by equals. 3904 * </p> 3905 * <p> 3906 * For example, the binding below maps the DPAD right button to traverse the 3907 * current navigation axis once without firing an accessibility event and to 3908 * perform the same traversal again but to fire an event: 3909 * <code> 3910 * 0x16=0x01000100:0x01000101; 3911 * </code> 3912 * </p> 3913 * <p> 3914 * The goal of this binding is to enable dynamic rebinding of keys to 3915 * navigation actions for web content without requiring a framework change. 3916 * </p> 3917 * <p> 3918 * This property represents a string value. 3919 * </p> 3920 * @hide 3921 */ 3922 public static final String ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS = 3923 "accessibility_web_content_key_bindings"; 3924 3925 /** 3926 * Setting that specifies whether the display magnification is enabled. 3927 * Display magnifications allows the user to zoom in the display content 3928 * and is targeted to low vision users. The current magnification scale 3929 * is controlled by {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}. 3930 * 3931 * @hide 3932 */ 3933 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED = 3934 "accessibility_display_magnification_enabled"; 3935 3936 /** 3937 * Setting that specifies what the display magnification scale is. 3938 * Display magnifications allows the user to zoom in the display 3939 * content and is targeted to low vision users. Whether a display 3940 * magnification is performed is controlled by 3941 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED} 3942 * 3943 * @hide 3944 */ 3945 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE = 3946 "accessibility_display_magnification_scale"; 3947 3948 /** 3949 * Setting that specifies whether the display magnification should be 3950 * automatically updated. If this fearture is enabled the system will 3951 * exit magnification mode or pan the viewport when a context change 3952 * occurs. For example, on staring a new activity or rotating the screen, 3953 * the system may zoom out so the user can see the new context he is in. 3954 * Another example is on showing a window that is not visible in the 3955 * magnified viewport the system may pan the viewport to make the window 3956 * the has popped up so the user knows that the context has changed. 3957 * Whether a screen magnification is performed is controlled by 3958 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED} 3959 * 3960 * @hide 3961 */ 3962 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE = 3963 "accessibility_display_magnification_auto_update"; 3964 3965 /** 3966 * Setting that specifies whether timed text (captions) should be 3967 * displayed in video content. Text display properties are controlled by 3968 * the following settings: 3969 * <ul> 3970 * <li>{@link #ACCESSIBILITY_CAPTIONING_LOCALE} 3971 * <li>{@link #ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR} 3972 * <li>{@link #ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR} 3973 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_COLOR} 3974 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_TYPE} 3975 * <li>{@link #ACCESSIBILITY_CAPTIONING_TYPEFACE} 3976 * <li>{@link #ACCESSIBILITY_CAPTIONING_FONT_SCALE} 3977 * </ul> 3978 * 3979 * @hide 3980 */ 3981 public static final String ACCESSIBILITY_CAPTIONING_ENABLED = 3982 "accessibility_captioning_enabled"; 3983 3984 /** 3985 * Setting that specifies the language for captions as a locale string, 3986 * e.g. en_US. 3987 * 3988 * @see java.util.Locale#toString 3989 * @hide 3990 */ 3991 public static final String ACCESSIBILITY_CAPTIONING_LOCALE = 3992 "accessibility_captioning_locale"; 3993 3994 /** 3995 * Integer property that specifies the preset style for captions, one 3996 * of: 3997 * <ul> 3998 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESET_CUSTOM} 3999 * <li>a valid index of {@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESETS} 4000 * </ul> 4001 * 4002 * @see java.util.Locale#toString 4003 * @hide 4004 */ 4005 public static final String ACCESSIBILITY_CAPTIONING_PRESET = 4006 "accessibility_captioning_preset"; 4007 4008 /** 4009 * Integer property that specifes the background color for captions as a 4010 * packed 32-bit color. 4011 * 4012 * @see android.graphics.Color#argb 4013 * @hide 4014 */ 4015 public static final String ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR = 4016 "accessibility_captioning_background_color"; 4017 4018 /** 4019 * Integer property that specifes the foreground color for captions as a 4020 * packed 32-bit color. 4021 * 4022 * @see android.graphics.Color#argb 4023 * @hide 4024 */ 4025 public static final String ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR = 4026 "accessibility_captioning_foreground_color"; 4027 4028 /** 4029 * Integer property that specifes the edge type for captions, one of: 4030 * <ul> 4031 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_NONE} 4032 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE} 4033 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW} 4034 * </ul> 4035 * 4036 * @see #ACCESSIBILITY_CAPTIONING_EDGE_COLOR 4037 * @hide 4038 */ 4039 public static final String ACCESSIBILITY_CAPTIONING_EDGE_TYPE = 4040 "accessibility_captioning_edge_type"; 4041 4042 /** 4043 * Integer property that specifes the edge color for captions as a 4044 * packed 32-bit color. 4045 * 4046 * @see #ACCESSIBILITY_CAPTIONING_EDGE_TYPE 4047 * @see android.graphics.Color#argb 4048 * @hide 4049 */ 4050 public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR = 4051 "accessibility_captioning_edge_color"; 4052 4053 /** 4054 * Integer property that specifes the window color for captions as a 4055 * packed 32-bit color. 4056 * 4057 * @see android.graphics.Color#argb 4058 * @hide 4059 */ 4060 public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR = 4061 "accessibility_captioning_window_color"; 4062 4063 /** 4064 * String property that specifies the typeface for captions, one of: 4065 * <ul> 4066 * <li>DEFAULT 4067 * <li>MONOSPACE 4068 * <li>SANS_SERIF 4069 * <li>SERIF 4070 * </ul> 4071 * 4072 * @see android.graphics.Typeface 4073 * @hide 4074 */ 4075 public static final String ACCESSIBILITY_CAPTIONING_TYPEFACE = 4076 "accessibility_captioning_typeface"; 4077 4078 /** 4079 * Floating point property that specifies font scaling for captions. 4080 * 4081 * @hide 4082 */ 4083 public static final String ACCESSIBILITY_CAPTIONING_FONT_SCALE = 4084 "accessibility_captioning_font_scale"; 4085 4086 /** 4087 * Setting that specifies whether display color inversion is enabled. 4088 */ 4089 public static final String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = 4090 "accessibility_display_inversion_enabled"; 4091 4092 /** 4093 * Setting that specifies whether display color space adjustment is 4094 * enabled. 4095 * 4096 * @hide 4097 */ 4098 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED = 4099 "accessibility_display_daltonizer_enabled"; 4100 4101 /** 4102 * Integer property that specifies the type of color space adjustment to 4103 * perform. Valid values are defined in AccessibilityManager. 4104 * 4105 * @hide 4106 */ 4107 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER = 4108 "accessibility_display_daltonizer"; 4109 4110 /** 4111 * The timout for considering a press to be a long press in milliseconds. 4112 * @hide 4113 */ 4114 public static final String LONG_PRESS_TIMEOUT = "long_press_timeout"; 4115 4116 /** 4117 * List of the enabled print services. 4118 * @hide 4119 */ 4120 public static final String ENABLED_PRINT_SERVICES = 4121 "enabled_print_services"; 4122 4123 /** 4124 * List of the system print services we enabled on first boot. On 4125 * first boot we enable all system, i.e. bundled print services, 4126 * once, so they work out-of-the-box. 4127 * @hide 4128 */ 4129 public static final String ENABLED_ON_FIRST_BOOT_SYSTEM_PRINT_SERVICES = 4130 "enabled_on_first_boot_system_print_services"; 4131 4132 /** 4133 * Setting to always use the default text-to-speech settings regardless 4134 * of the application settings. 4135 * 1 = override application settings, 4136 * 0 = use application settings (if specified). 4137 * 4138 * @deprecated The value of this setting is no longer respected by 4139 * the framework text to speech APIs as of the Ice Cream Sandwich release. 4140 */ 4141 @Deprecated 4142 public static final String TTS_USE_DEFAULTS = "tts_use_defaults"; 4143 4144 /** 4145 * Default text-to-speech engine speech rate. 100 = 1x 4146 */ 4147 public static final String TTS_DEFAULT_RATE = "tts_default_rate"; 4148 4149 /** 4150 * Default text-to-speech engine pitch. 100 = 1x 4151 */ 4152 public static final String TTS_DEFAULT_PITCH = "tts_default_pitch"; 4153 4154 /** 4155 * Default text-to-speech engine. 4156 */ 4157 public static final String TTS_DEFAULT_SYNTH = "tts_default_synth"; 4158 4159 /** 4160 * Default text-to-speech language. 4161 * 4162 * @deprecated this setting is no longer in use, as of the Ice Cream 4163 * Sandwich release. Apps should never need to read this setting directly, 4164 * instead can query the TextToSpeech framework classes for the default 4165 * locale. {@link TextToSpeech#getLanguage()}. 4166 */ 4167 @Deprecated 4168 public static final String TTS_DEFAULT_LANG = "tts_default_lang"; 4169 4170 /** 4171 * Default text-to-speech country. 4172 * 4173 * @deprecated this setting is no longer in use, as of the Ice Cream 4174 * Sandwich release. Apps should never need to read this setting directly, 4175 * instead can query the TextToSpeech framework classes for the default 4176 * locale. {@link TextToSpeech#getLanguage()}. 4177 */ 4178 @Deprecated 4179 public static final String TTS_DEFAULT_COUNTRY = "tts_default_country"; 4180 4181 /** 4182 * Default text-to-speech locale variant. 4183 * 4184 * @deprecated this setting is no longer in use, as of the Ice Cream 4185 * Sandwich release. Apps should never need to read this setting directly, 4186 * instead can query the TextToSpeech framework classes for the 4187 * locale that is in use {@link TextToSpeech#getLanguage()}. 4188 */ 4189 @Deprecated 4190 public static final String TTS_DEFAULT_VARIANT = "tts_default_variant"; 4191 4192 /** 4193 * Stores the default tts locales on a per engine basis. Stored as 4194 * a comma seperated list of values, each value being of the form 4195 * {@code engine_name:locale} for example, 4196 * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This 4197 * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and 4198 * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this 4199 * setting directly, and can query the TextToSpeech framework classes 4200 * for the locale that is in use. 4201 * 4202 * @hide 4203 */ 4204 public static final String TTS_DEFAULT_LOCALE = "tts_default_locale"; 4205 4206 /** 4207 * Space delimited list of plugin packages that are enabled. 4208 */ 4209 public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins"; 4210 4211 /** 4212 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} 4213 * instead. 4214 */ 4215 @Deprecated 4216 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = 4217 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; 4218 4219 /** 4220 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} 4221 * instead. 4222 */ 4223 @Deprecated 4224 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = 4225 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; 4226 4227 /** 4228 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} 4229 * instead. 4230 */ 4231 @Deprecated 4232 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = 4233 Global.WIFI_NUM_OPEN_NETWORKS_KEPT; 4234 4235 /** 4236 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} 4237 * instead. 4238 */ 4239 @Deprecated 4240 public static final String WIFI_ON = Global.WIFI_ON; 4241 4242 /** 4243 * The acceptable packet loss percentage (range 0 - 100) before trying 4244 * another AP on the same network. 4245 * @deprecated This setting is not used. 4246 */ 4247 @Deprecated 4248 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = 4249 "wifi_watchdog_acceptable_packet_loss_percentage"; 4250 4251 /** 4252 * The number of access points required for a network in order for the 4253 * watchdog to monitor it. 4254 * @deprecated This setting is not used. 4255 */ 4256 @Deprecated 4257 public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count"; 4258 4259 /** 4260 * The delay between background checks. 4261 * @deprecated This setting is not used. 4262 */ 4263 @Deprecated 4264 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = 4265 "wifi_watchdog_background_check_delay_ms"; 4266 4267 /** 4268 * Whether the Wi-Fi watchdog is enabled for background checking even 4269 * after it thinks the user has connected to a good access point. 4270 * @deprecated This setting is not used. 4271 */ 4272 @Deprecated 4273 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = 4274 "wifi_watchdog_background_check_enabled"; 4275 4276 /** 4277 * The timeout for a background ping 4278 * @deprecated This setting is not used. 4279 */ 4280 @Deprecated 4281 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = 4282 "wifi_watchdog_background_check_timeout_ms"; 4283 4284 /** 4285 * The number of initial pings to perform that *may* be ignored if they 4286 * fail. Again, if these fail, they will *not* be used in packet loss 4287 * calculation. For example, one network always seemed to time out for 4288 * the first couple pings, so this is set to 3 by default. 4289 * @deprecated This setting is not used. 4290 */ 4291 @Deprecated 4292 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = 4293 "wifi_watchdog_initial_ignored_ping_count"; 4294 4295 /** 4296 * The maximum number of access points (per network) to attempt to test. 4297 * If this number is reached, the watchdog will no longer monitor the 4298 * initial connection state for the network. This is a safeguard for 4299 * networks containing multiple APs whose DNS does not respond to pings. 4300 * @deprecated This setting is not used. 4301 */ 4302 @Deprecated 4303 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks"; 4304 4305 /** 4306 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead 4307 */ 4308 @Deprecated 4309 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; 4310 4311 /** 4312 * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled. 4313 * @deprecated This setting is not used. 4314 */ 4315 @Deprecated 4316 public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list"; 4317 4318 /** 4319 * The number of pings to test if an access point is a good connection. 4320 * @deprecated This setting is not used. 4321 */ 4322 @Deprecated 4323 public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count"; 4324 4325 /** 4326 * The delay between pings. 4327 * @deprecated This setting is not used. 4328 */ 4329 @Deprecated 4330 public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms"; 4331 4332 /** 4333 * The timeout per ping. 4334 * @deprecated This setting is not used. 4335 */ 4336 @Deprecated 4337 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms"; 4338 4339 /** 4340 * @deprecated Use 4341 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead 4342 */ 4343 @Deprecated 4344 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; 4345 4346 /** 4347 * @deprecated Use 4348 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead 4349 */ 4350 @Deprecated 4351 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = 4352 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; 4353 4354 /** 4355 * The number of milliseconds to hold on to a PendingIntent based request. This delay gives 4356 * the receivers of the PendingIntent an opportunity to make a new network request before 4357 * the Network satisfying the request is potentially removed. 4358 * 4359 * @hide 4360 */ 4361 public static final String CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS = 4362 "connectivity_release_pending_intent_delay_ms"; 4363 4364 /** 4365 * Whether background data usage is allowed. 4366 * 4367 * @deprecated As of {@link VERSION_CODES#ICE_CREAM_SANDWICH}, 4368 * availability of background data depends on several 4369 * combined factors. When background data is unavailable, 4370 * {@link ConnectivityManager#getActiveNetworkInfo()} will 4371 * now appear disconnected. 4372 */ 4373 @Deprecated 4374 public static final String BACKGROUND_DATA = "background_data"; 4375 4376 /** 4377 * Origins for which browsers should allow geolocation by default. 4378 * The value is a space-separated list of origins. 4379 */ 4380 public static final String ALLOWED_GEOLOCATION_ORIGINS 4381 = "allowed_geolocation_origins"; 4382 4383 /** 4384 * The preferred TTY mode 0 = TTy Off, CDMA default 4385 * 1 = TTY Full 4386 * 2 = TTY HCO 4387 * 3 = TTY VCO 4388 * @hide 4389 */ 4390 public static final String PREFERRED_TTY_MODE = 4391 "preferred_tty_mode"; 4392 4393 /** 4394 * Whether the enhanced voice privacy mode is enabled. 4395 * 0 = normal voice privacy 4396 * 1 = enhanced voice privacy 4397 * @hide 4398 */ 4399 public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled"; 4400 4401 /** 4402 * Whether the TTY mode mode is enabled. 4403 * 0 = disabled 4404 * 1 = enabled 4405 * @hide 4406 */ 4407 public static final String TTY_MODE_ENABLED = "tty_mode_enabled"; 4408 4409 /** 4410 * Controls whether settings backup is enabled. 4411 * Type: int ( 0 = disabled, 1 = enabled ) 4412 * @hide 4413 */ 4414 public static final String BACKUP_ENABLED = "backup_enabled"; 4415 4416 /** 4417 * Controls whether application data is automatically restored from backup 4418 * at install time. 4419 * Type: int ( 0 = disabled, 1 = enabled ) 4420 * @hide 4421 */ 4422 public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore"; 4423 4424 /** 4425 * Indicates whether settings backup has been fully provisioned. 4426 * Type: int ( 0 = unprovisioned, 1 = fully provisioned ) 4427 * @hide 4428 */ 4429 public static final String BACKUP_PROVISIONED = "backup_provisioned"; 4430 4431 /** 4432 * Component of the transport to use for backup/restore. 4433 * @hide 4434 */ 4435 public static final String BACKUP_TRANSPORT = "backup_transport"; 4436 4437 /** 4438 * Version for which the setup wizard was last shown. Bumped for 4439 * each release when there is new setup information to show. 4440 * @hide 4441 */ 4442 public static final String LAST_SETUP_SHOWN = "last_setup_shown"; 4443 4444 /** 4445 * The interval in milliseconds after which Wi-Fi is considered idle. 4446 * When idle, it is possible for the device to be switched from Wi-Fi to 4447 * the mobile data network. 4448 * @hide 4449 * @deprecated Use {@link android.provider.Settings.Global#WIFI_IDLE_MS} 4450 * instead. 4451 */ 4452 @Deprecated 4453 public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS; 4454 4455 /** 4456 * The global search provider chosen by the user (if multiple global 4457 * search providers are installed). This will be the provider returned 4458 * by {@link SearchManager#getGlobalSearchActivity()} if it's still 4459 * installed. This setting is stored as a flattened component name as 4460 * per {@link ComponentName#flattenToString()}. 4461 * 4462 * @hide 4463 */ 4464 public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY = 4465 "search_global_search_activity"; 4466 4467 /** 4468 * The number of promoted sources in GlobalSearch. 4469 * @hide 4470 */ 4471 public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources"; 4472 /** 4473 * The maximum number of suggestions returned by GlobalSearch. 4474 * @hide 4475 */ 4476 public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display"; 4477 /** 4478 * The number of suggestions GlobalSearch will ask each non-web search source for. 4479 * @hide 4480 */ 4481 public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source"; 4482 /** 4483 * The number of suggestions the GlobalSearch will ask the web search source for. 4484 * @hide 4485 */ 4486 public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT = 4487 "search_web_results_override_limit"; 4488 /** 4489 * The number of milliseconds that GlobalSearch will wait for suggestions from 4490 * promoted sources before continuing with all other sources. 4491 * @hide 4492 */ 4493 public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS = 4494 "search_promoted_source_deadline_millis"; 4495 /** 4496 * The number of milliseconds before GlobalSearch aborts search suggesiton queries. 4497 * @hide 4498 */ 4499 public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis"; 4500 /** 4501 * The maximum number of milliseconds that GlobalSearch shows the previous results 4502 * after receiving a new query. 4503 * @hide 4504 */ 4505 public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis"; 4506 /** 4507 * The maximum age of log data used for shortcuts in GlobalSearch. 4508 * @hide 4509 */ 4510 public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis"; 4511 /** 4512 * The maximum age of log data used for source ranking in GlobalSearch. 4513 * @hide 4514 */ 4515 public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS = 4516 "search_max_source_event_age_millis"; 4517 /** 4518 * The minimum number of impressions needed to rank a source in GlobalSearch. 4519 * @hide 4520 */ 4521 public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING = 4522 "search_min_impressions_for_source_ranking"; 4523 /** 4524 * The minimum number of clicks needed to rank a source in GlobalSearch. 4525 * @hide 4526 */ 4527 public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING = 4528 "search_min_clicks_for_source_ranking"; 4529 /** 4530 * The maximum number of shortcuts shown by GlobalSearch. 4531 * @hide 4532 */ 4533 public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned"; 4534 /** 4535 * The size of the core thread pool for suggestion queries in GlobalSearch. 4536 * @hide 4537 */ 4538 public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE = 4539 "search_query_thread_core_pool_size"; 4540 /** 4541 * The maximum size of the thread pool for suggestion queries in GlobalSearch. 4542 * @hide 4543 */ 4544 public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE = 4545 "search_query_thread_max_pool_size"; 4546 /** 4547 * The size of the core thread pool for shortcut refreshing in GlobalSearch. 4548 * @hide 4549 */ 4550 public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE = 4551 "search_shortcut_refresh_core_pool_size"; 4552 /** 4553 * The maximum size of the thread pool for shortcut refreshing in GlobalSearch. 4554 * @hide 4555 */ 4556 public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE = 4557 "search_shortcut_refresh_max_pool_size"; 4558 /** 4559 * The maximun time that excess threads in the GlobalSeach thread pools will 4560 * wait before terminating. 4561 * @hide 4562 */ 4563 public static final String SEARCH_THREAD_KEEPALIVE_SECONDS = 4564 "search_thread_keepalive_seconds"; 4565 /** 4566 * The maximum number of concurrent suggestion queries to each source. 4567 * @hide 4568 */ 4569 public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT = 4570 "search_per_source_concurrent_query_limit"; 4571 4572 /** 4573 * Whether or not alert sounds are played on MountService events. (0 = false, 1 = true) 4574 * @hide 4575 */ 4576 public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd"; 4577 4578 /** 4579 * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true) 4580 * @hide 4581 */ 4582 public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart"; 4583 4584 /** 4585 * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true) 4586 * @hide 4587 */ 4588 public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt"; 4589 4590 /** 4591 * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true) 4592 * @hide 4593 */ 4594 public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled"; 4595 4596 /** 4597 * If nonzero, ANRs in invisible background processes bring up a dialog. 4598 * Otherwise, the process will be silently killed. 4599 * @hide 4600 */ 4601 public static final String ANR_SHOW_BACKGROUND = "anr_show_background"; 4602 4603 /** 4604 * The {@link ComponentName} string of the service to be used as the voice recognition 4605 * service. 4606 * 4607 * @hide 4608 */ 4609 public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service"; 4610 4611 /** 4612 * Stores whether an user has consented to have apps verified through PAM. 4613 * The value is boolean (1 or 0). 4614 * 4615 * @hide 4616 */ 4617 public static final String PACKAGE_VERIFIER_USER_CONSENT = 4618 "package_verifier_user_consent"; 4619 4620 /** 4621 * The {@link ComponentName} string of the selected spell checker service which is 4622 * one of the services managed by the text service manager. 4623 * 4624 * @hide 4625 */ 4626 public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker"; 4627 4628 /** 4629 * The {@link ComponentName} string of the selected subtype of the selected spell checker 4630 * service which is one of the services managed by the text service manager. 4631 * 4632 * @hide 4633 */ 4634 public static final String SELECTED_SPELL_CHECKER_SUBTYPE = 4635 "selected_spell_checker_subtype"; 4636 4637 /** 4638 * The {@link ComponentName} string whether spell checker is enabled or not. 4639 * 4640 * @hide 4641 */ 4642 public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled"; 4643 4644 /** 4645 * What happens when the user presses the Power button while in-call 4646 * and the screen is on.<br/> 4647 * <b>Values:</b><br/> 4648 * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/> 4649 * 2 - The Power button hangs up the current call.<br/> 4650 * 4651 * @hide 4652 */ 4653 public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior"; 4654 4655 /** 4656 * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen". 4657 * @hide 4658 */ 4659 public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1; 4660 4661 /** 4662 * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up". 4663 * @hide 4664 */ 4665 public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2; 4666 4667 /** 4668 * INCALL_POWER_BUTTON_BEHAVIOR default value. 4669 * @hide 4670 */ 4671 public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT = 4672 INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF; 4673 4674 /** 4675 * Whether the device should wake when the wake gesture sensor detects motion. 4676 * @hide 4677 */ 4678 public static final String WAKE_GESTURE_ENABLED = "wake_gesture_enabled"; 4679 4680 /** 4681 * Whether the device should doze if configured. 4682 * @hide 4683 */ 4684 public static final String DOZE_ENABLED = "doze_enabled"; 4685 4686 /** 4687 * The current night mode that has been selected by the user. Owned 4688 * and controlled by UiModeManagerService. Constants are as per 4689 * UiModeManager. 4690 * @hide 4691 */ 4692 public static final String UI_NIGHT_MODE = "ui_night_mode"; 4693 4694 /** 4695 * Whether screensavers are enabled. 4696 * @hide 4697 */ 4698 public static final String SCREENSAVER_ENABLED = "screensaver_enabled"; 4699 4700 /** 4701 * The user's chosen screensaver components. 4702 * 4703 * These will be launched by the PhoneWindowManager after a timeout when not on 4704 * battery, or upon dock insertion (if SCREENSAVER_ACTIVATE_ON_DOCK is set to 1). 4705 * @hide 4706 */ 4707 public static final String SCREENSAVER_COMPONENTS = "screensaver_components"; 4708 4709 /** 4710 * If screensavers are enabled, whether the screensaver should be automatically launched 4711 * when the device is inserted into a (desk) dock. 4712 * @hide 4713 */ 4714 public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock"; 4715 4716 /** 4717 * If screensavers are enabled, whether the screensaver should be automatically launched 4718 * when the screen times out when not on battery. 4719 * @hide 4720 */ 4721 public static final String SCREENSAVER_ACTIVATE_ON_SLEEP = "screensaver_activate_on_sleep"; 4722 4723 /** 4724 * If screensavers are enabled, the default screensaver component. 4725 * @hide 4726 */ 4727 public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component"; 4728 4729 /** 4730 * The default NFC payment component 4731 * @hide 4732 */ 4733 public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component"; 4734 4735 /** 4736 * Whether NFC payment is handled by the foreground application or a default. 4737 * @hide 4738 */ 4739 public static final String NFC_PAYMENT_FOREGROUND = "nfc_payment_foreground"; 4740 4741 /** 4742 * Specifies the package name currently configured to be the primary sms application 4743 * @hide 4744 */ 4745 public static final String SMS_DEFAULT_APPLICATION = "sms_default_application"; 4746 4747 /** 4748 * Names of the packages that the current user has explicitly allowed to 4749 * see all of the user's notifications, separated by ':'. 4750 * 4751 * @hide 4752 */ 4753 public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners"; 4754 4755 /** 4756 * @hide 4757 */ 4758 public static final String ENABLED_CONDITION_PROVIDERS = "enabled_condition_providers"; 4759 4760 /** @hide */ 4761 public static final String BAR_SERVICE_COMPONENT = "bar_service_component"; 4762 4763 /** @hide */ 4764 public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations"; 4765 4766 /** 4767 * This is the query URI for finding a print service to install. 4768 * 4769 * @hide 4770 */ 4771 public static final String PRINT_SERVICE_SEARCH_URI = "print_service_search_uri"; 4772 4773 /** 4774 * This is the query URI for finding a NFC payment service to install. 4775 * 4776 * @hide 4777 */ 4778 public static final String PAYMENT_SERVICE_SEARCH_URI = "payment_service_search_uri"; 4779 4780 /** 4781 * If enabled, apps should try to skip any introductory hints on first launch. This might 4782 * apply to users that are already familiar with the environment or temporary users. 4783 * <p> 4784 * Type : int (0 to show hints, 1 to skip showing hints) 4785 */ 4786 public static final String SKIP_FIRST_USE_HINTS = "skip_first_use_hints"; 4787 4788 /** 4789 * Persisted playback time after a user confirmation of an unsafe volume level. 4790 * 4791 * @hide 4792 */ 4793 public static final String UNSAFE_VOLUME_MUSIC_ACTIVE_MS = "unsafe_volume_music_active_ms"; 4794 4795 /** 4796 * This preference enables notification display on the lockscreen. 4797 * @hide 4798 */ 4799 public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = 4800 "lock_screen_show_notifications"; 4801 4802 /** 4803 * List of TV inputs that are currently hidden. This is a string 4804 * containing the IDs of all hidden TV inputs. Each ID is encoded by 4805 * {@link android.net.Uri#encode(String)} and separated by ':'. 4806 * @hide 4807 */ 4808 public static final String TV_INPUT_HIDDEN_INPUTS = "tv_input_hidden_inputs"; 4809 4810 /** 4811 * List of custom TV input labels. This is a string containing <TV input id, custom name> 4812 * pairs. TV input id and custom name are encoded by {@link android.net.Uri#encode(String)} 4813 * and separated by ','. Each pair is separated by ':'. 4814 * @hide 4815 */ 4816 public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels"; 4817 4818 /** 4819 * Whether automatic routing of system audio to USB audio peripheral is disabled. 4820 * The value is boolean (1 or 0), where 1 means automatic routing is disabled, 4821 * and 0 means automatic routing is enabled. 4822 * 4823 * @hide 4824 */ 4825 public static final String USB_AUDIO_AUTOMATIC_ROUTING_DISABLED = 4826 "usb_audio_automatic_routing_disabled"; 4827 4828 /** 4829 * The timeout in milliseconds before the device fully goes to sleep after 4830 * a period of inactivity. This value sets an upper bound on how long the device 4831 * will stay awake or dreaming without user activity. It should generally 4832 * be longer than {@link Settings.System#SCREEN_OFF_TIMEOUT} as otherwise the device 4833 * will sleep before it ever has a chance to dream. 4834 * <p> 4835 * Use -1 to disable this timeout. 4836 * </p> 4837 * 4838 * @hide 4839 */ 4840 public static final String SLEEP_TIMEOUT = "sleep_timeout"; 4841 4842 /** 4843 * This are the settings to be backed up. 4844 * 4845 * NOTE: Settings are backed up and restored in the order they appear 4846 * in this array. If you have one setting depending on another, 4847 * make sure that they are ordered appropriately. 4848 * 4849 * @hide 4850 */ 4851 public static final String[] SETTINGS_TO_BACKUP = { 4852 BUGREPORT_IN_POWER_MENU, // moved to global 4853 ALLOW_MOCK_LOCATION, 4854 PARENTAL_CONTROL_ENABLED, 4855 PARENTAL_CONTROL_REDIRECT_URL, 4856 USB_MASS_STORAGE_ENABLED, // moved to global 4857 ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, 4858 ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE, 4859 ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE, 4860 ACCESSIBILITY_SCRIPT_INJECTION, 4861 BACKUP_AUTO_RESTORE, 4862 ENABLED_ACCESSIBILITY_SERVICES, 4863 TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES, 4864 TOUCH_EXPLORATION_ENABLED, 4865 ACCESSIBILITY_ENABLED, 4866 ACCESSIBILITY_SPEAK_PASSWORD, 4867 ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED, 4868 ACCESSIBILITY_CAPTIONING_ENABLED, 4869 ACCESSIBILITY_CAPTIONING_LOCALE, 4870 ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR, 4871 ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR, 4872 ACCESSIBILITY_CAPTIONING_EDGE_TYPE, 4873 ACCESSIBILITY_CAPTIONING_EDGE_COLOR, 4874 ACCESSIBILITY_CAPTIONING_TYPEFACE, 4875 ACCESSIBILITY_CAPTIONING_FONT_SCALE, 4876 TTS_USE_DEFAULTS, 4877 TTS_DEFAULT_RATE, 4878 TTS_DEFAULT_PITCH, 4879 TTS_DEFAULT_SYNTH, 4880 TTS_DEFAULT_LANG, 4881 TTS_DEFAULT_COUNTRY, 4882 TTS_ENABLED_PLUGINS, 4883 TTS_DEFAULT_LOCALE, 4884 WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, // moved to global 4885 WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, // moved to global 4886 WIFI_NUM_OPEN_NETWORKS_KEPT, // moved to global 4887 MOUNT_PLAY_NOTIFICATION_SND, 4888 MOUNT_UMS_AUTOSTART, 4889 MOUNT_UMS_PROMPT, 4890 MOUNT_UMS_NOTIFY_ENABLED, 4891 UI_NIGHT_MODE, 4892 SLEEP_TIMEOUT 4893 }; 4894 4895 /** 4896 * These entries are considered common between the personal and the managed profile, 4897 * since the managed profile doesn't get to change them. 4898 * @hide 4899 */ 4900 public static final String[] CLONE_TO_MANAGED_PROFILE = { 4901 ACCESSIBILITY_ENABLED, 4902 ALLOW_MOCK_LOCATION, 4903 ALLOWED_GEOLOCATION_ORIGINS, 4904 DEFAULT_INPUT_METHOD, 4905 ENABLED_ACCESSIBILITY_SERVICES, 4906 ENABLED_INPUT_METHODS, 4907 LOCATION_MODE, 4908 LOCATION_PROVIDERS_ALLOWED, 4909 LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 4910 SELECTED_INPUT_METHOD_SUBTYPE, 4911 SELECTED_SPELL_CHECKER, 4912 SELECTED_SPELL_CHECKER_SUBTYPE 4913 }; 4914 4915 /** 4916 * Helper method for determining if a location provider is enabled. 4917 * 4918 * @param cr the content resolver to use 4919 * @param provider the location provider to query 4920 * @return true if the provider is enabled 4921 * 4922 * @deprecated use {@link #LOCATION_MODE} or 4923 * {@link LocationManager#isProviderEnabled(String)} 4924 */ 4925 @Deprecated 4926 public static final boolean isLocationProviderEnabled(ContentResolver cr, String provider) { 4927 return isLocationProviderEnabledForUser(cr, provider, UserHandle.myUserId()); 4928 } 4929 4930 /** 4931 * Helper method for determining if a location provider is enabled. 4932 * @param cr the content resolver to use 4933 * @param provider the location provider to query 4934 * @param userId the userId to query 4935 * @return true if the provider is enabled 4936 * @deprecated use {@link #LOCATION_MODE} or 4937 * {@link LocationManager#isProviderEnabled(String)} 4938 * @hide 4939 */ 4940 @Deprecated 4941 public static final boolean isLocationProviderEnabledForUser(ContentResolver cr, String provider, int userId) { 4942 String allowedProviders = Settings.Secure.getStringForUser(cr, 4943 LOCATION_PROVIDERS_ALLOWED, userId); 4944 return TextUtils.delimitedStringContains(allowedProviders, ',', provider); 4945 } 4946 4947 /** 4948 * Thread-safe method for enabling or disabling a single location provider. 4949 * @param cr the content resolver to use 4950 * @param provider the location provider to enable or disable 4951 * @param enabled true if the provider should be enabled 4952 * @deprecated use {@link #putInt(ContentResolver, String, int)} and {@link #LOCATION_MODE} 4953 */ 4954 @Deprecated 4955 public static final void setLocationProviderEnabled(ContentResolver cr, 4956 String provider, boolean enabled) { 4957 setLocationProviderEnabledForUser(cr, provider, enabled, UserHandle.myUserId()); 4958 } 4959 4960 /** 4961 * Thread-safe method for enabling or disabling a single location provider. 4962 * 4963 * @param cr the content resolver to use 4964 * @param provider the location provider to enable or disable 4965 * @param enabled true if the provider should be enabled 4966 * @param userId the userId for which to enable/disable providers 4967 * @return true if the value was set, false on database errors 4968 * @deprecated use {@link #putIntForUser(ContentResolver, String, int, int)} and 4969 * {@link #LOCATION_MODE} 4970 * @hide 4971 */ 4972 @Deprecated 4973 public static final boolean setLocationProviderEnabledForUser(ContentResolver cr, 4974 String provider, boolean enabled, int userId) { 4975 synchronized (mLocationSettingsLock) { 4976 // to ensure thread safety, we write the provider name with a '+' or '-' 4977 // and let the SettingsProvider handle it rather than reading and modifying 4978 // the list of enabled providers. 4979 if (enabled) { 4980 provider = "+" + provider; 4981 } else { 4982 provider = "-" + provider; 4983 } 4984 return putStringForUser(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider, 4985 userId); 4986 } 4987 } 4988 4989 /** 4990 * Thread-safe method for setting the location mode to one of 4991 * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, 4992 * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. 4993 * 4994 * @param cr the content resolver to use 4995 * @param mode such as {@link #LOCATION_MODE_HIGH_ACCURACY} 4996 * @param userId the userId for which to change mode 4997 * @return true if the value was set, false on database errors 4998 * 4999 * @throws IllegalArgumentException if mode is not one of the supported values 5000 */ 5001 private static final boolean setLocationModeForUser(ContentResolver cr, int mode, 5002 int userId) { 5003 synchronized (mLocationSettingsLock) { 5004 boolean gps = false; 5005 boolean network = false; 5006 switch (mode) { 5007 case LOCATION_MODE_OFF: 5008 break; 5009 case LOCATION_MODE_SENSORS_ONLY: 5010 gps = true; 5011 break; 5012 case LOCATION_MODE_BATTERY_SAVING: 5013 network = true; 5014 break; 5015 case LOCATION_MODE_HIGH_ACCURACY: 5016 gps = true; 5017 network = true; 5018 break; 5019 default: 5020 throw new IllegalArgumentException("Invalid location mode: " + mode); 5021 } 5022 // Note it's important that we set the NLP mode first. The Google implementation 5023 // of NLP clears its NLP consent setting any time it receives a 5024 // LocationManager.PROVIDERS_CHANGED_ACTION broadcast and NLP is disabled. Also, 5025 // it shows an NLP consent dialog any time it receives the broadcast, NLP is 5026 // enabled, and the NLP consent is not set. If 1) we were to enable GPS first, 5027 // 2) a setup wizard has its own NLP consent UI that sets the NLP consent setting, 5028 // and 3) the receiver happened to complete before we enabled NLP, then the Google 5029 // NLP would detect the attempt to enable NLP and show a redundant NLP consent 5030 // dialog. Then the people who wrote the setup wizard would be sad. 5031 boolean nlpSuccess = Settings.Secure.setLocationProviderEnabledForUser( 5032 cr, LocationManager.NETWORK_PROVIDER, network, userId); 5033 boolean gpsSuccess = Settings.Secure.setLocationProviderEnabledForUser( 5034 cr, LocationManager.GPS_PROVIDER, gps, userId); 5035 return gpsSuccess && nlpSuccess; 5036 } 5037 } 5038 5039 /** 5040 * Thread-safe method for reading the location mode, returns one of 5041 * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, 5042 * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. 5043 * 5044 * @param cr the content resolver to use 5045 * @param userId the userId for which to read the mode 5046 * @return the location mode 5047 */ 5048 private static final int getLocationModeForUser(ContentResolver cr, int userId) { 5049 synchronized (mLocationSettingsLock) { 5050 boolean gpsEnabled = Settings.Secure.isLocationProviderEnabledForUser( 5051 cr, LocationManager.GPS_PROVIDER, userId); 5052 boolean networkEnabled = Settings.Secure.isLocationProviderEnabledForUser( 5053 cr, LocationManager.NETWORK_PROVIDER, userId); 5054 if (gpsEnabled && networkEnabled) { 5055 return LOCATION_MODE_HIGH_ACCURACY; 5056 } else if (gpsEnabled) { 5057 return LOCATION_MODE_SENSORS_ONLY; 5058 } else if (networkEnabled) { 5059 return LOCATION_MODE_BATTERY_SAVING; 5060 } else { 5061 return LOCATION_MODE_OFF; 5062 } 5063 } 5064 } 5065 } 5066 5067 /** 5068 * Global system settings, containing preferences that always apply identically 5069 * to all defined users. Applications can read these but are not allowed to write; 5070 * like the "Secure" settings, these are for preferences that the user must 5071 * explicitly modify through the system UI or specialized APIs for those values. 5072 */ 5073 public static final class Global extends NameValueTable { 5074 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_global_version"; 5075 5076 /** 5077 * The content:// style URL for global secure settings items. Not public. 5078 */ 5079 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global"); 5080 5081 /** 5082 * Whether users are allowed to add more users or guest from lockscreen. 5083 * <p> 5084 * Type: int 5085 * @hide 5086 */ 5087 public static final String ADD_USERS_WHEN_LOCKED = "add_users_when_locked"; 5088 5089 /** 5090 * Setting whether the global gesture for enabling accessibility is enabled. 5091 * If this gesture is enabled the user will be able to perfrom it to enable 5092 * the accessibility state without visiting the settings app. 5093 * @hide 5094 */ 5095 public static final String ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED = 5096 "enable_accessibility_global_gesture_enabled"; 5097 5098 /** 5099 * Whether Airplane Mode is on. 5100 */ 5101 public static final String AIRPLANE_MODE_ON = "airplane_mode_on"; 5102 5103 /** 5104 * Whether Theater Mode is on. 5105 * {@hide} 5106 */ 5107 public static final String THEATER_MODE_ON = "theater_mode_on"; 5108 5109 /** 5110 * Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio. 5111 */ 5112 public static final String RADIO_BLUETOOTH = "bluetooth"; 5113 5114 /** 5115 * Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio. 5116 */ 5117 public static final String RADIO_WIFI = "wifi"; 5118 5119 /** 5120 * {@hide} 5121 */ 5122 public static final String RADIO_WIMAX = "wimax"; 5123 /** 5124 * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio. 5125 */ 5126 public static final String RADIO_CELL = "cell"; 5127 5128 /** 5129 * Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio. 5130 */ 5131 public static final String RADIO_NFC = "nfc"; 5132 5133 /** 5134 * A comma separated list of radios that need to be disabled when airplane mode 5135 * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are 5136 * included in the comma separated list. 5137 */ 5138 public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; 5139 5140 /** 5141 * A comma separated list of radios that should to be disabled when airplane mode 5142 * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is 5143 * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi 5144 * will be turned off when entering airplane mode, but the user will be able to reenable 5145 * Wifi in the Settings app. 5146 * 5147 * {@hide} 5148 */ 5149 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios"; 5150 5151 /** 5152 * The policy for deciding when Wi-Fi should go to sleep (which will in 5153 * turn switch to using the mobile data as an Internet connection). 5154 * <p> 5155 * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT}, 5156 * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or 5157 * {@link #WIFI_SLEEP_POLICY_NEVER}. 5158 */ 5159 public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy"; 5160 5161 /** 5162 * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep 5163 * policy, which is to sleep shortly after the turning off 5164 * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting. 5165 */ 5166 public static final int WIFI_SLEEP_POLICY_DEFAULT = 0; 5167 5168 /** 5169 * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when 5170 * the device is on battery, and never go to sleep when the device is 5171 * plugged in. 5172 */ 5173 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; 5174 5175 /** 5176 * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep. 5177 */ 5178 public static final int WIFI_SLEEP_POLICY_NEVER = 2; 5179 5180 /** 5181 * Value to specify if the user prefers the date, time and time zone 5182 * to be automatically fetched from the network (NITZ). 1=yes, 0=no 5183 */ 5184 public static final String AUTO_TIME = "auto_time"; 5185 5186 /** 5187 * Value to specify if the user prefers the time zone 5188 * to be automatically fetched from the network (NITZ). 1=yes, 0=no 5189 */ 5190 public static final String AUTO_TIME_ZONE = "auto_time_zone"; 5191 5192 /** 5193 * URI for the car dock "in" event sound. 5194 * @hide 5195 */ 5196 public static final String CAR_DOCK_SOUND = "car_dock_sound"; 5197 5198 /** 5199 * URI for the car dock "out" event sound. 5200 * @hide 5201 */ 5202 public static final String CAR_UNDOCK_SOUND = "car_undock_sound"; 5203 5204 /** 5205 * URI for the desk dock "in" event sound. 5206 * @hide 5207 */ 5208 public static final String DESK_DOCK_SOUND = "desk_dock_sound"; 5209 5210 /** 5211 * URI for the desk dock "out" event sound. 5212 * @hide 5213 */ 5214 public static final String DESK_UNDOCK_SOUND = "desk_undock_sound"; 5215 5216 /** 5217 * Whether to play a sound for dock events. 5218 * @hide 5219 */ 5220 public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled"; 5221 5222 /** 5223 * URI for the "device locked" (keyguard shown) sound. 5224 * @hide 5225 */ 5226 public static final String LOCK_SOUND = "lock_sound"; 5227 5228 /** 5229 * URI for the "device unlocked" sound. 5230 * @hide 5231 */ 5232 public static final String UNLOCK_SOUND = "unlock_sound"; 5233 5234 /** 5235 * URI for the "device is trusted" sound, which is played when the device enters the trusted 5236 * state without unlocking. 5237 * @hide 5238 */ 5239 public static final String TRUSTED_SOUND = "trusted_sound"; 5240 5241 /** 5242 * URI for the low battery sound file. 5243 * @hide 5244 */ 5245 public static final String LOW_BATTERY_SOUND = "low_battery_sound"; 5246 5247 /** 5248 * Whether to play a sound for low-battery alerts. 5249 * @hide 5250 */ 5251 public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled"; 5252 5253 /** 5254 * URI for the "wireless charging started" sound. 5255 * @hide 5256 */ 5257 public static final String WIRELESS_CHARGING_STARTED_SOUND = 5258 "wireless_charging_started_sound"; 5259 5260 /** 5261 * Whether we keep the device on while the device is plugged in. 5262 * Supported values are: 5263 * <ul> 5264 * <li>{@code 0} to never stay on while plugged in</li> 5265 * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li> 5266 * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li> 5267 * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li> 5268 * </ul> 5269 * These values can be OR-ed together. 5270 */ 5271 public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; 5272 5273 /** 5274 * When the user has enable the option to have a "bug report" command 5275 * in the power menu. 5276 * @hide 5277 */ 5278 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; 5279 5280 /** 5281 * Whether ADB is enabled. 5282 */ 5283 public static final String ADB_ENABLED = "adb_enabled"; 5284 5285 /** 5286 * Whether Views are allowed to save their attribute data. 5287 * @hide 5288 */ 5289 public static final String DEBUG_VIEW_ATTRIBUTES = "debug_view_attributes"; 5290 5291 /** 5292 * Whether assisted GPS should be enabled or not. 5293 * @hide 5294 */ 5295 public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled"; 5296 5297 /** 5298 * Whether bluetooth is enabled/disabled 5299 * 0=disabled. 1=enabled. 5300 */ 5301 public static final String BLUETOOTH_ON = "bluetooth_on"; 5302 5303 /** 5304 * CDMA Cell Broadcast SMS 5305 * 0 = CDMA Cell Broadcast SMS disabled 5306 * 1 = CDMA Cell Broadcast SMS enabled 5307 * @hide 5308 */ 5309 public static final String CDMA_CELL_BROADCAST_SMS = 5310 "cdma_cell_broadcast_sms"; 5311 5312 /** 5313 * The CDMA roaming mode 0 = Home Networks, CDMA default 5314 * 1 = Roaming on Affiliated networks 5315 * 2 = Roaming on any networks 5316 * @hide 5317 */ 5318 public static final String CDMA_ROAMING_MODE = "roaming_settings"; 5319 5320 /** 5321 * The CDMA subscription mode 0 = RUIM/SIM (default) 5322 * 1 = NV 5323 * @hide 5324 */ 5325 public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode"; 5326 5327 /** Inactivity timeout to track mobile data activity. 5328 * 5329 * If set to a positive integer, it indicates the inactivity timeout value in seconds to 5330 * infer the data activity of mobile network. After a period of no activity on mobile 5331 * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE} 5332 * intent is fired to indicate a transition of network status from "active" to "idle". Any 5333 * subsequent activity on mobile networks triggers the firing of {@code 5334 * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active". 5335 * 5336 * Network activity refers to transmitting or receiving data on the network interfaces. 5337 * 5338 * Tracking is disabled if set to zero or negative value. 5339 * 5340 * @hide 5341 */ 5342 public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile"; 5343 5344 /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE} 5345 * but for Wifi network. 5346 * @hide 5347 */ 5348 public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi"; 5349 5350 /** 5351 * Whether or not data roaming is enabled. (0 = false, 1 = true) 5352 */ 5353 public static final String DATA_ROAMING = "data_roaming"; 5354 5355 /** 5356 * The value passed to a Mobile DataConnection via bringUp which defines the 5357 * number of retries to preform when setting up the initial connection. The default 5358 * value defined in DataConnectionTrackerBase#DEFAULT_MDC_INITIAL_RETRY is currently 1. 5359 * @hide 5360 */ 5361 public static final String MDC_INITIAL_MAX_RETRY = "mdc_initial_max_retry"; 5362 5363 /** 5364 * Whether user has enabled development settings. 5365 */ 5366 public static final String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled"; 5367 5368 /** 5369 * Whether the device has been provisioned (0 = false, 1 = true) 5370 */ 5371 public static final String DEVICE_PROVISIONED = "device_provisioned"; 5372 5373 /** 5374 * The saved value for WindowManagerService.setForcedDisplayDensity(). 5375 * One integer in dpi. If unset, then use the real display density. 5376 * @hide 5377 */ 5378 public static final String DISPLAY_DENSITY_FORCED = "display_density_forced"; 5379 5380 /** 5381 * The saved value for WindowManagerService.setForcedDisplaySize(). 5382 * Two integers separated by a comma. If unset, then use the real display size. 5383 * @hide 5384 */ 5385 public static final String DISPLAY_SIZE_FORCED = "display_size_forced"; 5386 5387 /** 5388 * The maximum size, in bytes, of a download that the download manager will transfer over 5389 * a non-wifi connection. 5390 * @hide 5391 */ 5392 public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE = 5393 "download_manager_max_bytes_over_mobile"; 5394 5395 /** 5396 * The recommended maximum size, in bytes, of a download that the download manager should 5397 * transfer over a non-wifi connection. Over this size, the use will be warned, but will 5398 * have the option to start the download over the mobile connection anyway. 5399 * @hide 5400 */ 5401 public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE = 5402 "download_manager_recommended_max_bytes_over_mobile"; 5403 5404 /** 5405 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead 5406 */ 5407 @Deprecated 5408 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; 5409 5410 /** 5411 * Whether HDMI control shall be enabled. If disabled, no CEC/MHL command will be 5412 * sent or processed. (0 = false, 1 = true) 5413 * @hide 5414 */ 5415 public static final String HDMI_CONTROL_ENABLED = "hdmi_control_enabled"; 5416 5417 /** 5418 * Whether HDMI system audio is enabled. If enabled, TV internal speaker is muted, 5419 * and the output is redirected to AV Receiver connected via 5420 * {@Global#HDMI_SYSTEM_AUDIO_OUTPUT}. 5421 * @hide 5422 */ 5423 public static final String HDMI_SYSTEM_AUDIO_ENABLED = "hdmi_system_audio_enabled"; 5424 5425 /** 5426 * Whether TV will automatically turn on upon reception of the CEC command 5427 * <Text View On> or <Image View On>. (0 = false, 1 = true) 5428 * @hide 5429 */ 5430 public static final String HDMI_CONTROL_AUTO_WAKEUP_ENABLED = 5431 "hdmi_control_auto_wakeup_enabled"; 5432 5433 /** 5434 * Whether TV will also turn off other CEC devices when it goes to standby mode. 5435 * (0 = false, 1 = true) 5436 * @hide 5437 */ 5438 public static final String HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED = 5439 "hdmi_control_auto_device_off_enabled"; 5440 5441 /** 5442 * Whether TV will switch to MHL port when a mobile device is plugged in. 5443 * (0 = false, 1 = true) 5444 * @hide 5445 */ 5446 public static final String MHL_INPUT_SWITCHING_ENABLED = "mhl_input_switching_enabled"; 5447 5448 /** 5449 * Whether TV will charge the mobile device connected at MHL port. (0 = false, 1 = true) 5450 * @hide 5451 */ 5452 public static final String MHL_POWER_CHARGE_ENABLED = "mhl_power_charge_enabled"; 5453 5454 /** 5455 * Whether mobile data connections are allowed by the user. See 5456 * ConnectivityManager for more info. 5457 * @hide 5458 */ 5459 public static final String MOBILE_DATA = "mobile_data"; 5460 5461 /** {@hide} */ 5462 public static final String NETSTATS_ENABLED = "netstats_enabled"; 5463 /** {@hide} */ 5464 public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval"; 5465 /** {@hide} */ 5466 public static final String NETSTATS_TIME_CACHE_MAX_AGE = "netstats_time_cache_max_age"; 5467 /** {@hide} */ 5468 public static final String NETSTATS_GLOBAL_ALERT_BYTES = "netstats_global_alert_bytes"; 5469 /** {@hide} */ 5470 public static final String NETSTATS_SAMPLE_ENABLED = "netstats_sample_enabled"; 5471 5472 /** {@hide} */ 5473 public static final String NETSTATS_DEV_BUCKET_DURATION = "netstats_dev_bucket_duration"; 5474 /** {@hide} */ 5475 public static final String NETSTATS_DEV_PERSIST_BYTES = "netstats_dev_persist_bytes"; 5476 /** {@hide} */ 5477 public static final String NETSTATS_DEV_ROTATE_AGE = "netstats_dev_rotate_age"; 5478 /** {@hide} */ 5479 public static final String NETSTATS_DEV_DELETE_AGE = "netstats_dev_delete_age"; 5480 5481 /** {@hide} */ 5482 public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration"; 5483 /** {@hide} */ 5484 public static final String NETSTATS_UID_PERSIST_BYTES = "netstats_uid_persist_bytes"; 5485 /** {@hide} */ 5486 public static final String NETSTATS_UID_ROTATE_AGE = "netstats_uid_rotate_age"; 5487 /** {@hide} */ 5488 public static final String NETSTATS_UID_DELETE_AGE = "netstats_uid_delete_age"; 5489 5490 /** {@hide} */ 5491 public static final String NETSTATS_UID_TAG_BUCKET_DURATION = "netstats_uid_tag_bucket_duration"; 5492 /** {@hide} */ 5493 public static final String NETSTATS_UID_TAG_PERSIST_BYTES = "netstats_uid_tag_persist_bytes"; 5494 /** {@hide} */ 5495 public static final String NETSTATS_UID_TAG_ROTATE_AGE = "netstats_uid_tag_rotate_age"; 5496 /** {@hide} */ 5497 public static final String NETSTATS_UID_TAG_DELETE_AGE = "netstats_uid_tag_delete_age"; 5498 5499 /** 5500 * User preference for which network(s) should be used. Only the 5501 * connectivity service should touch this. 5502 */ 5503 public static final String NETWORK_PREFERENCE = "network_preference"; 5504 5505 /** 5506 * Which package name to use for network scoring. If null, or if the package is not a valid 5507 * scorer app, external network scores will neither be requested nor accepted. 5508 * @hide 5509 */ 5510 public static final String NETWORK_SCORER_APP = "network_scorer_app"; 5511 5512 /** 5513 * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment 5514 * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been 5515 * exceeded. 5516 * @hide 5517 */ 5518 public static final String NITZ_UPDATE_DIFF = "nitz_update_diff"; 5519 5520 /** 5521 * The length of time in milli-seconds that automatic small adjustments to 5522 * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded. 5523 * @hide 5524 */ 5525 public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing"; 5526 5527 /** Preferred NTP server. {@hide} */ 5528 public static final String NTP_SERVER = "ntp_server"; 5529 /** Timeout in milliseconds to wait for NTP server. {@hide} */ 5530 public static final String NTP_TIMEOUT = "ntp_timeout"; 5531 5532 /** 5533 * Whether the package manager should send package verification broadcasts for verifiers to 5534 * review apps prior to installation. 5535 * 1 = request apps to be verified prior to installation, if a verifier exists. 5536 * 0 = do not verify apps before installation 5537 * @hide 5538 */ 5539 public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable"; 5540 5541 /** Timeout for package verification. 5542 * @hide */ 5543 public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout"; 5544 5545 /** Default response code for package verification. 5546 * @hide */ 5547 public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response"; 5548 5549 /** 5550 * Show package verification setting in the Settings app. 5551 * 1 = show (default) 5552 * 0 = hide 5553 * @hide 5554 */ 5555 public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible"; 5556 5557 /** 5558 * Run package verificaiton on apps installed through ADB/ADT/USB 5559 * 1 = perform package verification on ADB installs (default) 5560 * 0 = bypass package verification on ADB installs 5561 * @hide 5562 */ 5563 public static final String PACKAGE_VERIFIER_INCLUDE_ADB = "verifier_verify_adb_installs"; 5564 5565 /** 5566 * Time since last fstrim (milliseconds) after which we force one to happen 5567 * during device startup. If unset, the default is 3 days. 5568 * @hide 5569 */ 5570 public static final String FSTRIM_MANDATORY_INTERVAL = "fstrim_mandatory_interval"; 5571 5572 /** 5573 * The interval in milliseconds at which to check packet counts on the 5574 * mobile data interface when screen is on, to detect possible data 5575 * connection problems. 5576 * @hide 5577 */ 5578 public static final String PDP_WATCHDOG_POLL_INTERVAL_MS = 5579 "pdp_watchdog_poll_interval_ms"; 5580 5581 /** 5582 * The interval in milliseconds at which to check packet counts on the 5583 * mobile data interface when screen is off, to detect possible data 5584 * connection problems. 5585 * @hide 5586 */ 5587 public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS = 5588 "pdp_watchdog_long_poll_interval_ms"; 5589 5590 /** 5591 * The interval in milliseconds at which to check packet counts on the 5592 * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} 5593 * outgoing packets has been reached without incoming packets. 5594 * @hide 5595 */ 5596 public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS = 5597 "pdp_watchdog_error_poll_interval_ms"; 5598 5599 /** 5600 * The number of outgoing packets sent without seeing an incoming packet 5601 * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT} 5602 * device is logged to the event log 5603 * @hide 5604 */ 5605 public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT = 5606 "pdp_watchdog_trigger_packet_count"; 5607 5608 /** 5609 * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS}) 5610 * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before 5611 * attempting data connection recovery. 5612 * @hide 5613 */ 5614 public static final String PDP_WATCHDOG_ERROR_POLL_COUNT = 5615 "pdp_watchdog_error_poll_count"; 5616 5617 /** 5618 * The number of failed PDP reset attempts before moving to something more 5619 * drastic: re-registering to the network. 5620 * @hide 5621 */ 5622 public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT = 5623 "pdp_watchdog_max_pdp_reset_fail_count"; 5624 5625 /** 5626 * A positive value indicates how often the SamplingProfiler 5627 * should take snapshots. Zero value means SamplingProfiler 5628 * is disabled. 5629 * 5630 * @hide 5631 */ 5632 public static final String SAMPLING_PROFILER_MS = "sampling_profiler_ms"; 5633 5634 /** 5635 * URL to open browser on to allow user to manage a prepay account 5636 * @hide 5637 */ 5638 public static final String SETUP_PREPAID_DATA_SERVICE_URL = 5639 "setup_prepaid_data_service_url"; 5640 5641 /** 5642 * URL to attempt a GET on to see if this is a prepay device 5643 * @hide 5644 */ 5645 public static final String SETUP_PREPAID_DETECTION_TARGET_URL = 5646 "setup_prepaid_detection_target_url"; 5647 5648 /** 5649 * Host to check for a redirect to after an attempt to GET 5650 * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there, 5651 * this is a prepaid device with zero balance.) 5652 * @hide 5653 */ 5654 public static final String SETUP_PREPAID_DETECTION_REDIR_HOST = 5655 "setup_prepaid_detection_redir_host"; 5656 5657 /** 5658 * The interval in milliseconds at which to check the number of SMS sent out without asking 5659 * for use permit, to limit the un-authorized SMS usage. 5660 * 5661 * @hide 5662 */ 5663 public static final String SMS_OUTGOING_CHECK_INTERVAL_MS = 5664 "sms_outgoing_check_interval_ms"; 5665 5666 /** 5667 * The number of outgoing SMS sent without asking for user permit (of {@link 5668 * #SMS_OUTGOING_CHECK_INTERVAL_MS} 5669 * 5670 * @hide 5671 */ 5672 public static final String SMS_OUTGOING_CHECK_MAX_COUNT = 5673 "sms_outgoing_check_max_count"; 5674 5675 /** 5676 * Used to disable SMS short code confirmation - defaults to true. 5677 * True indcates we will do the check, etc. Set to false to disable. 5678 * @see com.android.internal.telephony.SmsUsageMonitor 5679 * @hide 5680 */ 5681 public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation"; 5682 5683 /** 5684 * Used to select which country we use to determine premium sms codes. 5685 * One of com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_SIM, 5686 * com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_NETWORK, 5687 * or com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_BOTH. 5688 * @hide 5689 */ 5690 public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule"; 5691 5692 /** 5693 * Used to select TCP's default initial receiver window size in segments - defaults to a build config value 5694 * @hide 5695 */ 5696 public static final String TCP_DEFAULT_INIT_RWND = "tcp_default_init_rwnd"; 5697 5698 /** 5699 * Used to disable Tethering on a device - defaults to true 5700 * @hide 5701 */ 5702 public static final String TETHER_SUPPORTED = "tether_supported"; 5703 5704 /** 5705 * Used to require DUN APN on the device or not - defaults to a build config value 5706 * which defaults to false 5707 * @hide 5708 */ 5709 public static final String TETHER_DUN_REQUIRED = "tether_dun_required"; 5710 5711 /** 5712 * Used to hold a gservices-provisioned apn value for DUN. If set, or the 5713 * corresponding build config values are set it will override the APN DB 5714 * values. 5715 * Consists of a comma seperated list of strings: 5716 * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type" 5717 * note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" 5718 * @hide 5719 */ 5720 public static final String TETHER_DUN_APN = "tether_dun_apn"; 5721 5722 /** 5723 * USB Mass Storage Enabled 5724 */ 5725 public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled"; 5726 5727 /** 5728 * If this setting is set (to anything), then all references 5729 * to Gmail on the device must change to Google Mail. 5730 */ 5731 public static final String USE_GOOGLE_MAIL = "use_google_mail"; 5732 5733 /** 5734 * Webview Data reduction proxy key. 5735 * @hide 5736 */ 5737 public static final String WEBVIEW_DATA_REDUCTION_PROXY_KEY = 5738 "webview_data_reduction_proxy_key"; 5739 5740 /** 5741 * Whether Wifi display is enabled/disabled 5742 * 0=disabled. 1=enabled. 5743 * @hide 5744 */ 5745 public static final String WIFI_DISPLAY_ON = "wifi_display_on"; 5746 5747 /** 5748 * Whether Wifi display certification mode is enabled/disabled 5749 * 0=disabled. 1=enabled. 5750 * @hide 5751 */ 5752 public static final String WIFI_DISPLAY_CERTIFICATION_ON = 5753 "wifi_display_certification_on"; 5754 5755 /** 5756 * WPS Configuration method used by Wifi display, this setting only 5757 * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled). 5758 * 5759 * Possible values are: 5760 * 5761 * WpsInfo.INVALID: use default WPS method chosen by framework 5762 * WpsInfo.PBC : use Push button 5763 * WpsInfo.KEYPAD : use Keypad 5764 * WpsInfo.DISPLAY: use Display 5765 * @hide 5766 */ 5767 public static final String WIFI_DISPLAY_WPS_CONFIG = 5768 "wifi_display_wps_config"; 5769 5770 /** 5771 * Whether to notify the user of open networks. 5772 * <p> 5773 * If not connected and the scan results have an open network, we will 5774 * put this notification up. If we attempt to connect to a network or 5775 * the open network(s) disappear, we remove the notification. When we 5776 * show the notification, we will not show it again for 5777 * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time. 5778 */ 5779 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = 5780 "wifi_networks_available_notification_on"; 5781 /** 5782 * {@hide} 5783 */ 5784 public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON = 5785 "wimax_networks_available_notification_on"; 5786 5787 /** 5788 * Delay (in seconds) before repeating the Wi-Fi networks available notification. 5789 * Connecting to a network will reset the timer. 5790 */ 5791 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = 5792 "wifi_networks_available_repeat_delay"; 5793 5794 /** 5795 * 802.11 country code in ISO 3166 format 5796 * @hide 5797 */ 5798 public static final String WIFI_COUNTRY_CODE = "wifi_country_code"; 5799 5800 /** 5801 * The interval in milliseconds to issue wake up scans when wifi needs 5802 * to connect. This is necessary to connect to an access point when 5803 * device is on the move and the screen is off. 5804 * @hide 5805 */ 5806 public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS = 5807 "wifi_framework_scan_interval_ms"; 5808 5809 /** 5810 * The interval in milliseconds after which Wi-Fi is considered idle. 5811 * When idle, it is possible for the device to be switched from Wi-Fi to 5812 * the mobile data network. 5813 * @hide 5814 */ 5815 public static final String WIFI_IDLE_MS = "wifi_idle_ms"; 5816 5817 /** 5818 * When the number of open networks exceeds this number, the 5819 * least-recently-used excess networks will be removed. 5820 */ 5821 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept"; 5822 5823 /** 5824 * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this. 5825 */ 5826 public static final String WIFI_ON = "wifi_on"; 5827 5828 /** 5829 * Setting to allow scans to be enabled even wifi is turned off for connectivity. 5830 * @hide 5831 */ 5832 public static final String WIFI_SCAN_ALWAYS_AVAILABLE = 5833 "wifi_scan_always_enabled"; 5834 5835 /** 5836 * Used to save the Wifi_ON state prior to tethering. 5837 * This state will be checked to restore Wifi after 5838 * the user turns off tethering. 5839 * 5840 * @hide 5841 */ 5842 public static final String WIFI_SAVED_STATE = "wifi_saved_state"; 5843 5844 /** 5845 * The interval in milliseconds to scan as used by the wifi supplicant 5846 * @hide 5847 */ 5848 public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS = 5849 "wifi_supplicant_scan_interval_ms"; 5850 5851 /** 5852 * whether frameworks handles wifi auto-join 5853 * @hide 5854 */ 5855 public static final String WIFI_ENHANCED_AUTO_JOIN = 5856 "wifi_enhanced_auto_join"; 5857 5858 /** 5859 * whether settings show RSSI 5860 * @hide 5861 */ 5862 public static final String WIFI_NETWORK_SHOW_RSSI = 5863 "wifi_network_show_rssi"; 5864 5865 /** 5866 * The interval in milliseconds to scan at supplicant when p2p is connected 5867 * @hide 5868 */ 5869 public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS = 5870 "wifi_scan_interval_p2p_connected_ms"; 5871 5872 /** 5873 * Whether the Wi-Fi watchdog is enabled. 5874 */ 5875 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; 5876 5877 /** 5878 * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and 5879 * the setting needs to be set to 0 to disable it. 5880 * @hide 5881 */ 5882 public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED = 5883 "wifi_watchdog_poor_network_test_enabled"; 5884 5885 /** 5886 * Setting to turn on suspend optimizations at screen off on Wi-Fi. Enabled by default and 5887 * needs to be set to 0 to disable it. 5888 * @hide 5889 */ 5890 public static final String WIFI_SUSPEND_OPTIMIZATIONS_ENABLED = 5891 "wifi_suspend_optimizations_enabled"; 5892 5893 /** 5894 * The maximum number of times we will retry a connection to an access 5895 * point for which we have failed in acquiring an IP address from DHCP. 5896 * A value of N means that we will make N+1 connection attempts in all. 5897 */ 5898 public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; 5899 5900 /** 5901 * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile 5902 * data connectivity to be established after a disconnect from Wi-Fi. 5903 */ 5904 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = 5905 "wifi_mobile_data_transition_wakelock_timeout_ms"; 5906 5907 /** 5908 * The operational wifi frequency band 5909 * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO}, 5910 * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or 5911 * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ} 5912 * 5913 * @hide 5914 */ 5915 public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band"; 5916 5917 /** 5918 * The Wi-Fi peer-to-peer device name 5919 * @hide 5920 */ 5921 public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name"; 5922 5923 /** 5924 * The min time between wifi disable and wifi enable 5925 * @hide 5926 */ 5927 public static final String WIFI_REENABLE_DELAY_MS = "wifi_reenable_delay"; 5928 5929 /** 5930 * Timeout for ephemeral networks when all known BSSIDs go out of range. We will disconnect 5931 * from an ephemeral network if there is no BSSID for that network with a non-null score that 5932 * has been seen in this time period. 5933 * 5934 * If this is less than or equal to zero, we use a more conservative behavior and only check 5935 * for a non-null score from the currently connected or target BSSID. 5936 * @hide 5937 */ 5938 public static final String WIFI_EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS = 5939 "wifi_ephemeral_out_of_range_timeout_ms"; 5940 5941 /** 5942 * The number of milliseconds to delay when checking for data stalls during 5943 * non-aggressive detection. (screen is turned off.) 5944 * @hide 5945 */ 5946 public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS = 5947 "data_stall_alarm_non_aggressive_delay_in_ms"; 5948 5949 /** 5950 * The number of milliseconds to delay when checking for data stalls during 5951 * aggressive detection. (screen on or suspected data stall) 5952 * @hide 5953 */ 5954 public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS = 5955 "data_stall_alarm_aggressive_delay_in_ms"; 5956 5957 /** 5958 * The number of milliseconds to allow the provisioning apn to remain active 5959 * @hide 5960 */ 5961 public static final String PROVISIONING_APN_ALARM_DELAY_IN_MS = 5962 "provisioning_apn_alarm_delay_in_ms"; 5963 5964 /** 5965 * The interval in milliseconds at which to check gprs registration 5966 * after the first registration mismatch of gprs and voice service, 5967 * to detect possible data network registration problems. 5968 * 5969 * @hide 5970 */ 5971 public static final String GPRS_REGISTER_CHECK_PERIOD_MS = 5972 "gprs_register_check_period_ms"; 5973 5974 /** 5975 * Nonzero causes Log.wtf() to crash. 5976 * @hide 5977 */ 5978 public static final String WTF_IS_FATAL = "wtf_is_fatal"; 5979 5980 /** 5981 * Ringer mode. This is used internally, changing this value will not 5982 * change the ringer mode. See AudioManager. 5983 */ 5984 public static final String MODE_RINGER = "mode_ringer"; 5985 5986 /** 5987 * Overlay display devices setting. 5988 * The associated value is a specially formatted string that describes the 5989 * size and density of simulated secondary display devices. 5990 * <p> 5991 * Format: {width}x{height}/{dpi};... 5992 * </p><p> 5993 * Example: 5994 * <ul> 5995 * <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li> 5996 * <li><code>1920x1080/320;1280x720/213</code>: make two overlays, the first 5997 * at 1080p and the second at 720p.</li> 5998 * <li>If the value is empty, then no overlay display devices are created.</li> 5999 * </ul></p> 6000 * 6001 * @hide 6002 */ 6003 public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices"; 6004 6005 /** 6006 * Threshold values for the duration and level of a discharge cycle, 6007 * under which we log discharge cycle info. 6008 * 6009 * @hide 6010 */ 6011 public static final String 6012 BATTERY_DISCHARGE_DURATION_THRESHOLD = "battery_discharge_duration_threshold"; 6013 6014 /** @hide */ 6015 public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold"; 6016 6017 /** 6018 * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR 6019 * intents on application crashes and ANRs. If this is disabled, the 6020 * crash/ANR dialog will never display the "Report" button. 6021 * <p> 6022 * Type: int (0 = disallow, 1 = allow) 6023 * 6024 * @hide 6025 */ 6026 public static final String SEND_ACTION_APP_ERROR = "send_action_app_error"; 6027 6028 /** 6029 * Maximum age of entries kept by {@link DropBoxManager}. 6030 * 6031 * @hide 6032 */ 6033 public static final String DROPBOX_AGE_SECONDS = "dropbox_age_seconds"; 6034 6035 /** 6036 * Maximum number of entry files which {@link DropBoxManager} will keep 6037 * around. 6038 * 6039 * @hide 6040 */ 6041 public static final String DROPBOX_MAX_FILES = "dropbox_max_files"; 6042 6043 /** 6044 * Maximum amount of disk space used by {@link DropBoxManager} no matter 6045 * what. 6046 * 6047 * @hide 6048 */ 6049 public static final String DROPBOX_QUOTA_KB = "dropbox_quota_kb"; 6050 6051 /** 6052 * Percent of free disk (excluding reserve) which {@link DropBoxManager} 6053 * will use. 6054 * 6055 * @hide 6056 */ 6057 public static final String DROPBOX_QUOTA_PERCENT = "dropbox_quota_percent"; 6058 6059 /** 6060 * Percent of total disk which {@link DropBoxManager} will never dip 6061 * into. 6062 * 6063 * @hide 6064 */ 6065 public static final String DROPBOX_RESERVE_PERCENT = "dropbox_reserve_percent"; 6066 6067 /** 6068 * Prefix for per-tag dropbox disable/enable settings. 6069 * 6070 * @hide 6071 */ 6072 public static final String DROPBOX_TAG_PREFIX = "dropbox:"; 6073 6074 /** 6075 * Lines of logcat to include with system crash/ANR/etc. reports, as a 6076 * prefix of the dropbox tag of the report type. For example, 6077 * "logcat_for_system_server_anr" controls the lines of logcat captured 6078 * with system server ANR reports. 0 to disable. 6079 * 6080 * @hide 6081 */ 6082 public static final String ERROR_LOGCAT_PREFIX = "logcat_for_"; 6083 6084 /** 6085 * The interval in minutes after which the amount of free storage left 6086 * on the device is logged to the event log 6087 * 6088 * @hide 6089 */ 6090 public static final String SYS_FREE_STORAGE_LOG_INTERVAL = "sys_free_storage_log_interval"; 6091 6092 /** 6093 * Threshold for the amount of change in disk free space required to 6094 * report the amount of free space. Used to prevent spamming the logs 6095 * when the disk free space isn't changing frequently. 6096 * 6097 * @hide 6098 */ 6099 public static final String 6100 DISK_FREE_CHANGE_REPORTING_THRESHOLD = "disk_free_change_reporting_threshold"; 6101 6102 /** 6103 * Minimum percentage of free storage on the device that is used to 6104 * determine if the device is running low on storage. The default is 10. 6105 * <p> 6106 * Say this value is set to 10, the device is considered running low on 6107 * storage if 90% or more of the device storage is filled up. 6108 * 6109 * @hide 6110 */ 6111 public static final String 6112 SYS_STORAGE_THRESHOLD_PERCENTAGE = "sys_storage_threshold_percentage"; 6113 6114 /** 6115 * Maximum byte size of the low storage threshold. This is to ensure 6116 * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in an 6117 * overly large threshold for large storage devices. Currently this must 6118 * be less than 2GB. This default is 500MB. 6119 * 6120 * @hide 6121 */ 6122 public static final String 6123 SYS_STORAGE_THRESHOLD_MAX_BYTES = "sys_storage_threshold_max_bytes"; 6124 6125 /** 6126 * Minimum bytes of free storage on the device before the data partition 6127 * is considered full. By default, 1 MB is reserved to avoid system-wide 6128 * SQLite disk full exceptions. 6129 * 6130 * @hide 6131 */ 6132 public static final String 6133 SYS_STORAGE_FULL_THRESHOLD_BYTES = "sys_storage_full_threshold_bytes"; 6134 6135 /** 6136 * The maximum reconnect delay for short network outages or when the 6137 * network is suspended due to phone use. 6138 * 6139 * @hide 6140 */ 6141 public static final String 6142 SYNC_MAX_RETRY_DELAY_IN_SECONDS = "sync_max_retry_delay_in_seconds"; 6143 6144 /** 6145 * The number of milliseconds to delay before sending out 6146 * {@link ConnectivityManager#CONNECTIVITY_ACTION} broadcasts. Ignored. 6147 * 6148 * @hide 6149 */ 6150 public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay"; 6151 6152 6153 /** 6154 * Network sampling interval, in seconds. We'll generate link information 6155 * about bytes/packets sent and error rates based on data sampled in this interval 6156 * 6157 * @hide 6158 */ 6159 6160 public static final String CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS = 6161 "connectivity_sampling_interval_in_seconds"; 6162 6163 /** 6164 * The series of successively longer delays used in retrying to download PAC file. 6165 * Last delay is used between successful PAC downloads. 6166 * 6167 * @hide 6168 */ 6169 public static final String PAC_CHANGE_DELAY = "pac_change_delay"; 6170 6171 /** 6172 * Setting to turn off captive portal detection. Feature is enabled by 6173 * default and the setting needs to be set to 0 to disable it. 6174 * 6175 * @hide 6176 */ 6177 public static final String 6178 CAPTIVE_PORTAL_DETECTION_ENABLED = "captive_portal_detection_enabled"; 6179 6180 /** 6181 * The server used for captive portal detection upon a new conection. A 6182 * 204 response code from the server is used for validation. 6183 * 6184 * @hide 6185 */ 6186 public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server"; 6187 6188 /** 6189 * Whether network service discovery is enabled. 6190 * 6191 * @hide 6192 */ 6193 public static final String NSD_ON = "nsd_on"; 6194 6195 /** 6196 * Let user pick default install location. 6197 * 6198 * @hide 6199 */ 6200 public static final String SET_INSTALL_LOCATION = "set_install_location"; 6201 6202 /** 6203 * Default install location value. 6204 * 0 = auto, let system decide 6205 * 1 = internal 6206 * 2 = sdcard 6207 * @hide 6208 */ 6209 public static final String DEFAULT_INSTALL_LOCATION = "default_install_location"; 6210 6211 /** 6212 * ms during which to consume extra events related to Inet connection 6213 * condition after a transtion to fully-connected 6214 * 6215 * @hide 6216 */ 6217 public static final String 6218 INET_CONDITION_DEBOUNCE_UP_DELAY = "inet_condition_debounce_up_delay"; 6219 6220 /** 6221 * ms during which to consume extra events related to Inet connection 6222 * condtion after a transtion to partly-connected 6223 * 6224 * @hide 6225 */ 6226 public static final String 6227 INET_CONDITION_DEBOUNCE_DOWN_DELAY = "inet_condition_debounce_down_delay"; 6228 6229 /** {@hide} */ 6230 public static final String 6231 READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default"; 6232 6233 /** 6234 * Host name and port for global http proxy. Uses ':' seperator for 6235 * between host and port. 6236 */ 6237 public static final String HTTP_PROXY = "http_proxy"; 6238 6239 /** 6240 * Host name for global http proxy. Set via ConnectivityManager. 6241 * 6242 * @hide 6243 */ 6244 public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host"; 6245 6246 /** 6247 * Integer host port for global http proxy. Set via ConnectivityManager. 6248 * 6249 * @hide 6250 */ 6251 public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port"; 6252 6253 /** 6254 * Exclusion list for global proxy. This string contains a list of 6255 * comma-separated domains where the global proxy does not apply. 6256 * Domains should be listed in a comma- separated list. Example of 6257 * acceptable formats: ".domain1.com,my.domain2.com" Use 6258 * ConnectivityManager to set/get. 6259 * 6260 * @hide 6261 */ 6262 public static final String 6263 GLOBAL_HTTP_PROXY_EXCLUSION_LIST = "global_http_proxy_exclusion_list"; 6264 6265 /** 6266 * The location PAC File for the proxy. 6267 * @hide 6268 */ 6269 public static final String 6270 GLOBAL_HTTP_PROXY_PAC = "global_proxy_pac_url"; 6271 6272 /** 6273 * Enables the UI setting to allow the user to specify the global HTTP 6274 * proxy and associated exclusion list. 6275 * 6276 * @hide 6277 */ 6278 public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy"; 6279 6280 /** 6281 * Setting for default DNS in case nobody suggests one 6282 * 6283 * @hide 6284 */ 6285 public static final String DEFAULT_DNS_SERVER = "default_dns_server"; 6286 6287 /** {@hide} */ 6288 public static final String 6289 BLUETOOTH_HEADSET_PRIORITY_PREFIX = "bluetooth_headset_priority_"; 6290 /** {@hide} */ 6291 public static final String 6292 BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX = "bluetooth_a2dp_sink_priority_"; 6293 /** {@hide} */ 6294 public static final String 6295 BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX = "bluetooth_input_device_priority_"; 6296 /** {@hide} */ 6297 public static final String 6298 BLUETOOTH_MAP_PRIORITY_PREFIX = "bluetooth_map_priority_"; 6299 6300 /** 6301 * Get the key that retrieves a bluetooth headset's priority. 6302 * @hide 6303 */ 6304 public static final String getBluetoothHeadsetPriorityKey(String address) { 6305 return BLUETOOTH_HEADSET_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); 6306 } 6307 6308 /** 6309 * Get the key that retrieves a bluetooth a2dp sink's priority. 6310 * @hide 6311 */ 6312 public static final String getBluetoothA2dpSinkPriorityKey(String address) { 6313 return BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); 6314 } 6315 6316 /** 6317 * Get the key that retrieves a bluetooth Input Device's priority. 6318 * @hide 6319 */ 6320 public static final String getBluetoothInputDevicePriorityKey(String address) { 6321 return BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); 6322 } 6323 6324 /** 6325 * Get the key that retrieves a bluetooth map priority. 6326 * @hide 6327 */ 6328 public static final String getBluetoothMapPriorityKey(String address) { 6329 return BLUETOOTH_MAP_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); 6330 } 6331 /** 6332 * Scaling factor for normal window animations. Setting to 0 will 6333 * disable window animations. 6334 */ 6335 public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale"; 6336 6337 /** 6338 * Scaling factor for activity transition animations. Setting to 0 will 6339 * disable window animations. 6340 */ 6341 public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; 6342 6343 /** 6344 * Scaling factor for Animator-based animations. This affects both the 6345 * start delay and duration of all such animations. Setting to 0 will 6346 * cause animations to end immediately. The default value is 1. 6347 */ 6348 public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; 6349 6350 /** 6351 * Scaling factor for normal window animations. Setting to 0 will 6352 * disable window animations. 6353 * 6354 * @hide 6355 */ 6356 public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations"; 6357 6358 /** 6359 * If 0, the compatibility mode is off for all applications. 6360 * If 1, older applications run under compatibility mode. 6361 * TODO: remove this settings before code freeze (bug/1907571) 6362 * @hide 6363 */ 6364 public static final String COMPATIBILITY_MODE = "compatibility_mode"; 6365 6366 /** 6367 * CDMA only settings 6368 * Emergency Tone 0 = Off 6369 * 1 = Alert 6370 * 2 = Vibrate 6371 * @hide 6372 */ 6373 public static final String EMERGENCY_TONE = "emergency_tone"; 6374 6375 /** 6376 * CDMA only settings 6377 * Whether the auto retry is enabled. The value is 6378 * boolean (1 or 0). 6379 * @hide 6380 */ 6381 public static final String CALL_AUTO_RETRY = "call_auto_retry"; 6382 6383 /** 6384 * See RIL_PreferredNetworkType in ril.h 6385 * @hide 6386 */ 6387 public static final String PREFERRED_NETWORK_MODE = 6388 "preferred_network_mode"; 6389 6390 /** 6391 * Setting to 1 will hide carrier network settings. 6392 * Default is 0. 6393 * @hide 6394 */ 6395 public static final String HIDE_CARRIER_NETWORK_SETTINGS = 6396 "hide_carrier_network_settings"; 6397 6398 /** 6399 * Name of an application package to be debugged. 6400 */ 6401 public static final String DEBUG_APP = "debug_app"; 6402 6403 /** 6404 * If 1, when launching DEBUG_APP it will wait for the debugger before 6405 * starting user code. If 0, it will run normally. 6406 */ 6407 public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger"; 6408 6409 /** 6410 * Control whether the process CPU usage meter should be shown. 6411 */ 6412 public static final String SHOW_PROCESSES = "show_processes"; 6413 6414 /** 6415 * If 1 low power mode is enabled. 6416 * @hide 6417 */ 6418 public static final String LOW_POWER_MODE = "low_power"; 6419 6420 /** 6421 * Battery level [1-99] at which low power mode automatically turns on. 6422 * If 0, it will not automatically turn on. 6423 * @hide 6424 */ 6425 public static final String LOW_POWER_MODE_TRIGGER_LEVEL = "low_power_trigger_level"; 6426 6427 /** 6428 * If 1, the activity manager will aggressively finish activities and 6429 * processes as soon as they are no longer needed. If 0, the normal 6430 * extended lifetime is used. 6431 */ 6432 public static final String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; 6433 6434 /** 6435 * Use Dock audio output for media: 6436 * 0 = disabled 6437 * 1 = enabled 6438 * @hide 6439 */ 6440 public static final String DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled"; 6441 6442 /** 6443 * Persisted safe headphone volume management state by AudioService 6444 * @hide 6445 */ 6446 public static final String AUDIO_SAFE_VOLUME_STATE = "audio_safe_volume_state"; 6447 6448 /** 6449 * URL for tzinfo (time zone) updates 6450 * @hide 6451 */ 6452 public static final String TZINFO_UPDATE_CONTENT_URL = "tzinfo_content_url"; 6453 6454 /** 6455 * URL for tzinfo (time zone) update metadata 6456 * @hide 6457 */ 6458 public static final String TZINFO_UPDATE_METADATA_URL = "tzinfo_metadata_url"; 6459 6460 /** 6461 * URL for selinux (mandatory access control) updates 6462 * @hide 6463 */ 6464 public static final String SELINUX_UPDATE_CONTENT_URL = "selinux_content_url"; 6465 6466 /** 6467 * URL for selinux (mandatory access control) update metadata 6468 * @hide 6469 */ 6470 public static final String SELINUX_UPDATE_METADATA_URL = "selinux_metadata_url"; 6471 6472 /** 6473 * URL for sms short code updates 6474 * @hide 6475 */ 6476 public static final String SMS_SHORT_CODES_UPDATE_CONTENT_URL = 6477 "sms_short_codes_content_url"; 6478 6479 /** 6480 * URL for sms short code update metadata 6481 * @hide 6482 */ 6483 public static final String SMS_SHORT_CODES_UPDATE_METADATA_URL = 6484 "sms_short_codes_metadata_url"; 6485 6486 /** 6487 * URL for cert pinlist updates 6488 * @hide 6489 */ 6490 public static final String CERT_PIN_UPDATE_CONTENT_URL = "cert_pin_content_url"; 6491 6492 /** 6493 * URL for cert pinlist updates 6494 * @hide 6495 */ 6496 public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url"; 6497 6498 /** 6499 * URL for intent firewall updates 6500 * @hide 6501 */ 6502 public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL = 6503 "intent_firewall_content_url"; 6504 6505 /** 6506 * URL for intent firewall update metadata 6507 * @hide 6508 */ 6509 public static final String INTENT_FIREWALL_UPDATE_METADATA_URL = 6510 "intent_firewall_metadata_url"; 6511 6512 /** 6513 * SELinux enforcement status. If 0, permissive; if 1, enforcing. 6514 * @hide 6515 */ 6516 public static final String SELINUX_STATUS = "selinux_status"; 6517 6518 /** 6519 * Developer setting to force RTL layout. 6520 * @hide 6521 */ 6522 public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl"; 6523 6524 /** 6525 * Milliseconds after screen-off after which low battery sounds will be silenced. 6526 * 6527 * If zero, battery sounds will always play. 6528 * Defaults to @integer/def_low_battery_sound_timeout in SettingsProvider. 6529 * 6530 * @hide 6531 */ 6532 public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout"; 6533 6534 /** 6535 * Milliseconds to wait before bouncing Wi-Fi after settings is restored. Note that after 6536 * the caller is done with this, they should call {@link ContentResolver#delete} to 6537 * clean up any value that they may have written. 6538 * 6539 * @hide 6540 */ 6541 public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms"; 6542 6543 /** 6544 * Defines global runtime overrides to window policy. 6545 * 6546 * See {@link com.android.internal.policy.impl.PolicyControl} for value format. 6547 * 6548 * @hide 6549 */ 6550 public static final String POLICY_CONTROL = "policy_control"; 6551 6552 /** 6553 * Defines global zen mode. ZEN_MODE_OFF, ZEN_MODE_IMPORTANT_INTERRUPTIONS, 6554 * or ZEN_MODE_NO_INTERRUPTIONS. 6555 * 6556 * @hide 6557 */ 6558 public static final String ZEN_MODE = "zen_mode"; 6559 6560 /** @hide */ public static final int ZEN_MODE_OFF = 0; 6561 /** @hide */ public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; 6562 /** @hide */ public static final int ZEN_MODE_NO_INTERRUPTIONS = 2; 6563 6564 /** @hide */ public static String zenModeToString(int mode) { 6565 if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS"; 6566 if (mode == ZEN_MODE_NO_INTERRUPTIONS) return "ZEN_MODE_NO_INTERRUPTIONS"; 6567 return "ZEN_MODE_OFF"; 6568 } 6569 6570 /** 6571 * Opaque value, changes when persisted zen mode configuration changes. 6572 * 6573 * @hide 6574 */ 6575 public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag"; 6576 6577 /** 6578 * Defines global heads up toggle. One of HEADS_UP_OFF, HEADS_UP_ON. 6579 * 6580 * @hide 6581 */ 6582 public static final String HEADS_UP_NOTIFICATIONS_ENABLED = 6583 "heads_up_notifications_enabled"; 6584 6585 /** @hide */ public static final int HEADS_UP_OFF = 0; 6586 /** @hide */ public static final int HEADS_UP_ON = 1; 6587 6588 /** 6589 * The name of the device 6590 * 6591 * @hide 6592 */ 6593 public static final String DEVICE_NAME = "device_name"; 6594 6595 /** 6596 * Whether it should be possible to create a guest user on the device. 6597 * <p> 6598 * Type: int (0 for disabled, 1 for enabled) 6599 * @hide 6600 */ 6601 public static final String GUEST_USER_ENABLED = "guest_user_enabled"; 6602 6603 /** 6604 * Whether the NetworkScoringService has been first initialized. 6605 * <p> 6606 * Type: int (0 for false, 1 for true) 6607 * @hide 6608 */ 6609 public static final String NETWORK_SCORING_PROVISIONED = "network_scoring_provisioned"; 6610 6611 /** 6612 * Whether the user wants to be prompted for password to decrypt the device on boot. 6613 * This only matters if the storage is encrypted. 6614 * <p> 6615 * Type: int (0 for false, 1 for true) 6616 * @hide 6617 */ 6618 public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt"; 6619 6620 /** 6621 * Whether the Volte/VT is enabled 6622 * <p> 6623 * Type: int (0 for false, 1 for true) 6624 * @hide 6625 */ 6626 public static final String ENHANCED_4G_MODE_ENABLED = "volte_vt_enabled"; 6627 6628 /** 6629 * Global override to disable VoLTE (independent of user setting) 6630 * <p> 6631 * Type: int (1 for disable VoLTE, 0 to use user configuration) 6632 * @hide 6633 */ 6634 public static final String VOLTE_FEATURE_DISABLED = "volte_feature_disabled"; 6635 6636 /** 6637 * Whether user can enable/disable LTE as a preferred network. A carrier might control 6638 * this via gservices, OMA-DM, carrier app, etc. 6639 * <p> 6640 * Type: int (0 for false, 1 for true) 6641 * @hide 6642 */ 6643 public static final String LTE_SERVICE_FORCED = "lte_service_forced"; 6644 6645 /** 6646 * Settings to backup. This is here so that it's in the same place as the settings 6647 * keys and easy to update. 6648 * 6649 * These keys may be mentioned in the SETTINGS_TO_BACKUP arrays in System 6650 * and Secure as well. This is because those tables drive both backup and 6651 * restore, and restore needs to properly whitelist keys that used to live 6652 * in those namespaces. The keys will only actually be backed up / restored 6653 * if they are also mentioned in this table (Global.SETTINGS_TO_BACKUP). 6654 * 6655 * NOTE: Settings are backed up and restored in the order they appear 6656 * in this array. If you have one setting depending on another, 6657 * make sure that they are ordered appropriately. 6658 * 6659 * @hide 6660 */ 6661 public static final String[] SETTINGS_TO_BACKUP = { 6662 BUGREPORT_IN_POWER_MENU, 6663 STAY_ON_WHILE_PLUGGED_IN, 6664 AUTO_TIME, 6665 AUTO_TIME_ZONE, 6666 POWER_SOUNDS_ENABLED, 6667 DOCK_SOUNDS_ENABLED, 6668 USB_MASS_STORAGE_ENABLED, 6669 ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED, 6670 WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 6671 WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, 6672 WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, 6673 WIFI_NUM_OPEN_NETWORKS_KEPT, 6674 EMERGENCY_TONE, 6675 CALL_AUTO_RETRY, 6676 DOCK_AUDIO_MEDIA_ENABLED, 6677 LOW_POWER_MODE_TRIGGER_LEVEL 6678 }; 6679 6680 // Populated lazily, guarded by class object: 6681 private static NameValueCache sNameValueCache = new NameValueCache( 6682 SYS_PROP_SETTING_VERSION, 6683 CONTENT_URI, 6684 CALL_METHOD_GET_GLOBAL, 6685 CALL_METHOD_PUT_GLOBAL); 6686 6687 // Certain settings have been moved from global to the per-user secure namespace 6688 private static final HashSet<String> MOVED_TO_SECURE; 6689 static { 6690 MOVED_TO_SECURE = new HashSet<String>(1); 6691 MOVED_TO_SECURE.add(Settings.Global.INSTALL_NON_MARKET_APPS); 6692 } 6693 6694 /** 6695 * Look up a name in the database. 6696 * @param resolver to access the database with 6697 * @param name to look up in the table 6698 * @return the corresponding value, or null if not present 6699 */ 6700 public static String getString(ContentResolver resolver, String name) { 6701 return getStringForUser(resolver, name, UserHandle.myUserId()); 6702 } 6703 6704 /** @hide */ 6705 public static String getStringForUser(ContentResolver resolver, String name, 6706 int userHandle) { 6707 if (MOVED_TO_SECURE.contains(name)) { 6708 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" 6709 + " to android.provider.Settings.Secure, returning read-only value."); 6710 return Secure.getStringForUser(resolver, name, userHandle); 6711 } 6712 return sNameValueCache.getStringForUser(resolver, name, userHandle); 6713 } 6714 6715 /** 6716 * Store a name/value pair into the database. 6717 * @param resolver to access the database with 6718 * @param name to store 6719 * @param value to associate with the name 6720 * @return true if the value was set, false on database errors 6721 */ 6722 public static boolean putString(ContentResolver resolver, 6723 String name, String value) { 6724 return putStringForUser(resolver, name, value, UserHandle.myUserId()); 6725 } 6726 6727 /** @hide */ 6728 public static boolean putStringForUser(ContentResolver resolver, 6729 String name, String value, int userHandle) { 6730 if (LOCAL_LOGV) { 6731 Log.v(TAG, "Global.putString(name=" + name + ", value=" + value 6732 + " for " + userHandle); 6733 } 6734 // Global and Secure have the same access policy so we can forward writes 6735 if (MOVED_TO_SECURE.contains(name)) { 6736 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" 6737 + " to android.provider.Settings.Secure, value is unchanged."); 6738 return Secure.putStringForUser(resolver, name, value, userHandle); 6739 } 6740 return sNameValueCache.putStringForUser(resolver, name, value, userHandle); 6741 } 6742 6743 /** 6744 * Construct the content URI for a particular name/value pair, 6745 * useful for monitoring changes with a ContentObserver. 6746 * @param name to look up in the table 6747 * @return the corresponding content URI, or null if not present 6748 */ 6749 public static Uri getUriFor(String name) { 6750 return getUriFor(CONTENT_URI, name); 6751 } 6752 6753 /** 6754 * Convenience function for retrieving a single secure settings value 6755 * as an integer. Note that internally setting values are always 6756 * stored as strings; this function converts the string to an integer 6757 * for you. The default value will be returned if the setting is 6758 * not defined or not an integer. 6759 * 6760 * @param cr The ContentResolver to access. 6761 * @param name The name of the setting to retrieve. 6762 * @param def Value to return if the setting is not defined. 6763 * 6764 * @return The setting's current value, or 'def' if it is not defined 6765 * or not a valid integer. 6766 */ 6767 public static int getInt(ContentResolver cr, String name, int def) { 6768 String v = getString(cr, name); 6769 try { 6770 return v != null ? Integer.parseInt(v) : def; 6771 } catch (NumberFormatException e) { 6772 return def; 6773 } 6774 } 6775 6776 /** 6777 * Convenience function for retrieving a single secure settings value 6778 * as an integer. Note that internally setting values are always 6779 * stored as strings; this function converts the string to an integer 6780 * for you. 6781 * <p> 6782 * This version does not take a default value. If the setting has not 6783 * been set, or the string value is not a number, 6784 * it throws {@link SettingNotFoundException}. 6785 * 6786 * @param cr The ContentResolver to access. 6787 * @param name The name of the setting to retrieve. 6788 * 6789 * @throws SettingNotFoundException Thrown if a setting by the given 6790 * name can't be found or the setting value is not an integer. 6791 * 6792 * @return The setting's current value. 6793 */ 6794 public static int getInt(ContentResolver cr, String name) 6795 throws SettingNotFoundException { 6796 String v = getString(cr, name); 6797 try { 6798 return Integer.parseInt(v); 6799 } catch (NumberFormatException e) { 6800 throw new SettingNotFoundException(name); 6801 } 6802 } 6803 6804 /** 6805 * Convenience function for updating a single settings value as an 6806 * integer. This will either create a new entry in the table if the 6807 * given name does not exist, or modify the value of the existing row 6808 * with that name. Note that internally setting values are always 6809 * stored as strings, so this function converts the given value to a 6810 * string before storing it. 6811 * 6812 * @param cr The ContentResolver to access. 6813 * @param name The name of the setting to modify. 6814 * @param value The new value for the setting. 6815 * @return true if the value was set, false on database errors 6816 */ 6817 public static boolean putInt(ContentResolver cr, String name, int value) { 6818 return putString(cr, name, Integer.toString(value)); 6819 } 6820 6821 /** 6822 * Convenience function for retrieving a single secure settings value 6823 * as a {@code long}. Note that internally setting values are always 6824 * stored as strings; this function converts the string to a {@code long} 6825 * for you. The default value will be returned if the setting is 6826 * not defined or not a {@code long}. 6827 * 6828 * @param cr The ContentResolver to access. 6829 * @param name The name of the setting to retrieve. 6830 * @param def Value to return if the setting is not defined. 6831 * 6832 * @return The setting's current value, or 'def' if it is not defined 6833 * or not a valid {@code long}. 6834 */ 6835 public static long getLong(ContentResolver cr, String name, long def) { 6836 String valString = getString(cr, name); 6837 long value; 6838 try { 6839 value = valString != null ? Long.parseLong(valString) : def; 6840 } catch (NumberFormatException e) { 6841 value = def; 6842 } 6843 return value; 6844 } 6845 6846 /** 6847 * Convenience function for retrieving a single secure settings value 6848 * as a {@code long}. Note that internally setting values are always 6849 * stored as strings; this function converts the string to a {@code long} 6850 * for you. 6851 * <p> 6852 * This version does not take a default value. If the setting has not 6853 * been set, or the string value is not a number, 6854 * it throws {@link SettingNotFoundException}. 6855 * 6856 * @param cr The ContentResolver to access. 6857 * @param name The name of the setting to retrieve. 6858 * 6859 * @return The setting's current value. 6860 * @throws SettingNotFoundException Thrown if a setting by the given 6861 * name can't be found or the setting value is not an integer. 6862 */ 6863 public static long getLong(ContentResolver cr, String name) 6864 throws SettingNotFoundException { 6865 String valString = getString(cr, name); 6866 try { 6867 return Long.parseLong(valString); 6868 } catch (NumberFormatException e) { 6869 throw new SettingNotFoundException(name); 6870 } 6871 } 6872 6873 /** 6874 * Convenience function for updating a secure settings value as a long 6875 * integer. This will either create a new entry in the table if the 6876 * given name does not exist, or modify the value of the existing row 6877 * with that name. Note that internally setting values are always 6878 * stored as strings, so this function converts the given value to a 6879 * string before storing it. 6880 * 6881 * @param cr The ContentResolver to access. 6882 * @param name The name of the setting to modify. 6883 * @param value The new value for the setting. 6884 * @return true if the value was set, false on database errors 6885 */ 6886 public static boolean putLong(ContentResolver cr, String name, long value) { 6887 return putString(cr, name, Long.toString(value)); 6888 } 6889 6890 /** 6891 * Convenience function for retrieving a single secure settings value 6892 * as a floating point number. Note that internally setting values are 6893 * always stored as strings; this function converts the string to an 6894 * float for you. The default value will be returned if the setting 6895 * is not defined or not a valid float. 6896 * 6897 * @param cr The ContentResolver to access. 6898 * @param name The name of the setting to retrieve. 6899 * @param def Value to return if the setting is not defined. 6900 * 6901 * @return The setting's current value, or 'def' if it is not defined 6902 * or not a valid float. 6903 */ 6904 public static float getFloat(ContentResolver cr, String name, float def) { 6905 String v = getString(cr, name); 6906 try { 6907 return v != null ? Float.parseFloat(v) : def; 6908 } catch (NumberFormatException e) { 6909 return def; 6910 } 6911 } 6912 6913 /** 6914 * Convenience function for retrieving a single secure settings value 6915 * as a float. Note that internally setting values are always 6916 * stored as strings; this function converts the string to a float 6917 * for you. 6918 * <p> 6919 * This version does not take a default value. If the setting has not 6920 * been set, or the string value is not a number, 6921 * it throws {@link SettingNotFoundException}. 6922 * 6923 * @param cr The ContentResolver to access. 6924 * @param name The name of the setting to retrieve. 6925 * 6926 * @throws SettingNotFoundException Thrown if a setting by the given 6927 * name can't be found or the setting value is not a float. 6928 * 6929 * @return The setting's current value. 6930 */ 6931 public static float getFloat(ContentResolver cr, String name) 6932 throws SettingNotFoundException { 6933 String v = getString(cr, name); 6934 if (v == null) { 6935 throw new SettingNotFoundException(name); 6936 } 6937 try { 6938 return Float.parseFloat(v); 6939 } catch (NumberFormatException e) { 6940 throw new SettingNotFoundException(name); 6941 } 6942 } 6943 6944 /** 6945 * Convenience function for updating a single settings value as a 6946 * floating point number. This will either create a new entry in the 6947 * table if the given name does not exist, or modify the value of the 6948 * existing row with that name. Note that internally setting values 6949 * are always stored as strings, so this function converts the given 6950 * value to a string before storing it. 6951 * 6952 * @param cr The ContentResolver to access. 6953 * @param name The name of the setting to modify. 6954 * @param value The new value for the setting. 6955 * @return true if the value was set, false on database errors 6956 */ 6957 public static boolean putFloat(ContentResolver cr, String name, float value) { 6958 return putString(cr, name, Float.toString(value)); 6959 } 6960 6961 6962 /** 6963 * Subscription to be used for voice call on a multi sim device. The supported values 6964 * are 0 = SUB1, 1 = SUB2 and etc. 6965 * @hide 6966 */ 6967 public static final String MULTI_SIM_VOICE_CALL_SUBSCRIPTION = "multi_sim_voice_call"; 6968 6969 /** 6970 * Used to provide option to user to select subscription during dial. 6971 * The supported values are 0 = disable or 1 = enable prompt. 6972 * @hide 6973 */ 6974 public static final String MULTI_SIM_VOICE_PROMPT = "multi_sim_voice_prompt"; 6975 6976 /** 6977 * Subscription to be used for data call on a multi sim device. The supported values 6978 * are 0 = SUB1, 1 = SUB2 and etc. 6979 * @hide 6980 */ 6981 public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call"; 6982 6983 /** 6984 * Subscription to be used for SMS on a multi sim device. The supported values 6985 * are 0 = SUB1, 1 = SUB2 and etc. 6986 * @hide 6987 */ 6988 public static final String MULTI_SIM_SMS_SUBSCRIPTION = "multi_sim_sms"; 6989 6990 /** 6991 * Used to provide option to user to select subscription during send SMS. 6992 * The value 1 - enable, 0 - disable 6993 * @hide 6994 */ 6995 public static final String MULTI_SIM_SMS_PROMPT = "multi_sim_sms_prompt"; 6996 6997 6998 6999 /** User preferred subscriptions setting. 7000 * This holds the details of the user selected subscription from the card and 7001 * the activation status. Each settings string have the coma separated values 7002 * iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index 7003 * @hide 7004 */ 7005 public static final String[] MULTI_SIM_USER_PREFERRED_SUBS = {"user_preferred_sub1", 7006 "user_preferred_sub2","user_preferred_sub3"}; 7007 } 7008 7009 /** 7010 * User-defined bookmarks and shortcuts. The target of each bookmark is an 7011 * Intent URL, allowing it to be either a web page or a particular 7012 * application activity. 7013 * 7014 * @hide 7015 */ 7016 public static final class Bookmarks implements BaseColumns 7017 { 7018 private static final String TAG = "Bookmarks"; 7019 7020 /** 7021 * The content:// style URL for this table 7022 */ 7023 public static final Uri CONTENT_URI = 7024 Uri.parse("content://" + AUTHORITY + "/bookmarks"); 7025 7026 /** 7027 * The row ID. 7028 * <p>Type: INTEGER</p> 7029 */ 7030 public static final String ID = "_id"; 7031 7032 /** 7033 * Descriptive name of the bookmark that can be displayed to the user. 7034 * If this is empty, the title should be resolved at display time (use 7035 * {@link #getTitle(Context, Cursor)} any time you want to display the 7036 * title of a bookmark.) 7037 * <P> 7038 * Type: TEXT 7039 * </P> 7040 */ 7041 public static final String TITLE = "title"; 7042 7043 /** 7044 * Arbitrary string (displayed to the user) that allows bookmarks to be 7045 * organized into categories. There are some special names for 7046 * standard folders, which all start with '@'. The label displayed for 7047 * the folder changes with the locale (via {@link #getLabelForFolder}) but 7048 * the folder name does not change so you can consistently query for 7049 * the folder regardless of the current locale. 7050 * 7051 * <P>Type: TEXT</P> 7052 * 7053 */ 7054 public static final String FOLDER = "folder"; 7055 7056 /** 7057 * The Intent URL of the bookmark, describing what it points to. This 7058 * value is given to {@link android.content.Intent#getIntent} to create 7059 * an Intent that can be launched. 7060 * <P>Type: TEXT</P> 7061 */ 7062 public static final String INTENT = "intent"; 7063 7064 /** 7065 * Optional shortcut character associated with this bookmark. 7066 * <P>Type: INTEGER</P> 7067 */ 7068 public static final String SHORTCUT = "shortcut"; 7069 7070 /** 7071 * The order in which the bookmark should be displayed 7072 * <P>Type: INTEGER</P> 7073 */ 7074 public static final String ORDERING = "ordering"; 7075 7076 private static final String[] sIntentProjection = { INTENT }; 7077 private static final String[] sShortcutProjection = { ID, SHORTCUT }; 7078 private static final String sShortcutSelection = SHORTCUT + "=?"; 7079 7080 /** 7081 * Convenience function to retrieve the bookmarked Intent for a 7082 * particular shortcut key. 7083 * 7084 * @param cr The ContentResolver to query. 7085 * @param shortcut The shortcut key. 7086 * 7087 * @return Intent The bookmarked URL, or null if there is no bookmark 7088 * matching the given shortcut. 7089 */ 7090 public static Intent getIntentForShortcut(ContentResolver cr, char shortcut) 7091 { 7092 Intent intent = null; 7093 7094 Cursor c = cr.query(CONTENT_URI, 7095 sIntentProjection, sShortcutSelection, 7096 new String[] { String.valueOf((int) shortcut) }, ORDERING); 7097 // Keep trying until we find a valid shortcut 7098 try { 7099 while (intent == null && c.moveToNext()) { 7100 try { 7101 String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT)); 7102 intent = Intent.parseUri(intentURI, 0); 7103 } catch (java.net.URISyntaxException e) { 7104 // The stored URL is bad... ignore it. 7105 } catch (IllegalArgumentException e) { 7106 // Column not found 7107 Log.w(TAG, "Intent column not found", e); 7108 } 7109 } 7110 } finally { 7111 if (c != null) c.close(); 7112 } 7113 7114 return intent; 7115 } 7116 7117 /** 7118 * Add a new bookmark to the system. 7119 * 7120 * @param cr The ContentResolver to query. 7121 * @param intent The desired target of the bookmark. 7122 * @param title Bookmark title that is shown to the user; null if none 7123 * or it should be resolved to the intent's title. 7124 * @param folder Folder in which to place the bookmark; null if none. 7125 * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If 7126 * this is non-zero and there is an existing bookmark entry 7127 * with this same shortcut, then that existing shortcut is 7128 * cleared (the bookmark is not removed). 7129 * @return The unique content URL for the new bookmark entry. 7130 */ 7131 public static Uri add(ContentResolver cr, 7132 Intent intent, 7133 String title, 7134 String folder, 7135 char shortcut, 7136 int ordering) 7137 { 7138 // If a shortcut is supplied, and it is already defined for 7139 // another bookmark, then remove the old definition. 7140 if (shortcut != 0) { 7141 cr.delete(CONTENT_URI, sShortcutSelection, 7142 new String[] { String.valueOf((int) shortcut) }); 7143 } 7144 7145 ContentValues values = new ContentValues(); 7146 if (title != null) values.put(TITLE, title); 7147 if (folder != null) values.put(FOLDER, folder); 7148 values.put(INTENT, intent.toUri(0)); 7149 if (shortcut != 0) values.put(SHORTCUT, (int) shortcut); 7150 values.put(ORDERING, ordering); 7151 return cr.insert(CONTENT_URI, values); 7152 } 7153 7154 /** 7155 * Return the folder name as it should be displayed to the user. This 7156 * takes care of localizing special folders. 7157 * 7158 * @param r Resources object for current locale; only need access to 7159 * system resources. 7160 * @param folder The value found in the {@link #FOLDER} column. 7161 * 7162 * @return CharSequence The label for this folder that should be shown 7163 * to the user. 7164 */ 7165 public static CharSequence getLabelForFolder(Resources r, String folder) { 7166 return folder; 7167 } 7168 7169 /** 7170 * Return the title as it should be displayed to the user. This takes 7171 * care of localizing bookmarks that point to activities. 7172 * 7173 * @param context A context. 7174 * @param cursor A cursor pointing to the row whose title should be 7175 * returned. The cursor must contain at least the {@link #TITLE} 7176 * and {@link #INTENT} columns. 7177 * @return A title that is localized and can be displayed to the user, 7178 * or the empty string if one could not be found. 7179 */ 7180 public static CharSequence getTitle(Context context, Cursor cursor) { 7181 int titleColumn = cursor.getColumnIndex(TITLE); 7182 int intentColumn = cursor.getColumnIndex(INTENT); 7183 if (titleColumn == -1 || intentColumn == -1) { 7184 throw new IllegalArgumentException( 7185 "The cursor must contain the TITLE and INTENT columns."); 7186 } 7187 7188 String title = cursor.getString(titleColumn); 7189 if (!TextUtils.isEmpty(title)) { 7190 return title; 7191 } 7192 7193 String intentUri = cursor.getString(intentColumn); 7194 if (TextUtils.isEmpty(intentUri)) { 7195 return ""; 7196 } 7197 7198 Intent intent; 7199 try { 7200 intent = Intent.parseUri(intentUri, 0); 7201 } catch (URISyntaxException e) { 7202 return ""; 7203 } 7204 7205 PackageManager packageManager = context.getPackageManager(); 7206 ResolveInfo info = packageManager.resolveActivity(intent, 0); 7207 return info != null ? info.loadLabel(packageManager) : ""; 7208 } 7209 } 7210 7211 /** 7212 * Returns the device ID that we should use when connecting to the mobile gtalk server. 7213 * This is a string like "android-0x1242", where the hex string is the Android ID obtained 7214 * from the GoogleLoginService. 7215 * 7216 * @param androidId The Android ID for this device. 7217 * @return The device ID that should be used when connecting to the mobile gtalk server. 7218 * @hide 7219 */ 7220 public static String getGTalkDeviceId(long androidId) { 7221 return "android-" + Long.toHexString(androidId); 7222 } 7223} 7224