1 /* 2 * Copyright (C) 2006 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.provider; 18 19 import static android.app.Flags.systemTermsOfAddressEnabled; 20 21 import android.Manifest; 22 import android.annotation.CallbackExecutor; 23 import android.annotation.FlaggedApi; 24 import android.annotation.IntDef; 25 import android.annotation.IntRange; 26 import android.annotation.NonNull; 27 import android.annotation.Nullable; 28 import android.annotation.PermissionMethod; 29 import android.annotation.PermissionName; 30 import android.annotation.RequiresPermission; 31 import android.annotation.SdkConstant; 32 import android.annotation.SdkConstant.SdkConstantType; 33 import android.annotation.SuppressLint; 34 import android.annotation.SystemApi; 35 import android.annotation.TestApi; 36 import android.annotation.UserIdInt; 37 import android.app.Activity; 38 import android.app.ActivityThread; 39 import android.app.AppOpsManager; 40 import android.app.Application; 41 import android.app.AutomaticZenRule; 42 import android.app.GrammaticalInflectionManager; 43 import android.app.NotificationChannel; 44 import android.app.NotificationManager; 45 import android.app.SearchManager; 46 import android.app.WallpaperManager; 47 import android.compat.annotation.UnsupportedAppUsage; 48 import android.content.ComponentName; 49 import android.content.ContentResolver; 50 import android.content.ContentValues; 51 import android.content.Context; 52 import android.content.IContentProvider; 53 import android.content.Intent; 54 import android.content.pm.ActivityInfo; 55 import android.content.pm.ApplicationInfo; 56 import android.content.pm.PackageManager; 57 import android.content.pm.ResolveInfo; 58 import android.content.res.Configuration; 59 import android.content.res.Resources; 60 import android.database.ContentObserver; 61 import android.database.Cursor; 62 import android.database.SQLException; 63 import android.location.ILocationManager; 64 import android.location.LocationManager; 65 import android.media.AudioManager; 66 import android.net.ConnectivityManager; 67 import android.net.NetworkScoreManager; 68 import android.net.Uri; 69 import android.net.wifi.SoftApConfiguration; 70 import android.net.wifi.WifiManager; 71 import android.net.wifi.p2p.WifiP2pManager; 72 import android.os.BatteryManager; 73 import android.os.Binder; 74 import android.os.Build; 75 import android.os.Build.VERSION_CODES; 76 import android.os.Bundle; 77 import android.os.DropBoxManager; 78 import android.os.IBinder; 79 import android.os.LocaleList; 80 import android.os.PowerManager; 81 import android.os.PowerManager.AutoPowerSaveModeTriggers; 82 import android.os.Process; 83 import android.os.RemoteCallback; 84 import android.os.RemoteException; 85 import android.os.ResultReceiver; 86 import android.os.ServiceManager; 87 import android.os.UserHandle; 88 import android.service.voice.VisualQueryDetectedResult; 89 import android.speech.tts.TextToSpeech; 90 import android.telephony.TelephonyManager; 91 import android.text.TextUtils; 92 import android.util.AndroidException; 93 import android.util.ArrayMap; 94 import android.util.ArraySet; 95 import android.util.Log; 96 import android.util.MemoryIntArray; 97 import android.util.Slog; 98 import android.view.Display; 99 import android.view.MotionEvent; 100 import android.view.ViewConfiguration; 101 import android.view.Window; 102 import android.view.WindowManager.LayoutParams; 103 import android.widget.Editor; 104 105 import com.android.internal.annotations.GuardedBy; 106 import com.android.internal.util.Preconditions; 107 108 import java.io.IOException; 109 import java.lang.annotation.ElementType; 110 import java.lang.annotation.Retention; 111 import java.lang.annotation.RetentionPolicy; 112 import java.lang.annotation.Target; 113 import java.lang.reflect.Field; 114 import java.net.URISyntaxException; 115 import java.util.ArrayList; 116 import java.util.HashMap; 117 import java.util.HashSet; 118 import java.util.List; 119 import java.util.Locale; 120 import java.util.Map; 121 import java.util.Objects; 122 import java.util.Set; 123 import java.util.concurrent.Executor; 124 import java.util.function.Consumer; 125 126 /** 127 * The Settings provider contains global system-level device preferences. 128 */ 129 public final class Settings { 130 /** @hide */ 131 public static final boolean DEFAULT_OVERRIDEABLE_BY_RESTORE = false; 132 133 // Intent actions for Settings 134 135 /** 136 * Activity Action: Show system settings. 137 * <p> 138 * Input: Nothing. 139 * <p> 140 * Output: Nothing. 141 */ 142 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 143 public static final String ACTION_SETTINGS = "android.settings.SETTINGS"; 144 145 /** 146 * Activity Action: Show settings to provide guide about carrier satellite messaging. 147 * <p> 148 * In some cases, a matching Activity may not exist, so ensure you 149 * safeguard against this. 150 * <p> 151 * Input: Nothing. 152 * <p> 153 * Output: Nothing. 154 */ 155 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 156 public static final String ACTION_SATELLITE_SETTING = "android.settings.SATELLITE_SETTING"; 157 158 /** 159 * Activity Action: Show settings to allow configuration of APNs. 160 * <p> 161 * Input: Nothing. 162 * <p> 163 * Output: Nothing. 164 * 165 * <p class="note"> 166 * In some cases, a matching Activity may not exist, so ensure you 167 * safeguard against this. 168 */ 169 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 170 public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS"; 171 172 /** 173 * Activity Action: Show settings to allow configuration of current location 174 * sources. 175 * <p> 176 * In some cases, a matching Activity may not exist, so ensure you 177 * safeguard against this. 178 * <p> 179 * Input: Nothing. 180 * <p> 181 * Output: Nothing. 182 */ 183 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 184 public static final String ACTION_LOCATION_SOURCE_SETTINGS = 185 "android.settings.LOCATION_SOURCE_SETTINGS"; 186 187 /** 188 * Activity Action: Show settings to allow configuration of location controller extra package. 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 * @hide 198 */ 199 @SystemApi 200 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 201 public static final String ACTION_LOCATION_CONTROLLER_EXTRA_PACKAGE_SETTINGS = 202 "android.settings.LOCATION_CONTROLLER_EXTRA_PACKAGE_SETTINGS"; 203 204 /** 205 * Activity Action: Show scanning settings to allow configuration of Wi-Fi 206 * and Bluetooth scanning settings. 207 * <p> 208 * In some cases, a matching Activity may not exist, so ensure you 209 * safeguard against this. 210 * <p> 211 * Input: Nothing. 212 * <p> 213 * Output: Nothing. 214 * @hide 215 */ 216 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 217 public static final String ACTION_LOCATION_SCANNING_SETTINGS = 218 "android.settings.LOCATION_SCANNING_SETTINGS"; 219 220 /** 221 * Activity Action: Show settings to manage creation/deletion of cloned apps. 222 * <p> 223 * In some cases, a matching Activity may not exist, so ensure you 224 * safeguard against this. 225 * <p> 226 * Input: Nothing. 227 * <p> 228 * Output: Nothing. 229 * @hide 230 */ 231 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 232 public static final String ACTION_MANAGE_CLONED_APPS_SETTINGS = 233 "android.settings.MANAGE_CLONED_APPS_SETTINGS"; 234 235 /** 236 * Activity Action: Show settings to allow configuration of users. 237 * <p> 238 * In some cases, a matching Activity may not exist, so ensure you 239 * safeguard against this. 240 * <p> 241 * Input: Nothing. 242 * <p> 243 * Output: Nothing. 244 * @hide 245 */ 246 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 247 @SystemApi 248 public static final String ACTION_USER_SETTINGS = 249 "android.settings.USER_SETTINGS"; 250 251 /** 252 * Activity Action: Show settings to allow configuration of wireless controls 253 * such as Wi-Fi, Bluetooth and Mobile networks. 254 * <p> 255 * In some cases, a matching Activity may not exist, so ensure you 256 * safeguard against this. 257 * <p> 258 * Input: Nothing. 259 * <p> 260 * Output: Nothing. 261 */ 262 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 263 public static final String ACTION_WIRELESS_SETTINGS = 264 "android.settings.WIRELESS_SETTINGS"; 265 266 /** 267 * Activity Action: Show tether provisioning activity. 268 * 269 * <p> 270 * In some cases, a matching Activity may not exist, so ensure you 271 * safeguard against this. 272 * <p> 273 * Input: {@link ConnectivityManager#EXTRA_TETHER_TYPE} should be included to specify which type 274 * of tethering should be checked. {@link ConnectivityManager#EXTRA_PROVISION_CALLBACK} should 275 * contain a {@link ResultReceiver} which will be called back with a tether result code. 276 * <p> 277 * Output: The result of the provisioning check. 278 * {@link ConnectivityManager#TETHER_ERROR_NO_ERROR} if successful, 279 * {@link ConnectivityManager#TETHER_ERROR_PROVISION_FAILED} for failure. 280 * 281 * @hide 282 */ 283 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 284 @SystemApi 285 public static final String ACTION_TETHER_PROVISIONING_UI = 286 "android.settings.TETHER_PROVISIONING_UI"; 287 288 /** 289 * Activity Action: Show a dialog activity to notify tethering is NOT supported by carrier. 290 * 291 * When {@link android.telephony.CarrierConfigManager#KEY_CARRIER_SUPPORTS_TETHERING_BOOL} 292 * is false, and tethering is started by Settings, this dialog activity will be started to 293 * tell the user that tethering is not supported by carrier. 294 * 295 * @hide 296 */ 297 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 298 @SystemApi 299 public static final String ACTION_TETHER_UNSUPPORTED_CARRIER_UI = 300 "android.settings.TETHER_UNSUPPORTED_CARRIER_UI"; 301 302 /** 303 * Activity Action: Show settings to allow entering/exiting airplane mode. 304 * <p> 305 * In some cases, a matching Activity may not exist, so ensure you 306 * safeguard against this. 307 * <p> 308 * Input: Nothing. 309 * <p> 310 * Output: Nothing. 311 */ 312 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 313 public static final String ACTION_AIRPLANE_MODE_SETTINGS = 314 "android.settings.AIRPLANE_MODE_SETTINGS"; 315 316 /** 317 * Activity Action: Show enabled eSim profile in Settings 318 * <p> 319 * This opens the Settings page for the currently enabled eSim profile 320 * <p> 321 * Input: Nothing. 322 * <p> 323 * Output: Nothing. 324 * @hide 325 */ 326 public static final String ACTION_SHOW_ENABLED_ESIM_PROFILE = 327 "android.settings.SHOW_ENABLED_ESIM_PROFILE"; 328 329 /** 330 * Activity Action: Show mobile data usage list. 331 * <p> 332 * Input: {@link EXTRA_NETWORK_TEMPLATE} and {@link EXTRA_SUB_ID} should be included to specify 333 * how and what mobile data statistics should be collected. 334 * <p> 335 * Output: Nothing 336 * @hide 337 */ 338 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 339 public static final String ACTION_MOBILE_DATA_USAGE = 340 "android.settings.MOBILE_DATA_USAGE"; 341 342 /** @hide */ 343 public static final String EXTRA_NETWORK_TEMPLATE = "network_template"; 344 345 /** 346 * Activity Action: Show One-handed mode Settings page. 347 * <p> 348 * Input: Nothing 349 * <p> 350 * Output: Nothing 351 * @hide 352 */ 353 public static final String ACTION_ONE_HANDED_SETTINGS = 354 "android.settings.action.ONE_HANDED_SETTINGS"; 355 356 /** 357 * Activity Action: Show Double tap power gesture Settings page. 358 * <p> 359 * Input: Nothing 360 * <p> 361 * Output: Nothing 362 * @hide 363 */ 364 public static final String ACTION_DOUBLE_TAP_POWER_SETTINGS = 365 "android.settings.action.DOUBLE_TAP_POWER_SETTINGS"; 366 367 /** 368 * The return values for {@link Settings.Config#set} 369 * @hide 370 */ 371 @IntDef(prefix = "SET_ALL_RESULT_", 372 value = { SET_ALL_RESULT_FAILURE, SET_ALL_RESULT_SUCCESS, SET_ALL_RESULT_DISABLED }) 373 @Retention(RetentionPolicy.SOURCE) 374 @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE}) 375 public @interface SetAllResult {} 376 377 /** 378 * A return value for {@link #KEY_CONFIG_SET_ALL_RETURN}, indicates failure. 379 * @hide 380 */ 381 public static final int SET_ALL_RESULT_FAILURE = 0; 382 383 /** 384 * A return value for {@link #KEY_CONFIG_SET_ALL_RETURN}, indicates success. 385 * @hide 386 */ 387 public static final int SET_ALL_RESULT_SUCCESS = 1; 388 389 /** 390 * A return value for {@link #KEY_CONFIG_SET_ALL_RETURN}, indicates a set all is disabled. 391 * @hide 392 */ 393 public static final int SET_ALL_RESULT_DISABLED = 2; 394 395 /** @hide */ 396 public static final String KEY_CONFIG_SET_ALL_RETURN = "config_set_all_return"; 397 398 /** @hide */ 399 public static final String KEY_CONFIG_GET_SYNC_DISABLED_MODE_RETURN = 400 "config_get_sync_disabled_mode_return"; 401 402 /** 403 * An int extra specifying a subscription ID. 404 * 405 * @see android.telephony.SubscriptionInfo#getSubscriptionId 406 */ 407 public static final String EXTRA_SUB_ID = "android.provider.extra.SUB_ID"; 408 409 /** 410 * Activity Action: Modify Airplane mode settings using a voice command. 411 * <p> 412 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 413 * <p> 414 * This intent MUST be started using 415 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity 416 * startVoiceActivity}. 417 * <p> 418 * Note: The activity implementing this intent MUST verify that 419 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before 420 * modifying the setting. 421 * <p> 422 * Input: To tell which state airplane mode should be set to, add the 423 * {@link #EXTRA_AIRPLANE_MODE_ENABLED} extra to this Intent with the state specified. 424 * If the extra is not included, no changes will be made. 425 * <p> 426 * Output: Nothing. 427 */ 428 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 429 public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE = 430 "android.settings.VOICE_CONTROL_AIRPLANE_MODE"; 431 432 /** 433 * Activity Action: Show settings for accessibility modules. 434 * <p> 435 * In some cases, a matching Activity may not exist, so ensure you 436 * safeguard against this. 437 * <p> 438 * Input: Nothing. 439 * <p> 440 * Output: Nothing. 441 */ 442 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 443 public static final String ACTION_ACCESSIBILITY_SETTINGS = 444 "android.settings.ACCESSIBILITY_SETTINGS"; 445 446 /** 447 * Activity Action: Show detail settings of a particular accessibility service. 448 * <p> 449 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 450 * <p> 451 * Input: {@link Intent#EXTRA_COMPONENT_NAME} must specify the accessibility service component 452 * name to be shown. 453 * <p> 454 * Output: Nothing. 455 * @hide 456 **/ 457 @SystemApi 458 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 459 public static final String ACTION_ACCESSIBILITY_DETAILS_SETTINGS = 460 "android.settings.ACCESSIBILITY_DETAILS_SETTINGS"; 461 462 /** 463 * Activity Action: Show settings to allow configuration of an accessibility 464 * shortcut belonging to an accessibility feature or features. 465 * <p> 466 * Input: ":settings:show_fragment_args" must contain "targets" denoting the services to edit. 467 * <p> 468 * Output: Nothing. 469 * @hide 470 **/ 471 public static final String ACTION_ACCESSIBILITY_SHORTCUT_SETTINGS = 472 "android.settings.ACCESSIBILITY_SHORTCUT_SETTINGS"; 473 474 /** 475 * Activity Action: Show settings to allow configuration of accessibility color and motion. 476 * <p> 477 * In some cases, a matching Activity may not exist, so ensure you 478 * safeguard against this. 479 * <p> 480 * Input: Nothing. 481 * <p> 482 * Output: Nothing. 483 * @hide 484 */ 485 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 486 public static final String ACTION_ACCESSIBILITY_COLOR_MOTION_SETTINGS = 487 "android.settings.ACCESSIBILITY_COLOR_MOTION_SETTINGS"; 488 489 /** 490 * Activity Action: Show settings to allow configuration of accessibility color contrast. 491 * <p> 492 * In some cases, a matching Activity may not exist, so ensure you 493 * safeguard against this. 494 * <p> 495 * Input: Nothing. 496 * <p> 497 * Output: Nothing. 498 * @hide 499 */ 500 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 501 public static final String ACTION_ACCESSIBILITY_COLOR_CONTRAST_SETTINGS = 502 "android.settings.ACCESSIBILITY_COLOR_CONTRAST_SETTINGS"; 503 504 /** 505 * Activity Action: Show settings to allow configuration of Reduce Bright Colors. 506 * <p> 507 * In some cases, a matching Activity may not exist, so ensure you 508 * safeguard against this. 509 * <p> 510 * Input: Nothing. 511 * <p> 512 * Output: Nothing. 513 * @hide 514 */ 515 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 516 public static final String ACTION_REDUCE_BRIGHT_COLORS_SETTINGS = 517 "android.settings.REDUCE_BRIGHT_COLORS_SETTINGS"; 518 519 /** 520 * Activity Action: Show settings to allow configuration of Color correction. 521 * <p> 522 * In some cases, a matching Activity may not exist, so ensure you 523 * safeguard against this. 524 * <p> 525 * Input: Nothing. 526 * <p> 527 * Output: Nothing. 528 * @hide 529 */ 530 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 531 public static final String ACTION_COLOR_CORRECTION_SETTINGS = 532 "com.android.settings.ACCESSIBILITY_COLOR_SPACE_SETTINGS"; 533 534 /** 535 * Activity Action: Show settings to allow configuration of Color inversion. 536 * <p> 537 * In some cases, a matching Activity may not exist, so ensure you 538 * safeguard against this. 539 * <p> 540 * Input: Nothing. 541 * <p> 542 * Output: Nothing. 543 * @hide 544 */ 545 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 546 public static final String ACTION_COLOR_INVERSION_SETTINGS = 547 "android.settings.COLOR_INVERSION_SETTINGS"; 548 549 /** 550 * Activity Action: Show settings to allow configuration of text reading. 551 * <p> 552 * In some cases, a matching Activity may not exist, so ensure you 553 * safeguard against this. 554 * <p> 555 * Input: Nothing. 556 * <p> 557 * Output: Nothing. 558 * @hide 559 */ 560 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 561 public static final String ACTION_TEXT_READING_SETTINGS = 562 "android.settings.TEXT_READING_SETTINGS"; 563 564 /** 565 * Activity Action: Show settings to control access to usage information. 566 * <p> 567 * In some cases, a matching Activity may not exist, so ensure you 568 * safeguard against this. 569 * <p> 570 * Input: Nothing. 571 * <p> 572 * Output: Nothing. 573 */ 574 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 575 public static final String ACTION_USAGE_ACCESS_SETTINGS = 576 "android.settings.USAGE_ACCESS_SETTINGS"; 577 578 /** 579 * Activity Category: Show application settings related to usage access. 580 * <p> 581 * An activity that provides a user interface for adjusting usage access related 582 * preferences for its containing application. Optional but recommended for apps that 583 * use {@link android.Manifest.permission#PACKAGE_USAGE_STATS}. 584 * <p> 585 * The activity may define meta-data to describe what usage access is 586 * used for within their app with {@link #METADATA_USAGE_ACCESS_REASON}, which 587 * will be displayed in Settings. 588 * <p> 589 * Input: Nothing. 590 * <p> 591 * Output: Nothing. 592 */ 593 @SdkConstant(SdkConstantType.INTENT_CATEGORY) 594 public static final String INTENT_CATEGORY_USAGE_ACCESS_CONFIG = 595 "android.intent.category.USAGE_ACCESS_CONFIG"; 596 597 /** 598 * Metadata key: Reason for needing usage access. 599 * <p> 600 * A key for metadata attached to an activity that receives action 601 * {@link #INTENT_CATEGORY_USAGE_ACCESS_CONFIG}, shown to the 602 * user as description of how the app uses usage access. 603 * <p> 604 */ 605 public static final String METADATA_USAGE_ACCESS_REASON = 606 "android.settings.metadata.USAGE_ACCESS_REASON"; 607 608 /** 609 * Activity Action: Show settings to allow configuration of security and 610 * location privacy. 611 * <p> 612 * In some cases, a matching Activity may not exist, so ensure you 613 * safeguard against this. 614 * <p> 615 * Input: Nothing. 616 * <p> 617 * Output: Nothing. 618 */ 619 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 620 public static final String ACTION_SECURITY_SETTINGS = 621 "android.settings.SECURITY_SETTINGS"; 622 623 /** 624 * Activity Action: Show settings to allow configuration of trusted external sources 625 * 626 * Input: Optionally, the Intent's data URI can specify the application package name to 627 * directly invoke the management GUI specific to the package name. For example 628 * "package:com.my.app". 629 * <p> 630 * Output: Nothing. 631 */ 632 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 633 public static final String ACTION_MANAGE_UNKNOWN_APP_SOURCES = 634 "android.settings.MANAGE_UNKNOWN_APP_SOURCES"; 635 636 /** 637 * Activity Action: Show settings to allow configuration of 638 * {@link Manifest.permission#SCHEDULE_EXACT_ALARM} permission 639 * 640 * Input: Optionally, the Intent's data URI can specify the application package name to 641 * directly invoke the management GUI specific to the package name. For example 642 * "package:com.my.app". 643 * <p> 644 * Output: When a package data uri is passed as input, the activity result is set to 645 * {@link android.app.Activity#RESULT_OK} if the permission was granted to the app. Otherwise, 646 * the result is set to {@link android.app.Activity#RESULT_CANCELED}. 647 */ 648 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 649 public static final String ACTION_REQUEST_SCHEDULE_EXACT_ALARM = 650 "android.settings.REQUEST_SCHEDULE_EXACT_ALARM"; 651 652 /** 653 * Activity Action: Show settings to allow configuration of 654 * {@link Manifest.permission#MANAGE_MEDIA} permission 655 * 656 * Input: Optionally, the Intent's data URI can specify the application package name to 657 * directly invoke the management GUI specific to the package name. For example 658 * "package:com.my.app". 659 * <p> 660 * Output: Nothing. 661 */ 662 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 663 public static final String ACTION_REQUEST_MANAGE_MEDIA = 664 "android.settings.REQUEST_MANAGE_MEDIA"; 665 666 /** 667 * Activity Action: Show settings to allow configuration of 668 * {@link Manifest.permission#MEDIA_ROUTING_CONTROL} permission. 669 * 670 * Input: Optionally, the Intent's data URI can specify the application package name to 671 * directly invoke the management GUI specific to the package name. For example 672 * "package:com.my.app". However, modifying this permission setting for any package is allowed 673 * only when that package holds an appropriate companion device profile such as 674 * {@link android.companion.AssociationRequest#DEVICE_PROFILE_WATCH}. 675 * <p> 676 * Output: Nothing. 677 */ 678 @FlaggedApi("com.android.media.flags.enable_privileged_routing_for_media_routing_control") 679 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 680 public static final String ACTION_REQUEST_MEDIA_ROUTING_CONTROL = 681 "android.settings.REQUEST_MEDIA_ROUTING_CONTROL"; 682 683 /** 684 * Activity Action: Show settings to allow configuration of 685 * {@link Manifest.permission#RUN_USER_INITIATED_JOBS} permission 686 * 687 * Input: Optionally, the Intent's data URI can specify the application package name to 688 * directly invoke the management GUI specific to the package name. For example 689 * "package:com.my.app". 690 * <p> 691 * Output: When a package data uri is passed as input, the activity result is set to 692 * {@link android.app.Activity#RESULT_OK} if the permission was granted to the app. Otherwise, 693 * the result is set to {@link android.app.Activity#RESULT_CANCELED}. 694 * 695 * @hide 696 */ 697 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 698 public static final String ACTION_MANAGE_APP_LONG_RUNNING_JOBS = 699 "android.settings.MANAGE_APP_LONG_RUNNING_JOBS"; 700 701 /** 702 * Activity Action: Show settings to allow configuration of cross-profile access for apps 703 * 704 * Input: Optionally, the Intent's data URI can specify the application package name to 705 * directly invoke the management GUI specific to the package name. For example 706 * "package:com.my.app". 707 * <p> 708 * Output: Nothing. 709 * 710 * @hide 711 */ 712 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 713 public static final String ACTION_MANAGE_CROSS_PROFILE_ACCESS = 714 "android.settings.MANAGE_CROSS_PROFILE_ACCESS"; 715 716 /** 717 * Activity Action: Show the "Open by Default" page in a particular application's details page. 718 * <p> 719 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 720 * <p> 721 * Input: The Intent's data URI specifies the application package name 722 * to be shown, with the "package" scheme. That is "package:com.my.app". 723 * <p> 724 * Output: Nothing. 725 */ 726 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 727 public static final String ACTION_APP_OPEN_BY_DEFAULT_SETTINGS = 728 "android.settings.APP_OPEN_BY_DEFAULT_SETTINGS"; 729 730 /** 731 * Activity Action: Show trusted credentials settings, opening to the user tab, 732 * to allow management of installed credentials. 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 * @hide 741 */ 742 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 743 @UnsupportedAppUsage 744 public static final String ACTION_TRUSTED_CREDENTIALS_USER = 745 "com.android.settings.TRUSTED_CREDENTIALS_USER"; 746 747 /** 748 * Activity Action: Show dialog explaining that an installed CA cert may enable 749 * monitoring of encrypted network traffic. 750 * <p> 751 * In some cases, a matching Activity may not exist, so ensure you 752 * safeguard against this. Add {@link #EXTRA_NUMBER_OF_CERTIFICATES} extra to indicate the 753 * number of certificates. 754 * <p> 755 * Input: Nothing. 756 * <p> 757 * Output: Nothing. 758 * @hide 759 */ 760 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 761 public static final String ACTION_MONITORING_CERT_INFO = 762 "com.android.settings.MONITORING_CERT_INFO"; 763 764 /** 765 * Activity Action: Show settings to allow configuration of privacy options, i.e. permission 766 * manager, privacy dashboard, privacy controls and more. 767 * <p> 768 * In some cases, a matching Activity may not exist, so ensure you 769 * safeguard against this. 770 * <p> 771 * Input: Nothing. 772 * <p> 773 * Output: Nothing. 774 */ 775 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 776 public static final String ACTION_PRIVACY_SETTINGS = 777 "android.settings.PRIVACY_SETTINGS"; 778 779 /** 780 * Activity Action: Show privacy controls sub-page, i.e. privacy (camera/mic) toggles and more. 781 * <p> 782 * In some cases, a matching Activity may not exist, so ensure you 783 * safeguard against this. 784 * <p> 785 * Input: Nothing. 786 * <p> 787 * Output: Nothing. 788 * @hide 789 */ 790 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 791 public static final String ACTION_PRIVACY_CONTROLS = 792 "android.settings.PRIVACY_CONTROLS"; 793 794 /** 795 * Activity Action: Show settings to allow configuration of VPN. 796 * <p> 797 * In some cases, a matching Activity may not exist, so ensure you 798 * safeguard against this. 799 * <p> 800 * Input: Nothing. 801 * <p> 802 * Output: Nothing. 803 */ 804 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 805 public static final String ACTION_VPN_SETTINGS = 806 "android.settings.VPN_SETTINGS"; 807 808 /** 809 * Activity Action: Show settings to allow configuration of Wi-Fi. 810 * <p> 811 * In some cases, a matching Activity may not exist, so ensure you 812 * safeguard against this. 813 * <p> 814 * Input: Nothing. 815 * <p> 816 * Output: Nothing. 817 */ 818 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 819 public static final String ACTION_WIFI_SETTINGS = 820 "android.settings.WIFI_SETTINGS"; 821 822 /** 823 * Activity Action: Show settings to allow configuration of Advanced memory protection. 824 * <p> 825 * Memory Tagging Extension (MTE) is a CPU extension that allows to protect against certain 826 * classes of security problems at a small runtime performance cost overhead. 827 * <p> 828 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 829 * <p> 830 * Input: Nothing. 831 * <p> 832 * Output: Nothing. 833 */ 834 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 835 public static final String ACTION_ADVANCED_MEMORY_PROTECTION_SETTINGS = 836 "android.settings.ADVANCED_MEMORY_PROTECTION_SETTINGS"; 837 838 /** 839 * Activity Action: Show settings to allow configuration of a static IP 840 * address for Wi-Fi. 841 * <p> 842 * In some cases, a matching Activity may not exist, so ensure you safeguard 843 * against this. 844 * <p> 845 * Input: Nothing. 846 * <p> 847 * Output: Nothing. 848 */ 849 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 850 public static final String ACTION_WIFI_IP_SETTINGS = 851 "android.settings.WIFI_IP_SETTINGS"; 852 853 /** 854 * Activity Action: Show setting page to process a Wi-Fi Easy Connect (aka DPP) URI and start 855 * configuration. This intent should be used when you want to use this device to take on the 856 * configurator role for an IoT/other device. When provided with a valid DPP URI 857 * string, Settings will open a Wi-Fi selection screen for the user to indicate which network 858 * they would like to configure the device specified in the DPP URI string and 859 * carry them through the rest of the flow for provisioning the device. 860 * <p> 861 * In some cases, a matching Activity may not exist, so ensure to safeguard against this by 862 * checking {@link WifiManager#isEasyConnectSupported()}. 863 * <p> 864 * Input: The Intent's data URI specifies bootstrapping information for authenticating and 865 * provisioning the peer, and uses a "DPP" scheme. The URI should be attached to the intent 866 * using {@link Intent#setData(Uri)}. The calling app can obtain a DPP URI in any 867 * way, e.g. by scanning a QR code or other out-of-band methods. The calling app may also 868 * attach the {@link #EXTRA_EASY_CONNECT_BAND_LIST} extra to provide information 869 * about the bands supported by the enrollee device. 870 * <p> 871 * Output: After calling {@link android.app.Activity#startActivityForResult}, the callback 872 * {@code onActivityResult} will have resultCode {@link android.app.Activity#RESULT_OK} if 873 * the Wi-Fi Easy Connect configuration succeeded and the user tapped the 'Done' button, or 874 * {@link android.app.Activity#RESULT_CANCELED} if the operation failed and user tapped the 875 * 'Cancel' button. In case the operation has failed, a status code from 876 * {@link android.net.wifi.EasyConnectStatusCallback} {@code EASY_CONNECT_EVENT_FAILURE_*} will 877 * be returned as an Extra {@link #EXTRA_EASY_CONNECT_ERROR_CODE}. Easy Connect R2 878 * Enrollees report additional details about the error they encountered, which will be 879 * provided in the {@link #EXTRA_EASY_CONNECT_ATTEMPTED_SSID}, 880 * {@link #EXTRA_EASY_CONNECT_CHANNEL_LIST}, and {@link #EXTRA_EASY_CONNECT_BAND_LIST}. 881 */ 882 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 883 public static final String ACTION_PROCESS_WIFI_EASY_CONNECT_URI = 884 "android.settings.PROCESS_WIFI_EASY_CONNECT_URI"; 885 886 /** 887 * Activity Extra: The Easy Connect operation error code 888 * <p> 889 * An extra returned on the result intent received when using the 890 * {@link #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation. 891 * This extra contains the integer error code of the operation - one of 892 * {@link android.net.wifi.EasyConnectStatusCallback} {@code EASY_CONNECT_EVENT_FAILURE_*}. If 893 * there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK}, 894 * then this extra is not attached to the result intent. 895 * <p> 896 * Use the {@link Intent#hasExtra(String)} to determine whether the extra is attached and 897 * {@link Intent#getIntExtra(String, int)} to obtain the error code data. 898 */ 899 public static final String EXTRA_EASY_CONNECT_ERROR_CODE = 900 "android.provider.extra.EASY_CONNECT_ERROR_CODE"; 901 902 /** 903 * Activity Extra: The SSID that the Enrollee tried to connect to. 904 * <p> 905 * An extra returned on the result intent received when using the {@link 906 * #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation. This 907 * extra contains the SSID of the Access Point that the remote Enrollee tried to connect to. 908 * This value is populated only by remote R2 devices, and only for the following error codes: 909 * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK} 910 * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION}. 911 * Therefore, always check if this extra is available using {@link Intent#hasExtra(String)}. If 912 * there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK}, then 913 * this extra is not attached to the result intent. 914 * <p> 915 * Use the {@link Intent#getStringExtra(String)} to obtain the SSID. 916 */ 917 public static final String EXTRA_EASY_CONNECT_ATTEMPTED_SSID = 918 "android.provider.extra.EASY_CONNECT_ATTEMPTED_SSID"; 919 920 /** 921 * Activity Extra: The Channel List that the Enrollee used to scan a network. 922 * <p> 923 * An extra returned on the result intent received when using the {@link 924 * #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation. This 925 * extra contains the channel list that the Enrollee scanned for a network. This value is 926 * populated only by remote R2 devices, and only for the following error code: {@link 927 * android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK}. 928 * Therefore, always check if this extra is available using {@link Intent#hasExtra(String)}. If 929 * there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK}, then 930 * this extra is not attached to the result intent. The list is JSON formatted, as an array 931 * (Wi-Fi global operating classes) of arrays (Wi-Fi channels). 932 * <p> 933 * Use the {@link Intent#getStringExtra(String)} to obtain the list. 934 */ 935 public static final String EXTRA_EASY_CONNECT_CHANNEL_LIST = 936 "android.provider.extra.EASY_CONNECT_CHANNEL_LIST"; 937 938 /** 939 * Activity Extra: The Band List that the Enrollee supports. 940 * <p> 941 * This extra contains the bands the Enrollee supports, expressed as the Global Operating 942 * Class, see Table E-4 in IEEE Std 802.11-2016 Global operating classes. It is used both as 943 * input, to configure the Easy Connect operation and as output of the operation. 944 * <p> 945 * As input: an optional extra to be attached to the 946 * {@link #ACTION_PROCESS_WIFI_EASY_CONNECT_URI}. If attached, it indicates the bands which 947 * the remote device (enrollee, device-to-be-configured) supports. The Settings operation 948 * may take this into account when presenting the user with list of networks configurations 949 * to be used. The calling app may obtain this information in any out-of-band method. The 950 * information should be attached as an array of raw integers - using the 951 * {@link Intent#putExtra(String, int[])}. 952 * <p> 953 * As output: an extra returned on the result intent received when using the 954 * {@link #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation 955 * . This value is populated only by remote R2 devices, and only for the following error 956 * codes: 957 * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK}, 958 * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION}, 959 * or 960 * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_ENROLLEE_REJECTED_CONFIGURATION}. 961 * Therefore, always check if this extra is available using {@link Intent#hasExtra(String)}. 962 * If there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK} 963 * , then this extra is not attached to the result intent. 964 * <p> 965 * Use the {@link Intent#getIntArrayExtra(String)} to obtain the list. 966 */ 967 public static final String EXTRA_EASY_CONNECT_BAND_LIST = 968 "android.provider.extra.EASY_CONNECT_BAND_LIST"; 969 970 /** 971 * Activity Action: Show settings to allow configuration of data and view data usage. 972 * <p> 973 * In some cases, a matching Activity may not exist, so ensure you 974 * safeguard against this. 975 * <p> 976 * Input: Nothing. 977 * <p> 978 * Output: Nothing. 979 */ 980 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 981 public static final String ACTION_DATA_USAGE_SETTINGS = 982 "android.settings.DATA_USAGE_SETTINGS"; 983 984 /** 985 * Activity Action: Show settings to allow configuration of Bluetooth. 986 * <p> 987 * In some cases, a matching Activity may not exist, so ensure you 988 * safeguard against this. 989 * <p> 990 * Input: Nothing. 991 * <p> 992 * Output: Nothing. 993 */ 994 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 995 public static final String ACTION_BLUETOOTH_SETTINGS = 996 "android.settings.BLUETOOTH_SETTINGS"; 997 998 /** 999 * Activity Action: Show settings to allow configuration of Hearing Devices. 1000 * <p> 1001 * In some cases, a matching Activity may not exist, so ensure you 1002 * safeguard against this. 1003 * <p> 1004 * Input: Nothing. 1005 * <p> 1006 * Output: Nothing. 1007 * @hide 1008 */ 1009 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1010 public static final String ACTION_HEARING_DEVICES_SETTINGS = 1011 "android.settings.HEARING_DEVICES_SETTINGS"; 1012 1013 /** 1014 * Activity action: Show Settings app search UI when this action is available for device. 1015 * <p> 1016 * Input: Nothing. 1017 * <p> 1018 * Output: Nothing. 1019 */ 1020 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1021 public static final String ACTION_APP_SEARCH_SETTINGS = "android.settings.APP_SEARCH_SETTINGS"; 1022 1023 /** 1024 * Activity Action: Show settings to allow configuration of Assist Gesture. 1025 * <p> 1026 * In some cases, a matching Activity may not exist, so ensure you 1027 * safeguard against this. 1028 * <p> 1029 * Input: Nothing. 1030 * <p> 1031 * Output: Nothing. 1032 * @hide 1033 */ 1034 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1035 public static final String ACTION_ASSIST_GESTURE_SETTINGS = 1036 "android.settings.ASSIST_GESTURE_SETTINGS"; 1037 1038 /** 1039 * Activity Action: Show settings to enroll fingerprints, and setup PIN/Pattern/Pass if 1040 * necessary. 1041 * @deprecated See {@link #ACTION_BIOMETRIC_ENROLL}. 1042 * <p> 1043 * Input: Nothing. 1044 * <p> 1045 * Output: Nothing. 1046 */ 1047 @Deprecated 1048 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1049 public static final String ACTION_FINGERPRINT_ENROLL = 1050 "android.settings.FINGERPRINT_ENROLL"; 1051 1052 /** 1053 * Activity Action: Show settings to enroll biometrics, and setup PIN/Pattern/Pass if 1054 * necessary. By default, this prompts the user to enroll biometrics with strength 1055 * Weak or above, as defined by the CDD. Only biometrics that meet or exceed Strong, as defined 1056 * in the CDD are allowed to participate in Keystore operations. 1057 * <p> 1058 * Input: extras {@link #EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED} as an integer, with 1059 * constants defined in {@link android.hardware.biometrics.BiometricManager.Authenticators}, 1060 * e.g. {@link android.hardware.biometrics.BiometricManager.Authenticators#BIOMETRIC_STRONG}. 1061 * If not specified, the default behavior is 1062 * {@link android.hardware.biometrics.BiometricManager.Authenticators#BIOMETRIC_WEAK}. 1063 * <p> 1064 * Output: Nothing. Note that callers should still check 1065 * {@link android.hardware.biometrics.BiometricManager#canAuthenticate(int)} 1066 * afterwards to ensure that the user actually completed enrollment. 1067 */ 1068 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1069 public static final String ACTION_BIOMETRIC_ENROLL = 1070 "android.settings.BIOMETRIC_ENROLL"; 1071 1072 /** 1073 * Activity Extra: The minimum strength to request enrollment for. 1074 * <p> 1075 * This can be passed as an extra field to the {@link #ACTION_BIOMETRIC_ENROLL} intent to 1076 * indicate that only enrollment for sensors that meet these requirements should be shown. The 1077 * value should be a combination of the constants defined in 1078 * {@link android.hardware.biometrics.BiometricManager.Authenticators}. 1079 */ 1080 public static final String EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED = 1081 "android.provider.extra.BIOMETRIC_AUTHENTICATORS_ALLOWED"; 1082 1083 /** 1084 * Activity Action: Show settings to allow configuration of cast endpoints. 1085 * <p> 1086 * In some cases, a matching Activity may not exist, so ensure you 1087 * safeguard against this. 1088 * <p> 1089 * Input: Nothing. 1090 * <p> 1091 * Output: Nothing. 1092 */ 1093 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1094 public static final String ACTION_CAST_SETTINGS = 1095 "android.settings.CAST_SETTINGS"; 1096 1097 /** 1098 * Activity Action: Show settings to allow configuration of date and time. 1099 * <p> 1100 * In some cases, a matching Activity may not exist, so ensure you 1101 * safeguard against this. 1102 * <p> 1103 * Input: Nothing. 1104 * <p> 1105 * Output: Nothing. 1106 */ 1107 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1108 public static final String ACTION_DATE_SETTINGS = 1109 "android.settings.DATE_SETTINGS"; 1110 1111 /** 1112 * Activity Action: Show settings to allow configuration of sound and volume. 1113 * <p> 1114 * In some cases, a matching Activity may not exist, so ensure you 1115 * safeguard against this. 1116 * <p> 1117 * Input: Nothing. 1118 * <p> 1119 * Output: Nothing. 1120 */ 1121 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1122 public static final String ACTION_SOUND_SETTINGS = 1123 "android.settings.SOUND_SETTINGS"; 1124 1125 /** 1126 * Activity Action: Show settings to allow configuration of display. 1127 * <p> 1128 * In some cases, a matching Activity may not exist, so ensure you 1129 * safeguard against this. 1130 * <p> 1131 * Input: Nothing. 1132 * <p> 1133 * Output: Nothing. 1134 */ 1135 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1136 public static final String ACTION_DISPLAY_SETTINGS = 1137 "android.settings.DISPLAY_SETTINGS"; 1138 1139 /** 1140 * Activity Action: Show Auto Rotate configuration settings. 1141 */ 1142 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1143 public static final String ACTION_AUTO_ROTATE_SETTINGS = 1144 "android.settings.AUTO_ROTATE_SETTINGS"; 1145 1146 /** 1147 * Activity Action: Show settings to allow configuration of Night display. 1148 * <p> 1149 * In some cases, a matching Activity may not exist, so ensure you 1150 * safeguard against this. 1151 * <p> 1152 * Input: Nothing. 1153 * <p> 1154 * Output: Nothing. 1155 */ 1156 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1157 public static final String ACTION_NIGHT_DISPLAY_SETTINGS = 1158 "android.settings.NIGHT_DISPLAY_SETTINGS"; 1159 1160 /** 1161 * Activity Action: Show settings to allow configuration of Dark theme. 1162 * <p> 1163 * In some cases, a matching Activity may not exist, so ensure you 1164 * safeguard against this. 1165 * <p> 1166 * Input: Nothing. 1167 * <p> 1168 * Output: Nothing. 1169 * 1170 * @hide 1171 */ 1172 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1173 public static final String ACTION_DARK_THEME_SETTINGS = 1174 "android.settings.DARK_THEME_SETTINGS"; 1175 1176 /** 1177 * Activity Action: Show settings to allow configuration of locale. 1178 * <p> 1179 * In some cases, a matching Activity may not exist, so ensure you 1180 * safeguard against this. 1181 * <p> 1182 * Input: The optional {@code #EXTRA_EXPLICIT_LOCALES} with language tags that contains locales 1183 * to limit available locales. This is only supported when device is under demo mode. 1184 * If intent does not contain this extra, it will show system supported locale list. 1185 * <br/> 1186 * If {@code #EXTRA_EXPLICIT_LOCALES} contain a unsupported locale, it will still show this 1187 * locale on list, but may not be supported by the devcie. 1188 * 1189 * Output: Nothing. 1190 */ 1191 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1192 public static final String ACTION_LOCALE_SETTINGS = 1193 "android.settings.LOCALE_SETTINGS"; 1194 1195 /** 1196 * Activity Extra: Show explicit locales in launched locale picker activity. 1197 * 1198 * This can be passed as an extra field in an Activity Intent with one or more language tags 1199 * as a {@link LocaleList}. This must be passed as an extra field to the 1200 * {@link #ACTION_LOCALE_SETTINGS}. 1201 * 1202 * @hide 1203 */ 1204 public static final String EXTRA_EXPLICIT_LOCALES = 1205 "android.provider.extra.EXPLICIT_LOCALES"; 1206 1207 /** 1208 * Activity Action: Show settings to allow configuration of per application locale. 1209 * <p> 1210 * Input: The Intent's data URI can specify the application package name to directly invoke the 1211 * app locale details GUI specific to the package name. 1212 * For example "package:com.my.app". 1213 * <p> 1214 * Output: Nothing. 1215 */ 1216 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1217 public static final String ACTION_APP_LOCALE_SETTINGS = 1218 "android.settings.APP_LOCALE_SETTINGS"; 1219 1220 /** 1221 * Activity Action: Show settings to allow configuration of regional preferences 1222 * <p> 1223 * Input: Nothing 1224 * <p> 1225 * Output: Nothing. 1226 */ 1227 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1228 public static final String ACTION_REGIONAL_PREFERENCES_SETTINGS = 1229 "android.settings.REGIONAL_PREFERENCES_SETTINGS"; 1230 1231 /** 1232 * Activity Action: Show screen for allowing the region configuration. 1233 * <p> 1234 * Input: Nothing. 1235 * <p> 1236 * Output: Nothing. 1237 */ 1238 @FlaggedApi(Flags.FLAG_SYSTEM_REGIONAL_PREFERENCES_API_ENABLED) 1239 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1240 public static final String ACTION_REGION_SETTINGS = 1241 "android.settings.REGION_SETTINGS"; 1242 1243 /** 1244 * Activity Action: Show first day of week configuration settings. 1245 * <p> 1246 * Input: Nothing. 1247 * <p> 1248 * Output: Nothing. 1249 */ 1250 @FlaggedApi(Flags.FLAG_SYSTEM_REGIONAL_PREFERENCES_API_ENABLED) 1251 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1252 public static final String ACTION_FIRST_DAY_OF_WEEK_SETTINGS = 1253 "android.settings.FIRST_DAY_OF_WEEK_SETTINGS"; 1254 1255 /** 1256 * Activity Action: Show temperature unit configuration settings. 1257 * <p> 1258 * Input: Nothing. 1259 * <p> 1260 * Output: Nothing. 1261 */ 1262 @FlaggedApi(Flags.FLAG_SYSTEM_REGIONAL_PREFERENCES_API_ENABLED) 1263 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1264 public static final String ACTION_TEMPERATURE_UNIT_SETTINGS = 1265 "android.settings.TEMPERATURE_UNIT_SETTINGS"; 1266 1267 /** 1268 * Activity Action: Show measurement system configuration settings. 1269 * <p> 1270 * Input: Nothing. 1271 * <p> 1272 * Output: Nothing. 1273 */ 1274 @FlaggedApi(Flags.FLAG_SYSTEM_REGIONAL_PREFERENCES_API_ENABLED) 1275 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1276 public static final String ACTION_MEASUREMENT_SYSTEM_SETTINGS = 1277 "android.settings.MEASUREMENT_SYSTEM_SETTINGS"; 1278 1279 /** 1280 * Activity Action: Show settings to allow configuration of lockscreen. 1281 * <p> 1282 * In some cases, a matching Activity may not exist, so ensure you 1283 * safeguard against this. 1284 * <p> 1285 * Input: Nothing. 1286 * <p> 1287 * Output: Nothing. 1288 * 1289 * @hide 1290 */ 1291 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1292 public static final String ACTION_LOCKSCREEN_SETTINGS = "android.settings.LOCK_SCREEN_SETTINGS"; 1293 1294 /** 1295 * Activity Action: Show settings of notifications on lockscreen. 1296 * <p> 1297 * In some cases, a matching Activity may not exist, so ensure you 1298 * safeguard against this. 1299 * <p> 1300 * Input: Nothing. 1301 * <p> 1302 * Output: Nothing. 1303 * 1304 * @hide 1305 */ 1306 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1307 public static final String ACTION_LOCKSCREEN_NOTIFICATIONS_SETTINGS = 1308 "android.settings.LOCK_SCREEN_NOTIFICATIONS_SETTINGS"; 1309 1310 /** 1311 * Activity Action: Show settings to allow pairing bluetooth devices. 1312 * <p> 1313 * In some cases, a matching Activity may not exist, so ensure you 1314 * safeguard against this. 1315 * <p> 1316 * Input: Nothing. 1317 * <p> 1318 * Output: Nothing. 1319 * 1320 * @hide 1321 */ 1322 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1323 public static final String ACTION_BLUETOOTH_PAIRING_SETTINGS = 1324 "android.settings.BLUETOOTH_PAIRING_SETTINGS"; 1325 1326 /** 1327 * Activity Action: Show settings to allow pairing hearing devices. 1328 * <p> 1329 * In some cases, a matching Activity may not exist, so ensure you 1330 * safeguard against this. 1331 * <p> 1332 * Input: Nothing. 1333 * <p> 1334 * Output: Nothing. 1335 * 1336 * @hide 1337 */ 1338 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1339 public static final String ACTION_HEARING_DEVICE_PAIRING_SETTINGS = 1340 "android.settings.HEARING_DEVICES_PAIRING_SETTINGS"; 1341 1342 /** 1343 * Activity Action: Show settings to configure input methods, in particular 1344 * allowing the user to enable input methods. 1345 * <p> 1346 * In some cases, a matching Activity may not exist, so ensure you 1347 * safeguard against this. 1348 * <p> 1349 * Input: Nothing. 1350 * <p> 1351 * Output: Nothing. 1352 */ 1353 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1354 public static final String ACTION_VOICE_INPUT_SETTINGS = 1355 "android.settings.VOICE_INPUT_SETTINGS"; 1356 1357 /** 1358 * Activity Action: Show settings to configure input methods, in particular 1359 * allowing the user to enable input methods. 1360 * <p> 1361 * In some cases, a matching Activity may not exist, so ensure you 1362 * safeguard against this. 1363 * <p> 1364 * Input: Nothing. 1365 * <p> 1366 * Output: Nothing. 1367 */ 1368 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1369 public static final String ACTION_INPUT_METHOD_SETTINGS = 1370 "android.settings.INPUT_METHOD_SETTINGS"; 1371 1372 /** 1373 * Activity Action: Show settings to enable/disable input method subtypes. 1374 * <p> 1375 * In some cases, a matching Activity may not exist, so ensure you 1376 * safeguard against this. 1377 * <p> 1378 * To tell which input method's subtypes are displayed in the settings, add 1379 * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id. 1380 * If there is no extra in this Intent, subtypes from all installed input methods 1381 * will be displayed in the settings. 1382 * 1383 * @see android.view.inputmethod.InputMethodInfo#getId 1384 * <p> 1385 * Input: Nothing. 1386 * <p> 1387 * Output: Nothing. 1388 */ 1389 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1390 public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS = 1391 "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS"; 1392 1393 /** 1394 * Activity Action: Show settings to manage the user input dictionary. 1395 * <p> 1396 * Starting with {@link android.os.Build.VERSION_CODES#KITKAT}, 1397 * it is guaranteed there will always be an appropriate implementation for this Intent action. 1398 * In prior releases of the platform this was optional, so ensure you safeguard against it. 1399 * <p> 1400 * Input: Nothing. 1401 * <p> 1402 * Output: Nothing. 1403 */ 1404 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1405 public static final String ACTION_USER_DICTIONARY_SETTINGS = 1406 "android.settings.USER_DICTIONARY_SETTINGS"; 1407 1408 /** 1409 * Activity Action: Show settings to configure the hardware keyboard. 1410 * <p> 1411 * In some cases, a matching Activity may not exist, so ensure you 1412 * safeguard against this. 1413 * <p> 1414 * Input: Nothing. 1415 * <p> 1416 * Output: Nothing. 1417 */ 1418 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1419 public static final String ACTION_HARD_KEYBOARD_SETTINGS = 1420 "android.settings.HARD_KEYBOARD_SETTINGS"; 1421 1422 /** 1423 * Activity Action: Adds a word to the user dictionary. 1424 * <p> 1425 * In some cases, a matching Activity may not exist, so ensure you 1426 * safeguard against this. 1427 * <p> 1428 * Input: An extra with key <code>word</code> that contains the word 1429 * that should be added to the dictionary. 1430 * <p> 1431 * Output: Nothing. 1432 * 1433 * @hide 1434 */ 1435 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1436 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 1437 public static final String ACTION_USER_DICTIONARY_INSERT = 1438 "com.android.settings.USER_DICTIONARY_INSERT"; 1439 1440 /** 1441 * Activity Action: Show settings to allow configuration of application-related settings. 1442 * <p> 1443 * In some cases, a matching Activity may not exist, so ensure you 1444 * safeguard against this. 1445 * <p> 1446 * Input: Nothing. 1447 * <p> 1448 * Output: Nothing. 1449 */ 1450 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1451 public static final String ACTION_APPLICATION_SETTINGS = 1452 "android.settings.APPLICATION_SETTINGS"; 1453 1454 /** 1455 * Activity Action: Show settings to allow configuration of application 1456 * development-related settings. As of 1457 * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is 1458 * a required part of the platform. 1459 * <p> 1460 * Input: Nothing. 1461 * <p> 1462 * Output: Nothing. 1463 */ 1464 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1465 public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS = 1466 "android.settings.APPLICATION_DEVELOPMENT_SETTINGS"; 1467 1468 /** 1469 * Activity Action: Show settings to allow configuration of quick launch shortcuts. 1470 * <p> 1471 * In some cases, a matching Activity may not exist, so ensure you 1472 * safeguard against this. 1473 * <p> 1474 * Input: Nothing. 1475 * <p> 1476 * Output: Nothing. 1477 */ 1478 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1479 public static final String ACTION_QUICK_LAUNCH_SETTINGS = 1480 "android.settings.QUICK_LAUNCH_SETTINGS"; 1481 1482 /** 1483 * Activity Action: Showing settings to manage adaptive notifications. 1484 * <p> 1485 * Input: Nothing. 1486 * <p> 1487 * Output: Nothing. 1488 * 1489 * @hide 1490 */ 1491 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1492 public static final String ACTION_MANAGE_ADAPTIVE_NOTIFICATIONS = 1493 "android.settings.MANAGE_ADAPTIVE_NOTIFICATIONS"; 1494 1495 /** 1496 * Activity Action: Show settings to manage installed applications. 1497 * <p> 1498 * In some cases, a matching Activity may not exist, so ensure you 1499 * safeguard against this. 1500 * <p> 1501 * Input: Nothing. 1502 * <p> 1503 * Output: Nothing. 1504 */ 1505 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1506 public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS = 1507 "android.settings.MANAGE_APPLICATIONS_SETTINGS"; 1508 1509 /** 1510 * Activity Action: Show settings to manage all applications. 1511 * <p> 1512 * In some cases, a matching Activity may not exist, so ensure you 1513 * safeguard against this. 1514 * <p> 1515 * Input: Nothing. 1516 * <p> 1517 * Output: Nothing. 1518 */ 1519 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1520 public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS = 1521 "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS"; 1522 1523 /** 1524 * Activity Action: Show settings to manage all SIM profiles. 1525 * <p> 1526 * In some cases, a matching Activity may not exist, so ensure you 1527 * safeguard against this. 1528 * <p> 1529 * Input: Nothing. 1530 * <p> 1531 * Output: Nothing. 1532 */ 1533 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1534 public static final String ACTION_MANAGE_ALL_SIM_PROFILES_SETTINGS = 1535 "android.settings.MANAGE_ALL_SIM_PROFILES_SETTINGS"; 1536 1537 /** 1538 * Activity Action: Show screen for controlling which apps can draw on top of other apps. 1539 * <p> 1540 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 1541 * <p> 1542 * Input: Optionally, in versions of Android prior to {@link android.os.Build.VERSION_CODES#R}, 1543 * the Intent's data URI can specify the application package name to directly invoke the 1544 * management GUI specific to the package name. 1545 * For example "package:com.my.app". 1546 * <p> 1547 * Output: Nothing. 1548 */ 1549 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1550 public static final String ACTION_MANAGE_OVERLAY_PERMISSION = 1551 "android.settings.action.MANAGE_OVERLAY_PERMISSION"; 1552 1553 /** 1554 * Activity Action: Show screen for controlling if the app specified in the data URI of the 1555 * intent can draw on top of other apps. 1556 * <p> 1557 * Unlike {@link #ACTION_MANAGE_OVERLAY_PERMISSION}, which in Android {@link 1558 * android.os.Build.VERSION_CODES#R} can't be used to show a GUI for a specific package, 1559 * permission {@code android.permission.INTERNAL_SYSTEM_WINDOW} is needed to start an activity 1560 * with this intent. 1561 * <p> 1562 * In some cases, a matching Activity may not exist, so ensure you 1563 * safeguard against this. 1564 * <p> 1565 * Input: The Intent's data URI MUST specify the application package name whose ability of 1566 * drawing on top of other apps you want to control. 1567 * For example "package:com.my.app". 1568 * <p> 1569 * Output: Nothing. 1570 * 1571 * @hide 1572 */ 1573 @SystemApi 1574 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1575 public static final String ACTION_MANAGE_APP_OVERLAY_PERMISSION = 1576 "android.settings.MANAGE_APP_OVERLAY_PERMISSION"; 1577 1578 /** 1579 * Activity Action: Show screen for controlling which apps are allowed to write/modify 1580 * system settings. 1581 * <p> 1582 * In some cases, a matching Activity may not exist, so ensure you 1583 * safeguard against this. 1584 * <p> 1585 * Input: Optionally, the Intent's data URI can specify the application package name to 1586 * directly invoke the management GUI specific to the package name. For example 1587 * "package:com.my.app". 1588 * <p> 1589 * Output: Nothing. 1590 */ 1591 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1592 public static final String ACTION_MANAGE_WRITE_SETTINGS = 1593 "android.settings.action.MANAGE_WRITE_SETTINGS"; 1594 1595 /** 1596 * Activity Action: Show screen for controlling app usage properties for an app. 1597 * Input: Intent's extra {@link android.content.Intent#EXTRA_PACKAGE_NAME} must specify the 1598 * application package name. 1599 * Output: Nothing. 1600 */ 1601 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1602 public static final String ACTION_APP_USAGE_SETTINGS = 1603 "android.settings.action.APP_USAGE_SETTINGS"; 1604 1605 /** 1606 * Activity Action: Show screen of details about a particular application. 1607 * <p> 1608 * In some cases, a matching Activity may not exist, so ensure you 1609 * safeguard against this. 1610 * <p> 1611 * Input: The Intent's data URI specifies the application package name 1612 * to be shown, with the "package" scheme. That is "package:com.my.app". 1613 * <p> 1614 * Output: Nothing. 1615 */ 1616 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1617 public static final String ACTION_APPLICATION_DETAILS_SETTINGS = 1618 "android.settings.APPLICATION_DETAILS_SETTINGS"; 1619 1620 /** 1621 * Activity Action: Show list of applications that have been running 1622 * foreground services (to the user "running in the background"). 1623 * <p> 1624 * Input: Extras "packages" is a string array of package names. 1625 * <p> 1626 * Output: Nothing. 1627 * @hide 1628 */ 1629 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1630 public static final String ACTION_FOREGROUND_SERVICES_SETTINGS = 1631 "android.settings.FOREGROUND_SERVICES_SETTINGS"; 1632 1633 /** 1634 * Activity Action: Show screen for controlling which apps can ignore battery optimizations. 1635 * <p> 1636 * Input: Nothing. 1637 * <p> 1638 * Output: Nothing. 1639 * <p> 1640 * You can use {@link android.os.PowerManager#isIgnoringBatteryOptimizations 1641 * PowerManager.isIgnoringBatteryOptimizations()} to determine if an application is 1642 * already ignoring optimizations. You can use 1643 * {@link #ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS} to ask the user to put you 1644 * on this list. 1645 */ 1646 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1647 public static final String ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS = 1648 "android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS"; 1649 1650 /** 1651 * Activity Action: Ask the user to allow an app to ignore battery optimizations (that is, 1652 * put them on the allowlist of apps shown by 1653 * {@link #ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS}). For an app to use this, it also 1654 * must hold the {@link android.Manifest.permission#REQUEST_IGNORE_BATTERY_OPTIMIZATIONS} 1655 * permission. 1656 * <p><b>Note:</b> most applications should <em>not</em> use this; there are many facilities 1657 * provided by the platform for applications to operate correctly in the various power 1658 * saving modes. This is only for unusual applications that need to deeply control their own 1659 * execution, at the potential expense of the user's battery life. Note that these applications 1660 * greatly run the risk of showing to the user as high power consumers on their device.</p> 1661 * <p> 1662 * Input: The Intent's data URI must specify the application package name 1663 * to be shown, with the "package" scheme. That is "package:com.my.app". 1664 * <p> 1665 * Output: Nothing. 1666 * <p> 1667 * You can use {@link android.os.PowerManager#isIgnoringBatteryOptimizations 1668 * PowerManager.isIgnoringBatteryOptimizations()} to determine if an application is 1669 * already ignoring optimizations. 1670 */ 1671 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1672 public static final String ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = 1673 "android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"; 1674 1675 /** 1676 * Activity Action: Open the advanced power usage details page of an associated app. 1677 * <p> 1678 * Input: Intent's data URI set with an application name, using the 1679 * "package" schema (like "package:com.my.app") 1680 * <p> 1681 * Output: Nothing. 1682 * 1683 * @hide 1684 */ 1685 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1686 public static final String ACTION_VIEW_ADVANCED_POWER_USAGE_DETAIL = 1687 "android.settings.VIEW_ADVANCED_POWER_USAGE_DETAIL"; 1688 1689 /** 1690 * Activity Action: Show screen for controlling background data 1691 * restrictions for a particular application. 1692 * <p> 1693 * Input: Intent's data URI set with an application name, using the 1694 * "package" schema (like "package:com.my.app"). 1695 * 1696 * <p> 1697 * Output: Nothing. 1698 * <p> 1699 * Applications can also use {@link android.net.ConnectivityManager#getRestrictBackgroundStatus 1700 * ConnectivityManager#getRestrictBackgroundStatus()} to determine the 1701 * status of the background data restrictions for them. 1702 * 1703 * <p class="note"> 1704 * In some cases, a matching Activity may not exist, so ensure you 1705 * safeguard against this. 1706 */ 1707 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1708 public static final String ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS = 1709 "android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS"; 1710 1711 /** 1712 * @hide 1713 * Activity Action: Show the "app ops" settings screen. 1714 * <p> 1715 * Input: Nothing. 1716 * <p> 1717 * Output: Nothing. 1718 */ 1719 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1720 public static final String ACTION_APP_OPS_SETTINGS = 1721 "android.settings.APP_OPS_SETTINGS"; 1722 1723 /** 1724 * Activity Action: Show settings for system update functionality. 1725 * <p> 1726 * In some cases, a matching Activity may not exist, so ensure you 1727 * safeguard against this. 1728 * <p> 1729 * Input: Nothing. 1730 * <p> 1731 * Output: Nothing. 1732 * 1733 * @hide 1734 */ 1735 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1736 public static final String ACTION_SYSTEM_UPDATE_SETTINGS = 1737 "android.settings.SYSTEM_UPDATE_SETTINGS"; 1738 1739 /** 1740 * Activity Action: Show settings for managed profile settings. 1741 * <p> 1742 * In some cases, a matching Activity may not exist, so ensure you 1743 * safeguard against this. 1744 * <p> 1745 * Input: Nothing. 1746 * <p> 1747 * Output: Nothing. 1748 * 1749 * @hide 1750 */ 1751 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1752 public static final String ACTION_MANAGED_PROFILE_SETTINGS = 1753 "android.settings.MANAGED_PROFILE_SETTINGS"; 1754 1755 /** 1756 * Activity Action: Show settings to allow configuration of sync settings. 1757 * <p> 1758 * In some cases, a matching Activity may not exist, so ensure you 1759 * safeguard against this. 1760 * <p> 1761 * The account types available to add via the add account button may be restricted by adding an 1762 * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's 1763 * authorities. Only account types which can sync with that content provider will be offered to 1764 * the user. 1765 * <p> 1766 * Input: Nothing. 1767 * <p> 1768 * Output: Nothing. 1769 */ 1770 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1771 public static final String ACTION_SYNC_SETTINGS = 1772 "android.settings.SYNC_SETTINGS"; 1773 1774 /** 1775 * Activity Action: Show add account screen for creating a new account. 1776 * <p> 1777 * In some cases, a matching Activity may not exist, so ensure you 1778 * safeguard against this. 1779 * <p> 1780 * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES} 1781 * extra to the Intent with one or more syncable content provider's authorities. Only account 1782 * types which can sync with that content provider will be offered to the user. 1783 * <p> 1784 * Account types can also be filtered by adding an {@link #EXTRA_ACCOUNT_TYPES} extra to the 1785 * Intent with one or more account types. 1786 * <p> 1787 * Input: Nothing. 1788 * <p> 1789 * Output: Nothing. 1790 */ 1791 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1792 public static final String ACTION_ADD_ACCOUNT = 1793 "android.settings.ADD_ACCOUNT_SETTINGS"; 1794 1795 /** 1796 * Activity Action: Show settings for enabling or disabling data saver 1797 * <p></p> 1798 * In some cases, a matching Activity may not exist, so ensure you 1799 * safeguard against this. 1800 * <p> 1801 * Input: Nothing. 1802 * <p> 1803 * Output: Nothing. 1804 * 1805 * @hide 1806 */ 1807 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1808 public static final String ACTION_DATA_SAVER_SETTINGS = 1809 "android.settings.DATA_SAVER_SETTINGS"; 1810 1811 /** 1812 * Activity Action: Show settings for selecting the network operator. 1813 * <p> 1814 * In some cases, a matching Activity may not exist, so ensure you 1815 * safeguard against this. 1816 * <p> 1817 * The subscription ID of the subscription for which available network operators should be 1818 * displayed may be optionally specified with {@link #EXTRA_SUB_ID}. 1819 * <p> 1820 * Input: Nothing. 1821 * <p> 1822 * Output: Nothing. 1823 */ 1824 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1825 public static final String ACTION_NETWORK_OPERATOR_SETTINGS = 1826 "android.settings.NETWORK_OPERATOR_SETTINGS"; 1827 1828 /** 1829 * Activity Action: Show settings for selecting the network provider. 1830 * <p> 1831 * In some cases, a matching Activity may not be provided, so ensure you 1832 * safeguard against this. 1833 * <p> 1834 * Access to this preference can be customized via Settings' app. 1835 * <p> 1836 * Input: Nothing. 1837 * <p> 1838 * Output: Nothing. 1839 * 1840 * @hide 1841 */ 1842 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1843 public static final String ACTION_NETWORK_PROVIDER_SETTINGS = 1844 "android.settings.NETWORK_PROVIDER_SETTINGS"; 1845 1846 /** 1847 * Activity Action: Show settings for selection of 2G/3G. 1848 * <p> 1849 * In some cases, a matching Activity may not exist, so ensure you 1850 * safeguard against this. 1851 * <p> 1852 * Input: Nothing. 1853 * <p> 1854 * Output: Nothing. 1855 */ 1856 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1857 public static final String ACTION_DATA_ROAMING_SETTINGS = 1858 "android.settings.DATA_ROAMING_SETTINGS"; 1859 1860 /** 1861 * Activity Action: Show settings for internal storage. 1862 * <p> 1863 * In some cases, a matching Activity may not exist, so ensure you 1864 * safeguard against this. 1865 * <p> 1866 * Input: Nothing. 1867 * <p> 1868 * Output: Nothing. 1869 */ 1870 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1871 public static final String ACTION_INTERNAL_STORAGE_SETTINGS = 1872 "android.settings.INTERNAL_STORAGE_SETTINGS"; 1873 /** 1874 * Activity Action: Show settings for memory card storage. 1875 * <p> 1876 * In some cases, a matching Activity may not exist, so ensure you 1877 * safeguard against this. 1878 * <p> 1879 * Input: Nothing. 1880 * <p> 1881 * Output: Nothing. 1882 */ 1883 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1884 public static final String ACTION_MEMORY_CARD_SETTINGS = 1885 "android.settings.MEMORY_CARD_SETTINGS"; 1886 1887 /** 1888 * Activity Action: Show settings for global search. 1889 * <p> 1890 * In some cases, a matching Activity may not exist, so ensure you 1891 * safeguard against this. 1892 * <p> 1893 * Input: Nothing. 1894 * <p> 1895 * Output: Nothing 1896 */ 1897 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1898 public static final String ACTION_SEARCH_SETTINGS = 1899 "android.search.action.SEARCH_SETTINGS"; 1900 1901 /** 1902 * Activity Action: Show general device information settings (serial 1903 * number, software version, phone number, etc.). 1904 * <p> 1905 * In some cases, a matching Activity may not exist, so ensure you 1906 * safeguard against this. 1907 * <p> 1908 * Input: Nothing. 1909 * <p> 1910 * Output: Nothing 1911 */ 1912 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1913 public static final String ACTION_DEVICE_INFO_SETTINGS = 1914 "android.settings.DEVICE_INFO_SETTINGS"; 1915 1916 /** 1917 * Activity Action: Show NFC settings. 1918 * <p> 1919 * This shows UI that allows NFC to be turned on or off. 1920 * <p> 1921 * In some cases, a matching Activity may not exist, so ensure you 1922 * safeguard against this. 1923 * <p> 1924 * Input: Nothing. 1925 * <p> 1926 * Output: Nothing 1927 * @see android.nfc.NfcAdapter#isEnabled() 1928 */ 1929 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1930 public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS"; 1931 1932 /** 1933 * Activity Action: Show NFC Sharing settings. 1934 * <p> 1935 * This shows UI that allows NDEF Push (Android Beam) to be turned on or 1936 * off. 1937 * <p> 1938 * In some cases, a matching Activity may not exist, so ensure you 1939 * safeguard against this. 1940 * <p> 1941 * Input: Nothing. 1942 * <p> 1943 * Output: Nothing 1944 */ 1945 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1946 public static final String ACTION_NFCSHARING_SETTINGS = 1947 "android.settings.NFCSHARING_SETTINGS"; 1948 1949 /** 1950 * Activity Action: Show NFC Tap & Pay settings 1951 * <p> 1952 * This shows UI that allows the user to configure Tap&Pay 1953 * settings. 1954 * <p> 1955 * In some cases, a matching Activity may not exist, so ensure you 1956 * safeguard against this. 1957 * <p> 1958 * Input: Nothing. 1959 * <p> 1960 * Output: Nothing 1961 */ 1962 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1963 public static final String ACTION_NFC_PAYMENT_SETTINGS = 1964 "android.settings.NFC_PAYMENT_SETTINGS"; 1965 1966 /** 1967 * Activity Action: Show Daydream settings. 1968 * <p> 1969 * In some cases, a matching Activity may not exist, so ensure you 1970 * safeguard against this. 1971 * <p> 1972 * Input: Nothing. 1973 * <p> 1974 * Output: Nothing. 1975 * @see android.service.dreams.DreamService 1976 */ 1977 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1978 public static final String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS"; 1979 1980 /** 1981 * Activity Action: Show Communal settings. 1982 * <p> 1983 * In some cases, a matching Activity may not exist, so ensure you 1984 * safeguard against this. 1985 * <p> 1986 * Input: Nothing. 1987 * <p> 1988 * Output: Nothing. 1989 * 1990 * @hide 1991 */ 1992 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1993 public static final String ACTION_COMMUNAL_SETTING = "android.settings.COMMUNAL_SETTINGS"; 1994 1995 /** 1996 * Activity Action: Show Notification assistant settings. 1997 * <p> 1998 * In some cases, a matching Activity may not exist, so ensure you 1999 * safeguard against this. 2000 * <p> 2001 * Input: Nothing. 2002 * <p> 2003 * Output: Nothing. 2004 */ 2005 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2006 public static final String ACTION_NOTIFICATION_ASSISTANT_SETTINGS = 2007 "android.settings.NOTIFICATION_ASSISTANT_SETTINGS"; 2008 2009 /** 2010 * Activity Action: Show Notification listener settings. 2011 * <p> 2012 * In some cases, a matching Activity may not exist, so ensure you 2013 * safeguard against this. 2014 * <p> 2015 * Input: Nothing. 2016 * <p> 2017 * Output: Nothing. 2018 * @see android.service.notification.NotificationListenerService 2019 */ 2020 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2021 public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS 2022 = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"; 2023 2024 /** 2025 * Activity Action: Show notification listener permission settings page for app. 2026 * <p> 2027 * Users can grant and deny access to notifications for a {@link ComponentName} from here. 2028 * See 2029 * {@link android.app.NotificationManager#isNotificationListenerAccessGranted(ComponentName)} 2030 * for more details. 2031 * <p> 2032 * Input: The extra {@link #EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME} containing the name 2033 * of the component to grant or revoke notification listener access to. 2034 * <p> 2035 * Output: Nothing. 2036 */ 2037 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2038 public static final String ACTION_NOTIFICATION_LISTENER_DETAIL_SETTINGS = 2039 "android.settings.NOTIFICATION_LISTENER_DETAIL_SETTINGS"; 2040 2041 /** 2042 * Activity Extra: What component name to show the notification listener permission 2043 * page for. 2044 * <p> 2045 * A string extra containing a {@link ComponentName}. This must be passed as an extra field to 2046 * {@link #ACTION_NOTIFICATION_LISTENER_DETAIL_SETTINGS}. 2047 */ 2048 public static final String EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME = 2049 "android.provider.extra.NOTIFICATION_LISTENER_COMPONENT_NAME"; 2050 2051 /** 2052 * Activity Action: Show Notification Policy access settings. 2053 * <p> 2054 * Users can grant and deny access to Notification Policy (DND / Modes) configuration 2055 * from here. Managed profiles cannot grant Notification Policy access. 2056 * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more 2057 * details. 2058 * <p> 2059 * Input: Nothing. 2060 * <p> 2061 * Output: Nothing. 2062 * 2063 * <p class="note"> 2064 * In some cases, a matching Activity may not exist, so ensure you 2065 * safeguard against this. 2066 */ 2067 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2068 public static final String ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS 2069 = "android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS"; 2070 2071 /** 2072 * Activity Action: Show do not disturb setting page for app. 2073 * <p> 2074 * Users can grant and deny access to Do Not Disturb configuration for an app from here. 2075 * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more 2076 * details. 2077 * <p> 2078 * Input: Intent's data URI set with an application name, using the 2079 * "package" schema (like "package:com.my.app"). 2080 * <p> 2081 * Output: Nothing. 2082 * 2083 * @hide 2084 */ 2085 @SystemApi 2086 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2087 public static final String ACTION_NOTIFICATION_POLICY_ACCESS_DETAIL_SETTINGS = 2088 "android.settings.NOTIFICATION_POLICY_ACCESS_DETAIL_SETTINGS"; 2089 2090 /** 2091 * Activity Action: Show the automatic do not disturb rule listing page 2092 * <p> 2093 * Users can add, enable, disable, and remove automatic do not disturb rules from this 2094 * screen. See {@link NotificationManager#addAutomaticZenRule(AutomaticZenRule)} for more 2095 * details. 2096 * </p> 2097 * <p> 2098 * Input: Nothing 2099 * Output: Nothing 2100 * </p> 2101 * 2102 */ 2103 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2104 public static final String ACTION_CONDITION_PROVIDER_SETTINGS 2105 = "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS"; 2106 2107 /** 2108 * Activity Action: Shows the settings page for an {@link AutomaticZenRule} mode. 2109 * <p> 2110 * Users can change the behavior of the mode when it's activated and access the owning app's 2111 * additional configuration screen, where triggering criteria can be modified (see 2112 * {@link AutomaticZenRule#setConfigurationActivity(ComponentName)}). 2113 * <p> 2114 * A matching Activity will only be found if 2115 * {@link NotificationManager#areAutomaticZenRulesUserManaged()} is true. 2116 * <p> 2117 * Input: The id of the rule, provided in the {@link #EXTRA_AUTOMATIC_ZEN_RULE_ID} extra. 2118 * <p> 2119 * Output: Nothing. 2120 */ 2121 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2122 public static final String ACTION_AUTOMATIC_ZEN_RULE_SETTINGS 2123 = "android.settings.AUTOMATIC_ZEN_RULE_SETTINGS"; 2124 2125 /** 2126 * Activity Extra: The String id of the {@link AutomaticZenRule mode} settings to display. 2127 * <p> 2128 * This must be passed as an extra field to the {@link #ACTION_AUTOMATIC_ZEN_RULE_SETTINGS}. 2129 */ 2130 public static final String EXTRA_AUTOMATIC_ZEN_RULE_ID 2131 = "android.provider.extra.AUTOMATIC_ZEN_RULE_ID"; 2132 2133 /** 2134 * Activity Action: Show settings for video captioning. 2135 * <p> 2136 * In some cases, a matching Activity may not exist, so ensure you safeguard 2137 * against this. 2138 * <p> 2139 * Input: Nothing. 2140 * <p> 2141 * Output: Nothing. 2142 */ 2143 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2144 public static final String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS"; 2145 2146 /** 2147 * Activity Action: Show the top level print settings. 2148 * <p> 2149 * In some cases, a matching Activity may not exist, so ensure you 2150 * safeguard against this. 2151 * <p> 2152 * Input: Nothing. 2153 * <p> 2154 * Output: Nothing. 2155 */ 2156 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2157 public static final String ACTION_PRINT_SETTINGS = 2158 "android.settings.ACTION_PRINT_SETTINGS"; 2159 2160 /** 2161 * Activity Action: Show Zen Mode configuration settings. 2162 * 2163 * @hide 2164 */ 2165 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2166 public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS"; 2167 2168 /** 2169 * Activity Action: Show Zen Mode (aka Do Not Disturb) priority configuration settings. 2170 */ 2171 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2172 public static final String ACTION_ZEN_MODE_PRIORITY_SETTINGS 2173 = "android.settings.ZEN_MODE_PRIORITY_SETTINGS"; 2174 2175 /** 2176 * Activity Action: Show Zen Mode automation configuration settings. 2177 * 2178 * @hide 2179 */ 2180 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2181 public static final String ACTION_ZEN_MODE_AUTOMATION_SETTINGS 2182 = "android.settings.ZEN_MODE_AUTOMATION_SETTINGS"; 2183 2184 /** 2185 * Activity Action: Modify do not disturb mode settings. 2186 * <p> 2187 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 2188 * <p> 2189 * This intent MUST be started using 2190 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity 2191 * startVoiceActivity}. 2192 * <p> 2193 * Note: The Activity implementing this intent MUST verify that 2194 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction}. 2195 * returns true before modifying the setting. 2196 * <p> 2197 * Input: The optional {@link #EXTRA_DO_NOT_DISTURB_MODE_MINUTES} extra can be used to indicate 2198 * how long the user wishes to avoid interruptions for. The optional 2199 * {@link #EXTRA_DO_NOT_DISTURB_MODE_ENABLED} extra can be to indicate if the user is 2200 * enabling or disabling do not disturb mode. If either extra is not included, the 2201 * user maybe asked to provide the value. 2202 * <p> 2203 * Output: Nothing. 2204 */ 2205 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2206 public static final String ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE = 2207 "android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE"; 2208 2209 /** 2210 * Activity Action: Show Zen Mode schedule rule configuration settings. 2211 * 2212 * @hide 2213 */ 2214 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2215 public static final String ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS 2216 = "android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS"; 2217 2218 /** 2219 * Activity Action: Show Zen Mode event rule configuration settings. 2220 * 2221 * @hide 2222 */ 2223 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2224 public static final String ACTION_ZEN_MODE_EVENT_RULE_SETTINGS 2225 = "android.settings.ZEN_MODE_EVENT_RULE_SETTINGS"; 2226 2227 /** 2228 * Activity Action: Show Zen Mode external rule configuration settings. 2229 * 2230 * @hide 2231 */ 2232 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2233 public static final String ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS 2234 = "android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS"; 2235 2236 /** 2237 * Activity Action: Show the regulatory information screen for the device. 2238 * <p> 2239 * In some cases, a matching Activity may not exist, so ensure you safeguard 2240 * against this. 2241 * <p> 2242 * Input: Nothing. 2243 * <p> 2244 * Output: Nothing. 2245 */ 2246 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2247 public static final String 2248 ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO"; 2249 2250 /** 2251 * Activity Action: Show Device Name Settings. 2252 * <p> 2253 * In some cases, a matching Activity may not exist, so ensure you safeguard 2254 * against this. 2255 * 2256 * @hide 2257 */ 2258 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2259 public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME"; 2260 2261 /** 2262 * Activity Action: Show pairing settings. 2263 * <p> 2264 * In some cases, a matching Activity may not exist, so ensure you safeguard 2265 * against this. 2266 * 2267 * @hide 2268 */ 2269 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2270 public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS"; 2271 2272 /** 2273 * Activity Action: Show battery saver settings. 2274 * <p> 2275 * In some cases, a matching Activity may not exist, so ensure you safeguard 2276 * against this. 2277 */ 2278 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2279 public static final String ACTION_BATTERY_SAVER_SETTINGS 2280 = "android.settings.BATTERY_SAVER_SETTINGS"; 2281 2282 /** 2283 * Activity Action: Modify Battery Saver mode setting using a voice command. 2284 * <p> 2285 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 2286 * <p> 2287 * This intent MUST be started using 2288 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity 2289 * startVoiceActivity}. 2290 * <p> 2291 * Note: The activity implementing this intent MUST verify that 2292 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before 2293 * modifying the setting. 2294 * <p> 2295 * Input: To tell which state batter saver mode should be set to, add the 2296 * {@link #EXTRA_BATTERY_SAVER_MODE_ENABLED} extra to this Intent with the state specified. 2297 * If the extra is not included, no changes will be made. 2298 * <p> 2299 * Output: Nothing. 2300 */ 2301 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2302 public static final String ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE = 2303 "android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE"; 2304 2305 /** 2306 * Activity Action: Show Home selection settings. If there are multiple activities 2307 * that can satisfy the {@link Intent#CATEGORY_HOME} intent, this screen allows you 2308 * to pick your preferred activity. 2309 */ 2310 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2311 public static final String ACTION_HOME_SETTINGS 2312 = "android.settings.HOME_SETTINGS"; 2313 2314 /** 2315 * Activity Action: Show Default apps settings. 2316 * <p> 2317 * In some cases, a matching Activity may not exist, so ensure you 2318 * safeguard against this. 2319 * <p> 2320 * Input: Nothing. 2321 * <p> 2322 * Output: Nothing. 2323 */ 2324 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2325 public static final String ACTION_MANAGE_DEFAULT_APPS_SETTINGS 2326 = "android.settings.MANAGE_DEFAULT_APPS_SETTINGS"; 2327 2328 /** 2329 * Activity Action: Show More default apps settings. 2330 * <p> 2331 * If a Settings activity handles this intent action, a "More defaults" entry will be shown in 2332 * the Default apps settings, and clicking it will launch that activity. 2333 * <p> 2334 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 2335 * <p> 2336 * Input: Nothing. 2337 * <p> 2338 * Output: Nothing. 2339 * 2340 * @hide 2341 */ 2342 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2343 @SystemApi 2344 public static final String ACTION_MANAGE_MORE_DEFAULT_APPS_SETTINGS = 2345 "android.settings.MANAGE_MORE_DEFAULT_APPS_SETTINGS"; 2346 2347 /** 2348 * Activity Action: Show Other NFC services settings. 2349 * <p> 2350 * If a Settings activity handles this intent action, an "Other NFC services" entry will be 2351 * shown in the Default payment app settings, and clicking it will launch that activity. 2352 * <p> 2353 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 2354 * <p> 2355 * Input: Nothing. 2356 * <p> 2357 * Output: Nothing. 2358 * 2359 * @hide 2360 */ 2361 @FlaggedApi(android.nfc.Flags.FLAG_NFC_ACTION_MANAGE_SERVICES_SETTINGS) 2362 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2363 @SystemApi 2364 public static final String ACTION_MANAGE_OTHER_NFC_SERVICES_SETTINGS = 2365 "android.settings.MANAGE_OTHER_NFC_SERVICES_SETTINGS"; 2366 2367 /** 2368 * Activity Action: Show app screen size list settings for user to override app aspect 2369 * ratio. 2370 * <p> 2371 * In some cases, a matching Activity may not exist, so ensure you 2372 * safeguard against this. 2373 * <p> 2374 * Can include the following extra {@link android.content.Intent#EXTRA_PACKAGE_NAME} specifying 2375 * the name of the package to scroll to in the page. 2376 * @hide 2377 */ 2378 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2379 public static final String ACTION_MANAGE_USER_ASPECT_RATIO_SETTINGS = 2380 "android.settings.MANAGE_USER_ASPECT_RATIO_SETTINGS"; 2381 2382 /** 2383 * Activity Action: Show notification settings. 2384 * 2385 * @hide 2386 */ 2387 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2388 public static final String ACTION_NOTIFICATION_SETTINGS 2389 = "android.settings.NOTIFICATION_SETTINGS"; 2390 2391 /** 2392 * Activity Action: Show conversation settings. 2393 * 2394 * @hide 2395 */ 2396 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2397 public static final String ACTION_CONVERSATION_SETTINGS 2398 = "android.settings.CONVERSATION_SETTINGS"; 2399 2400 /** 2401 * Activity Action: Show notification history screen. 2402 * 2403 * @hide 2404 */ 2405 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2406 public static final String ACTION_NOTIFICATION_HISTORY 2407 = "android.settings.NOTIFICATION_HISTORY"; 2408 2409 /** 2410 * Activity Action: Show app listing settings, filtered by those that send notifications. 2411 * 2412 */ 2413 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2414 public static final String ACTION_ALL_APPS_NOTIFICATION_SETTINGS = 2415 "android.settings.ALL_APPS_NOTIFICATION_SETTINGS"; 2416 2417 /** 2418 * Activity Action: Show app settings specifically for sending notifications. Same as 2419 * ALL_APPS_NOTIFICATION_SETTINGS but meant for internal use. 2420 * @hide 2421 */ 2422 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2423 public static final String ACTION_ALL_APPS_NOTIFICATION_SETTINGS_FOR_REVIEW = 2424 "android.settings.ALL_APPS_NOTIFICATION_SETTINGS_FOR_REVIEW"; 2425 2426 /** 2427 * Activity Action: Show the permission screen for allowing apps to post promoted notifications. 2428 * Properly formatted priority notifications are elevated in appearance. For example they may be 2429 * able to use colors, have richer progress bars, show as chips in the status bar, and/or 2430 * permanently appear on always-on-displays. This functionality is intended to be reserved for 2431 * user initiated ongoing activities like navigation, phone calls, and ride sharing. 2432 * 2433 * <p> 2434 * Input: {@link #EXTRA_APP_PACKAGE}, the package to display. 2435 * <p> 2436 * In some cases, a matching Activity may not exist, so ensure you 2437 * safeguard against this. 2438 * <p> 2439 * Output: Nothing. 2440 */ 2441 @FlaggedApi(android.app.Flags.FLAG_API_RICH_ONGOING) 2442 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2443 public static final String ACTION_APP_NOTIFICATION_PROMOTION_SETTINGS 2444 = "android.settings.APP_NOTIFICATION_PROMOTION_SETTINGS"; 2445 2446 /** 2447 * Activity Action: Show notification settings for a single app. 2448 * <p> 2449 * Input: {@link #EXTRA_APP_PACKAGE}, the package to display. 2450 * <p> 2451 * Output: Nothing. 2452 */ 2453 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2454 public static final String ACTION_APP_NOTIFICATION_SETTINGS 2455 = "android.settings.APP_NOTIFICATION_SETTINGS"; 2456 2457 /** 2458 * Activity Action: Show notification settings for a single {@link NotificationChannel}. 2459 * <p> 2460 * Input: {@link #EXTRA_APP_PACKAGE}, the package containing the channel to display. 2461 * Input: {@link #EXTRA_CHANNEL_ID}, the id of the channel to display. 2462 * <p> 2463 * Output: Nothing. 2464 */ 2465 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2466 public static final String ACTION_CHANNEL_NOTIFICATION_SETTINGS 2467 = "android.settings.CHANNEL_NOTIFICATION_SETTINGS"; 2468 2469 /** 2470 * Activity Action: Show notification bubble settings for a single app. 2471 * See {@link NotificationManager#getBubblePreference()}. 2472 * <p> 2473 * Input: {@link #EXTRA_APP_PACKAGE}, the package to display. 2474 * <p> 2475 * Output: Nothing. 2476 */ 2477 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2478 public static final String ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS 2479 = "android.settings.APP_NOTIFICATION_BUBBLE_SETTINGS"; 2480 2481 /** 2482 * Activity Action: Show the settings for users to select their preferred SIM subscription 2483 * when a new SIM subscription has become available. 2484 * <p> 2485 * This Activity will only launch successfully if the newly active subscription ID is set as the 2486 * value of {@link #EXTRA_SUB_ID} and the value corresponds with an active SIM subscription. 2487 * <p> 2488 * Input: {@link #EXTRA_SUB_ID}: the subscription ID of the newly active SIM subscription. 2489 * <p> 2490 * Output: Nothing. 2491 * 2492 * @hide 2493 */ 2494 @FlaggedApi(com.android.internal.telephony.flags.Flags.FLAG_ACTION_SIM_PREFERENCE_SETTINGS) 2495 @SystemApi 2496 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2497 public static final String ACTION_SIM_PREFERENCE_SETTINGS = 2498 "android.settings.SIM_PREFERENCE_SETTINGS"; 2499 2500 /** 2501 * Intent Extra: The value of {@link android.app.settings.SettingsEnums#EntryPointType} for 2502 * settings metrics that logs the entry point about physical keyboard settings. 2503 * <p> 2504 * This must be passed as an extra field to the {@link #ACTION_HARD_KEYBOARD_SETTINGS}. 2505 * @hide 2506 */ 2507 public static final String EXTRA_ENTRYPOINT = 2508 "com.android.settings.inputmethod.EXTRA_ENTRYPOINT"; 2509 2510 /** 2511 * Activity Extra: The package owner of the notification channel settings to display. 2512 * <p> 2513 * This must be passed as an extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. 2514 */ 2515 public static final String EXTRA_APP_PACKAGE = "android.provider.extra.APP_PACKAGE"; 2516 2517 /** 2518 * Activity Extra: The {@link NotificationChannel#getId()} of the notification channel settings 2519 * to display. 2520 * <p> 2521 * This must be passed as an extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. 2522 */ 2523 public static final String EXTRA_CHANNEL_ID = "android.provider.extra.CHANNEL_ID"; 2524 2525 /** 2526 * Activity Extra: The {@link NotificationChannel#getConversationId()} of the notification 2527 * conversation settings to display. 2528 * <p> 2529 * This is an optional extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. If 2530 * included the system will first look up notification settings by channel and conversation id, 2531 * and will fall back to channel id if a specialized channel for this conversation doesn't 2532 * exist, similar to {@link NotificationManager#getNotificationChannel(String, String)}. 2533 */ 2534 public static final String EXTRA_CONVERSATION_ID = "android.provider.extra.CONVERSATION_ID"; 2535 2536 /** 2537 * Activity Extra: An {@code Arraylist<String>} of {@link NotificationChannel} field names to 2538 * show on the Settings UI. 2539 * 2540 * <p> 2541 * This is an optional extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. If 2542 * included the system will filter out any Settings that doesn't appear in this list that 2543 * otherwise would display. 2544 */ 2545 public static final String EXTRA_CHANNEL_FILTER_LIST 2546 = "android.provider.extra.CHANNEL_FILTER_LIST"; 2547 2548 /** 2549 * Activity Action: Show notification redaction settings. 2550 * 2551 * @hide 2552 */ 2553 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2554 public static final String ACTION_APP_NOTIFICATION_REDACTION 2555 = "android.settings.ACTION_APP_NOTIFICATION_REDACTION"; 2556 2557 /** @hide */ 2558 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 2559 public static final String EXTRA_APP_UID = "app_uid"; 2560 2561 /** 2562 * Activity Action: Show power menu settings. 2563 * 2564 * @hide 2565 */ 2566 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2567 public static final String ACTION_POWER_MENU_SETTINGS = 2568 "android.settings.ACTION_POWER_MENU_SETTINGS"; 2569 2570 /** 2571 * Activity Action: Show controls settings. 2572 * 2573 * @hide 2574 */ 2575 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2576 public static final String ACTION_DEVICE_CONTROLS_SETTINGS = 2577 "android.settings.ACTION_DEVICE_CONTROLS_SETTINGS"; 2578 2579 /** 2580 * Activity Action: Show media control settings 2581 * 2582 * @hide 2583 */ 2584 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2585 public static final String ACTION_MEDIA_CONTROLS_SETTINGS = 2586 "android.settings.ACTION_MEDIA_CONTROLS_SETTINGS"; 2587 2588 /** 2589 * Activity Action: Show a dialog with disabled by policy message. 2590 * <p> If an user action is disabled by policy, this dialog can be triggered to let 2591 * the user know about this. 2592 * <p> 2593 * Input: {@link Intent#EXTRA_USER}: The user of the admin. 2594 * <p> 2595 * Output: Nothing. 2596 * 2597 * @hide 2598 */ 2599 // Intent#EXTRA_USER_ID can also be used 2600 @SystemApi 2601 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2602 public static final String ACTION_SHOW_ADMIN_SUPPORT_DETAILS = 2603 "android.settings.SHOW_ADMIN_SUPPORT_DETAILS"; 2604 2605 /** 2606 * Intent extra: The id of a setting restricted by supervisors. 2607 * <p> 2608 * Type: Integer with a value from the one of the SUPERVISOR_VERIFICATION_* constants below. 2609 * <ul> 2610 * <li>{@see #SUPERVISOR_VERIFICATION_SETTING_UNKNOWN} 2611 * <li>{@see #SUPERVISOR_VERIFICATION_SETTING_BIOMETRICS} 2612 * </ul> 2613 * </p> 2614 */ 2615 public static final String EXTRA_SUPERVISOR_RESTRICTED_SETTING_KEY = 2616 "android.provider.extra.SUPERVISOR_RESTRICTED_SETTING_KEY"; 2617 2618 /** 2619 * The unknown setting can usually be ignored and is used for compatibility with future 2620 * supervisor settings. 2621 */ 2622 public static final int SUPERVISOR_VERIFICATION_SETTING_UNKNOWN = 0; 2623 2624 /** 2625 * Settings for supervisors to control what kinds of biometric sensors, such a face and 2626 * fingerprint scanners, can be used on the device. 2627 */ 2628 public static final int SUPERVISOR_VERIFICATION_SETTING_BIOMETRICS = 1; 2629 2630 /** 2631 * Keys for {@link #EXTRA_SUPERVISOR_RESTRICTED_SETTING_KEY}. 2632 * @hide 2633 */ 2634 @Retention(RetentionPolicy.SOURCE) 2635 @IntDef(prefix = { "SUPERVISOR_VERIFICATION_SETTING_" }, value = { 2636 SUPERVISOR_VERIFICATION_SETTING_UNKNOWN, 2637 SUPERVISOR_VERIFICATION_SETTING_BIOMETRICS, 2638 }) 2639 public @interface SupervisorVerificationSetting {} 2640 2641 /** 2642 * Activity action: Launch UI to manage a setting restricted by supervisors. 2643 * <p> 2644 * Input: {@link #EXTRA_SUPERVISOR_RESTRICTED_SETTING_KEY} specifies what setting to open. 2645 * </p> 2646 * <p> 2647 * Output: Nothing. 2648 * </p> 2649 */ 2650 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2651 public static final String ACTION_MANAGE_SUPERVISOR_RESTRICTED_SETTING = 2652 "android.settings.MANAGE_SUPERVISOR_RESTRICTED_SETTING"; 2653 2654 /** 2655 * Activity Action: Show a dialog for remote bugreport flow. 2656 * <p> 2657 * Input: Nothing. 2658 * <p> 2659 * Output: Nothing. 2660 * 2661 * @hide 2662 */ 2663 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2664 public static final String ACTION_SHOW_REMOTE_BUGREPORT_DIALOG 2665 = "android.settings.SHOW_REMOTE_BUGREPORT_DIALOG"; 2666 2667 /** 2668 * Activity Action: Show VR listener settings. 2669 * <p> 2670 * Input: Nothing. 2671 * <p> 2672 * Output: Nothing. 2673 * 2674 * @see android.service.vr.VrListenerService 2675 */ 2676 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2677 public static final String ACTION_VR_LISTENER_SETTINGS 2678 = "android.settings.VR_LISTENER_SETTINGS"; 2679 2680 /** 2681 * Activity Action: Show Picture-in-picture settings. 2682 * <p> 2683 * Input: Nothing. 2684 * <p> 2685 * Output: Nothing. 2686 * 2687 * @hide 2688 */ 2689 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2690 public static final String ACTION_PICTURE_IN_PICTURE_SETTINGS 2691 = "android.settings.PICTURE_IN_PICTURE_SETTINGS"; 2692 2693 /** 2694 * Activity Action: Show Storage Manager settings. 2695 * <p> 2696 * Input: Nothing. 2697 * <p> 2698 * Output: Nothing. 2699 * 2700 * @hide 2701 */ 2702 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2703 public static final String ACTION_STORAGE_MANAGER_SETTINGS 2704 = "android.settings.STORAGE_MANAGER_SETTINGS"; 2705 2706 /** 2707 * Activity Action: Allows user to select current webview implementation. 2708 * <p> 2709 * Input: Nothing. 2710 * <p> 2711 * Output: Nothing. 2712 * <p class="note"> 2713 * In some cases, a matching Activity may not exist, so ensure you 2714 * safeguard against this. 2715 2716 */ 2717 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2718 public static final String ACTION_WEBVIEW_SETTINGS = "android.settings.WEBVIEW_SETTINGS"; 2719 2720 /** 2721 * Activity Action: Show enterprise privacy section. 2722 * <p> 2723 * Input: Nothing. 2724 * <p> 2725 * Output: Nothing. 2726 * @hide 2727 */ 2728 @SystemApi 2729 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2730 public static final String ACTION_ENTERPRISE_PRIVACY_SETTINGS 2731 = "android.settings.ENTERPRISE_PRIVACY_SETTINGS"; 2732 2733 /** 2734 * Activity Action: Show Work Policy info. 2735 * DPC apps can implement an activity that handles this intent in order to show device policies 2736 * associated with the work profile or managed device. 2737 * <p> 2738 * Input: Nothing. 2739 * <p> 2740 * Output: Nothing. 2741 * 2742 */ 2743 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2744 public static final String ACTION_SHOW_WORK_POLICY_INFO = 2745 "android.settings.SHOW_WORK_POLICY_INFO"; 2746 2747 /** 2748 * Activity Action: Show screen that let user select its Autofill Service. 2749 * <p> 2750 * Input: Intent's data URI set with an application package name, using the 2751 * "package" schema (like "package:com.my.app"). 2752 * 2753 * <p> 2754 * Output: {@link android.app.Activity#RESULT_OK} if user selected an Autofill Service belonging 2755 * to the caller package. 2756 * 2757 * <p> 2758 * <b>NOTE: </b> Applications should call 2759 * {@link android.view.autofill.AutofillManager#hasEnabledAutofillServices()} and 2760 * {@link android.view.autofill.AutofillManager#isAutofillSupported()}, and only use this action 2761 * to start an activity if they return {@code false} and {@code true} respectively. 2762 */ 2763 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2764 public static final String ACTION_REQUEST_SET_AUTOFILL_SERVICE = 2765 "android.settings.REQUEST_SET_AUTOFILL_SERVICE"; 2766 2767 /** 2768 * Activity Action: Show screen that let user enable a Credential Manager provider. 2769 * <p> 2770 * Input: Intent's data URI set with an application package name, using the 2771 * "package" schema (like "package:com.my.app"). 2772 * 2773 * <p> 2774 * Output: {@link android.app.Activity#RESULT_OK} if user selected a provider belonging 2775 * to the caller package. 2776 * <p> 2777 * <b>NOTE: </b> Applications should call 2778 * {@link android.credentials.CredentialManager#isEnabledCredentialProviderService( 2779 * ComponentName)} and only use this action to start an activity if they return {@code false}. 2780 */ 2781 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2782 @FlaggedApi(android.credentials.flags.Flags.FLAG_NEW_SETTINGS_INTENTS) 2783 public static final String ACTION_CREDENTIAL_PROVIDER = 2784 "android.settings.CREDENTIAL_PROVIDER"; 2785 2786 /** 2787 * Activity Action: Show screen for controlling the Quick Access Wallet. 2788 * <p> 2789 * In some cases, a matching Activity may not exist, so ensure you 2790 * safeguard against this. 2791 * <p> 2792 * Input: Nothing. 2793 * <p> 2794 * Output: Nothing. 2795 */ 2796 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2797 public static final String ACTION_QUICK_ACCESS_WALLET_SETTINGS = 2798 "android.settings.QUICK_ACCESS_WALLET_SETTINGS"; 2799 2800 /** 2801 * Activity Action: Show screen for controlling which apps have access on volume directories. 2802 * <p> 2803 * Input: Nothing. 2804 * <p> 2805 * Output: Nothing. 2806 * <p> 2807 * Applications typically use this action to ask the user to revert the "Do not ask again" 2808 * status of directory access requests made by 2809 * {@link android.os.storage.StorageVolume#createAccessIntent(String)}. 2810 * @deprecated use {@link #ACTION_APPLICATION_DETAILS_SETTINGS} to manage storage permissions 2811 * for a specific application 2812 */ 2813 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2814 @Deprecated 2815 public static final String ACTION_STORAGE_VOLUME_ACCESS_SETTINGS = 2816 "android.settings.STORAGE_VOLUME_ACCESS_SETTINGS"; 2817 2818 2819 /** 2820 * Activity Action: Show screen that let user select enable (or disable) Content Capture. 2821 * <p> 2822 * Input: Nothing. 2823 * 2824 * <p> 2825 * Output: Nothing 2826 * 2827 * @hide 2828 */ 2829 @SystemApi 2830 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2831 public static final String ACTION_REQUEST_ENABLE_CONTENT_CAPTURE = 2832 "android.settings.REQUEST_ENABLE_CONTENT_CAPTURE"; 2833 2834 /** 2835 * Activity Action: Show screen that let user manage how Android handles URL resolution. 2836 * <p> 2837 * Input: Nothing. 2838 * <p> 2839 * Output: Nothing 2840 * 2841 * @hide 2842 */ 2843 @SystemApi 2844 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2845 public static final String ACTION_MANAGE_DOMAIN_URLS = "android.settings.MANAGE_DOMAIN_URLS"; 2846 2847 /** 2848 * Activity Action: Show screen that let user select enable (or disable) tethering. 2849 * <p> 2850 * Input: Nothing. 2851 * <p> 2852 * Output: Nothing 2853 * 2854 * @hide 2855 */ 2856 @SystemApi 2857 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2858 public static final String ACTION_TETHER_SETTINGS = "android.settings.TETHER_SETTINGS"; 2859 2860 /** 2861 * Activity Action: Show screen that lets user configure wifi tethering. 2862 * <p> 2863 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 2864 * <p> 2865 * Input: Nothing 2866 * <p> 2867 * Output: Nothing 2868 * 2869 * @hide 2870 */ 2871 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2872 public static final String ACTION_WIFI_TETHER_SETTING = 2873 "com.android.settings.WIFI_TETHER_SETTINGS"; 2874 2875 /** 2876 * Broadcast to trigger notification of asking user to enable MMS. 2877 * Need to specify {@link #EXTRA_ENABLE_MMS_DATA_REQUEST_REASON} and {@link #EXTRA_SUB_ID}. 2878 * 2879 * @hide 2880 */ 2881 @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) 2882 public static final String ACTION_ENABLE_MMS_DATA_REQUEST = 2883 "android.settings.ENABLE_MMS_DATA_REQUEST"; 2884 2885 /** 2886 * Shows restrict settings dialog when settings is blocked. 2887 * 2888 * @hide 2889 */ 2890 @SystemApi 2891 @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) 2892 public static final String ACTION_SHOW_RESTRICTED_SETTING_DIALOG = 2893 "android.settings.SHOW_RESTRICTED_SETTING_DIALOG"; 2894 2895 /** 2896 * Integer value that specifies the reason triggering enable MMS data notification. 2897 * This must be passed as an extra field to the {@link #ACTION_ENABLE_MMS_DATA_REQUEST}. 2898 * Extra with value of EnableMmsDataReason interface. 2899 * @hide 2900 */ 2901 public static final String EXTRA_ENABLE_MMS_DATA_REQUEST_REASON = 2902 "android.settings.extra.ENABLE_MMS_DATA_REQUEST_REASON"; 2903 2904 /** @hide */ 2905 @Retention(RetentionPolicy.SOURCE) 2906 @IntDef(prefix = { "ENABLE_MMS_DATA_REQUEST_REASON_" }, value = { 2907 ENABLE_MMS_DATA_REQUEST_REASON_INCOMING_MMS, 2908 ENABLE_MMS_DATA_REQUEST_REASON_OUTGOING_MMS, 2909 }) 2910 public @interface EnableMmsDataReason{} 2911 2912 /** 2913 * Requesting to enable MMS data because there's an incoming MMS. 2914 * @hide 2915 */ 2916 public static final int ENABLE_MMS_DATA_REQUEST_REASON_INCOMING_MMS = 0; 2917 2918 /** 2919 * Requesting to enable MMS data because user is sending MMS. 2920 * @hide 2921 */ 2922 public static final int ENABLE_MMS_DATA_REQUEST_REASON_OUTGOING_MMS = 1; 2923 2924 /** 2925 * Activity Action: Show screen of a cellular subscription and highlight the 2926 * "enable MMS" toggle. 2927 * <p> 2928 * Input: {@link #EXTRA_SUB_ID}: Sub ID of the subscription. 2929 * <p> 2930 * Output: Nothing 2931 * 2932 * @hide 2933 */ 2934 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2935 public static final String ACTION_MMS_MESSAGE_SETTING = "android.settings.MMS_MESSAGE_SETTING"; 2936 2937 /** 2938 * Activity Action: Show a screen of bedtime settings, which is provided by the wellbeing app. 2939 * <p> 2940 * The handler of this intent action may not exist. 2941 * <p> 2942 * To start an activity with this intent, apps should set the wellbeing package explicitly in 2943 * the intent together with this action. The wellbeing package is defined in 2944 * {@code com.android.internal.R.string.config_systemWellbeing}. 2945 * <p> 2946 * Output: Nothing 2947 * 2948 * @hide 2949 */ 2950 @SystemApi 2951 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2952 public static final String ACTION_BEDTIME_SETTINGS = "android.settings.BEDTIME_SETTINGS"; 2953 2954 /** 2955 * Activity action: Launch UI to manage the permissions of an app. 2956 * <p> 2957 * Input: {@link android.content.Intent#EXTRA_PACKAGE_NAME} specifies the package whose 2958 * permissions will be managed by the launched UI. 2959 * </p> 2960 * <p> 2961 * Output: Nothing. 2962 * </p> 2963 * 2964 * @see android.content.Intent#EXTRA_PACKAGE_NAME 2965 * 2966 * @hide 2967 */ 2968 @SystemApi 2969 @RequiresPermission(android.Manifest.permission.LAUNCH_PERMISSION_SETTINGS) 2970 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2971 public static final String ACTION_APP_PERMISSIONS_SETTINGS = 2972 "android.settings.APP_PERMISSIONS_SETTINGS"; 2973 2974 // End of Intent actions for Settings 2975 2976 /** 2977 * @hide - Private call() method on SettingsProvider to read from 'system' table. 2978 */ 2979 public static final String CALL_METHOD_GET_SYSTEM = "GET_system"; 2980 2981 /** 2982 * @hide - Private call() method on SettingsProvider to read from 'secure' table. 2983 */ 2984 public static final String CALL_METHOD_GET_SECURE = "GET_secure"; 2985 2986 /** 2987 * @hide - Private call() method on SettingsProvider to read from 'global' table. 2988 */ 2989 public static final String CALL_METHOD_GET_GLOBAL = "GET_global"; 2990 2991 /** 2992 * @hide - Private call() method on SettingsProvider to read from 'config' table. 2993 */ 2994 public static final String CALL_METHOD_GET_CONFIG = "GET_config"; 2995 2996 /** 2997 * @hide - Specifies that the caller of the fast-path call()-based flow tracks 2998 * the settings generation in order to cache values locally. If this key is 2999 * mapped to a <code>null</code> string extra in the request bundle, the response 3000 * bundle will contain the same key mapped to a parcelable extra which would be 3001 * an {@link android.util.MemoryIntArray}. The response will also contain an 3002 * integer mapped to the {@link #CALL_METHOD_GENERATION_INDEX_KEY} which is the 3003 * index in the array clients should use to lookup the generation. For efficiency 3004 * the caller should request the generation tracking memory array only if it 3005 * doesn't already have it. 3006 * 3007 * @see #CALL_METHOD_GENERATION_INDEX_KEY 3008 */ 3009 public static final String CALL_METHOD_TRACK_GENERATION_KEY = "_track_generation"; 3010 3011 /** 3012 * @hide Key with the location in the {@link android.util.MemoryIntArray} where 3013 * to look up the generation id of the backing table. The value is an integer. 3014 * 3015 * @see #CALL_METHOD_TRACK_GENERATION_KEY 3016 */ 3017 public static final String CALL_METHOD_GENERATION_INDEX_KEY = "_generation_index"; 3018 3019 /** 3020 * @hide Key with the settings table generation. The value is an integer. 3021 * 3022 * @see #CALL_METHOD_TRACK_GENERATION_KEY 3023 */ 3024 public static final String CALL_METHOD_GENERATION_KEY = "_generation"; 3025 3026 /** 3027 * @hide - User handle argument extra to the fast-path call()-based requests 3028 */ 3029 public static final String CALL_METHOD_USER_KEY = "_user"; 3030 3031 /** 3032 * @hide - Boolean argument extra to the fast-path call()-based requests 3033 */ 3034 public static final String CALL_METHOD_MAKE_DEFAULT_KEY = "_make_default"; 3035 3036 /** 3037 * @hide - User handle argument extra to the fast-path call()-based requests 3038 */ 3039 public static final String CALL_METHOD_RESET_MODE_KEY = "_reset_mode"; 3040 3041 /** 3042 * @hide - String argument extra to the fast-path call()-based requests 3043 */ 3044 public static final String CALL_METHOD_TAG_KEY = "_tag"; 3045 3046 /** 3047 * @hide - String argument extra to the fast-path call()-based requests 3048 */ 3049 public static final String CALL_METHOD_PREFIX_KEY = "_prefix"; 3050 3051 /** 3052 * @hide - String argument extra to the fast-path call()-based requests 3053 */ 3054 public static final String CALL_METHOD_SYNC_DISABLED_MODE_KEY = "_disabled_mode"; 3055 3056 /** 3057 * @hide - RemoteCallback monitor callback argument extra to the fast-path call()-based requests 3058 */ 3059 public static final String CALL_METHOD_MONITOR_CALLBACK_KEY = "_monitor_callback_key"; 3060 3061 /** 3062 * @hide - String argument extra to the fast-path call()-based requests 3063 */ 3064 public static final String CALL_METHOD_FLAGS_KEY = "_flags"; 3065 3066 /** 3067 * @hide - String argument extra to the fast-path call()-based requests 3068 */ 3069 public static final String CALL_METHOD_OVERRIDEABLE_BY_RESTORE_KEY = "_overrideable_by_restore"; 3070 3071 /** @hide - Private call() method to write to 'system' table */ 3072 public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system"; 3073 3074 /** @hide - Private call() method to write to 'secure' table */ 3075 public static final String CALL_METHOD_PUT_SECURE = "PUT_secure"; 3076 3077 /** @hide - Private call() method to write to 'global' table */ 3078 public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global"; 3079 3080 /** @hide - Private call() method to write to 'configuration' table */ 3081 public static final String CALL_METHOD_PUT_CONFIG = "PUT_config"; 3082 3083 /** @hide - Private call() method to write to and delete from the 'configuration' table */ 3084 public static final String CALL_METHOD_SET_ALL_CONFIG = "SET_ALL_config"; 3085 3086 /** @hide - Private call() method to delete from the 'system' table */ 3087 public static final String CALL_METHOD_DELETE_SYSTEM = "DELETE_system"; 3088 3089 /** @hide - Private call() method to delete from the 'secure' table */ 3090 public static final String CALL_METHOD_DELETE_SECURE = "DELETE_secure"; 3091 3092 /** @hide - Private call() method to delete from the 'global' table */ 3093 public static final String CALL_METHOD_DELETE_GLOBAL = "DELETE_global"; 3094 3095 /** @hide - Private call() method to reset to defaults the 'configuration' table */ 3096 public static final String CALL_METHOD_DELETE_CONFIG = "DELETE_config"; 3097 3098 /** @hide - Private call() method to reset to defaults the 'system' table */ 3099 public static final String CALL_METHOD_RESET_SYSTEM = "RESET_system"; 3100 3101 /** @hide - Private call() method to reset to defaults the 'secure' table */ 3102 public static final String CALL_METHOD_RESET_SECURE = "RESET_secure"; 3103 3104 /** @hide - Private call() method to reset to defaults the 'global' table */ 3105 public static final String CALL_METHOD_RESET_GLOBAL = "RESET_global"; 3106 3107 /** @hide - Private call() method to reset to defaults the 'configuration' table */ 3108 public static final String CALL_METHOD_RESET_CONFIG = "RESET_config"; 3109 3110 /** @hide - Private call() method to query the 'system' table */ 3111 public static final String CALL_METHOD_LIST_SYSTEM = "LIST_system"; 3112 3113 /** @hide - Private call() method to query the 'secure' table */ 3114 public static final String CALL_METHOD_LIST_SECURE = "LIST_secure"; 3115 3116 /** @hide - Private call() method to query the 'global' table */ 3117 public static final String CALL_METHOD_LIST_GLOBAL = "LIST_global"; 3118 3119 /** @hide - Private call() method to query the 'configuration' table */ 3120 public static final String CALL_METHOD_LIST_CONFIG = "LIST_config"; 3121 3122 /** @hide - Private call() method to query the 'configuration' tables' namespaces */ 3123 public static final String CALL_METHOD_LIST_NAMESPACES_CONFIG = "LIST_namespaces_config"; 3124 3125 /** @hide - Private call() method to disable / re-enable syncs to the 'configuration' table */ 3126 public static final String CALL_METHOD_SET_SYNC_DISABLED_MODE_CONFIG = 3127 "SET_SYNC_DISABLED_MODE_config"; 3128 3129 /** 3130 * @hide - Private call() method to return the current mode of sync disabling for the 3131 * 'configuration' table 3132 */ 3133 public static final String CALL_METHOD_GET_SYNC_DISABLED_MODE_CONFIG = 3134 "GET_SYNC_DISABLED_MODE_config"; 3135 3136 /** @hide - Private call() method to register monitor callback for 'configuration' table */ 3137 public static final String CALL_METHOD_REGISTER_MONITOR_CALLBACK_CONFIG = 3138 "REGISTER_MONITOR_CALLBACK_config"; 3139 3140 /** @hide - Private call() method to unregister monitor callback for 'configuration' table */ 3141 public static final String CALL_METHOD_UNREGISTER_MONITOR_CALLBACK_CONFIG = 3142 "UNREGISTER_MONITOR_CALLBACK_config"; 3143 3144 /** @hide - String argument extra to the config monitor callback */ 3145 public static final String EXTRA_MONITOR_CALLBACK_TYPE = "monitor_callback_type"; 3146 3147 /** @hide - String argument extra to the config monitor callback */ 3148 public static final String EXTRA_ACCESS_CALLBACK = "access_callback"; 3149 3150 /** @hide - String argument extra to the config monitor callback */ 3151 public static final String EXTRA_NAMESPACE_UPDATED_CALLBACK = 3152 "namespace_updated_callback"; 3153 3154 /** @hide - String argument extra to the config monitor callback */ 3155 public static final String EXTRA_NAMESPACE = "namespace"; 3156 3157 /** @hide - String argument extra to the config monitor callback */ 3158 public static final String EXTRA_CALLING_PACKAGE = "calling_package"; 3159 3160 /** 3161 * Activity Extra: Limit available options in launched activity based on the given authority. 3162 * <p> 3163 * This can be passed as an extra field in an Activity Intent with one or more syncable content 3164 * provider's authorities as a String[]. This field is used by some intents to alter the 3165 * behavior of the called activity. 3166 * <p> 3167 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based 3168 * on the authority given. 3169 */ 3170 public static final String EXTRA_AUTHORITIES = "authorities"; 3171 3172 /** 3173 * Activity Extra: Limit available options in launched activity based on the given account 3174 * types. 3175 * <p> 3176 * This can be passed as an extra field in an Activity Intent with one or more account types 3177 * as a String[]. This field is used by some intents to alter the behavior of the called 3178 * activity. 3179 * <p> 3180 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types to the specified 3181 * list. 3182 */ 3183 public static final String EXTRA_ACCOUNT_TYPES = "account_types"; 3184 3185 public static final String EXTRA_INPUT_METHOD_ID = "input_method_id"; 3186 3187 /** 3188 * Activity Extra: The device identifier to act upon. 3189 * <p> 3190 * This can be passed as an extra field in an Activity Intent with a single 3191 * InputDeviceIdentifier. This field is used by some activities to jump straight into the 3192 * settings for the given device. 3193 * <p> 3194 * Example: The {@link #ACTION_INPUT_METHOD_SETTINGS} intent opens the keyboard layout 3195 * dialog for the given device. 3196 * @hide 3197 */ 3198 public static final String EXTRA_INPUT_DEVICE_IDENTIFIER = "input_device_identifier"; 3199 3200 /** 3201 * Activity Extra: Enable or disable Airplane Mode. 3202 * <p> 3203 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE} 3204 * intent as a boolean to indicate if it should be enabled. 3205 */ 3206 public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled"; 3207 3208 /** 3209 * Activity Extra: Enable or disable Battery saver mode. 3210 * <p> 3211 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE} 3212 * intent as a boolean to indicate if it should be enabled. 3213 */ 3214 public static final String EXTRA_BATTERY_SAVER_MODE_ENABLED = 3215 "android.settings.extra.battery_saver_mode_enabled"; 3216 3217 /** 3218 * Activity Extra: Enable or disable Do Not Disturb mode. 3219 * <p> 3220 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE} 3221 * intent as a boolean to indicate if it should be enabled. 3222 */ 3223 public static final String EXTRA_DO_NOT_DISTURB_MODE_ENABLED = 3224 "android.settings.extra.do_not_disturb_mode_enabled"; 3225 3226 /** 3227 * Activity Extra: How many minutes to enable do not disturb mode for. 3228 * <p> 3229 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE} 3230 * intent to indicate how long do not disturb mode should be enabled for. 3231 */ 3232 public static final String EXTRA_DO_NOT_DISTURB_MODE_MINUTES = 3233 "android.settings.extra.do_not_disturb_mode_minutes"; 3234 3235 /** 3236 * Reset mode: reset to defaults only settings changed by the 3237 * calling package. If there is a default set the setting 3238 * will be set to it, otherwise the setting will be deleted. 3239 * This is the only type of reset available to non-system clients. 3240 * @hide 3241 */ 3242 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 3243 @TestApi 3244 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 3245 public static final int RESET_MODE_PACKAGE_DEFAULTS = 1; 3246 3247 /** 3248 * Reset mode: reset all settings set by untrusted packages, which is 3249 * packages that aren't a part of the system, to the current defaults. 3250 * If there is a default set the setting will be set to it, otherwise 3251 * the setting will be deleted. This mode is only available to the system. 3252 * @hide 3253 */ 3254 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 3255 public static final int RESET_MODE_UNTRUSTED_DEFAULTS = 2; 3256 3257 /** 3258 * Reset mode: delete all settings set by untrusted packages, which is 3259 * packages that aren't a part of the system. If a setting is set by an 3260 * untrusted package it will be deleted if its default is not provided 3261 * by the system, otherwise the setting will be set to its default. 3262 * This mode is only available to the system. 3263 * @hide 3264 */ 3265 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 3266 public static final int RESET_MODE_UNTRUSTED_CHANGES = 3; 3267 3268 /** 3269 * Reset mode: reset all settings to defaults specified by trusted 3270 * packages, which is packages that are a part of the system, and 3271 * delete all settings set by untrusted packages. If a setting has 3272 * a default set by a system package it will be set to the default, 3273 * otherwise the setting will be deleted. This mode is only available 3274 * to the system. 3275 * @hide 3276 */ 3277 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 3278 public static final int RESET_MODE_TRUSTED_DEFAULTS = 4; 3279 3280 /** @hide */ 3281 @Retention(RetentionPolicy.SOURCE) 3282 @IntDef(prefix = { "RESET_MODE_" }, value = { 3283 RESET_MODE_PACKAGE_DEFAULTS, 3284 RESET_MODE_UNTRUSTED_DEFAULTS, 3285 RESET_MODE_UNTRUSTED_CHANGES, 3286 RESET_MODE_TRUSTED_DEFAULTS 3287 }) 3288 public @interface ResetMode{} 3289 3290 /** 3291 * Activity Extra: Number of certificates 3292 * <p> 3293 * This can be passed as an extra field to the {@link #ACTION_MONITORING_CERT_INFO} 3294 * intent to indicate the number of certificates 3295 * @hide 3296 */ 3297 public static final String EXTRA_NUMBER_OF_CERTIFICATES = 3298 "android.settings.extra.number_of_certificates"; 3299 3300 private static final String SYSTEM_PACKAGE_NAME = "android"; 3301 3302 public static final String AUTHORITY = "settings"; 3303 3304 private static final String TAG = "Settings"; 3305 private static final boolean LOCAL_LOGV = false; 3306 3307 // Used in system server calling uid workaround in call() 3308 private static boolean sInSystemServer = false; 3309 private static final Object sInSystemServerLock = new Object(); 3310 3311 /** @hide */ setInSystemServer()3312 public static void setInSystemServer() { 3313 synchronized (sInSystemServerLock) { 3314 sInSystemServer = true; 3315 } 3316 } 3317 3318 /** @hide */ isInSystemServer()3319 public static boolean isInSystemServer() { 3320 synchronized (sInSystemServerLock) { 3321 return sInSystemServer; 3322 } 3323 } 3324 3325 public static class SettingNotFoundException extends AndroidException { SettingNotFoundException(String msg)3326 public SettingNotFoundException(String msg) { 3327 super(msg); 3328 } 3329 } 3330 3331 /** 3332 * Common base for tables of name/value settings. 3333 */ 3334 public static class NameValueTable implements BaseColumns { 3335 public static final String NAME = "name"; 3336 public static final String VALUE = "value"; 3337 // A flag indicating whether the current value of a setting should be preserved during 3338 // restore. 3339 /** @hide */ 3340 public static final String IS_PRESERVED_IN_RESTORE = "is_preserved_in_restore"; 3341 putString(ContentResolver resolver, Uri uri, String name, String value)3342 protected static boolean putString(ContentResolver resolver, Uri uri, 3343 String name, String value) { 3344 // The database will take care of replacing duplicates. 3345 try { 3346 ContentValues values = new ContentValues(); 3347 values.put(NAME, name); 3348 values.put(VALUE, value); 3349 resolver.insert(uri, values); 3350 return true; 3351 } catch (SQLException e) { 3352 Log.w(TAG, "Can't set key " + name + " in " + uri, e); 3353 return false; 3354 } 3355 } 3356 getUriFor(Uri uri, String name)3357 public static Uri getUriFor(Uri uri, String name) { 3358 return Uri.withAppendedPath(uri, name); 3359 } 3360 } 3361 3362 private static final class GenerationTracker { 3363 @NonNull private final String mName; 3364 @NonNull private final MemoryIntArray mArray; 3365 @NonNull private final Consumer<String> mErrorHandler; 3366 private final int mIndex; 3367 private int mCurrentGeneration; 3368 GenerationTracker(@onNull String name, @NonNull MemoryIntArray array, int index, int generation, Consumer<String> errorHandler)3369 GenerationTracker(@NonNull String name, @NonNull MemoryIntArray array, int index, 3370 int generation, Consumer<String> errorHandler) { 3371 mName = name; 3372 mArray = array; 3373 mIndex = index; 3374 mErrorHandler = errorHandler; 3375 mCurrentGeneration = generation; 3376 } 3377 3378 // This method also updates the obsolete generation code stored locally isGenerationChanged()3379 public boolean isGenerationChanged() { 3380 final int currentGeneration = readCurrentGeneration(); 3381 if (currentGeneration >= 0) { 3382 if (currentGeneration == mCurrentGeneration) { 3383 return false; 3384 } 3385 mCurrentGeneration = currentGeneration; 3386 } 3387 return true; 3388 } 3389 getCurrentGeneration()3390 public int getCurrentGeneration() { 3391 return mCurrentGeneration; 3392 } 3393 readCurrentGeneration()3394 private int readCurrentGeneration() { 3395 try { 3396 return mArray.get(mIndex); 3397 } catch (IOException e) { 3398 Log.e(TAG, "Error getting current generation", e); 3399 mErrorHandler.accept(mName); 3400 } 3401 return -1; 3402 } 3403 destroy()3404 public void destroy() { 3405 maybeCloseGenerationArray(mArray); 3406 } 3407 3408 @Override finalize()3409 protected void finalize() throws Throwable { 3410 try { 3411 destroy(); 3412 } finally { 3413 super.finalize(); 3414 } 3415 } 3416 } 3417 maybeCloseGenerationArray(@ullable MemoryIntArray array)3418 private static void maybeCloseGenerationArray(@Nullable MemoryIntArray array) { 3419 if (array == null) { 3420 return; 3421 } 3422 try { 3423 // If this process is the system server process, the MemoryIntArray received from Parcel 3424 // is the same object as the one kept inside SettingsProvider, so skipping the close(). 3425 if (!Settings.isInSystemServer() && !array.isClosed()) { 3426 array.close(); 3427 } 3428 } catch (IOException e) { 3429 Log.e(TAG, "Error closing the generation tracking array", e); 3430 } 3431 } 3432 3433 private static final class ContentProviderHolder { 3434 private final Object mLock = new Object(); 3435 3436 private final Uri mUri; 3437 @GuardedBy("mLock") 3438 @UnsupportedAppUsage 3439 private IContentProvider mContentProvider; 3440 ContentProviderHolder(Uri uri)3441 public ContentProviderHolder(Uri uri) { 3442 mUri = uri; 3443 } 3444 getProvider(ContentResolver contentResolver)3445 public IContentProvider getProvider(ContentResolver contentResolver) { 3446 synchronized (mLock) { 3447 if (mContentProvider == null) { 3448 mContentProvider = contentResolver 3449 .acquireProvider(mUri.getAuthority()); 3450 } 3451 return mContentProvider; 3452 } 3453 } 3454 clearProviderForTest()3455 public void clearProviderForTest() { 3456 synchronized (mLock) { 3457 mContentProvider = null; 3458 } 3459 } 3460 } 3461 3462 // Thread-safe. 3463 private static class NameValueCache { 3464 private static final boolean DEBUG = false; 3465 3466 private static final String[] SELECT_VALUE_PROJECTION = new String[] { 3467 Settings.NameValueTable.VALUE 3468 }; 3469 3470 private static final String NAME_EQ_PLACEHOLDER = "name=?"; 3471 3472 // Cached values of queried settings. 3473 // Key is the setting's name, value is the setting's value. 3474 // Must synchronize on 'this' to access mValues and mValuesVersion. 3475 private final ArrayMap<String, String> mValues = new ArrayMap<>(); 3476 3477 // Cached values for queried prefixes. 3478 // Key is the prefix, value is all of the settings under the prefix, mapped from a setting's 3479 // name to a setting's value. The name string doesn't include the prefix. 3480 // Must synchronize on 'this' to access. 3481 private final ArrayMap<String, ArrayMap<String, String>> mPrefixToValues = new ArrayMap<>(); 3482 3483 private final Uri mUri; 3484 @UnsupportedAppUsage 3485 private final ContentProviderHolder mProviderHolder; 3486 3487 // The method we'll call (or null, to not use) on the provider 3488 // for the fast path of retrieving settings. 3489 private final String mCallGetCommand; 3490 private final String mCallSetCommand; 3491 private final String mCallDeleteCommand; 3492 private final String mCallListCommand; 3493 private final String mCallSetAllCommand; 3494 3495 private final ArraySet<String> mReadableFields; 3496 private final ArraySet<String> mAllFields; 3497 private final ArrayMap<String, Integer> mReadableFieldsWithMaxTargetSdk; 3498 3499 // Mapping from the name of a setting (or the prefix of a namespace) to a generation tracker 3500 @GuardedBy("this") 3501 private ArrayMap<String, GenerationTracker> mGenerationTrackers = new ArrayMap<>(); 3502 3503 private Consumer<String> mGenerationTrackerErrorHandler = (String name) -> { 3504 synchronized (NameValueCache.this) { 3505 Log.e(TAG, "Error accessing generation tracker - removing"); 3506 final GenerationTracker tracker = mGenerationTrackers.get(name); 3507 if (tracker != null) { 3508 tracker.destroy(); 3509 mGenerationTrackers.remove(name); 3510 } 3511 mValues.remove(name); 3512 } 3513 }; 3514 NameValueCache(Uri uri, String getCommand, String setCommand, String deleteCommand, ContentProviderHolder providerHolder, Class<T> callerClass)3515 <T extends NameValueTable> NameValueCache(Uri uri, String getCommand, 3516 String setCommand, String deleteCommand, ContentProviderHolder providerHolder, 3517 Class<T> callerClass) { 3518 this(uri, getCommand, setCommand, deleteCommand, null, null, providerHolder, 3519 callerClass); 3520 } 3521 NameValueCache(Uri uri, String getCommand, String setCommand, String deleteCommand, String listCommand, String setAllCommand, ContentProviderHolder providerHolder, Class<T> callerClass)3522 private <T extends NameValueTable> NameValueCache(Uri uri, String getCommand, 3523 String setCommand, String deleteCommand, String listCommand, String setAllCommand, 3524 ContentProviderHolder providerHolder, Class<T> callerClass) { 3525 mUri = uri; 3526 mCallGetCommand = getCommand; 3527 mCallSetCommand = setCommand; 3528 mCallDeleteCommand = deleteCommand; 3529 mCallListCommand = listCommand; 3530 mCallSetAllCommand = setAllCommand; 3531 mProviderHolder = providerHolder; 3532 mReadableFields = new ArraySet<>(); 3533 mAllFields = new ArraySet<>(); 3534 mReadableFieldsWithMaxTargetSdk = new ArrayMap<>(); 3535 getPublicSettingsForClass(callerClass, mAllFields, mReadableFields, 3536 mReadableFieldsWithMaxTargetSdk); 3537 } 3538 putStringForUser(ContentResolver cr, String name, String value, String tag, boolean makeDefault, final int userHandle, boolean overrideableByRestore)3539 public boolean putStringForUser(ContentResolver cr, String name, String value, 3540 String tag, boolean makeDefault, final int userHandle, 3541 boolean overrideableByRestore) { 3542 try { 3543 Bundle arg = new Bundle(); 3544 arg.putString(Settings.NameValueTable.VALUE, value); 3545 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 3546 if (tag != null) { 3547 arg.putString(CALL_METHOD_TAG_KEY, tag); 3548 } 3549 if (makeDefault) { 3550 arg.putBoolean(CALL_METHOD_MAKE_DEFAULT_KEY, true); 3551 } 3552 if (overrideableByRestore) { 3553 arg.putBoolean(CALL_METHOD_OVERRIDEABLE_BY_RESTORE_KEY, true); 3554 } 3555 IContentProvider cp = mProviderHolder.getProvider(cr); 3556 cp.call(cr.getAttributionSource(), 3557 mProviderHolder.mUri.getAuthority(), mCallSetCommand, name, arg); 3558 } catch (RemoteException e) { 3559 Log.w(TAG, "Can't set key " + name + " in " + mUri, e); 3560 return false; 3561 } 3562 return true; 3563 } 3564 setStringsForPrefix(ContentResolver cr, String prefix, HashMap<String, String> keyValues)3565 public @SetAllResult int setStringsForPrefix(ContentResolver cr, String prefix, 3566 HashMap<String, String> keyValues) { 3567 if (mCallSetAllCommand == null) { 3568 // This NameValueCache does not support atomically setting multiple flags 3569 return SET_ALL_RESULT_FAILURE; 3570 } 3571 try { 3572 Bundle args = new Bundle(); 3573 args.putString(CALL_METHOD_PREFIX_KEY, prefix); 3574 args.putSerializable(CALL_METHOD_FLAGS_KEY, keyValues); 3575 IContentProvider cp = mProviderHolder.getProvider(cr); 3576 Bundle bundle = cp.call(cr.getAttributionSource(), 3577 mProviderHolder.mUri.getAuthority(), 3578 mCallSetAllCommand, null, args); 3579 return bundle.getInt(KEY_CONFIG_SET_ALL_RETURN); 3580 } catch (RemoteException e) { 3581 // Not supported by the remote side 3582 return SET_ALL_RESULT_FAILURE; 3583 } 3584 } 3585 deleteStringForUser(ContentResolver cr, String name, final int userHandle)3586 public boolean deleteStringForUser(ContentResolver cr, String name, final int userHandle) { 3587 try { 3588 Bundle arg = new Bundle(); 3589 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 3590 IContentProvider cp = mProviderHolder.getProvider(cr); 3591 cp.call(cr.getAttributionSource(), 3592 mProviderHolder.mUri.getAuthority(), mCallDeleteCommand, name, arg); 3593 } catch (RemoteException e) { 3594 Log.w(TAG, "Can't delete key " + name + " in " + mUri, e); 3595 return false; 3596 } 3597 return true; 3598 } 3599 3600 @UnsupportedAppUsage getStringForUser(ContentResolver cr, String name, final int userHandle)3601 public String getStringForUser(ContentResolver cr, String name, final int userHandle) { 3602 final boolean isSelf = (userHandle == UserHandle.myUserId()); 3603 final boolean useCache = isSelf && !isInSystemServer(); 3604 boolean needsGenerationTracker = false; 3605 if (useCache) { 3606 synchronized (NameValueCache.this) { 3607 final GenerationTracker generationTracker = mGenerationTrackers.get(name); 3608 if (generationTracker != null) { 3609 if (generationTracker.isGenerationChanged()) { 3610 if (DEBUG) { 3611 Log.i(TAG, "Generation changed for setting:" + name 3612 + " type:" + mUri.getPath() 3613 + " in package:" + cr.getPackageName() 3614 + " and user:" + userHandle); 3615 } 3616 // When a generation number changes, remove cached value, remove the old 3617 // generation tracker and request a new one 3618 mValues.remove(name); 3619 generationTracker.destroy(); 3620 mGenerationTrackers.remove(name); 3621 } else if (mValues.containsKey(name)) { 3622 if (DEBUG) { 3623 Log.i(TAG, "Cache hit for setting:" + name); 3624 } 3625 return mValues.get(name); 3626 } 3627 } 3628 } 3629 if (DEBUG) { 3630 Log.i(TAG, "Cache miss for setting:" + name + " for user:" 3631 + userHandle); 3632 } 3633 // Generation tracker doesn't exist or the value isn't cached 3634 needsGenerationTracker = true; 3635 } else { 3636 if (DEBUG || LOCAL_LOGV) { 3637 Log.v(TAG, "get setting for user " + userHandle 3638 + " by user " + UserHandle.myUserId() + " so skipping cache"); 3639 } 3640 } 3641 3642 // Check if the target settings key is readable. Reject if the caller is not system and 3643 // is trying to access a settings key defined in the Settings.Secure, Settings.System or 3644 // Settings.Global and is not annotated as @Readable. 3645 // Notice that a key string that is not defined in any of the Settings.* classes will 3646 // still be regarded as readable. 3647 if (!isCallerExemptFromReadableRestriction() && mAllFields.contains(name)) { 3648 if (!mReadableFields.contains(name)) { 3649 throw new SecurityException( 3650 "Settings key: <" + name + "> is not readable. From S+, settings keys " 3651 + "annotated with @hide are restricted to system_server and " 3652 + "system apps only, unless they are annotated with @Readable." 3653 ); 3654 } else { 3655 // When the target settings key has @Readable annotation, if the caller app's 3656 // target sdk is higher than the maxTargetSdk of the annotation, reject access. 3657 if (mReadableFieldsWithMaxTargetSdk.containsKey(name)) { 3658 final int maxTargetSdk = mReadableFieldsWithMaxTargetSdk.get(name); 3659 final Application application = ActivityThread.currentApplication(); 3660 final boolean targetSdkCheckOk = application != null 3661 && application.getApplicationInfo() != null 3662 && application.getApplicationInfo().targetSdkVersion 3663 <= maxTargetSdk; 3664 if (!targetSdkCheckOk) { 3665 throw new SecurityException( 3666 "Settings key: <" + name + "> is only readable to apps with " 3667 + "targetSdkVersion lower than or equal to: " 3668 + maxTargetSdk 3669 ); 3670 } 3671 } 3672 } 3673 } 3674 3675 IContentProvider cp = mProviderHolder.getProvider(cr); 3676 3677 // Try the fast path first, not using query(). If this 3678 // fails (alternate Settings provider that doesn't support 3679 // this interface?) then we fall back to the query/table 3680 // interface. 3681 if (mCallGetCommand != null) { 3682 try { 3683 Bundle args = new Bundle(); 3684 if (!isSelf) { 3685 args.putInt(CALL_METHOD_USER_KEY, userHandle); 3686 } 3687 if (needsGenerationTracker) { 3688 args.putString(CALL_METHOD_TRACK_GENERATION_KEY, null); 3689 if (DEBUG) { 3690 Log.i(TAG, "Requested generation tracker for setting:" + name 3691 + " type:" + mUri.getPath() 3692 + " in package:" + cr.getPackageName() 3693 + " and user:" + userHandle); 3694 } 3695 } 3696 Bundle b; 3697 // If we're in system server and in a binder transaction we need to clear the 3698 // calling uid. This works around code in system server that did not call 3699 // clearCallingIdentity, previously this wasn't needed because reading settings 3700 // did not do permission checking but thats no longer the case. 3701 // Long term this should be removed and callers should properly call 3702 // clearCallingIdentity or use a ContentResolver from the caller as needed. 3703 if (Settings.isInSystemServer() && Binder.getCallingUid() != Process.myUid()) { 3704 final long token = Binder.clearCallingIdentity(); 3705 try { 3706 b = cp.call(cr.getAttributionSource(), 3707 mProviderHolder.mUri.getAuthority(), mCallGetCommand, name, 3708 args); 3709 } finally { 3710 Binder.restoreCallingIdentity(token); 3711 } 3712 } else { 3713 b = cp.call(cr.getAttributionSource(), 3714 mProviderHolder.mUri.getAuthority(), mCallGetCommand, name, args); 3715 } 3716 if (b != null) { 3717 String value = b.getString(Settings.NameValueTable.VALUE); 3718 // Don't update our cache for reads of other users' data 3719 if (isSelf) { 3720 synchronized (NameValueCache.this) { 3721 if (needsGenerationTracker) { 3722 MemoryIntArray array = b.getParcelable( 3723 CALL_METHOD_TRACK_GENERATION_KEY, android.util.MemoryIntArray.class); 3724 final int index = b.getInt( 3725 CALL_METHOD_GENERATION_INDEX_KEY, -1); 3726 if (array != null && index >= 0) { 3727 final int generation = b.getInt( 3728 CALL_METHOD_GENERATION_KEY, 0); 3729 if (DEBUG) { 3730 Log.i(TAG, "Received generation tracker for setting:" 3731 + name 3732 + " type:" + mUri.getPath() 3733 + " in package:" + cr.getPackageName() 3734 + " and user:" + userHandle 3735 + " with index:" + index); 3736 } 3737 // Always make sure to close any pre-existing tracker before 3738 // replacing it, to prevent memory leaks 3739 var oldTracker = mGenerationTrackers.get(name); 3740 if (oldTracker != null) { 3741 oldTracker.destroy(); 3742 } 3743 mGenerationTrackers.put(name, new GenerationTracker(name, 3744 array, index, generation, 3745 mGenerationTrackerErrorHandler)); 3746 } else { 3747 maybeCloseGenerationArray(array); 3748 } 3749 } 3750 if (mGenerationTrackers.get(name) != null 3751 && !mGenerationTrackers.get(name).isGenerationChanged()) { 3752 if (DEBUG) { 3753 Log.i(TAG, "Updating cache for setting:" + name); 3754 } 3755 mValues.put(name, value); 3756 } 3757 } 3758 } else { 3759 if (DEBUG || LOCAL_LOGV) { 3760 Log.i(TAG, "call-query of user " + userHandle 3761 + " by " + UserHandle.myUserId() 3762 + (isInSystemServer() ? " in system_server" : "") 3763 + " so not updating cache"); 3764 } 3765 } 3766 return value; 3767 } 3768 // If the response Bundle is null, we fall through 3769 // to the query interface below. 3770 } catch (RemoteException e) { 3771 // Not supported by the remote side? Fall through 3772 // to query(). 3773 } 3774 } 3775 3776 Cursor c = null; 3777 try { 3778 Bundle queryArgs = ContentResolver.createSqlQueryBundle( 3779 NAME_EQ_PLACEHOLDER, new String[]{name}, null); 3780 // Same workaround as above. 3781 if (Settings.isInSystemServer() && Binder.getCallingUid() != Process.myUid()) { 3782 final long token = Binder.clearCallingIdentity(); 3783 try { 3784 c = cp.query(cr.getAttributionSource(), mUri, 3785 SELECT_VALUE_PROJECTION, queryArgs, null); 3786 } finally { 3787 Binder.restoreCallingIdentity(token); 3788 } 3789 } else { 3790 c = cp.query(cr.getAttributionSource(), mUri, 3791 SELECT_VALUE_PROJECTION, queryArgs, null); 3792 } 3793 if (c == null) { 3794 Log.w(TAG, "Can't get key " + name + " from " + mUri); 3795 return null; 3796 } 3797 3798 String value = c.moveToNext() ? c.getString(0) : null; 3799 synchronized (NameValueCache.this) { 3800 if (mGenerationTrackers.get(name) != null 3801 && !mGenerationTrackers.get(name).isGenerationChanged()) { 3802 if (DEBUG) { 3803 Log.i(TAG, "Updating cache for setting:" + name + " using query"); 3804 } 3805 mValues.put(name, value); 3806 } 3807 } 3808 return value; 3809 } catch (RemoteException e) { 3810 Log.w(TAG, "Can't get key " + name + " from " + mUri, e); 3811 return null; // Return null, but don't cache it. 3812 } finally { 3813 if (c != null) c.close(); 3814 } 3815 } 3816 isCallerExemptFromReadableRestriction()3817 private static boolean isCallerExemptFromReadableRestriction() { 3818 if (Settings.isInSystemServer()) { 3819 return true; 3820 } 3821 if (UserHandle.getAppId(Binder.getCallingUid()) < Process.FIRST_APPLICATION_UID) { 3822 return true; 3823 } 3824 final Application application = ActivityThread.currentApplication(); 3825 if (application == null || application.getApplicationInfo() == null) { 3826 return false; 3827 } 3828 final ApplicationInfo applicationInfo = application.getApplicationInfo(); 3829 final boolean isTestOnly = 3830 (applicationInfo.flags & ApplicationInfo.FLAG_TEST_ONLY) != 0; 3831 return isTestOnly || applicationInfo.isSystemApp() || applicationInfo.isPrivilegedApp() 3832 || applicationInfo.isSignedWithPlatformKey(); 3833 } 3834 getStringsForPrefixStripPrefix( ContentResolver cr, String prefix, List<String> names)3835 private Map<String, String> getStringsForPrefixStripPrefix( 3836 ContentResolver cr, String prefix, List<String> names) { 3837 String namespace = prefix.substring(0, prefix.length() - 1); 3838 ArrayMap<String, String> keyValues = new ArrayMap<>(); 3839 int substringLength = prefix.length(); 3840 int currentGeneration = -1; 3841 boolean needsGenerationTracker = false; 3842 synchronized (NameValueCache.this) { 3843 final GenerationTracker generationTracker = mGenerationTrackers.get(prefix); 3844 if (generationTracker != null) { 3845 if (generationTracker.isGenerationChanged()) { 3846 if (DEBUG) { 3847 Log.i(TAG, "Generation changed for prefix:" + prefix 3848 + " type:" + mUri.getPath() 3849 + " in package:" + cr.getPackageName()); 3850 } 3851 // When a generation number changes, remove cached values, remove the old 3852 // generation tracker and request a new one 3853 generationTracker.destroy(); 3854 mGenerationTrackers.remove(prefix); 3855 mPrefixToValues.remove(prefix); 3856 needsGenerationTracker = true; 3857 } else { 3858 final ArrayMap<String, String> cachedSettings = mPrefixToValues.get(prefix); 3859 if (cachedSettings != null) { 3860 if (!names.isEmpty()) { 3861 for (String name : names) { 3862 // The cache can contain "null" values, need to use containsKey. 3863 if (cachedSettings.containsKey(name)) { 3864 keyValues.put( 3865 name, 3866 cachedSettings.get(name)); 3867 } 3868 } 3869 } else { 3870 keyValues.putAll(cachedSettings); 3871 // Remove the hack added for the legacy behavior. 3872 keyValues.remove(""); 3873 } 3874 return keyValues; 3875 } 3876 } 3877 currentGeneration = generationTracker.getCurrentGeneration(); 3878 } else { 3879 needsGenerationTracker = true; 3880 } 3881 } 3882 if (mCallListCommand == null) { 3883 // No list command specified, return empty map 3884 return keyValues; 3885 } 3886 if (DEBUG) { 3887 Log.i(TAG, "Cache miss for prefix:" + prefix); 3888 } 3889 IContentProvider cp = mProviderHolder.getProvider(cr); 3890 3891 try { 3892 Bundle args = new Bundle(); 3893 args.putString(Settings.CALL_METHOD_PREFIX_KEY, prefix); 3894 if (needsGenerationTracker) { 3895 args.putString(CALL_METHOD_TRACK_GENERATION_KEY, null); 3896 if (DEBUG) { 3897 Log.i(TAG, "Requested generation tracker for prefix:" + prefix 3898 + " type: " + mUri.getPath() 3899 + " in package:" + cr.getPackageName()); 3900 } 3901 } 3902 3903 Bundle b; 3904 // If we're in system server and the caller did not call 3905 // clearCallingIdentity, the read would fail due to mismatched AttributionSources. 3906 if (Settings.isInSystemServer() && Binder.getCallingUid() != Process.myUid()) { 3907 final long token = Binder.clearCallingIdentity(); 3908 try { 3909 // Fetch all flags for the namespace at once for caching purposes 3910 b = cp.call(cr.getAttributionSource(), 3911 mProviderHolder.mUri.getAuthority(), mCallListCommand, null, args); 3912 } finally { 3913 Binder.restoreCallingIdentity(token); 3914 } 3915 } else { 3916 // Fetch all flags for the namespace at once for caching purposes 3917 b = cp.call(cr.getAttributionSource(), 3918 mProviderHolder.mUri.getAuthority(), mCallListCommand, null, args); 3919 } 3920 if (b == null) { 3921 // Invalid response, return an empty map 3922 return keyValues; 3923 } 3924 3925 // All flags for the namespace 3926 HashMap<String, String> flagsToValues = 3927 (HashMap) b.getSerializable(Settings.NameValueTable.VALUE, java.util.HashMap.class); 3928 if (flagsToValues == null) { 3929 return keyValues; 3930 } 3931 // Only the flags requested by the caller 3932 if (!names.isEmpty()) { 3933 for (String name : names) { 3934 // flagsToValues can contain "null" values, need to use containsKey. 3935 final String key = Config.createCompositeName(namespace, name); 3936 if (flagsToValues.containsKey(key)) { 3937 keyValues.put( 3938 name, 3939 flagsToValues.get(key)); 3940 } 3941 } 3942 } else { 3943 for (Map.Entry<String, String> flag : flagsToValues.entrySet()) { 3944 keyValues.put( 3945 flag.getKey().substring(substringLength), 3946 flag.getValue()); 3947 } 3948 } 3949 3950 synchronized (NameValueCache.this) { 3951 if (needsGenerationTracker) { 3952 MemoryIntArray array = b.getParcelable( 3953 CALL_METHOD_TRACK_GENERATION_KEY, android.util.MemoryIntArray.class); 3954 final int index = b.getInt( 3955 CALL_METHOD_GENERATION_INDEX_KEY, -1); 3956 if (array != null && index >= 0) { 3957 final int generation = b.getInt( 3958 CALL_METHOD_GENERATION_KEY, 0); 3959 if (DEBUG) { 3960 Log.i(TAG, "Received generation tracker for prefix:" + prefix 3961 + " type:" + mUri.getPath() 3962 + " in package:" + cr.getPackageName() 3963 + " with index:" + index); 3964 } 3965 // Always make sure to close any pre-existing tracker before 3966 // replacing it, to prevent memory leaks 3967 var oldTracker = mGenerationTrackers.get(prefix); 3968 if (oldTracker != null) { 3969 oldTracker.destroy(); 3970 } 3971 mGenerationTrackers.put(prefix, 3972 new GenerationTracker(prefix, array, index, generation, 3973 mGenerationTrackerErrorHandler)); 3974 currentGeneration = generation; 3975 } else { 3976 maybeCloseGenerationArray(array); 3977 } 3978 } 3979 if (mGenerationTrackers.get(prefix) != null && currentGeneration 3980 == mGenerationTrackers.get(prefix).getCurrentGeneration()) { 3981 if (DEBUG) { 3982 Log.i(TAG, "Updating cache for prefix:" + prefix); 3983 } 3984 // Cache the complete list of flags for the namespace for bulk queries. 3985 // In this cached list, the setting's name doesn't include the prefix. 3986 ArrayMap<String, String> namesToValues = 3987 new ArrayMap<>(flagsToValues.size() + 1); 3988 for (Map.Entry<String, String> flag : flagsToValues.entrySet()) { 3989 namesToValues.put( 3990 flag.getKey().substring(substringLength), 3991 flag.getValue()); 3992 } 3993 // Legacy behavior, we return <"", null> when queried with name = "" 3994 namesToValues.put("", null); 3995 mPrefixToValues.put(prefix, namesToValues); 3996 } 3997 } 3998 return keyValues; 3999 } catch (RemoteException e) { 4000 // Not supported by the remote side, return an empty map 4001 return keyValues; 4002 } 4003 } 4004 clearGenerationTrackerForTest()4005 public void clearGenerationTrackerForTest() { 4006 synchronized (NameValueCache.this) { 4007 for (int i = 0; i < mGenerationTrackers.size(); i++) { 4008 mGenerationTrackers.valueAt(i).destroy(); 4009 } 4010 mGenerationTrackers.clear(); 4011 mValues.clear(); 4012 } 4013 } 4014 } 4015 4016 /** 4017 * Checks if the specified context can draw on top of other apps. As of API 4018 * level 23, an app cannot draw on top of other apps unless it declares the 4019 * {@link android.Manifest.permission#SYSTEM_ALERT_WINDOW} permission in its 4020 * manifest, <em>and</em> the user specifically grants the app this 4021 * capability. To prompt the user to grant this approval, the app must send an 4022 * intent with the action 4023 * {@link android.provider.Settings#ACTION_MANAGE_OVERLAY_PERMISSION}, which 4024 * causes the system to display a permission management screen. 4025 * 4026 * @param context App context. 4027 * @return true if the specified context can draw on top of other apps, false otherwise 4028 */ canDrawOverlays(Context context)4029 public static boolean canDrawOverlays(Context context) { 4030 return Settings.isCallingPackageAllowedToDrawOverlays(context, Process.myUid(), 4031 context.getOpPackageName(), false) || context.checkSelfPermission( 4032 Manifest.permission.SYSTEM_APPLICATION_OVERLAY) 4033 == PackageManager.PERMISSION_GRANTED; 4034 } 4035 4036 /** 4037 * This annotation indicates that the value of a setting is allowed to be read 4038 * with the get* methods. The following settings should be readable: 4039 * 1) all the public settings 4040 * 2) all the hidden settings added before S 4041 */ 4042 @Target({ ElementType.FIELD }) 4043 @Retention(RetentionPolicy.RUNTIME) 4044 private @interface Readable { maxTargetSdk()4045 int maxTargetSdk() default 0; 4046 } 4047 getPublicSettingsForClass( Class<T> callerClass, Set<String> allKeys, Set<String> readableKeys, ArrayMap<String, Integer> keysWithMaxTargetSdk)4048 private static <T extends NameValueTable> void getPublicSettingsForClass( 4049 Class<T> callerClass, Set<String> allKeys, Set<String> readableKeys, 4050 ArrayMap<String, Integer> keysWithMaxTargetSdk) { 4051 final Field[] allFields = callerClass.getDeclaredFields(); 4052 try { 4053 for (int i = 0; i < allFields.length; i++) { 4054 final Field field = allFields[i]; 4055 if (!field.getType().equals(String.class)) { 4056 continue; 4057 } 4058 final Object value = field.get(callerClass); 4059 if (!value.getClass().equals(String.class)) { 4060 continue; 4061 } 4062 allKeys.add((String) value); 4063 final Readable annotation = field.getAnnotation(Readable.class); 4064 4065 if (annotation != null) { 4066 final String key = (String) value; 4067 final int maxTargetSdk = annotation.maxTargetSdk(); 4068 readableKeys.add(key); 4069 if (maxTargetSdk != 0) { 4070 keysWithMaxTargetSdk.put(key, maxTargetSdk); 4071 } 4072 } 4073 } 4074 } catch (IllegalAccessException ignored) { 4075 } 4076 } 4077 parseFloatSetting(String settingValue, String settingName)4078 private static float parseFloatSetting(String settingValue, String settingName) 4079 throws SettingNotFoundException { 4080 if (settingValue == null) { 4081 throw new SettingNotFoundException(settingName); 4082 } 4083 try { 4084 return Float.parseFloat(settingValue); 4085 } catch (NumberFormatException e) { 4086 throw new SettingNotFoundException(settingName); 4087 } 4088 } 4089 parseFloatSettingWithDefault(String settingValue, float defaultValue)4090 private static float parseFloatSettingWithDefault(String settingValue, float defaultValue) { 4091 try { 4092 return settingValue != null ? Float.parseFloat(settingValue) : defaultValue; 4093 } catch (NumberFormatException e) { 4094 return defaultValue; 4095 } 4096 } 4097 parseIntSetting(String settingValue, String settingName)4098 private static int parseIntSetting(String settingValue, String settingName) 4099 throws SettingNotFoundException { 4100 if (settingValue == null) { 4101 throw new SettingNotFoundException(settingName); 4102 } 4103 try { 4104 return Integer.parseInt(settingValue); 4105 } catch (NumberFormatException e) { 4106 throw new SettingNotFoundException(settingName); 4107 } 4108 } 4109 parseIntSettingWithDefault(String settingValue, int defaultValue)4110 private static int parseIntSettingWithDefault(String settingValue, int defaultValue) { 4111 try { 4112 return settingValue != null ? Integer.parseInt(settingValue) : defaultValue; 4113 } catch (NumberFormatException e) { 4114 return defaultValue; 4115 } 4116 } 4117 parseLongSetting(String settingValue, String settingName)4118 private static long parseLongSetting(String settingValue, String settingName) 4119 throws SettingNotFoundException { 4120 if (settingValue == null) { 4121 throw new SettingNotFoundException(settingName); 4122 } 4123 try { 4124 return Long.parseLong(settingValue); 4125 } catch (NumberFormatException e) { 4126 throw new SettingNotFoundException(settingName); 4127 } 4128 } 4129 parseLongSettingWithDefault(String settingValue, long defaultValue)4130 private static long parseLongSettingWithDefault(String settingValue, long defaultValue) { 4131 try { 4132 return settingValue != null ? Long.parseLong(settingValue) : defaultValue; 4133 } catch (NumberFormatException e) { 4134 return defaultValue; 4135 } 4136 } 4137 4138 /** 4139 * System settings, containing miscellaneous system preferences. This 4140 * table holds simple name/value pairs. There are convenience 4141 * functions for accessing individual settings entries. 4142 */ 4143 public static final class System extends NameValueTable { 4144 // NOTE: If you add new settings here, be sure to add them to 4145 // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoSystemSettingsLocked. 4146 4147 private static final float DEFAULT_FONT_SCALE = 1.0f; 4148 private static final int DEFAULT_FONT_WEIGHT = 0; 4149 4150 /** 4151 * The content:// style URL for this table 4152 */ 4153 public static final Uri CONTENT_URI = 4154 Uri.parse("content://" + AUTHORITY + "/system"); 4155 4156 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 4157 private static final ContentProviderHolder sProviderHolder = 4158 new ContentProviderHolder(CONTENT_URI); 4159 4160 @UnsupportedAppUsage 4161 private static final NameValueCache sNameValueCache = new NameValueCache( 4162 CONTENT_URI, 4163 CALL_METHOD_GET_SYSTEM, 4164 CALL_METHOD_PUT_SYSTEM, 4165 CALL_METHOD_DELETE_SYSTEM, 4166 sProviderHolder, 4167 System.class); 4168 4169 @UnsupportedAppUsage 4170 private static final HashSet<String> MOVED_TO_SECURE; 4171 static { 4172 MOVED_TO_SECURE = new HashSet<>(30); 4173 MOVED_TO_SECURE.add(Secure.ADAPTIVE_SLEEP); 4174 MOVED_TO_SECURE.add(Secure.ANDROID_ID); 4175 MOVED_TO_SECURE.add(Secure.HTTP_PROXY); 4176 MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED); 4177 MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS); 4178 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED); 4179 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE); 4180 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); 4181 MOVED_TO_SECURE.add(Secure.LOGGING_ID); 4182 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED); 4183 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE); 4184 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL); 4185 MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME); 4186 MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL); 4187 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); 4188 MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT); 4189 MOVED_TO_SECURE.add(Secure.WIFI_ON); 4190 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE); 4191 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT); 4192 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS); 4193 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED); 4194 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS); 4195 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT); 4196 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS); 4197 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON); 4198 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT); 4199 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS); 4200 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS); 4201 4202 // At one time in System, then Global, but now back in Secure 4203 MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS); 4204 } 4205 4206 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 4207 private static final HashSet<String> MOVED_TO_GLOBAL; 4208 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 4209 private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL; 4210 static { 4211 MOVED_TO_GLOBAL = new HashSet<>(); 4212 MOVED_TO_SECURE_THEN_GLOBAL = new HashSet<>(); 4213 4214 // these were originally in system but migrated to secure in the past, 4215 // so are duplicated in the Secure.* namespace 4216 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.ADB_ENABLED); 4217 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.BLUETOOTH_ON); 4218 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DATA_ROAMING); 4219 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DEVICE_PROVISIONED); 4220 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.HTTP_PROXY); 4221 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.NETWORK_PREFERENCE); 4222 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED); 4223 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS); 4224 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.WIFI_MAX_DHCP_RETRY_COUNT); 4225 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); 4226 4227 // these are moving directly from system to global 4228 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON); 4229 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS); 4230 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS); 4231 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME); 4232 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE); 4233 MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND); 4234 MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND); 4235 MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND); 4236 MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND); 4237 MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED); 4238 MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND); 4239 MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND); 4240 MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND); 4241 MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED); 4242 MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN); 4243 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY); 4244 MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER); 4245 MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE); 4246 MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE); 4247 MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE); 4248 MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS); 4249 MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE); 4250 MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE); 4251 MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY); 4252 MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP); 4253 MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER); 4254 MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES); 4255 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_CONTENT_URL); 4256 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_METADATA_URL); 4257 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_CONTENT_URL); 4258 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_METADATA_URL); 4259 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL); 4260 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL); 4261 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_CONTENT_URL); 4262 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL); 4263 MOVED_TO_GLOBAL.add(Settings.Global.RADIO_NFC); 4264 MOVED_TO_GLOBAL.add(Settings.Global.RADIO_CELL); 4265 MOVED_TO_GLOBAL.add(Settings.Global.RADIO_WIFI); 4266 MOVED_TO_GLOBAL.add(Settings.Global.RADIO_BLUETOOTH); 4267 MOVED_TO_GLOBAL.add(Settings.Global.RADIO_WIMAX); 4268 MOVED_TO_GLOBAL.add(Settings.Global.SHOW_PROCESSES); 4269 } 4270 4271 /** @hide */ getMovedToGlobalSettings(Set<String> outKeySet)4272 public static void getMovedToGlobalSettings(Set<String> outKeySet) { 4273 outKeySet.addAll(MOVED_TO_GLOBAL); 4274 outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL); 4275 } 4276 4277 /** @hide */ getMovedToSecureSettings(Set<String> outKeySet)4278 public static void getMovedToSecureSettings(Set<String> outKeySet) { 4279 outKeySet.addAll(MOVED_TO_SECURE); 4280 } 4281 4282 /** @hide */ getNonLegacyMovedKeys(HashSet<String> outKeySet)4283 public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) { 4284 outKeySet.addAll(MOVED_TO_GLOBAL); 4285 } 4286 4287 /** @hide */ clearProviderForTest()4288 public static void clearProviderForTest() { 4289 sProviderHolder.clearProviderForTest(); 4290 sNameValueCache.clearGenerationTrackerForTest(); 4291 } 4292 4293 /** @hide */ getPublicSettings(Set<String> allKeys, Set<String> readableKeys, ArrayMap<String, Integer> readableKeysWithMaxTargetSdk)4294 public static void getPublicSettings(Set<String> allKeys, Set<String> readableKeys, 4295 ArrayMap<String, Integer> readableKeysWithMaxTargetSdk) { 4296 getPublicSettingsForClass(System.class, allKeys, readableKeys, 4297 readableKeysWithMaxTargetSdk); 4298 } 4299 4300 /** 4301 * Look up a name in the database. 4302 * @param resolver to access the database with 4303 * @param name to look up in the table 4304 * @return the corresponding value, or null if not present 4305 */ getString(ContentResolver resolver, String name)4306 public static String getString(ContentResolver resolver, String name) { 4307 return getStringForUser(resolver, name, resolver.getUserId()); 4308 } 4309 4310 /** @hide */ 4311 @UnsupportedAppUsage getStringForUser(ContentResolver resolver, String name, int userHandle)4312 public static String getStringForUser(ContentResolver resolver, String name, 4313 int userHandle) { 4314 if (MOVED_TO_SECURE.contains(name)) { 4315 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4316 + " to android.provider.Settings.Secure, returning read-only value."); 4317 return Secure.getStringForUser(resolver, name, userHandle); 4318 } 4319 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { 4320 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4321 + " to android.provider.Settings.Global, returning read-only value."); 4322 return Global.getStringForUser(resolver, name, userHandle); 4323 } 4324 4325 return sNameValueCache.getStringForUser(resolver, name, userHandle); 4326 } 4327 4328 /** 4329 * Store a name/value pair into the database. 4330 * @param resolver to access the database with 4331 * @param name to store 4332 * @param value to associate with the name 4333 * @return true if the value was set, false on database errors 4334 */ putString(ContentResolver resolver, String name, String value)4335 public static boolean putString(ContentResolver resolver, String name, String value) { 4336 return putStringForUser(resolver, name, value, resolver.getUserId()); 4337 } 4338 4339 /** 4340 * Store a name/value pair into the database. Values written by this method will be 4341 * overridden if a restore happens in the future. 4342 * 4343 * @param resolver to access the database with 4344 * @param name to store 4345 * @param value to associate with the name 4346 * 4347 * @return true if the value was set, false on database errors 4348 * 4349 * @hide 4350 */ 4351 @RequiresPermission(Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) 4352 @SystemApi putString(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, boolean overrideableByRestore)4353 public static boolean putString(@NonNull ContentResolver resolver, 4354 @NonNull String name, @Nullable String value, boolean overrideableByRestore) { 4355 return putStringForUser(resolver, name, value, resolver.getUserId(), 4356 overrideableByRestore); 4357 } 4358 4359 /** 4360 * Store a name/value pair into the database. 4361 * 4362 * @param resolver to access the database with 4363 * @param name to store 4364 * @param value to associate with the name 4365 * @param makeDefault whether to make the value the default one 4366 * @param overrideableByRestore whether restore can override this value 4367 * @return true if the value was set, false on database errors 4368 * 4369 * @hide 4370 */ 4371 @RequiresPermission(Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) 4372 @SystemApi 4373 @FlaggedApi(Flags.FLAG_SYSTEM_SETTINGS_DEFAULT) putString(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, boolean makeDefault, boolean overrideableByRestore)4374 public static boolean putString(@NonNull ContentResolver resolver, @NonNull String name, 4375 @Nullable String value, boolean makeDefault, boolean overrideableByRestore) { 4376 return putStringForUser(resolver, name, value, /* tag= */ null, 4377 makeDefault, resolver.getUserId(), overrideableByRestore); 4378 } 4379 4380 /** @hide */ 4381 @UnsupportedAppUsage putStringForUser(ContentResolver resolver, String name, String value, int userHandle)4382 public static boolean putStringForUser(ContentResolver resolver, String name, String value, 4383 int userHandle) { 4384 return putStringForUser(resolver, name, value, userHandle, 4385 DEFAULT_OVERRIDEABLE_BY_RESTORE); 4386 } 4387 putStringForUser(ContentResolver resolver, String name, String value, int userHandle, boolean overrideableByRestore)4388 private static boolean putStringForUser(ContentResolver resolver, String name, String value, 4389 int userHandle, boolean overrideableByRestore) { 4390 return putStringForUser(resolver, name, value, /* tag= */ null, 4391 /* makeDefault= */ false, userHandle, overrideableByRestore); 4392 } 4393 putStringForUser(ContentResolver resolver, String name, String value, String tag, boolean makeDefault, int userHandle, boolean overrideableByRestore)4394 private static boolean putStringForUser(ContentResolver resolver, String name, String value, 4395 String tag, boolean makeDefault, int userHandle, boolean overrideableByRestore) { 4396 if (LOCAL_LOGV) { 4397 Log.v(TAG, "System.putString(name=" + name + ", value=" + value + ") for " 4398 + userHandle); 4399 } 4400 if (MOVED_TO_SECURE.contains(name)) { 4401 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4402 + " to android.provider.Settings.Secure, value is unchanged."); 4403 return false; 4404 } 4405 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { 4406 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4407 + " to android.provider.Settings.Global, value is unchanged."); 4408 return false; 4409 } 4410 return sNameValueCache.putStringForUser(resolver, name, value, tag, makeDefault, 4411 userHandle, overrideableByRestore); 4412 } 4413 4414 /** 4415 * Reset the settings to their defaults. This would reset <strong>only</strong> 4416 * settings set by the caller's package. Think of it of a way to undo your own 4417 * changes to the system settings. Passing in the optional tag will reset only 4418 * settings changed by your package and associated with this tag. 4419 * 4420 * @param resolver Handle to the content resolver. 4421 * @param tag Optional tag which should be associated with the settings to reset. 4422 * 4423 * @see #putString(ContentResolver, String, String, boolean, boolean) 4424 * 4425 * @hide 4426 */ 4427 @SystemApi 4428 @FlaggedApi(Flags.FLAG_SYSTEM_SETTINGS_DEFAULT) resetToDefaults(@onNull ContentResolver resolver, @Nullable String tag)4429 public static void resetToDefaults(@NonNull ContentResolver resolver, 4430 @Nullable String tag) { 4431 resetToDefaultsAsUser(resolver, tag, RESET_MODE_PACKAGE_DEFAULTS, 4432 resolver.getUserId()); 4433 } 4434 4435 /** 4436 * Reset the settings to their defaults for a given user with a specific mode. The 4437 * optional tag argument is valid only for {@link #RESET_MODE_PACKAGE_DEFAULTS} 4438 * allowing resetting the settings made by a package and associated with the tag. 4439 * 4440 * @param resolver Handle to the content resolver. 4441 * @param tag Optional tag which should be associated with the settings to reset. 4442 * @param mode The reset mode. 4443 * @param userHandle The user for which to reset to defaults. 4444 * 4445 * @see #RESET_MODE_PACKAGE_DEFAULTS 4446 * @see #RESET_MODE_UNTRUSTED_DEFAULTS 4447 * @see #RESET_MODE_UNTRUSTED_CHANGES 4448 * @see #RESET_MODE_TRUSTED_DEFAULTS 4449 * 4450 * @hide 4451 */ resetToDefaultsAsUser(@onNull ContentResolver resolver, @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle)4452 public static void resetToDefaultsAsUser(@NonNull ContentResolver resolver, 4453 @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle) { 4454 try { 4455 Bundle arg = new Bundle(); 4456 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 4457 if (tag != null) { 4458 arg.putString(CALL_METHOD_TAG_KEY, tag); 4459 } 4460 arg.putInt(CALL_METHOD_RESET_MODE_KEY, mode); 4461 IContentProvider cp = sProviderHolder.getProvider(resolver); 4462 cp.call(resolver.getAttributionSource(), 4463 sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_SYSTEM, null, arg); 4464 } catch (RemoteException e) { 4465 Log.w(TAG, "Can't reset do defaults for " + CONTENT_URI, e); 4466 } 4467 } 4468 4469 /** 4470 * Construct the content URI for a particular name/value pair, 4471 * useful for monitoring changes with a ContentObserver. 4472 * @param name to look up in the table 4473 * @return the corresponding content URI, or null if not present 4474 */ getUriFor(String name)4475 public static Uri getUriFor(String name) { 4476 if (MOVED_TO_SECURE.contains(name)) { 4477 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4478 + " to android.provider.Settings.Secure, returning Secure URI."); 4479 return Secure.getUriFor(Secure.CONTENT_URI, name); 4480 } 4481 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { 4482 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4483 + " to android.provider.Settings.Global, returning read-only global URI."); 4484 return Global.getUriFor(Global.CONTENT_URI, name); 4485 } 4486 return getUriFor(CONTENT_URI, name); 4487 } 4488 4489 /** 4490 * Convenience function for retrieving a single system settings value 4491 * as an integer. Note that internally setting values are always 4492 * stored as strings; this function converts the string to an integer 4493 * for you. The default value will be returned if the setting is 4494 * not defined or not an integer. 4495 * 4496 * @param cr The ContentResolver to access. 4497 * @param name The name of the setting to retrieve. 4498 * @param def Value to return if the setting is not defined. 4499 * 4500 * @return The setting's current value, or 'def' if it is not defined 4501 * or not a valid integer. 4502 */ getInt(ContentResolver cr, String name, int def)4503 public static int getInt(ContentResolver cr, String name, int def) { 4504 return getIntForUser(cr, name, def, cr.getUserId()); 4505 } 4506 4507 /** @hide */ 4508 @UnsupportedAppUsage getIntForUser(ContentResolver cr, String name, int def, int userHandle)4509 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { 4510 String v = getStringForUser(cr, name, userHandle); 4511 return parseIntSettingWithDefault(v, def); 4512 } 4513 4514 /** 4515 * Convenience function for retrieving a single system settings value 4516 * as an integer. Note that internally setting values are always 4517 * stored as strings; this function converts the string to an integer 4518 * for you. 4519 * <p> 4520 * This version does not take a default value. If the setting has not 4521 * been set, or the string value is not a number, 4522 * it throws {@link SettingNotFoundException}. 4523 * 4524 * @param cr The ContentResolver to access. 4525 * @param name The name of the setting to retrieve. 4526 * 4527 * @throws SettingNotFoundException Thrown if a setting by the given 4528 * name can't be found or the setting value is not an integer. 4529 * 4530 * @return The setting's current value. 4531 */ getInt(ContentResolver cr, String name)4532 public static int getInt(ContentResolver cr, String name) 4533 throws SettingNotFoundException { 4534 return getIntForUser(cr, name, cr.getUserId()); 4535 } 4536 4537 /** @hide */ 4538 @UnsupportedAppUsage getIntForUser(ContentResolver cr, String name, int userHandle)4539 public static int getIntForUser(ContentResolver cr, String name, int userHandle) 4540 throws SettingNotFoundException { 4541 String v = getStringForUser(cr, name, userHandle); 4542 return parseIntSetting(v, name); 4543 } 4544 4545 /** 4546 * Convenience function for updating a single settings value as an 4547 * integer. This will either create a new entry in the table if the 4548 * given name does not exist, or modify the value of the existing row 4549 * with that name. Note that internally setting values are always 4550 * stored as strings, so this function converts the given value to a 4551 * string before storing it. 4552 * 4553 * @param cr The ContentResolver to access. 4554 * @param name The name of the setting to modify. 4555 * @param value The new value for the setting. 4556 * @return true if the value was set, false on database errors 4557 */ putInt(ContentResolver cr, String name, int value)4558 public static boolean putInt(ContentResolver cr, String name, int value) { 4559 return putIntForUser(cr, name, value, cr.getUserId()); 4560 } 4561 4562 /** @hide */ 4563 @UnsupportedAppUsage putIntForUser(ContentResolver cr, String name, int value, int userHandle)4564 public static boolean putIntForUser(ContentResolver cr, String name, int value, 4565 int userHandle) { 4566 return putStringForUser(cr, name, Integer.toString(value), userHandle); 4567 } 4568 4569 /** 4570 * Convenience function for retrieving a single system settings value 4571 * as a {@code long}. Note that internally setting values are always 4572 * stored as strings; this function converts the string to a {@code long} 4573 * for you. The default value will be returned if the setting is 4574 * not defined or not a {@code long}. 4575 * 4576 * @param cr The ContentResolver to access. 4577 * @param name The name of the setting to retrieve. 4578 * @param def Value to return if the setting is not defined. 4579 * 4580 * @return The setting's current value, or 'def' if it is not defined 4581 * or not a valid {@code long}. 4582 */ getLong(ContentResolver cr, String name, long def)4583 public static long getLong(ContentResolver cr, String name, long def) { 4584 return getLongForUser(cr, name, def, cr.getUserId()); 4585 } 4586 4587 /** @hide */ getLongForUser(ContentResolver cr, String name, long def, int userHandle)4588 public static long getLongForUser(ContentResolver cr, String name, long def, 4589 int userHandle) { 4590 String v = getStringForUser(cr, name, userHandle); 4591 return parseLongSettingWithDefault(v, def); 4592 } 4593 4594 /** 4595 * Convenience function for retrieving a single system settings value 4596 * as a {@code long}. Note that internally setting values are always 4597 * stored as strings; this function converts the string to a {@code long} 4598 * for you. 4599 * <p> 4600 * This version does not take a default value. If the setting has not 4601 * been set, or the string value is not a number, 4602 * it throws {@link SettingNotFoundException}. 4603 * 4604 * @param cr The ContentResolver to access. 4605 * @param name The name of the setting to retrieve. 4606 * 4607 * @return The setting's current value. 4608 * @throws SettingNotFoundException Thrown if a setting by the given 4609 * name can't be found or the setting value is not an integer. 4610 */ getLong(ContentResolver cr, String name)4611 public static long getLong(ContentResolver cr, String name) 4612 throws SettingNotFoundException { 4613 return getLongForUser(cr, name, cr.getUserId()); 4614 } 4615 4616 /** @hide */ getLongForUser(ContentResolver cr, String name, int userHandle)4617 public static long getLongForUser(ContentResolver cr, String name, int userHandle) 4618 throws SettingNotFoundException { 4619 String v = getStringForUser(cr, name, userHandle); 4620 return parseLongSetting(v, name); 4621 } 4622 4623 /** 4624 * Convenience function for updating a single settings value as a long 4625 * integer. This will either create a new entry in the table if the 4626 * given name does not exist, or modify the value of the existing row 4627 * with that name. Note that internally setting values are always 4628 * stored as strings, so this function converts the given value to a 4629 * string before storing it. 4630 * 4631 * @param cr The ContentResolver to access. 4632 * @param name The name of the setting to modify. 4633 * @param value The new value for the setting. 4634 * @return true if the value was set, false on database errors 4635 */ putLong(ContentResolver cr, String name, long value)4636 public static boolean putLong(ContentResolver cr, String name, long value) { 4637 return putLongForUser(cr, name, value, cr.getUserId()); 4638 } 4639 4640 /** @hide */ putLongForUser(ContentResolver cr, String name, long value, int userHandle)4641 public static boolean putLongForUser(ContentResolver cr, String name, long value, 4642 int userHandle) { 4643 return putStringForUser(cr, name, Long.toString(value), userHandle); 4644 } 4645 4646 /** 4647 * Convenience function for retrieving a single system settings value 4648 * as a floating point number. Note that internally setting values are 4649 * always stored as strings; this function converts the string to an 4650 * float for you. The default value will be returned if the setting 4651 * is not defined or not a valid float. 4652 * 4653 * @param cr The ContentResolver to access. 4654 * @param name The name of the setting to retrieve. 4655 * @param def Value to return if the setting is not defined. 4656 * 4657 * @return The setting's current value, or 'def' if it is not defined 4658 * or not a valid float. 4659 */ getFloat(ContentResolver cr, String name, float def)4660 public static float getFloat(ContentResolver cr, String name, float def) { 4661 return getFloatForUser(cr, name, def, cr.getUserId()); 4662 } 4663 4664 /** @hide */ getFloatForUser(ContentResolver cr, String name, float def, int userHandle)4665 public static float getFloatForUser(ContentResolver cr, String name, float def, 4666 int userHandle) { 4667 String v = getStringForUser(cr, name, userHandle); 4668 return parseFloatSettingWithDefault(v, def); 4669 } 4670 4671 /** 4672 * Convenience function for retrieving a single system settings value 4673 * as a float. Note that internally setting values are always 4674 * stored as strings; this function converts the string to a float 4675 * for you. 4676 * <p> 4677 * This version does not take a default value. If the setting has not 4678 * been set, or the string value is not a number, 4679 * it throws {@link SettingNotFoundException}. 4680 * 4681 * @param cr The ContentResolver to access. 4682 * @param name The name of the setting to retrieve. 4683 * 4684 * @throws SettingNotFoundException Thrown if a setting by the given 4685 * name can't be found or the setting value is not a float. 4686 * 4687 * @return The setting's current value. 4688 */ getFloat(ContentResolver cr, String name)4689 public static float getFloat(ContentResolver cr, String name) 4690 throws SettingNotFoundException { 4691 return getFloatForUser(cr, name, cr.getUserId()); 4692 } 4693 4694 /** @hide */ getFloatForUser(ContentResolver cr, String name, int userHandle)4695 public static float getFloatForUser(ContentResolver cr, String name, int userHandle) 4696 throws SettingNotFoundException { 4697 String v = getStringForUser(cr, name, userHandle); 4698 return parseFloatSetting(v, name); 4699 } 4700 4701 /** 4702 * Convenience function for updating a single settings value as a 4703 * floating point number. This will either create a new entry in the 4704 * table if the given name does not exist, or modify the value of the 4705 * existing row with that name. Note that internally setting values 4706 * are always stored as strings, so this function converts the given 4707 * value to a string before storing it. 4708 * 4709 * @param cr The ContentResolver to access. 4710 * @param name The name of the setting to modify. 4711 * @param value The new value for the setting. 4712 * @return true if the value was set, false on database errors 4713 */ putFloat(ContentResolver cr, String name, float value)4714 public static boolean putFloat(ContentResolver cr, String name, float value) { 4715 return putFloatForUser(cr, name, value, cr.getUserId()); 4716 } 4717 4718 /** @hide */ putFloatForUser(ContentResolver cr, String name, float value, int userHandle)4719 public static boolean putFloatForUser(ContentResolver cr, String name, float value, 4720 int userHandle) { 4721 return putStringForUser(cr, name, Float.toString(value), userHandle); 4722 } 4723 4724 /** 4725 * Convenience function to read all of the current 4726 * configuration-related settings into a 4727 * {@link Configuration} object. 4728 * 4729 * @param cr The ContentResolver to access. 4730 * @param outConfig Where to place the configuration settings. 4731 */ getConfiguration(ContentResolver cr, Configuration outConfig)4732 public static void getConfiguration(ContentResolver cr, Configuration outConfig) { 4733 adjustConfigurationForUser(cr, outConfig, cr.getUserId(), 4734 false /* updateSettingsIfEmpty */); 4735 } 4736 4737 /** @hide */ adjustConfigurationForUser(ContentResolver cr, Configuration outConfig, int userHandle, boolean updateSettingsIfEmpty)4738 public static void adjustConfigurationForUser(ContentResolver cr, Configuration outConfig, 4739 int userHandle, boolean updateSettingsIfEmpty) { 4740 final float defaultFontScale = getDefaultFontScale(cr, userHandle); 4741 outConfig.fontScale = Settings.System.getFloatForUser( 4742 cr, FONT_SCALE, defaultFontScale, userHandle); 4743 if (outConfig.fontScale < 0) { 4744 outConfig.fontScale = defaultFontScale; 4745 } 4746 outConfig.fontWeightAdjustment = Settings.Secure.getIntForUser( 4747 cr, Settings.Secure.FONT_WEIGHT_ADJUSTMENT, DEFAULT_FONT_WEIGHT, userHandle); 4748 if (systemTermsOfAddressEnabled()) { 4749 GrammaticalInflectionManager manager = 4750 ActivityThread.currentApplication().getApplicationContext() 4751 .getSystemService(GrammaticalInflectionManager.class); 4752 outConfig.setGrammaticalGender( 4753 manager.peekSystemGrammaticalGenderByUserId(userHandle)); 4754 } 4755 4756 final String localeValue = 4757 Settings.System.getStringForUser(cr, SYSTEM_LOCALES, userHandle); 4758 if (localeValue != null) { 4759 outConfig.setLocales(LocaleList.forLanguageTags(localeValue)); 4760 } else { 4761 // Do not update configuration with emtpy settings since we need to take over the 4762 // locale list of previous user if the settings value is empty. This happens when a 4763 // new user is created. 4764 4765 if (updateSettingsIfEmpty) { 4766 // Make current configuration persistent. This is necessary the first time a 4767 // user log in. At the first login, the configuration settings are empty, so we 4768 // need to store the adjusted configuration as the initial settings. 4769 Settings.System.putStringForUser( 4770 cr, SYSTEM_LOCALES, outConfig.getLocales().toLanguageTags(), 4771 userHandle, DEFAULT_OVERRIDEABLE_BY_RESTORE); 4772 } 4773 } 4774 } 4775 getDefaultFontScale(ContentResolver cr, int userHandle)4776 private static float getDefaultFontScale(ContentResolver cr, int userHandle) { 4777 return com.android.window.flags.Flags.configurableFontScaleDefault() 4778 ? Settings.System.getFloatForUser(cr, DEFAULT_DEVICE_FONT_SCALE, 4779 DEFAULT_FONT_SCALE, userHandle) : DEFAULT_FONT_SCALE; 4780 } 4781 4782 /** 4783 * @hide Erase the fields in the Configuration that should be applied 4784 * by the settings. 4785 */ clearConfiguration(Configuration inoutConfig)4786 public static void clearConfiguration(Configuration inoutConfig) { 4787 inoutConfig.fontScale = 0; 4788 if (!inoutConfig.userSetLocale && !inoutConfig.getLocales().isEmpty()) { 4789 inoutConfig.clearLocales(); 4790 } 4791 inoutConfig.fontWeightAdjustment = Configuration.FONT_WEIGHT_ADJUSTMENT_UNDEFINED; 4792 } 4793 4794 /** 4795 * Convenience function to write a batch of configuration-related 4796 * settings from a {@link Configuration} object. 4797 * 4798 * @param cr The ContentResolver to access. 4799 * @param config The settings to write. 4800 * @return true if the values were set, false on database errors 4801 */ putConfiguration(ContentResolver cr, Configuration config)4802 public static boolean putConfiguration(ContentResolver cr, Configuration config) { 4803 return putConfigurationForUser(cr, config, cr.getUserId()); 4804 } 4805 4806 /** @hide */ putConfigurationForUser(ContentResolver cr, Configuration config, int userHandle)4807 public static boolean putConfigurationForUser(ContentResolver cr, Configuration config, 4808 int userHandle) { 4809 return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle) && 4810 Settings.System.putStringForUser( 4811 cr, SYSTEM_LOCALES, config.getLocales().toLanguageTags(), userHandle, 4812 DEFAULT_OVERRIDEABLE_BY_RESTORE); 4813 } 4814 4815 /** 4816 * Convenience function for checking if settings should be overwritten with config changes. 4817 * @see #putConfigurationForUser(ContentResolver, Configuration, int) 4818 * @hide 4819 */ hasInterestingConfigurationChanges(int changes)4820 public static boolean hasInterestingConfigurationChanges(int changes) { 4821 return (changes & ActivityInfo.CONFIG_FONT_SCALE) != 0 || 4822 (changes & ActivityInfo.CONFIG_LOCALE) != 0; 4823 } 4824 4825 /** @deprecated - Do not use */ 4826 @Deprecated getShowGTalkServiceStatus(ContentResolver cr)4827 public static boolean getShowGTalkServiceStatus(ContentResolver cr) { 4828 return getShowGTalkServiceStatusForUser(cr, cr.getUserId()); 4829 } 4830 4831 /** 4832 * @hide 4833 * @deprecated - Do not use 4834 */ 4835 @Deprecated getShowGTalkServiceStatusForUser(ContentResolver cr, int userHandle)4836 public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr, 4837 int userHandle) { 4838 return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0; 4839 } 4840 4841 /** @deprecated - Do not use */ 4842 @Deprecated setShowGTalkServiceStatus(ContentResolver cr, boolean flag)4843 public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) { 4844 setShowGTalkServiceStatusForUser(cr, flag, cr.getUserId()); 4845 } 4846 4847 /** 4848 * @hide 4849 * @deprecated - Do not use 4850 */ 4851 @Deprecated setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag, int userHandle)4852 public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag, 4853 int userHandle) { 4854 putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle); 4855 } 4856 4857 /** 4858 * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead 4859 */ 4860 @Deprecated 4861 public static final String STAY_ON_WHILE_PLUGGED_IN = Global.STAY_ON_WHILE_PLUGGED_IN; 4862 4863 /** 4864 * What happens when the user presses the end call button if they're not 4865 * on a call.<br/> 4866 * <b>Values:</b><br/> 4867 * 0 - The end button does nothing.<br/> 4868 * 1 - The end button goes to the home screen.<br/> 4869 * 2 - The end button puts the device to sleep and locks the keyguard.<br/> 4870 * 3 - The end button goes to the home screen. If the user is already on the 4871 * home screen, it puts the device to sleep. 4872 */ 4873 @Readable 4874 public static final String END_BUTTON_BEHAVIOR = "end_button_behavior"; 4875 4876 /** 4877 * END_BUTTON_BEHAVIOR value for "go home". 4878 * @hide 4879 */ 4880 public static final int END_BUTTON_BEHAVIOR_HOME = 0x1; 4881 4882 /** 4883 * END_BUTTON_BEHAVIOR value for "go to sleep". 4884 * @hide 4885 */ 4886 public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2; 4887 4888 /** 4889 * END_BUTTON_BEHAVIOR default value. 4890 * @hide 4891 */ 4892 public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP; 4893 4894 /** 4895 * Is advanced settings mode turned on. 0 == no, 1 == yes 4896 * @hide 4897 */ 4898 @Readable 4899 public static final String ADVANCED_SETTINGS = "advanced_settings"; 4900 4901 /** 4902 * ADVANCED_SETTINGS default value. 4903 * @hide 4904 */ 4905 public static final int ADVANCED_SETTINGS_DEFAULT = 0; 4906 4907 /** 4908 * If the triple press gesture for toggling accessibility is enabled. 4909 * Set to 1 for true and 0 for false. 4910 * 4911 * This setting is used only internally. 4912 * @hide 4913 */ 4914 public static final String WEAR_ACCESSIBILITY_GESTURE_ENABLED 4915 = "wear_accessibility_gesture_enabled"; 4916 4917 /** 4918 * If the triple press gesture for toggling accessibility is enabled during OOBE. 4919 * Set to 1 for true and 0 for false. 4920 * 4921 * This setting is used only internally. 4922 * @hide 4923 */ 4924 public static final String WEAR_ACCESSIBILITY_GESTURE_ENABLED_DURING_OOBE = 4925 "wear_accessibility_gesture_enabled_during_oobe"; 4926 4927 4928 /** 4929 * If the text-to-speech pre-warm is enabled. 4930 * Set to 1 for true and 0 for false. 4931 * 4932 * This setting is used only internally. 4933 * @hide 4934 */ 4935 public static final String WEAR_TTS_PREWARM_ENABLED = "wear_tts_prewarm_enabled"; 4936 4937 /** 4938 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead 4939 */ 4940 @Deprecated 4941 public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON; 4942 4943 /** 4944 * @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead 4945 */ 4946 @Deprecated 4947 public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH; 4948 4949 /** 4950 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead 4951 */ 4952 @Deprecated 4953 public static final String RADIO_WIFI = Global.RADIO_WIFI; 4954 4955 /** 4956 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead 4957 * {@hide} 4958 */ 4959 @Deprecated 4960 public static final String RADIO_WIMAX = Global.RADIO_WIMAX; 4961 4962 /** 4963 * @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead 4964 */ 4965 @Deprecated 4966 public static final String RADIO_CELL = Global.RADIO_CELL; 4967 4968 /** 4969 * @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead 4970 */ 4971 @Deprecated 4972 public static final String RADIO_NFC = Global.RADIO_NFC; 4973 4974 /** 4975 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead 4976 */ 4977 @Deprecated 4978 public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS; 4979 4980 /** 4981 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead 4982 * 4983 * {@hide} 4984 */ 4985 @Deprecated 4986 @UnsupportedAppUsage 4987 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = 4988 Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS; 4989 4990 /** 4991 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead 4992 */ 4993 @Deprecated 4994 public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY; 4995 4996 /** 4997 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead 4998 */ 4999 @Deprecated 5000 public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT; 5001 5002 /** 5003 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead 5004 */ 5005 @Deprecated 5006 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 5007 Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED; 5008 5009 /** 5010 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead 5011 */ 5012 @Deprecated 5013 public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER; 5014 5015 /** 5016 * @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead 5017 */ 5018 @Deprecated 5019 public static final String MODE_RINGER = Global.MODE_RINGER; 5020 5021 /** 5022 * Whether to use static IP and other static network attributes. 5023 * <p> 5024 * Set to 1 for true and 0 for false. 5025 * 5026 * @deprecated Use {@link WifiManager} instead 5027 */ 5028 @Deprecated 5029 @Readable 5030 public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip"; 5031 5032 /** 5033 * The static IP address. 5034 * <p> 5035 * Example: "192.168.1.51" 5036 * 5037 * @deprecated Use {@link WifiManager} instead 5038 */ 5039 @Deprecated 5040 @Readable 5041 public static final String WIFI_STATIC_IP = "wifi_static_ip"; 5042 5043 /** 5044 * If using static IP, the gateway's IP address. 5045 * <p> 5046 * Example: "192.168.1.1" 5047 * 5048 * @deprecated Use {@link WifiManager} instead 5049 */ 5050 @Deprecated 5051 @Readable 5052 public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway"; 5053 5054 /** 5055 * If using static IP, the net mask. 5056 * <p> 5057 * Example: "255.255.255.0" 5058 * 5059 * @deprecated Use {@link WifiManager} instead 5060 */ 5061 @Deprecated 5062 @Readable 5063 public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask"; 5064 5065 /** 5066 * If using static IP, the primary DNS's IP address. 5067 * <p> 5068 * Example: "192.168.1.1" 5069 * 5070 * @deprecated Use {@link WifiManager} instead 5071 */ 5072 @Deprecated 5073 @Readable 5074 public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1"; 5075 5076 /** 5077 * If using static IP, the secondary DNS's IP address. 5078 * <p> 5079 * Example: "192.168.1.2" 5080 * 5081 * @deprecated Use {@link WifiManager} instead 5082 */ 5083 @Deprecated 5084 @Readable 5085 public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2"; 5086 5087 /** 5088 * Determines whether remote devices may discover and/or connect to 5089 * this device. 5090 * <P>Type: INT</P> 5091 * 2 -- discoverable and connectable 5092 * 1 -- connectable but not discoverable 5093 * 0 -- neither connectable nor discoverable 5094 */ 5095 @Readable 5096 public static final String BLUETOOTH_DISCOVERABILITY = 5097 "bluetooth_discoverability"; 5098 5099 /** 5100 * Bluetooth discoverability timeout. If this value is nonzero, then 5101 * Bluetooth becomes discoverable for a certain number of seconds, 5102 * after which is becomes simply connectable. The value is in seconds. 5103 */ 5104 @Readable 5105 public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT = 5106 "bluetooth_discoverability_timeout"; 5107 5108 /** 5109 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED} 5110 * instead 5111 */ 5112 @Deprecated 5113 public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED; 5114 5115 /** 5116 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE} 5117 * instead 5118 */ 5119 @Deprecated 5120 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; 5121 5122 /** 5123 * @deprecated Use 5124 * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED} 5125 * instead 5126 */ 5127 @Deprecated 5128 public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = 5129 "lock_pattern_tactile_feedback_enabled"; 5130 5131 /** 5132 * A formatted string of the next alarm that is set, or the empty string 5133 * if there is no alarm set. 5134 * 5135 * @deprecated Use {@link android.app.AlarmManager#getNextAlarmClock()}. 5136 */ 5137 @Deprecated 5138 @Readable 5139 public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted"; 5140 5141 /** 5142 * Scaling factor for fonts, float. 5143 */ 5144 @Readable 5145 public static final String FONT_SCALE = "font_scale"; 5146 5147 /** 5148 * Default scaling factor for fonts for the specific device, float. 5149 * The value is read from the {@link R.dimen.def_device_font_scale} 5150 * configuration property. 5151 * 5152 * @hide 5153 */ 5154 @Readable 5155 public static final String DEFAULT_DEVICE_FONT_SCALE = "device_font_scale"; 5156 5157 /** 5158 * The serialized system locale value. 5159 * 5160 * Do not use this value directory. 5161 * To get system locale, use {@link LocaleList#getDefault} instead. 5162 * To update system locale, use {@link com.android.internal.app.LocalePicker#updateLocales} 5163 * instead. 5164 * @hide 5165 */ 5166 @Readable 5167 public static final String SYSTEM_LOCALES = "system_locales"; 5168 5169 5170 /** 5171 * Name of an application package to be debugged. 5172 * 5173 * @deprecated Use {@link Global#DEBUG_APP} instead 5174 */ 5175 @Deprecated 5176 public static final String DEBUG_APP = Global.DEBUG_APP; 5177 5178 /** 5179 * If 1, when launching DEBUG_APP it will wait for the debugger before 5180 * starting user code. If 0, it will run normally. 5181 * 5182 * @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead 5183 */ 5184 @Deprecated 5185 public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER; 5186 5187 /** 5188 * Whether or not to dim the screen. 0=no 1=yes 5189 * @deprecated This setting is no longer used. 5190 */ 5191 @Deprecated 5192 @Readable 5193 public static final String DIM_SCREEN = "dim_screen"; 5194 5195 /** 5196 * The display color mode. 5197 * @hide 5198 */ 5199 @Readable 5200 public static final String DISPLAY_COLOR_MODE = "display_color_mode"; 5201 5202 /** 5203 * Hint to decide whether restored vendor color modes are compatible with the new device. If 5204 * unset or a match is not made, only the standard color modes will be restored. 5205 * @hide 5206 */ 5207 public static final String DISPLAY_COLOR_MODE_VENDOR_HINT = 5208 "display_color_mode_vendor_hint"; 5209 5210 /** 5211 * The user selected min refresh rate in frames per second. If infinite, the user wants 5212 * the highest possible refresh rate. 5213 * 5214 * If this isn't set, 0 will be used. 5215 * @hide 5216 */ 5217 @Readable 5218 public static final String MIN_REFRESH_RATE = "min_refresh_rate"; 5219 5220 /** 5221 * The user selected peak refresh rate in frames per second. If infinite, the user wants 5222 * the highest possible refresh rate. 5223 * 5224 * If this isn't set, the system falls back to a device specific default. 5225 * @hide 5226 */ 5227 @Readable 5228 public static final String PEAK_REFRESH_RATE = "peak_refresh_rate"; 5229 5230 /** 5231 * Control lock behavior on fold 5232 * 5233 * If this isn't set, the system falls back to a device specific default. 5234 * @hide 5235 */ 5236 @Readable 5237 public static final String FOLD_LOCK_BEHAVIOR = "fold_lock_behavior_setting"; 5238 5239 /** 5240 * The amount of time in milliseconds before the device goes to sleep or begins 5241 * to dream after a period of inactivity. This value is also known as the 5242 * user activity timeout period since the screen isn't necessarily turned off 5243 * when it expires. 5244 * 5245 * <p> 5246 * This value is bounded by maximum timeout set by 5247 * {@link android.app.admin.DevicePolicyManager#setMaximumTimeToLock(ComponentName, long)}. 5248 */ 5249 @Readable 5250 public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout"; 5251 5252 /** 5253 * The screen backlight brightness between 1 (minimum) and 255 (maximum). 5254 * 5255 * Use {@link android.view.WindowManager.LayoutParams#screenBrightness} to set the screen 5256 * brightness instead. 5257 */ 5258 @Readable 5259 public static final String SCREEN_BRIGHTNESS = "screen_brightness"; 5260 5261 /** 5262 * Controls whether to enable automatic brightness mode. Value can be set to 5263 * {@link #SCREEN_BRIGHTNESS_MODE_MANUAL} or {@link #SCREEN_BRIGHTNESS_MODE_AUTOMATIC}. 5264 * If {@link #SCREEN_BRIGHTNESS_MODE_AUTOMATIC} is set, the system may change 5265 * {@link #SCREEN_BRIGHTNESS} automatically. 5266 */ 5267 @Readable 5268 public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode"; 5269 5270 /** 5271 * Adjustment to auto-brightness to make it generally more (>0.0 <1.0) 5272 * or less (<0.0 >-1.0) bright. 5273 * @hide 5274 */ 5275 @UnsupportedAppUsage 5276 @Readable 5277 public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj"; 5278 5279 /** 5280 * SCREEN_BRIGHTNESS_MODE value for manual mode. 5281 */ 5282 public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0; 5283 5284 /** 5285 * SCREEN_BRIGHTNESS_MODE value for automatic mode. 5286 */ 5287 public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; 5288 5289 /** 5290 * Control whether to enable adaptive sleep mode. 5291 * @deprecated Use {@link android.provider.Settings.Secure#ADAPTIVE_SLEEP} instead. 5292 * @hide 5293 */ 5294 @Deprecated 5295 @Readable 5296 public static final String ADAPTIVE_SLEEP = "adaptive_sleep"; 5297 5298 /** 5299 * Control whether the process CPU usage meter should be shown. 5300 * 5301 * @deprecated This functionality is no longer available as of 5302 * {@link android.os.Build.VERSION_CODES#N_MR1}. 5303 */ 5304 @Deprecated 5305 public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES; 5306 5307 /** 5308 * If 1, the activity manager will aggressively finish activities and 5309 * processes as soon as they are no longer needed. If 0, the normal 5310 * extended lifetime is used. 5311 * 5312 * @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead 5313 */ 5314 @Deprecated 5315 public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES; 5316 5317 /** 5318 * Determines which streams are affected by ringer and zen mode changes. The 5319 * stream type's bit should be set to 1 if it should be muted when going 5320 * into an inaudible ringer mode. 5321 */ 5322 @Readable 5323 public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected"; 5324 5325 /** 5326 * Determines which streams are affected by mute. The 5327 * stream type's bit should be set to 1 if it should be muted when a mute request 5328 * is received. 5329 */ 5330 @Readable 5331 public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected"; 5332 5333 /** 5334 * Whether vibrate is on for different events. This is used internally, 5335 * changing this value will not change the vibrate. See AudioManager. 5336 */ 5337 @Readable 5338 public static final String VIBRATE_ON = "vibrate_on"; 5339 5340 /** 5341 * Whether applying ramping ringer on incoming phone call ringtone. 5342 * <p>1 = apply ramping ringer 5343 * <p>0 = do not apply ramping ringer 5344 * @hide 5345 */ 5346 @Readable 5347 public static final String APPLY_RAMPING_RINGER = "apply_ramping_ringer"; 5348 5349 /** 5350 * If 1, redirects the system vibrator to all currently attached input devices 5351 * that support vibration. If there are no such input devices, then the system 5352 * vibrator is used instead. 5353 * If 0, does not register the system vibrator. 5354 * 5355 * This setting is mainly intended to provide a compatibility mechanism for 5356 * applications that only know about the system vibrator and do not use the 5357 * input device vibrator API. 5358 * 5359 * @hide 5360 */ 5361 @Readable 5362 public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices"; 5363 5364 /** 5365 * The intensity of alarm vibrations, if configurable. 5366 * 5367 * Not all devices are capable of changing their vibration intensity; on these devices 5368 * there will likely be no difference between the various vibration intensities except for 5369 * intensity 0 (off) and the rest. 5370 * 5371 * <b>Values:</b><br/> 5372 * 0 - Vibration is disabled<br/> 5373 * 1 - Weak vibrations<br/> 5374 * 2 - Medium vibrations<br/> 5375 * 3 - Strong vibrations 5376 * @hide 5377 */ 5378 public static final String ALARM_VIBRATION_INTENSITY = 5379 "alarm_vibration_intensity"; 5380 5381 /** 5382 * The intensity of media vibrations, if configurable. 5383 * 5384 * This includes any vibration that is part of media, such as music, movie, soundtrack, 5385 * game or animations. 5386 * 5387 * Not all devices are capable of changing their vibration intensity; on these devices 5388 * there will likely be no difference between the various vibration intensities except for 5389 * intensity 0 (off) and the rest. 5390 * 5391 * <b>Values:</b><br/> 5392 * 0 - Vibration is disabled<br/> 5393 * 1 - Weak vibrations<br/> 5394 * 2 - Medium vibrations<br/> 5395 * 3 - Strong vibrations 5396 * @hide 5397 */ 5398 public static final String MEDIA_VIBRATION_INTENSITY = 5399 "media_vibration_intensity"; 5400 5401 /** 5402 * The intensity of notification vibrations, if configurable. 5403 * 5404 * Not all devices are capable of changing their vibration intensity; on these devices 5405 * there will likely be no difference between the various vibration intensities except for 5406 * intensity 0 (off) and the rest. 5407 * 5408 * <b>Values:</b><br/> 5409 * 0 - Vibration is disabled<br/> 5410 * 1 - Weak vibrations<br/> 5411 * 2 - Medium vibrations<br/> 5412 * 3 - Strong vibrations 5413 * @hide 5414 */ 5415 @Readable 5416 public static final String NOTIFICATION_VIBRATION_INTENSITY = 5417 "notification_vibration_intensity"; 5418 5419 /** 5420 * The intensity of ringtone vibrations, if configurable. 5421 * 5422 * Not all devices are capable of changing their vibration intensity; on these devices 5423 * there will likely be no difference between the various vibration intensities except for 5424 * intensity 0 (off) and the rest. 5425 * 5426 * <b>Values:</b><br/> 5427 * 0 - Vibration is disabled<br/> 5428 * 1 - Weak vibrations<br/> 5429 * 2 - Medium vibrations<br/> 5430 * 3 - Strong vibrations 5431 * @hide 5432 */ 5433 @Readable 5434 public static final String RING_VIBRATION_INTENSITY = 5435 "ring_vibration_intensity"; 5436 5437 /** 5438 * The intensity of haptic feedback vibrations, if configurable. 5439 * 5440 * Not all devices are capable of changing their feedback intensity; on these devices 5441 * there will likely be no difference between the various vibration intensities except for 5442 * intensity 0 (off) and the rest. 5443 * 5444 * <b>Values:</b><br/> 5445 * 0 - Vibration is disabled<br/> 5446 * 1 - Weak vibrations<br/> 5447 * 2 - Medium vibrations<br/> 5448 * 3 - Strong vibrations 5449 * @hide 5450 */ 5451 @Readable 5452 public static final String HAPTIC_FEEDBACK_INTENSITY = 5453 "haptic_feedback_intensity"; 5454 5455 /** 5456 * The intensity of haptic feedback vibrations for interaction with hardware components from 5457 * the device, like buttons and sensors, if configurable. 5458 * 5459 * Not all devices are capable of changing their feedback intensity; on these devices 5460 * there will likely be no difference between the various vibration intensities except for 5461 * intensity 0 (off) and the rest. 5462 * 5463 * <b>Values:</b><br/> 5464 * 0 - Vibration is disabled<br/> 5465 * 1 - Weak vibrations<br/> 5466 * 2 - Medium vibrations<br/> 5467 * 3 - Strong vibrations 5468 * @hide 5469 */ 5470 public static final String HARDWARE_HAPTIC_FEEDBACK_INTENSITY = 5471 "hardware_haptic_feedback_intensity"; 5472 5473 /** 5474 * Whether keyboard vibration feedback is enabled. The value is boolean (1 or 0). 5475 * 5476 * @hide 5477 */ 5478 @Readable 5479 public static final String KEYBOARD_VIBRATION_ENABLED = "keyboard_vibration_enabled"; 5480 5481 /** 5482 * Ringer volume. This is used internally, changing this value will not 5483 * change the volume. See AudioManager. 5484 * 5485 * @removed Not used by anything since API 2. 5486 */ 5487 @Readable 5488 public static final String VOLUME_RING = "volume_ring"; 5489 5490 /** 5491 * System/notifications volume. This is used internally, changing this 5492 * value will not change the volume. See AudioManager. 5493 * 5494 * @removed Not used by anything since API 2. 5495 */ 5496 @Readable 5497 public static final String VOLUME_SYSTEM = "volume_system"; 5498 5499 /** 5500 * Voice call volume. This is used internally, changing this value will 5501 * not change the volume. See AudioManager. 5502 * 5503 * @removed Not used by anything since API 2. 5504 */ 5505 @Readable 5506 public static final String VOLUME_VOICE = "volume_voice"; 5507 5508 /** 5509 * Music/media/gaming volume. This is used internally, changing this 5510 * value will not change the volume. See AudioManager. 5511 * 5512 * @removed Not used by anything since API 2. 5513 */ 5514 @Readable 5515 public static final String VOLUME_MUSIC = "volume_music"; 5516 5517 /** 5518 * Alarm volume. This is used internally, changing this 5519 * value will not change the volume. See AudioManager. 5520 * 5521 * @removed Not used by anything since API 2. 5522 */ 5523 @Readable 5524 public static final String VOLUME_ALARM = "volume_alarm"; 5525 5526 /** 5527 * Notification volume. This is used internally, changing this 5528 * value will not change the volume. See AudioManager. 5529 * 5530 * @removed Not used by anything since API 2. 5531 */ 5532 @Readable 5533 public static final String VOLUME_NOTIFICATION = "volume_notification"; 5534 5535 /** 5536 * Bluetooth Headset volume. This is used internally, changing this value will 5537 * not change the volume. See AudioManager. 5538 * 5539 * @removed Not used by anything since API 2. 5540 */ 5541 @Readable 5542 public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco"; 5543 5544 /** 5545 * @hide 5546 * Acessibility volume. This is used internally, changing this 5547 * value will not change the volume. 5548 */ 5549 @Readable 5550 public static final String VOLUME_ACCESSIBILITY = "volume_a11y"; 5551 5552 /** 5553 * @hide 5554 * Volume index for virtual assistant. 5555 */ 5556 @Readable 5557 public static final String VOLUME_ASSISTANT = "volume_assistant"; 5558 5559 /** 5560 * Master volume (float in the range 0.0f to 1.0f). 5561 * 5562 * @hide 5563 */ 5564 @Readable 5565 public static final String VOLUME_MASTER = "volume_master"; 5566 5567 /** 5568 * The mapping of input device to its input gain index. 5569 * 5570 * @hide 5571 */ 5572 @Readable 5573 public static final String INPUT_GAIN_INDEX_SETTINGS = "input_gain_index_settings"; 5574 5575 /** 5576 * Master mono (int 1 = mono, 0 = normal). 5577 * 5578 * @hide 5579 */ 5580 @UnsupportedAppUsage 5581 @Readable 5582 public static final String MASTER_MONO = "master_mono"; 5583 5584 /** 5585 * Master balance (float -1.f = 100% left, 0.f = dead center, 1.f = 100% right). 5586 * 5587 * @hide 5588 */ 5589 @Readable 5590 public static final String MASTER_BALANCE = "master_balance"; 5591 5592 /** 5593 * Whether the notifications should use the ring volume (value of 1) or 5594 * a separate notification volume (value of 0). In most cases, users 5595 * will have this enabled so the notification and ringer volumes will be 5596 * the same. However, power users can disable this and use the separate 5597 * notification volume control. 5598 * <p> 5599 * Note: This is a one-off setting that will be removed in the future 5600 * when there is profile support. For this reason, it is kept hidden 5601 * from the public APIs. 5602 * 5603 * @hide 5604 * @deprecated 5605 */ 5606 @Deprecated 5607 @Readable 5608 public static final String NOTIFICATIONS_USE_RING_VOLUME = 5609 "notifications_use_ring_volume"; 5610 5611 /** 5612 * Whether silent mode should allow vibration feedback. This is used 5613 * internally in AudioService and the Sound settings activity to 5614 * coordinate decoupling of vibrate and silent modes. This setting 5615 * will likely be removed in a future release with support for 5616 * audio/vibe feedback profiles. 5617 * 5618 * Not used anymore. On devices with vibrator, the user explicitly selects 5619 * silent or vibrate mode. 5620 * Kept for use by legacy database upgrade code in DatabaseHelper. 5621 * @hide 5622 */ 5623 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 5624 @Readable 5625 public static final String VIBRATE_IN_SILENT = "vibrate_in_silent"; 5626 5627 /** 5628 * The mapping of stream type (integer) to its setting. 5629 * 5630 * @removed Not used by anything since API 2. 5631 */ 5632 public static final String[] VOLUME_SETTINGS = { 5633 VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC, 5634 VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO 5635 }; 5636 5637 /** 5638 * @hide 5639 * The mapping of stream type (integer) to its setting. 5640 * Unlike the VOLUME_SETTINGS array, this one contains as many entries as 5641 * AudioSystem.NUM_STREAM_TYPES, and has empty strings for stream types whose volumes 5642 * are never persisted. 5643 */ 5644 public static final String[] VOLUME_SETTINGS_INT = { 5645 VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC, 5646 VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO, 5647 "" /*STREAM_SYSTEM_ENFORCED, no setting for this stream*/, 5648 "" /*STREAM_DTMF, no setting for this stream*/, 5649 "" /*STREAM_TTS, no setting for this stream*/, 5650 VOLUME_ACCESSIBILITY, VOLUME_ASSISTANT 5651 }; 5652 5653 /** 5654 * Appended to various volume related settings to record the previous 5655 * values before they the settings were affected by a silent/vibrate 5656 * ringer mode change. 5657 * 5658 * @removed Not used by anything since API 2. 5659 */ 5660 @Readable 5661 public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible"; 5662 5663 /** 5664 * Persistent store for the system-wide default ringtone URI. 5665 * <p> 5666 * If you need to play the default ringtone at any given time, it is recommended 5667 * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve 5668 * to the set default ringtone at the time of playing. 5669 * 5670 * @see #DEFAULT_RINGTONE_URI 5671 */ 5672 @Readable 5673 public static final String RINGTONE = "ringtone"; 5674 5675 /** 5676 * A {@link Uri} that will point to the current default ringtone at any 5677 * given time. 5678 * <p> 5679 * If the current default ringtone is in the DRM provider and the caller 5680 * does not have permission, the exception will be a 5681 * FileNotFoundException. 5682 */ 5683 public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE); 5684 5685 /** {@hide} */ 5686 public static final String RINGTONE_CACHE = "ringtone_cache"; 5687 /** {@hide} */ 5688 public static final Uri RINGTONE_CACHE_URI = getUriFor(RINGTONE_CACHE); 5689 5690 /** 5691 * Persistent store for the system-wide default notification sound. 5692 * 5693 * @see #RINGTONE 5694 * @see #DEFAULT_NOTIFICATION_URI 5695 */ 5696 @Readable 5697 public static final String NOTIFICATION_SOUND = "notification_sound"; 5698 5699 /** 5700 * A {@link Uri} that will point to the current default notification 5701 * sound at any given time. 5702 * 5703 * @see #DEFAULT_RINGTONE_URI 5704 */ 5705 public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND); 5706 5707 /** {@hide} */ 5708 @Readable 5709 public static final String NOTIFICATION_SOUND_CACHE = "notification_sound_cache"; 5710 /** {@hide} */ 5711 public static final Uri NOTIFICATION_SOUND_CACHE_URI = getUriFor(NOTIFICATION_SOUND_CACHE); 5712 5713 /** 5714 * When enabled, notifications attention effects: sound, vibration, flashing 5715 * will have a cooldown timer. 5716 * 5717 * The value 1 - enable, 0 - disable 5718 * @hide 5719 */ 5720 @Readable 5721 public static final String NOTIFICATION_COOLDOWN_ENABLED = 5722 "notification_cooldown_enabled"; 5723 5724 /** 5725 * When enabled, notification cooldown will apply to all notifications. 5726 * Otherwise cooldown will only apply to conversations. 5727 * 5728 * The value 1 - enable, 0 - disable 5729 * Only valid if {@code NOTIFICATION_COOLDOWN_ENABLED} is enabled. 5730 * @hide 5731 */ 5732 public static final String NOTIFICATION_COOLDOWN_ALL = 5733 "notification_cooldown_all"; 5734 5735 /** 5736 * When enabled, notification attention effects will be restricted to vibration only 5737 * as long as the screen is unlocked. 5738 * 5739 * The value 1 - enable, 0 - disable 5740 * @hide 5741 */ 5742 public static final String NOTIFICATION_COOLDOWN_VIBRATE_UNLOCKED = 5743 "notification_cooldown_vibrate_unlocked"; 5744 5745 /** 5746 * Persistent store for the system-wide default alarm alert. 5747 * 5748 * @see #RINGTONE 5749 * @see #DEFAULT_ALARM_ALERT_URI 5750 */ 5751 @Readable 5752 public static final String ALARM_ALERT = "alarm_alert"; 5753 5754 /** 5755 * A {@link Uri} that will point to the current default alarm alert at 5756 * any given time. 5757 * 5758 * @see #DEFAULT_ALARM_ALERT_URI 5759 */ 5760 public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT); 5761 5762 /** {@hide} */ 5763 @Readable 5764 public static final String ALARM_ALERT_CACHE = "alarm_alert_cache"; 5765 /** {@hide} */ 5766 public static final Uri ALARM_ALERT_CACHE_URI = getUriFor(ALARM_ALERT_CACHE); 5767 5768 /** 5769 * Persistent store for the system default media button event receiver. 5770 * 5771 * @hide 5772 */ 5773 @Readable(maxTargetSdk = Build.VERSION_CODES.R) 5774 public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver"; 5775 5776 /** 5777 * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off 5778 */ 5779 @Readable 5780 public static final String TEXT_AUTO_REPLACE = "auto_replace"; 5781 5782 /** 5783 * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off 5784 */ 5785 @Readable 5786 public static final String TEXT_AUTO_CAPS = "auto_caps"; 5787 5788 /** 5789 * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This 5790 * feature converts two spaces to a "." and space. 5791 */ 5792 @Readable 5793 public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate"; 5794 5795 /** 5796 * Setting to showing password characters in text editors. 1 = On, 0 = Off 5797 */ 5798 @Readable 5799 public static final String TEXT_SHOW_PASSWORD = "show_password"; 5800 5801 @Readable 5802 public static final String SHOW_GTALK_SERVICE_STATUS = 5803 "SHOW_GTALK_SERVICE_STATUS"; 5804 5805 /** 5806 * Name of activity to use for wallpaper on the home screen. 5807 * 5808 * @deprecated Use {@link WallpaperManager} instead. 5809 */ 5810 @Deprecated 5811 @Readable 5812 public static final String WALLPAPER_ACTIVITY = "wallpaper_activity"; 5813 5814 /** 5815 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME} 5816 * instead 5817 */ 5818 @Deprecated 5819 public static final String AUTO_TIME = Global.AUTO_TIME; 5820 5821 /** 5822 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE} 5823 * instead 5824 */ 5825 @Deprecated 5826 public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE; 5827 5828 /** 5829 * Display the user's times, e.g. in the status bar, as 12 or 24 hours. 5830 * <ul> 5831 * <li>24 = 24 hour</li> 5832 * <li>12 = 12 hour</li> 5833 * <li>[unset] = use the device locale's default</li> 5834 * </ul> 5835 */ 5836 @Readable 5837 public static final String TIME_12_24 = "time_12_24"; 5838 5839 /** 5840 * @deprecated No longer used. Use {@link #TIME_12_24} instead. 5841 */ 5842 @Deprecated 5843 @Readable 5844 public static final String DATE_FORMAT = "date_format"; 5845 5846 /** 5847 * Whether the setup wizard has been run before (on first boot), or if 5848 * it still needs to be run. 5849 * 5850 * nonzero = it has been run in the past 5851 * 0 = it has not been run in the past 5852 */ 5853 @Readable 5854 public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run"; 5855 5856 /** 5857 * Scaling factor for normal window animations. Setting to 0 will disable window 5858 * animations. 5859 * 5860 * @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead 5861 */ 5862 @Deprecated 5863 public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE; 5864 5865 /** 5866 * Scaling factor for activity transition animations. Setting to 0 will disable window 5867 * animations. 5868 * 5869 * @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead 5870 */ 5871 @Deprecated 5872 public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE; 5873 5874 /** 5875 * Scaling factor for Animator-based animations. This affects both the start delay and 5876 * duration of all such animations. Setting to 0 will cause animations to end immediately. 5877 * The default value is 1. 5878 * 5879 * @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead 5880 */ 5881 @Deprecated 5882 public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE; 5883 5884 /** 5885 * Control whether the accelerometer will be used to change screen 5886 * orientation. If 0, it will not be used unless explicitly requested 5887 * by the application; if 1, it will be used by default unless explicitly 5888 * disabled by the application. 5889 */ 5890 @Readable 5891 public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; 5892 5893 /** 5894 * Default screen rotation when no other policy applies. 5895 * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a 5896 * preference, this rotation value will be used. Must be one of the 5897 * {@link android.view.Surface#ROTATION_0 Surface rotation constants}. 5898 * 5899 * @see Display#getRotation 5900 */ 5901 @Readable 5902 public static final String USER_ROTATION = "user_rotation"; 5903 5904 /** 5905 * Control whether the rotation lock toggle in the System UI should be hidden. 5906 * Typically this is done for accessibility purposes to make it harder for 5907 * the user to accidentally toggle the rotation lock while the display rotation 5908 * has been locked for accessibility. 5909 * 5910 * If 0, then rotation lock toggle is not hidden for accessibility (although it may be 5911 * unavailable for other reasons). If 1, then the rotation lock toggle is hidden. 5912 * 5913 * @hide 5914 */ 5915 @UnsupportedAppUsage 5916 @Readable 5917 public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY = 5918 "hide_rotation_lock_toggle_for_accessibility"; 5919 5920 /** 5921 * Whether the phone vibrates when it is ringing due to an incoming call. This will 5922 * be used by Phone and Setting apps; it shouldn't affect other apps. 5923 * The value is boolean (1 or 0). 5924 * 5925 * Note: this is not same as "vibrate on ring", which had been available until ICS. 5926 * It was about AudioManager's setting and thus affected all the applications which 5927 * relied on the setting, while this is purely about the vibration setting for incoming 5928 * calls. 5929 * 5930 * @deprecated Replaced by using {@link android.os.VibrationAttributes#USAGE_RINGTONE} on 5931 * vibrations for incoming calls. User settings are applied automatically by the service and 5932 * should not be applied by individual apps. 5933 */ 5934 @Deprecated 5935 @Readable 5936 public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing"; 5937 5938 /** 5939 * When {@code 1}, Telecom enhanced call blocking functionality is enabled. When 5940 * {@code 0}, enhanced call blocking functionality is disabled. 5941 * @hide 5942 */ 5943 @Readable 5944 public static final String DEBUG_ENABLE_ENHANCED_CALL_BLOCKING = 5945 "debug.enable_enhanced_calling"; 5946 5947 /** 5948 * Whether the audible DTMF tones are played by the dialer when dialing. The value is 5949 * boolean (1 or 0). 5950 */ 5951 @Readable 5952 public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone"; 5953 5954 /** 5955 * CDMA only settings 5956 * DTMF tone type played by the dialer when dialing. 5957 * 0 = Normal 5958 * 1 = Long 5959 */ 5960 @Readable 5961 public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; 5962 5963 /** 5964 * Whether the hearing aid is enabled. The value is 5965 * boolean (1 or 0). 5966 * @hide 5967 */ 5968 @UnsupportedAppUsage 5969 @Readable 5970 public static final String HEARING_AID = "hearing_aid"; 5971 5972 /** 5973 * CDMA only settings 5974 * TTY Mode 5975 * 0 = OFF 5976 * 1 = FULL 5977 * 2 = VCO 5978 * 3 = HCO 5979 * @hide 5980 */ 5981 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 5982 @Readable 5983 public static final String TTY_MODE = "tty_mode"; 5984 5985 /** 5986 * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is 5987 * boolean (1 or 0). 5988 */ 5989 @Readable 5990 public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; 5991 5992 /** 5993 * Whether haptic feedback (Vibrate on tap) is enabled. The value is 5994 * boolean (1 or 0). 5995 * 5996 * @deprecated Replaced by using {@link android.os.VibrationAttributes#USAGE_TOUCH} on 5997 * vibrations. User settings are applied automatically by the service and should not be 5998 * applied by individual apps. 5999 */ 6000 @Deprecated 6001 @Readable 6002 public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled"; 6003 6004 /** 6005 * @deprecated Each application that shows web suggestions should have its own 6006 * setting for this. 6007 */ 6008 @Deprecated 6009 @Readable 6010 public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; 6011 6012 /** 6013 * Whether the notification LED should repeatedly flash when a notification is 6014 * pending. The value is boolean (1 or 0). 6015 * @hide 6016 */ 6017 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6018 @Readable 6019 public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; 6020 6021 /** 6022 * Show pointer location on screen? 6023 * 0 = no 6024 * 1 = yes 6025 * @hide 6026 */ 6027 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6028 @Readable 6029 public static final String POINTER_LOCATION = "pointer_location"; 6030 6031 /** 6032 * Show touch positions on screen? 6033 * 0 = no 6034 * 1 = yes 6035 * @hide 6036 */ 6037 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6038 @Readable 6039 public static final String SHOW_TOUCHES = "show_touches"; 6040 6041 /** 6042 * Show key presses dispatched to focused windows on the screen. 6043 * 0 = no 6044 * 1 = yes 6045 * @hide 6046 */ 6047 public static final String SHOW_KEY_PRESSES = "show_key_presses"; 6048 6049 /** 6050 * Show touchpad input visualization on screen. 6051 * 0 = no 6052 * 1 = yes 6053 * @hide 6054 */ 6055 public static final String TOUCHPAD_VISUALIZER = "touchpad_visualizer"; 6056 6057 /** 6058 * Show rotary input dispatched to focused windows on the screen. 6059 * 0 = no 6060 * 1 = yes 6061 * @hide 6062 */ 6063 public static final String SHOW_ROTARY_INPUT = "show_rotary_input"; 6064 6065 /** 6066 * The screen backlight brightness for automatic mode. 6067 * 6068 * <p>Value should be one of: 6069 * <ul> 6070 * <li>SCREEN_BRIGHTNESS_AUTOMATIC_BRIGHT 6071 * <li>SCREEN_BRIGHTNESS_AUTOMATIC_NORMAL 6072 * <li>SCREEN_BRIGHTNESS_AUTOMATIC_DIM 6073 * </ul> 6074 * @hide 6075 */ 6076 public static final String SCREEN_BRIGHTNESS_FOR_ALS = "screen_brightness_for_als"; 6077 6078 /** 6079 * SCREEN_BRIGHTNESS_FOR_ALS value for automatic bright. 6080 * @hide 6081 */ 6082 public static final int SCREEN_BRIGHTNESS_AUTOMATIC_BRIGHT = 1; 6083 6084 /** 6085 * SCREEN_BRIGHTNESS_FOR_ALS value for automatic normal. 6086 * @hide 6087 */ 6088 public static final int SCREEN_BRIGHTNESS_AUTOMATIC_NORMAL = 2; 6089 6090 /** 6091 * SCREEN_BRIGHTNESS_FOR_ALS value for automatic dim. 6092 * @hide 6093 */ 6094 public static final int SCREEN_BRIGHTNESS_AUTOMATIC_DIM = 3; 6095 6096 /** 6097 * Log raw orientation data from 6098 * {@link com.android.server.policy.WindowOrientationListener} for use with the 6099 * orientationplot.py tool. 6100 * 0 = no 6101 * 1 = yes 6102 * @hide 6103 */ 6104 @Readable 6105 public static final String WINDOW_ORIENTATION_LISTENER_LOG = 6106 "window_orientation_listener_log"; 6107 6108 /** 6109 * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED} 6110 * instead 6111 * @hide 6112 */ 6113 @Deprecated 6114 public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED; 6115 6116 /** 6117 * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED} 6118 * instead 6119 * @hide 6120 */ 6121 @Deprecated 6122 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6123 public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED; 6124 6125 /** 6126 * Whether to play sounds when the keyguard is shown and dismissed. 6127 * @hide 6128 */ 6129 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6130 @Readable 6131 public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled"; 6132 6133 /** 6134 * Whether the lockscreen should be completely disabled. 6135 * @hide 6136 */ 6137 @Readable 6138 public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled"; 6139 6140 /** 6141 * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND} 6142 * instead 6143 * @hide 6144 */ 6145 @Deprecated 6146 public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND; 6147 6148 /** 6149 * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND} 6150 * instead 6151 * @hide 6152 */ 6153 @Deprecated 6154 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6155 public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND; 6156 6157 /** 6158 * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND} 6159 * instead 6160 * @hide 6161 */ 6162 @Deprecated 6163 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6164 public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND; 6165 6166 /** 6167 * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND} 6168 * instead 6169 * @hide 6170 */ 6171 @Deprecated 6172 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6173 public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND; 6174 6175 /** 6176 * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND} 6177 * instead 6178 * @hide 6179 */ 6180 @Deprecated 6181 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6182 public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND; 6183 6184 /** 6185 * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND} 6186 * instead 6187 * @hide 6188 */ 6189 @Deprecated 6190 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6191 public static final String LOCK_SOUND = Global.LOCK_SOUND; 6192 6193 /** 6194 * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND} 6195 * instead 6196 * @hide 6197 */ 6198 @Deprecated 6199 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6200 public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND; 6201 6202 /** 6203 * Receive incoming SIP calls? 6204 * 0 = no 6205 * 1 = yes 6206 * @hide 6207 */ 6208 @Readable 6209 public static final String SIP_RECEIVE_CALLS = "sip_receive_calls"; 6210 6211 /** 6212 * Call Preference String. 6213 * "SIP_ALWAYS" : Always use SIP with network access 6214 * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address 6215 * @hide 6216 */ 6217 @Readable 6218 public static final String SIP_CALL_OPTIONS = "sip_call_options"; 6219 6220 /** 6221 * One of the sip call options: Always use SIP with network access. 6222 * @hide 6223 */ 6224 @Readable 6225 public static final String SIP_ALWAYS = "SIP_ALWAYS"; 6226 6227 /** 6228 * One of the sip call options: Only if destination is a SIP address. 6229 * @hide 6230 */ 6231 @Readable 6232 public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY"; 6233 6234 /** 6235 * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that 6236 * the user should be prompted each time a call is made whether it should be placed using 6237 * SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with 6238 * SIP_ADDRESS_ONLY. 6239 * @hide 6240 */ 6241 @Deprecated 6242 @Readable 6243 public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME"; 6244 6245 /** 6246 * Pointer speed setting. 6247 * This is an integer value in a range between -7 and +7, so there are 15 possible values. 6248 * -7 = slowest 6249 * 0 = default speed 6250 * +7 = fastest 6251 * @hide 6252 */ 6253 @SuppressLint({"NoSettingsProvider", "UnflaggedApi"}) // TestApi without associated feature. 6254 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6255 @Readable 6256 @TestApi 6257 public static final String POINTER_SPEED = "pointer_speed"; 6258 6259 /** 6260 * Pointer scale setting. 6261 * 6262 * <p>This float value represents the scale by which the size of the pointer increases. 6263 * @hide 6264 */ 6265 @Readable 6266 public static final String POINTER_SCALE = "pointer_scale"; 6267 6268 /** 6269 * Touchpad pointer speed setting. 6270 * This is an integer value in a range between -7 and +7, so there are 15 possible values. 6271 * -7 = slowest 6272 * 0 = default speed 6273 * +7 = fastest 6274 * @hide 6275 */ 6276 public static final String TOUCHPAD_POINTER_SPEED = "touchpad_pointer_speed"; 6277 6278 /** 6279 * Whether to invert the touchpad scrolling direction. 6280 * 6281 * If set to 1 (the default), moving two fingers downwards on the touchpad will scroll 6282 * upwards, consistent with normal touchscreen scrolling. If set to 0, moving two fingers 6283 * downwards will scroll downwards. 6284 * 6285 * @hide 6286 */ 6287 @Readable 6288 public static final String TOUCHPAD_NATURAL_SCROLLING = "touchpad_natural_scrolling"; 6289 6290 /** 6291 * Whether to enable tap-to-click on touchpads. 6292 * 6293 * @hide 6294 */ 6295 public static final String TOUCHPAD_TAP_TO_CLICK = "touchpad_tap_to_click"; 6296 6297 /** 6298 * Whether to enable tap dragging on touchpads. 6299 * 6300 * @hide 6301 */ 6302 public static final String TOUCHPAD_TAP_DRAGGING = "touchpad_tap_dragging"; 6303 6304 /** 6305 * Whether to enable three finger tap customization on touchpads. 6306 * 6307 * @hide 6308 */ 6309 public static final String TOUCHPAD_THREE_FINGER_TAP_CUSTOMIZATION = 6310 "touchpad_three_finger_tap_customization"; 6311 6312 /** 6313 * Whether to enable a right-click zone on touchpads. 6314 * 6315 * When set to 1, pressing to click in a section on the right-hand side of the touchpad will 6316 * result in a context click (a.k.a. right click). 6317 * 6318 * @hide 6319 */ 6320 public static final String TOUCHPAD_RIGHT_CLICK_ZONE = "touchpad_right_click_zone"; 6321 6322 /** 6323 * Whether to enable system gestures (three- and four-finger swipes) on touchpads. 6324 * 6325 * @hide 6326 */ 6327 public static final String TOUCHPAD_SYSTEM_GESTURES = "touchpad_system_gestures"; 6328 6329 /** 6330 * Whether touchpad acceleration is enabled. 6331 * 6332 * When enabled, the speed of the pointer will increase as the user moves their 6333 * finger faster on the touchpad. 6334 * 6335 * @hide 6336 */ 6337 public static final String TOUCHPAD_ACCELERATION_ENABLED = 6338 "touchpad_acceleration_enabled"; 6339 6340 /** 6341 * Whether to enable reversed vertical scrolling for connected mice. 6342 * 6343 * When enabled, scrolling down on the mouse wheel will move the screen up and vice versa. 6344 * @hide 6345 */ 6346 public static final String MOUSE_REVERSE_VERTICAL_SCROLLING = 6347 "mouse_reverse_vertical_scrolling"; 6348 6349 /** 6350 * Whether to enable swapping the primary button for connected mice. 6351 * 6352 * When enabled, right clicking will be the primary button and left clicking will be the 6353 * secondary button (e.g. show menu). 6354 * @hide 6355 */ 6356 public static final String MOUSE_SWAP_PRIMARY_BUTTON = 6357 "mouse_swap_primary_button"; 6358 6359 /** 6360 * Whether to enable mouse scrolling acceleration. 6361 * 6362 * When enabled, mouse scrolling is accelerated based on the user's scrolling speed. 6363 * When disabled, mouse scrolling speed becomes directly proportional to the speed at which 6364 * the wheel is turned. 6365 * @hide 6366 */ 6367 public static final String MOUSE_SCROLLING_ACCELERATION = "mouse_scrolling_acceleration"; 6368 6369 /** 6370 * Whether mouse acceleration is enabled. 6371 * 6372 * When enabled, the mouse cursor will accelerate as the mouse moves faster. 6373 * 6374 * @hide 6375 */ 6376 public static final String MOUSE_POINTER_ACCELERATION_ENABLED = 6377 "mouse_pointer_acceleration_enabled"; 6378 6379 /** 6380 * Mouse scrolling speed setting. 6381 * 6382 * This is an integer value in a range between -7 and +7, so there are 15 possible values. 6383 * The setting only applies when mouse scrolling acceleration is not enabled. 6384 * -7 = slowest 6385 * 0 = default speed 6386 * +7 = fastest 6387 * 6388 * @hide 6389 */ 6390 public static final String MOUSE_SCROLLING_SPEED = "mouse_scrolling_speed"; 6391 6392 /** 6393 * Pointer fill style, specified by 6394 * {@link android.view.PointerIcon.PointerIconVectorStyleFill} constants. 6395 * 6396 * @hide 6397 */ 6398 @Readable 6399 public static final String POINTER_FILL_STYLE = "pointer_fill_style"; 6400 6401 /** 6402 * Pointer stroke style, specified by 6403 * {@link android.view.PointerIcon.PointerIconVectorStyleStroke} constants. 6404 * 6405 * @hide 6406 */ 6407 @Readable 6408 public static final String POINTER_STROKE_STYLE = "pointer_stroke_style"; 6409 6410 /** 6411 * Whether lock-to-app will be triggered by long-press on recents. 6412 * @hide 6413 */ 6414 @Readable 6415 public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled"; 6416 6417 /** 6418 * I am the lolrus. 6419 * <p> 6420 * Nonzero values indicate that the user has a bukkit. 6421 * Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>. 6422 * @hide 6423 */ 6424 @Readable 6425 public static final String EGG_MODE = "egg_mode"; 6426 6427 /** 6428 * Setting to determine whether or not to show the battery percentage in the status bar. 6429 * 0 - Don't show percentage 6430 * 1 - Show percentage 6431 * @hide 6432 */ 6433 @Readable 6434 public static final String SHOW_BATTERY_PERCENT = "status_bar_show_battery_percent"; 6435 6436 /** 6437 * Whether or not to enable multiple audio focus. 6438 * When enabled, requires more management by user over application playback activity, 6439 * for instance pausing media apps when another starts. 6440 * @hide 6441 */ 6442 @Readable 6443 public static final String MULTI_AUDIO_FOCUS_ENABLED = "multi_audio_focus_enabled"; 6444 6445 /** 6446 * The information of locale preference. This records user's preference to avoid 6447 * unsynchronized and existing locale preference in 6448 * {@link Locale#getDefault(Locale.Category)}. 6449 * 6450 * <p><b>Note:</b> The format follow the 6451 * <a href="https://www.rfc-editor.org/rfc/bcp/bcp47.txt">IETF BCP47 expression</a> 6452 * 6453 * E.g. : und-u-ca-gregorian-hc-h23 6454 * @hide 6455 */ 6456 public static final String LOCALE_PREFERENCES = "locale_preferences"; 6457 6458 /** 6459 * User can change the region from region settings. This records user's preferred region. 6460 * 6461 * E.g. : if user's locale is en-US, this will record US 6462 * @hide 6463 */ 6464 public static final String PREFERRED_REGION = "preferred_region"; 6465 6466 /** 6467 * Setting to enable camera flash notification feature. 6468 * <ul> 6469 * <li> 0 = Off 6470 * <li> 1 = On 6471 * </ul> 6472 * @hide 6473 */ 6474 public static final String CAMERA_FLASH_NOTIFICATION = "camera_flash_notification"; 6475 6476 /** 6477 * Setting to enable screen flash notification feature. 6478 * <ul> 6479 * <li> 0 = Off 6480 * <li> 1 = On 6481 * </ul> 6482 * @hide 6483 */ 6484 public static final String SCREEN_FLASH_NOTIFICATION = "screen_flash_notification"; 6485 6486 /** 6487 * Setting to enable CV (proprietary) 6488 * 6489 * @hide 6490 */ 6491 public static final String CV_ENABLED = 6492 "cv_enabled"; 6493 6494 /** 6495 * Integer property that specifes the color for screen flash notification as a 6496 * packed 32-bit color. 6497 * 6498 * @see android.graphics.Color#argb 6499 * @hide 6500 */ 6501 public static final String SCREEN_FLASH_NOTIFICATION_COLOR = 6502 "screen_flash_notification_color_global"; 6503 6504 /** 6505 * IMPORTANT: If you add a new public settings you also have to add it to 6506 * PUBLIC_SETTINGS below. If the new setting is hidden you have to add 6507 * it to PRIVATE_SETTINGS below. Also add a validator that can validate 6508 * the setting value. See an example above. 6509 */ 6510 6511 /** 6512 * Keys we no longer back up under the current schema, but want to continue to 6513 * process when restoring historical backup datasets. 6514 * 6515 * All settings in {@link LEGACY_RESTORE_SETTINGS} array *must* have a non-null validator, 6516 * otherwise they won't be restored. 6517 * 6518 * @hide 6519 */ 6520 public static final String[] LEGACY_RESTORE_SETTINGS = { 6521 }; 6522 6523 /** 6524 * These are all public system settings 6525 * 6526 * @hide 6527 */ 6528 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6529 public static final Set<String> PUBLIC_SETTINGS = new ArraySet<>(); 6530 static { 6531 PUBLIC_SETTINGS.add(END_BUTTON_BEHAVIOR); 6532 PUBLIC_SETTINGS.add(WIFI_USE_STATIC_IP); 6533 PUBLIC_SETTINGS.add(WIFI_STATIC_IP); 6534 PUBLIC_SETTINGS.add(WIFI_STATIC_GATEWAY); 6535 PUBLIC_SETTINGS.add(WIFI_STATIC_NETMASK); 6536 PUBLIC_SETTINGS.add(WIFI_STATIC_DNS1); 6537 PUBLIC_SETTINGS.add(WIFI_STATIC_DNS2); 6538 PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY); 6539 PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY_TIMEOUT); 6540 PUBLIC_SETTINGS.add(NEXT_ALARM_FORMATTED); 6541 PUBLIC_SETTINGS.add(FONT_SCALE); 6542 PUBLIC_SETTINGS.add(SYSTEM_LOCALES); 6543 PUBLIC_SETTINGS.add(DIM_SCREEN); 6544 PUBLIC_SETTINGS.add(SCREEN_OFF_TIMEOUT); 6545 PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS); 6546 PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_MODE); 6547 PUBLIC_SETTINGS.add(MODE_RINGER_STREAMS_AFFECTED); 6548 PUBLIC_SETTINGS.add(MUTE_STREAMS_AFFECTED); 6549 PUBLIC_SETTINGS.add(VIBRATE_ON); 6550 PUBLIC_SETTINGS.add(VOLUME_RING); 6551 PUBLIC_SETTINGS.add(VOLUME_SYSTEM); 6552 PUBLIC_SETTINGS.add(VOLUME_VOICE); 6553 PUBLIC_SETTINGS.add(VOLUME_MUSIC); 6554 PUBLIC_SETTINGS.add(VOLUME_ALARM); 6555 PUBLIC_SETTINGS.add(VOLUME_NOTIFICATION); 6556 PUBLIC_SETTINGS.add(VOLUME_BLUETOOTH_SCO); 6557 PUBLIC_SETTINGS.add(VOLUME_ASSISTANT); 6558 PUBLIC_SETTINGS.add(RINGTONE); 6559 PUBLIC_SETTINGS.add(NOTIFICATION_SOUND); 6560 PUBLIC_SETTINGS.add(ALARM_ALERT); 6561 PUBLIC_SETTINGS.add(TEXT_AUTO_REPLACE); 6562 PUBLIC_SETTINGS.add(TEXT_AUTO_CAPS); 6563 PUBLIC_SETTINGS.add(TEXT_AUTO_PUNCTUATE); 6564 PUBLIC_SETTINGS.add(TEXT_SHOW_PASSWORD); 6565 PUBLIC_SETTINGS.add(SHOW_GTALK_SERVICE_STATUS); 6566 PUBLIC_SETTINGS.add(WALLPAPER_ACTIVITY); 6567 PUBLIC_SETTINGS.add(TIME_12_24); 6568 PUBLIC_SETTINGS.add(DATE_FORMAT); 6569 PUBLIC_SETTINGS.add(SETUP_WIZARD_HAS_RUN); 6570 PUBLIC_SETTINGS.add(ACCELEROMETER_ROTATION); 6571 PUBLIC_SETTINGS.add(USER_ROTATION); 6572 PUBLIC_SETTINGS.add(DTMF_TONE_WHEN_DIALING); 6573 PUBLIC_SETTINGS.add(SOUND_EFFECTS_ENABLED); 6574 PUBLIC_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED); 6575 PUBLIC_SETTINGS.add(SHOW_WEB_SUGGESTIONS); 6576 PUBLIC_SETTINGS.add(VIBRATE_WHEN_RINGING); 6577 PUBLIC_SETTINGS.add(APPLY_RAMPING_RINGER); 6578 } 6579 6580 /** 6581 * These are all hidden system settings. 6582 * 6583 * @hide 6584 */ 6585 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6586 public static final Set<String> PRIVATE_SETTINGS = new ArraySet<>(); 6587 static { 6588 PRIVATE_SETTINGS.add(WIFI_USE_STATIC_IP); 6589 PRIVATE_SETTINGS.add(END_BUTTON_BEHAVIOR); 6590 PRIVATE_SETTINGS.add(ADVANCED_SETTINGS); 6591 PRIVATE_SETTINGS.add(WEAR_ACCESSIBILITY_GESTURE_ENABLED); 6592 PRIVATE_SETTINGS.add(WEAR_ACCESSIBILITY_GESTURE_ENABLED_DURING_OOBE); 6593 PRIVATE_SETTINGS.add(WEAR_TTS_PREWARM_ENABLED); 6594 PRIVATE_SETTINGS.add(SCREEN_AUTO_BRIGHTNESS_ADJ); 6595 PRIVATE_SETTINGS.add(VIBRATE_INPUT_DEVICES); 6596 PRIVATE_SETTINGS.add(VOLUME_MASTER); 6597 PRIVATE_SETTINGS.add(MASTER_MONO); 6598 PRIVATE_SETTINGS.add(MASTER_BALANCE); 6599 PRIVATE_SETTINGS.add(NOTIFICATIONS_USE_RING_VOLUME); 6600 PRIVATE_SETTINGS.add(VIBRATE_IN_SILENT); 6601 PRIVATE_SETTINGS.add(MEDIA_BUTTON_RECEIVER); 6602 PRIVATE_SETTINGS.add(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY); 6603 PRIVATE_SETTINGS.add(DTMF_TONE_TYPE_WHEN_DIALING); 6604 PRIVATE_SETTINGS.add(HEARING_AID); 6605 PRIVATE_SETTINGS.add(TTY_MODE); 6606 PRIVATE_SETTINGS.add(NOTIFICATION_LIGHT_PULSE); 6607 PRIVATE_SETTINGS.add(POINTER_LOCATION); 6608 PRIVATE_SETTINGS.add(SHOW_TOUCHES); 6609 PRIVATE_SETTINGS.add(SHOW_KEY_PRESSES); 6610 PRIVATE_SETTINGS.add(WINDOW_ORIENTATION_LISTENER_LOG); 6611 PRIVATE_SETTINGS.add(POWER_SOUNDS_ENABLED); 6612 PRIVATE_SETTINGS.add(DOCK_SOUNDS_ENABLED); 6613 PRIVATE_SETTINGS.add(LOCKSCREEN_SOUNDS_ENABLED); 6614 PRIVATE_SETTINGS.add(LOCKSCREEN_DISABLED); 6615 PRIVATE_SETTINGS.add(LOW_BATTERY_SOUND); 6616 PRIVATE_SETTINGS.add(DESK_DOCK_SOUND); 6617 PRIVATE_SETTINGS.add(DESK_UNDOCK_SOUND); 6618 PRIVATE_SETTINGS.add(CAR_DOCK_SOUND); 6619 PRIVATE_SETTINGS.add(CAR_UNDOCK_SOUND); 6620 PRIVATE_SETTINGS.add(LOCK_SOUND); 6621 PRIVATE_SETTINGS.add(UNLOCK_SOUND); 6622 PRIVATE_SETTINGS.add(SIP_RECEIVE_CALLS); 6623 PRIVATE_SETTINGS.add(SIP_CALL_OPTIONS); 6624 PRIVATE_SETTINGS.add(SIP_ALWAYS); 6625 PRIVATE_SETTINGS.add(SIP_ADDRESS_ONLY); 6626 PRIVATE_SETTINGS.add(SIP_ASK_ME_EACH_TIME); 6627 PRIVATE_SETTINGS.add(POINTER_SPEED); 6628 PRIVATE_SETTINGS.add(POINTER_FILL_STYLE); 6629 PRIVATE_SETTINGS.add(POINTER_STROKE_STYLE); 6630 PRIVATE_SETTINGS.add(POINTER_SCALE); 6631 PRIVATE_SETTINGS.add(LOCK_TO_APP_ENABLED); 6632 PRIVATE_SETTINGS.add(EGG_MODE); 6633 PRIVATE_SETTINGS.add(SHOW_BATTERY_PERCENT); 6634 PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE); 6635 PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE_VENDOR_HINT); 6636 PRIVATE_SETTINGS.add(LOCALE_PREFERENCES); 6637 PRIVATE_SETTINGS.add(TOUCHPAD_POINTER_SPEED); 6638 PRIVATE_SETTINGS.add(TOUCHPAD_NATURAL_SCROLLING); 6639 PRIVATE_SETTINGS.add(TOUCHPAD_TAP_TO_CLICK); 6640 PRIVATE_SETTINGS.add(TOUCHPAD_TAP_DRAGGING); 6641 PRIVATE_SETTINGS.add(TOUCHPAD_RIGHT_CLICK_ZONE); 6642 PRIVATE_SETTINGS.add(TOUCHPAD_SYSTEM_GESTURES); 6643 PRIVATE_SETTINGS.add(TOUCHPAD_ACCELERATION_ENABLED); 6644 PRIVATE_SETTINGS.add(CAMERA_FLASH_NOTIFICATION); 6645 PRIVATE_SETTINGS.add(SCREEN_FLASH_NOTIFICATION); 6646 PRIVATE_SETTINGS.add(SCREEN_FLASH_NOTIFICATION_COLOR); 6647 PRIVATE_SETTINGS.add(DEFAULT_DEVICE_FONT_SCALE); 6648 PRIVATE_SETTINGS.add(MOUSE_REVERSE_VERTICAL_SCROLLING); 6649 PRIVATE_SETTINGS.add(MOUSE_SWAP_PRIMARY_BUTTON); 6650 PRIVATE_SETTINGS.add(MOUSE_POINTER_ACCELERATION_ENABLED); 6651 PRIVATE_SETTINGS.add(PREFERRED_REGION); 6652 PRIVATE_SETTINGS.add(MOUSE_SCROLLING_ACCELERATION); 6653 PRIVATE_SETTINGS.add(MOUSE_SCROLLING_SPEED); 6654 } 6655 6656 /** 6657 * These entries are considered common between the personal and the managed profile, 6658 * since the managed profile doesn't get to change them. 6659 */ 6660 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6661 private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>(); 6662 static { 6663 CLONE_TO_MANAGED_PROFILE.add(DATE_FORMAT); 6664 CLONE_TO_MANAGED_PROFILE.add(HAPTIC_FEEDBACK_ENABLED); 6665 CLONE_TO_MANAGED_PROFILE.add(SOUND_EFFECTS_ENABLED); 6666 CLONE_TO_MANAGED_PROFILE.add(TEXT_SHOW_PASSWORD); 6667 CLONE_TO_MANAGED_PROFILE.add(TIME_12_24); 6668 } 6669 6670 /** @hide */ getCloneToManagedProfileSettings(Set<String> outKeySet)6671 public static void getCloneToManagedProfileSettings(Set<String> outKeySet) { 6672 outKeySet.addAll(CLONE_TO_MANAGED_PROFILE); 6673 } 6674 6675 /** 6676 * These entries should be cloned from this profile's parent only if the dependency's 6677 * value is true ("1") 6678 * 6679 * Note: the dependencies must be Secure settings 6680 * 6681 * @hide 6682 */ 6683 public static final Map<String, String> CLONE_FROM_PARENT_ON_VALUE = new ArrayMap<>(); 6684 static { CLONE_FROM_PARENT_ON_VALUE.put(RINGTONE, Secure.SYNC_PARENT_SOUNDS)6685 CLONE_FROM_PARENT_ON_VALUE.put(RINGTONE, Secure.SYNC_PARENT_SOUNDS); CLONE_FROM_PARENT_ON_VALUE.put(NOTIFICATION_SOUND, Secure.SYNC_PARENT_SOUNDS)6686 CLONE_FROM_PARENT_ON_VALUE.put(NOTIFICATION_SOUND, Secure.SYNC_PARENT_SOUNDS); CLONE_FROM_PARENT_ON_VALUE.put(ALARM_ALERT, Secure.SYNC_PARENT_SOUNDS)6687 CLONE_FROM_PARENT_ON_VALUE.put(ALARM_ALERT, Secure.SYNC_PARENT_SOUNDS); 6688 } 6689 6690 /** @hide */ getCloneFromParentOnValueSettings(Map<String, String> outMap)6691 public static void getCloneFromParentOnValueSettings(Map<String, String> outMap) { 6692 outMap.putAll(CLONE_FROM_PARENT_ON_VALUE); 6693 } 6694 6695 /** 6696 * System settings which can be accessed by instant apps. 6697 * @hide 6698 */ 6699 public static final Set<String> INSTANT_APP_SETTINGS = new ArraySet<>(); 6700 static { 6701 INSTANT_APP_SETTINGS.add(TEXT_AUTO_REPLACE); 6702 INSTANT_APP_SETTINGS.add(TEXT_AUTO_CAPS); 6703 INSTANT_APP_SETTINGS.add(TEXT_AUTO_PUNCTUATE); 6704 INSTANT_APP_SETTINGS.add(TEXT_SHOW_PASSWORD); 6705 INSTANT_APP_SETTINGS.add(DATE_FORMAT); 6706 INSTANT_APP_SETTINGS.add(FONT_SCALE); 6707 INSTANT_APP_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED); 6708 INSTANT_APP_SETTINGS.add(TIME_12_24); 6709 INSTANT_APP_SETTINGS.add(SOUND_EFFECTS_ENABLED); 6710 INSTANT_APP_SETTINGS.add(ACCELEROMETER_ROTATION); 6711 } 6712 6713 /** 6714 * When to use Wi-Fi calling 6715 * 6716 * @see android.telephony.TelephonyManager.WifiCallingChoices 6717 * @hide 6718 */ 6719 @Readable 6720 public static final String WHEN_TO_MAKE_WIFI_CALLS = "when_to_make_wifi_calls"; 6721 6722 /** Controls whether bluetooth is on or off on wearable devices. 6723 * 6724 * <p>The valid values for this key are: 0 (disabled) or 1 (enabled). 6725 * 6726 * @hide 6727 */ 6728 public static final String CLOCKWORK_BLUETOOTH_SETTINGS_PREF = "cw_bt_settings_pref"; 6729 6730 /** 6731 * Controls whether the unread notification dot indicator is shown on wearable devices. 6732 * 6733 * <p>The valid values for this key are: 0 (disabled) or 1 (enabled). 6734 * 6735 * @hide 6736 */ 6737 public static final String UNREAD_NOTIFICATION_DOT_INDICATOR = 6738 "unread_notification_dot_indicator"; 6739 6740 /** 6741 * Controls whether auto-launching media controls is enabled on wearable devices. 6742 * 6743 * <p>The valid values for this key are: 0 (disabled) or 1 (enabled). 6744 * 6745 * @hide 6746 */ 6747 public static final String AUTO_LAUNCH_MEDIA_CONTROLS = "auto_launch_media_controls"; 6748 6749 // Settings moved to Settings.Secure 6750 6751 /** 6752 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} 6753 * instead 6754 */ 6755 @Deprecated 6756 public static final String ADB_ENABLED = Global.ADB_ENABLED; 6757 6758 /** 6759 * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead 6760 */ 6761 @Deprecated 6762 public static final String ANDROID_ID = Secure.ANDROID_ID; 6763 6764 /** 6765 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead 6766 */ 6767 @Deprecated 6768 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; 6769 6770 /** 6771 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead 6772 */ 6773 @Deprecated 6774 public static final String DATA_ROAMING = Global.DATA_ROAMING; 6775 6776 /** 6777 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead 6778 */ 6779 @Deprecated 6780 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; 6781 6782 /** 6783 * @deprecated Use {@link android.provider.Settings.Global#HTTP_PROXY} instead 6784 */ 6785 @Deprecated 6786 public static final String HTTP_PROXY = Global.HTTP_PROXY; 6787 6788 /** 6789 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead 6790 */ 6791 @Deprecated 6792 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; 6793 6794 /** 6795 * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED} 6796 * instead 6797 */ 6798 @Deprecated 6799 public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED; 6800 6801 /** 6802 * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead 6803 */ 6804 @Deprecated 6805 public static final String LOGGING_ID = Secure.LOGGING_ID; 6806 6807 /** 6808 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead 6809 */ 6810 @Deprecated 6811 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; 6812 6813 /** 6814 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED} 6815 * instead 6816 */ 6817 @Deprecated 6818 public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED; 6819 6820 /** 6821 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE} 6822 * instead 6823 */ 6824 @Deprecated 6825 public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE; 6826 6827 /** 6828 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL} 6829 * instead 6830 */ 6831 @Deprecated 6832 public static final String PARENTAL_CONTROL_REDIRECT_URL = 6833 Secure.PARENTAL_CONTROL_REDIRECT_URL; 6834 6835 /** 6836 * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead 6837 */ 6838 @Deprecated 6839 public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME; 6840 6841 /** 6842 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead 6843 */ 6844 @Deprecated 6845 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; 6846 6847 /** 6848 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead 6849 */ 6850 @Deprecated 6851 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; 6852 6853 /** 6854 * @deprecated Use 6855 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead 6856 */ 6857 @Deprecated 6858 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; 6859 6860 /** 6861 * @deprecated Use 6862 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead 6863 */ 6864 @Deprecated 6865 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = 6866 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; 6867 6868 /** 6869 * @deprecated Use 6870 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead 6871 */ 6872 @Deprecated 6873 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = 6874 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; 6875 6876 /** 6877 * @deprecated Use 6878 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead 6879 */ 6880 @Deprecated 6881 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = 6882 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; 6883 6884 /** 6885 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} 6886 * instead 6887 */ 6888 @Deprecated 6889 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = Global.WIFI_NUM_OPEN_NETWORKS_KEPT; 6890 6891 /** 6892 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead 6893 */ 6894 @Deprecated 6895 public static final String WIFI_ON = Global.WIFI_ON; 6896 6897 /** 6898 * @deprecated Use 6899 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE} 6900 * instead 6901 */ 6902 @Deprecated 6903 @Readable 6904 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = 6905 Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE; 6906 6907 /** 6908 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead 6909 */ 6910 @Deprecated 6911 public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT; 6912 6913 /** 6914 * @deprecated Use 6915 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead 6916 */ 6917 @Deprecated 6918 @Readable 6919 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = 6920 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS; 6921 6922 /** 6923 * @deprecated Use 6924 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead 6925 */ 6926 @Deprecated 6927 @Readable 6928 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = 6929 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED; 6930 6931 /** 6932 * @deprecated Use 6933 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS} 6934 * instead 6935 */ 6936 @Deprecated 6937 @Readable 6938 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = 6939 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS; 6940 6941 /** 6942 * @deprecated Use 6943 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead 6944 */ 6945 @Deprecated 6946 @Readable 6947 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = 6948 Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT; 6949 6950 /** 6951 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS} 6952 * instead 6953 */ 6954 @Deprecated 6955 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS; 6956 6957 /** 6958 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead 6959 */ 6960 @Deprecated 6961 public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON; 6962 6963 /** 6964 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead 6965 */ 6966 @Deprecated 6967 public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT; 6968 6969 /** 6970 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS} 6971 * instead 6972 */ 6973 @Deprecated 6974 public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS; 6975 6976 /** 6977 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS} 6978 * instead 6979 */ 6980 @Deprecated 6981 @Readable 6982 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = 6983 Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS; 6984 6985 /** 6986 * Checks if the specified app can modify system settings. As of API 6987 * level 23, an app cannot modify system settings unless it declares the 6988 * {@link android.Manifest.permission#WRITE_SETTINGS} 6989 * permission in its manifest, <em>and</em> the user specifically grants 6990 * the app this capability. To prompt the user to grant this approval, 6991 * the app must send an intent with the action {@link 6992 * android.provider.Settings#ACTION_MANAGE_WRITE_SETTINGS}, which causes 6993 * the system to display a permission management screen. 6994 * 6995 * @param context App context. 6996 * @return true if the calling app can write to system settings, false otherwise 6997 */ canWrite(Context context)6998 public static boolean canWrite(Context context) { 6999 return isCallingPackageAllowedToWriteSettings(context, Process.myUid(), 7000 context.getOpPackageName(), false); 7001 } 7002 } 7003 7004 /** 7005 * Secure system settings, containing system preferences that applications 7006 * can read but are not allowed to write. These are for preferences that 7007 * the user must explicitly modify through the UI of a system app. Normal 7008 * applications cannot modify the secure settings database, either directly 7009 * or by calling the "put" methods that this class contains. 7010 */ 7011 public static final class Secure extends NameValueTable { 7012 // NOTE: If you add new settings here, be sure to add them to 7013 // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoSecureSettingsLocked. 7014 7015 /** 7016 * The content:// style URL for this table 7017 */ 7018 public static final Uri CONTENT_URI = 7019 Uri.parse("content://" + AUTHORITY + "/secure"); 7020 7021 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 7022 private static final ContentProviderHolder sProviderHolder = 7023 new ContentProviderHolder(CONTENT_URI); 7024 7025 // Populated lazily, guarded by class object: 7026 @UnsupportedAppUsage 7027 private static final NameValueCache sNameValueCache = new NameValueCache( 7028 CONTENT_URI, 7029 CALL_METHOD_GET_SECURE, 7030 CALL_METHOD_PUT_SECURE, 7031 CALL_METHOD_DELETE_SECURE, 7032 sProviderHolder, 7033 Secure.class); 7034 7035 @UnsupportedAppUsage 7036 private static final HashSet<String> MOVED_TO_LOCK_SETTINGS; 7037 @UnsupportedAppUsage 7038 private static final HashSet<String> MOVED_TO_GLOBAL; 7039 static { 7040 MOVED_TO_LOCK_SETTINGS = new HashSet<>(3); 7041 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED); 7042 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE); 7043 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); 7044 7045 MOVED_TO_GLOBAL = new HashSet<>(); 7046 MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED); 7047 MOVED_TO_GLOBAL.add(Settings.Global.ASSISTED_GPS_ENABLED); 7048 MOVED_TO_GLOBAL.add(Settings.Global.BLUETOOTH_ON); 7049 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_CELL_BROADCAST_SMS); 7050 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_ROAMING_MODE); 7051 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_SUBSCRIPTION_MODE); 7052 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE); 7053 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI); 7054 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ROAMING); 7055 MOVED_TO_GLOBAL.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED); 7056 MOVED_TO_GLOBAL.add(Settings.Global.DEVICE_PROVISIONED); 7057 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_SIZE_FORCED); 7058 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE); 7059 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE); 7060 MOVED_TO_GLOBAL.add(Settings.Global.MOBILE_DATA); 7061 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION); 7062 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_DELETE_AGE); 7063 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES); 7064 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE); 7065 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_ENABLED); 7066 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES); 7067 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_POLL_INTERVAL); 7068 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_SAMPLE_ENABLED); 7069 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE); 7070 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION); 7071 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_DELETE_AGE); 7072 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES); 7073 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_ROTATE_AGE); 7074 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION); 7075 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE); 7076 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES); 7077 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE); 7078 MOVED_TO_GLOBAL.add(Settings.Global.NETWORK_PREFERENCE); 7079 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_DIFF); 7080 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING); 7081 MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER); 7082 MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT); 7083 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT); 7084 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS); 7085 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT); 7086 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS); 7087 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT); 7088 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL); 7089 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST); 7090 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL); 7091 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_APN); 7092 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_REQUIRED); 7093 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_SUPPORTED); 7094 MOVED_TO_GLOBAL.add(Settings.Global.USB_MASS_STORAGE_ENABLED); 7095 MOVED_TO_GLOBAL.add(Settings.Global.USE_GOOGLE_MAIL); 7096 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_COUNTRY_CODE); 7097 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS); 7098 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FREQUENCY_BAND); 7099 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_IDLE_MS); 7100 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT); 7101 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS); 7102 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); 7103 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); 7104 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT); 7105 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON); 7106 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME); 7107 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS); 7108 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED); 7109 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ENHANCED_AUTO_JOIN); 7110 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORK_SHOW_RSSI); 7111 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_ON); 7112 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED); 7113 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_PENDING_FACTORY_RESET); 7114 MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON); 7115 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT); 7116 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE); 7117 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS); 7118 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS); 7119 MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS); 7120 MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL); 7121 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD); 7122 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_THRESHOLD); 7123 MOVED_TO_GLOBAL.add(Settings.Global.SEND_ACTION_APP_ERROR); 7124 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_AGE_SECONDS); 7125 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_MAX_FILES); 7126 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_KB); 7127 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_PERCENT); 7128 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_RESERVE_PERCENT); 7129 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_TAG_PREFIX); 7130 MOVED_TO_GLOBAL.add(Settings.Global.ERROR_LOGCAT_PREFIX); 7131 MOVED_TO_GLOBAL.add(Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL); 7132 MOVED_TO_GLOBAL.add(Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD); 7133 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE); 7134 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES); 7135 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES); 7136 MOVED_TO_GLOBAL.add(Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS); 7137 MOVED_TO_GLOBAL.add(Settings.Global.CONNECTIVITY_CHANGE_DELAY); 7138 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED); 7139 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_SERVER); 7140 MOVED_TO_GLOBAL.add(Settings.Global.SET_INSTALL_LOCATION); 7141 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_INSTALL_LOCATION); 7142 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY); 7143 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY); 7144 MOVED_TO_GLOBAL.add(Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT); 7145 MOVED_TO_GLOBAL.add(Settings.Global.HTTP_PROXY); 7146 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_HOST); 7147 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_PORT); 7148 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST); 7149 MOVED_TO_GLOBAL.add(Settings.Global.SET_GLOBAL_HTTP_PROXY); 7150 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER); 7151 MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE); 7152 MOVED_TO_GLOBAL.add(Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY); 7153 MOVED_TO_GLOBAL.add(Settings.Global.SECURE_FRP_MODE); 7154 } 7155 7156 /** @hide */ getMovedToGlobalSettings(Set<String> outKeySet)7157 public static void getMovedToGlobalSettings(Set<String> outKeySet) { 7158 outKeySet.addAll(MOVED_TO_GLOBAL); 7159 } 7160 7161 /** @hide */ getMovedToSystemSettings(Set<String> outKeySet)7162 public static void getMovedToSystemSettings(Set<String> outKeySet) { 7163 } 7164 7165 /** @hide */ clearProviderForTest()7166 public static void clearProviderForTest() { 7167 sProviderHolder.clearProviderForTest(); 7168 sNameValueCache.clearGenerationTrackerForTest(); 7169 } 7170 7171 /** @hide */ getPublicSettings(Set<String> allKeys, Set<String> readableKeys, ArrayMap<String, Integer> readableKeysWithMaxTargetSdk)7172 public static void getPublicSettings(Set<String> allKeys, Set<String> readableKeys, 7173 ArrayMap<String, Integer> readableKeysWithMaxTargetSdk) { 7174 getPublicSettingsForClass(Secure.class, allKeys, readableKeys, 7175 readableKeysWithMaxTargetSdk); 7176 } 7177 7178 /** 7179 * Look up a name in the database. 7180 * @param resolver to access the database with 7181 * @param name to look up in the table 7182 * @return the corresponding value, or null if not present 7183 */ getString(ContentResolver resolver, String name)7184 public static String getString(ContentResolver resolver, String name) { 7185 return getStringForUser(resolver, name, resolver.getUserId()); 7186 } 7187 7188 /** @hide */ 7189 @UnsupportedAppUsage getStringForUser(ContentResolver resolver, String name, int userHandle)7190 public static String getStringForUser(ContentResolver resolver, String name, 7191 int userHandle) { 7192 if (MOVED_TO_GLOBAL.contains(name)) { 7193 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" 7194 + " to android.provider.Settings.Global."); 7195 return Global.getStringForUser(resolver, name, userHandle); 7196 } 7197 7198 if (MOVED_TO_LOCK_SETTINGS.contains(name) && Process.myUid() != Process.SYSTEM_UID) { 7199 // No context; use the ActivityThread's context as an approximation for 7200 // determining the target API level. 7201 Application application = ActivityThread.currentApplication(); 7202 7203 boolean isPreMnc = application != null 7204 && application.getApplicationInfo() != null 7205 && application.getApplicationInfo().targetSdkVersion 7206 <= VERSION_CODES.LOLLIPOP_MR1; 7207 if (isPreMnc) { 7208 // Old apps used to get the three deprecated LOCK_PATTERN_* settings from 7209 // ILockSettings.getString(). For security reasons, we now just return a 7210 // stubbed-out value. Note: the only one of these three settings actually known 7211 // to have been used was LOCK_PATTERN_ENABLED, and ILockSettings.getString() 7212 // already always returned "0" for that starting in Android 11. 7213 return "0"; 7214 } 7215 throw new SecurityException("Settings.Secure." + name + " is deprecated and no" + 7216 " longer accessible. See API documentation for potential replacements."); 7217 } 7218 7219 return sNameValueCache.getStringForUser(resolver, name, userHandle); 7220 } 7221 7222 /** 7223 * Store a name/value pair into the database. Values written by this method will be 7224 * overridden if a restore happens in the future. 7225 * 7226 * @param resolver to access the database with 7227 * @param name to store 7228 * @param value to associate with the name 7229 * @return true if the value was set, false on database errors 7230 * 7231 * @hide 7232 */ 7233 @RequiresPermission(Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) putString(ContentResolver resolver, String name, String value, boolean overrideableByRestore)7234 public static boolean putString(ContentResolver resolver, String name, 7235 String value, boolean overrideableByRestore) { 7236 return putStringForUser(resolver, name, value, /* tag */ null, /* makeDefault */ false, 7237 resolver.getUserId(), overrideableByRestore); 7238 } 7239 7240 /** 7241 * Store a name/value pair into the database. 7242 * @param resolver to access the database with 7243 * @param name to store 7244 * @param value to associate with the name 7245 * @return true if the value was set, false on database errors 7246 */ putString(ContentResolver resolver, String name, String value)7247 public static boolean putString(ContentResolver resolver, String name, String value) { 7248 return putStringForUser(resolver, name, value, resolver.getUserId()); 7249 } 7250 7251 /** @hide */ 7252 @UnsupportedAppUsage putStringForUser(ContentResolver resolver, String name, String value, int userHandle)7253 public static boolean putStringForUser(ContentResolver resolver, String name, String value, 7254 int userHandle) { 7255 return putStringForUser(resolver, name, value, null, false, userHandle, 7256 DEFAULT_OVERRIDEABLE_BY_RESTORE); 7257 } 7258 7259 /** @hide */ 7260 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) putStringForUser(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, @Nullable String tag, boolean makeDefault, @UserIdInt int userHandle, boolean overrideableByRestore)7261 public static boolean putStringForUser(@NonNull ContentResolver resolver, 7262 @NonNull String name, @Nullable String value, @Nullable String tag, 7263 boolean makeDefault, @UserIdInt int userHandle, boolean overrideableByRestore) { 7264 if (LOCAL_LOGV) { 7265 Log.v(TAG, "Secure.putString(name=" + name + ", value=" + value + ") for " 7266 + userHandle); 7267 } 7268 if (MOVED_TO_GLOBAL.contains(name)) { 7269 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" 7270 + " to android.provider.Settings.Global"); 7271 return Global.putStringForUser(resolver, name, value, 7272 tag, makeDefault, userHandle, DEFAULT_OVERRIDEABLE_BY_RESTORE); 7273 } 7274 return sNameValueCache.putStringForUser(resolver, name, value, tag, 7275 makeDefault, userHandle, overrideableByRestore); 7276 } 7277 7278 /** 7279 * Store a name/value pair into the database. 7280 * <p> 7281 * The method takes an optional tag to associate with the setting 7282 * which can be used to clear only settings made by your package and 7283 * associated with this tag by passing the tag to {@link 7284 * #resetToDefaults(ContentResolver, String)}. Anyone can override 7285 * the current tag. Also if another package changes the setting 7286 * then the tag will be set to the one specified in the set call 7287 * which can be null. Also any of the settings setters that do not 7288 * take a tag as an argument effectively clears the tag. 7289 * </p><p> 7290 * For example, if you set settings A and B with tags T1 and T2 and 7291 * another app changes setting A (potentially to the same value), it 7292 * can assign to it a tag T3 (note that now the package that changed 7293 * the setting is not yours). Now if you reset your changes for T1 and 7294 * T2 only setting B will be reset and A not (as it was changed by 7295 * another package) but since A did not change you are in the desired 7296 * initial state. Now if the other app changes the value of A (assuming 7297 * you registered an observer in the beginning) you would detect that 7298 * the setting was changed by another app and handle this appropriately 7299 * (ignore, set back to some value, etc). 7300 * </p><p> 7301 * Also the method takes an argument whether to make the value the 7302 * default for this setting. If the system already specified a default 7303 * value, then the one passed in here will <strong>not</strong> 7304 * be set as the default. 7305 * </p> 7306 * 7307 * @param resolver to access the database with. 7308 * @param name to store. 7309 * @param value to associate with the name. 7310 * @param tag to associate with the setting. 7311 * @param makeDefault whether to make the value the default one. 7312 * @return true if the value was set, false on database errors. 7313 * 7314 * @see #resetToDefaults(ContentResolver, String) 7315 * 7316 * @hide 7317 */ 7318 @SystemApi 7319 @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) putString(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, @Nullable String tag, boolean makeDefault)7320 public static boolean putString(@NonNull ContentResolver resolver, 7321 @NonNull String name, @Nullable String value, @Nullable String tag, 7322 boolean makeDefault) { 7323 return putStringForUser(resolver, name, value, tag, makeDefault, 7324 resolver.getUserId(), DEFAULT_OVERRIDEABLE_BY_RESTORE); 7325 } 7326 7327 /** 7328 * Reset the settings to their defaults. This would reset <strong>only</strong> 7329 * settings set by the caller's package. Think of it of a way to undo your own 7330 * changes to the global settings. Passing in the optional tag will reset only 7331 * settings changed by your package and associated with this tag. 7332 * 7333 * @param resolver Handle to the content resolver. 7334 * @param tag Optional tag which should be associated with the settings to reset. 7335 * 7336 * @see #putString(ContentResolver, String, String, String, boolean) 7337 * 7338 * @hide 7339 */ 7340 @SystemApi 7341 @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) resetToDefaults(@onNull ContentResolver resolver, @Nullable String tag)7342 public static void resetToDefaults(@NonNull ContentResolver resolver, 7343 @Nullable String tag) { 7344 resetToDefaultsAsUser(resolver, tag, RESET_MODE_PACKAGE_DEFAULTS, 7345 resolver.getUserId()); 7346 } 7347 7348 /** 7349 * 7350 * Reset the settings to their defaults for a given user with a specific mode. The 7351 * optional tag argument is valid only for {@link #RESET_MODE_PACKAGE_DEFAULTS} 7352 * allowing resetting the settings made by a package and associated with the tag. 7353 * 7354 * @param resolver Handle to the content resolver. 7355 * @param tag Optional tag which should be associated with the settings to reset. 7356 * @param mode The reset mode. 7357 * @param userHandle The user for which to reset to defaults. 7358 * 7359 * @see #RESET_MODE_PACKAGE_DEFAULTS 7360 * @see #RESET_MODE_UNTRUSTED_DEFAULTS 7361 * @see #RESET_MODE_UNTRUSTED_CHANGES 7362 * @see #RESET_MODE_TRUSTED_DEFAULTS 7363 * 7364 * @hide 7365 */ resetToDefaultsAsUser(@onNull ContentResolver resolver, @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle)7366 public static void resetToDefaultsAsUser(@NonNull ContentResolver resolver, 7367 @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle) { 7368 try { 7369 Bundle arg = new Bundle(); 7370 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 7371 if (tag != null) { 7372 arg.putString(CALL_METHOD_TAG_KEY, tag); 7373 } 7374 arg.putInt(CALL_METHOD_RESET_MODE_KEY, mode); 7375 IContentProvider cp = sProviderHolder.getProvider(resolver); 7376 cp.call(resolver.getAttributionSource(), 7377 sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_SECURE, null, arg); 7378 } catch (RemoteException e) { 7379 Log.w(TAG, "Can't reset do defaults for " + CONTENT_URI, e); 7380 } 7381 } 7382 7383 /** 7384 * Construct the content URI for a particular name/value pair, 7385 * useful for monitoring changes with a ContentObserver. 7386 * @param name to look up in the table 7387 * @return the corresponding content URI, or null if not present 7388 */ getUriFor(String name)7389 public static Uri getUriFor(String name) { 7390 if (MOVED_TO_GLOBAL.contains(name)) { 7391 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" 7392 + " to android.provider.Settings.Global, returning global URI."); 7393 return Global.getUriFor(Global.CONTENT_URI, name); 7394 } 7395 return getUriFor(CONTENT_URI, name); 7396 } 7397 7398 /** 7399 * Convenience function for retrieving a single secure settings value 7400 * as an integer. Note that internally setting values are always 7401 * stored as strings; this function converts the string to an integer 7402 * for you. The default value will be returned if the setting is 7403 * not defined or not an integer. 7404 * 7405 * @param cr The ContentResolver to access. 7406 * @param name The name of the setting to retrieve. 7407 * @param def Value to return if the setting is not defined. 7408 * 7409 * @return The setting's current value, or 'def' if it is not defined 7410 * or not a valid integer. 7411 */ getInt(ContentResolver cr, String name, int def)7412 public static int getInt(ContentResolver cr, String name, int def) { 7413 return getIntForUser(cr, name, def, cr.getUserId()); 7414 } 7415 7416 /** @hide */ 7417 @UnsupportedAppUsage getIntForUser(ContentResolver cr, String name, int def, int userHandle)7418 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { 7419 String v = getStringForUser(cr, name, userHandle); 7420 return parseIntSettingWithDefault(v, def); 7421 } 7422 7423 /** 7424 * Convenience function for retrieving a single secure settings value 7425 * as an integer. Note that internally setting values are always 7426 * stored as strings; this function converts the string to an integer 7427 * for you. 7428 * <p> 7429 * This version does not take a default value. If the setting has not 7430 * been set, or the string value is not a number, 7431 * it throws {@link SettingNotFoundException}. 7432 * 7433 * @param cr The ContentResolver to access. 7434 * @param name The name of the setting to retrieve. 7435 * 7436 * @throws SettingNotFoundException Thrown if a setting by the given 7437 * name can't be found or the setting value is not an integer. 7438 * 7439 * @return The setting's current value. 7440 */ getInt(ContentResolver cr, String name)7441 public static int getInt(ContentResolver cr, String name) 7442 throws SettingNotFoundException { 7443 return getIntForUser(cr, name, cr.getUserId()); 7444 } 7445 7446 /** @hide */ getIntForUser(ContentResolver cr, String name, int userHandle)7447 public static int getIntForUser(ContentResolver cr, String name, int userHandle) 7448 throws SettingNotFoundException { 7449 String v = getStringForUser(cr, name, userHandle); 7450 return parseIntSetting(v, name); 7451 } 7452 7453 /** 7454 * Convenience function for updating a single settings value as an 7455 * integer. This will either create a new entry in the table if the 7456 * given name does not exist, or modify the value of the existing row 7457 * with that name. Note that internally setting values are always 7458 * stored as strings, so this function converts the given value to a 7459 * string before storing it. 7460 * 7461 * @param cr The ContentResolver to access. 7462 * @param name The name of the setting to modify. 7463 * @param value The new value for the setting. 7464 * @return true if the value was set, false on database errors 7465 */ putInt(ContentResolver cr, String name, int value)7466 public static boolean putInt(ContentResolver cr, String name, int value) { 7467 return putIntForUser(cr, name, value, cr.getUserId()); 7468 } 7469 7470 /** @hide */ 7471 @UnsupportedAppUsage putIntForUser(ContentResolver cr, String name, int value, int userHandle)7472 public static boolean putIntForUser(ContentResolver cr, String name, int value, 7473 int userHandle) { 7474 return putStringForUser(cr, name, Integer.toString(value), userHandle); 7475 } 7476 7477 /** 7478 * Convenience function for retrieving a single secure settings value 7479 * as a {@code long}. Note that internally setting values are always 7480 * stored as strings; this function converts the string to a {@code long} 7481 * for you. The default value will be returned if the setting is 7482 * not defined or not a {@code long}. 7483 * 7484 * @param cr The ContentResolver to access. 7485 * @param name The name of the setting to retrieve. 7486 * @param def Value to return if the setting is not defined. 7487 * 7488 * @return The setting's current value, or 'def' if it is not defined 7489 * or not a valid {@code long}. 7490 */ getLong(ContentResolver cr, String name, long def)7491 public static long getLong(ContentResolver cr, String name, long def) { 7492 return getLongForUser(cr, name, def, cr.getUserId()); 7493 } 7494 7495 /** @hide */ 7496 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) getLongForUser(ContentResolver cr, String name, long def, int userHandle)7497 public static long getLongForUser(ContentResolver cr, String name, long def, 7498 int userHandle) { 7499 String v = getStringForUser(cr, name, userHandle); 7500 return parseLongSettingWithDefault(v, def); 7501 } 7502 7503 /** 7504 * Convenience function for retrieving a single secure settings value 7505 * as a {@code long}. Note that internally setting values are always 7506 * stored as strings; this function converts the string to a {@code long} 7507 * for you. 7508 * <p> 7509 * This version does not take a default value. If the setting has not 7510 * been set, or the string value is not a number, 7511 * it throws {@link SettingNotFoundException}. 7512 * 7513 * @param cr The ContentResolver to access. 7514 * @param name The name of the setting to retrieve. 7515 * 7516 * @return The setting's current value. 7517 * @throws SettingNotFoundException Thrown if a setting by the given 7518 * name can't be found or the setting value is not an integer. 7519 */ getLong(ContentResolver cr, String name)7520 public static long getLong(ContentResolver cr, String name) 7521 throws SettingNotFoundException { 7522 return getLongForUser(cr, name, cr.getUserId()); 7523 } 7524 7525 /** @hide */ getLongForUser(ContentResolver cr, String name, int userHandle)7526 public static long getLongForUser(ContentResolver cr, String name, int userHandle) 7527 throws SettingNotFoundException { 7528 String v = getStringForUser(cr, name, userHandle); 7529 return parseLongSetting(v, name); 7530 } 7531 7532 /** 7533 * Convenience function for updating a secure settings value as a long 7534 * integer. This will either create a new entry in the table if the 7535 * given name does not exist, or modify the value of the existing row 7536 * with that name. Note that internally setting values are always 7537 * stored as strings, so this function converts the given value to a 7538 * string before storing it. 7539 * 7540 * @param cr The ContentResolver to access. 7541 * @param name The name of the setting to modify. 7542 * @param value The new value for the setting. 7543 * @return true if the value was set, false on database errors 7544 */ putLong(ContentResolver cr, String name, long value)7545 public static boolean putLong(ContentResolver cr, String name, long value) { 7546 return putLongForUser(cr, name, value, cr.getUserId()); 7547 } 7548 7549 /** @hide */ 7550 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) putLongForUser(ContentResolver cr, String name, long value, int userHandle)7551 public static boolean putLongForUser(ContentResolver cr, String name, long value, 7552 int userHandle) { 7553 return putStringForUser(cr, name, Long.toString(value), userHandle); 7554 } 7555 7556 /** 7557 * Convenience function for retrieving a single secure settings value 7558 * as a floating point number. Note that internally setting values are 7559 * always stored as strings; this function converts the string to an 7560 * float for you. The default value will be returned if the setting 7561 * is not defined or not a valid float. 7562 * 7563 * @param cr The ContentResolver to access. 7564 * @param name The name of the setting to retrieve. 7565 * @param def Value to return if the setting is not defined. 7566 * 7567 * @return The setting's current value, or 'def' if it is not defined 7568 * or not a valid float. 7569 */ getFloat(ContentResolver cr, String name, float def)7570 public static float getFloat(ContentResolver cr, String name, float def) { 7571 return getFloatForUser(cr, name, def, cr.getUserId()); 7572 } 7573 7574 /** @hide */ getFloatForUser(ContentResolver cr, String name, float def, int userHandle)7575 public static float getFloatForUser(ContentResolver cr, String name, float def, 7576 int userHandle) { 7577 String v = getStringForUser(cr, name, userHandle); 7578 return parseFloatSettingWithDefault(v, def); 7579 } 7580 7581 /** 7582 * Convenience function for retrieving a single secure settings value 7583 * as a float. Note that internally setting values are always 7584 * stored as strings; this function converts the string to a float 7585 * for you. 7586 * <p> 7587 * This version does not take a default value. If the setting has not 7588 * been set, or the string value is not a number, 7589 * it throws {@link SettingNotFoundException}. 7590 * 7591 * @param cr The ContentResolver to access. 7592 * @param name The name of the setting to retrieve. 7593 * 7594 * @throws SettingNotFoundException Thrown if a setting by the given 7595 * name can't be found or the setting value is not a float. 7596 * 7597 * @return The setting's current value. 7598 */ getFloat(ContentResolver cr, String name)7599 public static float getFloat(ContentResolver cr, String name) 7600 throws SettingNotFoundException { 7601 return getFloatForUser(cr, name, cr.getUserId()); 7602 } 7603 7604 /** @hide */ getFloatForUser(ContentResolver cr, String name, int userHandle)7605 public static float getFloatForUser(ContentResolver cr, String name, int userHandle) 7606 throws SettingNotFoundException { 7607 String v = getStringForUser(cr, name, userHandle); 7608 return parseFloatSetting(v, name); 7609 } 7610 7611 /** 7612 * Convenience function for updating a single settings value as a 7613 * floating point number. This will either create a new entry in the 7614 * table if the given name does not exist, or modify the value of the 7615 * existing row with that name. Note that internally setting values 7616 * are always stored as strings, so this function converts the given 7617 * value to a string before storing it. 7618 * 7619 * @param cr The ContentResolver to access. 7620 * @param name The name of the setting to modify. 7621 * @param value The new value for the setting. 7622 * @return true if the value was set, false on database errors 7623 */ putFloat(ContentResolver cr, String name, float value)7624 public static boolean putFloat(ContentResolver cr, String name, float value) { 7625 return putFloatForUser(cr, name, value, cr.getUserId()); 7626 } 7627 7628 /** @hide */ putFloatForUser(ContentResolver cr, String name, float value, int userHandle)7629 public static boolean putFloatForUser(ContentResolver cr, String name, float value, 7630 int userHandle) { 7631 return putStringForUser(cr, name, Float.toString(value), userHandle); 7632 } 7633 7634 /** 7635 * Control whether to enable adaptive sleep mode. 7636 * @hide 7637 */ 7638 @Readable 7639 public static final String ADAPTIVE_SLEEP = "adaptive_sleep"; 7640 7641 /** 7642 * Setting key to indicate whether camera-based autorotate is enabled. 7643 * 7644 * @hide 7645 */ 7646 public static final String CAMERA_AUTOROTATE = "camera_autorotate"; 7647 7648 /** 7649 * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED} 7650 * instead 7651 */ 7652 @Deprecated 7653 public static final String DEVELOPMENT_SETTINGS_ENABLED = 7654 Global.DEVELOPMENT_SETTINGS_ENABLED; 7655 7656 /** 7657 * When the user has enable the option to have a "bug report" command 7658 * in the power menu. 7659 * @hide 7660 */ 7661 @Readable 7662 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; 7663 7664 /** 7665 * The package name for the custom bugreport handler app. This app must be bugreport 7666 * allow-listed. This is currently used only by Power Menu short press. 7667 * @hide 7668 */ 7669 public static final String CUSTOM_BUGREPORT_HANDLER_APP = "custom_bugreport_handler_app"; 7670 7671 /** 7672 * The user id for the custom bugreport handler app. This is currently used only by Power 7673 * Menu short press. 7674 * @hide 7675 */ 7676 public static final String CUSTOM_BUGREPORT_HANDLER_USER = "custom_bugreport_handler_user"; 7677 7678 /** 7679 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} instead 7680 */ 7681 @Deprecated 7682 public static final String ADB_ENABLED = Global.ADB_ENABLED; 7683 7684 /** 7685 * Setting to allow mock locations and location provider status to be injected into the 7686 * LocationManager service for testing purposes during application development. These 7687 * locations and status values override actual location and status information generated 7688 * by network, gps, or other location providers. 7689 * 7690 * @deprecated This settings is not used anymore. 7691 */ 7692 @Deprecated 7693 @Readable 7694 public static final String ALLOW_MOCK_LOCATION = "mock_location"; 7695 7696 /** 7697 * This is used by Bluetooth Manager to store adapter name 7698 * @hide 7699 */ 7700 @Readable(maxTargetSdk = Build.VERSION_CODES.S) 7701 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 7702 @SuppressLint("NoSettingsProvider") 7703 public static final String BLUETOOTH_NAME = "bluetooth_name"; 7704 7705 /** 7706 * This is used by Bluetooth Manager to store adapter address 7707 * @hide 7708 */ 7709 @Readable(maxTargetSdk = Build.VERSION_CODES.S) 7710 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 7711 @SuppressLint("NoSettingsProvider") 7712 public static final String BLUETOOTH_ADDRESS = "bluetooth_address"; 7713 7714 /** 7715 * This is used by Bluetooth Manager to store whether adapter address is valid 7716 * @hide 7717 */ 7718 @Readable(maxTargetSdk = Build.VERSION_CODES.S) 7719 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 7720 @SuppressLint("NoSettingsProvider") 7721 public static final String BLUETOOTH_ADDR_VALID = "bluetooth_addr_valid"; 7722 7723 /** 7724 * This is used by LocalBluetoothLeBroadcast to store the broadcast program info. 7725 * @hide 7726 */ 7727 public static final String BLUETOOTH_LE_BROADCAST_PROGRAM_INFO = 7728 "bluetooth_le_broadcast_program_info"; 7729 7730 /** 7731 * This is used by LocalBluetoothLeBroadcast to store the broadcast name. 7732 * @hide 7733 */ 7734 public static final String BLUETOOTH_LE_BROADCAST_NAME = "bluetooth_le_broadcast_name"; 7735 7736 /** 7737 * This is used by LocalBluetoothLeBroadcast to store the broadcast code. 7738 * @hide 7739 */ 7740 public static final String BLUETOOTH_LE_BROADCAST_CODE = "bluetooth_le_broadcast_code"; 7741 7742 /** 7743 * This is used by LocalBluetoothLeBroadcast to store the app source name. 7744 * @hide 7745 */ 7746 public static final String BLUETOOTH_LE_BROADCAST_APP_SOURCE_NAME = 7747 "bluetooth_le_broadcast_app_source_name"; 7748 7749 /** 7750 * This is used by LocalBluetoothLeBroadcast to downgrade the broadcast quality to improve 7751 * compatibility. 7752 * 7753 * <ul> 7754 * <li>0 = false 7755 * <li>1 = true 7756 * </ul> 7757 * 7758 * @hide 7759 */ 7760 public static final String BLUETOOTH_LE_BROADCAST_IMPROVE_COMPATIBILITY = 7761 "bluetooth_le_broadcast_improve_compatibility"; 7762 7763 /** 7764 * This is used by LocalBluetoothLeBroadcast to store the fallback active device address. 7765 * 7766 * @hide 7767 */ 7768 public static final String BLUETOOTH_LE_BROADCAST_FALLBACK_ACTIVE_DEVICE_ADDRESS = 7769 "bluetooth_le_broadcast_fallback_active_device_address"; 7770 7771 /** 7772 * Ringtone routing value for hearing aid. It routes ringtone to hearing aid or device 7773 * speaker. 7774 * <ul> 7775 * <li> 0 = Default 7776 * <li> 1 = Route to hearing aid 7777 * <li> 2 = Route to device speaker 7778 * </ul> 7779 * @hide 7780 */ 7781 public static final String HEARING_AID_RINGTONE_ROUTING = 7782 "hearing_aid_ringtone_routing"; 7783 7784 /** 7785 * Phone call routing value for hearing aid. It routes phone call to hearing aid or 7786 * device speaker. 7787 * <ul> 7788 * <li> 0 = Default 7789 * <li> 1 = Route to hearing aid 7790 * <li> 2 = Route to device speaker 7791 * </ul> 7792 * @hide 7793 */ 7794 public static final String HEARING_AID_CALL_ROUTING = 7795 "hearing_aid_call_routing"; 7796 7797 /** 7798 * Media routing value for hearing aid. It routes media to hearing aid or device 7799 * speaker. 7800 * <ul> 7801 * <li> 0 = Default 7802 * <li> 1 = Route to hearing aid 7803 * <li> 2 = Route to device speaker 7804 * </ul> 7805 * @hide 7806 */ 7807 public static final String HEARING_AID_MEDIA_ROUTING = 7808 "hearing_aid_media_routing"; 7809 7810 /** 7811 * Notification routing value for hearing aid. It routes notification sounds to hearing aid 7812 * or device speaker. 7813 * <ul> 7814 * <li> 0 = Default 7815 * <li> 1 = Route to hearing aid 7816 * <li> 2 = Route to device speaker 7817 * </ul> 7818 * @hide 7819 */ 7820 public static final String HEARING_AID_NOTIFICATION_ROUTING = 7821 "hearing_aid_notification_routing"; 7822 7823 /** 7824 * Setting to indicate that on device captions are enabled. 7825 * 7826 * @hide 7827 */ 7828 @SystemApi 7829 @Readable 7830 public static final String ODI_CAPTIONS_ENABLED = "odi_captions_enabled"; 7831 7832 7833 /** 7834 * Setting to indicate live caption button show or hide in the volume 7835 * rocker. 7836 * 7837 * @hide 7838 */ 7839 public static final String ODI_CAPTIONS_VOLUME_UI_ENABLED = 7840 "odi_captions_volume_ui_enabled"; 7841 7842 /** 7843 * On Android 8.0 (API level 26) and higher versions of the platform, 7844 * a 64-bit number (expressed as a hexadecimal string), unique to 7845 * each combination of app-signing key, user, and device. 7846 * Values of {@code ANDROID_ID} are scoped by signing key and user. 7847 * The value may change if a factory reset is performed on the 7848 * device or if an APK signing key changes. 7849 * 7850 * For more information about how the platform handles {@code ANDROID_ID} 7851 * in Android 8.0 (API level 26) and higher, see <a 7852 * href="{@docRoot}about/versions/oreo/android-8.0-changes.html#privacy-all"> 7853 * Android 8.0 Behavior Changes</a>. 7854 * 7855 * <p class="note"><strong>Note:</strong> For apps that were installed 7856 * prior to updating the device to a version of Android 8.0 7857 * (API level 26) or higher, the value of {@code ANDROID_ID} changes 7858 * if the app is uninstalled and then reinstalled after the OTA. 7859 * To preserve values across uninstalls after an OTA to Android 8.0 7860 * or higher, developers can use 7861 * <a href="{@docRoot}guide/topics/data/keyvaluebackup.html"> 7862 * Key/Value Backup</a>.</p> 7863 * 7864 * <p>In versions of the platform lower than Android 8.0 (API level 26), 7865 * a 64-bit number (expressed as a hexadecimal string) that is randomly 7866 * generated when the user first sets up the device and should remain 7867 * constant for the lifetime of the user's device. 7868 * 7869 * On devices that have 7870 * <a href="{@docRoot}about/versions/android-4.2.html#MultipleUsers"> 7871 * multiple users</a>, each user appears as a 7872 * completely separate device, so the {@code ANDROID_ID} value is 7873 * unique to each user.</p> 7874 * 7875 * <p class="note"><strong>Note:</strong> If the caller is an Instant App the ID is scoped 7876 * to the Instant App, it is generated when the Instant App is first installed and reset if 7877 * the user clears the Instant App. 7878 */ 7879 @Readable 7880 public static final String ANDROID_ID = "android_id"; 7881 7882 /** 7883 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead 7884 */ 7885 @Deprecated 7886 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; 7887 7888 /** 7889 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead 7890 */ 7891 @Deprecated 7892 public static final String DATA_ROAMING = Global.DATA_ROAMING; 7893 7894 /** 7895 * Stores {@link android.view.inputmethod.InputMethodInfo#getId()} of the input method 7896 * service that is currently selected. 7897 * 7898 * <p>Although the name {@link #DEFAULT_INPUT_METHOD} implies that there is a concept of 7899 * <i>default</i> input method, in reality this setting is no more or less than the 7900 * <strong>currently selected</strong> input method. This setting can be updated at any 7901 * time as a result of user-initiated and system-initiated input method switching.</p> 7902 * 7903 * <p>Use {@link ComponentName#unflattenFromString(String)} to parse the stored value.</p> 7904 */ 7905 @Readable 7906 public static final String DEFAULT_INPUT_METHOD = "default_input_method"; 7907 7908 /** 7909 * Used only by {@link com.android.server.inputmethod.InputMethodManagerService} as a 7910 * temporary data store of {@link #DEFAULT_INPUT_METHOD} while a virtual-device-specific 7911 * input method is set as default.</p> 7912 * 7913 * <p>This should be considered to be an implementation detail of 7914 * {@link com.android.server.inputmethod.InputMethodManagerService}. Other system 7915 * components should never rely on this value.</p> 7916 * 7917 * @see #DEFAULT_INPUT_METHOD 7918 * @hide 7919 */ 7920 public static final String DEFAULT_DEVICE_INPUT_METHOD = "default_device_input_method"; 7921 7922 /** 7923 * Setting to record the input method subtype used by default, holding the ID 7924 * of the desired method. 7925 */ 7926 @Readable 7927 public static final String SELECTED_INPUT_METHOD_SUBTYPE = 7928 "selected_input_method_subtype"; 7929 7930 /** 7931 * The {@link android.view.inputmethod.InputMethodInfo.InputMethodInfo#getId() ID} of the 7932 * default voice input method. 7933 * <p> 7934 * This stores the last known default voice IME. If the related system config value changes, 7935 * this is reset by InputMethodManagerService. 7936 * <p> 7937 * This IME is not necessarily in the enabled IME list. That state is still stored in 7938 * {@link #ENABLED_INPUT_METHODS}. 7939 * 7940 * @hide 7941 */ 7942 public static final String DEFAULT_VOICE_INPUT_METHOD = "default_voice_input_method"; 7943 7944 /** 7945 * Setting to record the history of input method subtype, holding the pair of ID of IME 7946 * and its last used subtype. 7947 * @hide 7948 */ 7949 @Readable 7950 public static final String INPUT_METHODS_SUBTYPE_HISTORY = 7951 "input_methods_subtype_history"; 7952 7953 /** 7954 * Setting to record the visibility of input method selector 7955 */ 7956 @Readable 7957 public static final String INPUT_METHOD_SELECTOR_VISIBILITY = 7958 "input_method_selector_visibility"; 7959 7960 /** 7961 * Toggle for enabling stylus handwriting. When enabled, current Input method receives 7962 * stylus {@link MotionEvent}s if an {@link Editor} is focused. 7963 * 7964 * @see #STYLUS_HANDWRITING_DEFAULT_VALUE 7965 * @hide 7966 */ 7967 @TestApi 7968 @Readable 7969 @SuppressLint("NoSettingsProvider") 7970 public static final String STYLUS_HANDWRITING_ENABLED = "stylus_handwriting_enabled"; 7971 7972 /** 7973 * Default value for {@link #STYLUS_HANDWRITING_ENABLED}. 7974 * 7975 * @hide 7976 */ 7977 @TestApi 7978 @Readable 7979 @SuppressLint("NoSettingsProvider") 7980 public static final int STYLUS_HANDWRITING_DEFAULT_VALUE = 1; 7981 7982 /** 7983 * The currently selected voice interaction service flattened ComponentName. 7984 * @hide 7985 */ 7986 @TestApi 7987 @Readable 7988 public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service"; 7989 7990 7991 /** 7992 * The currently selected credential service(s) flattened ComponentName. 7993 * 7994 * @hide 7995 */ 7996 public static final String CREDENTIAL_SERVICE = "credential_service"; 7997 7998 /** 7999 * The currently selected primary credential service flattened ComponentName. 8000 * 8001 * @hide 8002 */ 8003 public static final String CREDENTIAL_SERVICE_PRIMARY = "credential_service_primary"; 8004 8005 /** 8006 * The currently selected autofill service flattened ComponentName. 8007 * @hide 8008 */ 8009 @TestApi 8010 @Readable 8011 public static final String AUTOFILL_SERVICE = "autofill_service"; 8012 8013 /** 8014 * Boolean indicating if Autofill supports field classification. 8015 * 8016 * @see android.service.autofill.AutofillService 8017 * 8018 * @hide 8019 */ 8020 @SystemApi 8021 @Readable 8022 public static final String AUTOFILL_FEATURE_FIELD_CLASSIFICATION = 8023 "autofill_field_classification"; 8024 8025 /** 8026 * Boolean indicating if the dark mode dialog shown on first toggle has been seen. 8027 * 8028 * @hide 8029 */ 8030 @Readable 8031 public static final String DARK_MODE_DIALOG_SEEN = 8032 "dark_mode_dialog_seen"; 8033 8034 /** 8035 * Custom time when Dark theme is scheduled to activate. 8036 * Represented as milliseconds from midnight (e.g. 79200000 == 10pm). 8037 * @hide 8038 */ 8039 @Readable 8040 public static final String DARK_THEME_CUSTOM_START_TIME = 8041 "dark_theme_custom_start_time"; 8042 8043 /** 8044 * Custom time when Dark theme is scheduled to deactivate. 8045 * Represented as milliseconds from midnight (e.g. 79200000 == 10pm). 8046 * @hide 8047 */ 8048 @Readable 8049 public static final String DARK_THEME_CUSTOM_END_TIME = 8050 "dark_theme_custom_end_time"; 8051 8052 /** 8053 * Defines value returned by {@link android.service.autofill.UserData#getMaxUserDataSize()}. 8054 * 8055 * @hide 8056 */ 8057 @SystemApi 8058 @Readable 8059 public static final String AUTOFILL_USER_DATA_MAX_USER_DATA_SIZE = 8060 "autofill_user_data_max_user_data_size"; 8061 8062 /** 8063 * Defines value returned by 8064 * {@link android.service.autofill.UserData#getMaxFieldClassificationIdsSize()}. 8065 * 8066 * @hide 8067 */ 8068 @SystemApi 8069 @Readable 8070 public static final String AUTOFILL_USER_DATA_MAX_FIELD_CLASSIFICATION_IDS_SIZE = 8071 "autofill_user_data_max_field_classification_size"; 8072 8073 /** 8074 * Defines value returned by 8075 * {@link android.service.autofill.UserData#getMaxCategoryCount()}. 8076 * 8077 * @hide 8078 */ 8079 @SystemApi 8080 @Readable 8081 public static final String AUTOFILL_USER_DATA_MAX_CATEGORY_COUNT = 8082 "autofill_user_data_max_category_count"; 8083 8084 /** 8085 * Defines value returned by {@link android.service.autofill.UserData#getMaxValueLength()}. 8086 * 8087 * @hide 8088 */ 8089 @SystemApi 8090 @Readable 8091 public static final String AUTOFILL_USER_DATA_MAX_VALUE_LENGTH = 8092 "autofill_user_data_max_value_length"; 8093 8094 /** 8095 * Defines value returned by {@link android.service.autofill.UserData#getMinValueLength()}. 8096 * 8097 * @hide 8098 */ 8099 @SystemApi 8100 @Readable 8101 public static final String AUTOFILL_USER_DATA_MIN_VALUE_LENGTH = 8102 "autofill_user_data_min_value_length"; 8103 8104 /** 8105 * Defines whether Content Capture is enabled for the user. 8106 * 8107 * <p>Type: {@code int} ({@code 0} for disabled, {@code 1} for enabled). 8108 * <p>Default: enabled 8109 * 8110 * @hide 8111 */ 8112 @TestApi 8113 @Readable 8114 public static final String CONTENT_CAPTURE_ENABLED = "content_capture_enabled"; 8115 8116 /** 8117 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead 8118 */ 8119 @Deprecated 8120 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; 8121 8122 /** 8123 * Indicates whether a DPC has been downloaded during provisioning. 8124 * 8125 * <p>Type: int (0 for false, 1 for true) 8126 * 8127 * <p>If this is true, then any attempts to begin setup again should result in factory reset 8128 * 8129 * @hide 8130 */ 8131 @Readable 8132 public static final String MANAGED_PROVISIONING_DPC_DOWNLOADED = 8133 "managed_provisioning_dpc_downloaded"; 8134 8135 /** 8136 * Indicates whether the device is under restricted secure FRP mode. 8137 * Secure FRP mode is enabled when the device is under FRP. On solving of FRP challenge, 8138 * device is removed from this mode. 8139 * <p> 8140 * Type: int (0 for false, 1 for true) 8141 * 8142 * @deprecated Use Global.SECURE_FRP_MODE 8143 */ 8144 @Deprecated 8145 @Readable 8146 public static final String SECURE_FRP_MODE = "secure_frp_mode"; 8147 8148 /** 8149 * Indicates whether the current user has completed setup via the setup wizard. 8150 * <p> 8151 * Type: int (0 for false, 1 for true) 8152 * 8153 * @hide 8154 */ 8155 @SystemApi 8156 @Readable 8157 public static final String USER_SETUP_COMPLETE = "user_setup_complete"; 8158 8159 /** 8160 * Indicates that the user has not started setup personalization. 8161 * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. 8162 * 8163 * @hide 8164 */ 8165 @SystemApi 8166 public static final int USER_SETUP_PERSONALIZATION_NOT_STARTED = 0; 8167 8168 /** 8169 * Indicates that the user has not yet completed setup personalization. 8170 * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. 8171 * 8172 * @hide 8173 */ 8174 @SystemApi 8175 public static final int USER_SETUP_PERSONALIZATION_STARTED = 1; 8176 8177 /** 8178 * Indicates that the user has snoozed personalization and will complete it later. 8179 * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. 8180 * 8181 * @hide 8182 */ 8183 @SystemApi 8184 public static final int USER_SETUP_PERSONALIZATION_PAUSED = 2; 8185 8186 /** 8187 * Indicates that the user has completed setup personalization. 8188 * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. 8189 * 8190 * @hide 8191 */ 8192 @SystemApi 8193 public static final int USER_SETUP_PERSONALIZATION_COMPLETE = 10; 8194 8195 /** @hide */ 8196 @Retention(RetentionPolicy.SOURCE) 8197 @IntDef({ 8198 USER_SETUP_PERSONALIZATION_NOT_STARTED, 8199 USER_SETUP_PERSONALIZATION_STARTED, 8200 USER_SETUP_PERSONALIZATION_PAUSED, 8201 USER_SETUP_PERSONALIZATION_COMPLETE 8202 }) 8203 public @interface UserSetupPersonalization {} 8204 8205 /** 8206 * Defines the user's current state of device personalization. 8207 * The possible states are defined in {@link UserSetupPersonalization}. 8208 * 8209 * @hide 8210 */ 8211 @SystemApi 8212 @Readable 8213 public static final String USER_SETUP_PERSONALIZATION_STATE = 8214 "user_setup_personalization_state"; 8215 8216 /** 8217 * Whether the current user has been set up via setup wizard (0 = false, 1 = true) 8218 * This value differs from USER_SETUP_COMPLETE in that it can be reset back to 0 8219 * in case SetupWizard has been re-enabled on TV devices. 8220 * 8221 * @hide 8222 */ 8223 @Readable 8224 public static final String TV_USER_SETUP_COMPLETE = "tv_user_setup_complete"; 8225 8226 /** 8227 * The prefix for a category name that indicates whether a suggested action from that 8228 * category was marked as completed. 8229 * <p> 8230 * Type: int (0 for false, 1 for true) 8231 * 8232 * @hide 8233 */ 8234 @SystemApi 8235 @Readable 8236 public static final String COMPLETED_CATEGORY_PREFIX = "suggested.completed_category."; 8237 8238 /** 8239 * Whether or not compress blocks should be released on install. 8240 * <p>The setting only determines if the platform will attempt to release 8241 * compress blocks; it does not guarantee that the files will have their 8242 * compress blocks released. Compression is currently only supported on 8243 * some f2fs filesystems. 8244 * <p> 8245 * Type: int (0 for false, 1 for true) 8246 * 8247 * @hide 8248 */ 8249 public static final String RELEASE_COMPRESS_BLOCKS_ON_INSTALL = 8250 "release_compress_blocks_on_install"; 8251 8252 /** 8253 * List of input methods that are currently enabled. This is a string 8254 * containing the IDs of all enabled input methods, each ID separated 8255 * by ':'. 8256 * 8257 * Format like "ime0;subtype0;subtype1;subtype2:ime1:ime2;subtype0" 8258 * where imeId is ComponentName and subtype is int32. 8259 * 8260 * <p>Note: This setting is not readable to the app targeting API level 34 or higher. use 8261 * {@link android.view.inputmethod.InputMethodManager#getEnabledInputMethodList()} instead. 8262 */ 8263 @Readable(maxTargetSdk = Build.VERSION_CODES.TIRAMISU) 8264 public static final String ENABLED_INPUT_METHODS = "enabled_input_methods"; 8265 8266 /** 8267 * List of system input methods that are currently disabled. This is a string 8268 * containing the IDs of all disabled input methods, each ID separated 8269 * by ':'. 8270 * @hide 8271 */ 8272 @Readable(maxTargetSdk = Build.VERSION_CODES.TIRAMISU) 8273 public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods"; 8274 8275 /** 8276 * Whether to show the IME when a hard keyboard is connected. This is a boolean that 8277 * determines if the IME should be shown when a hard keyboard is attached. 8278 * @hide 8279 */ 8280 @TestApi 8281 @Readable 8282 @SuppressLint("NoSettingsProvider") 8283 public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard"; 8284 8285 /** 8286 * Whether to enable bounce keys for Physical Keyboard accessibility. 8287 * 8288 * If set to non-zero value, any key press on physical keyboard within the provided 8289 * threshold duration (in milliseconds) of the same key, will be ignored. 8290 * 8291 * @hide 8292 */ 8293 @Readable 8294 public static final String ACCESSIBILITY_BOUNCE_KEYS = "accessibility_bounce_keys"; 8295 8296 /** 8297 * Whether to enable slow keys for Physical Keyboard accessibility. 8298 * 8299 * If set to non-zero value, any key press on physical keyboard needs to be pressed and 8300 * held for the provided threshold duration (in milliseconds) to be registered in the 8301 * system. 8302 * 8303 * @hide 8304 */ 8305 @Readable 8306 public static final String ACCESSIBILITY_SLOW_KEYS = "accessibility_slow_keys"; 8307 8308 /** 8309 * Whether to enable sticky keys for Physical Keyboard accessibility. 8310 * 8311 * This is a boolean value that determines if Sticky keys feature is enabled. 8312 * 8313 * @hide 8314 */ 8315 @Readable 8316 public static final String ACCESSIBILITY_STICKY_KEYS = "accessibility_sticky_keys"; 8317 8318 /** 8319 * Whether stylus button presses are disabled. This is a boolean that 8320 * determines if stylus buttons are ignored. 8321 * 8322 * @hide 8323 */ 8324 @TestApi 8325 @Readable 8326 @SuppressLint("NoSettingsProvider") 8327 public static final String STYLUS_BUTTONS_ENABLED = "stylus_buttons_enabled"; 8328 8329 /** 8330 * Preferred default user profile to use with the notes task button shortcut. 8331 * 8332 * @hide 8333 */ 8334 @SuppressLint("NoSettingsProvider") 8335 public static final String DEFAULT_NOTE_TASK_PROFILE = "default_note_task_profile"; 8336 8337 /** 8338 * Host name and port for global http proxy. Uses ':' seperator for 8339 * between host and port. 8340 * 8341 * @deprecated Use {@link Global#HTTP_PROXY} 8342 */ 8343 @Deprecated 8344 public static final String HTTP_PROXY = Global.HTTP_PROXY; 8345 8346 /** 8347 * Package designated as always-on VPN provider. 8348 * 8349 * @hide 8350 */ 8351 public static final String ALWAYS_ON_VPN_APP = "always_on_vpn_app"; 8352 8353 /** 8354 * Whether to block networking outside of VPN connections while always-on is set. 8355 * @see #ALWAYS_ON_VPN_APP 8356 * 8357 * @hide 8358 */ 8359 @Readable 8360 public static final String ALWAYS_ON_VPN_LOCKDOWN = "always_on_vpn_lockdown"; 8361 8362 /** 8363 * Comma separated list of packages that are allowed to access the network when VPN is in 8364 * lockdown mode but not running. 8365 * @see #ALWAYS_ON_VPN_LOCKDOWN 8366 * 8367 * @hide 8368 */ 8369 @Readable(maxTargetSdk = Build.VERSION_CODES.S) 8370 public static final String ALWAYS_ON_VPN_LOCKDOWN_WHITELIST = 8371 "always_on_vpn_lockdown_whitelist"; 8372 8373 /** 8374 * Whether applications can be installed for this user via the system's 8375 * {@link Intent#ACTION_INSTALL_PACKAGE} mechanism. 8376 * 8377 * <p>1 = permit app installation via the system package installer intent 8378 * <p>0 = do not allow use of the package installer 8379 * @deprecated Starting from {@link android.os.Build.VERSION_CODES#O}, apps should use 8380 * {@link PackageManager#canRequestPackageInstalls()} 8381 * @see PackageManager#canRequestPackageInstalls() 8382 */ 8383 @Deprecated 8384 @Readable 8385 public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps"; 8386 8387 /** 8388 * A flag to tell {@link com.android.server.devicepolicy.DevicePolicyManagerService} that 8389 * the default for {@link #INSTALL_NON_MARKET_APPS} is reversed for this user on OTA. So it 8390 * can set the restriction {@link android.os.UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES} 8391 * on behalf of the profile owner if needed to make the change transparent for profile 8392 * owners. 8393 * 8394 * @hide 8395 */ 8396 @Readable 8397 public static final String UNKNOWN_SOURCES_DEFAULT_REVERSED = 8398 "unknown_sources_default_reversed"; 8399 8400 /** 8401 * Comma-separated list of location providers that are enabled. Do not rely on this value 8402 * being present or correct, or on ContentObserver notifications on the corresponding Uri. 8403 * 8404 * @deprecated This setting no longer exists from Android S onwards as it no longer is 8405 * capable of realistically reflecting location settings. Use {@link 8406 * LocationManager#isProviderEnabled(String)} or {@link LocationManager#isLocationEnabled()} 8407 * instead. 8408 */ 8409 @Deprecated 8410 @Readable 8411 public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; 8412 8413 /** 8414 * The current location mode of the device. Do not rely on this value being present or on 8415 * ContentObserver notifications on the corresponding Uri. 8416 * 8417 * @deprecated The preferred methods for checking location mode and listening for changes 8418 * are via {@link LocationManager#isLocationEnabled()} and 8419 * {@link LocationManager#MODE_CHANGED_ACTION}. 8420 */ 8421 @Deprecated 8422 @Readable 8423 public static final String LOCATION_MODE = "location_mode"; 8424 8425 /** 8426 * The App or module that changes the location mode. 8427 * @hide 8428 */ 8429 @Readable 8430 public static final String LOCATION_CHANGER = "location_changer"; 8431 8432 /** 8433 * The location changer is unknown or unable to detect. 8434 * @hide 8435 */ 8436 public static final int LOCATION_CHANGER_UNKNOWN = 0; 8437 8438 /** 8439 * Location settings in system settings. 8440 * @hide 8441 */ 8442 public static final int LOCATION_CHANGER_SYSTEM_SETTINGS = 1; 8443 8444 /** 8445 * The location icon in drop down notification drawer. 8446 * @hide 8447 */ 8448 public static final int LOCATION_CHANGER_QUICK_SETTINGS = 2; 8449 8450 /** 8451 * Location mode is off. 8452 */ 8453 public static final int LOCATION_MODE_OFF = 0; 8454 8455 /** 8456 * This mode no longer has any distinct meaning, but is interpreted as the location mode is 8457 * on. 8458 * 8459 * @deprecated See {@link #LOCATION_MODE}. 8460 */ 8461 @Deprecated 8462 public static final int LOCATION_MODE_SENSORS_ONLY = 1; 8463 8464 /** 8465 * This mode no longer has any distinct meaning, but is interpreted as the location mode is 8466 * on. 8467 * 8468 * @deprecated See {@link #LOCATION_MODE}. 8469 */ 8470 @Deprecated 8471 public static final int LOCATION_MODE_BATTERY_SAVING = 2; 8472 8473 /** 8474 * This mode no longer has any distinct meaning, but is interpreted as the location mode is 8475 * on. 8476 * 8477 * @deprecated See {@link #LOCATION_MODE}. 8478 */ 8479 @Deprecated 8480 public static final int LOCATION_MODE_HIGH_ACCURACY = 3; 8481 8482 /** 8483 * Location mode is on. 8484 * 8485 * @hide 8486 */ 8487 @SystemApi 8488 public static final int LOCATION_MODE_ON = LOCATION_MODE_HIGH_ACCURACY; 8489 8490 /** 8491 * The current location time zone detection enabled state for the user. 8492 * 8493 * See {@link android.app.time.TimeManager#getTimeZoneCapabilitiesAndConfig} for access. 8494 * See {@link android.app.time.TimeManager#updateTimeZoneConfiguration} to update. 8495 * @hide 8496 */ 8497 public static final String LOCATION_TIME_ZONE_DETECTION_ENABLED = 8498 "location_time_zone_detection_enabled"; 8499 8500 /** 8501 * The accuracy in meters used for coarsening location for clients with only the coarse 8502 * location permission. 8503 * 8504 * @hide 8505 */ 8506 @Readable 8507 public static final String LOCATION_COARSE_ACCURACY_M = "locationCoarseAccuracy"; 8508 8509 /** 8510 * Whether or not to show display system location accesses. 8511 * @hide 8512 */ 8513 public static final String LOCATION_SHOW_SYSTEM_OPS = "locationShowSystemOps"; 8514 8515 /** 8516 * A flag containing settings used for biometric weak 8517 * @hide 8518 */ 8519 @Deprecated 8520 @Readable 8521 public static final String LOCK_BIOMETRIC_WEAK_FLAGS = 8522 "lock_biometric_weak_flags"; 8523 8524 /** 8525 * Whether lock-to-app will lock the keyguard when exiting. 8526 * @hide 8527 */ 8528 @Readable 8529 public static final String LOCK_TO_APP_EXIT_LOCKED = "lock_to_app_exit_locked"; 8530 8531 /** 8532 * Whether autolock is enabled (0 = false, 1 = true) 8533 * 8534 * @deprecated Use {@link android.app.KeyguardManager} to determine the state and security 8535 * level of the keyguard. Accessing this setting from an app that is targeting 8536 * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. 8537 */ 8538 @Deprecated 8539 @Readable 8540 public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; 8541 8542 /** 8543 * Whether lock pattern is visible as user enters (0 = false, 1 = true) 8544 * 8545 * @deprecated Accessing this setting from an app that is targeting 8546 * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. 8547 */ 8548 @Deprecated 8549 @Readable 8550 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; 8551 8552 /** 8553 * Whether lock pattern will vibrate as user enters (0 = false, 1 = 8554 * true) 8555 * 8556 * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the 8557 * lockscreen uses 8558 * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}. 8559 * Accessing this setting from an app that is targeting 8560 * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. 8561 */ 8562 @Deprecated 8563 @Readable 8564 public static final String 8565 LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; 8566 8567 /** 8568 * This preference allows the device to be locked given time after screen goes off, 8569 * subject to current DeviceAdmin policy limits. 8570 * @hide 8571 */ 8572 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 8573 @Readable 8574 public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout"; 8575 8576 /** 8577 * This preference contains the string that shows for owner info on LockScreen. 8578 * @hide 8579 * @deprecated 8580 */ 8581 @Deprecated 8582 @Readable 8583 public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info"; 8584 8585 /** 8586 * Ids of the user-selected appwidgets on the lockscreen (comma-delimited). 8587 * @hide 8588 */ 8589 @Deprecated 8590 @Readable 8591 public static final String LOCK_SCREEN_APPWIDGET_IDS = 8592 "lock_screen_appwidget_ids"; 8593 8594 /** 8595 * Id of the appwidget shown on the lock screen when appwidgets are disabled. 8596 * @hide 8597 */ 8598 @Deprecated 8599 @Readable 8600 public static final String LOCK_SCREEN_FALLBACK_APPWIDGET_ID = 8601 "lock_screen_fallback_appwidget_id"; 8602 8603 /** 8604 * Index of the lockscreen appwidget to restore, -1 if none. 8605 * @hide 8606 */ 8607 @Deprecated 8608 @Readable 8609 public static final String LOCK_SCREEN_STICKY_APPWIDGET = 8610 "lock_screen_sticky_appwidget"; 8611 8612 /** 8613 * This preference enables showing the owner info on LockScreen. 8614 * @hide 8615 * @deprecated 8616 */ 8617 @Deprecated 8618 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 8619 @Readable 8620 public static final String LOCK_SCREEN_OWNER_INFO_ENABLED = 8621 "lock_screen_owner_info_enabled"; 8622 8623 /** 8624 * Indicates whether the user has allowed notifications to be shown atop a securely locked 8625 * screen in their full "private" form (same as when the device is unlocked). 8626 * <p> 8627 * Type: int (0 for false, 1 for true) 8628 * 8629 * @hide 8630 */ 8631 @SystemApi 8632 @Readable 8633 public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = 8634 "lock_screen_allow_private_notifications"; 8635 8636 /** 8637 * When set by a user, allows notification remote input atop a securely locked screen 8638 * without having to unlock 8639 * @hide 8640 */ 8641 @Readable 8642 public static final String LOCK_SCREEN_ALLOW_REMOTE_INPUT = 8643 "lock_screen_allow_remote_input"; 8644 8645 /** 8646 * Indicates which clock face to show on lock screen and AOD formatted as a serialized 8647 * {@link org.json.JSONObject} with the format: 8648 * {"clock": id, "_applied_timestamp": timestamp} 8649 * @hide 8650 */ 8651 @Readable 8652 public static final String LOCK_SCREEN_CUSTOM_CLOCK_FACE = "lock_screen_custom_clock_face"; 8653 8654 /** 8655 * Indicates which clock face to show on lock screen and AOD while docked. 8656 * @hide 8657 */ 8658 @Readable 8659 public static final String DOCKED_CLOCK_FACE = "docked_clock_face"; 8660 8661 /** 8662 * Setting to indicate that content filters should be enabled on web browsers. 8663 * 8664 * <ul> 8665 * <li>0 = Allow all sites 8666 * <li>1 = Try to block explicit sites 8667 * </ul> 8668 * 8669 * @hide 8670 */ 8671 @Readable 8672 public static final String BROWSER_CONTENT_FILTERS_ENABLED = 8673 "browser_content_filters_enabled"; 8674 8675 /** 8676 * Setting to indicate that content filters should be enabled in web search engines. 8677 * 8678 * <ul> 8679 * <li>0 = Off 8680 * <li>1 = Filter 8681 * </ul> 8682 * 8683 * @hide 8684 */ 8685 @Readable 8686 public static final String SEARCH_CONTENT_FILTERS_ENABLED = 8687 "search_content_filters_enabled"; 8688 8689 /** 8690 * Set by the system to track if the user needs to see the call to action for 8691 * the lockscreen notification policy. 8692 * @hide 8693 */ 8694 @Readable 8695 public static final String SHOW_NOTE_ABOUT_NOTIFICATION_HIDING = 8696 "show_note_about_notification_hiding"; 8697 8698 /** 8699 * Set to 1 by the system after trust agents have been initialized. 8700 * @hide 8701 */ 8702 @Readable 8703 public static final String TRUST_AGENTS_INITIALIZED = 8704 "trust_agents_initialized"; 8705 8706 /** 8707 * Set to 1 by the system after the list of known trust agents have been initialized. 8708 * @hide 8709 */ 8710 public static final String KNOWN_TRUST_AGENTS_INITIALIZED = 8711 "known_trust_agents_initialized"; 8712 8713 /** 8714 * The Logging ID (a unique 64-bit value) as a hex string. 8715 * Used as a pseudonymous identifier for logging. 8716 * @deprecated This identifier is poorly initialized and has 8717 * many collisions. It should not be used. 8718 */ 8719 @Deprecated 8720 @Readable 8721 public static final String LOGGING_ID = "logging_id"; 8722 8723 /** 8724 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead 8725 */ 8726 @Deprecated 8727 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; 8728 8729 /** 8730 * No longer supported. 8731 */ 8732 @Readable 8733 public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled"; 8734 8735 /** 8736 * No longer supported. 8737 */ 8738 @Readable 8739 public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update"; 8740 8741 /** 8742 * No longer supported. 8743 */ 8744 @Readable 8745 public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url"; 8746 8747 /** 8748 * Settings classname to launch when Settings is clicked from All 8749 * Applications. Needed because of user testing between the old 8750 * and new Settings apps. 8751 */ 8752 // TODO: 881807 8753 @Readable 8754 public static final String SETTINGS_CLASSNAME = "settings_classname"; 8755 8756 /** 8757 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead 8758 */ 8759 @Deprecated 8760 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; 8761 8762 /** 8763 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead 8764 */ 8765 @Deprecated 8766 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; 8767 8768 /** 8769 * If accessibility is enabled. 8770 */ 8771 @Readable 8772 public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled"; 8773 8774 /** 8775 * Whether select sound track with audio description by default. 8776 * @hide 8777 */ 8778 public static final String ENABLED_ACCESSIBILITY_AUDIO_DESCRIPTION_BY_DEFAULT = 8779 "enabled_accessibility_audio_description_by_default"; 8780 8781 /** 8782 * Setting specifying if the accessibility shortcut is enabled. 8783 * @hide 8784 */ 8785 @Readable 8786 public static final String ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN = 8787 "accessibility_shortcut_on_lock_screen"; 8788 8789 /** 8790 * Setting specifying if the accessibility shortcut dialog has been shown to this user. 8791 * @hide 8792 */ 8793 @Readable 8794 public static final String ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN = 8795 "accessibility_shortcut_dialog_shown"; 8796 8797 /** 8798 * Setting specifying if the timeout restriction 8799 * {@link ViewConfiguration#getAccessibilityShortcutKeyTimeout()} 8800 * of the accessibility shortcut dialog is skipped. 8801 * 8802 * @hide 8803 */ 8804 public static final String SKIP_ACCESSIBILITY_SHORTCUT_DIALOG_TIMEOUT_RESTRICTION = 8805 "skip_accessibility_shortcut_dialog_timeout_restriction"; 8806 8807 /** 8808 * Setting specifying the accessibility services, accessibility shortcut targets, 8809 * or features to be toggled via the accessibility shortcut. 8810 * 8811 * <p> This is a colon-separated string list which contains the flattened 8812 * {@link ComponentName} and the class name of a system class implementing a supported 8813 * accessibility feature. 8814 * @hide 8815 */ 8816 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 8817 @TestApi 8818 @Readable 8819 public static final String ACCESSIBILITY_SHORTCUT_TARGET_SERVICE = 8820 "accessibility_shortcut_target_service"; 8821 8822 /** 8823 * Setting specifying the accessibility service or feature to be toggled via the 8824 * accessibility button in the navigation bar. This is either a flattened 8825 * {@link ComponentName} or the class name of a system class implementing a supported 8826 * accessibility feature. 8827 * @hide 8828 */ 8829 @Readable 8830 public static final String ACCESSIBILITY_BUTTON_TARGET_COMPONENT = 8831 "accessibility_button_target_component"; 8832 8833 /** 8834 * Setting specifying the accessibility services, accessibility shortcut targets, 8835 * or features to be toggled via the accessibility button in the navigation bar, 8836 * or the floating accessibility button. 8837 * 8838 * <p> This is a colon-separated string list which contains the flattened 8839 * {@link ComponentName} and the class name of a system class implementing a supported 8840 * accessibility feature. 8841 * @hide 8842 */ 8843 @Readable 8844 public static final String ACCESSIBILITY_BUTTON_TARGETS = "accessibility_button_targets"; 8845 8846 /** 8847 * Setting specifying the accessibility services, shortcut targets or features 8848 * to be toggled via the gesture shortcut 8849 * 8850 * <p> This is a colon-separated string list which contains the flattened 8851 * {@link ComponentName} and the class name of a system class 8852 * implementing a supported accessibility feature. 8853 * @hide 8854 */ 8855 @Readable 8856 public static final String ACCESSIBILITY_GESTURE_TARGETS = 8857 "accessibility_gesture_targets"; 8858 8859 /** 8860 * Setting specifying the accessibility services, accessibility shortcut targets, 8861 * or features to be toggled via a tile in the quick settings panel. 8862 * 8863 * <p> This is a colon-separated string list which contains the flattened 8864 * {@link ComponentName} and the class name of a system class implementing a supported 8865 * accessibility feature. 8866 * @hide 8867 */ 8868 public static final String ACCESSIBILITY_QS_TARGETS = "accessibility_qs_targets"; 8869 8870 /** 8871 * Setting specifying the accessibility services, accessibility shortcut targets, 8872 * or features to be toggled via a keyboard shortcut gesture. 8873 * 8874 * <p> This is a colon-separated string list which contains the flattened 8875 * {@link ComponentName} and the class name of a system class implementing a supported 8876 * accessibility feature. 8877 * 8878 * @hide 8879 */ 8880 public static final String ACCESSIBILITY_KEY_GESTURE_TARGETS = 8881 "accessibility_key_gesture_targets"; 8882 8883 /** 8884 * The system class name of magnification controller which is a target to be toggled via 8885 * accessibility shortcut or accessibility button. 8886 * 8887 * @hide 8888 */ 8889 @Readable 8890 public static final String ACCESSIBILITY_SHORTCUT_TARGET_MAGNIFICATION_CONTROLLER = 8891 "com.android.server.accessibility.MagnificationController"; 8892 8893 /** 8894 * If touch exploration is enabled. 8895 */ 8896 @Readable 8897 public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled"; 8898 8899 /** 8900 * List of the enabled accessibility providers. 8901 */ 8902 @Readable 8903 public static final String ENABLED_ACCESSIBILITY_SERVICES = 8904 "enabled_accessibility_services"; 8905 8906 /** 8907 * List of the notified non-accessibility category accessibility services. 8908 * 8909 * @hide 8910 */ 8911 @Readable 8912 public static final String NOTIFIED_NON_ACCESSIBILITY_CATEGORY_SERVICES = 8913 "notified_non_accessibility_category_services"; 8914 8915 /** 8916 * List of the accessibility services to which the user has granted 8917 * permission to put the device into touch exploration mode. 8918 * 8919 * @hide 8920 */ 8921 @Readable 8922 public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES = 8923 "touch_exploration_granted_accessibility_services"; 8924 8925 /** 8926 * Is talkback service enabled or not. 0 == no, 1 == yes 8927 * 8928 * @hide 8929 */ 8930 public static final String WEAR_TALKBACK_ENABLED = "wear_talkback_enabled"; 8931 8932 /** 8933 * Whether the Global Actions Panel is enabled. 8934 * @hide 8935 */ 8936 @Readable 8937 public static final String GLOBAL_ACTIONS_PANEL_ENABLED = "global_actions_panel_enabled"; 8938 8939 /** 8940 * Whether the Global Actions Panel can be toggled on or off in Settings. 8941 * @hide 8942 */ 8943 @Readable 8944 public static final String GLOBAL_ACTIONS_PANEL_AVAILABLE = 8945 "global_actions_panel_available"; 8946 8947 /** 8948 * Enables debug mode for the Global Actions Panel. 8949 * @hide 8950 */ 8951 @Readable 8952 public static final String GLOBAL_ACTIONS_PANEL_DEBUG_ENABLED = 8953 "global_actions_panel_debug_enabled"; 8954 8955 /** 8956 * Whether the hush gesture has ever been used 8957 * @hide 8958 */ 8959 @SystemApi 8960 @Readable 8961 public static final String HUSH_GESTURE_USED = "hush_gesture_used"; 8962 8963 /** 8964 * Number of times the user has manually clicked the ringer toggle 8965 * @hide 8966 */ 8967 @Readable 8968 public static final String MANUAL_RINGER_TOGGLE_COUNT = "manual_ringer_toggle_count"; 8969 8970 /** 8971 * Whether to play a sound for charging events. 8972 * @hide 8973 */ 8974 @Readable 8975 public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled"; 8976 8977 /** 8978 * Whether to vibrate for charging events. 8979 * @hide 8980 */ 8981 @Readable 8982 public static final String CHARGING_VIBRATION_ENABLED = "charging_vibration_enabled"; 8983 8984 /** 8985 * If 0, turning on dnd manually will last indefinitely. 8986 * Else if non-negative, turning on dnd manually will last for this many minutes. 8987 * Else (if negative), turning on dnd manually will surface a dialog that prompts 8988 * user to specify a duration. 8989 * @hide 8990 */ 8991 @Readable 8992 public static final String ZEN_DURATION = "zen_duration"; 8993 8994 /** @hide */ public static final int ZEN_DURATION_PROMPT = -1; 8995 /** @hide */ public static final int ZEN_DURATION_FOREVER = 0; 8996 8997 /** 8998 * Whether the in call notification is enabled to play sound during calls. The value is 8999 * boolean (1 or 0). 9000 * @hide 9001 */ 9002 @Readable 9003 public static final String IN_CALL_NOTIFICATION_ENABLED = "in_call_notification_enabled"; 9004 9005 /** 9006 * Uri of the slice that's presented on the keyguard. 9007 * Defaults to a slice with the date and next alarm. 9008 * 9009 * @hide 9010 */ 9011 @Readable 9012 public static final String KEYGUARD_SLICE_URI = "keyguard_slice_uri"; 9013 9014 /** 9015 * The adjustment in font weight. This is used to draw text in bold. 9016 * 9017 * <p> This value can be negative. To display bolded text, the adjustment used is 300, 9018 * which is the difference between 9019 * {@link android.graphics.fonts.FontStyle#FONT_WEIGHT_NORMAL} and 9020 * {@link android.graphics.fonts.FontStyle#FONT_WEIGHT_BOLD}. 9021 * 9022 * @hide 9023 */ 9024 @Readable 9025 public static final String FONT_WEIGHT_ADJUSTMENT = "font_weight_adjustment"; 9026 9027 /** 9028 * Whether to speak passwords while in accessibility mode. 9029 * 9030 * @deprecated The speaking of passwords is controlled by individual accessibility services. 9031 * Apps should ignore this setting and provide complete information to accessibility 9032 * at all times, which was the behavior when this value was {@code true}. 9033 */ 9034 @Deprecated 9035 @Readable 9036 public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password"; 9037 9038 /** 9039 * Whether to draw text with high contrast while in accessibility mode. 9040 * 9041 * @hide 9042 */ 9043 @Readable 9044 public static final String ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED = 9045 "high_text_contrast_enabled"; 9046 9047 /** 9048 * Setting that specifies the status of the High Contrast Text 9049 * rectangle refresh's one-time prompt. 9050 * 0 = UNKNOWN 9051 * 1 = PROMPT_SHOWN 9052 * 2 = PROMPT_UNNECESSARY 9053 * 9054 * @hide 9055 */ 9056 public static final String ACCESSIBILITY_HCT_RECT_PROMPT_STATUS = 9057 "accessibility_hct_rect_prompt_status"; 9058 9059 /** 9060 * The color contrast, float in [-1, 1], 1 being the highest contrast. 9061 * 9062 * @hide 9063 */ 9064 public static final String CONTRAST_LEVEL = "contrast_level"; 9065 9066 /** 9067 * Setting that specifies whether the display magnification is enabled via a system-wide 9068 * triple tap gesture. Display magnifications allows the user to zoom in the display content 9069 * and is targeted to low vision users. The current magnification scale is controlled by 9070 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}. 9071 * 9072 * @hide 9073 */ 9074 @UnsupportedAppUsage 9075 @TestApi 9076 @Readable 9077 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED = 9078 "accessibility_display_magnification_enabled"; 9079 9080 /** 9081 * Setting that specifies whether the display magnification is enabled via a shortcut 9082 * affordance within the system's navigation area. Display magnifications allows the user to 9083 * zoom in the display content and is targeted to low vision users. The current 9084 * magnification scale is controlled by {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}. 9085 * 9086 * @deprecated Use {@link #ACCESSIBILITY_BUTTON_TARGETS} instead. 9087 * {@link #ACCESSIBILITY_BUTTON_TARGETS} holds the magnification system class name 9088 * when navigation bar magnification is enabled. 9089 * @hide 9090 */ 9091 @SystemApi 9092 @Readable 9093 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED = 9094 "accessibility_display_magnification_navbar_enabled"; 9095 9096 /** 9097 * Setting that specifies what the display magnification scale is. 9098 * Display magnifications allows the user to zoom in the display 9099 * content and is targeted to low vision users. Whether a display 9100 * magnification is performed is controlled by 9101 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED} and 9102 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED} 9103 * 9104 * @hide 9105 */ 9106 @Readable 9107 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE = 9108 "accessibility_display_magnification_scale"; 9109 9110 /** 9111 * Unused mangnification setting 9112 * 9113 * @hide 9114 * @deprecated 9115 */ 9116 @Deprecated 9117 @Readable 9118 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE = 9119 "accessibility_display_magnification_auto_update"; 9120 9121 /** 9122 * Accessibility Window Magnification Allow diagonal scrolling value. The value is boolean. 9123 * 1 : on, 0 : off 9124 * 9125 * @hide 9126 */ 9127 public static final String ACCESSIBILITY_ALLOW_DIAGONAL_SCROLLING = 9128 "accessibility_allow_diagonal_scrolling"; 9129 9130 9131 /** 9132 * Setting that specifies what mode the soft keyboard is in (default or hidden). Can be 9133 * modified from an AccessibilityService using the SoftKeyboardController. 9134 * 9135 * @hide 9136 */ 9137 @Readable 9138 public static final String ACCESSIBILITY_SOFT_KEYBOARD_MODE = 9139 "accessibility_soft_keyboard_mode"; 9140 9141 /** 9142 * Default soft keyboard behavior. 9143 * 9144 * @hide 9145 */ 9146 public static final int SHOW_MODE_AUTO = 0; 9147 9148 /** 9149 * Soft keyboard is never shown. 9150 * 9151 * @hide 9152 */ 9153 public static final int SHOW_MODE_HIDDEN = 1; 9154 9155 /** 9156 * Setting that specifies whether timed text (captions) should be 9157 * displayed in video content. Text display properties are controlled by 9158 * the following settings: 9159 * <ul> 9160 * <li>{@link #ACCESSIBILITY_CAPTIONING_LOCALE} 9161 * <li>{@link #ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR} 9162 * <li>{@link #ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR} 9163 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_COLOR} 9164 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_TYPE} 9165 * <li>{@link #ACCESSIBILITY_CAPTIONING_TYPEFACE} 9166 * <li>{@link #ACCESSIBILITY_CAPTIONING_FONT_SCALE} 9167 * </ul> 9168 * 9169 * @hide 9170 */ 9171 @Readable 9172 public static final String ACCESSIBILITY_CAPTIONING_ENABLED = 9173 "accessibility_captioning_enabled"; 9174 9175 /** 9176 * Setting that specifies the language for captions as a locale string, 9177 * e.g. en_US. 9178 * 9179 * @see java.util.Locale#toString 9180 * @hide 9181 */ 9182 @Readable 9183 public static final String ACCESSIBILITY_CAPTIONING_LOCALE = 9184 "accessibility_captioning_locale"; 9185 9186 /** 9187 * Integer property that specifies the preset style for captions, one 9188 * of: 9189 * <ul> 9190 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESET_CUSTOM} 9191 * <li>a valid index of {@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESETS} 9192 * </ul> 9193 * 9194 * @see java.util.Locale#toString 9195 * @hide 9196 */ 9197 @Readable 9198 public static final String ACCESSIBILITY_CAPTIONING_PRESET = 9199 "accessibility_captioning_preset"; 9200 9201 /** 9202 * Integer property that specifes the background color for captions as a 9203 * packed 32-bit color. 9204 * 9205 * @see android.graphics.Color#argb 9206 * @hide 9207 */ 9208 @Readable 9209 public static final String ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR = 9210 "accessibility_captioning_background_color"; 9211 9212 /** 9213 * Integer property that specifes the foreground color for captions as a 9214 * packed 32-bit color. 9215 * 9216 * @see android.graphics.Color#argb 9217 * @hide 9218 */ 9219 @Readable 9220 public static final String ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR = 9221 "accessibility_captioning_foreground_color"; 9222 9223 /** 9224 * Integer property that specifes the edge type for captions, one of: 9225 * <ul> 9226 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_NONE} 9227 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE} 9228 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW} 9229 * </ul> 9230 * 9231 * @see #ACCESSIBILITY_CAPTIONING_EDGE_COLOR 9232 * @hide 9233 */ 9234 @Readable 9235 public static final String ACCESSIBILITY_CAPTIONING_EDGE_TYPE = 9236 "accessibility_captioning_edge_type"; 9237 9238 /** 9239 * Integer property that specifes the edge color for captions as a 9240 * packed 32-bit color. 9241 * 9242 * @see #ACCESSIBILITY_CAPTIONING_EDGE_TYPE 9243 * @see android.graphics.Color#argb 9244 * @hide 9245 */ 9246 @Readable 9247 public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR = 9248 "accessibility_captioning_edge_color"; 9249 9250 /** 9251 * Integer property that specifes the window color for captions as a 9252 * packed 32-bit color. 9253 * 9254 * @see android.graphics.Color#argb 9255 * @hide 9256 */ 9257 @Readable 9258 public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR = 9259 "accessibility_captioning_window_color"; 9260 9261 /** 9262 * String property that specifies the typeface for captions, one of: 9263 * <ul> 9264 * <li>DEFAULT 9265 * <li>MONOSPACE 9266 * <li>SANS_SERIF 9267 * <li>SERIF 9268 * </ul> 9269 * 9270 * @see android.graphics.Typeface 9271 * @hide 9272 */ 9273 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9274 @Readable 9275 public static final String ACCESSIBILITY_CAPTIONING_TYPEFACE = 9276 "accessibility_captioning_typeface"; 9277 9278 /** 9279 * Floating point property that specifies font scaling for captions. 9280 * 9281 * @hide 9282 */ 9283 @Readable 9284 public static final String ACCESSIBILITY_CAPTIONING_FONT_SCALE = 9285 "accessibility_captioning_font_scale"; 9286 9287 /** 9288 * Setting that specifies whether display color inversion is enabled. 9289 */ 9290 @Readable 9291 public static final String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = 9292 "accessibility_display_inversion_enabled"; 9293 9294 /** 9295 * Flag that specifies whether font size has been changed. The flag will 9296 * be set when users change the scaled value of font size for the first time. 9297 * @hide 9298 */ 9299 @Readable 9300 public static final String ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED = 9301 "accessibility_font_scaling_has_been_changed"; 9302 9303 /** 9304 * Setting that specifies whether display color space adjustment is 9305 * enabled. 9306 * 9307 * @hide 9308 */ 9309 @UnsupportedAppUsage 9310 @Readable 9311 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED = 9312 "accessibility_display_daltonizer_enabled"; 9313 9314 /** 9315 * Integer property that specifies the type of color space adjustment to 9316 * perform. Valid values are defined in AccessibilityManager and Settings arrays.xml: 9317 * - AccessibilityManager.DALTONIZER_DISABLED = -1 9318 * - AccessibilityManager.DALTONIZER_SIMULATE_MONOCHROMACY = 0 9319 * - <item>@string/daltonizer_mode_protanomaly</item> = 11 9320 * - AccessibilityManager.DALTONIZER_CORRECT_DEUTERANOMALY and 9321 * <item>@string/daltonizer_mode_deuteranomaly</item> = 12 9322 * - <item>@string/daltonizer_mode_tritanomaly</item> = 13 9323 * 9324 * @hide 9325 */ 9326 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9327 @Readable 9328 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER = 9329 "accessibility_display_daltonizer"; 9330 9331 /** 9332 * Integer property that determines the saturation level of color correction. Default value 9333 * is defined in Settings config.xml. 9334 * [0-10] inclusive where 0 would look as if color space adustment is not applied at all. 9335 * 9336 * @hide 9337 */ 9338 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_SATURATION_LEVEL = 9339 "accessibility_display_daltonizer_saturation_level"; 9340 9341 /** 9342 * Setting that specifies whether automatic click when the mouse pointer stops moving is 9343 * enabled. 9344 * 9345 * @hide 9346 */ 9347 @UnsupportedAppUsage 9348 @Readable 9349 public static final String ACCESSIBILITY_AUTOCLICK_ENABLED = 9350 "accessibility_autoclick_enabled"; 9351 9352 /** 9353 * Integer setting specifying amount of time in ms the mouse pointer has to stay still 9354 * before performing click when {@link #ACCESSIBILITY_AUTOCLICK_ENABLED} is set. 9355 * 9356 * @see #ACCESSIBILITY_AUTOCLICK_ENABLED 9357 * @hide 9358 */ 9359 @Readable 9360 public static final String ACCESSIBILITY_AUTOCLICK_DELAY = 9361 "accessibility_autoclick_delay"; 9362 9363 /** 9364 * Integer setting specifying the autoclick cursor area size (the radius of the autoclick 9365 * ring indicator) when {@link #ACCESSIBILITY_AUTOCLICK_ENABLED} is set. 9366 * 9367 * @see #ACCESSIBILITY_AUTOCLICK_ENABLED 9368 * @hide 9369 */ 9370 public static final String ACCESSIBILITY_AUTOCLICK_CURSOR_AREA_SIZE = 9371 "accessibility_autoclick_cursor_area_size"; 9372 9373 /** 9374 * Setting that specifies whether minor cursor movement will be ignored when 9375 * {@link #ACCESSIBILITY_AUTOCLICK_ENABLED} is set. 9376 * 9377 * @see #ACCESSIBILITY_AUTOCLICK_ENABLED 9378 * @hide 9379 */ 9380 public static final String ACCESSIBILITY_AUTOCLICK_IGNORE_MINOR_CURSOR_MOVEMENT = 9381 "accessibility_autoclick_ignore_minor_cursor_movement"; 9382 9383 /** 9384 * String setting that stores the position of the autoclick panel when 9385 * {@link #ACCESSIBILITY_AUTOCLICK_ENABLED} is set. The position is stored as a 9386 * comma-separated string containing gravity, x-coordinate, y-coordinate, and corner index. 9387 * For example, "8388659,15,30,0", where 8388659 means gravity Gravity.START | Gravity.TOP. 9388 * 9389 * @see #ACCESSIBILITY_AUTOCLICK_ENABLED 9390 * @hide 9391 */ 9392 public static final String ACCESSIBILITY_AUTOCLICK_PANEL_POSITION = 9393 "accessibility_autoclick_panel_position"; 9394 9395 /** 9396 * Setting that specifies whether autoclick type reverts to left click after performing 9397 * an action when {@link #ACCESSIBILITY_AUTOCLICK_ENABLED} is set. 9398 * 9399 * @see #ACCESSIBILITY_AUTOCLICK_ENABLED 9400 * @hide 9401 */ 9402 public static final String ACCESSIBILITY_AUTOCLICK_REVERT_TO_LEFT_CLICK = 9403 "accessibility_autoclick_revert_to_left_click"; 9404 9405 /** 9406 * Whether or not larger size icons are used for the pointer of mouse/trackpad for 9407 * accessibility. 9408 * (0 = false, 1 = true) 9409 * @hide 9410 */ 9411 @UnsupportedAppUsage 9412 @Readable 9413 public static final String ACCESSIBILITY_LARGE_POINTER_ICON = 9414 "accessibility_large_pointer_icon"; 9415 9416 /** 9417 * The timeout for considering a press to be a long press in milliseconds. 9418 * @hide 9419 */ 9420 @UnsupportedAppUsage 9421 @Readable 9422 public static final String LONG_PRESS_TIMEOUT = "long_press_timeout"; 9423 9424 /** 9425 * The duration in milliseconds between the first tap's up event and the second tap's 9426 * down event for an interaction to be considered part of the same multi-press. 9427 * @hide 9428 */ 9429 @Readable 9430 public static final String MULTI_PRESS_TIMEOUT = "multi_press_timeout"; 9431 9432 /** 9433 * Whether to enable key repeats for Physical Keyboard. 9434 * 9435 * If set to false, continuous key presses on 9436 * physical keyboard will not cause the pressed key to repeated. 9437 * @hide 9438 */ 9439 @Readable 9440 public static final String KEY_REPEAT_ENABLED = "key_repeat_enabled"; 9441 9442 /** 9443 * The duration before a key repeat begins in milliseconds. 9444 * @hide 9445 */ 9446 @Readable 9447 public static final String KEY_REPEAT_TIMEOUT_MS = "key_repeat_timeout"; 9448 9449 /** 9450 * The duration between successive key repeats in milliseconds. 9451 * @hide 9452 */ 9453 @Readable 9454 public static final String KEY_REPEAT_DELAY_MS = "key_repeat_delay"; 9455 9456 /** 9457 * Setting that specifies recommended timeout in milliseconds for controls 9458 * which don't need user's interactions. 9459 * 9460 * @hide 9461 */ 9462 @Readable 9463 public static final String ACCESSIBILITY_NON_INTERACTIVE_UI_TIMEOUT_MS = 9464 "accessibility_non_interactive_ui_timeout_ms"; 9465 9466 /** 9467 * Setting that specifies recommended timeout in milliseconds for controls 9468 * which need user's interactions. 9469 * 9470 * @hide 9471 */ 9472 @Readable 9473 public static final String ACCESSIBILITY_INTERACTIVE_UI_TIMEOUT_MS = 9474 "accessibility_interactive_ui_timeout_ms"; 9475 9476 9477 /** 9478 * Setting that specifies whether Reduce Bright Colors, or brightness dimming by color 9479 * adjustment, is enabled. 9480 * 9481 * @hide 9482 */ 9483 public static final String REDUCE_BRIGHT_COLORS_ACTIVATED = 9484 "reduce_bright_colors_activated"; 9485 9486 /** 9487 * Setting that specifies the level of Reduce Bright Colors in intensity. The range is 9488 * [0, 100]. 9489 * 9490 * @hide 9491 */ 9492 public static final String REDUCE_BRIGHT_COLORS_LEVEL = 9493 "reduce_bright_colors_level"; 9494 9495 /** 9496 * Setting that specifies whether Reduce Bright Colors should persist across reboots. 9497 * 9498 * @hide 9499 */ 9500 public static final String REDUCE_BRIGHT_COLORS_PERSIST_ACROSS_REBOOTS = 9501 "reduce_bright_colors_persist_across_reboots"; 9502 9503 /** 9504 * Setting that holds EM_VALUE (proprietary) 9505 * 9506 * @hide 9507 */ 9508 public static final String EM_VALUE = 9509 "em_value"; 9510 /** 9511 * List of the enabled print services. 9512 * 9513 * N and beyond uses {@link #DISABLED_PRINT_SERVICES}. But this might be used in an upgrade 9514 * from pre-N. 9515 * 9516 * @hide 9517 */ 9518 @UnsupportedAppUsage 9519 @Readable 9520 public static final String ENABLED_PRINT_SERVICES = 9521 "enabled_print_services"; 9522 9523 /** 9524 * List of the disabled print services. 9525 * 9526 * @hide 9527 */ 9528 @TestApi 9529 @Readable 9530 public static final String DISABLED_PRINT_SERVICES = 9531 "disabled_print_services"; 9532 9533 /** 9534 * The saved value for WindowManagerService.setForcedDisplayDensity() 9535 * formatted as a single integer representing DPI. If unset, then use 9536 * the real display density. 9537 * 9538 * @hide 9539 */ 9540 @Readable 9541 public static final String DISPLAY_DENSITY_FORCED = "display_density_forced"; 9542 9543 /** 9544 * Setting to always use the default text-to-speech settings regardless 9545 * of the application settings. 9546 * 1 = override application settings, 9547 * 0 = use application settings (if specified). 9548 * 9549 * @deprecated The value of this setting is no longer respected by 9550 * the framework text to speech APIs as of the Ice Cream Sandwich release. 9551 */ 9552 @Deprecated 9553 @Readable 9554 public static final String TTS_USE_DEFAULTS = "tts_use_defaults"; 9555 9556 /** 9557 * Default text-to-speech engine speech rate. 100 = 1x 9558 */ 9559 @Readable 9560 public static final String TTS_DEFAULT_RATE = "tts_default_rate"; 9561 9562 /** 9563 * Default text-to-speech engine pitch. 100 = 1x 9564 */ 9565 @Readable 9566 public static final String TTS_DEFAULT_PITCH = "tts_default_pitch"; 9567 9568 /** 9569 * Default text-to-speech engine. 9570 */ 9571 @Readable 9572 public static final String TTS_DEFAULT_SYNTH = "tts_default_synth"; 9573 9574 /** 9575 * Default text-to-speech language. 9576 * 9577 * @deprecated this setting is no longer in use, as of the Ice Cream 9578 * Sandwich release. Apps should never need to read this setting directly, 9579 * instead can query the TextToSpeech framework classes for the default 9580 * locale. {@link TextToSpeech#getLanguage()}. 9581 */ 9582 @Deprecated 9583 @Readable 9584 public static final String TTS_DEFAULT_LANG = "tts_default_lang"; 9585 9586 /** 9587 * Default text-to-speech country. 9588 * 9589 * @deprecated this setting is no longer in use, as of the Ice Cream 9590 * Sandwich release. Apps should never need to read this setting directly, 9591 * instead can query the TextToSpeech framework classes for the default 9592 * locale. {@link TextToSpeech#getLanguage()}. 9593 */ 9594 @Deprecated 9595 @Readable 9596 public static final String TTS_DEFAULT_COUNTRY = "tts_default_country"; 9597 9598 /** 9599 * Default text-to-speech locale variant. 9600 * 9601 * @deprecated this setting is no longer in use, as of the Ice Cream 9602 * Sandwich release. Apps should never need to read this setting directly, 9603 * instead can query the TextToSpeech framework classes for the 9604 * locale that is in use {@link TextToSpeech#getLanguage()}. 9605 */ 9606 @Deprecated 9607 @Readable 9608 public static final String TTS_DEFAULT_VARIANT = "tts_default_variant"; 9609 9610 /** 9611 * Stores the default tts locales on a per engine basis. Stored as 9612 * a comma seperated list of values, each value being of the form 9613 * {@code engine_name:locale} for example, 9614 * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This 9615 * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and 9616 * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this 9617 * setting directly, and can query the TextToSpeech framework classes 9618 * for the locale that is in use. 9619 * 9620 * @hide 9621 */ 9622 @Readable 9623 public static final String TTS_DEFAULT_LOCALE = "tts_default_locale"; 9624 9625 /** 9626 * Space delimited list of plugin packages that are enabled. 9627 */ 9628 @Readable 9629 public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins"; 9630 9631 /** 9632 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} 9633 * instead. 9634 */ 9635 @Deprecated 9636 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = 9637 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; 9638 9639 /** 9640 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} 9641 * instead. 9642 */ 9643 @Deprecated 9644 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = 9645 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; 9646 9647 /** 9648 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} 9649 * instead. 9650 */ 9651 @Deprecated 9652 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = 9653 Global.WIFI_NUM_OPEN_NETWORKS_KEPT; 9654 9655 /** 9656 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} 9657 * instead. 9658 */ 9659 @Deprecated 9660 public static final String WIFI_ON = Global.WIFI_ON; 9661 9662 /** 9663 * The acceptable packet loss percentage (range 0 - 100) before trying 9664 * another AP on the same network. 9665 * @deprecated This setting is not used. 9666 */ 9667 @Deprecated 9668 @Readable 9669 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = 9670 "wifi_watchdog_acceptable_packet_loss_percentage"; 9671 9672 /** 9673 * The number of access points required for a network in order for the 9674 * watchdog to monitor it. 9675 * @deprecated This setting is not used. 9676 */ 9677 @Deprecated 9678 @Readable 9679 public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count"; 9680 9681 /** 9682 * The delay between background checks. 9683 * @deprecated This setting is not used. 9684 */ 9685 @Deprecated 9686 @Readable 9687 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = 9688 "wifi_watchdog_background_check_delay_ms"; 9689 9690 /** 9691 * Whether the Wi-Fi watchdog is enabled for background checking even 9692 * after it thinks the user has connected to a good access point. 9693 * @deprecated This setting is not used. 9694 */ 9695 @Deprecated 9696 @Readable 9697 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = 9698 "wifi_watchdog_background_check_enabled"; 9699 9700 /** 9701 * The timeout for a background ping 9702 * @deprecated This setting is not used. 9703 */ 9704 @Deprecated 9705 @Readable 9706 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = 9707 "wifi_watchdog_background_check_timeout_ms"; 9708 9709 /** 9710 * The number of initial pings to perform that *may* be ignored if they 9711 * fail. Again, if these fail, they will *not* be used in packet loss 9712 * calculation. For example, one network always seemed to time out for 9713 * the first couple pings, so this is set to 3 by default. 9714 * @deprecated This setting is not used. 9715 */ 9716 @Deprecated 9717 @Readable 9718 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = 9719 "wifi_watchdog_initial_ignored_ping_count"; 9720 9721 /** 9722 * The maximum number of access points (per network) to attempt to test. 9723 * If this number is reached, the watchdog will no longer monitor the 9724 * initial connection state for the network. This is a safeguard for 9725 * networks containing multiple APs whose DNS does not respond to pings. 9726 * @deprecated This setting is not used. 9727 */ 9728 @Deprecated 9729 @Readable 9730 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks"; 9731 9732 /** 9733 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead 9734 */ 9735 @Deprecated 9736 @Readable 9737 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; 9738 9739 /** 9740 * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled. 9741 * @deprecated This setting is not used. 9742 */ 9743 @Deprecated 9744 @Readable 9745 public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list"; 9746 9747 /** 9748 * The number of pings to test if an access point is a good connection. 9749 * @deprecated This setting is not used. 9750 */ 9751 @Deprecated 9752 @Readable 9753 public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count"; 9754 9755 /** 9756 * The delay between pings. 9757 * @deprecated This setting is not used. 9758 */ 9759 @Deprecated 9760 @Readable 9761 public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms"; 9762 9763 /** 9764 * The timeout per ping. 9765 * @deprecated This setting is not used. 9766 */ 9767 @Deprecated 9768 @Readable 9769 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms"; 9770 9771 /** 9772 * @deprecated Use 9773 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead 9774 */ 9775 @Deprecated 9776 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; 9777 9778 /** 9779 * @deprecated Use 9780 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead 9781 */ 9782 @Deprecated 9783 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = 9784 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; 9785 9786 /** 9787 * The number of milliseconds to hold on to a PendingIntent based request. This delay gives 9788 * the receivers of the PendingIntent an opportunity to make a new network request before 9789 * the Network satisfying the request is potentially removed. 9790 * 9791 * @hide 9792 */ 9793 @Readable 9794 public static final String CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS = 9795 "connectivity_release_pending_intent_delay_ms"; 9796 9797 /** 9798 * Whether background data usage is allowed. 9799 * 9800 * @deprecated As of {@link VERSION_CODES#ICE_CREAM_SANDWICH}, 9801 * availability of background data depends on several 9802 * combined factors. When background data is unavailable, 9803 * {@link ConnectivityManager#getActiveNetworkInfo()} will 9804 * now appear disconnected. 9805 */ 9806 @Deprecated 9807 @Readable 9808 public static final String BACKGROUND_DATA = "background_data"; 9809 9810 /** 9811 * Origins for which browsers should allow geolocation by default. 9812 * The value is a space-separated list of origins. 9813 */ 9814 @Readable 9815 public static final String ALLOWED_GEOLOCATION_ORIGINS 9816 = "allowed_geolocation_origins"; 9817 9818 /** 9819 * The preferred TTY mode 0 = TTy Off, CDMA default 9820 * 1 = TTY Full 9821 * 2 = TTY HCO 9822 * 3 = TTY VCO 9823 * @hide 9824 */ 9825 @Readable 9826 public static final String PREFERRED_TTY_MODE = 9827 "preferred_tty_mode"; 9828 9829 /** 9830 * Whether the enhanced voice privacy mode is enabled. 9831 * 0 = normal voice privacy 9832 * 1 = enhanced voice privacy 9833 * @hide 9834 */ 9835 @Readable 9836 public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled"; 9837 9838 /** 9839 * Whether the TTY mode mode is enabled. 9840 * 0 = disabled 9841 * 1 = enabled 9842 * @hide 9843 */ 9844 @Readable 9845 public static final String TTY_MODE_ENABLED = "tty_mode_enabled"; 9846 9847 /** 9848 * User-selected RTT mode. When on, outgoing and incoming calls will be answered as RTT 9849 * calls when supported by the device and carrier. Boolean value. 9850 * 0 = OFF 9851 * 1 = ON 9852 */ 9853 @Readable 9854 public static final String RTT_CALLING_MODE = "rtt_calling_mode"; 9855 9856 /** 9857 /** 9858 * Controls whether settings backup is enabled. 9859 * Type: int ( 0 = disabled, 1 = enabled ) 9860 * @hide 9861 */ 9862 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9863 @Readable 9864 public static final String BACKUP_ENABLED = "backup_enabled"; 9865 9866 /** 9867 * Controls whether application data is automatically restored from backup 9868 * at install time. 9869 * Type: int ( 0 = disabled, 1 = enabled ) 9870 * @hide 9871 */ 9872 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9873 @Readable 9874 public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore"; 9875 9876 /** 9877 * Controls whether framework backup scheduling is enabled. 9878 * @hide 9879 */ 9880 public static final String BACKUP_SCHEDULING_ENABLED = "backup_scheduling_enabled"; 9881 9882 /** 9883 * Indicates whether settings backup has been fully provisioned. 9884 * Type: int ( 0 = unprovisioned, 1 = fully provisioned ) 9885 * @hide 9886 */ 9887 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9888 @Readable 9889 public static final String BACKUP_PROVISIONED = "backup_provisioned"; 9890 9891 /** 9892 * Component of the transport to use for backup/restore. 9893 * @hide 9894 */ 9895 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9896 @Readable 9897 public static final String BACKUP_TRANSPORT = "backup_transport"; 9898 9899 /** 9900 * Indicates the version for which the setup wizard was last shown. The version gets 9901 * bumped for each release when there is new setup information to show. 9902 * 9903 * @hide 9904 */ 9905 @SystemApi 9906 @Readable 9907 public static final String LAST_SETUP_SHOWN = "last_setup_shown"; 9908 9909 /** 9910 * The interval in milliseconds after which Wi-Fi is considered idle. 9911 * When idle, it is possible for the device to be switched from Wi-Fi to 9912 * the mobile data network. 9913 * @hide 9914 * @deprecated Use {@link android.provider.Settings.Global#WIFI_IDLE_MS} 9915 * instead. 9916 */ 9917 @Deprecated 9918 public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS; 9919 9920 /** 9921 * The global search provider chosen by the user (if multiple global 9922 * search providers are installed). This will be the provider returned 9923 * by {@link SearchManager#getGlobalSearchActivity()} if it's still 9924 * installed. This setting is stored as a flattened component name as 9925 * per {@link ComponentName#flattenToString()}. 9926 * 9927 * @hide 9928 */ 9929 @Readable 9930 public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY = 9931 "search_global_search_activity"; 9932 9933 /** 9934 * The number of promoted sources in GlobalSearch. 9935 * @hide 9936 */ 9937 @Readable 9938 public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources"; 9939 /** 9940 * The maximum number of suggestions returned by GlobalSearch. 9941 * @hide 9942 */ 9943 @Readable 9944 public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display"; 9945 /** 9946 * The number of suggestions GlobalSearch will ask each non-web search source for. 9947 * @hide 9948 */ 9949 @Readable 9950 public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source"; 9951 /** 9952 * The number of suggestions the GlobalSearch will ask the web search source for. 9953 * @hide 9954 */ 9955 @Readable 9956 public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT = 9957 "search_web_results_override_limit"; 9958 /** 9959 * The number of milliseconds that GlobalSearch will wait for suggestions from 9960 * promoted sources before continuing with all other sources. 9961 * @hide 9962 */ 9963 @Readable 9964 public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS = 9965 "search_promoted_source_deadline_millis"; 9966 /** 9967 * The number of milliseconds before GlobalSearch aborts search suggesiton queries. 9968 * @hide 9969 */ 9970 @Readable 9971 public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis"; 9972 /** 9973 * The maximum number of milliseconds that GlobalSearch shows the previous results 9974 * after receiving a new query. 9975 * @hide 9976 */ 9977 @Readable 9978 public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis"; 9979 /** 9980 * The maximum age of log data used for shortcuts in GlobalSearch. 9981 * @hide 9982 */ 9983 @Readable 9984 public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis"; 9985 /** 9986 * The maximum age of log data used for source ranking in GlobalSearch. 9987 * @hide 9988 */ 9989 @Readable 9990 public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS = 9991 "search_max_source_event_age_millis"; 9992 /** 9993 * The minimum number of impressions needed to rank a source in GlobalSearch. 9994 * @hide 9995 */ 9996 @Readable 9997 public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING = 9998 "search_min_impressions_for_source_ranking"; 9999 /** 10000 * The minimum number of clicks needed to rank a source in GlobalSearch. 10001 * @hide 10002 */ 10003 @Readable 10004 public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING = 10005 "search_min_clicks_for_source_ranking"; 10006 /** 10007 * The maximum number of shortcuts shown by GlobalSearch. 10008 * @hide 10009 */ 10010 @Readable 10011 public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned"; 10012 /** 10013 * The size of the core thread pool for suggestion queries in GlobalSearch. 10014 * @hide 10015 */ 10016 @Readable 10017 public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE = 10018 "search_query_thread_core_pool_size"; 10019 /** 10020 * The maximum size of the thread pool for suggestion queries in GlobalSearch. 10021 * @hide 10022 */ 10023 @Readable 10024 public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE = 10025 "search_query_thread_max_pool_size"; 10026 /** 10027 * The size of the core thread pool for shortcut refreshing in GlobalSearch. 10028 * @hide 10029 */ 10030 @Readable 10031 public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE = 10032 "search_shortcut_refresh_core_pool_size"; 10033 /** 10034 * The maximum size of the thread pool for shortcut refreshing in GlobalSearch. 10035 * @hide 10036 */ 10037 @Readable 10038 public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE = 10039 "search_shortcut_refresh_max_pool_size"; 10040 /** 10041 * The maximun time that excess threads in the GlobalSeach thread pools will 10042 * wait before terminating. 10043 * @hide 10044 */ 10045 @Readable 10046 public static final String SEARCH_THREAD_KEEPALIVE_SECONDS = 10047 "search_thread_keepalive_seconds"; 10048 /** 10049 * The maximum number of concurrent suggestion queries to each source. 10050 * @hide 10051 */ 10052 @Readable 10053 public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT = 10054 "search_per_source_concurrent_query_limit"; 10055 10056 /** 10057 * Whether or not alert sounds are played on StorageManagerService events. 10058 * (0 = false, 1 = true) 10059 * @hide 10060 */ 10061 @Readable 10062 public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd"; 10063 10064 /** 10065 * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true) 10066 * @hide 10067 */ 10068 @Readable 10069 public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart"; 10070 10071 /** 10072 * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true) 10073 * @hide 10074 */ 10075 @Readable 10076 public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt"; 10077 10078 /** 10079 * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true) 10080 * @hide 10081 */ 10082 @Readable 10083 public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled"; 10084 10085 /** 10086 * If nonzero, ANRs in invisible background processes bring up a dialog. 10087 * Otherwise, the process will be silently killed. 10088 * 10089 * Also prevents ANRs and crash dialogs from being suppressed. 10090 * @hide 10091 */ 10092 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10093 @TestApi 10094 @Readable 10095 @SuppressLint("NoSettingsProvider") 10096 public static final String ANR_SHOW_BACKGROUND = "anr_show_background"; 10097 10098 /** 10099 * If nonzero, crashes in foreground processes will bring up a dialog. 10100 * Otherwise, the process will be silently killed. 10101 * @hide 10102 */ 10103 @TestApi 10104 @Readable 10105 @SuppressLint("NoSettingsProvider") 10106 public static final String SHOW_FIRST_CRASH_DIALOG_DEV_OPTION = 10107 "show_first_crash_dialog_dev_option"; 10108 10109 /** 10110 * The {@link ComponentName} string of the service to be used as the voice recognition 10111 * service. 10112 * 10113 * @hide 10114 */ 10115 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10116 @Readable 10117 public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service"; 10118 10119 /** 10120 * The {@link ComponentName} string of the selected spell checker service which is 10121 * one of the services managed by the text service manager. 10122 * 10123 * @hide 10124 */ 10125 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10126 @TestApi 10127 @Readable 10128 @SuppressLint("NoSettingsProvider") 10129 public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker"; 10130 10131 /** 10132 * {@link android.view.textservice.SpellCheckerSubtype#hashCode()} of the selected subtype 10133 * of the selected spell checker service which is one of the services managed by the text 10134 * service manager. 10135 * 10136 * @hide 10137 */ 10138 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10139 @TestApi 10140 @Readable 10141 @SuppressLint("NoSettingsProvider") 10142 public static final String SELECTED_SPELL_CHECKER_SUBTYPE = 10143 "selected_spell_checker_subtype"; 10144 10145 /** 10146 * Whether spell checker is enabled or not. 10147 * 10148 * @hide 10149 */ 10150 @Readable 10151 public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled"; 10152 10153 /** 10154 * What happens when the user presses the Power button while in-call 10155 * and the screen is on.<br/> 10156 * <b>Values:</b><br/> 10157 * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/> 10158 * 2 - The Power button hangs up the current call.<br/> 10159 * 10160 * @hide 10161 */ 10162 @UnsupportedAppUsage 10163 @Readable 10164 public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior"; 10165 10166 /** 10167 * Whether the user allows minimal post processing or not. 10168 * 10169 * <p>Values: 10170 * 0 - Not allowed. Any preferences set through the Window.setPreferMinimalPostProcessing 10171 * API will be ignored. 10172 * 1 - Allowed. Any preferences set through the Window.setPreferMinimalPostProcessing API 10173 * will be respected and the appropriate signals will be sent to display. 10174 * (Default behaviour) 10175 * 10176 * @hide 10177 */ 10178 @Readable 10179 public static final String MINIMAL_POST_PROCESSING_ALLOWED = 10180 "minimal_post_processing_allowed"; 10181 10182 /** 10183 * Whether to mirror the built-in display on all connected displays. 10184 * @hide 10185 */ 10186 public static final String MIRROR_BUILT_IN_DISPLAY = "mirror_built_in_display"; 10187 10188 /** 10189 * No mode switching will happen. 10190 * 10191 * @see #MATCH_CONTENT_FRAME_RATE 10192 * @hide 10193 */ 10194 public static final int MATCH_CONTENT_FRAMERATE_NEVER = 0; 10195 10196 /** 10197 * Allow only refresh rate switching between modes in the same configuration group. 10198 * This way only switches without visual interruptions for the user will be allowed. 10199 * 10200 * @see #MATCH_CONTENT_FRAME_RATE 10201 * @hide 10202 */ 10203 public static final int MATCH_CONTENT_FRAMERATE_SEAMLESSS_ONLY = 1; 10204 10205 /** 10206 * Allow refresh rate switching between all refresh rates even if the switch will have 10207 * visual interruptions for the user. 10208 * 10209 * @see #MATCH_CONTENT_FRAME_RATE 10210 * @hide 10211 */ 10212 public static final int MATCH_CONTENT_FRAMERATE_ALWAYS = 2; 10213 10214 /** 10215 * User's preference for refresh rate switching. 10216 * 10217 * <p>Values: 10218 * 0 - Never switch refresh rates. 10219 * 1 - Switch refresh rates only when it can be done seamlessly. (Default behaviour) 10220 * 2 - Always prefer refresh rate switching even if it's going to have visual interruptions 10221 * for the user. 10222 * 10223 * @see android.view.Surface#setFrameRate 10224 * @see #MATCH_CONTENT_FRAMERATE_NEVER 10225 * @see #MATCH_CONTENT_FRAMERATE_SEAMLESSS_ONLY 10226 * @see #MATCH_CONTENT_FRAMERATE_ALWAYS 10227 * @hide 10228 */ 10229 public static final String MATCH_CONTENT_FRAME_RATE = 10230 "match_content_frame_rate"; 10231 10232 /** 10233 * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen". 10234 * @hide 10235 */ 10236 public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1; 10237 10238 /** 10239 * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up". 10240 * @hide 10241 */ 10242 public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2; 10243 10244 /** 10245 * INCALL_POWER_BUTTON_BEHAVIOR default value. 10246 * @hide 10247 */ 10248 public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT = 10249 INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF; 10250 10251 /** 10252 * What happens when the user presses the Back button while in-call 10253 * and the screen is on.<br/> 10254 * <b>Values:</b><br/> 10255 * 0 - The Back buttons does nothing different.<br/> 10256 * 1 - The Back button hangs up the current call.<br/> 10257 * 10258 * @hide 10259 */ 10260 @Readable 10261 public static final String INCALL_BACK_BUTTON_BEHAVIOR = "incall_back_button_behavior"; 10262 10263 /** 10264 * INCALL_BACK_BUTTON_BEHAVIOR value for no action. 10265 * @hide 10266 */ 10267 public static final int INCALL_BACK_BUTTON_BEHAVIOR_NONE = 0x0; 10268 10269 /** 10270 * INCALL_BACK_BUTTON_BEHAVIOR value for "hang up". 10271 * @hide 10272 */ 10273 public static final int INCALL_BACK_BUTTON_BEHAVIOR_HANGUP = 0x1; 10274 10275 /** 10276 * INCALL_POWER_BUTTON_BEHAVIOR default value. 10277 * @hide 10278 */ 10279 public static final int INCALL_BACK_BUTTON_BEHAVIOR_DEFAULT = 10280 INCALL_BACK_BUTTON_BEHAVIOR_NONE; 10281 10282 /** 10283 * Whether the device should wake when the wake gesture sensor detects motion. 10284 * @hide 10285 */ 10286 @Readable 10287 public static final String WAKE_GESTURE_ENABLED = "wake_gesture_enabled"; 10288 10289 /** 10290 * Whether the device should doze if configured. 10291 * @hide 10292 */ 10293 @UnsupportedAppUsage 10294 @Readable 10295 public static final String DOZE_ENABLED = "doze_enabled"; 10296 10297 /** 10298 * Indicates whether doze should be always on. 10299 * <p> 10300 * Type: int (0 for false, 1 for true) 10301 * 10302 * @hide 10303 */ 10304 @SystemApi 10305 @Readable 10306 public static final String DOZE_ALWAYS_ON = "doze_always_on"; 10307 10308 /** 10309 * Indicates whether ambient wallpaper is visible with AOD. 10310 * <p> 10311 * Type: int (0 for false, 1 for true) 10312 * 10313 * @hide 10314 */ 10315 public static final String DOZE_ALWAYS_ON_WALLPAPER_ENABLED = 10316 "doze_always_on_wallpaper_enabled"; 10317 10318 /** 10319 * Whether the device should pulse on pick up gesture. 10320 * @hide 10321 */ 10322 @Readable 10323 public static final String DOZE_PICK_UP_GESTURE = "doze_pulse_on_pick_up"; 10324 10325 /** 10326 * Whether the device should pulse on long press gesture. 10327 * @hide 10328 */ 10329 @Readable 10330 public static final String DOZE_PULSE_ON_LONG_PRESS = "doze_pulse_on_long_press"; 10331 10332 /** 10333 * Whether the device should pulse on double tap gesture. 10334 * @hide 10335 */ 10336 @Readable 10337 public static final String DOZE_DOUBLE_TAP_GESTURE = "doze_pulse_on_double_tap"; 10338 10339 /** 10340 * Whether the device should respond to the SLPI tap gesture. 10341 * @hide 10342 */ 10343 @Readable 10344 public static final String DOZE_TAP_SCREEN_GESTURE = "doze_tap_gesture"; 10345 10346 /** 10347 * Gesture that wakes up the display, showing some version of the lock screen. 10348 * @hide 10349 */ 10350 @Readable 10351 public static final String DOZE_WAKE_LOCK_SCREEN_GESTURE = "doze_wake_screen_gesture"; 10352 10353 /** 10354 * Gesture that wakes up the display, toggling between {@link Display.STATE_OFF} and 10355 * {@link Display.STATE_DOZE}. 10356 * @hide 10357 */ 10358 @Readable 10359 public static final String DOZE_WAKE_DISPLAY_GESTURE = "doze_wake_display_gesture"; 10360 10361 /** 10362 * Gesture that wakes up the display on quick pickup, toggling between 10363 * {@link Display.STATE_OFF} and {@link Display.STATE_DOZE}. 10364 * @hide 10365 */ 10366 public static final String DOZE_QUICK_PICKUP_GESTURE = "doze_quick_pickup_gesture"; 10367 10368 /** 10369 * Whether the device should suppress the current doze configuration and disable dozing. 10370 * @hide 10371 */ 10372 @Readable 10373 public static final String SUPPRESS_DOZE = "suppress_doze"; 10374 10375 /** 10376 * Gesture that skips media. 10377 * @hide 10378 */ 10379 @Readable 10380 public static final String SKIP_GESTURE = "skip_gesture"; 10381 10382 /** 10383 * Count of successful gestures. 10384 * @hide 10385 */ 10386 @Readable 10387 public static final String SKIP_GESTURE_COUNT = "skip_gesture_count"; 10388 10389 /** 10390 * Count of non-gesture interaction. 10391 * @hide 10392 */ 10393 @Readable 10394 public static final String SKIP_TOUCH_COUNT = "skip_touch_count"; 10395 10396 /** 10397 * Direction to advance media for skip gesture 10398 * @hide 10399 */ 10400 @Readable 10401 public static final String SKIP_DIRECTION = "skip_gesture_direction"; 10402 10403 /** 10404 * Gesture that silences sound (alarms, notification, calls). 10405 * @hide 10406 */ 10407 @Readable 10408 public static final String SILENCE_GESTURE = "silence_gesture"; 10409 10410 /** 10411 * Count of successful silence alarms gestures. 10412 * @hide 10413 */ 10414 @Readable 10415 public static final String SILENCE_ALARMS_GESTURE_COUNT = "silence_alarms_gesture_count"; 10416 10417 /** 10418 * Count of successful silence timer gestures. 10419 * @hide 10420 */ 10421 @Readable 10422 public static final String SILENCE_TIMER_GESTURE_COUNT = "silence_timer_gesture_count"; 10423 10424 /** 10425 * Count of successful silence call gestures. 10426 * @hide 10427 */ 10428 @Readable 10429 public static final String SILENCE_CALL_GESTURE_COUNT = "silence_call_gesture_count"; 10430 10431 /** 10432 * Count of non-gesture interaction. 10433 * @hide 10434 */ 10435 @Readable 10436 public static final String SILENCE_ALARMS_TOUCH_COUNT = "silence_alarms_touch_count"; 10437 10438 /** 10439 * Count of non-gesture interaction. 10440 * @hide 10441 */ 10442 @Readable 10443 public static final String SILENCE_TIMER_TOUCH_COUNT = "silence_timer_touch_count"; 10444 10445 /** 10446 * Count of non-gesture interaction. 10447 * @hide 10448 */ 10449 @Readable 10450 public static final String SILENCE_CALL_TOUCH_COUNT = "silence_call_touch_count"; 10451 10452 /** 10453 * Number of successful "Motion Sense" tap gestures to pause media. 10454 * @hide 10455 */ 10456 @Readable 10457 public static final String AWARE_TAP_PAUSE_GESTURE_COUNT = "aware_tap_pause_gesture_count"; 10458 10459 /** 10460 * Number of touch interactions to pause media when a "Motion Sense" gesture could 10461 * have been used. 10462 * @hide 10463 */ 10464 @Readable 10465 public static final String AWARE_TAP_PAUSE_TOUCH_COUNT = "aware_tap_pause_touch_count"; 10466 10467 /** 10468 * For user preference if swipe bottom to expand notification gesture enabled. 10469 * @hide 10470 */ 10471 public static final String SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED = 10472 "swipe_bottom_to_notification_enabled"; 10473 10474 /** 10475 * Controls whether One-Handed mode is currently activated. 10476 * @hide 10477 */ 10478 public static final String ONE_HANDED_MODE_ACTIVATED = "one_handed_mode_activated"; 10479 10480 /** 10481 * For user preference if One-Handed Mode enabled. 10482 * @hide 10483 */ 10484 public static final String ONE_HANDED_MODE_ENABLED = "one_handed_mode_enabled"; 10485 10486 /** 10487 * For user preference if One-Handed Mode timeout. 10488 * @hide 10489 */ 10490 public static final String ONE_HANDED_MODE_TIMEOUT = "one_handed_mode_timeout"; 10491 10492 /** 10493 * For user taps app to exit One-Handed Mode. 10494 * @hide 10495 */ 10496 public static final String TAPS_APP_TO_EXIT = "taps_app_to_exit"; 10497 10498 /** 10499 * Internal use, one handed mode tutorial showed times. 10500 * @hide 10501 */ 10502 public static final String ONE_HANDED_TUTORIAL_SHOW_COUNT = 10503 "one_handed_tutorial_show_count"; 10504 10505 /** 10506 * Toggle to enable/disable for the apps to use the Ui translation for Views. The value 10507 * indicates whether the Ui translation is enabled by the user. 10508 * <p> 10509 * Type: {@code int} ({@code 0} for disabled, {@code 1} for enabled) 10510 * 10511 * @hide 10512 */ 10513 @SystemApi 10514 @Readable 10515 @SuppressLint("NoSettingsProvider") 10516 public static final String UI_TRANSLATION_ENABLED = "ui_translation_enabled"; 10517 10518 /** 10519 * The current night mode that has been selected by the user. Owned 10520 * and controlled by UiModeManagerService. Constants are as per 10521 * UiModeManager. 10522 * @hide 10523 */ 10524 @Readable 10525 public static final String UI_NIGHT_MODE = "ui_night_mode"; 10526 10527 /** 10528 * The current night mode custom type that has been selected by the user. Owned 10529 * and controlled by UiModeManagerService. Constants are as per UiModeManager. 10530 * @hide 10531 */ 10532 @Readable 10533 @SuppressLint("NoSettingsProvider") 10534 public static final String UI_NIGHT_MODE_CUSTOM_TYPE = "ui_night_mode_custom_type"; 10535 10536 /** 10537 * The current night mode that has been overridden to turn on by the system. Owned 10538 * and controlled by UiModeManagerService. Constants are as per 10539 * UiModeManager. 10540 * @hide 10541 */ 10542 @Readable 10543 public static final String UI_NIGHT_MODE_OVERRIDE_ON = "ui_night_mode_override_on"; 10544 10545 /** 10546 * The last computed night mode bool the last time the phone was on 10547 * @hide 10548 */ 10549 public static final String UI_NIGHT_MODE_LAST_COMPUTED = "ui_night_mode_last_computed"; 10550 10551 /** 10552 * The current night mode that has been overridden to turn off by the system. Owned 10553 * and controlled by UiModeManagerService. Constants are as per 10554 * UiModeManager. 10555 * @hide 10556 */ 10557 @Readable 10558 public static final String UI_NIGHT_MODE_OVERRIDE_OFF = "ui_night_mode_override_off"; 10559 10560 /** 10561 * Whether screensavers are enabled. 10562 * @hide 10563 */ 10564 @Readable 10565 public static final String SCREENSAVER_ENABLED = "screensaver_enabled"; 10566 10567 /** 10568 * The user's chosen screensaver components. 10569 * 10570 * These will be launched by the PhoneWindowManager after a timeout when not on 10571 * battery, or upon dock insertion (if SCREENSAVER_ACTIVATE_ON_DOCK is set to 1). 10572 * @hide 10573 */ 10574 @Readable 10575 public static final String SCREENSAVER_COMPONENTS = "screensaver_components"; 10576 10577 /** 10578 * If screensavers are enabled, whether the screensaver should be automatically launched 10579 * when the device is inserted into a (desk) dock. 10580 * @hide 10581 */ 10582 @Readable 10583 public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock"; 10584 10585 /** 10586 * If screensavers are enabled, whether the screensaver should be automatically launched 10587 * when the screen times out when not on battery. 10588 * @hide 10589 */ 10590 @Readable 10591 public static final String SCREENSAVER_ACTIVATE_ON_SLEEP = "screensaver_activate_on_sleep"; 10592 10593 /** 10594 * If screensavers are enabled, whether the screensaver should be 10595 * automatically launched when the device is stationary and upright. 10596 * @hide 10597 */ 10598 @Readable 10599 public static final String SCREENSAVER_ACTIVATE_ON_POSTURED = 10600 "screensaver_activate_on_postured"; 10601 10602 /** 10603 * If screensavers are enabled, the default screensaver component. 10604 * @hide 10605 */ 10606 @Readable 10607 public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component"; 10608 10609 /** 10610 * Whether complications are enabled to be shown over the screensaver by the user. 10611 * 10612 * @hide 10613 */ 10614 public static final String SCREENSAVER_COMPLICATIONS_ENABLED = 10615 "screensaver_complications_enabled"; 10616 10617 /** 10618 * Defines the enabled state for the glanceable hub. 10619 * 10620 * @hide 10621 */ 10622 @TestApi 10623 @Readable 10624 @SuppressLint({"UnflaggedApi", "NoSettingsProvider"}) // @TestApi purely for CTS support. 10625 public static final String GLANCEABLE_HUB_ENABLED = "glanceable_hub_enabled"; 10626 10627 /** 10628 * Indicates that glanceable hub should never be started automatically. 10629 * 10630 * @hide 10631 */ 10632 public static final int GLANCEABLE_HUB_START_NEVER = 0; 10633 10634 /** 10635 * Indicates that glanceable hub should be started when charging. 10636 * 10637 * @hide 10638 */ 10639 public static final int GLANCEABLE_HUB_START_CHARGING = 1; 10640 10641 /** 10642 * Indicates that glanceable hub should be started when charging and upright. 10643 * 10644 * @hide 10645 */ 10646 public static final int GLANCEABLE_HUB_START_CHARGING_UPRIGHT = 2; 10647 10648 /** 10649 * Indicates that glanceable hub should be started when docked. 10650 * 10651 * @hide 10652 */ 10653 public static final int GLANCEABLE_HUB_START_DOCKED = 3; 10654 10655 /** @hide */ 10656 @Retention(RetentionPolicy.SOURCE) 10657 @IntDef({ 10658 GLANCEABLE_HUB_START_NEVER, 10659 GLANCEABLE_HUB_START_CHARGING, 10660 GLANCEABLE_HUB_START_CHARGING_UPRIGHT, 10661 GLANCEABLE_HUB_START_DOCKED, 10662 }) 10663 public @interface WhenToStartGlanceableHub { 10664 } 10665 10666 /** 10667 * Indicates when to start glanceable hub. Possible values are: 10668 * 0: Never 10669 * 1: While charging always 10670 * 2: While upright and charging 10671 * 3: While docked 10672 * 10673 * @hide 10674 */ 10675 public static final String WHEN_TO_START_GLANCEABLE_HUB = 10676 "when_to_start_glanceable_hub"; 10677 10678 /** 10679 * Whether home controls are enabled to be shown over the screensaver by the user. 10680 * 10681 * @hide 10682 */ 10683 public static final String SCREENSAVER_HOME_CONTROLS_ENABLED = 10684 "screensaver_home_controls_enabled"; 10685 10686 10687 /** 10688 * Default, indicates that the user has not yet started the dock setup flow. 10689 * 10690 * @hide 10691 */ 10692 public static final int DOCK_SETUP_NOT_STARTED = 0; 10693 10694 /** 10695 * Indicates that the user has started but not yet completed dock setup. 10696 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10697 * 10698 * @hide 10699 */ 10700 public static final int DOCK_SETUP_STARTED = 1; 10701 10702 /** 10703 * Indicates that the user has snoozed dock setup and will complete it later. 10704 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10705 * 10706 * @hide 10707 */ 10708 public static final int DOCK_SETUP_PAUSED = 2; 10709 10710 /** 10711 * Indicates that the user has been prompted to start dock setup. 10712 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10713 * 10714 * @hide 10715 */ 10716 public static final int DOCK_SETUP_PROMPTED = 3; 10717 10718 /** 10719 * Indicates that the user has started dock setup but never finished it. 10720 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10721 * 10722 * @hide 10723 */ 10724 public static final int DOCK_SETUP_INCOMPLETE = 4; 10725 10726 /** 10727 * Indicates that the user has completed dock setup. 10728 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10729 * 10730 * @hide 10731 */ 10732 public static final int DOCK_SETUP_COMPLETED = 10; 10733 10734 /** 10735 * Indicates that dock setup timed out before the user could complete it. 10736 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10737 * 10738 * @hide 10739 */ 10740 public static final int DOCK_SETUP_TIMED_OUT = 11; 10741 10742 /** @hide */ 10743 @Retention(RetentionPolicy.SOURCE) 10744 @IntDef({ 10745 DOCK_SETUP_NOT_STARTED, 10746 DOCK_SETUP_STARTED, 10747 DOCK_SETUP_PAUSED, 10748 DOCK_SETUP_PROMPTED, 10749 DOCK_SETUP_INCOMPLETE, 10750 DOCK_SETUP_COMPLETED, 10751 DOCK_SETUP_TIMED_OUT 10752 }) 10753 public @interface DockSetupState { 10754 } 10755 10756 /** 10757 * Defines the user's current state of dock setup. 10758 * The possible states are defined in {@link DockSetupState}. 10759 * 10760 * @hide 10761 */ 10762 public static final String DOCK_SETUP_STATE = "dock_setup_state"; 10763 10764 10765 /** 10766 * Default, indicates that the user has not yet started the hub mode tutorial. 10767 * 10768 * @hide 10769 */ 10770 public static final int HUB_MODE_TUTORIAL_NOT_STARTED = 0; 10771 10772 /** 10773 * Indicates that the user has started but not yet completed the hub mode tutorial. 10774 * One of the possible states for {@link #HUB_MODE_TUTORIAL_STATE}. 10775 * 10776 * @hide 10777 */ 10778 public static final int HUB_MODE_TUTORIAL_STARTED = 1; 10779 10780 /** 10781 * Any value greater than or equal to this value is considered that the user has 10782 * completed the hub mode tutorial. 10783 * 10784 * One of the possible states for {@link #HUB_MODE_TUTORIAL_STATE}. 10785 * 10786 * @hide 10787 */ 10788 public static final int HUB_MODE_TUTORIAL_COMPLETED = 10; 10789 10790 /** @hide */ 10791 @Retention(RetentionPolicy.SOURCE) 10792 @IntDef({ 10793 HUB_MODE_TUTORIAL_NOT_STARTED, 10794 HUB_MODE_TUTORIAL_STARTED, 10795 HUB_MODE_TUTORIAL_COMPLETED 10796 }) 10797 public @interface HubModeTutorialState { 10798 } 10799 10800 /** 10801 * Defines the user's current state of navigating through the hub mode tutorial. 10802 * Some possible states are defined in {@link HubModeTutorialState}. 10803 * 10804 * Any value greater than or equal to {@link HUB_MODE_TUTORIAL_COMPLETED} indicates that 10805 * the user has completed that version of the hub mode tutorial. And tutorial may be 10806 * shown again when a new version becomes available. 10807 * @hide 10808 */ 10809 public static final String HUB_MODE_TUTORIAL_STATE = "hub_mode_tutorial_state"; 10810 10811 /** 10812 * The default NFC payment component 10813 * 10814 * @deprecated please use {@link android.app.role.RoleManager#getRoleHolders(String)} 10815 * with {@link android.app.role.RoleManager#ROLE_WALLET} parameter. 10816 * @hide 10817 */ 10818 @Deprecated 10819 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10820 public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component"; 10821 10822 /** 10823 * Whether NFC payment is handled by the foreground application or a default. 10824 * @hide 10825 */ 10826 @Readable 10827 public static final String NFC_PAYMENT_FOREGROUND = "nfc_payment_foreground"; 10828 10829 /** 10830 * Specifies the package name currently configured to be the primary sms application 10831 * @hide 10832 */ 10833 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10834 @Readable 10835 public static final String SMS_DEFAULT_APPLICATION = "sms_default_application"; 10836 10837 /** 10838 * Specifies the package name currently configured to be the default dialer application 10839 * @hide 10840 */ 10841 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10842 @Readable 10843 public static final String DIALER_DEFAULT_APPLICATION = "dialer_default_application"; 10844 10845 /** 10846 * Specifies the component name currently configured to be the default call screening 10847 * application 10848 * @hide 10849 */ 10850 @Readable 10851 public static final String CALL_SCREENING_DEFAULT_COMPONENT = 10852 "call_screening_default_component"; 10853 10854 /** 10855 * Specifies the package name currently configured to be the emergency assistance application 10856 * 10857 * @see android.telephony.TelephonyManager#ACTION_EMERGENCY_ASSISTANCE 10858 * 10859 * @hide 10860 */ 10861 @Readable 10862 public static final String EMERGENCY_ASSISTANCE_APPLICATION = "emergency_assistance_application"; 10863 10864 /** 10865 * Specifies whether the current app context on scren (assist data) will be sent to the 10866 * assist application (active voice interaction service). 10867 * 10868 * @hide 10869 */ 10870 @Readable 10871 public static final String ASSIST_STRUCTURE_ENABLED = "assist_structure_enabled"; 10872 10873 /** 10874 * Specifies whether a screenshot of the screen contents will be sent to the assist 10875 * application (active voice interaction service). 10876 * 10877 * @hide 10878 */ 10879 @Readable 10880 public static final String ASSIST_SCREENSHOT_ENABLED = "assist_screenshot_enabled"; 10881 10882 /** 10883 * Specifies whether the screen will show an animation if screen contents are sent to the 10884 * assist application (active voice interaction service). 10885 * 10886 * Note that the disclosure will be forced for third-party assistants or if the device 10887 * does not support disabling it. 10888 * 10889 * @hide 10890 */ 10891 @Readable 10892 public static final String ASSIST_DISCLOSURE_ENABLED = "assist_disclosure_enabled"; 10893 10894 /** 10895 * Control if rotation suggestions are sent to System UI when in rotation locked mode. 10896 * Done to enable screen rotation while the screen rotation is locked. Enabling will 10897 * poll the accelerometer in rotation locked mode. 10898 * 10899 * If 0, then rotation suggestions are not sent to System UI. If 1, suggestions are sent. 10900 * 10901 * @hide 10902 */ 10903 @Readable 10904 public static final String SHOW_ROTATION_SUGGESTIONS = "show_rotation_suggestions"; 10905 10906 /** 10907 * The disabled state of SHOW_ROTATION_SUGGESTIONS. 10908 * @hide 10909 */ 10910 public static final int SHOW_ROTATION_SUGGESTIONS_DISABLED = 0x0; 10911 10912 /** 10913 * The enabled state of SHOW_ROTATION_SUGGESTIONS. 10914 * @hide 10915 */ 10916 public static final int SHOW_ROTATION_SUGGESTIONS_ENABLED = 0x1; 10917 10918 /** 10919 * The default state of SHOW_ROTATION_SUGGESTIONS. 10920 * @hide 10921 */ 10922 public static final int SHOW_ROTATION_SUGGESTIONS_DEFAULT = 10923 SHOW_ROTATION_SUGGESTIONS_ENABLED; 10924 10925 /** 10926 * The number of accepted rotation suggestions. Used to determine if the user has been 10927 * introduced to rotation suggestions. 10928 * @hide 10929 */ 10930 @Readable 10931 public static final String NUM_ROTATION_SUGGESTIONS_ACCEPTED = 10932 "num_rotation_suggestions_accepted"; 10933 10934 /** 10935 * Read only list of the service components that the current user has explicitly allowed to 10936 * see and assist with all of the user's notifications. 10937 * 10938 * @deprecated Use 10939 * {@link NotificationManager#isNotificationAssistantAccessGranted(ComponentName)}. 10940 * @hide 10941 */ 10942 @Deprecated 10943 @Readable 10944 public static final String ENABLED_NOTIFICATION_ASSISTANT = 10945 "enabled_notification_assistant"; 10946 10947 /** 10948 * Read only list of the service components that the current user has explicitly allowed to 10949 * see all of the user's notifications, separated by ':'. 10950 * 10951 * @hide 10952 * @deprecated Use 10953 * {@link NotificationManager#isNotificationListenerAccessGranted(ComponentName)}. 10954 */ 10955 @Deprecated 10956 @UnsupportedAppUsage 10957 @Readable 10958 public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners"; 10959 10960 /** 10961 * Read only list of the packages that the current user has explicitly allowed to 10962 * manage do not disturb, separated by ':'. 10963 * 10964 * @deprecated Use {@link NotificationManager#isNotificationPolicyAccessGranted()}. 10965 * @hide 10966 */ 10967 @Deprecated 10968 @TestApi 10969 @Readable 10970 public static final String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES = 10971 "enabled_notification_policy_access_packages"; 10972 10973 /** 10974 * Defines whether managed profile ringtones should be synced from it's parent profile 10975 * <p> 10976 * 0 = ringtones are not synced 10977 * 1 = ringtones are synced from the profile's parent (default) 10978 * <p> 10979 * This value is only used for managed profiles. 10980 * @hide 10981 */ 10982 @TestApi 10983 @Readable 10984 @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) 10985 public static final String SYNC_PARENT_SOUNDS = "sync_parent_sounds"; 10986 10987 /** 10988 * @hide 10989 */ 10990 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10991 @TestApi 10992 @Readable 10993 public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations"; 10994 10995 /** 10996 * This is the query URI for finding a print service to install. 10997 * 10998 * @hide 10999 */ 11000 @Readable 11001 public static final String PRINT_SERVICE_SEARCH_URI = "print_service_search_uri"; 11002 11003 /** 11004 * This is the query URI for finding a NFC payment service to install. 11005 * 11006 * @hide 11007 */ 11008 @Readable 11009 public static final String PAYMENT_SERVICE_SEARCH_URI = "payment_service_search_uri"; 11010 11011 /** 11012 * This is the query URI for finding a auto fill service to install. 11013 * 11014 * @hide 11015 */ 11016 @Readable 11017 public static final String AUTOFILL_SERVICE_SEARCH_URI = "autofill_service_search_uri"; 11018 11019 /** 11020 * If enabled, apps should try to skip any introductory hints on first launch. This might 11021 * apply to users that are already familiar with the environment or temporary users. 11022 * <p> 11023 * Type : int (0 to show hints, 1 to skip showing hints) 11024 */ 11025 @Readable 11026 public static final String SKIP_FIRST_USE_HINTS = "skip_first_use_hints"; 11027 11028 /** 11029 * Persisted playback time after a user confirmation of an unsafe volume level. 11030 * 11031 * @hide 11032 */ 11033 @Readable 11034 public static final String UNSAFE_VOLUME_MUSIC_ACTIVE_MS = "unsafe_volume_music_active_ms"; 11035 11036 /** 11037 * Indicates whether the spatial audio feature was enabled for this user. 11038 * 11039 * Type : int (0 disabled, 1 enabled) 11040 * 11041 * @hide 11042 */ 11043 public static final String SPATIAL_AUDIO_ENABLED = "spatial_audio_enabled"; 11044 11045 /** 11046 * Internal collection of audio device inventory items 11047 * The device item stored are {@link com.android.server.audio.AdiDeviceState} 11048 * @hide 11049 */ 11050 public static final String AUDIO_DEVICE_INVENTORY = "audio_device_inventory"; 11051 11052 /** 11053 * Stores a boolean that defines whether the CSD as a feature is enabled or not. 11054 * @hide 11055 */ 11056 public static final String AUDIO_SAFE_CSD_AS_A_FEATURE_ENABLED = 11057 "audio_safe_csd_as_a_feature_enabled"; 11058 11059 /** 11060 * Indicates whether notification display on the lock screen is enabled. 11061 * <p> 11062 * Type: int (0 for false, 1 for true) 11063 * 11064 * @hide 11065 */ 11066 @SystemApi 11067 @Readable 11068 public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = 11069 "lock_screen_show_notifications"; 11070 11071 /** 11072 * Indicates whether the lock screen should display silent notifications. 11073 * <p> 11074 * Type: int (0 for false, 1 for true) 11075 * 11076 * @hide 11077 */ 11078 @Readable 11079 public static final String LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS = 11080 "lock_screen_show_silent_notifications"; 11081 11082 /** 11083 * Indicates whether "seen" notifications should be suppressed from the lockscreen. 11084 * <p> 11085 * Type: int (0 for unset_off, 1 for true, 2 for false) 11086 * 0 is the default value for phones, which is equivalent to off in effect, before 11087 * the notification minimalism feature, this setting is default hidden to phones, we use 11088 * 0 instead of 2 to mark that we need to hide this setting toggle in the Settings app. 11089 * 11090 * @hide 11091 */ 11092 public static final String LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS = 11093 "lock_screen_show_only_unseen_notifications"; 11094 11095 /** 11096 * Indicates whether to minimalize the number of notifications to show on the lockscreen. 11097 * <p> 11098 * Type: int (0 for false, 1 for true) 11099 * 11100 * @hide 11101 */ 11102 public static final String LOCK_SCREEN_NOTIFICATION_MINIMALISM = 11103 "lock_screen_notification_minimalism"; 11104 11105 /** 11106 * Indicates whether snooze options should be shown on notifications 11107 * <p> 11108 * Type: int (0 for false, 1 for true) 11109 * 11110 * @hide 11111 */ 11112 @Readable 11113 public static final String SHOW_NOTIFICATION_SNOOZE = "show_notification_snooze"; 11114 11115 /** 11116 * Controls whether dual shade is enabled. This splits notifications and quick settings to 11117 * have their own independently expandable/collapsible panels, appearing on either side of 11118 * the large screen (including unfolded device) or sharing a space on a narrow screen 11119 * (including a folded device). Both panels will now cover the screen only partially 11120 * (wrapping their content), so a running app or the lockscreen will remain visible in the 11121 * background. 11122 * <p> 11123 * Type: int (0 for false, 1 for true) 11124 * 11125 * @hide 11126 */ 11127 @android.provider.Settings.Readable 11128 public static final String DUAL_SHADE = "dual_shade"; 11129 11130 /** 11131 * 1 if it is allowed to remove the primary GAIA account. 0 by default. 11132 * @hide 11133 */ 11134 public static final String ALLOW_PRIMARY_GAIA_ACCOUNT_REMOVAL_FOR_TESTS = 11135 "allow_primary_gaia_account_removal_for_tests"; 11136 11137 /** 11138 * List of TV inputs that are currently hidden. This is a string 11139 * containing the IDs of all hidden TV inputs. Each ID is encoded by 11140 * {@link android.net.Uri#encode(String)} and separated by ':'. 11141 * @hide 11142 */ 11143 @Readable 11144 public static final String TV_INPUT_HIDDEN_INPUTS = "tv_input_hidden_inputs"; 11145 11146 /** 11147 * List of custom TV input labels. This is a string containing <TV input id, custom name> 11148 * pairs. TV input id and custom name are encoded by {@link android.net.Uri#encode(String)} 11149 * and separated by ','. Each pair is separated by ':'. 11150 * @hide 11151 */ 11152 @Readable 11153 public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels"; 11154 11155 /** 11156 * Whether TV app uses non-system inputs. 11157 * 11158 * <p> 11159 * The value is boolean (1 or 0), where 1 means non-system TV inputs are allowed, 11160 * and 0 means non-system TV inputs are not allowed. 11161 * 11162 * <p> 11163 * Devices such as sound bars may have changed the system property allow_third_party_inputs 11164 * to false so the TV Application only uses HDMI and other built in inputs. This setting 11165 * allows user to override the default and have the TV Application use third party TV inputs 11166 * available on play store. 11167 * 11168 * @hide 11169 */ 11170 @Readable 11171 public static final String TV_APP_USES_NON_SYSTEM_INPUTS = "tv_app_uses_non_system_inputs"; 11172 11173 /** 11174 * Whether automatic routing of system audio to USB audio peripheral is disabled. 11175 * The value is boolean (1 or 0), where 1 means automatic routing is disabled, 11176 * and 0 means automatic routing is enabled. 11177 * 11178 * @hide 11179 */ 11180 @Readable 11181 public static final String USB_AUDIO_AUTOMATIC_ROUTING_DISABLED = 11182 "usb_audio_automatic_routing_disabled"; 11183 11184 /** 11185 * The timeout in milliseconds before the device fully goes to sleep after 11186 * a period of inactivity. This value sets an upper bound on how long the device 11187 * will stay awake or dreaming without user activity. It should generally 11188 * be longer than {@link Settings.System#SCREEN_OFF_TIMEOUT} as otherwise the device 11189 * will sleep before it ever has a chance to dream. 11190 * <p> 11191 * Use -1 to disable this timeout. 11192 * </p> 11193 * 11194 * @hide 11195 */ 11196 @Readable 11197 public static final String SLEEP_TIMEOUT = "sleep_timeout"; 11198 11199 /** 11200 * The timeout in milliseconds before the device goes to sleep due to user inattentiveness, 11201 * even if the system is holding wakelocks. It should generally be longer than {@code 11202 * config_attentiveWarningDuration}, as otherwise the device will show the attentive 11203 * warning constantly. Small timeouts are discouraged, as they will cause the device to 11204 * go to sleep quickly after waking up. 11205 * <p> 11206 * Use -1 to disable this timeout. 11207 * </p> 11208 * 11209 * @hide 11210 */ 11211 @Readable 11212 public static final String ATTENTIVE_TIMEOUT = "attentive_timeout"; 11213 11214 /** 11215 * Controls whether double tap to wake is enabled. 11216 * @hide 11217 */ 11218 @Readable 11219 public static final String DOUBLE_TAP_TO_WAKE = "double_tap_to_wake"; 11220 11221 /** 11222 * Controls whether double tap to sleep is enabled. 11223 * @hide 11224 */ 11225 public static final String DOUBLE_TAP_TO_SLEEP = "double_tap_to_sleep"; 11226 11227 /** 11228 * The current assistant component. It could be a voice interaction service, 11229 * or an activity that handles ACTION_ASSIST, or empty which means using the default 11230 * handling. 11231 * 11232 * <p>This should be set indirectly by setting the {@link 11233 * android.app.role.RoleManager#ROLE_ASSISTANT assistant role}. 11234 * 11235 * @hide 11236 */ 11237 @UnsupportedAppUsage 11238 @Readable 11239 public static final String ASSISTANT = "assistant"; 11240 11241 /** 11242 * Whether the camera launch gesture should be disabled. 11243 * 11244 * @hide 11245 */ 11246 @Readable 11247 public static final String CAMERA_GESTURE_DISABLED = "camera_gesture_disabled"; 11248 11249 /** 11250 * Whether the emergency gesture should be enabled. 11251 * 11252 * @hide 11253 */ 11254 public static final String EMERGENCY_GESTURE_ENABLED = "emergency_gesture_enabled"; 11255 11256 /** 11257 * Whether the emergency gesture sound should be enabled. 11258 * 11259 * @hide 11260 */ 11261 public static final String EMERGENCY_GESTURE_SOUND_ENABLED = 11262 "emergency_gesture_sound_enabled"; 11263 11264 /** 11265 * Whether the emergency gesture UI is currently showing. 11266 * 11267 * @hide 11268 */ 11269 public static final String EMERGENCY_GESTURE_UI_SHOWING = "emergency_gesture_ui_showing"; 11270 11271 /** 11272 * The last time the emergency gesture UI was started. 11273 * 11274 * @hide 11275 */ 11276 public static final String EMERGENCY_GESTURE_UI_LAST_STARTED_MILLIS = 11277 "emergency_gesture_ui_last_started_millis"; 11278 11279 /** 11280 * Whether double tap the power button gesture is enabled. 11281 * 11282 * @hide 11283 */ 11284 @Readable 11285 public static final String DOUBLE_TAP_POWER_BUTTON_GESTURE_ENABLED = 11286 "double_tap_power_button_gesture_enabled"; 11287 11288 /** 11289 * Double tap power button gesture behavior. 11290 * 0 = Camera launch 11291 * 1 = Wallet launch 11292 * @hide 11293 */ 11294 @Readable 11295 public static final String DOUBLE_TAP_POWER_BUTTON_GESTURE = 11296 "double_tap_power_button_gesture"; 11297 11298 /** 11299 * Whether the camera launch gesture to double tap the power button when the screen is off 11300 * should be disabled. 11301 * 11302 * @hide 11303 */ 11304 @Readable 11305 public static final String CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED = 11306 "camera_double_tap_power_gesture_disabled"; 11307 11308 /** 11309 * Whether the camera double twist gesture to flip between front and back mode should be 11310 * enabled. 11311 * 11312 * @hide 11313 */ 11314 @Readable 11315 public static final String CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED = 11316 "camera_double_twist_to_flip_enabled"; 11317 11318 /** 11319 * Whether or not the smart camera lift trigger that launches the camera when the user moves 11320 * the phone into a position for taking photos should be enabled. 11321 * 11322 * @hide 11323 */ 11324 @Readable 11325 public static final String CAMERA_LIFT_TRIGGER_ENABLED = "camera_lift_trigger_enabled"; 11326 11327 /** 11328 * The default enable state of the camera lift trigger. 11329 * 11330 * @hide 11331 */ 11332 public static final int CAMERA_LIFT_TRIGGER_ENABLED_DEFAULT = 1; 11333 11334 /** 11335 * Whether or not the flashlight (camera torch mode) is available required to turn 11336 * on flashlight. 11337 * 11338 * @hide 11339 */ 11340 @Readable 11341 public static final String FLASHLIGHT_AVAILABLE = "flashlight_available"; 11342 11343 /** 11344 * Whether or not flashlight is enabled. 11345 * 11346 * @hide 11347 */ 11348 @Readable 11349 public static final String FLASHLIGHT_ENABLED = "flashlight_enabled"; 11350 11351 /** 11352 * Whether or not face unlock is allowed on Keyguard. 11353 * @hide 11354 */ 11355 @Readable 11356 public static final String FACE_UNLOCK_KEYGUARD_ENABLED = "face_unlock_keyguard_enabled"; 11357 11358 /** 11359 * Whether or not face unlock dismisses the keyguard. 11360 * @hide 11361 */ 11362 @Readable 11363 public static final String FACE_UNLOCK_DISMISSES_KEYGUARD = 11364 "face_unlock_dismisses_keyguard"; 11365 11366 /** 11367 * Whether or not media is shown automatically when bypassing as a heads up. 11368 * @hide 11369 */ 11370 @Readable 11371 public static final String SHOW_MEDIA_WHEN_BYPASSING = 11372 "show_media_when_bypassing"; 11373 11374 /** 11375 * Whether or not face unlock requires attention. This is a cached value, the source of 11376 * truth is obtained through the HAL. 11377 * @hide 11378 */ 11379 @Readable 11380 public static final String FACE_UNLOCK_ATTENTION_REQUIRED = 11381 "face_unlock_attention_required"; 11382 11383 /** 11384 * Whether or not face unlock requires a diverse set of poses during enrollment. This is a 11385 * cached value, the source of truth is obtained through the HAL. 11386 * @hide 11387 */ 11388 @Readable 11389 public static final String FACE_UNLOCK_DIVERSITY_REQUIRED = 11390 "face_unlock_diversity_required"; 11391 11392 11393 /** 11394 * Whether or not face unlock is allowed for apps (through BiometricPrompt). 11395 * @hide 11396 */ 11397 @Readable 11398 public static final String FACE_UNLOCK_APP_ENABLED = "face_unlock_app_enabled"; 11399 11400 /** 11401 * Whether or not face unlock always requires user confirmation, meaning {@link 11402 * android.hardware.biometrics.BiometricPrompt.Builder#setConfirmationRequired(boolean)} 11403 * is always 'true'. This overrides the behavior that apps choose in the 11404 * setConfirmationRequired API. 11405 * @hide 11406 */ 11407 @Readable 11408 public static final String FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION = 11409 "face_unlock_always_require_confirmation"; 11410 11411 /** 11412 * Whether or not a user should re enroll their face. 11413 * 11414 * Face unlock re enroll. 11415 * 0 = No re enrollment. 11416 * 1 = Re enrollment is required. 11417 * 11418 * @hide 11419 */ 11420 @Readable 11421 public static final String FACE_UNLOCK_RE_ENROLL = "face_unlock_re_enroll"; 11422 11423 /** 11424 * The time (in millis) to wait for a power button before sending a 11425 * successful auth in to keyguard(for side fingerprint) 11426 * @hide 11427 */ 11428 @Readable 11429 public static final String FINGERPRINT_SIDE_FPS_KG_POWER_WINDOW = 11430 "fingerprint_side_fps_kg_power_window"; 11431 11432 /** 11433 * The time (in millis) to wait for a power button before sending 11434 * a successful auth in biometric prompt(for side fingerprint) 11435 * @hide 11436 */ 11437 @Readable 11438 public static final String FINGERPRINT_SIDE_FPS_BP_POWER_WINDOW = 11439 "fingerprint_side_fps_bp_power_window"; 11440 11441 /** 11442 * The time (in millis) that a finger tap will wait for a power button 11443 * before dismissing the power dialog during enrollment(for side 11444 * fingerprint) 11445 * @hide 11446 */ 11447 @Readable 11448 public static final String FINGERPRINT_SIDE_FPS_ENROLL_TAP_WINDOW = 11449 "fingerprint_side_fps_enroll_tap_window"; 11450 11451 /** 11452 * The time (in millis) that a power event will ignore future authentications 11453 * (for side fingerprint) 11454 * @hide 11455 */ 11456 @Readable 11457 public static final String FINGERPRINT_SIDE_FPS_AUTH_DOWNTIME = 11458 "fingerprint_side_fps_auth_downtime"; 11459 11460 /** 11461 * Whether or not a SFPS device is enabling the performant auth setting. 11462 * The "_V2" suffix was added to re-introduce the default behavior for 11463 * users. See b/265264294 fore more details. 11464 * @hide 11465 */ 11466 public static final String SFPS_PERFORMANT_AUTH_ENABLED = "sfps_performant_auth_enabled_v2"; 11467 11468 /** 11469 * Whether or not the UDFPS device is enabling the screen off unlock settings. 11470 * @hide 11471 */ 11472 public static final String SCREEN_OFF_UNLOCK_UDFPS_ENABLED = "screen_off_udfps_enabled"; 11473 11474 /** 11475 * Whether or not debugging is enabled. 11476 * @hide 11477 */ 11478 @Readable 11479 public static final String BIOMETRIC_DEBUG_ENABLED = 11480 "biometric_debug_enabled"; 11481 11482 /** 11483 * Whether or not both fingerprint and face virtual sensors are enabled. 11484 * @hide 11485 */ 11486 @TestApi 11487 @Readable 11488 public static final String BIOMETRIC_VIRTUAL_ENABLED = "biometric_virtual_enabled"; 11489 11490 /** 11491 * Whether or not fingerprint virtual sensors are enabled. 11492 * @hide 11493 */ 11494 @FlaggedApi("com.android.server.biometrics.face_vhal_feature") 11495 public static final String BIOMETRIC_FINGERPRINT_VIRTUAL_ENABLED = 11496 "biometric_fingerprint_virtual_enabled"; 11497 11498 /** 11499 * Whether or not face virtual sensors are enabled. 11500 * @hide 11501 */ 11502 @FlaggedApi("com.android.server.biometrics.face_vhal_feature") 11503 public static final String BIOMETRIC_FACE_VIRTUAL_ENABLED = 11504 "biometric_face_virtual_enabled"; 11505 11506 /** 11507 * Whether or not biometric is allowed on Keyguard. 11508 * 11509 * @deprecated Use {@link #FINGERPRINT_KEYGUARD_ENABLED} or {@link #FACE_KEYGUARD_ENABLED} 11510 * instead. 11511 * 11512 * @hide 11513 */ 11514 @Deprecated 11515 @Readable 11516 public static final String BIOMETRIC_KEYGUARD_ENABLED = "biometric_keyguard_enabled"; 11517 11518 /** 11519 * Whether or not biometric is allowed for apps (through BiometricPrompt). 11520 * 11521 * @deprecated Use {@link #FINGERPRINT_APP_ENABLED} or {@link #FACE_APP_ENABLED} instead. 11522 * 11523 * @hide 11524 */ 11525 @Deprecated 11526 @Readable 11527 public static final String BIOMETRIC_APP_ENABLED = "biometric_app_enabled"; 11528 11529 /** 11530 * Whether or not fingerprint is allowed on Keyguard. 11531 * @hide 11532 */ 11533 @Readable 11534 public static final String FINGERPRINT_KEYGUARD_ENABLED = "fingerprint_keyguard_enabled"; 11535 11536 /** 11537 * Whether or not fingerprint is allowed for apps (through BiometricPrompt). 11538 * @hide 11539 */ 11540 @Readable 11541 public static final String FINGERPRINT_APP_ENABLED = "fingerptint_app_enabled"; 11542 11543 /** 11544 * Whether or not face is allowed on Keyguard. 11545 * @hide 11546 */ 11547 @Readable 11548 public static final String FACE_KEYGUARD_ENABLED = "face_keyguard_enabled"; 11549 11550 /** 11551 * Whether or not face is allowed for apps (through BiometricPrompt). 11552 * @hide 11553 */ 11554 @Readable 11555 public static final String FACE_APP_ENABLED = "face_app_enabled"; 11556 11557 /** 11558 * Whether or not mandatory biometrics is enabled. 11559 * @hide 11560 */ 11561 public static final String MANDATORY_BIOMETRICS = "mandatory_biometrics"; 11562 11563 /** 11564 * Whether or not requirements for mandatory biometrics is satisfied. 11565 * @hide 11566 */ 11567 public static final String MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED = 11568 "mandatory_biometrics_requirements_satisfied"; 11569 11570 /** 11571 * Whether or not active unlock triggers on wake. 11572 * @hide 11573 */ 11574 public static final String ACTIVE_UNLOCK_ON_WAKE = "active_unlock_on_wake"; 11575 11576 /** 11577 * Whether or not active unlock triggers on unlock intent. 11578 * @hide 11579 */ 11580 public static final String ACTIVE_UNLOCK_ON_UNLOCK_INTENT = 11581 "active_unlock_on_unlock_intent"; 11582 11583 /** 11584 * Whether or not active unlock triggers on biometric failure. 11585 * @hide 11586 */ 11587 public static final String ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL = 11588 "active_unlock_on_biometric_fail"; 11589 11590 /** 11591 * Whether or not active unlock triggers on legacy unlock intents. 11592 * @hide 11593 */ 11594 public static final String ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY = 11595 "active_unlock_on_unlock_intent_legacy"; 11596 11597 /** 11598 * If active unlock triggers on biometric failures, include the following error codes 11599 * as a biometric failure. See {@link android.hardware.biometrics.BiometricFaceConstants}. 11600 * Error codes should be separated by a pipe. For example: "1|4|5". If active unlock 11601 * should never trigger on any face errors, this should be set to an empty string. 11602 * A null value will use the system default value (TIMEOUT). 11603 * @hide 11604 */ 11605 public static final String ACTIVE_UNLOCK_ON_FACE_ERRORS = 11606 "active_unlock_on_face_errors"; 11607 11608 /** 11609 * If active unlock triggers on biometric failures, include the following acquired info 11610 * as a "biometric failure". See {@link android.hardware.biometrics.BiometricFaceConstants}. 11611 * Acquired codes should be separated by a pipe. For example: "1|4|5". If active unlock 11612 * should never on trigger on any acquired info messages, this should be 11613 * set to an empty string. A null value will use the system default value (none). 11614 * @hide 11615 */ 11616 public static final String ACTIVE_UNLOCK_ON_FACE_ACQUIRE_INFO = 11617 "active_unlock_on_face_acquire_info"; 11618 11619 /** 11620 * If active unlock triggers on biometric failures, then also request active unlock on 11621 * unlock intent when each setting (BiometricType) is the only biometric type enrolled. 11622 * Biometric types should be separated by a pipe. For example: "0|3" or "0". If this 11623 * setting should be disabled, then this should be set to an empty string. A null value 11624 * will use the system default value (0 / None). 11625 * 0 = None, 1 = Any face, 2 = Any fingerprint, 3 = Under display fingerprint 11626 * @hide 11627 */ 11628 public static final String ACTIVE_UNLOCK_ON_UNLOCK_INTENT_WHEN_BIOMETRIC_ENROLLED = 11629 "active_unlock_on_unlock_intent_when_biometric_enrolled"; 11630 11631 /** 11632 * If active unlock triggers on unlock intents, then also request active unlock on 11633 * these wake-up reasons. See {@link PowerManager.WakeReason} for value mappings. 11634 * WakeReasons should be separated by a pipe. For example: "0|3" or "0". If this 11635 * setting should be disabled, then this should be set to an empty string. A null value 11636 * will use the system default value (WAKE_REASON_UNFOLD_DEVICE). 11637 * @hide 11638 */ 11639 public static final String ACTIVE_UNLOCK_WAKEUPS_CONSIDERED_UNLOCK_INTENTS = 11640 "active_unlock_wakeups_considered_unlock_intents"; 11641 11642 /** 11643 * If active unlock triggers and succeeds on these wakeups, force dismiss keyguard on 11644 * these wake reasons. See {@link PowerManager#WakeReason} for value mappings. 11645 * WakeReasons should be separated by a pipe. For example: "0|3" or "0". If this 11646 * setting should be disabled, then this should be set to an empty string. A null value 11647 * will use the system default value (WAKE_REASON_UNFOLD_DEVICE). 11648 * @hide 11649 */ 11650 public static final String ACTIVE_UNLOCK_WAKEUPS_TO_FORCE_DISMISS_KEYGUARD = 11651 "active_unlock_wakeups_to_force_dismiss_keyguard"; 11652 11653 /** 11654 * Whether the assist gesture should be enabled. 11655 * 11656 * @hide 11657 */ 11658 @Readable 11659 public static final String ASSIST_GESTURE_ENABLED = "assist_gesture_enabled"; 11660 11661 /** 11662 * Sensitivity control for the assist gesture. 11663 * 11664 * @hide 11665 */ 11666 @Readable 11667 public static final String ASSIST_GESTURE_SENSITIVITY = "assist_gesture_sensitivity"; 11668 11669 /** 11670 * Whether the assist gesture should silence alerts. 11671 * 11672 * @hide 11673 */ 11674 @Readable 11675 public static final String ASSIST_GESTURE_SILENCE_ALERTS_ENABLED = 11676 "assist_gesture_silence_alerts_enabled"; 11677 11678 /** 11679 * Whether the assist gesture should wake the phone. 11680 * 11681 * @hide 11682 */ 11683 @Readable 11684 public static final String ASSIST_GESTURE_WAKE_ENABLED = 11685 "assist_gesture_wake_enabled"; 11686 11687 /** 11688 * Indicates whether the Assist Gesture Deferred Setup has been completed. 11689 * <p> 11690 * Type: int (0 for false, 1 for true) 11691 * 11692 * @hide 11693 */ 11694 @SystemApi 11695 @Readable 11696 public static final String ASSIST_GESTURE_SETUP_COMPLETE = "assist_gesture_setup_complete"; 11697 11698 /** 11699 * Whether the assistant can be triggered by a touch gesture. 11700 * 11701 * @hide 11702 */ 11703 public static final String ASSIST_TOUCH_GESTURE_ENABLED = 11704 "assist_touch_gesture_enabled"; 11705 11706 /** 11707 * Whether the assistant can be triggered by long-pressing the home button 11708 * 11709 * @hide 11710 */ 11711 public static final String ASSIST_LONG_PRESS_HOME_ENABLED = 11712 "assist_long_press_home_enabled"; 11713 11714 /** 11715 * Whether all entrypoints (e.g. long-press home, long-press nav handle) 11716 * can trigger contextual search. 11717 * 11718 * @hide 11719 */ 11720 public static final String SEARCH_ALL_ENTRYPOINTS_ENABLED = 11721 "search_all_entrypoints_enabled"; 11722 11723 /** 11724 * Whether or not the accessibility data streaming is enbled for the 11725 * {@link VisualQueryDetectedResult#setAccessibilityDetectionData}. 11726 * @hide 11727 */ 11728 public static final String VISUAL_QUERY_ACCESSIBILITY_DETECTION_ENABLED = 11729 "visual_query_accessibility_detection_enabled"; 11730 11731 /** 11732 * Timeout to be used for unbinding to the configured remote 11733 * {@link android.service.ondeviceintelligence.OnDeviceIntelligenceService} if there are no 11734 * requests in the queue. A value of -1 represents to never unbind. 11735 * 11736 * @hide 11737 */ 11738 public static final String ON_DEVICE_INTELLIGENCE_UNBIND_TIMEOUT_MS = 11739 "on_device_intelligence_unbind_timeout_ms"; 11740 11741 11742 /** 11743 * Timeout that represents maximum idle time before which a callback should be populated. 11744 * 11745 * @hide 11746 */ 11747 public static final String ON_DEVICE_INTELLIGENCE_IDLE_TIMEOUT_MS = 11748 "on_device_intelligence_idle_timeout_ms"; 11749 11750 /** 11751 * Timeout to be used for unbinding to the configured remote 11752 * {@link android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService} if there 11753 * are no requests in the queue. A value of -1 represents to never unbind. 11754 * 11755 * @hide 11756 */ 11757 public static final String ON_DEVICE_INFERENCE_UNBIND_TIMEOUT_MS = 11758 "on_device_inference_unbind_timeout_ms"; 11759 11760 /** 11761 * Control whether Night display is currently activated. 11762 * @hide 11763 */ 11764 @Readable 11765 public static final String NIGHT_DISPLAY_ACTIVATED = "night_display_activated"; 11766 11767 /** 11768 * Control whether Night display will automatically activate/deactivate. 11769 * @hide 11770 */ 11771 @Readable 11772 public static final String NIGHT_DISPLAY_AUTO_MODE = "night_display_auto_mode"; 11773 11774 /** 11775 * Control the color temperature of Night Display, represented in Kelvin. 11776 * @hide 11777 */ 11778 @Readable 11779 public static final String NIGHT_DISPLAY_COLOR_TEMPERATURE = 11780 "night_display_color_temperature"; 11781 11782 /** 11783 * Custom time when Night display is scheduled to activate. 11784 * Represented as milliseconds from midnight (e.g. 79200000 == 10pm). 11785 * @hide 11786 */ 11787 @Readable 11788 public static final String NIGHT_DISPLAY_CUSTOM_START_TIME = 11789 "night_display_custom_start_time"; 11790 11791 /** 11792 * Custom time when Night display is scheduled to deactivate. 11793 * Represented as milliseconds from midnight (e.g. 21600000 == 6am). 11794 * @hide 11795 */ 11796 @Readable 11797 public static final String NIGHT_DISPLAY_CUSTOM_END_TIME = "night_display_custom_end_time"; 11798 11799 /** 11800 * A String representing the LocalDateTime when Night display was last activated. Use to 11801 * decide whether to apply the current activated state after a reboot or user change. In 11802 * legacy cases, this is represented by the time in milliseconds (since epoch). 11803 * @hide 11804 */ 11805 @Readable 11806 public static final String NIGHT_DISPLAY_LAST_ACTIVATED_TIME = 11807 "night_display_last_activated_time"; 11808 11809 /** 11810 * Control whether display white balance is currently enabled. 11811 * @hide 11812 */ 11813 @Readable 11814 public static final String DISPLAY_WHITE_BALANCE_ENABLED = "display_white_balance_enabled"; 11815 11816 /** 11817 * Used by DisplayManager to backup/restore the user-selected resolution mode. 11818 * @hide 11819 */ 11820 @Readable 11821 public static final String SCREEN_RESOLUTION_MODE = "screen_resolution_mode"; 11822 11823 /** 11824 * Resolution Mode Constants for SCREEN_RESOLUTION_MODE setting. 11825 * 11826 * @hide 11827 */ 11828 @IntDef(prefix = { "RESOLUTION_MODE_" }, value = { 11829 RESOLUTION_MODE_UNKNOWN, 11830 RESOLUTION_MODE_HIGH, 11831 RESOLUTION_MODE_FULL 11832 }) 11833 @Retention(RetentionPolicy.SOURCE) 11834 public @interface ResolutionMode {} 11835 /** @hide */ 11836 public static final int RESOLUTION_MODE_UNKNOWN = 0; 11837 /** @hide */ 11838 public static final int RESOLUTION_MODE_HIGH = 1; 11839 /** @hide */ 11840 public static final int RESOLUTION_MODE_FULL = 2; 11841 11842 /** 11843 * Names of the service components that the current user has explicitly allowed to 11844 * be a VR mode listener, separated by ':'. 11845 * 11846 * @hide 11847 */ 11848 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 11849 @TestApi 11850 @Readable 11851 public static final String ENABLED_VR_LISTENERS = "enabled_vr_listeners"; 11852 11853 /** 11854 * Behavior of the display while in VR mode. 11855 * 11856 * One of {@link #VR_DISPLAY_MODE_LOW_PERSISTENCE} or {@link #VR_DISPLAY_MODE_OFF}. 11857 * 11858 * @hide 11859 */ 11860 @Readable 11861 public static final String VR_DISPLAY_MODE = "vr_display_mode"; 11862 11863 /** 11864 * Lower the display persistence while the system is in VR mode. 11865 * 11866 * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE 11867 * 11868 * @hide. 11869 */ 11870 public static final int VR_DISPLAY_MODE_LOW_PERSISTENCE = 0; 11871 11872 /** 11873 * Do not alter the display persistence while the system is in VR mode. 11874 * 11875 * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE 11876 * 11877 * @hide. 11878 */ 11879 public static final int VR_DISPLAY_MODE_OFF = 1; 11880 11881 /** 11882 * The latest SDK version that CarrierAppUtils#disableCarrierAppsUntilPrivileged has been 11883 * executed for. 11884 * 11885 * <p>This is used to ensure that we only take one pass which will disable apps that are not 11886 * privileged (if any). From then on, we only want to enable apps (when a matching SIM is 11887 * inserted), to avoid disabling an app that the user might actively be using. 11888 * 11889 * <p>Will be set to {@link android.os.Build.VERSION#SDK_INT} once executed. Note that older 11890 * SDK versions prior to R set 1 for this value. 11891 * 11892 * @hide 11893 */ 11894 @Readable 11895 public static final String CARRIER_APPS_HANDLED = "carrier_apps_handled"; 11896 11897 /** 11898 * Whether parent user can access remote contact in managed profile. 11899 * 11900 * @hide 11901 */ 11902 @Readable 11903 public static final String MANAGED_PROFILE_CONTACT_REMOTE_SEARCH = 11904 "managed_profile_contact_remote_search"; 11905 11906 /** 11907 * Whether parent profile can access remote calendar data in managed profile. 11908 * 11909 * @hide 11910 */ 11911 @Readable 11912 public static final String CROSS_PROFILE_CALENDAR_ENABLED = 11913 "cross_profile_calendar_enabled"; 11914 11915 /** 11916 * Whether or not the automatic storage manager is enabled and should run on the device. 11917 * 11918 * @hide 11919 */ 11920 @Readable 11921 public static final String AUTOMATIC_STORAGE_MANAGER_ENABLED = 11922 "automatic_storage_manager_enabled"; 11923 11924 /** 11925 * How many days of information for the automatic storage manager to retain on the device. 11926 * 11927 * @hide 11928 */ 11929 @Readable 11930 public static final String AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN = 11931 "automatic_storage_manager_days_to_retain"; 11932 11933 /** 11934 * Default number of days of information for the automatic storage manager to retain. 11935 * 11936 * @hide 11937 */ 11938 public static final int AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN_DEFAULT = 90; 11939 11940 /** 11941 * How many bytes the automatic storage manager has cleared out. 11942 * 11943 * @hide 11944 */ 11945 @Readable 11946 public static final String AUTOMATIC_STORAGE_MANAGER_BYTES_CLEARED = 11947 "automatic_storage_manager_bytes_cleared"; 11948 11949 /** 11950 * Last run time for the automatic storage manager. 11951 * 11952 * @hide 11953 */ 11954 @Readable 11955 public static final String AUTOMATIC_STORAGE_MANAGER_LAST_RUN = 11956 "automatic_storage_manager_last_run"; 11957 /** 11958 * If the automatic storage manager has been disabled by policy. Note that this doesn't 11959 * mean that the automatic storage manager is prevented from being re-enabled -- this only 11960 * means that it was turned off by policy at least once. 11961 * 11962 * @hide 11963 */ 11964 @Readable 11965 public static final String AUTOMATIC_STORAGE_MANAGER_TURNED_OFF_BY_POLICY = 11966 "automatic_storage_manager_turned_off_by_policy"; 11967 11968 /** 11969 * Whether SystemUI navigation keys is enabled. 11970 * @hide 11971 */ 11972 @Readable 11973 public static final String SYSTEM_NAVIGATION_KEYS_ENABLED = 11974 "system_navigation_keys_enabled"; 11975 11976 /** 11977 * Holds comma separated list of ordering of QS tiles. 11978 * 11979 * @hide 11980 */ 11981 @Readable(maxTargetSdk = VERSION_CODES.TIRAMISU) 11982 public static final String QS_TILES = "sysui_qs_tiles"; 11983 11984 /** 11985 * Whether this user has enabled Quick controls. 11986 * 11987 * 0 indicates disabled and 1 indicates enabled. A non existent value should be treated as 11988 * enabled. 11989 * 11990 * @deprecated Controls are migrated to Quick Settings, rendering this unnecessary and will 11991 * be removed in a future release. 11992 * @hide 11993 */ 11994 @Readable 11995 @Deprecated 11996 public static final String CONTROLS_ENABLED = "controls_enabled"; 11997 11998 /** 11999 * Whether power menu content (cards, passes, controls) will be shown when device is locked. 12000 * 12001 * 0 indicates hide and 1 indicates show. A non existent value will be treated as hide. 12002 * @hide 12003 */ 12004 @TestApi 12005 @Readable 12006 public static final String POWER_MENU_LOCKED_SHOW_CONTENT = 12007 "power_menu_locked_show_content"; 12008 12009 /** 12010 * Whether home controls should be accessible from the lockscreen 12011 * 12012 * @hide 12013 */ 12014 public static final String LOCKSCREEN_SHOW_CONTROLS = "lockscreen_show_controls"; 12015 12016 /** 12017 * Whether trivial home controls can be used without authentication 12018 * 12019 * @hide 12020 */ 12021 public static final String LOCKSCREEN_ALLOW_TRIVIAL_CONTROLS = 12022 "lockscreen_allow_trivial_controls"; 12023 12024 /** 12025 * Whether wallet should be accessible from the lockscreen 12026 * 12027 * @hide 12028 */ 12029 public static final String LOCKSCREEN_SHOW_WALLET = "lockscreen_show_wallet"; 12030 12031 /** 12032 * Whether to use the lockscreen double-line clock 12033 * 12034 * @hide 12035 */ 12036 public static final String LOCKSCREEN_USE_DOUBLE_LINE_CLOCK = 12037 "lockscreen_use_double_line_clock"; 12038 12039 /** 12040 * Whether to show the vibrate icon in the Status Bar (default off) 12041 * 12042 * @hide 12043 */ 12044 public static final String STATUS_BAR_SHOW_VIBRATE_ICON = "status_bar_show_vibrate_icon"; 12045 12046 /** 12047 * Specifies whether the web action API is enabled. 12048 * 12049 * @hide 12050 */ 12051 @SystemApi 12052 @Readable 12053 public static final String INSTANT_APPS_ENABLED = "instant_apps_enabled"; 12054 12055 /** 12056 * Whether qr code scanner should be accessible from the lockscreen 12057 * 12058 * @hide 12059 */ 12060 public static final String LOCK_SCREEN_SHOW_QR_CODE_SCANNER = 12061 "lock_screen_show_qr_code_scanner"; 12062 12063 /** 12064 * Whether or not to enable qr code code scanner setting to enable/disable lockscreen 12065 * entry point. Any value apart from null means setting needs to be enabled 12066 * 12067 * @hide 12068 */ 12069 public static final String SHOW_QR_CODE_SCANNER_SETTING = 12070 "show_qr_code_scanner_setting"; 12071 12072 /** 12073 * Has this pairable device been paired or upgraded from a previously paired system. 12074 * @hide 12075 */ 12076 @Readable 12077 public static final String DEVICE_PAIRED = "device_paired"; 12078 12079 /** 12080 * Specifies additional package name for broadcasting the CMAS messages. 12081 * @hide 12082 */ 12083 @Readable 12084 public static final String CMAS_ADDITIONAL_BROADCAST_PKG = "cmas_additional_broadcast_pkg"; 12085 12086 /** 12087 * Whether the launcher should show any notification badges. 12088 * The value is boolean (1 or 0). 12089 * @hide 12090 */ 12091 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 12092 @TestApi 12093 @Readable 12094 public static final String NOTIFICATION_BADGING = "notification_badging"; 12095 12096 /** 12097 * When enabled the system will maintain a rolling history of received notifications. When 12098 * disabled the history will be disabled and deleted. 12099 * 12100 * The value 1 - enable, 0 - disable 12101 * @hide 12102 */ 12103 @Readable 12104 public static final String NOTIFICATION_HISTORY_ENABLED = "notification_history_enabled"; 12105 12106 /** 12107 * When enabled conversations marked as favorites will be set to bubble. 12108 * 12109 * The value 1 - enable, 0 - disable 12110 * @hide 12111 */ 12112 @Readable 12113 public static final String BUBBLE_IMPORTANT_CONVERSATIONS 12114 = "bubble_important_conversations"; 12115 12116 /** 12117 * When enabled, notifications able to bubble will display an affordance allowing the user 12118 * to bubble them. 12119 * The value is boolean (1 to enable or 0 to disable). 12120 * 12121 * @hide 12122 */ 12123 @TestApi 12124 @SuppressLint("NoSettingsProvider") 12125 @Readable 12126 public static final String NOTIFICATION_BUBBLES = "notification_bubbles"; 12127 12128 /** 12129 * Whether notifications are dismissed by a right-to-left swipe (instead of a left-to-right 12130 * swipe). 12131 * 12132 * @hide 12133 */ 12134 @Readable 12135 public static final String NOTIFICATION_DISMISS_RTL = "notification_dismiss_rtl"; 12136 12137 /** 12138 * Comma separated list of QS tiles that have been auto-added already. 12139 * @hide 12140 */ 12141 @Readable 12142 public static final String QS_AUTO_ADDED_TILES = "qs_auto_tiles"; 12143 12144 /** 12145 * The duration of timeout, in milliseconds, to switch from a non-Dock User to the 12146 * Dock User when the device is docked. 12147 * @hide 12148 */ 12149 public static final String TIMEOUT_TO_DOCK_USER = "timeout_to_dock_user"; 12150 12151 /** 12152 * Backup manager behavioral parameters. 12153 * This is encoded as a key=value list, separated by commas. Ex: 12154 * 12155 * "key_value_backup_interval_milliseconds=14400000,key_value_backup_require_charging=true" 12156 * 12157 * The following keys are supported: 12158 * 12159 * <pre> 12160 * key_value_backup_interval_milliseconds (long) 12161 * key_value_backup_fuzz_milliseconds (long) 12162 * key_value_backup_require_charging (boolean) 12163 * key_value_backup_required_network_type (int) 12164 * full_backup_interval_milliseconds (long) 12165 * full_backup_require_charging (boolean) 12166 * full_backup_required_network_type (int) 12167 * backup_finished_notification_receivers (String[]) 12168 * </pre> 12169 * 12170 * backup_finished_notification_receivers uses ":" as delimeter for values. 12171 * 12172 * <p> 12173 * Type: string 12174 * @hide 12175 */ 12176 @Readable 12177 public static final String BACKUP_MANAGER_CONSTANTS = "backup_manager_constants"; 12178 12179 12180 /** 12181 * Local transport parameters so we can configure it for tests. 12182 * This is encoded as a key=value list, separated by commas. 12183 * 12184 * The following keys are supported: 12185 * 12186 * <pre> 12187 * fake_encryption_flag (boolean) 12188 * </pre> 12189 * 12190 * <p> 12191 * Type: string 12192 * @hide 12193 */ 12194 @Readable 12195 public static final String BACKUP_LOCAL_TRANSPORT_PARAMETERS = 12196 "backup_local_transport_parameters"; 12197 12198 /** 12199 * Flag to set if the system should predictively attempt to re-enable Bluetooth while 12200 * the user is driving. 12201 * @hide 12202 */ 12203 @Readable 12204 public static final String BLUETOOTH_ON_WHILE_DRIVING = "bluetooth_on_while_driving"; 12205 12206 /** 12207 * Volume dialog timeout in ms. 12208 * @hide 12209 */ 12210 public static final String VOLUME_DIALOG_DISMISS_TIMEOUT = "volume_dialog_dismiss_timeout"; 12211 12212 /** 12213 * What behavior should be invoked when the volume hush gesture is triggered 12214 * One of VOLUME_HUSH_OFF, VOLUME_HUSH_VIBRATE, VOLUME_HUSH_MUTE. 12215 * 12216 * @hide 12217 */ 12218 @SystemApi 12219 @Readable 12220 public static final String VOLUME_HUSH_GESTURE = "volume_hush_gesture"; 12221 12222 /** @hide */ 12223 @SystemApi 12224 public static final int VOLUME_HUSH_OFF = 0; 12225 /** @hide */ 12226 @SystemApi 12227 public static final int VOLUME_HUSH_VIBRATE = 1; 12228 /** @hide */ 12229 @SystemApi 12230 public static final int VOLUME_HUSH_MUTE = 2; 12231 12232 /** 12233 * The number of times (integer) the user has manually enabled battery saver. 12234 * @hide 12235 */ 12236 @Readable 12237 public static final String LOW_POWER_MANUAL_ACTIVATION_COUNT = 12238 "low_power_manual_activation_count"; 12239 12240 /** 12241 * Whether the "first time battery saver warning" dialog needs to be shown (0: default) 12242 * or not (1). 12243 * 12244 * @hide 12245 */ 12246 @Readable 12247 public static final String LOW_POWER_WARNING_ACKNOWLEDGED = 12248 "low_power_warning_acknowledged"; 12249 12250 /** 12251 * Whether the "first time extra battery saver warning" dialog needs to be shown 12252 * (0: default) or not (1). 12253 * 12254 * @hide 12255 */ 12256 public static final String EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED = 12257 "extra_low_power_warning_acknowledged"; 12258 12259 /** 12260 * Whether the emergency thermal alert would be disabled 12261 * (0: default) or not (1). 12262 * 12263 * @hide 12264 */ 12265 public static final String EMERGENCY_THERMAL_ALERT_DISABLED = 12266 "emergency_thermal_alert_disabled"; 12267 12268 /** 12269 * 0 (default) Auto battery saver suggestion has not been suppressed. 1) it has been 12270 * suppressed. 12271 * @hide 12272 */ 12273 @Readable 12274 public static final String SUPPRESS_AUTO_BATTERY_SAVER_SUGGESTION = 12275 "suppress_auto_battery_saver_suggestion"; 12276 12277 /** 12278 * List of packages, which data need to be unconditionally cleared before full restore. 12279 * Type: string 12280 * @hide 12281 */ 12282 @Readable 12283 public static final String PACKAGES_TO_CLEAR_DATA_BEFORE_FULL_RESTORE = 12284 "packages_to_clear_data_before_full_restore"; 12285 12286 /** 12287 * How often to check for location access. 12288 * @hide 12289 * 12290 * @deprecated This has been moved to DeviceConfig property 12291 * {@link LocationAccessCheck#PROPERTY_LOCATION_ACCESS_PERIODIC_INTERVAL_MILLIS} in a T 12292 * module update 12293 * 12294 * Before Android T set this property to control the interval for the check 12295 * On Android T set this and the DeviceConfig property 12296 * After Android T set the DeviceConfig property 12297 */ 12298 @SystemApi 12299 @Deprecated 12300 @Readable 12301 public static final String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS = 12302 "location_access_check_interval_millis"; 12303 12304 /** 12305 * Delay between granting location access and checking it. 12306 * @hide 12307 * 12308 * @deprecated This has been moved to DeviceConfig property 12309 * {@link LocationAccessCheck#PROPERTY_LOCATION_ACCESS_CHECK_DELAY_MILLIS} in a T module 12310 * update 12311 * 12312 * Before Android T set this property to control the delay for the check 12313 * On Android T set this and the DeviceConfig property 12314 * After Android T set the DeviceConfig property 12315 */ 12316 @SystemApi 12317 @Deprecated 12318 @Readable 12319 public static final String LOCATION_ACCESS_CHECK_DELAY_MILLIS = 12320 "location_access_check_delay_millis"; 12321 12322 /** 12323 * @deprecated This setting does not have any effect anymore 12324 * @hide 12325 */ 12326 @SystemApi 12327 @Deprecated 12328 @Readable 12329 public static final String LOCATION_PERMISSIONS_UPGRADE_TO_Q_MODE = 12330 "location_permissions_upgrade_to_q_mode"; 12331 12332 /** 12333 * Whether or not the system Auto Revoke feature is disabled. 12334 * @hide 12335 */ 12336 @SystemApi 12337 @Readable 12338 public static final String AUTO_REVOKE_DISABLED = "auto_revoke_disabled"; 12339 12340 /** 12341 * Map of android.theme.customization.* categories to the enabled overlay package for that 12342 * category, formatted as a serialized {@link org.json.JSONObject}. If there is no 12343 * corresponding package included for a category, then all overlay packages in that 12344 * category must be disabled. 12345 * 12346 * A few category keys have special meaning and are used for Material You theming. 12347 * 12348 * A {@code FabricatedOverlay} containing Material You tonal palettes will be generated 12349 * in case {@code android.theme.customization.system_palette} contains a 12350 * {@link android.annotation.ColorInt}. 12351 * 12352 * The strategy used for generating the tonal palettes can be defined with the 12353 * {@code android.theme.customization.theme_style} key, with one of the following options: 12354 * <ul> 12355 * <li> {@code TONAL_SPOT} is a mid vibrancy palette that uses an accent 3 analogous to 12356 * accent 1.</li> 12357 * <li> {@code VIBRANT} is a high vibrancy palette that harmoniously blends subtle shifts 12358 * between colors.</li> 12359 * <li> {@code EXPRESSIVE} is a high vibrancy palette that pairs unexpected and unique 12360 * accents colors together.</li> 12361 * <li> {@code SPRITZ} is a low vibrancy palette that creates a soft wash between 12362 * colors.</li> 12363 * <li> {@code RAINBOW} uses both chromatic accents and neutral surfaces to create a more 12364 * subtle color experience for users.</li> 12365 * <li> {@code FRUIT_SALAD} experiments with the concept of "two tone colors" to give 12366 * users more expression.</li> 12367 * </ul> 12368 * 12369 * Example of valid fabricated theme specification: 12370 * <pre> 12371 * { 12372 * "android.theme.customization.system_palette":"B1611C", 12373 * "android.theme.customization.theme_style":"EXPRESSIVE" 12374 * } 12375 * </pre> 12376 * @hide 12377 */ 12378 @SystemApi 12379 @Readable 12380 public static final String THEME_CUSTOMIZATION_OVERLAY_PACKAGES = 12381 "theme_customization_overlay_packages"; 12382 12383 /** 12384 * Indicates whether the nav bar is forced to always be visible, even in immersive mode. 12385 * <p>Type: int (0 for false, 1 for true) 12386 * 12387 * @hide 12388 */ 12389 public static final String NAV_BAR_FORCE_VISIBLE = "nav_bar_force_visible"; 12390 12391 /** 12392 * Indicates whether the device is in kids nav mode. 12393 * <p>Type: int (0 for false, 1 for true) 12394 * 12395 * @hide 12396 */ 12397 public static final String NAV_BAR_KIDS_MODE = "nav_bar_kids_mode"; 12398 12399 /** 12400 * Navigation bar mode. 12401 * 0 = 3 button 12402 * 1 = 2 button 12403 * 2 = fully gestural 12404 * @hide 12405 */ 12406 @Readable 12407 public static final String NAVIGATION_MODE = 12408 "navigation_mode"; 12409 12410 /** 12411 * The value is from another(source) device's {@link #NAVIGATION_MODE} during restore. 12412 * It's supposed to be written only by 12413 * {@link com.android.providers.settings.SettingsHelper}. 12414 * This setting should not be added into backup array. 12415 * <p>Value: -1 = Can't get value from restore(default), 12416 * 0 = 3 button, 12417 * 1 = 2 button, 12418 * 2 = fully gestural. 12419 * @hide 12420 */ 12421 public static final String NAVIGATION_MODE_RESTORE = "navigation_mode_restore"; 12422 12423 /** 12424 * Scale factor for the back gesture inset size on the left side of the screen. 12425 * @hide 12426 */ 12427 @Readable 12428 public static final String BACK_GESTURE_INSET_SCALE_LEFT = 12429 "back_gesture_inset_scale_left"; 12430 12431 /** 12432 * Scale factor for the back gesture inset size on the right side of the screen. 12433 * @hide 12434 */ 12435 @Readable 12436 public static final String BACK_GESTURE_INSET_SCALE_RIGHT = 12437 "back_gesture_inset_scale_right"; 12438 12439 /** 12440 * Current provider of proximity-based sharing services. 12441 * Default value in @string/config_defaultNearbySharingComponent. 12442 * No VALIDATOR as this setting will not be backed up. 12443 * @hide 12444 */ 12445 @Readable 12446 public static final String NEARBY_SHARING_COMPONENT = "nearby_sharing_component"; 12447 12448 /** 12449 * Nearby Sharing Slice URI for the SliceProvider to 12450 * read Nearby Sharing scan results and then draw the UI. 12451 * @hide 12452 */ 12453 public static final String NEARBY_SHARING_SLICE_URI = "nearby_sharing_slice_uri"; 12454 12455 /** 12456 * Current provider of Fast Pair saved devices page. 12457 * Default value in @string/config_defaultNearbyFastPairSettingsDevicesComponent. 12458 * No VALIDATOR as this setting will not be backed up. 12459 * @hide 12460 */ 12461 public static final String NEARBY_FAST_PAIR_SETTINGS_DEVICES_COMPONENT = 12462 "nearby_fast_pair_settings_devices_component"; 12463 12464 /** 12465 * Current provider of the component for requesting ambient context consent. 12466 * Default value in @string/config_defaultAmbientContextConsentComponent. 12467 * No VALIDATOR as this setting will not be backed up. 12468 * @hide 12469 */ 12470 public static final String AMBIENT_CONTEXT_CONSENT_COMPONENT = 12471 "ambient_context_consent_component"; 12472 12473 /** 12474 * Current provider of the intent extra key for the caller's package name while 12475 * requesting ambient context consent. 12476 * No VALIDATOR as this setting will not be backed up. 12477 * @hide 12478 */ 12479 public static final String AMBIENT_CONTEXT_PACKAGE_NAME_EXTRA_KEY = 12480 "ambient_context_package_name_key"; 12481 12482 /** 12483 * Current provider of the intent extra key for the event code int array while 12484 * requesting ambient context consent. 12485 * Default value in @string/config_ambientContextEventArrayExtraKey. 12486 * No VALIDATOR as this setting will not be backed up. 12487 * @hide 12488 */ 12489 public static final String AMBIENT_CONTEXT_EVENT_ARRAY_EXTRA_KEY = 12490 "ambient_context_event_array_key"; 12491 12492 /** 12493 * Controls whether aware is enabled. 12494 * @hide 12495 */ 12496 @Readable 12497 public static final String AWARE_ENABLED = "aware_enabled"; 12498 12499 /** 12500 * Controls whether aware_lock is enabled. 12501 * @hide 12502 */ 12503 @Readable 12504 public static final String AWARE_LOCK_ENABLED = "aware_lock_enabled"; 12505 12506 /** 12507 * Controls whether tap gesture is enabled. 12508 * @hide 12509 */ 12510 @Readable 12511 public static final String TAP_GESTURE = "tap_gesture"; 12512 12513 /** 12514 * Controls whether the people strip is enabled. 12515 * @hide 12516 */ 12517 @Readable 12518 public static final String PEOPLE_STRIP = "people_strip"; 12519 12520 /** 12521 * Whether or not to enable media resumption 12522 * When enabled, media controls in quick settings will populate on boot and persist if 12523 * resumable via a MediaBrowserService. 12524 * @see Settings.Global#SHOW_MEDIA_ON_QUICK_SETTINGS 12525 * @hide 12526 */ 12527 @Readable 12528 public static final String MEDIA_CONTROLS_RESUME = "qs_media_resumption"; 12529 12530 /** 12531 * Whether to enable media controls on lock screen. 12532 * When enabled, media controls will appear on lock screen. 12533 * @hide 12534 */ 12535 public static final String MEDIA_CONTROLS_LOCK_SCREEN = "media_controls_lock_screen"; 12536 12537 /** 12538 * Whether to enable camera extensions software fallback. 12539 * @hide 12540 */ 12541 @Readable 12542 public static final String CAMERA_EXTENSIONS_FALLBACK = "camera_extensions_fallback"; 12543 12544 /** 12545 * Controls magnification mode when magnification is enabled via a system-wide triple tap 12546 * gesture or the accessibility shortcut. 12547 * 12548 * @see #ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN 12549 * @see #ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW 12550 * @hide 12551 */ 12552 @TestApi 12553 @Readable 12554 public static final String ACCESSIBILITY_MAGNIFICATION_MODE = 12555 "accessibility_magnification_mode"; 12556 12557 /** 12558 * Magnification mode value that is a default value for the magnification logging feature. 12559 * @hide 12560 */ 12561 public static final int ACCESSIBILITY_MAGNIFICATION_MODE_NONE = 0x0; 12562 12563 /** 12564 * Magnification mode value that magnifies whole display. 12565 * @hide 12566 */ 12567 @TestApi 12568 public static final int ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN = 0x1; 12569 12570 /** 12571 * Magnification mode value that magnifies magnify particular region in a window 12572 * @hide 12573 */ 12574 @TestApi 12575 public static final int ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW = 0x2; 12576 12577 /** 12578 * Magnification mode value that is capable of magnifying whole display and particular 12579 * region in a window. 12580 * @hide 12581 */ 12582 @TestApi 12583 public static final int ACCESSIBILITY_MAGNIFICATION_MODE_ALL = 0x3; 12584 12585 /** 12586 * Whether the magnification always on feature is enabled. If true, the magnifier will not 12587 * deactivate on Activity transitions; it will only zoom out to 100%. 12588 * 12589 * @hide 12590 */ 12591 public static final String ACCESSIBILITY_MAGNIFICATION_ALWAYS_ON_ENABLED = 12592 "accessibility_magnification_always_on_enabled"; 12593 12594 /** 12595 * Controls how the magnification follows the cursor. 12596 * 12597 * @hide 12598 */ 12599 public static final String ACCESSIBILITY_MAGNIFICATION_CURSOR_FOLLOWING_MODE = 12600 "accessibility_magnification_cursor_following_mode"; 12601 12602 /** 12603 * Magnification cursor following mode value for the continuous mode. 12604 * 12605 * @hide 12606 */ 12607 public static final int ACCESSIBILITY_MAGNIFICATION_CURSOR_FOLLOWING_MODE_CONTINUOUS = 0; 12608 12609 /** 12610 * Magnification cursor following mode value for the center mode. 12611 * 12612 * @hide 12613 */ 12614 public static final int ACCESSIBILITY_MAGNIFICATION_CURSOR_FOLLOWING_MODE_CENTER = 1; 12615 12616 /** 12617 * Magnification cursor following mode value for the edge mode. 12618 * 12619 * @hide 12620 */ 12621 public static final int ACCESSIBILITY_MAGNIFICATION_CURSOR_FOLLOWING_MODE_EDGE = 2; 12622 12623 /** 12624 * Different cursor following settings that can be used as values with 12625 * {@link #ACCESSIBILITY_MAGNIFICATION_CURSOR_FOLLOWING_MODE}. 12626 * @hide 12627 */ 12628 @Retention(RetentionPolicy.SOURCE) 12629 @IntDef(prefix = { "ACCESSIBILITY_MAGNIFICATION_CURSOR_FOLLOWING_MODE_" }, 12630 value = { 12631 ACCESSIBILITY_MAGNIFICATION_CURSOR_FOLLOWING_MODE_CONTINUOUS, 12632 ACCESSIBILITY_MAGNIFICATION_CURSOR_FOLLOWING_MODE_CENTER, 12633 ACCESSIBILITY_MAGNIFICATION_CURSOR_FOLLOWING_MODE_EDGE}) 12634 public @interface AccessibilityMagnificationCursorFollowingMode {} 12635 12636 /** 12637 * Whether the following typing focus feature for magnification is enabled. 12638 * @hide 12639 */ 12640 public static final String ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED = 12641 "accessibility_magnification_follow_typing_enabled"; 12642 12643 /** 12644 * Whether the magnification joystick controller feature is enabled. 12645 * @hide 12646 */ 12647 public static final String ACCESSIBILITY_MAGNIFICATION_JOYSTICK_ENABLED = 12648 "accessibility_magnification_joystick_enabled"; 12649 12650 /** 12651 * Setting that specifies whether the display magnification is enabled via a system-wide 12652 * two fingers triple tap gesture. 12653 * 12654 * @hide 12655 */ 12656 public static final String ACCESSIBILITY_MAGNIFICATION_TWO_FINGER_TRIPLE_TAP_ENABLED = 12657 "accessibility_magnification_two_finger_triple_tap_enabled"; 12658 12659 /** 12660 * For pinch to zoom anywhere feature. 12661 * 12662 * If true, you should be able to pinch to magnify the window anywhere. 12663 * 12664 * @hide 12665 */ 12666 public static final String ACCESSIBILITY_PINCH_TO_ZOOM_ANYWHERE_ENABLED = 12667 "accessibility_pinch_to_zoom_anywhere_enabled"; 12668 12669 /** 12670 * For magnification feature where panning can be controlled with a single finger. 12671 * 12672 * If true, you can pan using a single finger gesture. 12673 * 12674 * @hide 12675 */ 12676 public static final String ACCESSIBILITY_SINGLE_FINGER_PANNING_ENABLED = 12677 "accessibility_single_finger_panning_enabled"; 12678 12679 /** 12680 * Controls magnification capability. Accessibility magnification is capable of at least one 12681 * of the magnification modes. 12682 * 12683 * @see #ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN 12684 * @see #ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW 12685 * @see #ACCESSIBILITY_MAGNIFICATION_MODE_ALL 12686 * @hide 12687 */ 12688 @TestApi 12689 @Readable 12690 public static final String ACCESSIBILITY_MAGNIFICATION_CAPABILITY = 12691 "accessibility_magnification_capability"; 12692 12693 /** 12694 * Whether to show the window magnification prompt dialog when the user uses full-screen 12695 * magnification first time after database is upgraded. 12696 * 12697 * @hide 12698 */ 12699 public static final String ACCESSIBILITY_SHOW_WINDOW_MAGNIFICATION_PROMPT = 12700 "accessibility_show_window_magnification_prompt"; 12701 12702 /** 12703 * Controls the accessibility button mode. System will force-set the value to {@link 12704 * #ACCESSIBILITY_BUTTON_MODE_GESTURE} if {@link #NAVIGATION_MODE} is button; force-set the 12705 * value to {@link ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR} if {@link #NAVIGATION_MODE} is 12706 * gestural; otherwise, remain the option. 12707 * <ul> 12708 * <li> 0 = button in navigation bar </li> 12709 * <li> 1 = button floating on the display </li> 12710 * <li> 2 = button using gesture to trigger </li> 12711 * </ul> 12712 * 12713 * @see #ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR 12714 * @see #ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU 12715 * @see #ACCESSIBILITY_BUTTON_MODE_GESTURE 12716 * @hide 12717 */ 12718 public static final String ACCESSIBILITY_BUTTON_MODE = 12719 "accessibility_button_mode"; 12720 12721 /** 12722 * Accessibility button mode value that specifying the accessibility service or feature to 12723 * be toggled via the button in the navigation bar. 12724 * 12725 * @hide 12726 */ 12727 public static final int ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR = 0x0; 12728 12729 /** 12730 * Accessibility button mode value that specifying the accessibility service or feature to 12731 * be toggled via the button floating on the display. 12732 * 12733 * @hide 12734 */ 12735 public static final int ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU = 0x1; 12736 12737 /** 12738 * Accessibility button mode value that specifying the accessibility service or feature to 12739 * be toggled via the gesture. 12740 * 12741 * @hide 12742 */ 12743 public static final int ACCESSIBILITY_BUTTON_MODE_GESTURE = 0x2; 12744 12745 /** 12746 * The size of the accessibility floating menu. 12747 * <ul> 12748 * <li> 0 = small size 12749 * <li> 1 = large size 12750 * </ul> 12751 * 12752 * @hide 12753 */ 12754 public static final String ACCESSIBILITY_FLOATING_MENU_SIZE = 12755 "accessibility_floating_menu_size"; 12756 12757 /** 12758 * The icon type of the accessibility floating menu. 12759 * <ul> 12760 * <li> 0 = full circle type 12761 * <li> 1 = half circle type 12762 * </ul> 12763 * 12764 * @hide 12765 */ 12766 public static final String ACCESSIBILITY_FLOATING_MENU_ICON_TYPE = 12767 "accessibility_floating_menu_icon_type"; 12768 12769 /** 12770 * Whether the fade effect for the accessibility floating menu is enabled. 12771 * 12772 * @hide 12773 */ 12774 public static final String ACCESSIBILITY_FLOATING_MENU_FADE_ENABLED = 12775 "accessibility_floating_menu_fade_enabled"; 12776 12777 /** 12778 * The opacity value for the accessibility floating menu fade out effect, from 0.0 12779 * (transparent) to 1.0 (opaque). 12780 * 12781 * @hide 12782 */ 12783 public static final String ACCESSIBILITY_FLOATING_MENU_OPACITY = 12784 "accessibility_floating_menu_opacity"; 12785 12786 /** 12787 * Prompts the user to the Accessibility button is replaced with the floating menu. 12788 * <ul> 12789 * <li> 0 = disabled </li> 12790 * <li> 1 = enabled </li> 12791 * </ul> 12792 * 12793 * @hide 12794 */ 12795 public static final String ACCESSIBILITY_FLOATING_MENU_MIGRATION_TOOLTIP_PROMPT = 12796 "accessibility_floating_menu_migration_tooltip_prompt"; 12797 12798 /** 12799 * For the force dark theme feature which inverts any apps that don't already support dark 12800 * theme. 12801 * 12802 * If true, it will automatically invert any app that is mainly light. 12803 * 12804 * This is related to the force dark override setting, however it will always force the apps 12805 * colors and will ignore any developer hints or opt-out APIs. 12806 * 12807 * @hide 12808 */ 12809 @Readable 12810 public static final String ACCESSIBILITY_FORCE_INVERT_COLOR_ENABLED = 12811 "accessibility_force_invert_color_enabled"; 12812 12813 /** 12814 * Whether to enable mouse keys for Physical Keyboard accessibility. 12815 * 12816 * If set to true, key presses (of the mouse keys) on 12817 * physical keyboard will control mouse pointer on the display. 12818 * 12819 * @hide 12820 */ 12821 @Readable 12822 public static final String ACCESSIBILITY_MOUSE_KEYS_ENABLED = 12823 "accessibility_mouse_keys_enabled"; 12824 12825 /** 12826 * Whether the Adaptive connectivity option is enabled. 12827 * 12828 * @hide 12829 */ 12830 public static final String ADAPTIVE_CONNECTIVITY_ENABLED = "adaptive_connectivity_enabled"; 12831 12832 /** 12833 * Whether the Adaptive wifi scorer switch is enabled. 12834 * 12835 * @hide 12836 */ 12837 public static final String ADAPTIVE_CONNECTIVITY_WIFI_ENABLED = 12838 "adaptive_connectivity_wifi_enabled"; 12839 12840 /** 12841 * Whether the Adaptive 5G PM switch is enabled. 12842 * 12843 * @hide 12844 */ 12845 public static final String ADAPTIVE_CONNECTIVITY_MOBILE_NETWORK_ENABLED = 12846 "adaptive_connectivity_mobile_network_enabled"; 12847 12848 /** 12849 * Controls the 'Sunlight boost' toggle in wearable devices (high brightness mode). 12850 * 12851 * Valid values for this key are: '0' (disabled) or '1' (enabled). 12852 * 12853 * @hide 12854 */ 12855 public static final String HBM_SETTING_KEY = 12856 "com.android.server.display.HBM_SETTING_KEY"; 12857 12858 /** 12859 * Keys we no longer back up under the current schema, but want to continue to 12860 * process when restoring historical backup datasets. 12861 * 12862 * All settings in {@link LEGACY_RESTORE_SETTINGS} array *must* have a non-null validator, 12863 * otherwise they won't be restored. 12864 * 12865 * @hide 12866 */ 12867 @Readable 12868 public static final String[] LEGACY_RESTORE_SETTINGS = { 12869 ENABLED_NOTIFICATION_LISTENERS, 12870 ENABLED_NOTIFICATION_ASSISTANT, 12871 ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES 12872 }; 12873 12874 /** 12875 * How long Assistant handles have enabled in milliseconds. 12876 * 12877 * @hide 12878 */ 12879 public static final String ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS = 12880 "reminder_exp_learning_time_elapsed"; 12881 12882 /** 12883 * How many times the Assistant has been triggered using the touch gesture. 12884 * 12885 * @hide 12886 */ 12887 public static final String ASSIST_HANDLES_LEARNING_EVENT_COUNT = 12888 "reminder_exp_learning_event_count"; 12889 12890 /** 12891 * Whether to show clipboard access notifications. 12892 * 12893 * @hide 12894 */ 12895 public static final String CLIPBOARD_SHOW_ACCESS_NOTIFICATIONS = 12896 "clipboard_show_access_notifications"; 12897 12898 /** 12899 * If nonzero, nas has not been updated to reflect new changes. 12900 * @hide 12901 */ 12902 @Readable 12903 public static final String NAS_SETTINGS_UPDATED = "nas_settings_updated"; 12904 12905 /** 12906 * Control whether Game Dashboard shortcut is always on for all games. 12907 * @hide 12908 */ 12909 @Readable 12910 public static final String GAME_DASHBOARD_ALWAYS_ON = "game_dashboard_always_on"; 12911 12912 12913 /** 12914 * For this device state, no specific auto-rotation lock setting should be applied. 12915 * If the user toggles the auto-rotate lock in this state, the setting will apply to the 12916 * previously valid device state. 12917 * @hide 12918 */ 12919 public static final int DEVICE_STATE_ROTATION_LOCK_IGNORED = 0; 12920 /** 12921 * For this device state, the setting for auto-rotation is locked. 12922 * @hide 12923 */ 12924 public static final int DEVICE_STATE_ROTATION_LOCK_LOCKED = 1; 12925 /** 12926 * For this device state, the setting for auto-rotation is unlocked. 12927 * @hide 12928 */ 12929 public static final int DEVICE_STATE_ROTATION_LOCK_UNLOCKED = 2; 12930 12931 /** 12932 * The different settings that can be used as values with 12933 * {@link #DEVICE_STATE_ROTATION_LOCK}. 12934 * @hide 12935 */ 12936 @IntDef(prefix = {"DEVICE_STATE_ROTATION_LOCK_"}, value = { 12937 DEVICE_STATE_ROTATION_LOCK_IGNORED, 12938 DEVICE_STATE_ROTATION_LOCK_LOCKED, 12939 DEVICE_STATE_ROTATION_LOCK_UNLOCKED, 12940 }) 12941 @Retention(RetentionPolicy.SOURCE) 12942 public @interface DeviceStateRotationLockSetting { 12943 } 12944 12945 /** @hide */ 12946 public static final int DEVICE_STATE_ROTATION_KEY_UNKNOWN = -1; 12947 /** @hide */ 12948 public static final int DEVICE_STATE_ROTATION_KEY_FOLDED = 0; 12949 /** @hide */ 12950 public static final int DEVICE_STATE_ROTATION_KEY_HALF_FOLDED = 1; 12951 /** @hide */ 12952 public static final int DEVICE_STATE_ROTATION_KEY_UNFOLDED = 2; 12953 /** @hide */ 12954 public static final int DEVICE_STATE_ROTATION_KEY_REAR_DISPLAY = 3; 12955 12956 /** 12957 * The different postures that can be used as keys with 12958 * {@link #DEVICE_STATE_ROTATION_LOCK}. 12959 * @hide 12960 */ 12961 @IntDef(prefix = {"DEVICE_STATE_ROTATION_KEY_"}, value = { 12962 DEVICE_STATE_ROTATION_KEY_UNKNOWN, 12963 DEVICE_STATE_ROTATION_KEY_FOLDED, 12964 DEVICE_STATE_ROTATION_KEY_HALF_FOLDED, 12965 DEVICE_STATE_ROTATION_KEY_UNFOLDED, 12966 DEVICE_STATE_ROTATION_KEY_REAR_DISPLAY, 12967 }) 12968 @Retention(RetentionPolicy.SOURCE) 12969 public @interface DeviceStateRotationLockKey { 12970 } 12971 12972 /** 12973 * Rotation lock setting keyed on device state. 12974 * 12975 * This holds a serialized map using int keys that represent postures in 12976 * {@link DeviceStateRotationLockKey} and value of 12977 * {@link DeviceStateRotationLockSetting} representing the rotation lock setting for that 12978 * posture. 12979 * 12980 * Serialized as key0:value0:key1:value1:...:keyN:valueN. 12981 * 12982 * Example: "0:1:1:2:2:1" 12983 * This example represents a map of: 12984 * <ul> 12985 * <li>DEVICE_STATE_ROTATION_KEY_FOLDED -> DEVICE_STATE_ROTATION_LOCK_LOCKED</li> 12986 * <li>DEVICE_STATE_ROTATION_KEY_HALF_FOLDED -> DEVICE_STATE_ROTATION_LOCK_UNLOCKED</li> 12987 * <li>DEVICE_STATE_ROTATION_KEY_UNFOLDED -> DEVICE_STATE_ROTATION_LOCK_IGNORED</li> 12988 * </ul> 12989 * 12990 * @hide 12991 */ 12992 public static final String DEVICE_STATE_ROTATION_LOCK = 12993 "device_state_rotation_lock"; 12994 12995 /** 12996 * Control whether communal mode is allowed on this device. 12997 * 12998 * @hide 12999 */ 13000 public static final String COMMUNAL_MODE_ENABLED = "communal_mode_enabled"; 13001 13002 /** 13003 * An array of SSIDs of Wi-Fi networks that, when connected, are considered safe to enable 13004 * the communal mode. 13005 * 13006 * @hide 13007 */ 13008 public static final String COMMUNAL_MODE_TRUSTED_NETWORKS = 13009 "communal_mode_trusted_networks"; 13010 13011 /** 13012 * Setting to store denylisted system languages by the CEC {@code <Set Menu Language>} 13013 * confirmation dialog. 13014 * 13015 * @hide 13016 */ 13017 public static final String HDMI_CEC_SET_MENU_LANGUAGE_DENYLIST = 13018 "hdmi_cec_set_menu_language_denylist"; 13019 13020 /** 13021 * Whether the Taskbar Education is about to be shown or is currently showing. 13022 * 13023 * <p>1 if true, 0 or unset otherwise. 13024 * 13025 * <p>This setting is used to inform other components that the Taskbar Education is 13026 * currently showing, which can prevent them from showing something else to the user. 13027 * 13028 * @hide 13029 */ 13030 public static final String LAUNCHER_TASKBAR_EDUCATION_SHOWING = 13031 "launcher_taskbar_education_showing"; 13032 13033 /** 13034 * Whether any Compat UI Education is currently showing. 13035 * 13036 * <p>1 if true, 0 or unset otherwise. 13037 * 13038 * <p>This setting is used to inform other components that the Compat UI Education is 13039 * currently showing, which can prevent them from showing something else to the user. 13040 * 13041 * @hide 13042 */ 13043 public static final String COMPAT_UI_EDUCATION_SHOWING = 13044 "compat_ui_education_showing"; 13045 13046 /** 13047 * Whether or not adaptive charging feature is enabled by user. 13048 * Type: int (0 for false, 1 for true) 13049 * Default: 1 13050 * 13051 * @hide 13052 */ 13053 public static final String ADAPTIVE_CHARGING_ENABLED = "adaptive_charging_enabled"; 13054 13055 /** 13056 * Whether battery saver is currently set to different schedule mode. 13057 * 13058 * @hide 13059 */ 13060 public static final String EXTRA_AUTOMATIC_POWER_SAVE_MODE = 13061 "extra_automatic_power_save_mode"; 13062 13063 /** 13064 * Whether contextual screen timeout is enabled. 13065 * 13066 * @hide 13067 */ 13068 public static final String CONTEXTUAL_SCREEN_TIMEOUT_ENABLED = 13069 "contextual_screen_timeout_enabled"; 13070 13071 /** 13072 * Whether hinge angle lidevent is enabled. 13073 * 13074 * @hide 13075 */ 13076 public static final String HINGE_ANGLE_LIDEVENT_ENABLED = 13077 "hinge_angle_lidevent_enabled"; 13078 13079 /** 13080 * Whether lockscreen weather is enabled. 13081 * 13082 * @hide 13083 */ 13084 public static final String LOCK_SCREEN_WEATHER_ENABLED = "lockscreen_weather_enabled"; 13085 13086 /** 13087 * Whether the feature that the device will fire a haptic when users scroll and hit 13088 * the edge of the screen is enabled. 13089 * 13090 * @hide 13091 */ 13092 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_EDGE_HAPTIC_ENABLED = 13093 "accessibility_display_magnification_edge_haptic_enabled"; 13094 13095 /** 13096 * If 1, DND default allowed packages have been updated 13097 * 13098 * @hide 13099 */ 13100 public static final String DND_CONFIGS_MIGRATED = "dnd_settings_migrated"; 13101 13102 /** 13103 * Controls whether to hide private space entry point in All Apps 13104 * 13105 * @hide 13106 */ 13107 public static final String HIDE_PRIVATESPACE_ENTRY_POINT = "hide_privatespace_entry_point"; 13108 13109 /** 13110 * Whether or not secure windows should be disabled. This only works on debuggable builds. 13111 * 13112 * <p>When this setting is set to a non-zero value, all windows are treated as non-secure. 13113 * Content in windows with {@link android.view.WindowManager.LayoutParams#FLAG_SECURE} will 13114 * appear in screenshots and recordings. 13115 * 13116 * @hide 13117 */ 13118 public static final String DISABLE_SECURE_WINDOWS = "disable_secure_windows"; 13119 13120 /** 13121 * Controls if the adaptive authentication feature should be disabled, which 13122 * will attempt to lock the device after a number of consecutive authentication 13123 * attempts fail. 13124 * 13125 * This can only be disabled on debuggable builds. Set to 1 to disable or 0 for the 13126 * normal behavior. 13127 * 13128 * @hide 13129 */ 13130 public static final String DISABLE_ADAPTIVE_AUTH_LIMIT_LOCK = 13131 "disable_adaptive_auth_limit_lock"; 13132 13133 /** @hide */ 13134 public static final int PRIVATE_SPACE_AUTO_LOCK_ON_DEVICE_LOCK = 0; 13135 /** @hide */ 13136 public static final int PRIVATE_SPACE_AUTO_LOCK_AFTER_INACTIVITY = 1; 13137 /** @hide */ 13138 public static final int PRIVATE_SPACE_AUTO_LOCK_AFTER_DEVICE_RESTART = 2; 13139 13140 /** 13141 * The different auto lock options for private space. 13142 * 13143 * @hide 13144 */ 13145 @IntDef(prefix = {"PRIVATE_SPACE_AUTO_LOCK_"}, value = { 13146 PRIVATE_SPACE_AUTO_LOCK_ON_DEVICE_LOCK, 13147 PRIVATE_SPACE_AUTO_LOCK_AFTER_INACTIVITY, 13148 PRIVATE_SPACE_AUTO_LOCK_AFTER_DEVICE_RESTART, 13149 }) 13150 @Retention(RetentionPolicy.SOURCE) 13151 public @interface PrivateSpaceAutoLockOption { 13152 } 13153 13154 13155 /** 13156 * Store auto lock value for private space. 13157 * The possible values are defined in {@link PrivateSpaceAutoLockOption}. 13158 * 13159 * @hide 13160 */ 13161 public static final String PRIVATE_SPACE_AUTO_LOCK = "private_space_auto_lock"; 13162 13163 /** 13164 * Toggle for enabling stylus pointer icon. Pointer icons for styluses will only be be shown 13165 * when this is enabled. Enabling this alone won't enable the stylus pointer; 13166 * config_enableStylusPointerIcon needs to be true as well. 13167 * 13168 * @hide 13169 */ 13170 @Readable 13171 public static final String STYLUS_POINTER_ICON_ENABLED = "stylus_pointer_icon_enabled"; 13172 13173 /** 13174 * Toggle for whether to redact OTP notification while connected to wifi. Defaults to 13175 * false/0. 13176 * @hide 13177 */ 13178 public static final String REDACT_OTP_NOTIFICATION_WHILE_CONNECTED_TO_WIFI = 13179 "redact_otp_on_wifi"; 13180 13181 /** 13182 * Time (in milliseconds) that the device should need to be locked, in order for an OTP 13183 * notification to be redacted. Default is 10 minutes (600,000 ms) 13184 * @hide 13185 */ 13186 public static final String OTP_NOTIFICATION_REDACTION_LOCK_TIME = 13187 "otp_redaction_lock_time"; 13188 13189 /** 13190 * These entries are considered common between the personal and the managed profile, 13191 * since the managed profile doesn't get to change them. 13192 */ 13193 private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>(); 13194 13195 static { 13196 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_ENABLED); 13197 CLONE_TO_MANAGED_PROFILE.add(ALLOW_MOCK_LOCATION); 13198 CLONE_TO_MANAGED_PROFILE.add(ALLOWED_GEOLOCATION_ORIGINS); 13199 CLONE_TO_MANAGED_PROFILE.add(CONTENT_CAPTURE_ENABLED); 13200 CLONE_TO_MANAGED_PROFILE.add(ENABLED_ACCESSIBILITY_SERVICES); 13201 CLONE_TO_MANAGED_PROFILE.add(LOCATION_CHANGER); 13202 CLONE_TO_MANAGED_PROFILE.add(LOCATION_MODE); 13203 CLONE_TO_MANAGED_PROFILE.add(SHOW_IME_WITH_HARD_KEYBOARD); 13204 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_BOUNCE_KEYS); 13205 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_SLOW_KEYS); 13206 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_STICKY_KEYS); 13207 CLONE_TO_MANAGED_PROFILE.add(NOTIFICATION_BUBBLES); 13208 CLONE_TO_MANAGED_PROFILE.add(NOTIFICATION_HISTORY_ENABLED); 13209 } 13210 13211 /** @hide */ getCloneToManagedProfileSettings(Set<String> outKeySet)13212 public static void getCloneToManagedProfileSettings(Set<String> outKeySet) { 13213 outKeySet.addAll(CLONE_TO_MANAGED_PROFILE); 13214 } 13215 13216 /** 13217 * Secure settings which can be accessed by instant apps. 13218 * @hide 13219 */ 13220 public static final Set<String> INSTANT_APP_SETTINGS = new ArraySet<>(); 13221 static { 13222 INSTANT_APP_SETTINGS.add(ENABLED_ACCESSIBILITY_SERVICES); 13223 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_SPEAK_PASSWORD); 13224 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_DISPLAY_INVERSION_ENABLED); 13225 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_ENABLED); 13226 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_PRESET); 13227 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_EDGE_TYPE); 13228 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_EDGE_COLOR); 13229 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_LOCALE); 13230 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR); 13231 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR); 13232 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_TYPEFACE); 13233 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_FONT_SCALE); 13234 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_WINDOW_COLOR); 13235 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED); 13236 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_DISPLAY_DALTONIZER); 13237 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_AUTOCLICK_DELAY); 13238 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_AUTOCLICK_ENABLED); 13239 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_LARGE_POINTER_ICON); 13240 13241 INSTANT_APP_SETTINGS.add(DEFAULT_INPUT_METHOD); 13242 INSTANT_APP_SETTINGS.add(ENABLED_INPUT_METHODS); 13243 13244 INSTANT_APP_SETTINGS.add(ANDROID_ID); 13245 13246 INSTANT_APP_SETTINGS.add(ALLOW_MOCK_LOCATION); 13247 } 13248 13249 /** 13250 * Helper method for determining if a location provider is enabled. 13251 * 13252 * @param cr the content resolver to use 13253 * @param provider the location provider to query 13254 * @return true if the provider is enabled 13255 * 13256 * @deprecated use {@link LocationManager#isProviderEnabled(String)} 13257 */ 13258 @Deprecated isLocationProviderEnabled(ContentResolver cr, String provider)13259 public static boolean isLocationProviderEnabled(ContentResolver cr, String provider) { 13260 IBinder binder = ServiceManager.getService(Context.LOCATION_SERVICE); 13261 ILocationManager lm = Objects.requireNonNull(ILocationManager.Stub.asInterface(binder)); 13262 try { 13263 return lm.isProviderEnabledForUser(provider, cr.getUserId()); 13264 } catch (RemoteException e) { 13265 throw e.rethrowFromSystemServer(); 13266 } 13267 } 13268 13269 /** 13270 * Thread-safe method for enabling or disabling a single location provider. This will have 13271 * no effect on Android Q and above. 13272 * @param cr the content resolver to use 13273 * @param provider the location provider to enable or disable 13274 * @param enabled true if the provider should be enabled 13275 * @deprecated This API is deprecated 13276 */ 13277 @Deprecated setLocationProviderEnabled(ContentResolver cr, String provider, boolean enabled)13278 public static void setLocationProviderEnabled(ContentResolver cr, 13279 String provider, boolean enabled) { 13280 } 13281 13282 /** 13283 * List of system components that support restore in a V-> U OS downgrade but do not have 13284 * RestoreAnyVersion set to true. Value set before system restore. 13285 * This setting is not B&Rd 13286 * List is stored as a comma-separated string of package names e.g. "a,b,c" 13287 * @hide 13288 */ 13289 public static final String V_TO_U_RESTORE_ALLOWLIST = "v_to_u_restore_allowlist"; 13290 13291 /** 13292 * List of system components that have RestoreAnyVersion set to true but do not support 13293 * restore in a V-> U OS downgrade. Value set before system restore. 13294 * This setting is not B&Rd 13295 * List is stored as a comma-separated string of package names e.g. "a,b,c" 13296 * @hide 13297 */ 13298 public static final String V_TO_U_RESTORE_DENYLIST = "v_to_u_restore_denylist"; 13299 13300 /** 13301 * Integer property that determines which charging optimization mode is applied. 13302 * [0-10] inclusive representing different modes, where 0 is the default indicating 13303 * no optimization mode is applied. 13304 * 13305 * @hide 13306 */ 13307 public static final String CHARGE_OPTIMIZATION_MODE = "charge_optimization_mode"; 13308 13309 /** 13310 * String property which contains the package name of the contextual 13311 * search provider supplied by individual OEM's 13312 * R.string.config_defaultContextualSearchPackageName. 13313 * 13314 * @hide 13315 */ 13316 @Readable 13317 public static final String CONTEXTUAL_SEARCH_PACKAGE = "contextual_search_package"; 13318 13319 /** 13320 * Integer property which determines whether advanced protection is on or not. 13321 * @hide 13322 */ 13323 public static final String ADVANCED_PROTECTION_MODE = "advanced_protection_mode"; 13324 13325 /** 13326 * Integer property which determines whether advanced protection USB data protection 13327 * feature is on or not. 13328 * 13329 * @hide 13330 */ 13331 public static final String AAPM_USB_DATA_PROTECTION = "aapm_usb_data_protection"; 13332 } 13333 13334 /** 13335 * Global system settings, containing preferences that always apply identically 13336 * to all defined users. Applications can read these but are not allowed to write; 13337 * like the "Secure" settings, these are for preferences that the user must 13338 * explicitly modify through the system UI or specialized APIs for those values. 13339 */ 13340 public static final class Global extends NameValueTable { 13341 // NOTE: If you add new settings here, be sure to add them to 13342 // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoGlobalSettingsLocked. 13343 13344 /** 13345 * The content:// style URL for global secure settings items. Not public. 13346 */ 13347 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global"); 13348 13349 /** 13350 * Whether the notification bubbles are globally enabled 13351 * The value is boolean (1 or 0). 13352 * @hide 13353 * @deprecated moved to secure settings. 13354 */ 13355 @Deprecated 13356 @TestApi 13357 @Readable 13358 public static final String NOTIFICATION_BUBBLES = "notification_bubbles"; 13359 13360 /** 13361 * Whether users are allowed to add more users or guest from lockscreen. 13362 * <p> 13363 * Type: int 13364 * @hide 13365 */ 13366 @Readable 13367 public static final String ADD_USERS_WHEN_LOCKED = "add_users_when_locked"; 13368 13369 /** 13370 * Whether guest user should be removed on exit from guest mode. 13371 * <p> 13372 * Type: int 13373 * @hide 13374 */ 13375 public static final String REMOVE_GUEST_ON_EXIT = "remove_guest_on_exit"; 13376 13377 /** 13378 * Whether applying ramping ringer on incoming phone call ringtone. 13379 * <p>1 = apply ramping ringer 13380 * <p>0 = do not apply ramping ringer 13381 * @deprecated Use {@link AudioManager#isRampingRingerEnabled()} instead 13382 */ 13383 @Deprecated 13384 @Readable 13385 public static final String APPLY_RAMPING_RINGER = "apply_ramping_ringer"; 13386 13387 /** 13388 * Setting whether the global gesture for enabling accessibility is enabled. 13389 * If this gesture is enabled the user will be able to perfrom it to enable 13390 * the accessibility state without visiting the settings app. 13391 * 13392 * @hide 13393 * No longer used. Should be removed once all dependencies have been updated. 13394 */ 13395 @UnsupportedAppUsage 13396 @Readable 13397 public static final String ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED = 13398 "enable_accessibility_global_gesture_enabled"; 13399 13400 /** 13401 * Whether Airplane Mode is on. 13402 */ 13403 @Readable 13404 public static final String AIRPLANE_MODE_ON = "airplane_mode_on"; 13405 13406 /** 13407 * Whether Theater Mode is on. 13408 * {@hide} 13409 */ 13410 @SystemApi 13411 @Readable 13412 public static final String THEATER_MODE_ON = "theater_mode_on"; 13413 13414 /** 13415 * Constant for use in AIRPLANE_MODE_RADIOS or SATELLITE_MODE_RADIOS to specify Bluetooth 13416 * radio. 13417 */ 13418 @Readable 13419 public static final String RADIO_BLUETOOTH = "bluetooth"; 13420 13421 /** 13422 * Constant for use in AIRPLANE_MODE_RADIOS or SATELLITE_MODE_RADIOS to specify Wi-Fi radio. 13423 */ 13424 @Readable 13425 public static final String RADIO_WIFI = "wifi"; 13426 13427 /** 13428 * {@hide} 13429 */ 13430 @Readable 13431 public static final String RADIO_WIMAX = "wimax"; 13432 /** 13433 * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio. 13434 */ 13435 @Readable 13436 public static final String RADIO_CELL = "cell"; 13437 13438 /** 13439 * Constant for use in AIRPLANE_MODE_RADIOS or SATELLITE_MODE_RADIOS to specify NFC radio. 13440 */ 13441 @Readable 13442 public static final String RADIO_NFC = "nfc"; 13443 13444 /** 13445 * Constant for use in SATELLITE_MODE_RADIOS to specify UWB radio. 13446 * 13447 * {@hide} 13448 */ 13449 public static final String RADIO_UWB = "uwb"; 13450 13451 13452 /** 13453 * A comma separated list of radios that need to be disabled when satellite mode is on. 13454 * 13455 * {@hide} 13456 */ 13457 @Readable 13458 public static final String SATELLITE_MODE_RADIOS = "satellite_mode_radios"; 13459 13460 /** 13461 * The satellite mode is enabled for the user. When the satellite mode is enabled, the 13462 * satellite radio will be turned on and all other radios will be turned off. When the 13463 * satellite mode is disabled, the satellite radio will be turned off and the states of 13464 * other radios will be restored. 13465 * <p> 13466 * When this setting is set to 0, it means the satellite mode is disabled. When this 13467 * setting is set to 1, it means the satellite mode is enabled. 13468 * 13469 * {@hide} 13470 */ 13471 @Readable 13472 public static final String SATELLITE_MODE_ENABLED = "satellite_mode_enabled"; 13473 13474 /** 13475 * A comma separated list of radios that need to be disabled when airplane mode 13476 * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are 13477 * included in the comma separated list. 13478 */ 13479 @Readable 13480 public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; 13481 13482 /** 13483 * A comma separated list of radios that should to be disabled when airplane mode 13484 * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is 13485 * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi 13486 * will be turned off when entering airplane mode, but the user will be able to reenable 13487 * Wifi in the Settings app. 13488 * @hide 13489 */ 13490 @SystemApi 13491 @Readable 13492 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios"; 13493 13494 /** 13495 * An integer representing the Bluetooth Class of Device (CoD). 13496 * 13497 * @hide 13498 */ 13499 @Readable 13500 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 13501 @SuppressLint("NoSettingsProvider") 13502 public static final String BLUETOOTH_CLASS_OF_DEVICE = "bluetooth_class_of_device"; 13503 13504 /** 13505 * A Long representing a bitmap of profiles that should be disabled when bluetooth starts. 13506 * See {@link android.bluetooth.BluetoothProfile}. 13507 * {@hide} 13508 */ 13509 @Readable 13510 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 13511 @SuppressLint("NoSettingsProvider") 13512 public static final String BLUETOOTH_DISABLED_PROFILES = "bluetooth_disabled_profiles"; 13513 13514 /** 13515 * A semi-colon separated list of Bluetooth interoperability workarounds. 13516 * Each entry is a partial Bluetooth device address string and an integer representing 13517 * the feature to be disabled, separated by a comma. The integer must correspond 13518 * to a interoperability feature as defined in "interop.h" in /system/bt. 13519 * <p> 13520 * Example: <br/> 13521 * "00:11:22,0;01:02:03:04,2" 13522 * @hide 13523 */ 13524 @Readable 13525 public static final String BLUETOOTH_INTEROPERABILITY_LIST = "bluetooth_interoperability_list"; 13526 13527 /** 13528 * The policy for deciding when Wi-Fi should go to sleep (which will in 13529 * turn switch to using the mobile data as an Internet connection). 13530 * <p> 13531 * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT}, 13532 * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or 13533 * {@link #WIFI_SLEEP_POLICY_NEVER}. 13534 * @deprecated This is no longer used or set by the platform. 13535 */ 13536 @Deprecated 13537 @Readable 13538 public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy"; 13539 13540 /** 13541 * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep 13542 * policy, which is to sleep shortly after the turning off 13543 * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting. 13544 * @deprecated This is no longer used by the platform. 13545 */ 13546 @Deprecated 13547 public static final int WIFI_SLEEP_POLICY_DEFAULT = 0; 13548 13549 /** 13550 * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when 13551 * the device is on battery, and never go to sleep when the device is 13552 * plugged in. 13553 * @deprecated This is no longer used by the platform. 13554 */ 13555 @Deprecated 13556 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; 13557 13558 /** 13559 * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep. 13560 * @deprecated This is no longer used by the platform. 13561 */ 13562 @Deprecated 13563 public static final int WIFI_SLEEP_POLICY_NEVER = 2; 13564 13565 /** 13566 * Value to specify if the device's UTC system clock should be set automatically, e.g. using 13567 * telephony signals like NITZ, or other sources like GNSS or NTP. 13568 * 13569 * <p>Prefer {@code android.app.time.TimeManager} API calls to determine the state of 13570 * automatic time detection instead of directly observing this setting as it may be ignored 13571 * by the time_detector service under various conditions. 13572 * 13573 * <p>1=yes, 0=no (manual) 13574 */ 13575 @Readable 13576 public static final String AUTO_TIME = "auto_time"; 13577 13578 /** 13579 * Value to specify if the device's time zone system property should be set automatically, 13580 * e.g. using telephony signals like MCC and NITZ, or other mechanisms like the location. 13581 * 13582 * <p>Prefer {@code android.app.time.TimeManager} API calls to determine the state of 13583 * automatic time zone detection instead of directly observing this setting as it may be 13584 * ignored by the time_zone_detector service under various conditions. 13585 * 13586 * <p>1=yes, 0=no (manual). 13587 */ 13588 @Readable 13589 public static final String AUTO_TIME_ZONE = "auto_time_zone"; 13590 13591 /** 13592 * Records whether an explicit preference for {@link #AUTO_TIME_ZONE} has been expressed 13593 * instead of the current value being the default. This value is used to tell if the {@link 13594 * #AUTO_TIME_ZONE} value can be influenced by experiment flags that alter the setting's 13595 * value for internal testers: once the user indicates a preference they leave the 13596 * experiment, only users that are still using the default will be affected by the flag. 13597 * 13598 * <p>Since {@link #AUTO_TIME_ZONE} can be altered by components besides the system server, 13599 * and not just via the time_zone_detector logic that sets this value, this isn't guaranteed 13600 * to be set when the device diverges from the default in all cases. Important AOSP system 13601 * components like SettingsUI do use the time_zone_detector APIs. 13602 * 13603 * <p>1="has been set explicitly" 13604 * 13605 * @hide 13606 */ 13607 public static final String AUTO_TIME_ZONE_EXPLICIT = "auto_time_zone_explicit"; 13608 13609 /** 13610 * Value to specify if the device should send notifications when {@link #AUTO_TIME_ZONE} is 13611 * on and the device's time zone changes. 13612 * 13613 * <p>1=yes, 0=no. 13614 * 13615 * @hide 13616 */ 13617 public static final String TIME_ZONE_NOTIFICATIONS = "time_zone_notifications"; 13618 13619 /** 13620 * URI for the car dock "in" event sound. 13621 * @hide 13622 */ 13623 @Readable 13624 public static final String CAR_DOCK_SOUND = "car_dock_sound"; 13625 13626 /** 13627 * URI for the car dock "out" event sound. 13628 * @hide 13629 */ 13630 @Readable 13631 public static final String CAR_UNDOCK_SOUND = "car_undock_sound"; 13632 13633 /** 13634 * URI for the desk dock "in" event sound. 13635 * @hide 13636 */ 13637 @Readable 13638 public static final String DESK_DOCK_SOUND = "desk_dock_sound"; 13639 13640 /** 13641 * URI for the desk dock "out" event sound. 13642 * @hide 13643 */ 13644 @Readable 13645 public static final String DESK_UNDOCK_SOUND = "desk_undock_sound"; 13646 13647 /** 13648 * Whether to play a sound for dock events. 13649 * @hide 13650 */ 13651 @Readable 13652 public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled"; 13653 13654 /** 13655 * Whether to play a sound for dock events, only when an accessibility service is on. 13656 * @hide 13657 */ 13658 @Readable 13659 public static final String DOCK_SOUNDS_ENABLED_WHEN_ACCESSIBILITY = "dock_sounds_enabled_when_accessbility"; 13660 13661 /** 13662 * URI for the "device locked" (keyguard shown) sound. 13663 * @hide 13664 */ 13665 @Readable 13666 public static final String LOCK_SOUND = "lock_sound"; 13667 13668 /** 13669 * URI for the "device unlocked" sound. 13670 * @hide 13671 */ 13672 @Readable 13673 public static final String UNLOCK_SOUND = "unlock_sound"; 13674 13675 /** 13676 * URI for the "device is trusted" sound, which is played when the device enters the trusted 13677 * state without unlocking. 13678 * @hide 13679 */ 13680 @Readable 13681 public static final String TRUSTED_SOUND = "trusted_sound"; 13682 13683 /** 13684 * URI for the low battery sound file. 13685 * @hide 13686 */ 13687 @Readable 13688 public static final String LOW_BATTERY_SOUND = "low_battery_sound"; 13689 13690 /** 13691 * Whether to play a sound for low-battery alerts. 13692 * @hide 13693 */ 13694 @Readable 13695 public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled"; 13696 13697 /** 13698 * URI for the "wireless charging started" sound. 13699 * @hide 13700 */ 13701 @Readable 13702 public static final String WIRELESS_CHARGING_STARTED_SOUND = 13703 "wireless_charging_started_sound"; 13704 13705 /** 13706 * Whether to auto enable reverse charging once plugged-in. 13707 * @hide 13708 */ 13709 public static final String REVERSE_CHARGING_AUTO_ON = 13710 "settings_key_reverse_charging_auto_turn_on"; 13711 13712 /** 13713 * URI for "wired charging started" sound. 13714 * @hide 13715 */ 13716 @Readable 13717 public static final String CHARGING_STARTED_SOUND = "charging_started_sound"; 13718 13719 /** 13720 * Whether to play a sound for charging events. 13721 * @deprecated Use {@link android.provider.Settings.Secure#CHARGING_SOUNDS_ENABLED} instead 13722 * @hide 13723 */ 13724 @Deprecated 13725 public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled"; 13726 13727 /** 13728 * Whether to vibrate for wireless charging events. 13729 * @deprecated Use {@link android.provider.Settings.Secure#CHARGING_VIBRATION_ENABLED} 13730 * @hide 13731 */ 13732 @Deprecated 13733 public static final String CHARGING_VIBRATION_ENABLED = "charging_vibration_enabled"; 13734 13735 /** 13736 * Whether we keep the device on while the device is plugged in. 13737 * Supported values are: 13738 * <ul> 13739 * <li>{@code 0} to never stay on while plugged in</li> 13740 * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li> 13741 * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li> 13742 * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li> 13743 * <li>{@link BatteryManager#BATTERY_PLUGGED_DOCK} to stay on for dock charger</li> 13744 * </ul> 13745 * These values can be OR-ed together. 13746 */ 13747 @Readable 13748 public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; 13749 13750 /** 13751 * When the user has enable the option to have a "bug report" command 13752 * in the power menu. 13753 * @deprecated Use {@link android.provider.Settings.Secure#BUGREPORT_IN_POWER_MENU} instead 13754 * @hide 13755 */ 13756 @Deprecated 13757 @Readable 13758 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; 13759 13760 /** 13761 * The package name for the custom bugreport handler app. This app must be allowlisted. 13762 * This is currently used only by Power Menu short press. 13763 * @deprecated Use {@link android.provider.Settings.Secure#CUSTOM_BUGREPORT_HANDLER_APP} 13764 * instead 13765 * @hide 13766 */ 13767 @Deprecated 13768 @Readable 13769 public static final String CUSTOM_BUGREPORT_HANDLER_APP = "custom_bugreport_handler_app"; 13770 13771 /** 13772 * The user id for the custom bugreport handler app. This is currently used only by Power 13773 * Menu short press. 13774 * @deprecated Use {@link android.provider.Settings.Secure#CUSTOM_BUGREPORT_HANDLER_USER} 13775 * instead 13776 * @hide 13777 */ 13778 @Deprecated 13779 @Readable 13780 public static final String CUSTOM_BUGREPORT_HANDLER_USER = "custom_bugreport_handler_user"; 13781 13782 /** 13783 * Whether ADB over USB is enabled. 13784 */ 13785 @Readable 13786 public static final String ADB_ENABLED = "adb_enabled"; 13787 13788 /** 13789 * Whether ADB over Wifi is enabled. 13790 * @hide 13791 */ 13792 @Readable 13793 public static final String ADB_WIFI_ENABLED = "adb_wifi_enabled"; 13794 13795 /** 13796 * Whether existing ADB sessions over both USB and Wifi should be terminated when the user 13797 * revokes debugging authorizations. 13798 * @hide 13799 */ 13800 public static final String ADB_DISCONNECT_SESSIONS_ON_REVOKE = 13801 "adb_disconnect_sessions_on_revoke"; 13802 13803 /** 13804 * Whether Views are allowed to save their attribute data. 13805 * @hide 13806 */ 13807 @Readable 13808 public static final String DEBUG_VIEW_ATTRIBUTES = "debug_view_attributes"; 13809 13810 /** 13811 * Which application package is allowed to save View attribute data. 13812 * @hide 13813 */ 13814 @Readable 13815 public static final String DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE = 13816 "debug_view_attributes_application_package"; 13817 13818 /** 13819 * Whether assisted GPS should be enabled or not. 13820 * @hide 13821 */ 13822 @Readable 13823 public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled"; 13824 13825 /** 13826 * Whether bluetooth is enabled/disabled 13827 * 0=disabled. 1=enabled. 13828 */ 13829 @Readable 13830 public static final String BLUETOOTH_ON = "bluetooth_on"; 13831 13832 /** 13833 * CDMA Cell Broadcast SMS 13834 * 0 = CDMA Cell Broadcast SMS disabled 13835 * 1 = CDMA Cell Broadcast SMS enabled 13836 * @hide 13837 */ 13838 @Readable 13839 public static final String CDMA_CELL_BROADCAST_SMS = 13840 "cdma_cell_broadcast_sms"; 13841 13842 /** 13843 * The CDMA roaming mode 0 = Home Networks, CDMA default 13844 * 1 = Roaming on Affiliated networks 13845 * 2 = Roaming on any networks 13846 * @hide 13847 */ 13848 @Readable 13849 public static final String CDMA_ROAMING_MODE = "roaming_settings"; 13850 13851 /** 13852 * The CDMA subscription mode 0 = RUIM/SIM (default) 13853 * 1 = NV 13854 * @hide 13855 */ 13856 @Readable 13857 public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode"; 13858 13859 /** 13860 * The default value for whether background data is enabled or not. 13861 * 13862 * Used by {@code NetworkPolicyManagerService}. 13863 * 13864 * @hide 13865 */ 13866 @Readable 13867 public static final String DEFAULT_RESTRICT_BACKGROUND_DATA = 13868 "default_restrict_background_data"; 13869 13870 /** Inactivity timeout to track mobile data activity. 13871 * 13872 * If set to a positive integer, it indicates the inactivity timeout value in seconds to 13873 * infer the data activity of mobile network. After a period of no activity on mobile 13874 * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE} 13875 * intent is fired to indicate a transition of network status from "active" to "idle". Any 13876 * subsequent activity on mobile networks triggers the firing of {@code 13877 * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active". 13878 * 13879 * Network activity refers to transmitting or receiving data on the network interfaces. 13880 * 13881 * Tracking is disabled if set to zero or negative value. 13882 * 13883 * @hide 13884 */ 13885 @Readable 13886 public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile"; 13887 13888 /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE} 13889 * but for Wifi network. 13890 * @hide 13891 */ 13892 @Readable 13893 public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi"; 13894 13895 /** 13896 * Whether or not data roaming is enabled. (0 = false, 1 = true) 13897 * Use {@link TelephonyManager#isDataRoamingEnabled} instead of calling via settings. 13898 */ 13899 @Readable(maxTargetSdk = Build.VERSION_CODES.S_V2) 13900 public static final String DATA_ROAMING = "data_roaming"; 13901 13902 /** 13903 * The value passed to a Mobile DataConnection via bringUp which defines the 13904 * number of retries to perform when setting up the initial connection. The default 13905 * value defined in DataConnectionTrackerBase#DEFAULT_MDC_INITIAL_RETRY is currently 1. 13906 * @hide 13907 */ 13908 @Readable 13909 public static final String MDC_INITIAL_MAX_RETRY = "mdc_initial_max_retry"; 13910 13911 /** 13912 * Whether any package can be on external storage. When this is true, any 13913 * package, regardless of manifest values, is a candidate for installing 13914 * or moving onto external storage. (0 = false, 1 = true) 13915 * @hide 13916 */ 13917 @Readable 13918 public static final String FORCE_ALLOW_ON_EXTERNAL = "force_allow_on_external"; 13919 13920 /** 13921 * The default SM-DP+ configured for this device. 13922 * 13923 * <p>An SM-DP+ is used by an LPA (see {@link android.service.euicc.EuiccService}) to 13924 * download profiles. If this value is set, the LPA will query this server for any profiles 13925 * available to this device. If any are available, they may be downloaded during device 13926 * provisioning or in settings without needing the user to enter an activation code. 13927 * 13928 * @see android.service.euicc.EuiccService 13929 * @hide 13930 */ 13931 @SystemApi 13932 @Readable 13933 public static final String DEFAULT_SM_DP_PLUS = "default_sm_dp_plus"; 13934 13935 /** 13936 * Whether any profile has ever been downloaded onto a eUICC on the device. 13937 * 13938 * <p>Used to hide eUICC UI from users who have never made use of it and would only be 13939 * confused by seeing references to it in settings. 13940 * (0 = false, 1 = true) 13941 * @hide 13942 */ 13943 @SystemApi 13944 @Readable 13945 public static final String EUICC_PROVISIONED = "euicc_provisioned"; 13946 13947 /** 13948 * List of ISO country codes in which eUICC UI is shown. Country codes should be separated 13949 * by comma. 13950 * 13951 * Note: if {@link #EUICC_SUPPORTED_COUNTRIES} is empty, then {@link 13952 * #EUICC_UNSUPPORTED_COUNTRIES} is used. 13953 * 13954 * <p>Used to hide eUICC UI from users who are currently in countries where no carriers 13955 * support eUICC. 13956 * 13957 * @hide 13958 */ 13959 @SystemApi 13960 @Readable 13961 public static final String EUICC_SUPPORTED_COUNTRIES = "euicc_supported_countries"; 13962 13963 /** 13964 * List of ISO country codes in which eUICC UI is not shown. Country codes should be 13965 * separated by comma. 13966 * 13967 * Note: if {@link #EUICC_SUPPORTED_COUNTRIES} is empty, then {@link 13968 * #EUICC_UNSUPPORTED_COUNTRIES} is used. 13969 * 13970 * <p>Used to hide eUICC UI from users who are currently in countries where no carriers 13971 * support eUICC. 13972 * 13973 * @hide 13974 */ 13975 @SystemApi 13976 @Readable 13977 public static final String EUICC_UNSUPPORTED_COUNTRIES = "euicc_unsupported_countries"; 13978 13979 /** 13980 * Whether any activity can be resized. When this is true, any 13981 * activity, regardless of manifest values, can be resized for multi-window. 13982 * (0 = false, 1 = true) 13983 * @hide 13984 */ 13985 @Readable 13986 public static final String DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES 13987 = "force_resizable_activities"; 13988 13989 /** 13990 * Whether to enable experimental freeform support for windows. 13991 * @hide 13992 */ 13993 @Readable 13994 public static final String DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT 13995 = "enable_freeform_support"; 13996 13997 /** 13998 * Whether to override the availability of the desktop experiences features on the 13999 * device. With desktop experiences enabled, secondary displays can be used to run 14000 * apps, in desktop mode by default. Otherwise they can only be used for mirroring. 14001 * @hide 14002 */ 14003 @Readable 14004 public static final String DEVELOPMENT_OVERRIDE_DESKTOP_EXPERIENCE_FEATURES = 14005 "override_desktop_experience_features"; 14006 14007 /** 14008 * Whether to override the availability of the desktop mode on the main display of the 14009 * device. If on, users can make move an app to the desktop, allowing a freeform windowing 14010 * experience. 14011 * @hide 14012 */ 14013 @Readable 14014 public static final String DEVELOPMENT_OVERRIDE_DESKTOP_MODE_FEATURES = 14015 "override_desktop_mode_features"; 14016 14017 /** 14018 * Whether to enable the legacy freeform support on secondary displays. If enabled, the 14019 * SECONDARY_HOME of the launcher is started on any secondary display, allowing for a 14020 * desktop experience. 14021 * @hide 14022 */ 14023 @Readable 14024 public static final String DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS = 14025 "force_desktop_mode_on_external_displays"; 14026 14027 /** 14028 * Whether to allow non-resizable apps to be shown in multi-window. The app will be 14029 * letterboxed if the request orientation is not met, and will be shown in size-compat 14030 * mode if the container size has changed. 14031 * @hide 14032 */ 14033 @TestApi 14034 @Readable 14035 @SuppressLint("NoSettingsProvider") 14036 public static final String DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW = 14037 "enable_non_resizable_multi_window"; 14038 14039 /** 14040 * If true, shadows drawn around the window will be rendered by the system compositor. If 14041 * false, shadows will be drawn by the client by setting an elevation on the root view and 14042 * the contents will be inset by the surface insets. 14043 * (0 = false, 1 = true) 14044 * @hide 14045 */ 14046 @Readable 14047 public static final String DEVELOPMENT_RENDER_SHADOWS_IN_COMPOSITOR = 14048 "render_shadows_in_compositor"; 14049 14050 /** 14051 * Policy to be used for the display shade when connected to an external display. 14052 * @hide 14053 */ 14054 @Readable 14055 public static final String DEVELOPMENT_SHADE_DISPLAY_AWARENESS = 14056 "shade_display_awareness"; 14057 14058 /** 14059 * Path to the WindowManager display settings file. If unset, the default file path will 14060 * be used. 14061 * 14062 * @hide 14063 */ 14064 public static final String DEVELOPMENT_WM_DISPLAY_SETTINGS_PATH = 14065 "wm_display_settings_path"; 14066 14067 /** 14068 * Whether user has enabled development settings. 14069 */ 14070 @Readable 14071 public static final String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled"; 14072 14073 /** 14074 * Whether the device has been provisioned (0 = false, 1 = true). 14075 * <p>On a multiuser device with a separate system user, the screen may be locked 14076 * as soon as this is set to true and further activities cannot be launched on the 14077 * system user unless they are marked to show over keyguard. 14078 */ 14079 @Readable 14080 public static final String DEVICE_PROVISIONED = "device_provisioned"; 14081 14082 /** 14083 * Indicates whether the device is under restricted secure FRP mode. 14084 * Secure FRP mode is enabled when the device is under FRP. On solving of FRP challenge, 14085 * device is removed from this mode. 14086 * <p> 14087 * Type: int (0 for false, 1 for true) 14088 * 14089 */ 14090 @Readable 14091 @SuppressLint("NoSettingsProvider") 14092 public static final String SECURE_FRP_MODE = "secure_frp_mode"; 14093 14094 /** 14095 * Whether bypassing the device policy management role holder qualification is allowed, 14096 * (0 = false, 1 = true). 14097 * 14098 * @hide 14099 */ 14100 public static final String BYPASS_DEVICE_POLICY_MANAGEMENT_ROLE_QUALIFICATIONS = 14101 "bypass_device_policy_management_role_qualifications"; 14102 14103 /** 14104 * Whether work profile telephony feature is enabled for non 14105 * {@link android.app.role.RoleManager#ROLE_DEVICE_POLICY_MANAGEMENT} holders. 14106 * ("0" = false, "1" = true). 14107 * 14108 * @hide 14109 */ 14110 @Readable 14111 public static final String ALLOW_WORK_PROFILE_TELEPHONY_FOR_NON_DPM_ROLE_HOLDERS = 14112 "allow_work_profile_telephony_for_non_dpm_role_holders"; 14113 14114 /** 14115 * Indicates whether mobile data should be allowed while the device is being provisioned. 14116 * This allows the provisioning process to turn off mobile data before the user 14117 * has an opportunity to set things up, preventing other processes from burning 14118 * precious bytes before wifi is setup. 14119 * <p> 14120 * Type: int (0 for false, 1 for true) 14121 * 14122 * @hide 14123 */ 14124 @SystemApi 14125 @Readable 14126 public static final String DEVICE_PROVISIONING_MOBILE_DATA_ENABLED = 14127 "device_provisioning_mobile_data"; 14128 14129 /** 14130 * The saved value for WindowManagerService.setForcedDisplaySize(). 14131 * Two integers separated by a comma. If unset, then use the real display size. 14132 * @hide 14133 */ 14134 @Readable 14135 public static final String DISPLAY_SIZE_FORCED = "display_size_forced"; 14136 14137 /** 14138 * The saved value for WindowManagerService.setForcedDisplayScalingMode(). 14139 * 0 or unset if scaling is automatic, 1 if scaling is disabled. 14140 * @hide 14141 */ 14142 @Readable 14143 public static final String DISPLAY_SCALING_FORCE = "display_scaling_force"; 14144 14145 /** 14146 * The maximum size, in bytes, of a download that the download manager will transfer over 14147 * a non-wifi connection. 14148 * @hide 14149 */ 14150 @Readable 14151 public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE = 14152 "download_manager_max_bytes_over_mobile"; 14153 14154 /** 14155 * The recommended maximum size, in bytes, of a download that the download manager should 14156 * transfer over a non-wifi connection. Over this size, the use will be warned, but will 14157 * have the option to start the download over the mobile connection anyway. 14158 * @hide 14159 */ 14160 @Readable 14161 public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE = 14162 "download_manager_recommended_max_bytes_over_mobile"; 14163 14164 /** 14165 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead 14166 */ 14167 @Deprecated 14168 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; 14169 14170 /** 14171 * Whether or not media is shown automatically when bypassing as a heads up. 14172 * @hide 14173 */ 14174 @Readable 14175 public static final String SHOW_MEDIA_ON_QUICK_SETTINGS = 14176 "qs_media_controls"; 14177 14178 /** 14179 * The interval in milliseconds at which location requests will be throttled when they are 14180 * coming from the background. 14181 * 14182 * @hide 14183 */ 14184 @Readable 14185 public static final String LOCATION_BACKGROUND_THROTTLE_INTERVAL_MS = 14186 "location_background_throttle_interval_ms"; 14187 14188 /** 14189 * Most frequent location update interval in milliseconds that proximity alert is allowed 14190 * to request. 14191 * @hide 14192 */ 14193 @Readable 14194 public static final String LOCATION_BACKGROUND_THROTTLE_PROXIMITY_ALERT_INTERVAL_MS = 14195 "location_background_throttle_proximity_alert_interval_ms"; 14196 14197 /** 14198 * Packages that are allowlisted for background throttling (throttling will not be applied). 14199 * @hide 14200 */ 14201 @Readable 14202 public static final String LOCATION_BACKGROUND_THROTTLE_PACKAGE_WHITELIST = 14203 "location_background_throttle_package_whitelist"; 14204 14205 /** 14206 * Packages that are allowlisted for ignoring location settings (may retrieve location even 14207 * when user location settings are off), for emergency purposes. 14208 * @deprecated No longer used from Android 12+ 14209 * @hide 14210 */ 14211 @TestApi 14212 @Readable 14213 @Deprecated 14214 public static final String LOCATION_IGNORE_SETTINGS_PACKAGE_WHITELIST = 14215 "location_ignore_settings_package_whitelist"; 14216 14217 /** 14218 * Whether to throttle location when the device is in doze and still. 14219 * @hide 14220 */ 14221 public static final String LOCATION_ENABLE_STATIONARY_THROTTLE = 14222 "location_enable_stationary_throttle"; 14223 14224 /** 14225 * Whether TV will switch to MHL port when a mobile device is plugged in. 14226 * (0 = false, 1 = true) 14227 * @hide 14228 */ 14229 @Readable 14230 public static final String MHL_INPUT_SWITCHING_ENABLED = "mhl_input_switching_enabled"; 14231 14232 /** 14233 * Whether TV will charge the mobile device connected at MHL port. (0 = false, 1 = true) 14234 * @hide 14235 */ 14236 @Readable 14237 public static final String MHL_POWER_CHARGE_ENABLED = "mhl_power_charge_enabled"; 14238 14239 /** 14240 * Whether mobile data connections are allowed by the user. See 14241 * ConnectivityManager for more info. 14242 * @hide 14243 */ 14244 @UnsupportedAppUsage 14245 @Readable 14246 public static final String MOBILE_DATA = "mobile_data"; 14247 14248 /** 14249 * Whether the mobile data connection should remain active even when higher 14250 * priority networks like WiFi are active, to help make network switching faster. 14251 * 14252 * See ConnectivityService for more info. 14253 * 14254 * (0 = disabled, 1 = enabled) 14255 * @hide 14256 */ 14257 @Readable 14258 public static final String MOBILE_DATA_ALWAYS_ON = "mobile_data_always_on"; 14259 14260 /** 14261 * The duration in milliseconds of each action, separated by commas. Ex: 14262 * 14263 * "18000,18000,18000,18000,0" 14264 * 14265 * See com.android.internal.telephony.data.DataStallRecoveryManager for more info 14266 * @hide 14267 */ 14268 public static final String DSRM_DURATION_MILLIS = "dsrm_duration_millis"; 14269 14270 /** 14271 * The list of DSRM enabled actions, separated by commas. Ex: 14272 * 14273 * "true,true,false,true,true" 14274 * 14275 * See com.android.internal.telephony.data.DataStallRecoveryManager for more info 14276 * @hide 14277 */ 14278 public static final String DSRM_ENABLED_ACTIONS = "dsrm_enabled_actions"; 14279 14280 /** 14281 * Whether the wifi data connection should remain active even when higher 14282 * priority networks like Ethernet are active, to keep both networks. 14283 * In the case where higher priority networks are connected, wifi will be 14284 * unused unless an application explicitly requests to use it. 14285 * 14286 * See ConnectivityService for more info. 14287 * 14288 * (0 = disabled, 1 = enabled) 14289 * @hide 14290 */ 14291 @Readable 14292 public static final String WIFI_ALWAYS_REQUESTED = "wifi_always_requested"; 14293 14294 /** 14295 * Size of the event buffer for IP connectivity metrics. 14296 * @hide 14297 */ 14298 @Readable 14299 public static final String CONNECTIVITY_METRICS_BUFFER_SIZE = 14300 "connectivity_metrics_buffer_size"; 14301 14302 /** {@hide} */ 14303 @Readable 14304 public static final String NETSTATS_ENABLED = "netstats_enabled"; 14305 /** {@hide} */ 14306 @Readable 14307 public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval"; 14308 /** 14309 * @deprecated 14310 * {@hide} 14311 */ 14312 @Deprecated 14313 @Readable 14314 public static final String NETSTATS_TIME_CACHE_MAX_AGE = "netstats_time_cache_max_age"; 14315 /** {@hide} */ 14316 @Readable 14317 public static final String NETSTATS_GLOBAL_ALERT_BYTES = "netstats_global_alert_bytes"; 14318 /** {@hide} */ 14319 @Readable 14320 public static final String NETSTATS_SAMPLE_ENABLED = "netstats_sample_enabled"; 14321 /** {@hide} */ 14322 @Readable 14323 public static final String NETSTATS_AUGMENT_ENABLED = "netstats_augment_enabled"; 14324 /** {@hide} */ 14325 @Readable 14326 public static final String NETSTATS_COMBINE_SUBTYPE_ENABLED = 14327 "netstats_combine_subtype_enabled"; 14328 14329 /** {@hide} */ 14330 @Readable 14331 public static final String NETSTATS_DEV_BUCKET_DURATION = "netstats_dev_bucket_duration"; 14332 /** {@hide} */ 14333 @Readable 14334 public static final String NETSTATS_DEV_PERSIST_BYTES = "netstats_dev_persist_bytes"; 14335 /** {@hide} */ 14336 @Readable 14337 public static final String NETSTATS_DEV_ROTATE_AGE = "netstats_dev_rotate_age"; 14338 /** {@hide} */ 14339 @Readable 14340 public static final String NETSTATS_DEV_DELETE_AGE = "netstats_dev_delete_age"; 14341 14342 /** {@hide} */ 14343 @Readable 14344 public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration"; 14345 /** {@hide} */ 14346 @Readable 14347 public static final String NETSTATS_UID_PERSIST_BYTES = "netstats_uid_persist_bytes"; 14348 /** {@hide} */ 14349 @Readable 14350 public static final String NETSTATS_UID_ROTATE_AGE = "netstats_uid_rotate_age"; 14351 /** {@hide} */ 14352 @Readable 14353 public static final String NETSTATS_UID_DELETE_AGE = "netstats_uid_delete_age"; 14354 14355 /** {@hide} */ 14356 @Readable 14357 public static final String NETSTATS_UID_TAG_BUCKET_DURATION = 14358 "netstats_uid_tag_bucket_duration"; 14359 /** {@hide} */ 14360 @Readable 14361 public static final String NETSTATS_UID_TAG_PERSIST_BYTES = 14362 "netstats_uid_tag_persist_bytes"; 14363 /** {@hide} */ 14364 @Readable 14365 public static final String NETSTATS_UID_TAG_ROTATE_AGE = "netstats_uid_tag_rotate_age"; 14366 /** {@hide} */ 14367 @Readable 14368 public static final String NETSTATS_UID_TAG_DELETE_AGE = "netstats_uid_tag_delete_age"; 14369 14370 /** {@hide} */ 14371 @Readable 14372 public static final String NETPOLICY_QUOTA_ENABLED = "netpolicy_quota_enabled"; 14373 /** {@hide} */ 14374 @Readable 14375 public static final String NETPOLICY_QUOTA_UNLIMITED = "netpolicy_quota_unlimited"; 14376 /** {@hide} */ 14377 @Readable 14378 public static final String NETPOLICY_QUOTA_LIMITED = "netpolicy_quota_limited"; 14379 /** {@hide} */ 14380 @Readable 14381 public static final String NETPOLICY_QUOTA_FRAC_JOBS = "netpolicy_quota_frac_jobs"; 14382 /** {@hide} */ 14383 @Readable 14384 public static final String NETPOLICY_QUOTA_FRAC_MULTIPATH = 14385 "netpolicy_quota_frac_multipath"; 14386 14387 /** {@hide} */ 14388 @Readable 14389 public static final String NETPOLICY_OVERRIDE_ENABLED = "netpolicy_override_enabled"; 14390 14391 /** 14392 * User preference for which network(s) should be used. Only the 14393 * connectivity service should touch this. 14394 */ 14395 @Readable 14396 public static final String NETWORK_PREFERENCE = "network_preference"; 14397 14398 /** 14399 * Which package name to use for network scoring. If null, or if the package is not a valid 14400 * scorer app, external network scores will neither be requested nor accepted. 14401 * @hide 14402 */ 14403 @Readable 14404 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 14405 public static final String NETWORK_SCORER_APP = "network_scorer_app"; 14406 14407 /** 14408 * Whether night display forced auto mode is available. 14409 * 0 = unavailable, 1 = available. 14410 * @hide 14411 */ 14412 @Readable 14413 public static final String NIGHT_DISPLAY_FORCED_AUTO_MODE_AVAILABLE = 14414 "night_display_forced_auto_mode_available"; 14415 14416 /** 14417 * If Unix epoch time between two NITZ signals is greater than this value then the second 14418 * signal cannot be ignored. 14419 * 14420 * <p>This value is in milliseconds. It is used for telephony-based time and time zone 14421 * detection. 14422 * @hide 14423 */ 14424 @Readable 14425 public static final String NITZ_UPDATE_DIFF = "nitz_update_diff"; 14426 14427 /** 14428 * If the elapsed realtime between two NITZ signals is greater than this value then the 14429 * second signal cannot be ignored. 14430 * 14431 * <p>This value is in milliseconds. It is used for telephony-based time and time zone 14432 * detection. 14433 * @hide 14434 */ 14435 @Readable 14436 public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing"; 14437 14438 /** 14439 * If the device connects to a telephony network and was disconnected from a telephony 14440 * network for less than this time, a previously received NITZ signal can be restored. 14441 * 14442 * <p>This value is in milliseconds. It is used for telephony-based time and time zone 14443 * detection. 14444 * @hide 14445 */ 14446 public static final String NITZ_NETWORK_DISCONNECT_RETENTION = 14447 "nitz_network_disconnect_retention"; 14448 14449 /** 14450 * SNTP client config: The preferred NTP server. This setting overrides the static 14451 * config.xml configuration when present and valid. 14452 * 14453 * <p>The legacy form is the NTP server name as a string. 14454 * <p>Newer code should use the form: ntp://{server name}[:port] (the standard NTP port, 14455 * 123, is used if not specified). 14456 * 14457 * <p>The settings value can consist of a pipe ("|") delimited list of server names or 14458 * ntp:// URIs. When present, all server name / ntp:// URIs must be valid or the entire 14459 * setting value will be ignored and Android's xml config will be used. 14460 * 14461 * <p>For example, the following examples are valid: 14462 * <ul> 14463 * <li>"time.android.com"</li> 14464 * <li>"ntp://time.android.com"</li> 14465 * <li>"ntp://time.android.com:123"</li> 14466 * <li>"time.android.com|time.other"</li> 14467 * <li>"ntp://time.android.com:123|ntp://time.other:123"</li> 14468 * <li>"time.android.com|ntp://time.other:123"</li> 14469 * </ul> 14470 * 14471 * @hide 14472 */ 14473 @Readable 14474 public static final String NTP_SERVER = "ntp_server"; 14475 14476 /** 14477 * SNTP client config: Timeout to wait for an NTP server response. This setting overrides 14478 * the static config.xml configuration when present and valid. 14479 * 14480 * <p>The value is the timeout in milliseconds. It must be > 0. 14481 * 14482 * @hide 14483 */ 14484 @Readable 14485 public static final String NTP_TIMEOUT = "ntp_timeout"; 14486 14487 /** {@hide} */ 14488 @Readable 14489 public static final String STORAGE_BENCHMARK_INTERVAL = "storage_benchmark_interval"; 14490 14491 /** 14492 * Whether or not Settings should enable psd API. 14493 * {@hide} 14494 */ 14495 @Readable 14496 public static final String SETTINGS_USE_PSD_API = "settings_use_psd_api"; 14497 14498 /** 14499 * Whether or not Settings should enable external provider API. 14500 * {@hide} 14501 */ 14502 @Readable 14503 public static final String SETTINGS_USE_EXTERNAL_PROVIDER_API = 14504 "settings_use_external_provider_api"; 14505 14506 /** 14507 * Sample validity in seconds to configure for the system DNS resolver. 14508 * {@hide} 14509 */ 14510 @Readable 14511 public static final String DNS_RESOLVER_SAMPLE_VALIDITY_SECONDS = 14512 "dns_resolver_sample_validity_seconds"; 14513 14514 /** 14515 * Success threshold in percent for use with the system DNS resolver. 14516 * {@hide} 14517 */ 14518 @Readable 14519 public static final String DNS_RESOLVER_SUCCESS_THRESHOLD_PERCENT = 14520 "dns_resolver_success_threshold_percent"; 14521 14522 /** 14523 * Minimum number of samples needed for statistics to be considered meaningful in the 14524 * system DNS resolver. 14525 * {@hide} 14526 */ 14527 @Readable 14528 public static final String DNS_RESOLVER_MIN_SAMPLES = "dns_resolver_min_samples"; 14529 14530 /** 14531 * Maximum number taken into account for statistics purposes in the system DNS resolver. 14532 * {@hide} 14533 */ 14534 @Readable 14535 public static final String DNS_RESOLVER_MAX_SAMPLES = "dns_resolver_max_samples"; 14536 14537 /** 14538 * Whether to disable the automatic scheduling of system updates. 14539 * 1 = system updates won't be automatically scheduled (will always 14540 * present notification instead). 14541 * 0 = system updates will be automatically scheduled. (default) 14542 * @hide 14543 */ 14544 @SystemApi 14545 @Readable 14546 public static final String OTA_DISABLE_AUTOMATIC_UPDATE = "ota_disable_automatic_update"; 14547 14548 14549 /** 14550 * Whether to boot with 16K page size compatible kernel 14551 * 1 = Boot with 16K kernel 14552 * 0 = Boot with 4K kernel (default) 14553 * @hide 14554 */ 14555 @Readable 14556 public static final String ENABLE_16K_PAGES = "enable_16k_pages"; 14557 14558 /** Timeout for package verification. 14559 * @hide */ 14560 @Readable 14561 public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout"; 14562 14563 /** Timeout for package verification during streaming installations. 14564 * @hide */ 14565 @Readable 14566 public static final String PACKAGE_STREAMING_VERIFIER_TIMEOUT = 14567 "streaming_verifier_timeout"; 14568 14569 /** Timeout for app integrity verification. 14570 * @hide */ 14571 @Readable 14572 public static final String APP_INTEGRITY_VERIFICATION_TIMEOUT = 14573 "app_integrity_verification_timeout"; 14574 14575 /** Default response code for package verification. 14576 * @hide */ 14577 @Readable 14578 public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response"; 14579 14580 /** 14581 * Show package verification setting in the Settings app. 14582 * 1 = show (default) 14583 * 0 = hide 14584 * @hide 14585 */ 14586 @Readable 14587 public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible"; 14588 14589 /** 14590 * Run package verification on apps installed through ADB/ADT/USB 14591 * 1 = perform package verification on ADB installs (default) 14592 * 0 = bypass package verification on ADB installs 14593 * @hide 14594 */ 14595 @Readable 14596 public static final String PACKAGE_VERIFIER_INCLUDE_ADB = "verifier_verify_adb_installs"; 14597 14598 /** 14599 * Run integrity checks for integrity rule providers. 14600 * 0 = bypass integrity verification on installs from rule providers (default) 14601 * 1 = perform integrity verification on installs from rule providers 14602 * @hide 14603 */ 14604 @Readable 14605 public static final String INTEGRITY_CHECK_INCLUDES_RULE_PROVIDER = 14606 "verify_integrity_for_rule_provider"; 14607 14608 /** 14609 * Time since last fstrim (milliseconds) after which we force one to happen 14610 * during device startup. If unset, the default is 3 days. 14611 * @hide 14612 */ 14613 @Readable 14614 public static final String FSTRIM_MANDATORY_INTERVAL = "fstrim_mandatory_interval"; 14615 14616 /** 14617 * The interval in milliseconds at which to check packet counts on the 14618 * mobile data interface when screen is on, to detect possible data 14619 * connection problems. 14620 * @hide 14621 */ 14622 @Readable 14623 public static final String PDP_WATCHDOG_POLL_INTERVAL_MS = 14624 "pdp_watchdog_poll_interval_ms"; 14625 14626 /** 14627 * The interval in milliseconds at which to check packet counts on the 14628 * mobile data interface when screen is off, to detect possible data 14629 * connection problems. 14630 * @hide 14631 */ 14632 @Readable 14633 public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS = 14634 "pdp_watchdog_long_poll_interval_ms"; 14635 14636 /** 14637 * The interval in milliseconds at which to check packet counts on the 14638 * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} 14639 * outgoing packets has been reached without incoming packets. 14640 * @hide 14641 */ 14642 @Readable 14643 public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS = 14644 "pdp_watchdog_error_poll_interval_ms"; 14645 14646 /** 14647 * The number of outgoing packets sent without seeing an incoming packet 14648 * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT} 14649 * device is logged to the event log 14650 * @hide 14651 */ 14652 @Readable 14653 public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT = 14654 "pdp_watchdog_trigger_packet_count"; 14655 14656 /** 14657 * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS}) 14658 * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before 14659 * attempting data connection recovery. 14660 * @hide 14661 */ 14662 @Readable 14663 public static final String PDP_WATCHDOG_ERROR_POLL_COUNT = 14664 "pdp_watchdog_error_poll_count"; 14665 14666 /** 14667 * The number of failed PDP reset attempts before moving to something more 14668 * drastic: re-registering to the network. 14669 * @hide 14670 */ 14671 @Readable 14672 public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT = 14673 "pdp_watchdog_max_pdp_reset_fail_count"; 14674 14675 /** 14676 * URL to open browser on to allow user to manage a prepay account 14677 * @hide 14678 */ 14679 @Readable 14680 public static final String SETUP_PREPAID_DATA_SERVICE_URL = 14681 "setup_prepaid_data_service_url"; 14682 14683 /** 14684 * URL to attempt a GET on to see if this is a prepay device 14685 * @hide 14686 */ 14687 @Readable 14688 public static final String SETUP_PREPAID_DETECTION_TARGET_URL = 14689 "setup_prepaid_detection_target_url"; 14690 14691 /** 14692 * Host to check for a redirect to after an attempt to GET 14693 * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there, 14694 * this is a prepaid device with zero balance.) 14695 * @hide 14696 */ 14697 @Readable 14698 public static final String SETUP_PREPAID_DETECTION_REDIR_HOST = 14699 "setup_prepaid_detection_redir_host"; 14700 14701 /** 14702 * The interval in milliseconds at which to check the number of SMS sent out without asking 14703 * for use permit, to limit the un-authorized SMS usage. 14704 * 14705 * @hide 14706 */ 14707 @Readable 14708 public static final String SMS_OUTGOING_CHECK_INTERVAL_MS = 14709 "sms_outgoing_check_interval_ms"; 14710 14711 /** 14712 * The number of outgoing SMS sent without asking for user permit (of {@link 14713 * #SMS_OUTGOING_CHECK_INTERVAL_MS} 14714 * 14715 * @hide 14716 */ 14717 @Readable 14718 public static final String SMS_OUTGOING_CHECK_MAX_COUNT = 14719 "sms_outgoing_check_max_count"; 14720 14721 /** 14722 * Used to disable SMS short code confirmation - defaults to true. 14723 * True indcates we will do the check, etc. Set to false to disable. 14724 * @see com.android.internal.telephony.SmsUsageMonitor 14725 * @hide 14726 */ 14727 @Readable 14728 public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation"; 14729 14730 /** 14731 * Used to select which country we use to determine premium sms codes. 14732 * One of com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_SIM, 14733 * com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_NETWORK, 14734 * or com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_BOTH. 14735 * @hide 14736 */ 14737 @Readable 14738 public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule"; 14739 14740 /** 14741 * Used to select TCP's default initial receiver window size in segments - defaults to a 14742 * build config value. 14743 * @hide 14744 */ 14745 @Readable 14746 public static final String TCP_DEFAULT_INIT_RWND = "tcp_default_init_rwnd"; 14747 14748 /** 14749 * Used to disable Tethering on a device - defaults to true. 14750 * @hide 14751 */ 14752 @SystemApi 14753 @Readable 14754 public static final String TETHER_SUPPORTED = "tether_supported"; 14755 14756 /** 14757 * Used to require DUN APN on the device or not - defaults to a build config value 14758 * which defaults to false. 14759 * @hide 14760 */ 14761 @Readable 14762 public static final String TETHER_DUN_REQUIRED = "tether_dun_required"; 14763 14764 /** 14765 * Used to hold a gservices-provisioned apn value for DUN. If set, or the 14766 * corresponding build config values are set it will override the APN DB 14767 * values. 14768 * Consists of a comma separated list of strings: 14769 * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type" 14770 * note that empty fields can be omitted: "name,apn,,,,,,,,,310,260,,DUN" 14771 * @hide 14772 */ 14773 @Readable 14774 public static final String TETHER_DUN_APN = "tether_dun_apn"; 14775 14776 /** 14777 * Used to disable trying to talk to any available tethering offload HAL. 14778 * 14779 * Integer values are interpreted as boolean, and the absence of an explicit setting 14780 * is interpreted as |false|. 14781 * @hide 14782 */ 14783 @SystemApi 14784 @Readable 14785 public static final String TETHER_OFFLOAD_DISABLED = "tether_offload_disabled"; 14786 14787 /** 14788 * Use the old dnsmasq DHCP server for tethering instead of the framework implementation. 14789 * 14790 * Integer values are interpreted as boolean, and the absence of an explicit setting 14791 * is interpreted as |false|. 14792 * @hide 14793 */ 14794 @Readable 14795 public static final String TETHER_ENABLE_LEGACY_DHCP_SERVER = 14796 "tether_enable_legacy_dhcp_server"; 14797 14798 /** 14799 * List of certificate (hex string representation of the application's certificate - SHA-1 14800 * or SHA-256) and carrier app package pairs which are allowlisted to prompt the user for 14801 * install when a sim card with matching UICC carrier privilege rules is inserted. The 14802 * certificate is used as a key, so the certificate encoding here must be the same as the 14803 * certificate encoding used on the SIM. 14804 * 14805 * The value is "cert1:package1;cert2:package2;..." 14806 * @hide 14807 */ 14808 @SystemApi 14809 @Readable 14810 public static final String CARRIER_APP_WHITELIST = "carrier_app_whitelist"; 14811 14812 /** 14813 * Map of package name to application names. The application names cannot and will not be 14814 * localized. App names may not contain colons or semicolons. 14815 * 14816 * The value is "packageName1:appName1;packageName2:appName2;..." 14817 * @hide 14818 */ 14819 @SystemApi 14820 @Readable 14821 public static final String CARRIER_APP_NAMES = "carrier_app_names"; 14822 14823 /** 14824 * USB Mass Storage Enabled 14825 */ 14826 @Readable 14827 public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled"; 14828 14829 /** 14830 * If this setting is set (to anything), then all references 14831 * to Gmail on the device must change to Google Mail. 14832 */ 14833 @Readable 14834 public static final String USE_GOOGLE_MAIL = "use_google_mail"; 14835 14836 /** 14837 * Whether or not switching/creating users is enabled by user. 14838 * @hide 14839 */ 14840 @Readable 14841 public static final String USER_SWITCHER_ENABLED = "user_switcher_enabled"; 14842 14843 /** 14844 * Webview Data reduction proxy key. 14845 * @hide 14846 */ 14847 @Readable 14848 public static final String WEBVIEW_DATA_REDUCTION_PROXY_KEY = 14849 "webview_data_reduction_proxy_key"; 14850 14851 /** 14852 * Name of the package used as WebView provider (if unset the provider is instead determined 14853 * by the system). 14854 * @hide 14855 */ 14856 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 14857 @Readable 14858 public static final String WEBVIEW_PROVIDER = "webview_provider"; 14859 14860 /** 14861 * Developer setting to enable WebView multiprocess rendering. 14862 * @hide 14863 */ 14864 @SystemApi 14865 @Readable 14866 public static final String WEBVIEW_MULTIPROCESS = "webview_multiprocess"; 14867 14868 /** 14869 * The maximum number of notifications shown in 24 hours when switching networks. 14870 * @hide 14871 */ 14872 @Readable 14873 public static final String NETWORK_SWITCH_NOTIFICATION_DAILY_LIMIT = 14874 "network_switch_notification_daily_limit"; 14875 14876 /** 14877 * The minimum time in milliseconds between notifications when switching networks. 14878 * @hide 14879 */ 14880 @Readable 14881 public static final String NETWORK_SWITCH_NOTIFICATION_RATE_LIMIT_MILLIS = 14882 "network_switch_notification_rate_limit_millis"; 14883 14884 /** 14885 * Whether to automatically switch away from wifi networks that lose Internet access. 14886 * Only meaningful if config_networkAvoidBadWifi is set to 0, otherwise the system always 14887 * avoids such networks. Valid values are: 14888 * 14889 * 0: Don't avoid bad wifi, don't prompt the user. Get stuck on bad wifi like it's 2013. 14890 * null: Ask the user whether to switch away from bad wifi. 14891 * 1: Avoid bad wifi. 14892 * 14893 * @hide 14894 */ 14895 @Readable 14896 public static final String NETWORK_AVOID_BAD_WIFI = "network_avoid_bad_wifi"; 14897 14898 /** 14899 * User setting for ConnectivityManager.getMeteredMultipathPreference(). This value may be 14900 * overridden by the system based on device or application state. If null, the value 14901 * specified by config_networkMeteredMultipathPreference is used. 14902 * 14903 * @hide 14904 */ 14905 @Readable 14906 public static final String NETWORK_METERED_MULTIPATH_PREFERENCE = 14907 "network_metered_multipath_preference"; 14908 14909 /** 14910 * Default daily multipath budget used by ConnectivityManager.getMultipathPreference() 14911 * on metered networks. This default quota is only used if quota could not be determined 14912 * from data plan or data limit/warning set by the user. 14913 * @hide 14914 */ 14915 @Readable 14916 public static final String NETWORK_DEFAULT_DAILY_MULTIPATH_QUOTA_BYTES = 14917 "network_default_daily_multipath_quota_bytes"; 14918 14919 /** 14920 * Network watchlist last report time. 14921 * @hide 14922 */ 14923 @Readable 14924 public static final String NETWORK_WATCHLIST_LAST_REPORT_TIME = 14925 "network_watchlist_last_report_time"; 14926 14927 /** 14928 * The thresholds of the wifi throughput badging (SD, HD etc.) as a comma-delimited list of 14929 * colon-delimited key-value pairs. The key is the badging enum value defined in 14930 * android.net.ScoredNetwork and the value is the minimum sustained network throughput in 14931 * kbps required for the badge. For example: "10:3000,20:5000,30:25000" 14932 * 14933 * @hide 14934 */ 14935 @SystemApi 14936 @Readable 14937 public static final String WIFI_BADGING_THRESHOLDS = "wifi_badging_thresholds"; 14938 14939 /** 14940 * Whether Wifi display is enabled/disabled 14941 * 0=disabled. 1=enabled. 14942 * @hide 14943 */ 14944 @Readable 14945 public static final String WIFI_DISPLAY_ON = "wifi_display_on"; 14946 14947 /** 14948 * Whether Wifi display certification mode is enabled/disabled 14949 * 0=disabled. 1=enabled. 14950 * @hide 14951 */ 14952 @Readable 14953 public static final String WIFI_DISPLAY_CERTIFICATION_ON = 14954 "wifi_display_certification_on"; 14955 14956 /** 14957 * WPS Configuration method used by Wifi display, this setting only 14958 * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled). 14959 * 14960 * Possible values are: 14961 * 14962 * WpsInfo.INVALID: use default WPS method chosen by framework 14963 * WpsInfo.PBC : use Push button 14964 * WpsInfo.KEYPAD : use Keypad 14965 * WpsInfo.DISPLAY: use Display 14966 * @hide 14967 */ 14968 @Readable 14969 public static final String WIFI_DISPLAY_WPS_CONFIG = 14970 "wifi_display_wps_config"; 14971 14972 /** 14973 * Whether to notify the user of open networks. 14974 * <p> 14975 * If not connected and the scan results have an open network, we will 14976 * put this notification up. If we attempt to connect to a network or 14977 * the open network(s) disappear, we remove the notification. When we 14978 * show the notification, we will not show it again for 14979 * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time. 14980 * 14981 * @deprecated This feature is no longer controlled by this setting in 14982 * {@link android.os.Build.VERSION_CODES#O}. 14983 */ 14984 @Deprecated 14985 @Readable 14986 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = 14987 "wifi_networks_available_notification_on"; 14988 14989 /** 14990 * {@hide} 14991 */ 14992 @Readable 14993 public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON = 14994 "wimax_networks_available_notification_on"; 14995 14996 /** 14997 * Delay (in seconds) before repeating the Wi-Fi networks available notification. 14998 * Connecting to a network will reset the timer. 14999 * @deprecated This is no longer used or set by the platform. 15000 */ 15001 @Deprecated 15002 @Readable 15003 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = 15004 "wifi_networks_available_repeat_delay"; 15005 15006 /** 15007 * 802.11 country code in ISO 3166 format 15008 * @hide 15009 */ 15010 @Readable 15011 public static final String WIFI_COUNTRY_CODE = "wifi_country_code"; 15012 15013 /** 15014 * The interval in milliseconds to issue wake up scans when wifi needs 15015 * to connect. This is necessary to connect to an access point when 15016 * device is on the move and the screen is off. 15017 * @hide 15018 */ 15019 @Readable 15020 public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS = 15021 "wifi_framework_scan_interval_ms"; 15022 15023 /** 15024 * The interval in milliseconds after which Wi-Fi is considered idle. 15025 * When idle, it is possible for the device to be switched from Wi-Fi to 15026 * the mobile data network. 15027 * @hide 15028 */ 15029 @Readable 15030 public static final String WIFI_IDLE_MS = "wifi_idle_ms"; 15031 15032 /** 15033 * When the number of open networks exceeds this number, the 15034 * least-recently-used excess networks will be removed. 15035 * @deprecated This is no longer used or set by the platform. 15036 */ 15037 @Deprecated 15038 @Readable 15039 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept"; 15040 15041 /** 15042 * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this. 15043 */ 15044 @Readable 15045 public static final String WIFI_ON = "wifi_on"; 15046 15047 /** 15048 * Setting to allow scans to be enabled even wifi is turned off for connectivity. 15049 * @hide 15050 * @deprecated To be removed. Use {@link WifiManager#setScanAlwaysAvailable(boolean)} for 15051 * setting the value and {@link WifiManager#isScanAlwaysAvailable()} for query. 15052 */ 15053 @Deprecated 15054 @Readable 15055 public static final String WIFI_SCAN_ALWAYS_AVAILABLE = 15056 "wifi_scan_always_enabled"; 15057 15058 /** 15059 * Indicate whether factory reset request is pending. 15060 * 15061 * Type: int (0 for false, 1 for true) 15062 * @hide 15063 * @deprecated To be removed. 15064 */ 15065 @Deprecated 15066 @Readable 15067 public static final String WIFI_P2P_PENDING_FACTORY_RESET = 15068 "wifi_p2p_pending_factory_reset"; 15069 15070 /** 15071 * Whether soft AP will shut down after a timeout period when no devices are connected. 15072 * 15073 * Type: int (0 for false, 1 for true) 15074 * @hide 15075 * @deprecated To be removed. Use {@link SoftApConfiguration.Builder# 15076 * setAutoShutdownEnabled(boolean)} for setting the value and {@link SoftApConfiguration# 15077 * isAutoShutdownEnabled()} for query. 15078 */ 15079 @Deprecated 15080 @Readable 15081 public static final String SOFT_AP_TIMEOUT_ENABLED = "soft_ap_timeout_enabled"; 15082 15083 /** 15084 * Value to specify if Wi-Fi Wakeup feature is enabled. 15085 * 15086 * Type: int (0 for false, 1 for true) 15087 * @hide 15088 * @deprecated Use {@link WifiManager#setAutoWakeupEnabled(boolean)} for setting the value 15089 * and {@link WifiManager#isAutoWakeupEnabled()} for query. 15090 */ 15091 @Deprecated 15092 @SystemApi 15093 @Readable 15094 public static final String WIFI_WAKEUP_ENABLED = "wifi_wakeup_enabled"; 15095 15096 /** 15097 * Value to specify if wifi settings migration is complete or not. 15098 * Note: This should only be used from within {@link android.net.wifi.WifiMigration} class. 15099 * 15100 * Type: int (0 for false, 1 for true) 15101 * @hide 15102 */ 15103 @Readable 15104 public static final String WIFI_MIGRATION_COMPLETED = "wifi_migration_completed"; 15105 15106 /** 15107 * Whether UWB should be enabled. 15108 * @hide 15109 */ 15110 public static final String UWB_ENABLED = "uwb_enabled"; 15111 15112 /** 15113 * Value to specify whether network quality scores and badging should be shown in the UI. 15114 * 15115 * Type: int (0 for false, 1 for true) 15116 * @deprecated {@link NetworkScoreManager} is deprecated. 15117 * @hide 15118 */ 15119 @Deprecated 15120 @Readable 15121 public static final String NETWORK_SCORING_UI_ENABLED = "network_scoring_ui_enabled"; 15122 15123 /** 15124 * Value to specify how long in milliseconds to retain seen score cache curves to be used 15125 * when generating SSID only bases score curves. 15126 * 15127 * Type: long 15128 * @deprecated {@link NetworkScoreManager} is deprecated. 15129 * @hide 15130 */ 15131 @Deprecated 15132 @Readable 15133 public static final String SPEED_LABEL_CACHE_EVICTION_AGE_MILLIS = 15134 "speed_label_cache_eviction_age_millis"; 15135 15136 /** 15137 * Value to specify if network recommendations from 15138 * {@link com.android.server.NetworkScoreService} are enabled. 15139 * 15140 * Type: int 15141 * Valid values: 15142 * -1 = Forced off 15143 * 0 = Disabled 15144 * 1 = Enabled 15145 * 15146 * Most readers of this setting should simply check if value == 1 to determine the 15147 * enabled state. 15148 * @hide 15149 * @deprecated To be removed. 15150 */ 15151 @Deprecated 15152 @Readable 15153 public static final String NETWORK_RECOMMENDATIONS_ENABLED = 15154 "network_recommendations_enabled"; 15155 15156 /** 15157 * Which package name to use for network recommendations. If null, network recommendations 15158 * will neither be requested nor accepted. 15159 * 15160 * Use {@link NetworkScoreManager#getActiveScorerPackage()} to read this value and 15161 * {@link NetworkScoreManager#setActiveScorer(String)} to write it. 15162 * 15163 * Type: string - package name 15164 * @deprecated {@link NetworkScoreManager} is deprecated. 15165 * @hide 15166 */ 15167 @Deprecated 15168 @Readable 15169 public static final String NETWORK_RECOMMENDATIONS_PACKAGE = 15170 "network_recommendations_package"; 15171 15172 /** 15173 * The package name of the application that connect and secures high quality open wifi 15174 * networks automatically. 15175 * 15176 * Type: string package name or null if the feature is either not provided or disabled. 15177 * @deprecated {@link NetworkScoreManager} is deprecated. 15178 * @hide 15179 */ 15180 @Deprecated 15181 @TestApi 15182 @Readable 15183 public static final String USE_OPEN_WIFI_PACKAGE = "use_open_wifi_package"; 15184 15185 /** 15186 * The expiration time in milliseconds for the {@link android.net.WifiKey} request cache in 15187 * {@link com.android.server.wifi.RecommendedNetworkEvaluator}. 15188 * 15189 * Type: long 15190 * @deprecated {@link NetworkScoreManager} is deprecated. 15191 * @hide 15192 */ 15193 @Deprecated 15194 @Readable 15195 public static final String RECOMMENDED_NETWORK_EVALUATOR_CACHE_EXPIRY_MS = 15196 "recommended_network_evaluator_cache_expiry_ms"; 15197 15198 /** 15199 * Whether wifi scan throttle is enabled or not. 15200 * 15201 * Type: int (0 for false, 1 for true) 15202 * @hide 15203 * @deprecated Use {@link WifiManager#setScanThrottleEnabled(boolean)} for setting the value 15204 * and {@link WifiManager#isScanThrottleEnabled()} for query. 15205 */ 15206 @Deprecated 15207 @Readable 15208 public static final String WIFI_SCAN_THROTTLE_ENABLED = "wifi_scan_throttle_enabled"; 15209 15210 /** 15211 * Settings to allow BLE scans to be enabled even when Bluetooth is turned off for 15212 * connectivity. 15213 * @hide 15214 */ 15215 @Readable 15216 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 15217 @SuppressLint("NoSettingsProvider") 15218 public static final String BLE_SCAN_ALWAYS_AVAILABLE = "ble_scan_always_enabled"; 15219 15220 /** 15221 * The length in milliseconds of a BLE scan window in a low-power scan mode. 15222 * @hide 15223 */ 15224 @Readable 15225 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 15226 @SuppressLint("NoSettingsProvider") 15227 public static final String BLE_SCAN_LOW_POWER_WINDOW_MS = "ble_scan_low_power_window_ms"; 15228 15229 /** 15230 * The length in milliseconds of a BLE scan window in a balanced scan mode. 15231 * @hide 15232 */ 15233 @Readable 15234 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 15235 @SuppressLint("NoSettingsProvider") 15236 public static final String BLE_SCAN_BALANCED_WINDOW_MS = "ble_scan_balanced_window_ms"; 15237 15238 /** 15239 * The length in milliseconds of a BLE scan window in a low-latency scan mode. 15240 * @hide 15241 */ 15242 @Readable 15243 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 15244 @SuppressLint("NoSettingsProvider") 15245 public static final String BLE_SCAN_LOW_LATENCY_WINDOW_MS = 15246 "ble_scan_low_latency_window_ms"; 15247 15248 /** 15249 * The length in milliseconds of a BLE scan interval in a low-power scan mode. 15250 * @hide 15251 */ 15252 @Readable 15253 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 15254 @SuppressLint("NoSettingsProvider") 15255 public static final String BLE_SCAN_LOW_POWER_INTERVAL_MS = 15256 "ble_scan_low_power_interval_ms"; 15257 15258 /** 15259 * The length in milliseconds of a BLE scan interval in a balanced scan mode. 15260 * @hide 15261 */ 15262 @Readable 15263 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 15264 @SuppressLint("NoSettingsProvider") 15265 public static final String BLE_SCAN_BALANCED_INTERVAL_MS = 15266 "ble_scan_balanced_interval_ms"; 15267 15268 /** 15269 * The length in milliseconds of a BLE scan interval in a low-latency scan mode. 15270 * @hide 15271 */ 15272 @Readable 15273 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 15274 @SuppressLint("NoSettingsProvider") 15275 public static final String BLE_SCAN_LOW_LATENCY_INTERVAL_MS = 15276 "ble_scan_low_latency_interval_ms"; 15277 15278 /** 15279 * The mode that BLE scanning clients will be moved to when in the background. 15280 * @hide 15281 */ 15282 @Readable 15283 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 15284 @SuppressLint("NoSettingsProvider") 15285 public static final String BLE_SCAN_BACKGROUND_MODE = "ble_scan_background_mode"; 15286 15287 /** 15288 * The interval in milliseconds to scan as used by the wifi supplicant 15289 * @hide 15290 */ 15291 @Readable 15292 public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS = 15293 "wifi_supplicant_scan_interval_ms"; 15294 15295 /** 15296 * whether frameworks handles wifi auto-join 15297 * @hide 15298 */ 15299 @Readable 15300 public static final String WIFI_ENHANCED_AUTO_JOIN = 15301 "wifi_enhanced_auto_join"; 15302 15303 /** 15304 * whether settings show RSSI 15305 * @hide 15306 */ 15307 @Readable 15308 public static final String WIFI_NETWORK_SHOW_RSSI = 15309 "wifi_network_show_rssi"; 15310 15311 /** 15312 * The interval in milliseconds to scan at supplicant when p2p is connected 15313 * @hide 15314 */ 15315 @Readable 15316 public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS = 15317 "wifi_scan_interval_p2p_connected_ms"; 15318 15319 /** 15320 * Whether the Wi-Fi watchdog is enabled. 15321 */ 15322 @Readable 15323 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; 15324 15325 /** 15326 * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and 15327 * the setting needs to be set to 0 to disable it. 15328 * @hide 15329 */ 15330 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 15331 @Readable 15332 public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED = 15333 "wifi_watchdog_poor_network_test_enabled"; 15334 15335 /** 15336 * Setting to enable verbose logging in Wi-Fi; disabled by default, and setting to 1 15337 * will enable it. In the future, additional values may be supported. 15338 * @hide 15339 * @deprecated Use {@link WifiManager#setVerboseLoggingEnabled(boolean)} for setting the 15340 * value and {@link WifiManager#isVerboseLoggingEnabled()} for query. 15341 */ 15342 @Deprecated 15343 @Readable 15344 public static final String WIFI_VERBOSE_LOGGING_ENABLED = 15345 "wifi_verbose_logging_enabled"; 15346 15347 /** 15348 * Setting to enable connected MAC randomization in Wi-Fi; disabled by default, and 15349 * setting to 1 will enable it. In the future, additional values may be supported. 15350 * @deprecated MAC randomization is now a per-network setting 15351 * @hide 15352 */ 15353 @Deprecated 15354 @Readable 15355 public static final String WIFI_CONNECTED_MAC_RANDOMIZATION_ENABLED = 15356 "wifi_connected_mac_randomization_enabled"; 15357 15358 /** 15359 * Parameters to adjust the performance of framework wifi scoring methods. 15360 * <p> 15361 * Encoded as a comma-separated key=value list, for example: 15362 * "rssi5=-80:-77:-70:-57,rssi2=-83:-80:-73:-60,horizon=15" 15363 * This is intended for experimenting with new parameter values, 15364 * and is normally unset or empty. The example does not include all 15365 * parameters that may be honored. 15366 * Default values are provided by code or device configurations. 15367 * Errors in the parameters will cause the entire setting to be ignored. 15368 * @hide 15369 * @deprecated This is no longer used or set by the platform. 15370 */ 15371 @Deprecated 15372 @Readable 15373 public static final String WIFI_SCORE_PARAMS = 15374 "wifi_score_params"; 15375 15376 /** 15377 * The maximum number of times we will retry a connection to an access 15378 * point for which we have failed in acquiring an IP address from DHCP. 15379 * A value of N means that we will make N+1 connection attempts in all. 15380 */ 15381 @Readable 15382 public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; 15383 15384 /** 15385 * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile 15386 * data connectivity to be established after a disconnect from Wi-Fi. 15387 */ 15388 @Readable 15389 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = 15390 "wifi_mobile_data_transition_wakelock_timeout_ms"; 15391 15392 /** 15393 * This setting controls whether WiFi configurations created by a Device Owner app 15394 * should be locked down (that is, be editable or removable only by the Device Owner App, 15395 * not even by Settings app). 15396 * This setting takes integer values. Non-zero values mean DO created configurations 15397 * are locked down. Value of zero means they are not. Default value in the absence of 15398 * actual value to this setting is 0. 15399 */ 15400 @Readable 15401 public static final String WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN = 15402 "wifi_device_owner_configs_lockdown"; 15403 15404 /** 15405 * The operational wifi frequency band 15406 * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO}, 15407 * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or 15408 * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ} 15409 * 15410 * @hide 15411 */ 15412 @Readable 15413 public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band"; 15414 15415 /** 15416 * The Wi-Fi peer-to-peer device name 15417 * @hide 15418 * @deprecated Use {@link WifiP2pManager#setDeviceName(WifiP2pManager.Channel, String, 15419 * WifiP2pManager.ActionListener)} for setting the value and 15420 * {@link android.net.wifi.p2p.WifiP2pDevice#deviceName} for query. 15421 */ 15422 @Deprecated 15423 @Readable 15424 public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name"; 15425 15426 /** 15427 * Timeout for ephemeral networks when all known BSSIDs go out of range. We will disconnect 15428 * from an ephemeral network if there is no BSSID for that network with a non-null score that 15429 * has been seen in this time period. 15430 * 15431 * If this is less than or equal to zero, we use a more conservative behavior and only check 15432 * for a non-null score from the currently connected or target BSSID. 15433 * @hide 15434 */ 15435 @Readable 15436 public static final String WIFI_EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS = 15437 "wifi_ephemeral_out_of_range_timeout_ms"; 15438 15439 /** 15440 * The number of milliseconds to delay when checking for data stalls during 15441 * non-aggressive detection. (screen is turned off.) 15442 * @hide 15443 */ 15444 @Readable 15445 public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS = 15446 "data_stall_alarm_non_aggressive_delay_in_ms"; 15447 15448 /** 15449 * The number of milliseconds to delay when checking for data stalls during 15450 * aggressive detection. (screen on or suspected data stall) 15451 * @hide 15452 */ 15453 @Readable 15454 public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS = 15455 "data_stall_alarm_aggressive_delay_in_ms"; 15456 15457 /** 15458 * The number of milliseconds to allow the provisioning apn to remain active 15459 * @hide 15460 */ 15461 @Readable 15462 public static final String PROVISIONING_APN_ALARM_DELAY_IN_MS = 15463 "provisioning_apn_alarm_delay_in_ms"; 15464 15465 /** 15466 * The interval in milliseconds at which to check gprs registration 15467 * after the first registration mismatch of gprs and voice service, 15468 * to detect possible data network registration problems. 15469 * 15470 * @hide 15471 */ 15472 @Readable 15473 public static final String GPRS_REGISTER_CHECK_PERIOD_MS = 15474 "gprs_register_check_period_ms"; 15475 15476 /** 15477 * Nonzero causes Log.wtf() to crash. 15478 * @hide 15479 */ 15480 @Readable 15481 public static final String WTF_IS_FATAL = "wtf_is_fatal"; 15482 15483 /** 15484 * Ringer mode. This is used internally, changing this value will not 15485 * change the ringer mode. See AudioManager. 15486 */ 15487 @Readable 15488 public static final String MODE_RINGER = "mode_ringer"; 15489 15490 /** 15491 * Whether or not Alarm stream should always be muted with Ringer. 15492 * 15493 * @hide 15494 */ 15495 @Readable 15496 public static final String MUTE_ALARM_STREAM_WITH_RINGER_MODE = 15497 "mute_alarm_stream_with_ringer_mode"; 15498 15499 /** 15500 * The user's choice for whether or not Alarm stream should always be muted with Ringer. 15501 * 15502 * <p>Note that this is different from {@link #MUTE_ALARM_STREAM_WITH_RINGER_MODE}, which 15503 * controls the real state of whether or not the Alarm stream and Ringer association occurs. 15504 * The two Settings are not necessarily equal, if the final decision for the association 15505 * depends on factors beyond the user's preference. 15506 * 15507 * @hide 15508 */ 15509 public static final String MUTE_ALARM_STREAM_WITH_RINGER_MODE_USER_PREFERENCE = 15510 "mute_alarm_stream_with_ringer_mode_user_preference"; 15511 15512 /** 15513 * Overlay display devices setting. 15514 * The associated value is a specially formatted string that describes the 15515 * size and density of simulated secondary display devices. 15516 * <p> 15517 * Format: 15518 * <pre> 15519 * [display1];[display2];... 15520 * </pre> 15521 * with each display specified as: 15522 * <pre> 15523 * [mode1]|[mode2]|...,[flag1],[flag2],... 15524 * </pre> 15525 * with each mode specified as: 15526 * <pre> 15527 * [width]x[height]/[densityDpi] 15528 * </pre> 15529 * Supported flags: 15530 * <ul> 15531 * <li><pre>secure</pre>: creates a secure display</li> 15532 * <li><pre>own_content_only</pre>: only shows this display's own content</li> 15533 * <li><pre>should_show_system_decorations</pre>: always shows system decorations</li> 15534 * <li><pre>fixed_content_mode</pre>: does not allow the content mode switch</li> 15535 * </ul> 15536 * </p><p> 15537 * Example: 15538 * <ul> 15539 * <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li> 15540 * <li><code>1920x1080/320,secure;1280x720/213</code>: make two overlays, the first at 15541 * 1080p and secure; the second at 720p.</li> 15542 * <li><code>1920x1080/320|3840x2160/640</code>: make one overlay that is 1920x1080 at 15543 * 213dpi by default, but can also be upscaled to 3840x2160 at 640dpi by the system if the 15544 * display device allows.</li> 15545 * <li>If the value is empty, then no overlay display devices are created.</li> 15546 * </ul></p> 15547 * 15548 * @hide 15549 */ 15550 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 15551 @TestApi 15552 @Readable 15553 public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices"; 15554 15555 /** 15556 * Threshold values for the duration and level of a discharge cycle, 15557 * under which we log discharge cycle info. 15558 * 15559 * @hide 15560 */ 15561 @Readable 15562 public static final String 15563 BATTERY_DISCHARGE_DURATION_THRESHOLD = "battery_discharge_duration_threshold"; 15564 15565 /** @hide */ 15566 @Readable 15567 public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold"; 15568 15569 /** 15570 * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR 15571 * intents on application crashes and ANRs. If this is disabled, the 15572 * crash/ANR dialog will never display the "Report" button. 15573 * <p> 15574 * Type: int (0 = disallow, 1 = allow) 15575 * 15576 * @hide 15577 */ 15578 @Readable 15579 public static final String SEND_ACTION_APP_ERROR = "send_action_app_error"; 15580 15581 /** 15582 * Maximum age of entries kept by {@link DropBoxManager}. 15583 * 15584 * @hide 15585 */ 15586 @Readable 15587 public static final String DROPBOX_AGE_SECONDS = "dropbox_age_seconds"; 15588 15589 /** 15590 * Maximum number of entry files which {@link DropBoxManager} will keep 15591 * around. 15592 * 15593 * @hide 15594 */ 15595 @Readable 15596 public static final String DROPBOX_MAX_FILES = "dropbox_max_files"; 15597 15598 /** 15599 * Maximum amount of disk space used by {@link DropBoxManager} no matter 15600 * what. 15601 * 15602 * @hide 15603 */ 15604 @Readable 15605 public static final String DROPBOX_QUOTA_KB = "dropbox_quota_kb"; 15606 15607 /** 15608 * Percent of free disk (excluding reserve) which {@link DropBoxManager} 15609 * will use. 15610 * 15611 * @hide 15612 */ 15613 @Readable 15614 public static final String DROPBOX_QUOTA_PERCENT = "dropbox_quota_percent"; 15615 15616 /** 15617 * Percent of total disk which {@link DropBoxManager} will never dip 15618 * into. 15619 * 15620 * @hide 15621 */ 15622 @Readable 15623 public static final String DROPBOX_RESERVE_PERCENT = "dropbox_reserve_percent"; 15624 15625 /** 15626 * Prefix for per-tag dropbox disable/enable settings. 15627 * 15628 * @hide 15629 */ 15630 @Readable 15631 public static final String DROPBOX_TAG_PREFIX = "dropbox:"; 15632 15633 /** 15634 * Lines of kernel logs to include with system crash/ANR/etc. reports, as a 15635 * prefix of the dropbox tag of the report type. For example, 15636 * "kernel_logs_for_system_server_anr" controls the lines of kernel logs 15637 * captured with system server ANR reports. 0 to disable. 15638 * 15639 * @hide 15640 */ 15641 @Readable 15642 public static final String ERROR_KERNEL_LOG_PREFIX = "kernel_logs_for_"; 15643 15644 /** 15645 * Lines of logcat to include with system crash/ANR/etc. reports, as a 15646 * prefix of the dropbox tag of the report type. For example, 15647 * "logcat_for_system_server_anr" controls the lines of logcat captured 15648 * with system server ANR reports. 0 to disable. 15649 * 15650 * @hide 15651 */ 15652 @Readable 15653 public static final String ERROR_LOGCAT_PREFIX = "logcat_for_"; 15654 15655 /** 15656 * Maximum number of bytes of a system crash/ANR/etc. report that 15657 * ActivityManagerService should send to DropBox, as a prefix of the 15658 * dropbox tag of the report type. For example, 15659 * "max_error_bytes_for_system_server_anr" controls the maximum 15660 * number of bytes captured with system server ANR reports. 15661 * <p> 15662 * Type: int (max size in bytes) 15663 * 15664 * @hide 15665 */ 15666 @Readable 15667 public static final String MAX_ERROR_BYTES_PREFIX = "max_error_bytes_for_"; 15668 15669 /** 15670 * The interval in minutes after which the amount of free storage left 15671 * on the device is logged to the event log 15672 * 15673 * @hide 15674 */ 15675 @Readable 15676 public static final String SYS_FREE_STORAGE_LOG_INTERVAL = "sys_free_storage_log_interval"; 15677 15678 /** 15679 * Threshold for the amount of change in disk free space required to 15680 * report the amount of free space. Used to prevent spamming the logs 15681 * when the disk free space isn't changing frequently. 15682 * 15683 * @hide 15684 */ 15685 @Readable 15686 public static final String 15687 DISK_FREE_CHANGE_REPORTING_THRESHOLD = "disk_free_change_reporting_threshold"; 15688 15689 /** 15690 * Minimum percentage of free storage on the device that is used to 15691 * determine if the device is running low on storage. The default is 10. 15692 * <p> 15693 * Say this value is set to 10, the device is considered running low on 15694 * storage if 90% or more of the device storage is filled up. 15695 * 15696 * @hide 15697 */ 15698 @Readable 15699 public static final String 15700 SYS_STORAGE_THRESHOLD_PERCENTAGE = "sys_storage_threshold_percentage"; 15701 15702 /** 15703 * Maximum byte size of the low storage threshold. This is to ensure 15704 * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in an 15705 * overly large threshold for large storage devices. Currently this must 15706 * be less than 2GB. This default is 500MB. 15707 * 15708 * @hide 15709 */ 15710 @Readable 15711 public static final String 15712 SYS_STORAGE_THRESHOLD_MAX_BYTES = "sys_storage_threshold_max_bytes"; 15713 15714 /** 15715 * Minimum bytes of free storage on the device before the data partition 15716 * is considered full. By default, 1 MB is reserved to avoid system-wide 15717 * SQLite disk full exceptions. 15718 * 15719 * @hide 15720 */ 15721 @Readable 15722 public static final String 15723 SYS_STORAGE_FULL_THRESHOLD_BYTES = "sys_storage_full_threshold_bytes"; 15724 15725 /** 15726 * Minimum percentage of storage on the device that is reserved for 15727 * cached data. 15728 * 15729 * @hide 15730 */ 15731 @Readable 15732 public static final String 15733 SYS_STORAGE_CACHE_PERCENTAGE = "sys_storage_cache_percentage"; 15734 15735 /** 15736 * The maximum reconnect delay for short network outages or when the 15737 * network is suspended due to phone use. 15738 * 15739 * @hide 15740 */ 15741 @Readable 15742 public static final String 15743 SYNC_MAX_RETRY_DELAY_IN_SECONDS = "sync_max_retry_delay_in_seconds"; 15744 15745 /** 15746 * The number of milliseconds to delay before sending out 15747 * {@link ConnectivityManager#CONNECTIVITY_ACTION} broadcasts. Ignored. 15748 * 15749 * @hide 15750 */ 15751 @Readable 15752 public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay"; 15753 15754 15755 /** 15756 * Network sampling interval, in seconds. We'll generate link information 15757 * about bytes/packets sent and error rates based on data sampled in this interval 15758 * 15759 * @hide 15760 */ 15761 @Readable 15762 public static final String CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS = 15763 "connectivity_sampling_interval_in_seconds"; 15764 15765 /** 15766 * The series of successively longer delays used in retrying to download PAC file. 15767 * Last delay is used between successful PAC downloads. 15768 * 15769 * @hide 15770 */ 15771 @Readable 15772 public static final String PAC_CHANGE_DELAY = "pac_change_delay"; 15773 15774 /** 15775 * Don't attempt to detect captive portals. 15776 * 15777 * @hide 15778 */ 15779 public static final int CAPTIVE_PORTAL_MODE_IGNORE = 0; 15780 15781 /** 15782 * When detecting a captive portal, display a notification that 15783 * prompts the user to sign in. 15784 * 15785 * @hide 15786 */ 15787 public static final int CAPTIVE_PORTAL_MODE_PROMPT = 1; 15788 15789 /** 15790 * When detecting a captive portal, immediately disconnect from the 15791 * network and do not reconnect to that network in the future. 15792 * 15793 * @hide 15794 */ 15795 public static final int CAPTIVE_PORTAL_MODE_AVOID = 2; 15796 15797 /** 15798 * What to do when connecting a network that presents a captive portal. 15799 * Must be one of the CAPTIVE_PORTAL_MODE_* constants above. 15800 * 15801 * The default for this setting is CAPTIVE_PORTAL_MODE_PROMPT. 15802 * @hide 15803 */ 15804 @Readable 15805 public static final String CAPTIVE_PORTAL_MODE = "captive_portal_mode"; 15806 15807 /** 15808 * Setting to turn off captive portal detection. Feature is enabled by 15809 * default and the setting needs to be set to 0 to disable it. 15810 * 15811 * @deprecated use CAPTIVE_PORTAL_MODE_IGNORE to disable captive portal detection 15812 * @hide 15813 */ 15814 @Deprecated 15815 @Readable 15816 public static final String 15817 CAPTIVE_PORTAL_DETECTION_ENABLED = "captive_portal_detection_enabled"; 15818 15819 /** 15820 * The server used for captive portal detection upon a new conection. A 15821 * 204 response code from the server is used for validation. 15822 * TODO: remove this deprecated symbol. 15823 * 15824 * @hide 15825 */ 15826 @Readable 15827 public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server"; 15828 15829 /** 15830 * The URL used for HTTPS captive portal detection upon a new connection. 15831 * A 204 response code from the server is used for validation. 15832 * 15833 * @hide 15834 */ 15835 @Readable 15836 public static final String CAPTIVE_PORTAL_HTTPS_URL = "captive_portal_https_url"; 15837 15838 /** 15839 * The URL used for HTTP captive portal detection upon a new connection. 15840 * A 204 response code from the server is used for validation. 15841 * 15842 * @hide 15843 */ 15844 @Readable 15845 public static final String CAPTIVE_PORTAL_HTTP_URL = "captive_portal_http_url"; 15846 15847 /** 15848 * The URL used for fallback HTTP captive portal detection when previous HTTP 15849 * and HTTPS captive portal detection attemps did not return a conclusive answer. 15850 * 15851 * @hide 15852 */ 15853 @Readable 15854 public static final String CAPTIVE_PORTAL_FALLBACK_URL = "captive_portal_fallback_url"; 15855 15856 /** 15857 * A comma separated list of URLs used for captive portal detection in addition to the 15858 * fallback HTTP url associated with the CAPTIVE_PORTAL_FALLBACK_URL settings. 15859 * 15860 * @hide 15861 */ 15862 @Readable 15863 public static final String CAPTIVE_PORTAL_OTHER_FALLBACK_URLS = 15864 "captive_portal_other_fallback_urls"; 15865 15866 /** 15867 * A list of captive portal detection specifications used in addition to the fallback URLs. 15868 * Each spec has the format url@@/@@statusCodeRegex@@/@@contentRegex. Specs are separated 15869 * by "@@,@@". 15870 * @hide 15871 */ 15872 @Readable 15873 public static final String CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS = 15874 "captive_portal_fallback_probe_specs"; 15875 15876 /** 15877 * Whether to use HTTPS for network validation. This is enabled by default and the setting 15878 * needs to be set to 0 to disable it. This setting is a misnomer because captive portals 15879 * don't actually use HTTPS, but it's consistent with the other settings. 15880 * 15881 * @hide 15882 */ 15883 @Readable 15884 public static final String CAPTIVE_PORTAL_USE_HTTPS = "captive_portal_use_https"; 15885 15886 /** 15887 * Which User-Agent string to use in the header of the captive portal detection probes. 15888 * The User-Agent field is unset when this setting has no value (HttpUrlConnection default). 15889 * 15890 * @hide 15891 */ 15892 @Readable 15893 public static final String CAPTIVE_PORTAL_USER_AGENT = "captive_portal_user_agent"; 15894 15895 /** 15896 * Whether to try cellular data recovery when a bad network is reported. 15897 * 15898 * @hide 15899 */ 15900 @Readable 15901 public static final String DATA_STALL_RECOVERY_ON_BAD_NETWORK = 15902 "data_stall_recovery_on_bad_network"; 15903 15904 /** 15905 * Minumim duration in millisecodns between cellular data recovery attempts 15906 * 15907 * @hide 15908 */ 15909 @Readable 15910 public static final String MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS = 15911 "min_duration_between_recovery_steps"; 15912 15913 /** 15914 * Let user pick default install location. 15915 * 15916 * @hide 15917 */ 15918 @Readable 15919 public static final String SET_INSTALL_LOCATION = "set_install_location"; 15920 15921 /** 15922 * Default install location value. 15923 * 0 = auto, let system decide 15924 * 1 = internal 15925 * 2 = sdcard 15926 * @hide 15927 */ 15928 @Readable 15929 public static final String DEFAULT_INSTALL_LOCATION = "default_install_location"; 15930 15931 /** 15932 * ms during which to consume extra events related to Inet connection 15933 * condition after a transtion to fully-connected 15934 * 15935 * @hide 15936 */ 15937 @Readable 15938 public static final String 15939 INET_CONDITION_DEBOUNCE_UP_DELAY = "inet_condition_debounce_up_delay"; 15940 15941 /** 15942 * ms during which to consume extra events related to Inet connection 15943 * condtion after a transtion to partly-connected 15944 * 15945 * @hide 15946 */ 15947 @Readable 15948 public static final String 15949 INET_CONDITION_DEBOUNCE_DOWN_DELAY = "inet_condition_debounce_down_delay"; 15950 15951 /** {@hide} */ 15952 @Readable 15953 public static final String 15954 READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default"; 15955 15956 /** 15957 * Host name and port for global http proxy. Uses ':' seperator for 15958 * between host and port. 15959 */ 15960 @Readable 15961 public static final String HTTP_PROXY = "http_proxy"; 15962 15963 /** 15964 * Host name for global http proxy. Set via ConnectivityManager. 15965 * 15966 * @hide 15967 */ 15968 @Readable 15969 public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host"; 15970 15971 /** 15972 * Integer host port for global http proxy. Set via ConnectivityManager. 15973 * 15974 * @hide 15975 */ 15976 @Readable 15977 public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port"; 15978 15979 /** 15980 * Exclusion list for global proxy. This string contains a list of 15981 * comma-separated domains where the global proxy does not apply. 15982 * Domains should be listed in a comma- separated list. Example of 15983 * acceptable formats: ".domain1.com,my.domain2.com" Use 15984 * ConnectivityManager to set/get. 15985 * 15986 * @hide 15987 */ 15988 @Readable 15989 public static final String 15990 GLOBAL_HTTP_PROXY_EXCLUSION_LIST = "global_http_proxy_exclusion_list"; 15991 15992 /** 15993 * The location PAC File for the proxy. 15994 * @hide 15995 */ 15996 @Readable 15997 public static final String 15998 GLOBAL_HTTP_PROXY_PAC = "global_proxy_pac_url"; 15999 16000 /** 16001 * Enables the UI setting to allow the user to specify the global HTTP 16002 * proxy and associated exclusion list. 16003 * 16004 * @hide 16005 */ 16006 @Readable 16007 public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy"; 16008 16009 /** 16010 * Setting for default DNS in case nobody suggests one 16011 * 16012 * @hide 16013 */ 16014 @Readable 16015 public static final String DEFAULT_DNS_SERVER = "default_dns_server"; 16016 16017 /** 16018 * The requested Private DNS mode (string), and an accompanying specifier (string). 16019 * 16020 * Currently, the specifier holds the chosen provider name when the mode requests 16021 * a specific provider. It may be used to store the provider name even when the 16022 * mode changes so that temporarily disabling and re-enabling the specific 16023 * provider mode does not necessitate retyping the provider hostname. 16024 * 16025 * @hide 16026 */ 16027 @Readable 16028 public static final String PRIVATE_DNS_MODE = "private_dns_mode"; 16029 16030 /** 16031 * @hide 16032 */ 16033 @Readable 16034 public static final String PRIVATE_DNS_SPECIFIER = "private_dns_specifier"; 16035 16036 /** 16037 * Forced override of the default mode (hardcoded as "automatic", nee "opportunistic"). 16038 * This allows changing the default mode without effectively disabling other modes, 16039 * all of which require explicit user action to enable/configure. See also b/79719289. 16040 * 16041 * Value is a string, suitable for assignment to PRIVATE_DNS_MODE above. 16042 * 16043 * {@hide} 16044 */ 16045 @Readable 16046 public static final String PRIVATE_DNS_DEFAULT_MODE = "private_dns_default_mode"; 16047 16048 16049 /** {@hide} */ 16050 @Readable 16051 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 16052 @SuppressLint("NoSettingsProvider") 16053 public static final String 16054 BLUETOOTH_BTSNOOP_DEFAULT_MODE = "bluetooth_btsnoop_default_mode"; 16055 /** {@hide} */ 16056 @Readable 16057 public static final String 16058 BLUETOOTH_HEADSET_PRIORITY_PREFIX = "bluetooth_headset_priority_"; 16059 /** {@hide} */ 16060 @Readable 16061 public static final String 16062 BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX = "bluetooth_a2dp_sink_priority_"; 16063 /** {@hide} */ 16064 @Readable 16065 public static final String 16066 BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX = "bluetooth_a2dp_src_priority_"; 16067 /** {@hide} */ 16068 @Readable 16069 public static final String BLUETOOTH_A2DP_SUPPORTS_OPTIONAL_CODECS_PREFIX = 16070 "bluetooth_a2dp_supports_optional_codecs_"; 16071 /** {@hide} */ 16072 @Readable 16073 public static final String BLUETOOTH_A2DP_OPTIONAL_CODECS_ENABLED_PREFIX = 16074 "bluetooth_a2dp_optional_codecs_enabled_"; 16075 /** {@hide} */ 16076 @Readable 16077 public static final String 16078 BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX = "bluetooth_input_device_priority_"; 16079 /** {@hide} */ 16080 @Readable 16081 public static final String 16082 BLUETOOTH_MAP_PRIORITY_PREFIX = "bluetooth_map_priority_"; 16083 /** {@hide} */ 16084 @Readable 16085 public static final String 16086 BLUETOOTH_MAP_CLIENT_PRIORITY_PREFIX = "bluetooth_map_client_priority_"; 16087 /** {@hide} */ 16088 @Readable 16089 public static final String 16090 BLUETOOTH_PBAP_CLIENT_PRIORITY_PREFIX = "bluetooth_pbap_client_priority_"; 16091 /** {@hide} */ 16092 @Readable 16093 public static final String 16094 BLUETOOTH_SAP_PRIORITY_PREFIX = "bluetooth_sap_priority_"; 16095 /** {@hide} */ 16096 @Readable 16097 public static final String 16098 BLUETOOTH_PAN_PRIORITY_PREFIX = "bluetooth_pan_priority_"; 16099 /** {@hide} */ 16100 @Readable 16101 public static final String 16102 BLUETOOTH_HEARING_AID_PRIORITY_PREFIX = "bluetooth_hearing_aid_priority_"; 16103 16104 /** 16105 * Enable/disable radio bug detection 16106 * 16107 * {@hide} 16108 */ 16109 @Readable 16110 public static final String 16111 ENABLE_RADIO_BUG_DETECTION = "enable_radio_bug_detection"; 16112 16113 /** 16114 * Count threshold of RIL wakelock timeout for radio bug detection 16115 * 16116 * {@hide} 16117 */ 16118 @Readable 16119 public static final String 16120 RADIO_BUG_WAKELOCK_TIMEOUT_COUNT_THRESHOLD = 16121 "radio_bug_wakelock_timeout_count_threshold"; 16122 16123 /** 16124 * Count threshold of RIL system error for radio bug detection 16125 * 16126 * {@hide} 16127 */ 16128 @Readable 16129 public static final String 16130 RADIO_BUG_SYSTEM_ERROR_COUNT_THRESHOLD = 16131 "radio_bug_system_error_count_threshold"; 16132 16133 /** 16134 * Activity manager specific settings. 16135 * This is encoded as a key=value list, separated by commas. Ex: 16136 * 16137 * "gc_timeout=5000,max_cached_processes=24" 16138 * 16139 * The following keys are supported: 16140 * 16141 * <pre> 16142 * max_cached_processes (int) 16143 * background_settle_time (long) 16144 * fgservice_min_shown_time (long) 16145 * fgservice_min_report_time (long) 16146 * fgservice_screen_on_before_time (long) 16147 * fgservice_screen_on_after_time (long) 16148 * content_provider_retain_time (long) 16149 * gc_timeout (long) 16150 * gc_min_interval (long) 16151 * full_pss_min_interval (long) 16152 * full_pss_lowered_interval (long) 16153 * power_check_interval (long) 16154 * power_check_max_cpu_1 (int) 16155 * power_check_max_cpu_2 (int) 16156 * power_check_max_cpu_3 (int) 16157 * power_check_max_cpu_4 (int) 16158 * service_usage_interaction_time (long) 16159 * usage_stats_interaction_interval (long) 16160 * service_restart_duration (long) 16161 * service_reset_run_duration (long) 16162 * service_restart_duration_factor (int) 16163 * service_min_restart_time_between (long) 16164 * service_max_inactivity (long) 16165 * service_bg_start_timeout (long) 16166 * service_bg_activity_start_timeout (long) 16167 * process_start_async (boolean) 16168 * </pre> 16169 * 16170 * <p> 16171 * Type: string 16172 * @hide 16173 * @see com.android.server.am.ActivityManagerConstants 16174 */ 16175 @Readable 16176 public static final String ACTIVITY_MANAGER_CONSTANTS = "activity_manager_constants"; 16177 16178 /** 16179 * Feature flag to enable or disable the activity starts logging feature. 16180 * Type: int (0 for false, 1 for true) 16181 * Default: 1 16182 * @hide 16183 */ 16184 @Readable 16185 public static final String ACTIVITY_STARTS_LOGGING_ENABLED 16186 = "activity_starts_logging_enabled"; 16187 16188 /** 16189 * Feature flag to enable or disable the foreground service starts logging feature. 16190 * Type: int (0 for false, 1 for true) 16191 * Default: 1 16192 * @hide 16193 */ 16194 @Readable 16195 public static final String FOREGROUND_SERVICE_STARTS_LOGGING_ENABLED = 16196 "foreground_service_starts_logging_enabled"; 16197 16198 /** 16199 * Describes whether AM's AppProfiler should collect PSS even if RSS is the default. This 16200 * can be set by a user in developer settings. 16201 * Default: 0 16202 * @hide 16203 */ 16204 @Readable 16205 public static final String FORCE_ENABLE_PSS_PROFILING = 16206 "force_enable_pss_profiling"; 16207 16208 /** 16209 * @hide 16210 * @see com.android.server.appbinding.AppBindingConstants 16211 */ 16212 @Readable 16213 public static final String APP_BINDING_CONSTANTS = "app_binding_constants"; 16214 16215 /** 16216 * App ops specific settings. 16217 * This is encoded as a key=value list, separated by commas. Ex: 16218 * 16219 * "state_settle_time=10000" 16220 * 16221 * The following keys are supported: 16222 * 16223 * <pre> 16224 * top_state_settle_time (long) 16225 * fg_service_state_settle_time (long) 16226 * bg_state_settle_time (long) 16227 * </pre> 16228 * 16229 * <p> 16230 * Type: string 16231 * @hide 16232 * @see com.android.server.AppOpsService.Constants 16233 */ 16234 @TestApi 16235 @Readable 16236 public static final String APP_OPS_CONSTANTS = "app_ops_constants"; 16237 16238 /** 16239 * Device Idle (Doze) specific settings. 16240 * This is encoded as a key=value list, separated by commas. Ex: 16241 * 16242 * "inactive_to=60000,sensing_to=400000" 16243 * 16244 * The following keys are supported: 16245 * 16246 * <pre> 16247 * inactive_to (long) 16248 * sensing_to (long) 16249 * motion_inactive_to (long) 16250 * idle_after_inactive_to (long) 16251 * idle_pending_to (long) 16252 * max_idle_pending_to (long) 16253 * idle_pending_factor (float) 16254 * quick_doze_delay_to (long) 16255 * idle_to (long) 16256 * max_idle_to (long) 16257 * idle_factor (float) 16258 * min_time_to_alarm (long) 16259 * max_temp_app_whitelist_duration (long) 16260 * notification_whitelist_duration (long) 16261 * </pre> 16262 * 16263 * <p> 16264 * Type: string 16265 * @hide 16266 * @see com.android.server.DeviceIdleController.Constants 16267 */ 16268 public static final String DEVICE_IDLE_CONSTANTS = "device_idle_constants"; 16269 16270 /** 16271 * Battery Saver specific settings 16272 * This is encoded as a key=value list, separated by commas. Ex: 16273 * 16274 * "vibration_disabled=true,adjust_brightness_factor=0.5" 16275 * 16276 * The following keys are supported: 16277 * 16278 * <pre> 16279 * advertise_is_enabled (boolean) 16280 * datasaver_disabled (boolean) 16281 * enable_night_mode (boolean) 16282 * launch_boost_disabled (boolean) 16283 * vibration_disabled (boolean) 16284 * animation_disabled (boolean) 16285 * soundtrigger_disabled (boolean) 16286 * fullbackup_deferred (boolean) 16287 * keyvaluebackup_deferred (boolean) 16288 * firewall_disabled (boolean) 16289 * gps_mode (int) 16290 * adjust_brightness_disabled (boolean) 16291 * adjust_brightness_factor (float) 16292 * force_all_apps_standby (boolean) 16293 * force_background_check (boolean) 16294 * optional_sensors_disabled (boolean) 16295 * aod_disabled (boolean) 16296 * quick_doze_enabled (boolean) 16297 * </pre> 16298 * @hide 16299 * @see com.android.server.power.batterysaver.BatterySaverPolicy 16300 */ 16301 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 16302 @TestApi 16303 @Readable 16304 public static final String BATTERY_SAVER_CONSTANTS = "battery_saver_constants"; 16305 16306 /** 16307 * Battery Saver device specific settings 16308 * This is encoded as a key=value list, separated by commas. 16309 * 16310 * The following keys are supported: 16311 * 16312 * <pre> 16313 * cpufreq-i (list of "core-number:frequency" pairs concatenated with /) 16314 * cpufreq-n (list of "core-number:frequency" pairs concatenated with /) 16315 * </pre> 16316 * 16317 * See {@link com.android.server.power.batterysaver.BatterySaverPolicy} for the details. 16318 * 16319 * @hide 16320 */ 16321 @Readable 16322 public static final String BATTERY_SAVER_DEVICE_SPECIFIC_CONSTANTS = 16323 "battery_saver_device_specific_constants"; 16324 16325 /** 16326 * Battery tip specific settings 16327 * This is encoded as a key=value list, separated by commas. Ex: 16328 * 16329 * "battery_tip_enabled=true,summary_enabled=true,high_usage_enabled=true," 16330 * "high_usage_app_count=3,reduced_battery_enabled=false,reduced_battery_percent=50," 16331 * "high_usage_battery_draining=25,high_usage_period_ms=3000" 16332 * 16333 * The following keys are supported: 16334 * 16335 * <pre> 16336 * battery_tip_enabled (boolean) 16337 * summary_enabled (boolean) 16338 * battery_saver_tip_enabled (boolean) 16339 * high_usage_enabled (boolean) 16340 * high_usage_app_count (int) 16341 * high_usage_period_ms (long) 16342 * high_usage_battery_draining (int) 16343 * app_restriction_enabled (boolean) 16344 * reduced_battery_enabled (boolean) 16345 * reduced_battery_percent (int) 16346 * low_battery_enabled (boolean) 16347 * low_battery_hour (int) 16348 * </pre> 16349 * @hide 16350 */ 16351 @Readable 16352 public static final String BATTERY_TIP_CONSTANTS = "battery_tip_constants"; 16353 16354 /** 16355 * Battery anomaly detection specific settings 16356 * This is encoded as a key=value list, separated by commas. 16357 * wakeup_blacklisted_tags is a string, encoded as a set of tags, encoded via 16358 * {@link Uri#encode(String)}, separated by colons. Ex: 16359 * 16360 * "anomaly_detection_enabled=true,wakelock_threshold=2000,wakeup_alarm_enabled=true," 16361 * "wakeup_alarm_threshold=10,wakeup_blacklisted_tags=tag1:tag2:with%2Ccomma:with%3Acolon" 16362 * 16363 * The following keys are supported: 16364 * 16365 * <pre> 16366 * anomaly_detection_enabled (boolean) 16367 * wakelock_enabled (boolean) 16368 * wakelock_threshold (long) 16369 * wakeup_alarm_enabled (boolean) 16370 * wakeup_alarm_threshold (long) 16371 * wakeup_blacklisted_tags (string) 16372 * bluetooth_scan_enabled (boolean) 16373 * bluetooth_scan_threshold (long) 16374 * </pre> 16375 * @hide 16376 */ 16377 @Readable 16378 public static final String ANOMALY_DETECTION_CONSTANTS = "anomaly_detection_constants"; 16379 16380 /** 16381 * An integer to show the version of the anomaly config. Ex: 1, which means 16382 * current version is 1. 16383 * @hide 16384 */ 16385 @Readable 16386 public static final String ANOMALY_CONFIG_VERSION = "anomaly_config_version"; 16387 16388 /** 16389 * A base64-encoded string represents anomaly stats config, used for 16390 * {@link android.app.StatsManager}. 16391 * @hide 16392 */ 16393 @Readable 16394 public static final String ANOMALY_CONFIG = "anomaly_config"; 16395 16396 /** 16397 * Always on display(AOD) specific settings 16398 * This is encoded as a key=value list, separated by commas. Ex: 16399 * 16400 * "prox_screen_off_delay=10000,screen_brightness_array=0:1:2:3:4" 16401 * 16402 * The following keys are supported: 16403 * 16404 * <pre> 16405 * screen_brightness_array (int[], values in range [1, 255]) 16406 * dimming_scrim_array (int[]) 16407 * prox_screen_off_delay (long) 16408 * prox_cooldown_trigger (long) 16409 * prox_cooldown_period (long) 16410 * </pre> 16411 * @hide 16412 */ 16413 @Readable 16414 public static final String ALWAYS_ON_DISPLAY_CONSTANTS = "always_on_display_constants"; 16415 16416 /** 16417 * UidCpuPower global setting. This links the sys.uidcpupower system property. 16418 * The following values are supported: 16419 * 0 -> /proc/uid_cpupower/* are disabled 16420 * 1 -> /proc/uid_cpupower/* are enabled 16421 * Any other value defaults to enabled. 16422 * @hide 16423 */ 16424 @Readable 16425 public static final String SYS_UIDCPUPOWER = "sys_uidcpupower"; 16426 16427 /** 16428 * traced global setting. This controls weather the deamons: traced and 16429 * traced_probes run. This links the sys.traced system property. 16430 * The following values are supported: 16431 * 0 -> traced and traced_probes are disabled 16432 * 1 -> traced and traced_probes are enabled 16433 * Any other value defaults to disabled. 16434 * @hide 16435 */ 16436 @Readable 16437 public static final String SYS_TRACED = "sys_traced"; 16438 16439 /** 16440 * An integer to reduce the FPS by this factor. Only for experiments. Need to reboot the 16441 * device for this setting to take full effect. 16442 * 16443 * @hide 16444 */ 16445 @Readable 16446 public static final String FPS_DEVISOR = "fps_divisor"; 16447 16448 /** 16449 * Flag to enable or disable display panel low power mode (lpm) 16450 * false -> Display panel power saving mode is disabled. 16451 * true -> Display panel power saving mode is enabled. 16452 * 16453 * @hide 16454 */ 16455 @Readable 16456 public static final String DISPLAY_PANEL_LPM = "display_panel_lpm"; 16457 16458 /** 16459 * App time limit usage source setting. 16460 * This controls which app in a task will be considered the source of usage when 16461 * calculating app usage time limits. 16462 * 16463 * 1 -> task root app 16464 * 2 -> current app 16465 * Any other value defaults to task root app. 16466 * 16467 * Need to reboot the device for this setting to take effect. 16468 * @hide 16469 */ 16470 @Readable 16471 public static final String APP_TIME_LIMIT_USAGE_SOURCE = "app_time_limit_usage_source"; 16472 16473 /** 16474 * Enable ART bytecode verification verifications for debuggable apps. 16475 * 0 = disable, 1 = enable. 16476 * @hide 16477 */ 16478 @Readable 16479 public static final String ART_VERIFIER_VERIFY_DEBUGGABLE = 16480 "art_verifier_verify_debuggable"; 16481 16482 /** 16483 * Power manager specific settings. 16484 * This is encoded as a key=value list, separated by commas. Ex: 16485 * 16486 * "no_cached_wake_locks=1" 16487 * 16488 * The following keys are supported: 16489 * 16490 * <pre> 16491 * no_cached_wake_locks (boolean) 16492 * </pre> 16493 * 16494 * <p> 16495 * Type: string 16496 * @hide 16497 * @see com.android.server.power.PowerManagerConstants 16498 */ 16499 @Readable 16500 public static final String POWER_MANAGER_CONSTANTS = "power_manager_constants"; 16501 16502 /** 16503 * ShortcutManager specific settings. 16504 * This is encoded as a key=value list, separated by commas. Ex: 16505 * 16506 * "reset_interval_sec=86400,max_updates_per_interval=1" 16507 * 16508 * The following keys are supported: 16509 * 16510 * <pre> 16511 * reset_interval_sec (long) 16512 * max_updates_per_interval (int) 16513 * max_icon_dimension_dp (int, DP) 16514 * max_icon_dimension_dp_lowram (int, DP) 16515 * max_shortcuts (int) 16516 * icon_quality (int, 0-100) 16517 * icon_format (String) 16518 * </pre> 16519 * 16520 * <p> 16521 * Type: string 16522 * @hide 16523 * @see com.android.server.pm.ShortcutService.ConfigConstants 16524 */ 16525 @Readable 16526 public static final String SHORTCUT_MANAGER_CONSTANTS = "shortcut_manager_constants"; 16527 16528 /** 16529 * DevicePolicyManager specific settings. 16530 * This is encoded as a key=value list, separated by commas. Ex: 16531 * 16532 * <pre> 16533 * das_died_service_reconnect_backoff_sec (long) 16534 * das_died_service_reconnect_backoff_increase (float) 16535 * das_died_service_reconnect_max_backoff_sec (long) 16536 * </pre> 16537 * 16538 * <p> 16539 * Type: string 16540 * @hide 16541 * see also com.android.server.devicepolicy.DevicePolicyConstants 16542 */ 16543 @Readable 16544 public static final String DEVICE_POLICY_CONSTANTS = "device_policy_constants"; 16545 16546 /** 16547 * TextClassifier specific settings. 16548 * This is encoded as a key=value list, separated by commas. String[] types like 16549 * entity_list_default use ":" as delimiter for values. Ex: 16550 * 16551 * <pre> 16552 * classify_text_max_range_length (int) 16553 * detect_language_from_text_enabled (boolean) 16554 * entity_list_default (String[]) 16555 * entity_list_editable (String[]) 16556 * entity_list_not_editable (String[]) 16557 * generate_links_log_sample_rate (int) 16558 * generate_links_max_text_length (int) 16559 * in_app_conversation_action_types_default (String[]) 16560 * lang_id_context_settings (float[]) 16561 * lang_id_threshold_override (float) 16562 * local_textclassifier_enabled (boolean) 16563 * model_dark_launch_enabled (boolean) 16564 * notification_conversation_action_types_default (String[]) 16565 * smart_linkify_enabled (boolean) 16566 * smart_select_animation_enabled (boolean) 16567 * smart_selection_enabled (boolean) 16568 * smart_text_share_enabled (boolean) 16569 * suggest_selection_max_range_length (int) 16570 * system_textclassifier_enabled (boolean) 16571 * template_intent_factory_enabled (boolean) 16572 * translate_in_classification_enabled (boolean) 16573 * </pre> 16574 * 16575 * <p> 16576 * Type: string 16577 * @hide 16578 * see also android.view.textclassifier.TextClassificationConstants 16579 */ 16580 @Readable 16581 public static final String TEXT_CLASSIFIER_CONSTANTS = "text_classifier_constants"; 16582 16583 /** 16584 * BatteryStats specific settings. 16585 * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true" 16586 * 16587 * The following keys are supported: 16588 * <pre> 16589 * track_cpu_times_by_proc_state (boolean) 16590 * track_cpu_active_cluster_time (boolean) 16591 * read_binary_cpu_time (boolean) 16592 * proc_state_cpu_times_read_delay_ms (long) 16593 * external_stats_collection_rate_limit_ms (long) 16594 * battery_level_collection_delay_ms (long) 16595 * max_history_files (int) 16596 * max_history_buffer_kb (int) 16597 * battery_charged_delay_ms (int) 16598 * battery_charging_enforce_level (int) 16599 * </pre> 16600 * 16601 * <p> 16602 * Type: string 16603 * @hide 16604 * see also com.android.internal.os.BatteryStatsImpl.Constants 16605 */ 16606 @Readable 16607 public static final String BATTERY_STATS_CONSTANTS = "battery_stats_constants"; 16608 16609 /** 16610 * SyncManager specific settings. 16611 * 16612 * <p> 16613 * Type: string 16614 * @hide 16615 * @see com.android.server.content.SyncManagerConstants 16616 */ 16617 @Readable 16618 public static final String SYNC_MANAGER_CONSTANTS = "sync_manager_constants"; 16619 16620 /** 16621 * Broadcast dispatch tuning parameters specific to foreground broadcasts. 16622 * 16623 * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true" 16624 * 16625 * The following keys are supported: 16626 * <pre> 16627 * bcast_timeout (long) 16628 * bcast_slow_time (long) 16629 * bcast_deferral (long) 16630 * bcast_deferral_decay_factor (float) 16631 * bcast_deferral_floor (long) 16632 * bcast_allow_bg_activity_start_timeout (long) 16633 * </pre> 16634 * 16635 * @hide 16636 */ 16637 @Readable 16638 public static final String BROADCAST_FG_CONSTANTS = "bcast_fg_constants"; 16639 16640 /** 16641 * Broadcast dispatch tuning parameters specific to background broadcasts. 16642 * 16643 * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true". 16644 * See {@link #BROADCAST_FG_CONSTANTS} for the list of supported keys. 16645 * 16646 * @hide 16647 */ 16648 @Readable 16649 public static final String BROADCAST_BG_CONSTANTS = "bcast_bg_constants"; 16650 16651 /** 16652 * Broadcast dispatch tuning parameters specific to specific "offline" broadcasts. 16653 * 16654 * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true". 16655 * See {@link #BROADCAST_FG_CONSTANTS} for the list of supported keys. 16656 * 16657 * @hide 16658 */ 16659 @Readable 16660 public static final String BROADCAST_OFFLOAD_CONSTANTS = "bcast_offload_constants"; 16661 16662 /** 16663 * Whether or not App Standby feature is enabled by system. This controls throttling of apps 16664 * based on usage patterns and predictions. Platform will turn on this feature if both this 16665 * flag and {@link #ADAPTIVE_BATTERY_MANAGEMENT_ENABLED} is on. 16666 * Type: int (0 for false, 1 for true) 16667 * Default: 1 16668 * @hide 16669 * @see #ADAPTIVE_BATTERY_MANAGEMENT_ENABLED 16670 */ 16671 @SystemApi 16672 @Readable 16673 public static final String APP_STANDBY_ENABLED = "app_standby_enabled"; 16674 16675 /** 16676 * Whether or not adaptive battery feature is enabled by user. Platform will turn on this 16677 * feature if both this flag and {@link #APP_STANDBY_ENABLED} is on. 16678 * Type: int (0 for false, 1 for true) 16679 * Default: 1 16680 * @hide 16681 * @see #APP_STANDBY_ENABLED 16682 */ 16683 @Readable 16684 public static final String ADAPTIVE_BATTERY_MANAGEMENT_ENABLED = 16685 "adaptive_battery_management_enabled"; 16686 16687 /** 16688 * Whether or not app auto restriction is enabled. When it is enabled, settings app will 16689 * auto restrict the app if it has bad behavior (e.g. hold wakelock for long time). 16690 * 16691 * Type: boolean (0 for false, 1 for true) 16692 * Default: 1 16693 * 16694 * @hide 16695 */ 16696 @Readable 16697 public static final String APP_AUTO_RESTRICTION_ENABLED = 16698 "app_auto_restriction_enabled"; 16699 16700 /** 16701 * Whether or not to enable Forced App Standby on small battery devices. 16702 * Type: int (0 for false, 1 for true) 16703 * Default: 0 16704 * @hide 16705 */ 16706 @Readable 16707 public static final String FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED 16708 = "forced_app_standby_for_small_battery_enabled"; 16709 16710 /** 16711 * Whether or not to enable the User Absent, Radios Off feature on small battery devices. 16712 * Type: int (0 for false, 1 for true) 16713 * Default: 0 16714 * @hide 16715 */ 16716 @Readable 16717 public static final String USER_ABSENT_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED 16718 = "user_absent_radios_off_for_small_battery_enabled"; 16719 16720 /** 16721 * Whether or not to enable the User Absent, Touch Off feature on small battery devices. 16722 * Type: int (0 for false, 1 for true) 16723 * Default: 0 16724 * @hide 16725 */ 16726 @Readable 16727 public static final String USER_ABSENT_TOUCH_OFF_FOR_SMALL_BATTERY_ENABLED 16728 = "user_absent_touch_off_for_small_battery_enabled"; 16729 16730 /** 16731 * Whether or not to turn on Wifi when proxy is disconnected. 16732 * Type: int (0 for false, 1 for true) 16733 * Default: 1 16734 * @hide 16735 */ 16736 @Readable 16737 public static final String WIFI_ON_WHEN_PROXY_DISCONNECTED 16738 = "wifi_on_when_proxy_disconnected"; 16739 16740 /** 16741 * Time Only Mode specific settings. 16742 * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true" 16743 * 16744 * The following keys are supported: 16745 * 16746 * <pre> 16747 * enabled (boolean) 16748 * disable_home (boolean) 16749 * disable_tilt_to_wake (boolean) 16750 * disable_touch_to_wake (boolean) 16751 * </pre> 16752 * Type: string 16753 * @hide 16754 */ 16755 @Readable 16756 public static final String TIME_ONLY_MODE_CONSTANTS 16757 = "time_only_mode_constants"; 16758 16759 /** 16760 * Whether of not to send keycode sleep for ungaze when Home is the foreground activity on 16761 * watch type devices. 16762 * Type: int (0 for false, 1 for true) 16763 * Default: 1 16764 * @hide 16765 */ 16766 @Readable 16767 public static final String UNGAZE_SLEEP_ENABLED = "ungaze_sleep_enabled"; 16768 16769 /** 16770 * Whether or not Network Watchlist feature is enabled. 16771 * Type: int (0 for false, 1 for true) 16772 * Default: 0 16773 * @hide 16774 */ 16775 @Readable 16776 public static final String NETWORK_WATCHLIST_ENABLED = "network_watchlist_enabled"; 16777 16778 /** 16779 * Whether or not show hidden launcher icon apps feature is enabled. 16780 * Type: int (0 for false, 1 for true) 16781 * Default: 1 16782 * @hide 16783 */ 16784 @Readable 16785 public static final String SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED = 16786 "show_hidden_icon_apps_enabled"; 16787 16788 /** 16789 * Whether or not show new app installed notification is enabled. 16790 * Type: int (0 for false, 1 for true) 16791 * Default: 0 16792 * @hide 16793 */ 16794 @Readable 16795 public static final String SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED = 16796 "show_new_app_installed_notification_enabled"; 16797 16798 /** 16799 * Flag to keep background restricted profiles running after exiting. If disabled, 16800 * the restricted profile can be put into stopped state as soon as the user leaves it. 16801 * Type: int (0 for false, 1 for true) 16802 * 16803 * Overridden by the system based on device information. If null, the value specified 16804 * by {@code config_keepRestrictedProfilesInBackground} is used. 16805 * 16806 * @hide 16807 */ 16808 @Readable 16809 public static final String KEEP_PROFILE_IN_BACKGROUND = "keep_profile_in_background"; 16810 16811 /** 16812 * The default time in ms within which a subsequent connection from an always allowed system 16813 * is allowed to reconnect without user interaction. 16814 * 16815 * @hide 16816 */ 16817 public static final long DEFAULT_ADB_ALLOWED_CONNECTION_TIME = 604800000; 16818 16819 /** 16820 * When the user first connects their device to a system a prompt is displayed to allow 16821 * the adb connection with an option to 'Always allow' connections from this system. If the 16822 * user selects this always allow option then the connection time is stored for the system. 16823 * This setting is the time in ms within which a subsequent connection from an always 16824 * allowed system is allowed to reconnect without user interaction. 16825 * 16826 * Type: long 16827 * 16828 * @hide 16829 */ 16830 @Readable 16831 public static final String ADB_ALLOWED_CONNECTION_TIME = 16832 "adb_allowed_connection_time"; 16833 16834 /** 16835 * Scaling factor for normal window animations. 16836 * 16837 * The value is a float. Setting to 0.0f will disable window animations. 16838 */ 16839 @Readable 16840 public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale"; 16841 16842 /** 16843 * Setting to disable cross-window blurs. This includes window blur behind, (see 16844 * {@link LayoutParams#setBlurBehindRadius}) and window background blur (see 16845 * {@link Window#setBackgroundBlurRadius}). 16846 * 16847 * The value is a boolean (1 or 0). 16848 * @hide 16849 */ 16850 @TestApi 16851 @Readable 16852 @SuppressLint("NoSettingsProvider") 16853 public static final String DISABLE_WINDOW_BLURS = "disable_window_blurs"; 16854 16855 /** 16856 * Scaling factor for activity transition animations. 16857 * 16858 * The value is a float. Setting to 0.0f will disable window animations. 16859 */ 16860 @Readable 16861 public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; 16862 16863 /** 16864 * Scaling factor for Animator-based animations. This affects both the 16865 * start delay and duration of all such animations. 16866 * 16867 * The value is a float. Setting to 0.0f will cause animations to end immediately. 16868 * The default value is 1.0f. 16869 */ 16870 @Readable 16871 public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; 16872 16873 /** 16874 * Scaling factor for normal window animations. Setting to 0 will 16875 * disable window animations. 16876 * 16877 * @hide 16878 */ 16879 @Readable 16880 public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations"; 16881 16882 /** 16883 * If 0, the compatibility mode is off for all applications. 16884 * If 1, older applications run under compatibility mode. 16885 * TODO: remove this settings before code freeze (bug/1907571) 16886 * @hide 16887 */ 16888 @Readable 16889 public static final String COMPATIBILITY_MODE = "compatibility_mode"; 16890 16891 /** 16892 * CDMA only settings 16893 * Emergency Tone 0 = Off 16894 * 1 = Alert 16895 * 2 = Vibrate 16896 * @hide 16897 */ 16898 @Readable 16899 public static final String EMERGENCY_TONE = "emergency_tone"; 16900 16901 /** 16902 * CDMA only settings 16903 * Whether the auto retry is enabled. The value is 16904 * boolean (1 or 0). 16905 * @hide 16906 */ 16907 @Readable 16908 public static final String CALL_AUTO_RETRY = "call_auto_retry"; 16909 16910 /** 16911 * A setting that can be read whether the emergency affordance is currently needed. 16912 * The value is a boolean (1 or 0). 16913 * @hide 16914 */ 16915 @Readable 16916 public static final String EMERGENCY_AFFORDANCE_NEEDED = "emergency_affordance_needed"; 16917 16918 /** 16919 * The power button "cooldown" period in milliseconds after the Emergency gesture is 16920 * triggered, during which single-key actions on the power button are suppressed. Cooldown 16921 * period is disabled if set to zero. 16922 * 16923 * @hide 16924 */ 16925 public static final String EMERGENCY_GESTURE_POWER_BUTTON_COOLDOWN_PERIOD_MS = 16926 "emergency_gesture_power_button_cooldown_period_ms"; 16927 16928 /** 16929 * The minimum time in milliseconds to perform the emergency gesture. 16930 * 16931 * @hide 16932 */ 16933 public static final String EMERGENCY_GESTURE_TAP_DETECTION_MIN_TIME_MS = 16934 "emergency_gesture_tap_detection_min_time_ms"; 16935 16936 /** 16937 * The maximum duration in milliseconds for which the emergency gesture UI can stay 16938 * "sticky", where the notification pull-down shade and navigation gestures/buttons are 16939 * temporarily disabled. The feature is disabled completely if the value is set to zero. 16940 * 16941 * @hide 16942 */ 16943 public static final String EMERGENCY_GESTURE_STICKY_UI_MAX_DURATION_MILLIS = 16944 "emergency_gesture_sticky_ui_max_duration_millis"; 16945 16946 /** 16947 * Whether to enable automatic system server heap dumps. This only works on userdebug or 16948 * eng builds, not on user builds. This is set by the user and overrides the config value. 16949 * 1 means enable, 0 means disable. 16950 * 16951 * @hide 16952 */ 16953 @Readable 16954 public static final String ENABLE_AUTOMATIC_SYSTEM_SERVER_HEAP_DUMPS = 16955 "enable_automatic_system_server_heap_dumps"; 16956 16957 /** 16958 * See RIL_PreferredNetworkType in ril.h 16959 * @hide 16960 */ 16961 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 16962 @Readable 16963 public static final String PREFERRED_NETWORK_MODE = 16964 "preferred_network_mode"; 16965 16966 /** 16967 * Name of an application package to be debugged. 16968 */ 16969 @Readable 16970 public static final String DEBUG_APP = "debug_app"; 16971 16972 /** 16973 * If 1, when launching DEBUG_APP it will wait for the debugger before 16974 * starting user code. If 0, it will run normally. 16975 */ 16976 @Readable 16977 public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger"; 16978 16979 /** 16980 * Allow GPU debug layers? 16981 * 0 = no 16982 * 1 = yes 16983 * @hide 16984 */ 16985 @Readable 16986 public static final String ENABLE_GPU_DEBUG_LAYERS = "enable_gpu_debug_layers"; 16987 16988 /** 16989 * App allowed to load GPU debug layers 16990 * @hide 16991 */ 16992 @Readable 16993 public static final String GPU_DEBUG_APP = "gpu_debug_app"; 16994 16995 /** 16996 * Package containing ANGLE libraries other than system, which are only available 16997 * to dumpable apps that opt-in. 16998 * @hide 16999 */ 17000 @Readable 17001 public static final String ANGLE_DEBUG_PACKAGE = "angle_debug_package"; 17002 17003 /** 17004 * Force all PKGs to use ANGLE, regardless of any other settings 17005 * The value is a boolean (1 or 0). 17006 * @hide 17007 */ 17008 @Readable 17009 public static final String ANGLE_GL_DRIVER_ALL_ANGLE = "angle_gl_driver_all_angle"; 17010 17011 /** 17012 * List of PKGs that have an OpenGL driver selected 17013 * @hide 17014 */ 17015 @Readable 17016 public static final String ANGLE_GL_DRIVER_SELECTION_PKGS = 17017 "angle_gl_driver_selection_pkgs"; 17018 17019 /** 17020 * List of selected OpenGL drivers, corresponding to the PKGs in GLOBAL_SETTINGS_DRIVER_PKGS 17021 * @hide 17022 */ 17023 @Readable 17024 public static final String ANGLE_GL_DRIVER_SELECTION_VALUES = 17025 "angle_gl_driver_selection_values"; 17026 17027 /** 17028 * Lists of ANGLE EGL features for debugging. 17029 * Each list of features is separated by a comma, each feature in each list is separated by 17030 * a colon. 17031 * e.g. feature1:feature2:feature3,feature1:feature3:feature5 17032 * @hide 17033 */ 17034 @Readable 17035 public static final String ANGLE_EGL_FEATURES = "angle_egl_features"; 17036 17037 /** 17038 * Show the "ANGLE In Use" dialog box to the user when ANGLE is the OpenGL driver. 17039 * The value is a boolean (1 or 0). 17040 * @hide 17041 */ 17042 @Readable 17043 public static final String SHOW_ANGLE_IN_USE_DIALOG_BOX = "show_angle_in_use_dialog_box"; 17044 17045 /** 17046 * Updatable driver global preference for all Apps. 17047 * 0 = Default 17048 * 1 = All Apps use updatable production driver 17049 * 2 = All apps use updatable prerelease driver 17050 * 3 = All Apps use system graphics driver 17051 * @hide 17052 */ 17053 @Readable 17054 public static final String UPDATABLE_DRIVER_ALL_APPS = "updatable_driver_all_apps"; 17055 17056 /** 17057 * List of Apps selected to use updatable production driver. 17058 * i.e. <pkg1>,<pkg2>,...,<pkgN> 17059 * @hide 17060 */ 17061 @Readable 17062 public static final String UPDATABLE_DRIVER_PRODUCTION_OPT_IN_APPS = 17063 "updatable_driver_production_opt_in_apps"; 17064 17065 /** 17066 * List of Apps selected to use updatable prerelease driver. 17067 * i.e. <pkg1>,<pkg2>,...,<pkgN> 17068 * @hide 17069 */ 17070 @Readable 17071 public static final String UPDATABLE_DRIVER_PRERELEASE_OPT_IN_APPS = 17072 "updatable_driver_prerelease_opt_in_apps"; 17073 17074 /** 17075 * List of Apps selected not to use updatable production driver. 17076 * i.e. <pkg1>,<pkg2>,...,<pkgN> 17077 * @hide 17078 */ 17079 @Readable 17080 public static final String UPDATABLE_DRIVER_PRODUCTION_OPT_OUT_APPS = 17081 "updatable_driver_production_opt_out_apps"; 17082 17083 /** 17084 * Apps on the denylist that are forbidden to use updatable production driver. 17085 * @hide 17086 */ 17087 @Readable 17088 public static final String UPDATABLE_DRIVER_PRODUCTION_DENYLIST = 17089 "updatable_driver_production_denylist"; 17090 17091 /** 17092 * List of denylists, each denylist is a denylist for a specific version of 17093 * updatable production driver. 17094 * @hide 17095 */ 17096 @Readable 17097 public static final String UPDATABLE_DRIVER_PRODUCTION_DENYLISTS = 17098 "updatable_driver_production_denylists"; 17099 17100 /** 17101 * Apps on the allowlist that are allowed to use updatable production driver. 17102 * The string is a list of application package names, seperated by comma. 17103 * i.e. <apk1>,<apk2>,...,<apkN> 17104 * @hide 17105 */ 17106 @Readable 17107 public static final String UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST = 17108 "updatable_driver_production_allowlist"; 17109 17110 /** 17111 * List of libraries in sphal accessible by updatable driver 17112 * The string is a list of library names, separated by colon. 17113 * i.e. <lib1>:<lib2>:...:<libN> 17114 * @hide 17115 */ 17116 @Readable 17117 public static final String UPDATABLE_DRIVER_SPHAL_LIBRARIES = 17118 "updatable_driver_sphal_libraries"; 17119 17120 /** 17121 * Ordered GPU debug layer list for Vulkan 17122 * i.e. <layer1>:<layer2>:...:<layerN> 17123 * @hide 17124 */ 17125 @Readable 17126 public static final String GPU_DEBUG_LAYERS = "gpu_debug_layers"; 17127 17128 /** 17129 * Ordered GPU debug layer list for GLES 17130 * i.e. <layer1>:<layer2>:...:<layerN> 17131 * @hide 17132 */ 17133 @Readable 17134 public static final String GPU_DEBUG_LAYERS_GLES = "gpu_debug_layers_gles"; 17135 17136 /** 17137 * Addition app for GPU layer discovery 17138 * @hide 17139 */ 17140 @Readable 17141 public static final String GPU_DEBUG_LAYER_APP = "gpu_debug_layer_app"; 17142 17143 /** 17144 * Control whether the process CPU usage meter should be shown. 17145 * 17146 * @deprecated This functionality is no longer available as of 17147 * {@link android.os.Build.VERSION_CODES#N_MR1}. 17148 */ 17149 @Deprecated 17150 @Readable 17151 public static final String SHOW_PROCESSES = "show_processes"; 17152 17153 /** 17154 * If 1 low power mode (aka battery saver) is enabled. 17155 * @hide 17156 */ 17157 @TestApi 17158 @Readable 17159 public static final String LOW_POWER_MODE = "low_power"; 17160 17161 /** 17162 * If 1 extra low power mode is enabled. 17163 * @hide 17164 */ 17165 public static final String EXTRA_LOW_POWER_MODE = "extra_low_power"; 17166 17167 /** 17168 * If 1, battery saver ({@link #LOW_POWER_MODE}) will be re-activated after the device 17169 * is unplugged from a charger or rebooted. 17170 * @hide 17171 */ 17172 @TestApi 17173 @Readable 17174 public static final String LOW_POWER_MODE_STICKY = "low_power_sticky"; 17175 17176 /** 17177 * When a device is unplugged from a changer (or is rebooted), do not re-activate battery 17178 * saver even if {@link #LOW_POWER_MODE_STICKY} is 1, if the battery level is equal to or 17179 * above this threshold. 17180 * 17181 * @hide 17182 */ 17183 @Readable 17184 public static final String LOW_POWER_MODE_STICKY_AUTO_DISABLE_LEVEL = 17185 "low_power_sticky_auto_disable_level"; 17186 17187 /** 17188 * Whether sticky battery saver should be deactivated once the battery level has reached the 17189 * threshold specified by {@link #LOW_POWER_MODE_STICKY_AUTO_DISABLE_LEVEL}. 17190 * 17191 * @hide 17192 */ 17193 @Readable 17194 public static final String LOW_POWER_MODE_STICKY_AUTO_DISABLE_ENABLED = 17195 "low_power_sticky_auto_disable_enabled"; 17196 17197 /** 17198 * Battery level [1-100] at which low power mode automatically turns on. 17199 * If 0, it will not automatically turn on. For Q and newer, it will only automatically 17200 * turn on if the value is greater than 0 and the {@link #AUTOMATIC_POWER_SAVE_MODE} 17201 * setting is also set to 17202 * {@link android.os.PowerManager.AutoPowerSaveMode#POWER_SAVE_MODE_TRIGGER_PERCENTAGE}. 17203 * @see #AUTOMATIC_POWER_SAVE_MODE 17204 * @see android.os.PowerManager#getPowerSaveModeTrigger() 17205 * @hide 17206 */ 17207 @Readable 17208 public static final String LOW_POWER_MODE_TRIGGER_LEVEL = "low_power_trigger_level"; 17209 17210 /** 17211 * Whether battery saver is currently set to trigger based on percentage, dynamic power 17212 * savings trigger, or none. See {@link AutoPowerSaveModeTriggers} for 17213 * accepted values. 17214 * 17215 * @hide 17216 */ 17217 @TestApi 17218 @Readable 17219 public static final String AUTOMATIC_POWER_SAVE_MODE = "automatic_power_save_mode"; 17220 17221 /** 17222 * The setting that backs the disable threshold for the setPowerSavingsWarning api in 17223 * PowerManager 17224 * 17225 * @see android.os.PowerManager#setDynamicPowerSaveHint(boolean, int) 17226 * @hide 17227 */ 17228 @TestApi 17229 @Readable 17230 public static final String DYNAMIC_POWER_SAVINGS_DISABLE_THRESHOLD = 17231 "dynamic_power_savings_disable_threshold"; 17232 17233 /** 17234 * The setting which backs the setDynamicPowerSaveHint api in PowerManager. 17235 * 17236 * @see android.os.PowerManager#setDynamicPowerSaveHint(boolean, int) 17237 * @hide 17238 */ 17239 @TestApi 17240 @Readable 17241 public static final String DYNAMIC_POWER_SAVINGS_ENABLED = "dynamic_power_savings_enabled"; 17242 17243 /** 17244 * A long value indicating how much longer the system battery is estimated to last in 17245 * millis. See {@link #BATTERY_ESTIMATES_LAST_UPDATE_TIME} for the last time this value 17246 * was updated. 17247 * 17248 * @deprecated Use {@link PowerManager#getBatteryDischargePrediction()} instead. 17249 * @hide 17250 */ 17251 @Deprecated 17252 @Readable 17253 public static final String TIME_REMAINING_ESTIMATE_MILLIS = 17254 "time_remaining_estimate_millis"; 17255 17256 /** 17257 * A boolean indicating whether {@link #TIME_REMAINING_ESTIMATE_MILLIS} is customized 17258 * to the device's usage or using global models. See 17259 * {@link #BATTERY_ESTIMATES_LAST_UPDATE_TIME} for the last time this value was updated. 17260 * 17261 * @deprecated Use {@link PowerManager#isBatteryDischargePredictionPersonalized()} instead. 17262 * 17263 * @hide 17264 */ 17265 @Deprecated 17266 @Readable 17267 public static final String TIME_REMAINING_ESTIMATE_BASED_ON_USAGE = 17268 "time_remaining_estimate_based_on_usage"; 17269 17270 /** 17271 * A long value indicating how long the system battery takes to deplete from 100% to 0% on 17272 * average based on historical drain rates. See {@link #BATTERY_ESTIMATES_LAST_UPDATE_TIME} 17273 * for the last time this value was updated. 17274 * 17275 * @deprecated Use {@link PowerManager#getHistoricalDischargeTime()} instead. 17276 * @hide 17277 */ 17278 @Deprecated 17279 @Readable 17280 public static final String AVERAGE_TIME_TO_DISCHARGE = "average_time_to_discharge"; 17281 17282 /** 17283 * A long indicating the epoch time in milliseconds when 17284 * {@link #TIME_REMAINING_ESTIMATE_MILLIS}, {@link #TIME_REMAINING_ESTIMATE_BASED_ON_USAGE}, 17285 * and {@link #AVERAGE_TIME_TO_DISCHARGE} were last updated. 17286 * 17287 * @hide 17288 * @deprecated No longer needed due to {@link PowerManager#getBatteryDischargePrediction}. 17289 */ 17290 @Deprecated 17291 @Readable 17292 public static final String BATTERY_ESTIMATES_LAST_UPDATE_TIME = 17293 "battery_estimates_last_update_time"; 17294 17295 /** 17296 * The max value for {@link #LOW_POWER_MODE_TRIGGER_LEVEL}. If this setting is not set 17297 * or the value is 0, the default max will be used. 17298 * 17299 * @hide 17300 */ 17301 @Readable 17302 public static final String LOW_POWER_MODE_TRIGGER_LEVEL_MAX = "low_power_trigger_level_max"; 17303 17304 /** 17305 * See com.android.settingslib.fuelgauge.BatterySaverUtils. 17306 * @hide 17307 */ 17308 @Readable 17309 public static final String LOW_POWER_MODE_SUGGESTION_PARAMS = 17310 "low_power_mode_suggestion_params"; 17311 17312 /** 17313 * Whether low power mode reminder is enabled. If this value is 0, the device will not 17314 * receive low power notification. 17315 * 17316 * @hide 17317 */ 17318 public static final String LOW_POWER_MODE_REMINDER_ENABLED = 17319 "low_power_mode_reminder_enabled"; 17320 17321 /** 17322 * If not 0, the activity manager will aggressively finish activities and 17323 * processes as soon as they are no longer needed. If 0, the normal 17324 * extended lifetime is used. 17325 */ 17326 @Readable 17327 public static final String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; 17328 17329 /** 17330 * If nonzero, all system error dialogs will be hidden. For example, the 17331 * crash and ANR dialogs will not be shown, and the system will just proceed 17332 * as if they had been accepted by the user. 17333 * @hide 17334 */ 17335 @TestApi 17336 @Readable 17337 public static final String HIDE_ERROR_DIALOGS = "hide_error_dialogs"; 17338 17339 /** 17340 * Use Dock audio output for media: 17341 * 0 = disabled 17342 * 1 = enabled 17343 * @hide 17344 */ 17345 @Readable 17346 public static final String DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled"; 17347 17348 /** 17349 * The surround sound formats AC3, DTS or IEC61937 are 17350 * available for use if they are detected. 17351 * This is the default mode. 17352 * 17353 * Note that AUTO is equivalent to ALWAYS for Android TVs and other 17354 * devices that have an S/PDIF output. This is because S/PDIF 17355 * is unidirectional and the TV cannot know if a decoder is 17356 * connected. So it assumes they are always available. 17357 * @hide 17358 */ 17359 public static final int ENCODED_SURROUND_OUTPUT_AUTO = 0; 17360 17361 /** 17362 * AC3, DTS or IEC61937 are NEVER available, even if they 17363 * are detected by the hardware. Those formats will not be 17364 * reported. 17365 * 17366 * An example use case would be an AVR reports that it is capable of 17367 * surround sound decoding but is broken. If NEVER is chosen 17368 * then apps must use PCM output instead of encoded output. 17369 * @hide 17370 */ 17371 public static final int ENCODED_SURROUND_OUTPUT_NEVER = 1; 17372 17373 /** 17374 * AC3, DTS or IEC61937 are ALWAYS available, even if they 17375 * are not detected by the hardware. Those formats will be 17376 * reported as part of the HDMI output capability. Applications 17377 * are then free to use either PCM or encoded output. 17378 * 17379 * An example use case would be a when TV was connected over 17380 * TOS-link to an AVR. But the TV could not see it because TOS-link 17381 * is unidirectional. 17382 * @hide 17383 */ 17384 public static final int ENCODED_SURROUND_OUTPUT_ALWAYS = 2; 17385 17386 /** 17387 * Surround sound formats are available according to the choice 17388 * of user, even if they are not detected by the hardware. Those 17389 * formats will be reported as part of the HDMI output capability. 17390 * Applications are then free to use either PCM or encoded output. 17391 * 17392 * An example use case would be an AVR that doesn't report a surround 17393 * format while the user knows the AVR does support it. 17394 * @hide 17395 */ 17396 public static final int ENCODED_SURROUND_OUTPUT_MANUAL = 3; 17397 17398 /** 17399 * The maximum value for surround sound output mode in Android S. 17400 * @hide 17401 */ 17402 public static final int ENCODED_SURROUND_SC_MAX = ENCODED_SURROUND_OUTPUT_MANUAL; 17403 17404 /** 17405 * Set to ENCODED_SURROUND_OUTPUT_AUTO, 17406 * ENCODED_SURROUND_OUTPUT_NEVER, 17407 * ENCODED_SURROUND_OUTPUT_ALWAYS or 17408 * ENCODED_SURROUND_OUTPUT_MANUAL 17409 * @hide 17410 */ 17411 @Readable 17412 public static final String ENCODED_SURROUND_OUTPUT = "encoded_surround_output"; 17413 17414 /** 17415 * Surround sounds formats that are enabled when ENCODED_SURROUND_OUTPUT is set to 17416 * ENCODED_SURROUND_OUTPUT_MANUAL. Encoded as comma separated list. Allowed values 17417 * are the format constants defined in AudioFormat.java. Ex: 17418 * 17419 * "5,6" 17420 * 17421 * @hide 17422 */ 17423 @Readable 17424 public static final String ENCODED_SURROUND_OUTPUT_ENABLED_FORMATS = 17425 "encoded_surround_output_enabled_formats"; 17426 17427 /** 17428 * Persisted safe headphone volume management state by AudioService 17429 * @hide 17430 */ 17431 @Readable 17432 public static final String AUDIO_SAFE_VOLUME_STATE = "audio_safe_volume_state"; 17433 17434 /** 17435 * Persisted safe hearding current CSD value. Values are stored as float percentages where 17436 * 1.f represents 100% sound dose has been reached. 17437 * @hide 17438 */ 17439 public static final String AUDIO_SAFE_CSD_CURRENT_VALUE = "audio_safe_csd_current_value"; 17440 17441 /** 17442 * Persisted safe hearding next CSD warning value. Values are stored as float percentages. 17443 * @hide 17444 */ 17445 public static final String AUDIO_SAFE_CSD_NEXT_WARNING = "audio_safe_csd_next_warning"; 17446 17447 /** 17448 * Persisted safe hearding dose records (see {@link android.media.SoundDoseRecord}) 17449 * @hide 17450 */ 17451 public static final String AUDIO_SAFE_CSD_DOSE_RECORDS = "audio_safe_csd_dose_records"; 17452 17453 /** 17454 * URL for tzinfo (time zone) updates 17455 * @hide 17456 */ 17457 @Readable 17458 public static final String TZINFO_UPDATE_CONTENT_URL = "tzinfo_content_url"; 17459 17460 /** 17461 * URL for tzinfo (time zone) update metadata 17462 * @hide 17463 */ 17464 @Readable 17465 public static final String TZINFO_UPDATE_METADATA_URL = "tzinfo_metadata_url"; 17466 17467 /** 17468 * URL for selinux (mandatory access control) updates 17469 * @hide 17470 */ 17471 @Readable 17472 public static final String SELINUX_UPDATE_CONTENT_URL = "selinux_content_url"; 17473 17474 /** 17475 * URL for selinux (mandatory access control) update metadata 17476 * @hide 17477 */ 17478 @Readable 17479 public static final String SELINUX_UPDATE_METADATA_URL = "selinux_metadata_url"; 17480 17481 /** 17482 * URL for sms short code updates 17483 * @hide 17484 */ 17485 @Readable 17486 public static final String SMS_SHORT_CODES_UPDATE_CONTENT_URL = 17487 "sms_short_codes_content_url"; 17488 17489 /** 17490 * URL for sms short code update metadata 17491 * @hide 17492 */ 17493 @Readable 17494 public static final String SMS_SHORT_CODES_UPDATE_METADATA_URL = 17495 "sms_short_codes_metadata_url"; 17496 17497 /** 17498 * URL for apn_db updates 17499 * @hide 17500 */ 17501 @Readable 17502 public static final String APN_DB_UPDATE_CONTENT_URL = "apn_db_content_url"; 17503 17504 /** 17505 * URL for apn_db update metadata 17506 * @hide 17507 */ 17508 @Readable 17509 public static final String APN_DB_UPDATE_METADATA_URL = "apn_db_metadata_url"; 17510 17511 /** 17512 * URL for cert pinlist updates 17513 * @hide 17514 */ 17515 @Readable 17516 public static final String CERT_PIN_UPDATE_CONTENT_URL = "cert_pin_content_url"; 17517 17518 /** 17519 * URL for cert pinlist updates 17520 * @hide 17521 */ 17522 @Readable 17523 public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url"; 17524 17525 /** 17526 * URL for intent firewall updates 17527 * @hide 17528 */ 17529 @Readable 17530 public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL = 17531 "intent_firewall_content_url"; 17532 17533 /** 17534 * URL for intent firewall update metadata 17535 * @hide 17536 */ 17537 @Readable 17538 public static final String INTENT_FIREWALL_UPDATE_METADATA_URL = 17539 "intent_firewall_metadata_url"; 17540 17541 /** 17542 * URL for lang id model updates 17543 * @hide 17544 */ 17545 @Readable 17546 public static final String LANG_ID_UPDATE_CONTENT_URL = "lang_id_content_url"; 17547 17548 /** 17549 * URL for lang id model update metadata 17550 * @hide 17551 */ 17552 @Readable 17553 public static final String LANG_ID_UPDATE_METADATA_URL = "lang_id_metadata_url"; 17554 17555 /** 17556 * URL for smart selection model updates 17557 * @hide 17558 */ 17559 @Readable 17560 public static final String SMART_SELECTION_UPDATE_CONTENT_URL = 17561 "smart_selection_content_url"; 17562 17563 /** 17564 * URL for smart selection model update metadata 17565 * @hide 17566 */ 17567 @Readable 17568 public static final String SMART_SELECTION_UPDATE_METADATA_URL = 17569 "smart_selection_metadata_url"; 17570 17571 /** 17572 * URL for conversation actions model updates 17573 * @hide 17574 */ 17575 @Readable 17576 public static final String CONVERSATION_ACTIONS_UPDATE_CONTENT_URL = 17577 "conversation_actions_content_url"; 17578 17579 /** 17580 * URL for conversation actions model update metadata 17581 * @hide 17582 */ 17583 @Readable 17584 public static final String CONVERSATION_ACTIONS_UPDATE_METADATA_URL = 17585 "conversation_actions_metadata_url"; 17586 17587 /** 17588 * SELinux enforcement status. If 0, permissive; if 1, enforcing. 17589 * @hide 17590 */ 17591 @Readable 17592 public static final String SELINUX_STATUS = "selinux_status"; 17593 17594 /** 17595 * Developer setting to force RTL layout. 17596 * @hide 17597 */ 17598 @Readable 17599 public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl"; 17600 17601 /** 17602 * Milliseconds after screen-off after which low battery sounds will be silenced. 17603 * 17604 * If zero, battery sounds will always play. 17605 * Defaults to @integer/def_low_battery_sound_timeout in SettingsProvider. 17606 * 17607 * @hide 17608 */ 17609 @Readable 17610 public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout"; 17611 17612 /** 17613 * Milliseconds to wait before bouncing Wi-Fi after settings is restored. Note that after 17614 * the caller is done with this, they should call {@link ContentResolver#delete} to 17615 * clean up any value that they may have written. 17616 * 17617 * @hide 17618 */ 17619 @Readable 17620 public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms"; 17621 17622 /** 17623 * Defines global runtime overrides to window policy. 17624 * 17625 * See {@link com.android.server.wm.PolicyControl} for value format. 17626 * 17627 * @hide 17628 */ 17629 @Readable 17630 public static final String POLICY_CONTROL = "policy_control"; 17631 17632 /** 17633 * {@link android.view.DisplayCutout DisplayCutout} emulation mode. 17634 * 17635 * @hide 17636 */ 17637 @Readable 17638 public static final String EMULATE_DISPLAY_CUTOUT = "emulate_display_cutout"; 17639 17640 /** @hide */ public static final int EMULATE_DISPLAY_CUTOUT_OFF = 0; 17641 /** @hide */ public static final int EMULATE_DISPLAY_CUTOUT_ON = 1; 17642 17643 /** 17644 * A colon separated list of keys for Settings Slices. 17645 * 17646 * @hide 17647 */ 17648 @Readable 17649 public static final String BLOCKED_SLICES = "blocked_slices"; 17650 17651 /** 17652 * Defines global zen mode. ZEN_MODE_OFF, ZEN_MODE_IMPORTANT_INTERRUPTIONS, 17653 * or ZEN_MODE_NO_INTERRUPTIONS. 17654 * 17655 * @hide 17656 */ 17657 @UnsupportedAppUsage 17658 @Readable 17659 public static final String ZEN_MODE = "zen_mode"; 17660 17661 /** @hide */ 17662 @UnsupportedAppUsage 17663 public static final int ZEN_MODE_OFF = 0; 17664 /** @hide */ 17665 @UnsupportedAppUsage 17666 public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; 17667 /** @hide */ 17668 @UnsupportedAppUsage 17669 public static final int ZEN_MODE_NO_INTERRUPTIONS = 2; 17670 /** @hide */ 17671 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 17672 public static final int ZEN_MODE_ALARMS = 3; 17673 17674 /** 17675 * A comma-separated list of HDR formats that have been disabled by the user. 17676 * <p> 17677 * If present, these formats will not be reported to apps, even if the display supports 17678 * them. This list is treated as empty if the ARE_USER_DISABLED_HDR_FORMATS_ALLOWED setting 17679 * is '1'. 17680 * </p> 17681 * @hide 17682 */ 17683 @TestApi 17684 @Readable 17685 @SuppressLint("NoSettingsProvider") 17686 public static final String USER_DISABLED_HDR_FORMATS = "user_disabled_hdr_formats"; 17687 17688 /** 17689 * Whether or not user-disabled HDR formats are allowed. 17690 * <p> 17691 * The value is boolean (1 or 0). The value '1' means the user preference for disabling a 17692 * format is ignored, and the disabled formats are still reported to apps (if supported 17693 * by the display). The value '0' means the user-disabled formats are not reported to 17694 * apps, even if the display supports them. 17695 * </p><p> 17696 * The list of formats disabled by the user are contained in the 17697 * USER_DISABLED_HDR_FORMATS setting. This list is treated as empty when the value of 17698 * this setting is '1'. 17699 * </p> 17700 * @hide 17701 */ 17702 @TestApi 17703 @Readable 17704 @SuppressLint("NoSettingsProvider") 17705 public static final String ARE_USER_DISABLED_HDR_FORMATS_ALLOWED = 17706 "are_user_disabled_hdr_formats_allowed"; 17707 17708 /** 17709 * Whether or not syncs (bulk set operations) for {@link DeviceConfig} are currently 17710 * persistently disabled. This is only used for the {@link 17711 * Config#SYNC_DISABLED_MODE_PERSISTENT persistent} mode, {@link 17712 * Config#SYNC_DISABLED_MODE_UNTIL_REBOOT until_reboot} mode is not stored in settings. 17713 * The value is boolean (1 or 0). The value '1' means that {@link 17714 * DeviceConfig#setProperties(DeviceConfig.Properties)} will return {@code false}. 17715 * 17716 * @hide 17717 */ 17718 public static final String DEVICE_CONFIG_SYNC_DISABLED = "device_config_sync_disabled"; 17719 17720 17721 /** 17722 * An allow list of packages for which the user has granted the permission to communicate 17723 * across profiles. 17724 * 17725 * @hide 17726 */ 17727 @Readable 17728 @FlaggedApi(android.app.admin.flags.Flags.FLAG_BACKUP_CONNECTED_APPS_SETTINGS) 17729 public static final String CONNECTED_APPS_ALLOWED_PACKAGES = 17730 "connected_apps_allowed_packages"; 17731 17732 /** 17733 * A block list of packages for which the user has denied the permission to communicate 17734 * across profiles. 17735 * 17736 * @hide 17737 */ 17738 @Readable 17739 @FlaggedApi(android.app.admin.flags.Flags.FLAG_BACKUP_CONNECTED_APPS_SETTINGS) 17740 public static final String CONNECTED_APPS_DISALLOWED_PACKAGES = 17741 "connected_apps_disallowed_packages"; 17742 zenModeToString(int mode)17743 /** @hide */ public static String zenModeToString(int mode) { 17744 if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS"; 17745 if (mode == ZEN_MODE_ALARMS) return "ZEN_MODE_ALARMS"; 17746 if (mode == ZEN_MODE_NO_INTERRUPTIONS) return "ZEN_MODE_NO_INTERRUPTIONS"; 17747 return "ZEN_MODE_OFF"; 17748 } 17749 isValidZenMode(int value)17750 /** @hide */ public static boolean isValidZenMode(int value) { 17751 switch (value) { 17752 case Global.ZEN_MODE_OFF: 17753 case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS: 17754 case Global.ZEN_MODE_ALARMS: 17755 case Global.ZEN_MODE_NO_INTERRUPTIONS: 17756 return true; 17757 default: 17758 return false; 17759 } 17760 } 17761 17762 /** 17763 * Value of the ringer before entering zen mode. 17764 * 17765 * @hide 17766 */ 17767 @Readable 17768 public static final String ZEN_MODE_RINGER_LEVEL = "zen_mode_ringer_level"; 17769 17770 /** 17771 * Opaque value, changes when persisted zen mode configuration changes. 17772 * 17773 * @hide 17774 */ 17775 @UnsupportedAppUsage 17776 @Readable 17777 public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag"; 17778 17779 /** 17780 * @deprecated Use {@link android.provider.Settings.Secure#ZEN_DURATION} instead 17781 * @hide 17782 */ 17783 @Deprecated 17784 public static final String ZEN_DURATION = "zen_duration"; 17785 17786 /** 17787 * @deprecated Use {@link android.provider.Settings.Secure#ZEN_DURATION_PROMPT} instead 17788 * @hide 17789 */ 17790 @Deprecated 17791 public static final int ZEN_DURATION_PROMPT = -1; 17792 17793 /** 17794 * @deprecated Use {@link android.provider.Settings.Secure#ZEN_DURATION_FOREVER} instead 17795 * @hide 17796 */ 17797 @Deprecated 17798 public static final int ZEN_DURATION_FOREVER = 0; 17799 17800 /** 17801 * Defines global heads up toggle. One of HEADS_UP_OFF, HEADS_UP_ON. 17802 * 17803 * @hide 17804 */ 17805 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 17806 @Readable 17807 public static final String HEADS_UP_NOTIFICATIONS_ENABLED = 17808 "heads_up_notifications_enabled"; 17809 17810 /** @hide */ 17811 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 17812 public static final int HEADS_UP_OFF = 0; 17813 /** @hide */ 17814 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 17815 public static final int HEADS_UP_ON = 1; 17816 17817 /** 17818 * The refresh rate chosen by the user. 17819 * 17820 * @hide 17821 */ 17822 @TestApi 17823 @Readable 17824 @SuppressLint("NoSettingsProvider") 17825 public static final String USER_PREFERRED_REFRESH_RATE = "user_preferred_refresh_rate"; 17826 17827 /** 17828 * The resolution height chosen by the user. 17829 * 17830 * @hide 17831 */ 17832 @TestApi 17833 @Readable 17834 @SuppressLint("NoSettingsProvider") 17835 public static final String USER_PREFERRED_RESOLUTION_HEIGHT = 17836 "user_preferred_resolution_height"; 17837 17838 /** 17839 * The resolution width chosen by the user. 17840 * 17841 * @hide 17842 */ 17843 @TestApi 17844 @Readable 17845 @SuppressLint("NoSettingsProvider") 17846 public static final String USER_PREFERRED_RESOLUTION_WIDTH = 17847 "user_preferred_resolution_width"; 17848 17849 /** 17850 * The HDR output mode chosen by the user. This is one of: 17851 * {@link android.hardware.display.HdrConversionMode#HDR_CONVERSION_PASSTHROUGH}, 17852 * {@link android.hardware.display.HdrConversionMode#HDR_CONVERSION_SYSTEM}, 17853 * {@link android.hardware.display.HdrConversionMode#HDR_CONVERSION_FORCE}. 17854 * 17855 * @hide 17856 */ 17857 @TestApi 17858 @Readable 17859 public static final String HDR_CONVERSION_MODE = "hdr_conversion_mode"; 17860 17861 /** 17862 * The output HDR type chosen by the user in case when {@link #HDR_CONVERSION_MODE} is 17863 * {@link #HDR_CONVERSION_FORCE}. This is one of: 17864 * {@link android.view.Display.HdrCapabilities#HDR_TYPE_INVALID}, 17865 * {@link android.view.Display.HdrCapabilities#HDR_TYPE_DOLBY_VISION}, 17866 * {@link android.view.Display.HdrCapabilities#HDR_TYPE_HDR10}, 17867 * {@link android.view.Display.HdrCapabilities#HDR_TYPE_HLG}, 17868 * {@link android.view.Display.HdrCapabilities#HDR_TYPE_HDR10_PLUS} 17869 * <p> 17870 * The value is {@link android.view.Display.HdrCapabilities#HDR_TYPE_INVALID} when user 17871 * chooses SDR output type. </p> 17872 * 17873 * @hide 17874 */ 17875 @TestApi 17876 @Readable 17877 public static final String HDR_FORCE_CONVERSION_TYPE = "hdr_force_conversion_type"; 17878 17879 /** 17880 * The name of the device 17881 */ 17882 @Readable 17883 public static final String DEVICE_NAME = "device_name"; 17884 17885 /** 17886 * Whether the NetworkScoringService has been first initialized. 17887 * <p> 17888 * Type: int (0 for false, 1 for true) 17889 * @hide 17890 */ 17891 @Readable 17892 public static final String NETWORK_SCORING_PROVISIONED = "network_scoring_provisioned"; 17893 17894 /** 17895 * On devices that use full-disk encryption, indicates whether the primary user's lockscreen 17896 * credential is required to decrypt the device on boot. 17897 * <p> 17898 * This setting does not do anything on devices that use file-based encryption. With 17899 * file-based encryption, the device boots without a credential being needed, but the 17900 * lockscreen credential is required to unlock credential-encrypted storage. All devices 17901 * that launched with Android 10 or higher use file-based encryption. 17902 * <p> 17903 * Type: int (0 for false, 1 for true) 17904 * 17905 * @hide 17906 */ 17907 @SystemApi 17908 @Readable 17909 public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt"; 17910 17911 /** 17912 * Whether the Volte is enabled. If this setting is not set then we use the Carrier Config 17913 * value 17914 * {@link android.telephony.CarrierConfigManager#KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL}. 17915 * <p> 17916 * Type: int (0 for false, 1 for true) 17917 * @hide 17918 * @deprecated Use 17919 * {@link android.provider.Telephony.SimInfo#COLUMN_ENHANCED_4G_MODE_ENABLED} instead. 17920 */ 17921 @Deprecated 17922 @Readable 17923 public static final String ENHANCED_4G_MODE_ENABLED = 17924 Telephony.SimInfo.COLUMN_ENHANCED_4G_MODE_ENABLED; 17925 17926 /** 17927 * Whether VT (Video Telephony over IMS) is enabled 17928 * <p> 17929 * Type: int (0 for false, 1 for true) 17930 * 17931 * @hide 17932 * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_VT_IMS_ENABLED} instead. 17933 */ 17934 @Deprecated 17935 @Readable 17936 public static final String VT_IMS_ENABLED = Telephony.SimInfo.COLUMN_VT_IMS_ENABLED; 17937 17938 /** 17939 * Whether WFC is enabled 17940 * <p> 17941 * Type: int (0 for false, 1 for true) 17942 * 17943 * @hide 17944 * @deprecated Use 17945 * {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_ENABLED} instead. 17946 */ 17947 @Deprecated 17948 @Readable 17949 public static final String WFC_IMS_ENABLED = Telephony.SimInfo.COLUMN_WFC_IMS_ENABLED; 17950 17951 /** 17952 * WFC mode on home/non-roaming network. 17953 * <p> 17954 * Type: int - 2=Wi-Fi preferred, 1=Cellular preferred, 0=Wi-Fi only 17955 * 17956 * @hide 17957 * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_MODE} instead. 17958 */ 17959 @Deprecated 17960 @Readable 17961 public static final String WFC_IMS_MODE = Telephony.SimInfo.COLUMN_WFC_IMS_MODE; 17962 17963 /** 17964 * WFC mode on roaming network. 17965 * <p> 17966 * Type: int - see {@link #WFC_IMS_MODE} for values 17967 * 17968 * @hide 17969 * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_ROAMING_MODE} 17970 * instead. 17971 */ 17972 @Deprecated 17973 @Readable 17974 public static final String WFC_IMS_ROAMING_MODE = 17975 Telephony.SimInfo.COLUMN_WFC_IMS_ROAMING_MODE; 17976 17977 /** 17978 * Whether WFC roaming is enabled 17979 * <p> 17980 * Type: int (0 for false, 1 for true) 17981 * 17982 * @hide 17983 * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_ROAMING_ENABLED} 17984 * instead 17985 */ 17986 @Deprecated 17987 @Readable 17988 public static final String WFC_IMS_ROAMING_ENABLED = 17989 Telephony.SimInfo.COLUMN_WFC_IMS_ROAMING_ENABLED; 17990 17991 /** 17992 * Whether user can enable/disable LTE as a preferred network. A carrier might control 17993 * this via gservices, OMA-DM, carrier app, etc. 17994 * <p> 17995 * Type: int (0 for false, 1 for true) 17996 * @hide 17997 */ 17998 @Readable 17999 public static final String LTE_SERVICE_FORCED = "lte_service_forced"; 18000 18001 18002 /** 18003 * Specifies the behaviour the lid triggers when closed 18004 * <p> 18005 * See WindowManagerPolicy.WindowManagerFuncs 18006 * @hide 18007 */ 18008 @Readable 18009 public static final String LID_BEHAVIOR = "lid_behavior"; 18010 18011 /** 18012 * Ephemeral app cookie max size in bytes. 18013 * <p> 18014 * Type: int 18015 * @hide 18016 */ 18017 @Readable 18018 public static final String EPHEMERAL_COOKIE_MAX_SIZE_BYTES = 18019 "ephemeral_cookie_max_size_bytes"; 18020 18021 /** 18022 * Toggle to enable/disable the entire ephemeral feature. By default, ephemeral is 18023 * enabled. Set to zero to disable. 18024 * <p> 18025 * Type: int (0 for false, 1 for true) 18026 * 18027 * @hide 18028 */ 18029 @Readable 18030 public static final String ENABLE_EPHEMERAL_FEATURE = "enable_ephemeral_feature"; 18031 18032 /** 18033 * Toggle to enable/disable dexopt for instant applications. The default is for dexopt 18034 * to be disabled. 18035 * <p> 18036 * Type: int (0 to disable, 1 to enable) 18037 * 18038 * @hide 18039 */ 18040 @Readable 18041 public static final String INSTANT_APP_DEXOPT_ENABLED = "instant_app_dexopt_enabled"; 18042 18043 /** 18044 * The min period for caching installed instant apps in milliseconds. 18045 * <p> 18046 * Type: long 18047 * @hide 18048 */ 18049 @Readable 18050 public static final String INSTALLED_INSTANT_APP_MIN_CACHE_PERIOD = 18051 "installed_instant_app_min_cache_period"; 18052 18053 /** 18054 * The max period for caching installed instant apps in milliseconds. 18055 * <p> 18056 * Type: long 18057 * @hide 18058 */ 18059 @Readable 18060 public static final String INSTALLED_INSTANT_APP_MAX_CACHE_PERIOD = 18061 "installed_instant_app_max_cache_period"; 18062 18063 /** 18064 * The min period for caching uninstalled instant apps in milliseconds. 18065 * <p> 18066 * Type: long 18067 * @hide 18068 */ 18069 @Readable 18070 public static final String UNINSTALLED_INSTANT_APP_MIN_CACHE_PERIOD = 18071 "uninstalled_instant_app_min_cache_period"; 18072 18073 /** 18074 * The max period for caching uninstalled instant apps in milliseconds. 18075 * <p> 18076 * Type: long 18077 * @hide 18078 */ 18079 @Readable 18080 public static final String UNINSTALLED_INSTANT_APP_MAX_CACHE_PERIOD = 18081 "uninstalled_instant_app_max_cache_period"; 18082 18083 /** 18084 * The min period for caching unused static shared libs in milliseconds. 18085 * <p> 18086 * Type: long 18087 * @hide 18088 */ 18089 @Readable 18090 public static final String UNUSED_STATIC_SHARED_LIB_MIN_CACHE_PERIOD = 18091 "unused_static_shared_lib_min_cache_period"; 18092 18093 /** 18094 * Allows switching users when system user is locked. 18095 * <p> 18096 * Type: int 18097 * @hide 18098 */ 18099 @Readable 18100 public static final String ALLOW_USER_SWITCHING_WHEN_SYSTEM_USER_LOCKED = 18101 "allow_user_switching_when_system_user_locked"; 18102 18103 /** 18104 * Boot count since the device starts running API level 24. 18105 * <p> 18106 * Type: int 18107 */ 18108 @Readable 18109 public static final String BOOT_COUNT = "boot_count"; 18110 18111 /** 18112 * Whether the safe boot is disallowed. 18113 * 18114 * <p>This setting should have the identical value as the corresponding user restriction. 18115 * The purpose of the setting is to make the restriction available in early boot stages 18116 * before the user restrictions are loaded. 18117 * @hide 18118 */ 18119 @Readable 18120 public static final String SAFE_BOOT_DISALLOWED = "safe_boot_disallowed"; 18121 18122 /** 18123 * Indicates whether this device is currently in retail demo mode. If true, the device 18124 * usage is severely limited. 18125 * <p> 18126 * Type: int (0 for false, 1 for true) 18127 * 18128 * @hide 18129 */ 18130 @SystemApi 18131 @Readable 18132 public static final String DEVICE_DEMO_MODE = "device_demo_mode"; 18133 18134 /** 18135 * The reason for the settings database being downgraded. This is only for 18136 * troubleshooting purposes and its value should not be interpreted in any way. 18137 * 18138 * Type: string 18139 * 18140 * @hide 18141 */ 18142 @Readable 18143 public static final String DATABASE_DOWNGRADE_REASON = "database_downgrade_reason"; 18144 18145 /** 18146 * The build id of when the settings database was first created (or re-created due it 18147 * being missing). 18148 * 18149 * Type: string 18150 * 18151 * @hide 18152 */ 18153 @Readable 18154 public static final String DATABASE_CREATION_BUILDID = "database_creation_buildid"; 18155 18156 /** 18157 * Flag to toggle journal mode WAL on or off for the contacts database. WAL is enabled by 18158 * default. Set to 0 to disable. 18159 * 18160 * @hide 18161 */ 18162 @Readable 18163 public static final String CONTACTS_DATABASE_WAL_ENABLED = "contacts_database_wal_enabled"; 18164 18165 /** 18166 * Flag to enable the link to location permissions in location setting. Set to 0 to disable. 18167 * 18168 * @hide 18169 */ 18170 @Readable 18171 public static final String LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED = 18172 "location_settings_link_to_permissions_enabled"; 18173 18174 /** 18175 * Flag to set the waiting time for removing invisible euicc profiles inside System > 18176 * Settings. 18177 * Type: long 18178 * 18179 * @hide 18180 */ 18181 @Readable 18182 public static final String EUICC_REMOVING_INVISIBLE_PROFILES_TIMEOUT_MILLIS = 18183 "euicc_removing_invisible_profiles_timeout_millis"; 18184 18185 /** 18186 * Flag to set the waiting time for euicc factory reset inside System > Settings 18187 * Type: long 18188 * 18189 * @hide 18190 */ 18191 @Readable 18192 public static final String EUICC_FACTORY_RESET_TIMEOUT_MILLIS = 18193 "euicc_factory_reset_timeout_millis"; 18194 18195 /** 18196 * Flag to set the waiting time for euicc slot switch. 18197 * Type: long 18198 * 18199 * @hide 18200 */ 18201 public static final String EUICC_SWITCH_SLOT_TIMEOUT_MILLIS = 18202 "euicc_switch_slot_timeout_millis"; 18203 18204 /** 18205 * Flag to set the waiting time for enabling multi SIM slot. 18206 * Type: long 18207 * 18208 * @hide 18209 */ 18210 public static final String ENABLE_MULTI_SLOT_TIMEOUT_MILLIS = 18211 "enable_multi_slot_timeout_millis"; 18212 18213 /** 18214 * Flag to set the timeout for when to refresh the storage settings cached data. 18215 * Type: long 18216 * 18217 * @hide 18218 */ 18219 @Readable 18220 public static final String STORAGE_SETTINGS_CLOBBER_THRESHOLD = 18221 "storage_settings_clobber_threshold"; 18222 18223 /** 18224 * If set to 1, SettingsProvider's restoreAnyVersion="true" attribute will be ignored 18225 * and restoring to lower version of platform API will be skipped. 18226 * 18227 * @hide 18228 */ 18229 @Readable 18230 public static final String OVERRIDE_SETTINGS_PROVIDER_RESTORE_ANY_VERSION = 18231 "override_settings_provider_restore_any_version"; 18232 /** 18233 * Flag to toggle whether system services report attribution chains when they attribute 18234 * battery use via a {@code WorkSource}. 18235 * 18236 * Type: int (0 to disable, 1 to enable) 18237 * 18238 * @hide 18239 */ 18240 @Readable 18241 public static final String CHAINED_BATTERY_ATTRIBUTION_ENABLED = 18242 "chained_battery_attribution_enabled"; 18243 18244 /** 18245 * Toggle to enable/disable the incremental ADB installation by default. 18246 * If not set, default adb installations are incremental; set to zero to use full ones. 18247 * Note: only ADB uses it, no usages in the Framework code. 18248 * <p> 18249 * Type: int (0 to disable, 1 to enable) 18250 * 18251 * @hide 18252 */ 18253 @Readable 18254 public static final String ENABLE_ADB_INCREMENTAL_INSTALL_DEFAULT = 18255 "enable_adb_incremental_install_default"; 18256 18257 /** 18258 * The packages allowlisted to be run in autofill compatibility mode. The list 18259 * of packages is {@code ":"} colon delimited, and each entry has the name of the 18260 * package and an optional list of url bar resource ids (the list is delimited by 18261 * brackets&mdash{@code [} and {@code ]}&mdash and is also comma delimited). 18262 * 18263 * <p>For example, a list with 3 packages {@code p1}, {@code p2}, and {@code p3}, where 18264 * package {@code p1} have one id ({@code url_bar}, {@code p2} has none, and {@code p3 } 18265 * have 2 ids {@code url_foo} and {@code url_bas}) would be 18266 * {@code p1[url_bar]:p2:p3[url_foo,url_bas]} 18267 * 18268 * @hide 18269 * @deprecated Use {@link android.view.autofill.AutofillManager 18270 * #DEVICE_CONFIG_AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES} instead. 18271 */ 18272 @Deprecated 18273 @SystemApi 18274 @Readable 18275 public static final String AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES = 18276 "autofill_compat_mode_allowed_packages"; 18277 18278 /** 18279 * Level of autofill logging. 18280 * 18281 * <p>Valid values are 18282 * {@link android.view.autofill.AutofillManager#NO_LOGGING}, 18283 * {@link android.view.autofill.AutofillManager#FLAG_ADD_CLIENT_DEBUG}, or 18284 * {@link android.view.autofill.AutofillManager#FLAG_ADD_CLIENT_VERBOSE}. 18285 * 18286 * @hide 18287 */ 18288 @Readable 18289 public static final String AUTOFILL_LOGGING_LEVEL = "autofill_logging_level"; 18290 18291 /** 18292 * Maximum number of partitions that can be allowed in an autofill session. 18293 * 18294 * @hide 18295 */ 18296 @Readable 18297 public static final String AUTOFILL_MAX_PARTITIONS_SIZE = "autofill_max_partitions_size"; 18298 18299 /** 18300 * Maximum number of visible datasets in the Autofill dataset picker UI, or {@code 0} to use 18301 * the default value from resources. 18302 * 18303 * @hide 18304 */ 18305 @Readable 18306 public static final String AUTOFILL_MAX_VISIBLE_DATASETS = "autofill_max_visible_datasets"; 18307 18308 /** 18309 * Indicates whether a stylus has ever been used on the device. 18310 * 18311 * @hide 18312 */ 18313 @Readable 18314 @SuppressLint("NoSettingsProvider") 18315 public static final String STYLUS_EVER_USED = "stylus_ever_used"; 18316 18317 /** 18318 * Exemptions to the hidden API denylist. 18319 * 18320 * @hide 18321 */ 18322 @TestApi 18323 @Readable 18324 public static final String HIDDEN_API_BLACKLIST_EXEMPTIONS = 18325 "hidden_api_blacklist_exemptions"; 18326 18327 /** 18328 * Hidden API enforcement policy for apps. 18329 * 18330 * Values correspond to @{@link 18331 * android.content.pm.ApplicationInfo.HiddenApiEnforcementPolicy} 18332 * 18333 * @hide 18334 */ 18335 @TestApi 18336 @Readable 18337 public static final String HIDDEN_API_POLICY = "hidden_api_policy"; 18338 18339 /** 18340 * Flag for forcing {@link com.android.server.compat.OverrideValidatorImpl} 18341 * to consider this a non-debuggable build. 18342 * 18343 * @hide 18344 */ 18345 public static final String FORCE_NON_DEBUGGABLE_FINAL_BUILD_FOR_COMPAT = 18346 "force_non_debuggable_final_build_for_compat"; 18347 18348 18349 /** 18350 * Current version of signed configuration applied. 18351 * 18352 * @hide 18353 */ 18354 @Readable 18355 public static final String SIGNED_CONFIG_VERSION = "signed_config_version"; 18356 18357 /** 18358 * Timeout for a single {@link android.media.soundtrigger.SoundTriggerDetectionService} 18359 * operation (in ms). 18360 * 18361 * @hide 18362 */ 18363 @Readable 18364 public static final String SOUND_TRIGGER_DETECTION_SERVICE_OP_TIMEOUT = 18365 "sound_trigger_detection_service_op_timeout"; 18366 18367 /** 18368 * Maximum number of {@link android.media.soundtrigger.SoundTriggerDetectionService} 18369 * operations per day. 18370 * 18371 * @hide 18372 */ 18373 @Readable 18374 public static final String MAX_SOUND_TRIGGER_DETECTION_SERVICE_OPS_PER_DAY = 18375 "max_sound_trigger_detection_service_ops_per_day"; 18376 18377 /** 18378 * Setting to determine if the Clockwork Home application is ready. 18379 * 18380 * <p> 18381 * Set to 1 when the Clockwork Home application has finished starting up. 18382 * </p> 18383 * 18384 * @hide 18385 */ 18386 public static final String CLOCKWORK_HOME_READY = "clockwork_home_ready"; 18387 18388 /** 18389 * Indicates whether aware is available in the current location. 18390 * @hide 18391 */ 18392 @Readable 18393 public static final String AWARE_ALLOWED = "aware_allowed"; 18394 18395 /** 18396 * Overrides internal R.integer.config_shortPressOnPowerBehavior. 18397 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 18398 * Used by PhoneWindowManager. 18399 * @hide 18400 */ 18401 public static final String POWER_BUTTON_SHORT_PRESS = "power_button_short_press"; 18402 18403 /** 18404 * Overrides internal R.integer.config_doublePressOnPowerBehavior. 18405 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 18406 * Used by PhoneWindowManager. 18407 * @hide 18408 */ 18409 public static final String POWER_BUTTON_DOUBLE_PRESS = "power_button_double_press"; 18410 18411 /** 18412 * Overrides internal R.integer.config_triplePressOnPowerBehavior. 18413 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 18414 * Used by PhoneWindowManager. 18415 * @hide 18416 */ 18417 public static final String POWER_BUTTON_TRIPLE_PRESS = "power_button_triple_press"; 18418 18419 /** 18420 * Overrides internal R.integer.config_longPressOnPowerBehavior. 18421 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 18422 * Used by PhoneWindowManager. 18423 * @hide 18424 */ 18425 @Readable 18426 public static final String POWER_BUTTON_LONG_PRESS = 18427 "power_button_long_press"; 18428 18429 /** 18430 * Override internal R.integer.config_longPressOnPowerDurationMs. It determines the length 18431 * of power button press to be considered a long press in milliseconds. 18432 * Used by PhoneWindowManager. 18433 * @hide 18434 */ 18435 @Readable 18436 public static final String POWER_BUTTON_LONG_PRESS_DURATION_MS = 18437 "power_button_long_press_duration_ms"; 18438 18439 /** 18440 * Overrides internal R.integer.config_veryLongPressOnPowerBehavior. 18441 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 18442 * Used by PhoneWindowManager. 18443 * @hide 18444 */ 18445 @Readable 18446 public static final String POWER_BUTTON_VERY_LONG_PRESS = 18447 "power_button_very_long_press"; 18448 18449 /** 18450 * Overrides internal R.integer.config_shortPressOnStemPrimaryBehavior. 18451 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 18452 * Used by PhoneWindowManager. 18453 * @hide 18454 */ 18455 public static final String STEM_PRIMARY_BUTTON_SHORT_PRESS = 18456 "stem_primary_button_short_press"; 18457 18458 /** 18459 * Overrides internal R.integer.config_doublePressOnStemPrimaryBehavior. 18460 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 18461 * Used by PhoneWindowManager. 18462 * @hide 18463 */ 18464 public static final String STEM_PRIMARY_BUTTON_DOUBLE_PRESS = 18465 "stem_primary_button_double_press"; 18466 18467 /** 18468 * Overrides internal R.integer.config_triplePressOnStemPrimaryBehavior. 18469 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 18470 * Used by PhoneWindowManager. 18471 * @hide 18472 */ 18473 public static final String STEM_PRIMARY_BUTTON_TRIPLE_PRESS = 18474 "stem_primary_button_triple_press"; 18475 18476 /** 18477 * Overrides internal R.integer.config_longPressOnStemPrimaryBehavior. 18478 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 18479 * Used by PhoneWindowManager. 18480 * @hide 18481 */ 18482 public static final String STEM_PRIMARY_BUTTON_LONG_PRESS = 18483 "stem_primary_button_long_press"; 18484 18485 /** 18486 * Overrides internal R.integer.config_keyChordPowerVolumeUp. 18487 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 18488 * Used by PhoneWindowManager. 18489 * @hide 18490 */ 18491 @Readable 18492 public static final String KEY_CHORD_POWER_VOLUME_UP = 18493 "key_chord_power_volume_up"; 18494 18495 /** 18496 * Record audio from near-field microphone (ie. TV remote) 18497 * Allows audio recording regardless of sensor privacy state, 18498 * as it is an intentional user interaction: hold-to-talk 18499 * 18500 * Type: int (0 to disable, 1 to enable) 18501 * 18502 * @hide 18503 */ 18504 public static final String RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO_ENABLED = 18505 "receive_explicit_user_interaction_audio_enabled"; 18506 18507 /** 18508 * Keyguard should be on the left hand side of the screen, for wide screen layouts. 18509 * 18510 * @hide 18511 */ 18512 public static final int ONE_HANDED_KEYGUARD_SIDE_LEFT = 0; 18513 18514 /** 18515 * Keyguard should be on the right hand side of the screen, for wide screen layouts. 18516 * 18517 * @hide 18518 */ 18519 public static final int ONE_HANDED_KEYGUARD_SIDE_RIGHT = 1; 18520 /** 18521 * In one handed mode, which side the keyguard should be on. Allowable values are one of 18522 * the ONE_HANDED_KEYGUARD_SIDE_* constants. 18523 * 18524 * @hide 18525 */ 18526 public static final String ONE_HANDED_KEYGUARD_SIDE = "one_handed_keyguard_side"; 18527 18528 /** 18529 * A semi-colon separated list of Bluetooth hearing devices' local ambient volume data. 18530 * Each entry is encoded as a key=value list, separated by commas. Ex: 18531 * 18532 * "addr=XX:XX:XX:00:11,ambient=20,group_ambient=30;addr=XX:XX:XX:00:22,ambient=50" 18533 * 18534 * The following keys are supported: 18535 * <pre> 18536 * addr (String) 18537 * ambient (int) 18538 * group_ambient (int) 18539 * control_expanded (boolean) 18540 * </pre> 18541 * 18542 * Each entry must contains "addr" attribute, otherwise it'll be ignored. 18543 * @hide 18544 */ 18545 public static final String HEARING_DEVICE_LOCAL_AMBIENT_VOLUME = 18546 "hearing_device_local_ambient_volume"; 18547 18548 /** 18549 * A semi-colon separated list of Bluetooth hearing devices' notification data. 18550 * Each entry is encoded as a key=value list, separated by commas. Ex: 18551 * 18552 * "addr=XX:XX:XX:00:11,input_changes=1" 18553 * 18554 * The following keys are supported: 18555 * <pre> 18556 * addr (String) 18557 * input_changes (boolean) 18558 * </pre> 18559 * 18560 * Each entry must contains "addr" attribute, otherwise it'll be ignored. 18561 * @hide 18562 */ 18563 public static final String HEARING_DEVICE_LOCAL_NOTIFICATION = 18564 "hearing_device_local_notification"; 18565 18566 /** 18567 * Global settings that shouldn't be persisted. 18568 * 18569 * @hide 18570 */ 18571 public static final String[] TRANSIENT_SETTINGS = { 18572 CLOCKWORK_HOME_READY, 18573 }; 18574 18575 /** 18576 * Keys we no longer back up under the current schema, but want to continue to 18577 * process when restoring historical backup datasets. 18578 * 18579 * All settings in {@link LEGACY_RESTORE_SETTINGS} array *must* have a non-null validator, 18580 * otherwise they won't be restored. 18581 * 18582 * @hide 18583 */ 18584 public static final String[] LEGACY_RESTORE_SETTINGS = { 18585 }; 18586 18587 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 18588 private static final ContentProviderHolder sProviderHolder = 18589 new ContentProviderHolder(CONTENT_URI); 18590 18591 // Populated lazily, guarded by class object: 18592 @UnsupportedAppUsage 18593 private static final NameValueCache sNameValueCache = new NameValueCache( 18594 CONTENT_URI, 18595 CALL_METHOD_GET_GLOBAL, 18596 CALL_METHOD_PUT_GLOBAL, 18597 CALL_METHOD_DELETE_GLOBAL, 18598 sProviderHolder, 18599 Global.class); 18600 18601 // Certain settings have been moved from global to the per-user secure namespace 18602 @UnsupportedAppUsage 18603 private static final HashSet<String> MOVED_TO_SECURE; 18604 static { 18605 MOVED_TO_SECURE = new HashSet<>(8); 18606 MOVED_TO_SECURE.add(Global.INSTALL_NON_MARKET_APPS); 18607 MOVED_TO_SECURE.add(Global.ZEN_DURATION); 18608 MOVED_TO_SECURE.add(Global.CHARGING_SOUNDS_ENABLED); 18609 MOVED_TO_SECURE.add(Global.CHARGING_VIBRATION_ENABLED); 18610 MOVED_TO_SECURE.add(Global.NOTIFICATION_BUBBLES); 18611 MOVED_TO_SECURE.add(Global.BUGREPORT_IN_POWER_MENU); 18612 MOVED_TO_SECURE.add(Global.CUSTOM_BUGREPORT_HANDLER_APP); 18613 MOVED_TO_SECURE.add(Global.CUSTOM_BUGREPORT_HANDLER_USER); 18614 } 18615 18616 // Certain settings have been moved from global to the per-user system namespace 18617 private static final HashSet<String> MOVED_TO_SYSTEM; 18618 static { 18619 MOVED_TO_SYSTEM = new HashSet<>(1); 18620 MOVED_TO_SYSTEM.add(Global.APPLY_RAMPING_RINGER); 18621 } 18622 18623 /** @hide */ getMovedToSecureSettings(Set<String> outKeySet)18624 public static void getMovedToSecureSettings(Set<String> outKeySet) { 18625 outKeySet.addAll(MOVED_TO_SECURE); 18626 } 18627 18628 /** @hide */ getMovedToSystemSettings(Set<String> outKeySet)18629 public static void getMovedToSystemSettings(Set<String> outKeySet) { 18630 outKeySet.addAll(MOVED_TO_SYSTEM); 18631 } 18632 18633 /** @hide */ clearProviderForTest()18634 public static void clearProviderForTest() { 18635 sProviderHolder.clearProviderForTest(); 18636 sNameValueCache.clearGenerationTrackerForTest(); 18637 } 18638 18639 /** @hide */ getPublicSettings(Set<String> allKeys, Set<String> readableKeys, ArrayMap<String, Integer> readableKeysWithMaxTargetSdk)18640 public static void getPublicSettings(Set<String> allKeys, Set<String> readableKeys, 18641 ArrayMap<String, Integer> readableKeysWithMaxTargetSdk) { 18642 getPublicSettingsForClass(Global.class, allKeys, readableKeys, 18643 readableKeysWithMaxTargetSdk); 18644 // Add Global.Wearable keys on watches. 18645 if (ActivityThread.currentApplication().getApplicationContext().getPackageManager() 18646 .hasSystemFeature(PackageManager.FEATURE_WATCH)) { 18647 getPublicSettingsForClass(Global.Wearable.class, allKeys, readableKeys, 18648 readableKeysWithMaxTargetSdk); 18649 } 18650 } 18651 18652 /** 18653 * Look up a name in the database. 18654 * @param resolver to access the database with 18655 * @param name to look up in the table 18656 * @return the corresponding value, or null if not present 18657 */ getString(ContentResolver resolver, String name)18658 public static String getString(ContentResolver resolver, String name) { 18659 return getStringForUser(resolver, name, resolver.getUserId()); 18660 } 18661 18662 /** @hide */ 18663 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) getStringForUser(ContentResolver resolver, String name, int userHandle)18664 public static String getStringForUser(ContentResolver resolver, String name, 18665 int userHandle) { 18666 if (MOVED_TO_SECURE.contains(name)) { 18667 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" 18668 + " to android.provider.Settings.Secure, returning read-only value."); 18669 return Secure.getStringForUser(resolver, name, userHandle); 18670 } 18671 if (MOVED_TO_SYSTEM.contains(name)) { 18672 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" 18673 + " to android.provider.Settings.System, returning read-only value."); 18674 return System.getStringForUser(resolver, name, userHandle); 18675 } 18676 return sNameValueCache.getStringForUser(resolver, name, userHandle); 18677 } 18678 18679 /** 18680 * Store a name/value pair into the database. 18681 * @param resolver to access the database with 18682 * @param name to store 18683 * @param value to associate with the name 18684 * @return true if the value was set, false on database errors 18685 */ putString(ContentResolver resolver, String name, String value)18686 public static boolean putString(ContentResolver resolver, 18687 String name, String value) { 18688 return putStringForUser(resolver, name, value, null, false, resolver.getUserId(), 18689 DEFAULT_OVERRIDEABLE_BY_RESTORE); 18690 } 18691 18692 /** 18693 * Store a name/value pair into the database. 18694 * 18695 * @param resolver to access the database with 18696 * @param name to store 18697 * @param value to associate with the name 18698 * @param tag to associated with the setting. 18699 * @param makeDefault whether to make the value the default one. 18700 * @param overrideableByRestore whether restore can override this value 18701 * @return true if the value was set, false on database errors 18702 * 18703 * @hide 18704 */ 18705 @RequiresPermission(Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) putString(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, @Nullable String tag, boolean makeDefault, boolean overrideableByRestore)18706 public static boolean putString(@NonNull ContentResolver resolver, 18707 @NonNull String name, @Nullable String value, @Nullable String tag, 18708 boolean makeDefault, boolean overrideableByRestore) { 18709 return putStringForUser(resolver, name, value, tag, makeDefault, 18710 resolver.getUserId(), overrideableByRestore); 18711 } 18712 18713 /** 18714 * Store a name/value pair into the database. 18715 * <p> 18716 * The method takes an optional tag to associate with the setting 18717 * which can be used to clear only settings made by your package and 18718 * associated with this tag by passing the tag to {@link 18719 * #resetToDefaults(ContentResolver, String)}. Anyone can override 18720 * the current tag. Also if another package changes the setting 18721 * then the tag will be set to the one specified in the set call 18722 * which can be null. Also any of the settings setters that do not 18723 * take a tag as an argument effectively clears the tag. 18724 * </p><p> 18725 * For example, if you set settings A and B with tags T1 and T2 and 18726 * another app changes setting A (potentially to the same value), it 18727 * can assign to it a tag T3 (note that now the package that changed 18728 * the setting is not yours). Now if you reset your changes for T1 and 18729 * T2 only setting B will be reset and A not (as it was changed by 18730 * another package) but since A did not change you are in the desired 18731 * initial state. Now if the other app changes the value of A (assuming 18732 * you registered an observer in the beginning) you would detect that 18733 * the setting was changed by another app and handle this appropriately 18734 * (ignore, set back to some value, etc). 18735 * </p><p> 18736 * Also the method takes an argument whether to make the value the 18737 * default for this setting. If the system already specified a default 18738 * value, then the one passed in here will <strong>not</strong> 18739 * be set as the default. 18740 * </p> 18741 * 18742 * @param resolver to access the database with. 18743 * @param name to store. 18744 * @param value to associate with the name. 18745 * @param tag to associated with the setting. 18746 * @param makeDefault whether to make the value the default one. 18747 * @return true if the value was set, false on database errors. 18748 * 18749 * @see #resetToDefaults(ContentResolver, String) 18750 * 18751 * @hide 18752 */ 18753 @SystemApi 18754 @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) putString(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, @Nullable String tag, boolean makeDefault)18755 public static boolean putString(@NonNull ContentResolver resolver, 18756 @NonNull String name, @Nullable String value, @Nullable String tag, 18757 boolean makeDefault) { 18758 return putStringForUser(resolver, name, value, tag, makeDefault, 18759 resolver.getUserId(), DEFAULT_OVERRIDEABLE_BY_RESTORE); 18760 } 18761 18762 /** 18763 * Reset the settings to their defaults. This would reset <strong>only</strong> 18764 * settings set by the caller's package. Think of it of a way to undo your own 18765 * changes to the secure settings. Passing in the optional tag will reset only 18766 * settings changed by your package and associated with this tag. 18767 * 18768 * @param resolver Handle to the content resolver. 18769 * @param tag Optional tag which should be associated with the settings to reset. 18770 * 18771 * @see #putString(ContentResolver, String, String, String, boolean) 18772 * 18773 * @hide 18774 */ 18775 @SystemApi 18776 @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) resetToDefaults(@onNull ContentResolver resolver, @Nullable String tag)18777 public static void resetToDefaults(@NonNull ContentResolver resolver, 18778 @Nullable String tag) { 18779 resetToDefaultsAsUser(resolver, tag, RESET_MODE_PACKAGE_DEFAULTS, 18780 resolver.getUserId()); 18781 } 18782 18783 /** 18784 * Reset the settings to their defaults for a given user with a specific mode. The 18785 * optional tag argument is valid only for {@link #RESET_MODE_PACKAGE_DEFAULTS} 18786 * allowing resetting the settings made by a package and associated with the tag. 18787 * 18788 * @param resolver Handle to the content resolver. 18789 * @param tag Optional tag which should be associated with the settings to reset. 18790 * @param mode The reset mode. 18791 * @param userHandle The user for which to reset to defaults. 18792 * 18793 * @see #RESET_MODE_PACKAGE_DEFAULTS 18794 * @see #RESET_MODE_UNTRUSTED_DEFAULTS 18795 * @see #RESET_MODE_UNTRUSTED_CHANGES 18796 * @see #RESET_MODE_TRUSTED_DEFAULTS 18797 * 18798 * @hide 18799 */ resetToDefaultsAsUser(@onNull ContentResolver resolver, @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle)18800 public static void resetToDefaultsAsUser(@NonNull ContentResolver resolver, 18801 @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle) { 18802 try { 18803 Bundle arg = new Bundle(); 18804 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 18805 if (tag != null) { 18806 arg.putString(CALL_METHOD_TAG_KEY, tag); 18807 } 18808 arg.putInt(CALL_METHOD_RESET_MODE_KEY, mode); 18809 IContentProvider cp = sProviderHolder.getProvider(resolver); 18810 cp.call(resolver.getAttributionSource(), 18811 sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_GLOBAL, null, arg); 18812 } catch (RemoteException e) { 18813 Log.w(TAG, "Can't reset do defaults for " + CONTENT_URI, e); 18814 } 18815 } 18816 18817 /** @hide */ 18818 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) putStringForUser(ContentResolver resolver, String name, String value, int userHandle)18819 public static boolean putStringForUser(ContentResolver resolver, 18820 String name, String value, int userHandle) { 18821 return putStringForUser(resolver, name, value, null, false, userHandle, 18822 DEFAULT_OVERRIDEABLE_BY_RESTORE); 18823 } 18824 18825 /** @hide */ putStringForUser(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, @Nullable String tag, boolean makeDefault, @UserIdInt int userHandle, boolean overrideableByRestore)18826 public static boolean putStringForUser(@NonNull ContentResolver resolver, 18827 @NonNull String name, @Nullable String value, @Nullable String tag, 18828 boolean makeDefault, @UserIdInt int userHandle, boolean overrideableByRestore) { 18829 if (LOCAL_LOGV) { 18830 Log.v(TAG, "Global.putString(name=" + name + ", value=" + value + ") for " 18831 + userHandle); 18832 } 18833 // Global and Secure have the same access policy so we can forward writes 18834 if (MOVED_TO_SECURE.contains(name)) { 18835 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" 18836 + " to android.provider.Settings.Secure, value is unchanged."); 18837 return Secure.putStringForUser(resolver, name, value, tag, 18838 makeDefault, userHandle, overrideableByRestore); 18839 } 18840 // Global and System have the same access policy so we can forward writes 18841 if (MOVED_TO_SYSTEM.contains(name)) { 18842 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" 18843 + " to android.provider.Settings.System, value is unchanged."); 18844 return System.putStringForUser(resolver, name, value, tag, 18845 makeDefault, userHandle, overrideableByRestore); 18846 } 18847 return sNameValueCache.putStringForUser(resolver, name, value, tag, 18848 makeDefault, userHandle, overrideableByRestore); 18849 } 18850 18851 /** 18852 * Construct the content URI for a particular name/value pair, 18853 * useful for monitoring changes with a ContentObserver. 18854 * @param name to look up in the table 18855 * @return the corresponding content URI, or null if not present 18856 */ getUriFor(String name)18857 public static Uri getUriFor(String name) { 18858 return getUriFor(CONTENT_URI, name); 18859 } 18860 18861 /** 18862 * Convenience function for retrieving a single secure settings value 18863 * as an integer. Note that internally setting values are always 18864 * stored as strings; this function converts the string to an integer 18865 * for you. The default value will be returned if the setting is 18866 * not defined or not an integer. 18867 * 18868 * @param cr The ContentResolver to access. 18869 * @param name The name of the setting to retrieve. 18870 * @param def Value to return if the setting is not defined. 18871 * 18872 * @return The setting's current value, or 'def' if it is not defined 18873 * or not a valid integer. 18874 */ getInt(ContentResolver cr, String name, int def)18875 public static int getInt(ContentResolver cr, String name, int def) { 18876 String v = getString(cr, name); 18877 return parseIntSettingWithDefault(v, def); 18878 } 18879 18880 /** 18881 * Convenience function for retrieving a single secure settings value 18882 * as an integer. Note that internally setting values are always 18883 * stored as strings; this function converts the string to an integer 18884 * for you. 18885 * <p> 18886 * This version does not take a default value. If the setting has not 18887 * been set, or the string value is not a number, 18888 * it throws {@link SettingNotFoundException}. 18889 * 18890 * @param cr The ContentResolver to access. 18891 * @param name The name of the setting to retrieve. 18892 * 18893 * @throws SettingNotFoundException Thrown if a setting by the given 18894 * name can't be found or the setting value is not an integer. 18895 * 18896 * @return The setting's current value. 18897 */ getInt(ContentResolver cr, String name)18898 public static int getInt(ContentResolver cr, String name) 18899 throws SettingNotFoundException { 18900 String v = getString(cr, name); 18901 return parseIntSetting(v, name); 18902 } 18903 18904 /** 18905 * Convenience function for updating a single settings value as an 18906 * integer. This will either create a new entry in the table if the 18907 * given name does not exist, or modify the value of the existing row 18908 * with that name. Note that internally setting values are always 18909 * stored as strings, so this function converts the given value to a 18910 * string before storing it. 18911 * 18912 * @param cr The ContentResolver to access. 18913 * @param name The name of the setting to modify. 18914 * @param value The new value for the setting. 18915 * @return true if the value was set, false on database errors 18916 */ putInt(ContentResolver cr, String name, int value)18917 public static boolean putInt(ContentResolver cr, String name, int value) { 18918 return putString(cr, name, Integer.toString(value)); 18919 } 18920 18921 /** 18922 * Convenience function for retrieving a single secure settings value 18923 * as a {@code long}. Note that internally setting values are always 18924 * stored as strings; this function converts the string to a {@code long} 18925 * for you. The default value will be returned if the setting is 18926 * not defined or not a {@code long}. 18927 * 18928 * @param cr The ContentResolver to access. 18929 * @param name The name of the setting to retrieve. 18930 * @param def Value to return if the setting is not defined. 18931 * 18932 * @return The setting's current value, or 'def' if it is not defined 18933 * or not a valid {@code long}. 18934 */ getLong(ContentResolver cr, String name, long def)18935 public static long getLong(ContentResolver cr, String name, long def) { 18936 String v = getString(cr, name); 18937 return parseLongSettingWithDefault(v, def); 18938 } 18939 18940 /** 18941 * Convenience function for retrieving a single secure settings value 18942 * as a {@code long}. Note that internally setting values are always 18943 * stored as strings; this function converts the string to a {@code long} 18944 * for you. 18945 * <p> 18946 * This version does not take a default value. If the setting has not 18947 * been set, or the string value is not a number, 18948 * it throws {@link SettingNotFoundException}. 18949 * 18950 * @param cr The ContentResolver to access. 18951 * @param name The name of the setting to retrieve. 18952 * 18953 * @return The setting's current value. 18954 * @throws SettingNotFoundException Thrown if a setting by the given 18955 * name can't be found or the setting value is not an integer. 18956 */ getLong(ContentResolver cr, String name)18957 public static long getLong(ContentResolver cr, String name) 18958 throws SettingNotFoundException { 18959 String v = getString(cr, name); 18960 return parseLongSetting(v, name); 18961 } 18962 18963 /** 18964 * Convenience function for updating a secure settings value as a long 18965 * integer. This will either create a new entry in the table if the 18966 * given name does not exist, or modify the value of the existing row 18967 * with that name. Note that internally setting values are always 18968 * stored as strings, so this function converts the given value to a 18969 * string before storing it. 18970 * 18971 * @param cr The ContentResolver to access. 18972 * @param name The name of the setting to modify. 18973 * @param value The new value for the setting. 18974 * @return true if the value was set, false on database errors 18975 */ putLong(ContentResolver cr, String name, long value)18976 public static boolean putLong(ContentResolver cr, String name, long value) { 18977 return putString(cr, name, Long.toString(value)); 18978 } 18979 18980 /** 18981 * Convenience function for retrieving a single secure settings value 18982 * as a floating point number. Note that internally setting values are 18983 * always stored as strings; this function converts the string to an 18984 * float for you. The default value will be returned if the setting 18985 * is not defined or not a valid float. 18986 * 18987 * @param cr The ContentResolver to access. 18988 * @param name The name of the setting to retrieve. 18989 * @param def Value to return if the setting is not defined. 18990 * 18991 * @return The setting's current value, or 'def' if it is not defined 18992 * or not a valid float. 18993 */ getFloat(ContentResolver cr, String name, float def)18994 public static float getFloat(ContentResolver cr, String name, float def) { 18995 String v = getString(cr, name); 18996 return parseFloatSettingWithDefault(v, def); 18997 } 18998 18999 /** 19000 * Convenience function for retrieving a single secure settings value 19001 * as a float. Note that internally setting values are always 19002 * stored as strings; this function converts the string to a float 19003 * for you. 19004 * <p> 19005 * This version does not take a default value. If the setting has not 19006 * been set, or the string value is not a number, 19007 * it throws {@link SettingNotFoundException}. 19008 * 19009 * @param cr The ContentResolver to access. 19010 * @param name The name of the setting to retrieve. 19011 * 19012 * @throws SettingNotFoundException Thrown if a setting by the given 19013 * name can't be found or the setting value is not a float. 19014 * 19015 * @return The setting's current value. 19016 */ getFloat(ContentResolver cr, String name)19017 public static float getFloat(ContentResolver cr, String name) 19018 throws SettingNotFoundException { 19019 String v = getString(cr, name); 19020 return parseFloatSetting(v, name); 19021 } 19022 19023 /** 19024 * Convenience function for updating a single settings value as a 19025 * floating point number. This will either create a new entry in the 19026 * table if the given name does not exist, or modify the value of the 19027 * existing row with that name. Note that internally setting values 19028 * are always stored as strings, so this function converts the given 19029 * value to a string before storing it. 19030 * 19031 * @param cr The ContentResolver to access. 19032 * @param name The name of the setting to modify. 19033 * @param value The new value for the setting. 19034 * @return true if the value was set, false on database errors 19035 */ putFloat(ContentResolver cr, String name, float value)19036 public static boolean putFloat(ContentResolver cr, String name, float value) { 19037 return putString(cr, name, Float.toString(value)); 19038 } 19039 19040 /** 19041 * Subscription Id to be used for voice call on a multi sim device. 19042 * @hide 19043 */ 19044 @Readable 19045 public static final String MULTI_SIM_VOICE_CALL_SUBSCRIPTION = "multi_sim_voice_call"; 19046 19047 /** 19048 * Used to provide option to user to select subscription during dial. 19049 * The supported values are 0 = disable or 1 = enable prompt. 19050 * @hide 19051 */ 19052 @UnsupportedAppUsage 19053 @Readable 19054 public static final String MULTI_SIM_VOICE_PROMPT = "multi_sim_voice_prompt"; 19055 19056 /** 19057 * Subscription Id to be used for data call on a multi sim device. 19058 * @hide 19059 */ 19060 @Readable 19061 public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call"; 19062 19063 /** 19064 * Subscription Id to be used for SMS on a multi sim device. 19065 * @hide 19066 */ 19067 @Readable 19068 public static final String MULTI_SIM_SMS_SUBSCRIPTION = "multi_sim_sms"; 19069 19070 /** 19071 * Used to provide option to user to select subscription during send SMS. 19072 * The value 1 - enable, 0 - disable 19073 * @hide 19074 */ 19075 @Readable 19076 public static final String MULTI_SIM_SMS_PROMPT = "multi_sim_sms_prompt"; 19077 19078 /** User preferred subscriptions setting. 19079 * This holds the details of the user selected subscription from the card and 19080 * the activation status. Each settings string have the comma separated values 19081 * iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index 19082 * @hide 19083 */ 19084 @UnsupportedAppUsage 19085 @Readable 19086 public static final String[] MULTI_SIM_USER_PREFERRED_SUBS = {"user_preferred_sub1", 19087 "user_preferred_sub2","user_preferred_sub3"}; 19088 19089 /** 19090 * Which subscription is enabled for a physical slot. 19091 * @hide 19092 */ 19093 @Readable 19094 public static final String ENABLED_SUBSCRIPTION_FOR_SLOT = "enabled_subscription_for_slot"; 19095 19096 /** 19097 * Whether corresponding logical modem is enabled for a physical slot. 19098 * The value 1 - enable, 0 - disable 19099 * @hide 19100 */ 19101 @Readable 19102 public static final String MODEM_STACK_ENABLED_FOR_SLOT = "modem_stack_enabled_for_slot"; 19103 19104 /** 19105 * Whether to enable new contacts aggregator or not. 19106 * The value 1 - enable, 0 - disable 19107 * @hide 19108 */ 19109 @Readable 19110 public static final String NEW_CONTACT_AGGREGATOR = "new_contact_aggregator"; 19111 19112 /** 19113 * Whether to enable contacts metadata syncing or not 19114 * The value 1 - enable, 0 - disable 19115 * 19116 * @removed 19117 */ 19118 @Deprecated 19119 @Readable 19120 public static final String CONTACT_METADATA_SYNC = "contact_metadata_sync"; 19121 19122 /** 19123 * Whether to enable contacts metadata syncing or not 19124 * The value 1 - enable, 0 - disable 19125 */ 19126 @Readable 19127 public static final String CONTACT_METADATA_SYNC_ENABLED = "contact_metadata_sync_enabled"; 19128 19129 /** 19130 * Whether to enable cellular on boot. 19131 * The value 1 - enable, 0 - disable 19132 * @hide 19133 */ 19134 @Readable 19135 public static final String ENABLE_CELLULAR_ON_BOOT = "enable_cellular_on_boot"; 19136 19137 /** 19138 * The maximum allowed notification enqueue rate in Hertz. 19139 * 19140 * Should be a float, and includes updates only. 19141 * @hide 19142 */ 19143 @Readable 19144 public static final String MAX_NOTIFICATION_ENQUEUE_RATE = "max_notification_enqueue_rate"; 19145 19146 /** 19147 * Displays toasts when an app posts a notification that does not specify a valid channel. 19148 * 19149 * The value 1 - enable, 0 - disable 19150 * @hide 19151 */ 19152 @Readable 19153 public static final String SHOW_NOTIFICATION_CHANNEL_WARNINGS = 19154 "show_notification_channel_warnings"; 19155 19156 /** 19157 * Whether to disable app and notification screen share protections. 19158 * 19159 * The value 1 - enable, 0 - disable 19160 * @hide 19161 */ 19162 @Readable 19163 public static final String DISABLE_SCREEN_SHARE_PROTECTIONS_FOR_APPS_AND_NOTIFICATIONS = 19164 "disable_screen_share_protections_for_apps_and_notifications"; 19165 19166 /** 19167 * Whether cell is enabled/disabled 19168 * @hide 19169 */ 19170 @Readable 19171 public static final String CELL_ON = "cell_on"; 19172 19173 /** 19174 * Global settings which can be accessed by instant apps. 19175 * @hide 19176 */ 19177 public static final Set<String> INSTANT_APP_SETTINGS = new ArraySet<>(); 19178 static { 19179 INSTANT_APP_SETTINGS.add(WAIT_FOR_DEBUGGER); 19180 INSTANT_APP_SETTINGS.add(DEVICE_PROVISIONED); 19181 INSTANT_APP_SETTINGS.add(DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES); 19182 INSTANT_APP_SETTINGS.add(DEVELOPMENT_FORCE_RTL); 19183 INSTANT_APP_SETTINGS.add(EPHEMERAL_COOKIE_MAX_SIZE_BYTES); 19184 INSTANT_APP_SETTINGS.add(AIRPLANE_MODE_ON); 19185 INSTANT_APP_SETTINGS.add(WINDOW_ANIMATION_SCALE); 19186 INSTANT_APP_SETTINGS.add(TRANSITION_ANIMATION_SCALE); 19187 INSTANT_APP_SETTINGS.add(ANIMATOR_DURATION_SCALE); 19188 INSTANT_APP_SETTINGS.add(DEBUG_VIEW_ATTRIBUTES); 19189 INSTANT_APP_SETTINGS.add(DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE); 19190 INSTANT_APP_SETTINGS.add(WTF_IS_FATAL); 19191 INSTANT_APP_SETTINGS.add(SEND_ACTION_APP_ERROR); 19192 INSTANT_APP_SETTINGS.add(ZEN_MODE); 19193 } 19194 19195 /** 19196 * Whether to show the high temperature warning notification. 19197 * @hide 19198 */ 19199 @Readable 19200 public static final String SHOW_TEMPERATURE_WARNING = "show_temperature_warning"; 19201 19202 /** 19203 * Whether to show the usb high temperature alarm notification. 19204 * @hide 19205 */ 19206 @Readable 19207 public static final String SHOW_USB_TEMPERATURE_ALARM = "show_usb_temperature_alarm"; 19208 19209 /** 19210 * Temperature at which the high temperature warning notification should be shown. 19211 * @hide 19212 */ 19213 @Readable 19214 public static final String WARNING_TEMPERATURE = "warning_temperature"; 19215 19216 /** 19217 * Whether the diskstats logging task is enabled/disabled. 19218 * @hide 19219 */ 19220 @Readable 19221 public static final String ENABLE_DISKSTATS_LOGGING = "enable_diskstats_logging"; 19222 19223 /** 19224 * Whether the cache quota calculation task is enabled/disabled. 19225 * @hide 19226 */ 19227 @Readable 19228 public static final String ENABLE_CACHE_QUOTA_CALCULATION = 19229 "enable_cache_quota_calculation"; 19230 19231 /** 19232 * Whether the Deletion Helper no threshold toggle is available. 19233 * @hide 19234 */ 19235 @Readable 19236 public static final String ENABLE_DELETION_HELPER_NO_THRESHOLD_TOGGLE = 19237 "enable_deletion_helper_no_threshold_toggle"; 19238 19239 /** 19240 * The list of snooze options for notifications 19241 * This is encoded as a key=value list, separated by commas. Ex: 19242 * 19243 * "default=60,options_array=15:30:60:120" 19244 * 19245 * The following keys are supported: 19246 * 19247 * <pre> 19248 * default (int) 19249 * options_array (int[]) 19250 * </pre> 19251 * 19252 * All delays in integer minutes. Array order is respected. 19253 * Options will be used in order up to the maximum allowed by the UI. 19254 * @hide 19255 */ 19256 @Readable 19257 public static final String NOTIFICATION_SNOOZE_OPTIONS = 19258 "notification_snooze_options"; 19259 19260 /** 19261 * When enabled, notifications the notification assistant service has modified will show an 19262 * indicator. When tapped, this indicator will describe the adjustment made and solicit 19263 * feedback. This flag will also add a "automatic" option to the long press menu. 19264 * 19265 * The value 1 - enable, 0 - disable 19266 * @hide 19267 */ 19268 public static final String NOTIFICATION_FEEDBACK_ENABLED = "notification_feedback_enabled"; 19269 19270 /** 19271 * Settings key for the ratio of notification dismissals to notification views - one of the 19272 * criteria for showing the notification blocking helper. 19273 * 19274 * <p>The value is a float ranging from 0.0 to 1.0 (the closer to 0.0, the more intrusive 19275 * the blocking helper will be). 19276 * 19277 * @hide 19278 */ 19279 @Readable 19280 public static final String BLOCKING_HELPER_DISMISS_TO_VIEW_RATIO_LIMIT = 19281 "blocking_helper_dismiss_to_view_ratio"; 19282 19283 /** 19284 * Settings key for the longest streak of dismissals - one of the criteria for showing the 19285 * notification blocking helper. 19286 * 19287 * <p>The value is an integer greater than 0. 19288 * 19289 * @hide 19290 */ 19291 @Readable 19292 public static final String BLOCKING_HELPER_STREAK_LIMIT = "blocking_helper_streak_limit"; 19293 19294 /** 19295 * Configuration flags for SQLite Compatibility WAL. Encoded as a key-value list, separated 19296 * by commas. E.g.: compatibility_wal_supported=true, wal_syncmode=OFF 19297 * 19298 * Supported keys:<br/> 19299 * <li> 19300 * <ul> {@code legacy_compatibility_wal_enabled} : A {code boolean} flag that determines 19301 * whether or not "compatibility WAL" mode is enabled by default. This is a legacy flag 19302 * and is honoured on Android Q and higher. This flag will be removed in a future release. 19303 * </ul> 19304 * <ul> {@code wal_syncmode} : A {@code String} representing the synchronization mode to use 19305 * when WAL is enabled, either via {@code legacy_compatibility_wal_enabled} or using the 19306 * obsolete {@code compatibility_wal_supported} flag. 19307 * </ul> 19308 * <ul> {@code truncate_size} : A {@code int} flag that specifies the truncate size of the 19309 * WAL journal. 19310 * </ul> 19311 * <ul> {@code compatibility_wal_supported} : A {code boolean} flag that specifies whether 19312 * the legacy "compatibility WAL" mode is enabled by default. This flag is obsolete and is 19313 * only supported on Android Pie. 19314 * </ul> 19315 * </li> 19316 * 19317 * @hide 19318 */ 19319 @Readable 19320 public static final String SQLITE_COMPATIBILITY_WAL_FLAGS = 19321 "sqlite_compatibility_wal_flags"; 19322 19323 /** 19324 * Enable GNSS Raw Measurements Full Tracking? 19325 * 0 = no 19326 * 1 = yes 19327 * @hide 19328 */ 19329 @Readable 19330 public static final String ENABLE_GNSS_RAW_MEAS_FULL_TRACKING = 19331 "enable_gnss_raw_meas_full_tracking"; 19332 19333 /** 19334 * Whether the notification should be ongoing (persistent) when a carrier app install is 19335 * required. 19336 * 19337 * The value is a boolean (1 or 0). 19338 * @hide 19339 */ 19340 @SystemApi 19341 @Readable 19342 public static final String INSTALL_CARRIER_APP_NOTIFICATION_PERSISTENT = 19343 "install_carrier_app_notification_persistent"; 19344 19345 /** 19346 * The amount of time (ms) to hide the install carrier app notification after the user has 19347 * ignored it. After this time passes, the notification will be shown again 19348 * 19349 * The value is a long 19350 * @hide 19351 */ 19352 @SystemApi 19353 @Readable 19354 public static final String INSTALL_CARRIER_APP_NOTIFICATION_SLEEP_MILLIS = 19355 "install_carrier_app_notification_sleep_millis"; 19356 19357 /** 19358 * Whether we've enabled zram on this device. Takes effect on 19359 * reboot. The value "1" enables zram; "0" disables it, and 19360 * everything else is unspecified. 19361 * @hide 19362 */ 19363 @Readable 19364 public static final String ZRAM_ENABLED = 19365 "zram_enabled"; 19366 19367 /** 19368 * Whether the app freezer is enabled on this device. 19369 * The value of "enabled" enables the app freezer, "disabled" disables it and 19370 * "device_default" will let the system decide whether to enable the freezer or not 19371 * @hide 19372 */ 19373 @Readable 19374 public static final String CACHED_APPS_FREEZER_ENABLED = "cached_apps_freezer"; 19375 19376 /** 19377 * Configuration flags for smart replies in notifications. 19378 * This is encoded as a key=value list, separated by commas. Ex: 19379 * 19380 * "enabled=1,max_squeeze_remeasure_count=3" 19381 * 19382 * The following keys are supported: 19383 * 19384 * <pre> 19385 * enabled (boolean) 19386 * requires_targeting_p (boolean) 19387 * max_squeeze_remeasure_attempts (int) 19388 * edit_choices_before_sending (boolean) 19389 * show_in_heads_up (boolean) 19390 * min_num_system_generated_replies (int) 19391 * max_num_actions (int) 19392 * </pre> 19393 * @see com.android.systemui.statusbar.policy.SmartReplyConstants 19394 * @hide 19395 */ 19396 @Readable 19397 public static final String SMART_REPLIES_IN_NOTIFICATIONS_FLAGS = 19398 "smart_replies_in_notifications_flags"; 19399 19400 /** 19401 * Configuration flags for the automatic generation of smart replies and smart actions in 19402 * notifications. This is encoded as a key=value list, separated by commas. Ex: 19403 * "generate_replies=false,generate_actions=true". 19404 * 19405 * The following keys are supported: 19406 * 19407 * <pre> 19408 * generate_replies (boolean) 19409 * generate_actions (boolean) 19410 * </pre> 19411 * @hide 19412 */ 19413 @Readable 19414 public static final String SMART_SUGGESTIONS_IN_NOTIFICATIONS_FLAGS = 19415 "smart_suggestions_in_notifications_flags"; 19416 19417 /** 19418 * If nonzero, crashes in foreground processes will bring up a dialog. 19419 * Otherwise, the process will be silently killed. 19420 * @hide 19421 */ 19422 @TestApi 19423 @Readable 19424 @SuppressLint("NoSettingsProvider") 19425 public static final String SHOW_FIRST_CRASH_DIALOG = "show_first_crash_dialog"; 19426 19427 /** 19428 * If nonzero, crash dialogs will show an option to restart the app. 19429 * @hide 19430 */ 19431 @Readable 19432 public static final String SHOW_RESTART_IN_CRASH_DIALOG = "show_restart_in_crash_dialog"; 19433 19434 /** 19435 * If nonzero, crash dialogs will show an option to mute all future crash dialogs for 19436 * this app. 19437 * @hide 19438 */ 19439 @Readable 19440 public static final String SHOW_MUTE_IN_CRASH_DIALOG = "show_mute_in_crash_dialog"; 19441 19442 /** 19443 * Backup and restore agent timeout parameters. 19444 * These parameters are represented by a comma-delimited key-value list. 19445 * 19446 * The following strings are supported as keys: 19447 * <pre> 19448 * kv_backup_agent_timeout_millis (long) 19449 * full_backup_agent_timeout_millis (long) 19450 * shared_backup_agent_timeout_millis (long) 19451 * restore_agent_timeout_millis (long) 19452 * restore_agent_finished_timeout_millis (long) 19453 * </pre> 19454 * 19455 * They map to milliseconds represented as longs. 19456 * 19457 * Ex: "kv_backup_agent_timeout_millis=30000,full_backup_agent_timeout_millis=300000" 19458 * 19459 * @hide 19460 */ 19461 @Readable 19462 public static final String BACKUP_AGENT_TIMEOUT_PARAMETERS = 19463 "backup_agent_timeout_parameters"; 19464 19465 /** 19466 * Blocklist of GNSS satellites. 19467 * 19468 * This is a list of integers separated by commas to represent pairs of (constellation, 19469 * svid). Thus, the number of integers should be even. 19470 * 19471 * E.g.: "3,0,5,24" denotes (constellation=3, svid=0) and (constellation=5, svid=24) are 19472 * blocklisted. Note that svid=0 denotes all svids in the constellation are blocklisted. 19473 * 19474 * @hide 19475 */ 19476 public static final String GNSS_SATELLITE_BLOCKLIST = "gnss_satellite_blocklist"; 19477 19478 /** 19479 * Duration of updates in millisecond for GNSS location request from HAL to framework. 19480 * 19481 * If zero, the GNSS location request feature is disabled. 19482 * 19483 * The value is a non-negative long. 19484 * 19485 * @hide 19486 */ 19487 @Readable 19488 public static final String GNSS_HAL_LOCATION_REQUEST_DURATION_MILLIS = 19489 "gnss_hal_location_request_duration_millis"; 19490 19491 /** 19492 * Binder call stats settings. 19493 * 19494 * The following strings are supported as keys: 19495 * <pre> 19496 * enabled (boolean) 19497 * detailed_tracking (boolean) 19498 * upload_data (boolean) 19499 * sampling_interval (int) 19500 * </pre> 19501 * 19502 * @hide 19503 */ 19504 @Readable 19505 public static final String BINDER_CALLS_STATS = "binder_calls_stats"; 19506 19507 /** 19508 * Looper stats settings. 19509 * 19510 * The following strings are supported as keys: 19511 * <pre> 19512 * enabled (boolean) 19513 * sampling_interval (int) 19514 * </pre> 19515 * 19516 * @hide 19517 */ 19518 @Readable 19519 public static final String LOOPER_STATS = "looper_stats"; 19520 19521 /** 19522 * Settings for collecting statistics on CPU usage per thread 19523 * 19524 * The following strings are supported as keys: 19525 * <pre> 19526 * num_buckets (int) 19527 * collected_uids (string) 19528 * minimum_total_cpu_usage_millis (int) 19529 * </pre> 19530 * 19531 * @hide 19532 */ 19533 @Readable 19534 public static final String KERNEL_CPU_THREAD_READER = "kernel_cpu_thread_reader"; 19535 19536 /** 19537 * Whether we've enabled native flags health check on this device. Takes effect on 19538 * reboot. The value "1" enables native flags health check; otherwise it's disabled. 19539 * @hide 19540 */ 19541 @Readable 19542 public static final String NATIVE_FLAGS_HEALTH_CHECK_ENABLED = 19543 "native_flags_health_check_enabled"; 19544 19545 /** 19546 * Parameter for {@link #APPOP_HISTORY_PARAMETERS} that controls the mode 19547 * in which the historical registry operates. 19548 * 19549 * @hide 19550 */ 19551 @Readable 19552 public static final String APPOP_HISTORY_MODE = "mode"; 19553 19554 /** 19555 * Parameter for {@link #APPOP_HISTORY_PARAMETERS} that controls how long 19556 * is the interval between snapshots in the base case i.e. the most recent 19557 * part of the history. 19558 * 19559 * @hide 19560 */ 19561 @Readable 19562 public static final String APPOP_HISTORY_BASE_INTERVAL_MILLIS = "baseIntervalMillis"; 19563 19564 /** 19565 * Parameter for {@link #APPOP_HISTORY_PARAMETERS} that controls the base 19566 * for the logarithmic step when building app op history. 19567 * 19568 * @hide 19569 */ 19570 @Readable 19571 public static final String APPOP_HISTORY_INTERVAL_MULTIPLIER = "intervalMultiplier"; 19572 19573 /** 19574 * Appop history parameters. These parameters are represented by 19575 * a comma-delimited key-value list. 19576 * 19577 * The following strings are supported as keys: 19578 * <pre> 19579 * mode (int) 19580 * baseIntervalMillis (long) 19581 * intervalMultiplier (int) 19582 * </pre> 19583 * 19584 * Ex: "mode=HISTORICAL_MODE_ENABLED_ACTIVE,baseIntervalMillis=1000,intervalMultiplier=10" 19585 * 19586 * @see #APPOP_HISTORY_MODE 19587 * @see #APPOP_HISTORY_BASE_INTERVAL_MILLIS 19588 * @see #APPOP_HISTORY_INTERVAL_MULTIPLIER 19589 * 19590 * @hide 19591 */ 19592 @Readable 19593 public static final String APPOP_HISTORY_PARAMETERS = 19594 "appop_history_parameters"; 19595 19596 /** 19597 * Auto revoke parameters. These parameters are represented by 19598 * a comma-delimited key-value list. 19599 * 19600 * <pre> 19601 * enabledForPreRApps (bolean) 19602 * unusedThresholdMs (long) 19603 * checkFrequencyMs (long) 19604 * </pre> 19605 * 19606 * Ex: "enabledForPreRApps=false,unusedThresholdMs=7776000000,checkFrequencyMs=1296000000" 19607 * 19608 * @hide 19609 */ 19610 @Readable 19611 public static final String AUTO_REVOKE_PARAMETERS = 19612 "auto_revoke_parameters"; 19613 19614 /** 19615 * Delay for sending ACTION_CHARGING after device is plugged in. 19616 * This is used as an override for constants defined in BatteryStatsImpl. Its purposes are: 19617 * <ol> 19618 * <li>Ease of experimentation</li> 19619 * <li>Customization of different device</li> 19620 * </ol> 19621 * 19622 * @see com.android.internal.os.BatteryStatsImpl.Constants.KEY_BATTERY_CHARGED_DELAY_MS 19623 * @hide 19624 */ 19625 @Readable 19626 public static final String BATTERY_CHARGING_STATE_UPDATE_DELAY = 19627 "battery_charging_state_update_delay"; 19628 19629 /** 19630 * Threshold battery level to enforce battery state as charging. That means when battery 19631 * level is equal to or higher than this threshold, it is always considered charging, even 19632 * if battery level lowered. 19633 * This is used as an override for constants defined in BatteryStatsImpl. Its purposes are: 19634 * <ol> 19635 * <li>Ease of experimentation</li> 19636 * <li>Customization of different device</li> 19637 * </ol> 19638 * 19639 * @hide 19640 * @see com.android.internal.os.BatteryStatsImpl.Constants.BATTERY_CHARGING_ENFORCE_LEVEL 19641 */ 19642 public static final String BATTERY_CHARGING_STATE_ENFORCE_LEVEL = 19643 "battery_charging_state_enforce_level"; 19644 19645 /** 19646 * A serialized string of params that will be loaded into a text classifier action model. 19647 * 19648 * @hide 19649 */ 19650 @Readable 19651 public static final String TEXT_CLASSIFIER_ACTION_MODEL_PARAMS = 19652 "text_classifier_action_model_params"; 19653 19654 /** 19655 * The amount of time to suppress "power-off" from the power button after the device has 19656 * woken due to a gesture (lifting the phone). Since users have learned to hit the power 19657 * button immediately when lifting their device, it can cause the device to turn off if a 19658 * gesture has just woken the device. This value tells us the milliseconds to wait after 19659 * a gesture before "power-off" via power-button is functional again. A value of 0 is no 19660 * delay, and reverts to the old behavior. 19661 * 19662 * @hide 19663 */ 19664 @Readable 19665 public static final String POWER_BUTTON_SUPPRESSION_DELAY_AFTER_GESTURE_WAKE = 19666 "power_button_suppression_delay_after_gesture_wake"; 19667 19668 /** 19669 * The usage amount of advanced battery. The value is 0~100. 19670 * 19671 * @hide 19672 */ 19673 @Readable 19674 public static final String ADVANCED_BATTERY_USAGE_AMOUNT = "advanced_battery_usage_amount"; 19675 19676 /** 19677 * For 5G NSA capable devices, determines whether NR tracking indications are on 19678 * when the screen is off. 19679 * 19680 * Values are: 19681 * 0: off - All 5G NSA tracking indications are off when the screen is off. 19682 * 1: extended - All 5G NSA tracking indications are on when the screen is off as long as 19683 * the device is camped on 5G NSA (5G icon is showing in status bar). 19684 * If the device is not camped on 5G NSA, tracking indications are off. 19685 * 2: always on - All 5G NSA tracking indications are on whether the screen is on or off. 19686 * @hide 19687 */ 19688 @Readable 19689 public static final String NR_NSA_TRACKING_SCREEN_OFF_MODE = 19690 "nr_nsa_tracking_screen_off_mode"; 19691 19692 /** 19693 * Whether to show People Space. 19694 * Values are: 19695 * 0: Disabled (default) 19696 * 1: Enabled 19697 * @hide 19698 */ 19699 public static final String SHOW_PEOPLE_SPACE = "show_people_space"; 19700 19701 /** 19702 * Which types of conversation(s) to show in People Space. 19703 * Values are: 19704 * 0: Single user-selected conversation (default) 19705 * 1: Priority conversations only 19706 * 2: All conversations 19707 * @hide 19708 */ 19709 public static final String PEOPLE_SPACE_CONVERSATION_TYPE = 19710 "people_space_conversation_type"; 19711 19712 /** 19713 * Whether to show new notification dismissal. 19714 * Values are: 19715 * 0: Disabled 19716 * 1: Enabled 19717 * @hide 19718 */ 19719 public static final String SHOW_NEW_NOTIF_DISMISS = "show_new_notif_dismiss"; 19720 19721 /** 19722 * The maximum allowed obscuring opacity by UID to propagate touches. 19723 * 19724 * For certain window types (eg. SAWs), the decision of honoring {@link LayoutParams 19725 * #FLAG_NOT_TOUCHABLE} or not depends on the combined obscuring opacity of the windows 19726 * above the touch-consuming window. 19727 * 19728 * For a certain UID: 19729 * <ul> 19730 * <li>If it's the same as the UID of the touch-consuming window, allow it to propagate 19731 * the touch. 19732 * <li>Otherwise take all its windows of eligible window types above the touch-consuming 19733 * window, compute their combined obscuring opacity considering that {@code 19734 * opacity(A, B) = 1 - (1 - opacity(A))*(1 - opacity(B))}. If the computed value is 19735 * lesser than or equal to this setting and there are no other windows preventing the 19736 * touch, allow the UID to propagate the touch. 19737 * </ul> 19738 * 19739 * @see android.hardware.input.InputManager#getMaximumObscuringOpacityForTouch() 19740 * @see android.hardware.input.InputManager#setMaximumObscuringOpacityForTouch(float) 19741 * 19742 * @hide 19743 */ 19744 @Readable 19745 public static final String MAXIMUM_OBSCURING_OPACITY_FOR_TOUCH = 19746 "maximum_obscuring_opacity_for_touch"; 19747 19748 /** 19749 * Used to enable / disable the Restricted Networking Mode in which network access is 19750 * restricted to apps holding the CONNECTIVITY_USE_RESTRICTED_NETWORKS permission. 19751 * 19752 * Values are: 19753 * 0: disabled 19754 * 1: enabled 19755 * @hide 19756 */ 19757 public static final String RESTRICTED_NETWORKING_MODE = "restricted_networking_mode"; 19758 19759 /** 19760 * Setting indicating whether Low Power Standby is enabled, if supported. 19761 * 19762 * Values are: 19763 * 0: disabled 19764 * 1: enabled 19765 * 19766 * @hide 19767 */ 19768 public static final String LOW_POWER_STANDBY_ENABLED = "low_power_standby_enabled"; 19769 19770 /** 19771 * Setting indicating whether Low Power Standby is allowed to be active during doze 19772 * maintenance mode. 19773 * 19774 * Values are: 19775 * 0: Low Power Standby will be disabled during doze maintenance mode 19776 * 1: Low Power Standby can be active during doze maintenance mode 19777 * 19778 * @hide 19779 */ 19780 public static final String LOW_POWER_STANDBY_ACTIVE_DURING_MAINTENANCE = 19781 "low_power_standby_active_during_maintenance"; 19782 19783 /** 19784 * Timeout for the system server watchdog. 19785 * 19786 * @see {@link com.android.server.Watchdog}. 19787 * 19788 * @hide 19789 */ 19790 public static final String WATCHDOG_TIMEOUT_MILLIS = 19791 "system_server_watchdog_timeout_ms"; 19792 19793 /** 19794 * Whether to enable managed device provisioning via the role holder. 19795 * 19796 * @hide 19797 */ 19798 public static final String MANAGED_PROVISIONING_DEFER_PROVISIONING_TO_ROLE_HOLDER = 19799 "managed_provisioning_defer_provisioning_to_role_holder"; 19800 19801 /** 19802 * State of whether review notification permissions notification needs to 19803 * be shown the user, and whether the user has interacted. 19804 * 19805 * Valid values: 19806 * -1 = UNKNOWN 19807 * 0 = SHOULD_SHOW 19808 * 1 = USER_INTERACTED 19809 * 2 = DISMISSED 19810 * 3 = RESHOWN 19811 * @hide 19812 */ 19813 public static final String REVIEW_PERMISSIONS_NOTIFICATION_STATE = 19814 "review_permissions_notification_state"; 19815 19816 /** 19817 * Whether repair mode is active on the device. 19818 * <p> 19819 * Set to 1 for true and 0 for false. 19820 * 19821 * @hide 19822 */ 19823 public static final String REPAIR_MODE_ACTIVE = "repair_mode_active"; 19824 19825 /** 19826 * Whether the notification manager service should redact notifications that contain otps 19827 * from untrusted listeners. Defaults to 1/true. 19828 * @hide 19829 */ 19830 public static final String REDACT_OTP_NOTIFICATIONS_FROM_UNTRUSTED_LISTENERS = 19831 "redact_otp_notifications_from_untrusted_listeners"; 19832 19833 /** 19834 * Settings migrated from Wear OS settings provider. 19835 * @hide 19836 */ 19837 public static final class Wearable extends NameValueTable { 19838 /** 19839 * Whether the user has any pay tokens on their watch. 19840 * @hide 19841 */ 19842 public static final String HAS_PAY_TOKENS = "has_pay_tokens"; 19843 19844 /** 19845 * Gcm checkin timeout in minutes. 19846 * @hide 19847 */ 19848 public static final String GMS_CHECKIN_TIMEOUT_MIN = "gms_checkin_timeout_min"; 19849 19850 /** 19851 * If hotword detection should be enabled. 19852 * @hide 19853 */ 19854 @Readable 19855 public static final String HOTWORD_DETECTION_ENABLED = "hotword_detection_enabled"; 19856 19857 /** 19858 * Whether Smart Replies are enabled within Wear. 19859 * @hide 19860 */ 19861 @Readable 19862 public static final String SMART_REPLIES_ENABLED = "smart_replies_enabled"; 19863 19864 /** 19865 * The default vibration pattern. 19866 * @hide 19867 */ 19868 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19869 public static final String DEFAULT_VIBRATION = "default_vibration"; 19870 19871 /** 19872 * If FLP should obtain location data from the paired device. 19873 * @hide 19874 */ 19875 @Readable 19876 public static final String OBTAIN_PAIRED_DEVICE_LOCATION = 19877 "obtain_paired_device_location"; 19878 19879 /** 19880 * The play store availability on companion phone. 19881 * @hide 19882 */ 19883 @Readable 19884 public static final String PHONE_PLAY_STORE_AVAILABILITY = 19885 "phone_play_store_availability"; 19886 19887 // Possible phone play store availability states 19888 /** @hide */ 19889 public static final int PHONE_PLAY_STORE_AVAILABILITY_UNKNOWN = 0; 19890 /** @hide */ 19891 public static final int PHONE_PLAY_STORE_AVAILABLE = 1; 19892 /** @hide */ 19893 public static final int PHONE_PLAY_STORE_UNAVAILABLE = 2; 19894 19895 /** 19896 * Whether the bug report is enabled. 19897 * @hide 19898 */ 19899 @Readable 19900 public static final String BUG_REPORT = "bug_report"; 19901 19902 // Possible bug report states 19903 /** @hide */ 19904 public static final int BUG_REPORT_DISABLED = 0; 19905 /** @hide */ 19906 public static final int BUG_REPORT_ENABLED = 1; 19907 19908 /** 19909 * The enabled/disabled state of the SmartIlluminate. 19910 * @hide 19911 */ 19912 @Readable 19913 public static final String SMART_ILLUMINATE_ENABLED = "smart_illuminate_enabled"; 19914 19915 /** 19916 * Whether automatic time is enabled on the watch. 19917 * @hide 19918 */ 19919 @Readable 19920 public static final String CLOCKWORK_AUTO_TIME = "clockwork_auto_time"; 19921 19922 // Possible clockwork auto time states 19923 /** @hide */ 19924 public static final int SYNC_TIME_FROM_PHONE = 0; 19925 /** @hide */ 19926 public static final int SYNC_TIME_FROM_NETWORK = 1; 19927 /** @hide */ 19928 public static final int AUTO_TIME_OFF = 2; 19929 /** @hide */ 19930 public static final int INVALID_AUTO_TIME_STATE = 3; 19931 19932 19933 /** 19934 * Whether automatic time zone is enabled on the watch. 19935 * @hide 19936 */ 19937 @Readable 19938 public static final String CLOCKWORK_AUTO_TIME_ZONE = "clockwork_auto_time_zone"; 19939 19940 // Possible clockwork auto time zone states 19941 /** @hide */ 19942 public static final int SYNC_TIME_ZONE_FROM_PHONE = 0; 19943 /** @hide */ 19944 public static final int SYNC_TIME_ZONE_FROM_NETWORK = 1; 19945 /** @hide */ 19946 public static final int AUTO_TIME_ZONE_OFF = 2; 19947 /** @hide */ 19948 public static final int INVALID_AUTO_TIME_ZONE_STATE = 3; 19949 19950 /** 19951 * Whether 24 hour time format is enabled on the watch. 19952 * @hide 19953 */ 19954 @Readable 19955 public static final String CLOCKWORK_24HR_TIME = "clockwork_24hr_time"; 19956 19957 /** 19958 * Whether the auto wifi toggle setting is enabled. 19959 * @hide 19960 */ 19961 @Readable 19962 public static final String AUTO_WIFI = "auto_wifi"; 19963 19964 // Possible force wifi on states 19965 /** @hide */ 19966 public static final int AUTO_WIFI_DISABLED = 0; 19967 /** @hide */ 19968 public static final int AUTO_WIFI_ENABLED = 1; 19969 19970 /** 19971 * The number of minutes after the WiFi enters power save mode. 19972 * @hide 19973 */ 19974 public static final String WIFI_POWER_SAVE = "wifi_power_save"; 19975 19976 /** 19977 * The time at which we should no longer skip the wifi requirement check (we skip the 19978 * wifi requirement until this time). The time is in millis since epoch. 19979 * @hide 19980 */ 19981 @Readable 19982 public static final String ALT_BYPASS_WIFI_REQUIREMENT_TIME_MILLIS = 19983 "alt_bypass_wifi_requirement_time_millis"; 19984 19985 /** 19986 * Whether the setup was skipped. 19987 * @hide 19988 */ 19989 @Readable 19990 public static final String SETUP_SKIPPED = "setup_skipped"; 19991 19992 // Possible setup_skipped states 19993 /** @hide */ 19994 public static final int SETUP_SKIPPED_UNKNOWN = 0; 19995 /** @hide */ 19996 public static final int SETUP_SKIPPED_YES = 1; 19997 /** @hide */ 19998 public static final int SETUP_SKIPPED_NO = 2; 19999 20000 /** 20001 * The last requested call forwarding action. 20002 * @hide 20003 */ 20004 @Readable 20005 public static final String LAST_CALL_FORWARD_ACTION = "last_call_forward_action"; 20006 20007 // Possible call forwarding actions 20008 /** @hide */ 20009 public static final int CALL_FORWARD_ACTION_ON = 1; 20010 /** @hide */ 20011 public static final int CALL_FORWARD_ACTION_OFF = 2; 20012 /** @hide */ 20013 public static final int CALL_FORWARD_NO_LAST_ACTION = -1; 20014 20015 // Stem button settings. 20016 /** @hide */ 20017 @Readable 20018 public static final String STEM_1_TYPE = "STEM_1_TYPE"; 20019 /** @hide */ 20020 @Readable 20021 public static final String STEM_1_DATA = "STEM_1_DATA"; 20022 /** @hide */ 20023 @Readable 20024 public static final String STEM_1_DEFAULT_DATA = "STEM_1_DEFAULT_DATA"; 20025 /** @hide */ 20026 @Readable 20027 public static final String STEM_2_TYPE = "STEM_2_TYPE"; 20028 /** @hide */ 20029 @Readable 20030 public static final String STEM_2_DATA = "STEM_2_DATA"; 20031 /** @hide */ 20032 @Readable 20033 public static final String STEM_2_DEFAULT_DATA = "STEM_2_DEFAULT_DATA"; 20034 /** @hide */ 20035 @Readable 20036 public static final String STEM_3_TYPE = "STEM_3_TYPE"; 20037 /** @hide */ 20038 @Readable 20039 public static final String STEM_3_DATA = "STEM_3_DATA"; 20040 /** @hide */ 20041 @Readable 20042 public static final String STEM_3_DEFAULT_DATA = "STEM_3_DEFAULT_DATA"; 20043 20044 // Stem types 20045 /** @hide */ 20046 public static final int STEM_TYPE_UNKNOWN = -1; 20047 /** @hide */ 20048 public static final int STEM_TYPE_APP_LAUNCH = 0; 20049 /** @hide */ 20050 public static final int STEM_TYPE_CONTACT_LAUNCH = 1; 20051 20052 /** 20053 * If the device should be muted when off body. 20054 * @hide 20055 */ 20056 @Readable 20057 public static final String MUTE_WHEN_OFF_BODY_ENABLED = "obtain_mute_when_off_body"; 20058 20059 /** 20060 * Wear OS version string. 20061 * @hide 20062 */ 20063 @Readable 20064 public static final String WEAR_OS_VERSION_STRING = "wear_os_version_string"; 20065 20066 /** 20067 * Whether there is a side button. 20068 * @hide 20069 */ 20070 public static final String SIDE_BUTTON = "side_button"; 20071 20072 /** 20073 * The android wear system version. 20074 * @hide 20075 */ 20076 @Readable 20077 public static final String ANDROID_WEAR_VERSION = "android_wear_version"; 20078 20079 /** 20080 * The wear system capabiltiies. 20081 * @hide 20082 */ 20083 @Readable 20084 public static final String SYSTEM_CAPABILITIES = "system_capabilities"; 20085 20086 /** 20087 * The android wear system edition. 20088 * @hide 20089 */ 20090 @Readable 20091 public static final String SYSTEM_EDITION = "android_wear_system_edition"; 20092 20093 /** 20094 * The Wear platform MR number. 20095 * @hide 20096 */ 20097 @Readable 20098 public static final String WEAR_PLATFORM_MR_NUMBER = "wear_platform_mr_number"; 20099 20100 /** 20101 * The mobile signal detector setting. 20102 * @hide 20103 */ 20104 public static final String MOBILE_SIGNAL_DETECTOR = "mobile_signal_detector"; 20105 20106 20107 /** 20108 * Whether ambient is currently enabled. 20109 * @hide 20110 */ 20111 @Readable 20112 public static final String AMBIENT_ENABLED = "ambient_enabled"; 20113 20114 /** 20115 * Whether ambient tilt to wake is enabled. 20116 * @hide 20117 */ 20118 @Readable 20119 public static final String AMBIENT_TILT_TO_WAKE = "ambient_tilt_to_wake"; 20120 20121 /** 20122 * Whether ambient low bit mode is enabled by developer options. 20123 * @hide 20124 */ 20125 @Readable 20126 public static final String AMBIENT_LOW_BIT_ENABLED_DEV = "ambient_low_bit_enabled_dev"; 20127 20128 /** 20129 * Whether ambient touch to wake is enabled. 20130 * @hide 20131 */ 20132 @Readable 20133 public static final String AMBIENT_TOUCH_TO_WAKE = "ambient_touch_to_wake"; 20134 20135 /** 20136 * Whether ambient tilt to bright is enabled. 20137 * @hide 20138 */ 20139 @Readable 20140 public static final String AMBIENT_TILT_TO_BRIGHT = "ambient_tilt_to_bright"; 20141 20142 /** 20143 * Whether touch and hold to edit WF is enabled 20144 * @hide 20145 */ 20146 @Readable 20147 public static final String GESTURE_TOUCH_AND_HOLD_WATCH_FACE_ENABLED = 20148 "gesture_touch_and_hold_watchface_enabled"; 20149 20150 /** 20151 * Whether screenshot is enabled. 20152 * @hide 20153 */ 20154 public static final String SCREENSHOT_ENABLED = "screenshot_enabled"; 20155 20156 /** 20157 * Whether bedtime mode is enabled. 20158 * @hide 20159 */ 20160 @Readable 20161 public static final String BEDTIME_MODE = "bedtime_mode"; 20162 20163 /** 20164 * Whether hard bedtime mode is active thus limiting user interactions. 20165 */ 20166 public static final String BEDTIME_HARD_MODE = "bedtime_hard_mode"; 20167 20168 /** 20169 * Whether the current watchface is decomposable. 20170 * @hide 20171 */ 20172 @Readable 20173 public static final String DECOMPOSABLE_WATCHFACE = "current_watchface_decomposable"; 20174 20175 /** 20176 * Whether to force ambient when docked. 20177 * @hide 20178 */ 20179 @Readable 20180 public static final String AMBIENT_FORCE_WHEN_DOCKED = "ambient_force_when_docked"; 20181 20182 /** 20183 * Whether the ambient low bit mode is enabled. 20184 * @hide 20185 */ 20186 @Readable 20187 public static final String AMBIENT_LOW_BIT_ENABLED = "ambient_low_bit_enabled"; 20188 20189 /** 20190 * The timeout duration in minutes of ambient mode when plugged in. 20191 * @hide 20192 */ 20193 @Readable 20194 public static final String AMBIENT_PLUGGED_TIMEOUT_MIN = "ambient_plugged_timeout_min"; 20195 20196 /** 20197 * What OS does paired device has. 20198 * @hide 20199 */ 20200 @Readable 20201 public static final String PAIRED_DEVICE_OS_TYPE = "paired_device_os_type"; 20202 20203 // Possible values of PAIRED_DEVICE_OS_TYPE 20204 /** @hide */ 20205 public static final int PAIRED_DEVICE_OS_TYPE_UNKNOWN = 0; 20206 /** @hide */ 20207 public static final int PAIRED_DEVICE_OS_TYPE_ANDROID = 1; 20208 /** @hide */ 20209 public static final int PAIRED_DEVICE_OS_TYPE_IOS = 2; 20210 /** @hide */ 20211 public static final int PAIRED_DEVICE_OS_TYPE_NONE = 3; 20212 20213 /** 20214 * The bluetooth settings selected BLE role for the companion. 20215 * @hide 20216 */ 20217 public static final String COMPANION_BLE_ROLE = "companion_ble_role"; 20218 20219 // Possible values of COMPANION_BLE_ROLE 20220 /** @hide */ 20221 public static final int BLUETOOTH_ROLE_CENTRAL = 1; 20222 /** @hide */ 20223 public static final int BLUETOOTH_ROLE_PERIPHERAL = 2; 20224 20225 /** 20226 * The bluetooth settings stored companion device name. 20227 * @hide 20228 */ 20229 public static final String COMPANION_NAME = "companion_bt_name"; 20230 20231 /** 20232 * The user's last setting for hfp client. 20233 * @hide 20234 */ 20235 @Readable 20236 public static final String USER_HFP_CLIENT_SETTING = "user_hfp_client_setting"; 20237 20238 // Possible hfp client user setting values 20239 /** @hide */ 20240 public static final int HFP_CLIENT_UNSET = 0; 20241 /** @hide */ 20242 public static final int HFP_CLIENT_ENABLED = 1; 20243 /** @hide */ 20244 public static final int HFP_CLIENT_DISABLED = 2; 20245 20246 /** 20247 * The companion phone's android version. 20248 * @hide 20249 */ 20250 public static final String COMPANION_OS_VERSION = "wear_companion_os_version"; 20251 20252 // Companion os version constants 20253 /** @hide */ 20254 public static final int COMPANION_OS_VERSION_UNDEFINED = -1; 20255 20256 /** 20257 * The companion App name. 20258 * @hide 20259 */ 20260 @Readable 20261 public static final String COMPANION_APP_NAME = "wear_companion_app_name"; 20262 20263 /** 20264 * A boolean value to indicate if we want to support all languages in LE edition on 20265 * wear. 1 for supporting, 0 for not supporting. 20266 * @hide 20267 */ 20268 @Readable 20269 public static final String ENABLE_ALL_LANGUAGES = "enable_all_languages"; 20270 20271 /** 20272 * The Locale (as language tag) the user chose at startup. 20273 * @hide 20274 */ 20275 @Readable 20276 public static final String SETUP_LOCALE = "setup_locale"; 20277 20278 /** 20279 * The version of oem setup present. 20280 * @hide 20281 */ 20282 @Readable 20283 public static final String OEM_SETUP_VERSION = "oem_setup_version"; 20284 20285 /** 20286 * The key to indicate to Setup Wizard if OEM setup is completed in Wear Services. 20287 * @hide 20288 */ 20289 public static final String OEM_SETUP_COMPLETED_STATUS = "oem_setup_completed_status"; 20290 20291 /** 20292 * Constant provided to Setup Wizard to inform about failure of OEM setup in Wear 20293 * Services. The value should be provided with setting name {@link 20294 * #OEM_SETUP_COMPLETED_STATUS}. 20295 * @hide 20296 */ 20297 public static final int OEM_SETUP_COMPLETED_FAILURE = 0; 20298 20299 /** 20300 * Constant provided to Setup Wizard to inform about successful completion of OEM setup 20301 * in Wear Services. The value should be provided with setting name {@link 20302 * #OEM_SETUP_COMPLETED_STATUS}. 20303 * @hide 20304 */ 20305 public static final int OEM_SETUP_COMPLETED_SUCCESS = 1; 20306 20307 /** 20308 * Controls the gestures feature. 20309 * @hide 20310 */ 20311 public static final String MASTER_GESTURES_ENABLED = "master_gestures_enabled"; 20312 20313 /** 20314 * Whether or not ungaze is enabled. 20315 * @hide 20316 */ 20317 public static final String UNGAZE_ENABLED = "ungaze_enabled"; 20318 20319 /** 20320 * The device's battery saver mode, which can be one of the following: 20321 * -{@link BATTERY_SAVER_MODE_NONE} 20322 * -{@link BATTERY_SAVER_MODE_LIGHT} 20323 * -{@link BATTERY_SAVER_MODE_TRADITIONAL_WATCH} 20324 * -{@link BATTERY_SAVER_MODE_TIME_ONLY} 20325 * -{@link BATTERY_SAVER_MODE_CUSTOM} 20326 * @hide 20327 */ 20328 @Readable 20329 public static final String BATTERY_SAVER_MODE = "battery_saver_mode"; 20330 20331 /** 20332 * Not in Battery Saver Mode 20333 * @hide 20334 */ 20335 public static final int BATTERY_SAVER_MODE_NONE = 0; 20336 /** 20337 * In Lightweight Battery Saver Mode 20338 * @hide 20339 */ 20340 public static final int BATTERY_SAVER_MODE_LIGHT = 1; 20341 /** 20342 * In Traditional Watch Mode Battery Saver Mode 20343 * @hide 20344 */ 20345 public static final int BATTERY_SAVER_MODE_TRADITIONAL_WATCH = 2; 20346 /** 20347 * In Time-only Mode Battery Saver Mode 20348 * @hide 20349 */ 20350 public static final int BATTERY_SAVER_MODE_TIME_ONLY = 3; 20351 /** 20352 * Partner's Battery Saver implementation is being used 20353 * @hide 20354 */ 20355 public static final int BATTERY_SAVER_MODE_CUSTOM = 4; 20356 20357 /** 20358 Whether 1P apps vote for enabling data during different modes, 20359 i.e. BTM, BBSM 20360 * @hide 20361 */ 20362 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 20363 public static final String CONNECTIVITY_KEEP_DATA_ON = "wear_connectivity_keep_data_on"; 20364 20365 /** 20366 * The maximum ambient mode duration when an activity is allowed to auto resume. 20367 * @hide 20368 */ 20369 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 20370 public static final String WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_MS = 20371 "wear_activity_auto_resume_timeout_ms"; 20372 20373 /** 20374 * If the current {@code WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_MS} value is set by user. 20375 * 1 for true, 0 for false. 20376 * @hide 20377 */ 20378 public static final String WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_SET_BY_USER = 20379 "wear_activity_auto_resume_timeout_set_by_user"; 20380 20381 /** 20382 * If burn in protection is enabled. 20383 * @hide 20384 */ 20385 @Readable 20386 public static final String BURN_IN_PROTECTION_ENABLED = "burn_in_protection"; 20387 20388 /** 20389 * Whether the device has combined location setting enabled. 20390 * 20391 * @deprecated Use LocationManager as the source of truth for all location states. 20392 * 20393 * @hide 20394 */ 20395 @Deprecated 20396 public static final String COMBINED_LOCATION_ENABLE = "combined_location_enable"; 20397 20398 /** 20399 * The wrist orientation mode of the device 20400 * Valid values - LEFT_WRIST_ROTATION_0 = "0" (default), LEFT_WRIST_ROTATION_180 = "1", 20401 * RIGHT_WRIST_ROTATION_0 = "2", RIGHT_WRIST_ROTATION_180 = "3" 20402 * @hide 20403 */ 20404 @Readable 20405 public static final String WRIST_ORIENTATION_MODE = "wear_wrist_orientation_mode"; 20406 20407 /** 20408 * Current lock screen state of the device 20409 * (null = default value of this setting (lockscreen is never set), 20410 * 0 = {@link #LOCK_SCREEN_STATE_NONE}, 20411 * 1 = {@link #LOCK_SCREEN_STATE_PIN}, 20412 * 2 = {@link #LOCK_SCREEN_STATE_PATTERN}) 20413 * @hide 20414 */ 20415 public static final String LOCK_SCREEN_STATE = "lock_screen_state"; 20416 20417 /** 20418 * No lock screen set 20419 * One of the possible states for {@link #LOCK_SCREEN_STATE}. 20420 * @hide 20421 */ 20422 public static final int LOCK_SCREEN_STATE_NONE = 0; 20423 20424 /** 20425 * Lock screen set as a pin 20426 * One of the possible states for {@link #LOCK_SCREEN_STATE}. 20427 * @hide 20428 */ 20429 public static final int LOCK_SCREEN_STATE_PIN = 1; 20430 20431 /** 20432 * Lock screen set as a pattern 20433 * One of the possible states for {@link #LOCK_SCREEN_STATE}. 20434 * @hide 20435 */ 20436 public static final int LOCK_SCREEN_STATE_PATTERN = 2; 20437 20438 /** 20439 * Setting indicating the name of the Wear OS app package containing the device's sysui. 20440 * 20441 * @hide 20442 */ 20443 @Readable 20444 public static final String CLOCKWORK_SYSUI_PACKAGE = "clockwork_sysui_package"; 20445 20446 /** 20447 * Setting indicating the name of the main activity of the Wear OS sysui. 20448 * 20449 * @hide 20450 */ 20451 public static final String CLOCKWORK_SYSUI_MAIN_ACTIVITY = 20452 "clockwork_sysui_main_activity"; 20453 20454 /** 20455 * Setting to disable power button long press launching Assistant. It's boolean, i.e. 20456 * enabled = 1, disabled = 0. By default, this setting is enabled. 20457 * 20458 * @hide 20459 */ 20460 public static final String CLOCKWORK_LONG_PRESS_TO_ASSISTANT_ENABLED = 20461 "clockwork_long_press_to_assistant_enabled"; 20462 20463 /** 20464 * Whether the device has Cooldown Mode enabled. 20465 * @hide 20466 */ 20467 public static final String COOLDOWN_MODE_ON = "cooldown_mode_on"; 20468 20469 /** 20470 * Whether the device has Wet Mode/ Touch Lock Mode enabled. 20471 * @hide 20472 */ 20473 @Readable 20474 public static final String WET_MODE_ON = "wet_mode_on"; 20475 20476 /** 20477 * Whether the RSB wake feature is enabled. 20478 * @hide 20479 */ 20480 public static final String RSB_WAKE_ENABLED = "rsb_wake_enabled"; 20481 20482 /** 20483 * Whether the screen-unlock (keyguard) sound is enabled. 20484 * @hide 20485 */ 20486 public static final String SCREEN_UNLOCK_SOUND_ENABLED = "screen_unlock_sound_enabled"; 20487 20488 /** 20489 * Whether charging sounds are enabled. 20490 * @hide 20491 */ 20492 @Readable 20493 public static final String CHARGING_SOUNDS_ENABLED = "wear_charging_sounds_enabled"; 20494 20495 /** 20496 * Whether dynamic color theming (e.g. Material You) is enabled for apps which support 20497 * it. 20498 * 20499 * @hide 20500 */ 20501 @Readable 20502 public static final String DYNAMIC_COLOR_THEME_ENABLED = "dynamic_color_theme_enabled"; 20503 20504 /** 20505 * Current state of accessibility vibration watch feature 20506 * (0 = false, 1 = true) 20507 * 20508 * @hide 20509 */ 20510 public static final String ACCESSIBILITY_VIBRATION_WATCH_ENABLED = 20511 "a11y_vibration_watch_enabled"; 20512 20513 /** 20514 * Stores current type of accessibility vibration 20515 * (0 = {@link #ACCESSIBILITY_VIBRATION_WATCH_TYPE_DIGIT}, 20516 * 1 = {@link #ACCESSIBILITY_VIBRATION_WATCH_TYPE_TERSE) 20517 * 20518 * @hide 20519 */ 20520 public static final String ACCESSIBILITY_VIBRATION_WATCH_TYPE = 20521 "a11y_vibration_watch_type"; 20522 20523 /** 20524 * Vibration watch type digit 20525 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_TYPE}. 20526 * 20527 * @hide 20528 */ 20529 public static final int ACCESSIBILITY_VIBRATION_WATCH_TYPE_DIGIT = 0; 20530 20531 /** 20532 * Vibration watch type terse 20533 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_TYPE}. 20534 * 20535 * @hide 20536 */ 20537 public static final int ACCESSIBILITY_VIBRATION_WATCH_TYPE_TERSE = 1; 20538 20539 /** 20540 * Stores current accessibility vibration watch speed 20541 * (0 = {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED_VERY_SLOW}, 20542 * 1 = {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED_SLOW}, 20543 * 2 = {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED_MEDIUM}, 20544 * 3 = {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED_FAST}, 20545 * 4 = {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED_VERY_FAST}) 20546 */ 20547 public static final String ACCESSIBILITY_VIBRATION_WATCH_SPEED = "vibration_speed"; 20548 20549 /** 20550 * Vibration watch speed type very slow 20551 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED}. 20552 * 20553 * @hide 20554 */ 20555 public static final int ACCESSIBILITY_VIBRATION_WATCH_SPEED_VERY_SLOW = 0; 20556 20557 /** 20558 * Vibration watch speed type slow 20559 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED}. 20560 * 20561 * @hide 20562 */ 20563 public static final int ACCESSIBILITY_VIBRATION_WATCH_SPEED_SLOW = 1; 20564 20565 /** 20566 * Vibration watch speed type medium 20567 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED}. 20568 * 20569 * @hide 20570 */ 20571 public static final int ACCESSIBILITY_VIBRATION_WATCH_SPEED_MEDIUM = 2; 20572 20573 /** 20574 * Vibration watch speed type fast 20575 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED}. 20576 * 20577 * @hide 20578 */ 20579 public static final int ACCESSIBILITY_VIBRATION_WATCH_SPEED_FAST = 3; 20580 20581 /** 20582 * Vibration watch speed type very fast 20583 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED}. 20584 * 20585 * @hide 20586 */ 20587 public static final int ACCESSIBILITY_VIBRATION_WATCH_SPEED_VERY_FAST = 4; 20588 20589 /** 20590 * The key to indicate the data migration status on device upgrade in Wear Services. 20591 * @hide 20592 */ 20593 @Readable 20594 public static final String UPGRADE_DATA_MIGRATION_STATUS = 20595 "upgrade_data_migration_status"; 20596 20597 /** 20598 * Constant indicating that the data migration is not needed. 20599 * 20600 * The value should be provided with setting name {@link 20601 * #UPGRADE_DATA_MIGRATION_STATUS}. 20602 * @hide 20603 */ 20604 public static final int UPGRADE_DATA_MIGRATION_NOT_NEEDED = 0; 20605 20606 /** 20607 * Constant indicating that the data migration is not yet finished. 20608 * 20609 * The value should be provided with setting name {@link 20610 * #UPGRADE_DATA_MIGRATION_STATUS}. 20611 * @hide 20612 */ 20613 public static final int UPGRADE_DATA_MIGRATION_PENDING = 1; 20614 20615 /** 20616 * Constant indicating that the data migration is finished. 20617 * 20618 * The value should be provided with setting name {@link 20619 * #UPGRADE_DATA_MIGRATION_STATUS}. 20620 * @hide 20621 */ 20622 public static final int UPGRADE_DATA_MIGRATION_DONE = 2; 20623 20624 /** 20625 * Whether to disable AOD while plugged. 20626 * (0 = false, 1 = true) 20627 * @hide 20628 */ 20629 public static final String DISABLE_AOD_WHILE_PLUGGED = "disable_aod_while_plugged"; 20630 20631 /** 20632 * Whether the user has consented for network location provider (NLP). 20633 * This setting key will only be used once during OOBE to set NLP initial value through 20634 * the companion app ToS. This setting key will be synced over from Companion and 20635 * corresponding toggle in GMS will be enabled. 20636 * @hide 20637 */ 20638 public static final String NETWORK_LOCATION_OPT_IN = "network_location_opt_in"; 20639 20640 /** 20641 * Whether haptics are enabled for Active Unlock on wear. 20642 * @hide 20643 */ 20644 public static final String VIBRATE_FOR_ACTIVE_UNLOCK = "wear_vibrate_for_active_unlock"; 20645 20646 /** 20647 * The custom foreground color. 20648 * @hide 20649 */ 20650 @Readable 20651 public static final String CUSTOM_COLOR_FOREGROUND = "custom_foreground_color"; 20652 20653 /** 20654 * The custom background color. 20655 * @hide 20656 */ 20657 @Readable 20658 public static final String CUSTOM_COLOR_BACKGROUND = "custom_background_color"; 20659 20660 /** The status of the phone switching process. 20661 * @hide 20662 */ 20663 @Readable 20664 public static final String PHONE_SWITCHING_STATUS = "phone_switching_status"; 20665 20666 /** 20667 * Phone switching not started 20668 * @hide 20669 */ 20670 public static final int PHONE_SWITCHING_STATUS_NOT_STARTED = 0; 20671 20672 /** 20673 * Phone switching started 20674 * @hide 20675 */ 20676 public static final int PHONE_SWITCHING_STATUS_STARTED = 1; 20677 20678 /** 20679 * Phone switching completed and was successful 20680 * @hide 20681 */ 20682 public static final int PHONE_SWITCHING_STATUS_SUCCESS = 2; 20683 20684 /** 20685 * Phone switching was cancelled 20686 * @hide 20687 */ 20688 public static final int PHONE_SWITCHING_STATUS_CANCELLED = 3; 20689 20690 /** 20691 * Phone switching failed 20692 * @hide 20693 */ 20694 public static final int PHONE_SWITCHING_STATUS_FAILED = 4; 20695 20696 /** 20697 * Phone switching is in progress of advertising to new companion device. 20698 * @hide 20699 */ 20700 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_ADVERTISING = 5; 20701 20702 /** 20703 * Phone switching successfully bonded with new companion device. 20704 * @hide 20705 */ 20706 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_BONDED = 6; 20707 20708 /** 20709 * Phone switching successfully completed on phone side. 20710 * @hide 20711 */ 20712 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_PHONE_COMPLETE = 7; 20713 20714 /** 20715 * Connection config migration in progress. 20716 * @hide 20717 */ 20718 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_MIGRATION = 8; 20719 20720 /** 20721 * Connection config migration failed. 20722 * @hide 20723 */ 20724 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_MIGRATION_FAILED = 9; 20725 20726 /** 20727 * Connection config migration cancellation in progress. 20728 * @hide 20729 */ 20730 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_MIGRATION_CANCELLED = 10; 20731 20732 /** 20733 * Connection config migration success. 20734 * @hide 20735 */ 20736 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_MIGRATION_SUCCESS = 11; 20737 20738 /** 20739 * Phone switching has finished account match step. 20740 * @hide 20741 */ 20742 public static final int PHONE_SWITCHING_STATUS_ACCOUNTS_MATCHED = 12; 20743 20744 /** 20745 * Phone switching request source 20746 * @hide 20747 */ 20748 public static final String PHONE_SWITCHING_REQUEST_SOURCE = 20749 "phone_switching_request_source"; 20750 20751 /** 20752 * No phone switching request source 20753 * @hide 20754 */ 20755 public static final int PHONE_SWITCHING_REQUEST_SOURCE_NONE = 0; 20756 20757 /** 20758 * Phone switching triggered by watch 20759 * @hide 20760 */ 20761 public static final int PHONE_SWITCHING_REQUEST_SOURCE_WATCH = 1; 20762 20763 /** 20764 * Phone switching triggered by companion, user confirmation required 20765 * @hide 20766 */ 20767 public static final int PHONE_SWITCHING_REQUEST_SOURCE_COMPANION_USER_CONFIRMATION = 2; 20768 20769 /** 20770 * Phone switching triggered by companion, user confirmation not required 20771 * @hide 20772 */ 20773 public static final int PHONE_SWITCHING_REQUEST_SOURCE_COMPANION = 3; 20774 20775 /** 20776 * Whether the device has enabled the feature to reduce motion and animation 20777 * (0 = false, 1 = true) 20778 * @hide 20779 */ 20780 @Readable 20781 public static final String REDUCE_MOTION = "reduce_motion"; 20782 20783 /** 20784 * Whether RTL swipe-to-dismiss is enabled by developer options. 20785 * (0 = false, 1 = true) 20786 * @hide 20787 */ 20788 public static final String RTL_SWIPE_TO_DISMISS_ENABLED_DEV = 20789 "rtl_swipe_to_dismiss_enabled_dev"; 20790 20791 /** 20792 * Tethered Configuration state. 20793 * @hide 20794 */ 20795 public static final String TETHER_CONFIG_STATE = "tethered_config_state"; 20796 20797 /** 20798 * Tethered configuration state is unknown. 20799 * @hide 20800 */ 20801 public static final int TETHERED_CONFIG_UNKNOWN = 0; 20802 20803 /** 20804 * Device is set into standalone mode. 20805 * @hide 20806 */ 20807 public static final int TETHERED_CONFIG_STANDALONE = 1; 20808 20809 /** 20810 * Device is set in tethered mode. 20811 * @hide 20812 */ 20813 public static final int TETHERED_CONFIG_TETHERED = 2; 20814 20815 /** 20816 * Device is set in restricted mode. 20817 */ 20818 public static final int TETHERED_CONFIG_RESTRICTED = 3; 20819 20820 /** 20821 * Setting indicating the name of the Wear OS package that hosts the Media Controls UI. 20822 * 20823 * @hide 20824 */ 20825 @Readable 20826 public static final String WEAR_MEDIA_CONTROLS_PACKAGE = "wear_media_controls_package"; 20827 20828 /** 20829 * Setting indicating the name of the Wear OS package responsible for bridging media. 20830 * 20831 * @hide 20832 */ 20833 @Readable 20834 public static final String WEAR_MEDIA_SESSIONS_PACKAGE = "wear_media_sessions_package"; 20835 20836 /* 20837 * Controls the launcher ui mode on wearable devices. 20838 * @hide 20839 */ 20840 @Readable 20841 public static final String WEAR_LAUNCHER_UI_MODE = "wear_launcher_ui_mode"; 20842 20843 /** 20844 * Setting indicating whether the primary gesture input action has been enabled by the 20845 * user. 20846 * 20847 * @hide 20848 */ 20849 public static final String GESTURE_PRIMARY_ACTION_USER_PREFERENCE = 20850 "gesture_primary_action_user_preference"; 20851 20852 /** 20853 * Setting indicating whether the dismiss gesture input action has been enabled by the 20854 * user. 20855 * 20856 * @hide 20857 */ 20858 public static final String GESTURE_DISMISS_ACTION_USER_PREFERENCE = 20859 "gesture_dismiss_action_user_preference"; 20860 20861 /** Whether Wear Power Anomaly Service is enabled. 20862 * 20863 * (0 = false, 1 = true) 20864 * @hide 20865 */ 20866 public static final String WEAR_POWER_ANOMALY_SERVICE_ENABLED = 20867 "wear_power_anomaly_service_enabled"; 20868 20869 /** 20870 * A boolean that tracks whether Wrist Detection Auto-Locking is enabled. 20871 * 20872 * @hide 20873 */ 20874 @Readable 20875 public static final String WRIST_DETECTION_AUTO_LOCKING_ENABLED = 20876 "wear_wrist_detection_auto_locking_enabled"; 20877 20878 /** 20879 * Whether consistent notification blocking experience is enabled. 20880 * 20881 * @hide 20882 */ 20883 @Readable 20884 public static final String CONSISTENT_NOTIFICATION_BLOCKING_ENABLED = 20885 "consistent_notification_blocking_enabled"; 20886 20887 /** 20888 * Whether the Auto Bedtime Mode experience is enabled. 20889 * 20890 * @hide 20891 */ 20892 public static final String AUTO_BEDTIME_MODE = "auto_bedtime_mode"; 20893 20894 /** 20895 * Indicates that all elements of the system status tray on wear should be rendered 20896 * by default wear system. 20897 * 20898 * @hide 20899 */ 20900 public static final int STATUS_TRAY_CONFIGURATION_DEFAULT = 0; 20901 20902 /** 20903 * Indicates that all elements of the system status tray on wear should be hidden. 20904 * 20905 * @hide 20906 */ 20907 public static final int STATUS_TRAY_CONFIGURATION_SYSTEM_HIDDEN = 1; 20908 20909 /** 20910 * Configuration of system status tray in wear. 20911 * 20912 * @hide 20913 */ 20914 public static final String WEAR_SYSTEM_STATUS_TRAY_CONFIGURATION = 20915 "wear_system_status_tray_configuration"; 20916 } 20917 } 20918 20919 /** 20920 * Configuration system settings, containing settings which are applied identically for all 20921 * defined users. Only Android can read these and only a specific configuration service can 20922 * write these. 20923 * 20924 * @hide 20925 */ 20926 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20927 public static final class Config extends NameValueTable { 20928 20929 /** 20930 * The modes that can be used when disabling syncs to the 'config' settings. 20931 * @hide 20932 */ 20933 @IntDef(prefix = "SYNC_DISABLED_MODE_", 20934 value = { SYNC_DISABLED_MODE_NONE, SYNC_DISABLED_MODE_PERSISTENT, 20935 SYNC_DISABLED_MODE_UNTIL_REBOOT }) 20936 @Retention(RetentionPolicy.SOURCE) 20937 @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE}) 20938 public @interface SyncDisabledMode {} 20939 20940 /** 20941 * Sync is not disabled. 20942 * 20943 * @deprecated use the constant in DeviceConfig 20944 * 20945 * @hide 20946 */ 20947 @Deprecated 20948 public static final int SYNC_DISABLED_MODE_NONE = DeviceConfig.SYNC_DISABLED_MODE_NONE; 20949 20950 /** 20951 * Disabling of Config bulk update / syncing is persistent, i.e. it survives a device 20952 * reboot. 20953 * 20954 * @deprecated use the constant in DeviceConfig 20955 * 20956 * @hide 20957 */ 20958 @Deprecated 20959 public static final int SYNC_DISABLED_MODE_PERSISTENT = 20960 DeviceConfig.SYNC_DISABLED_MODE_PERSISTENT; 20961 20962 /** 20963 * Disabling of Config bulk update / syncing is not persistent, i.e. it will not survive a 20964 * device reboot. 20965 * 20966 * @deprecated use the constant in DeviceConfig 20967 * 20968 * @hide 20969 */ 20970 @Deprecated 20971 public static final int SYNC_DISABLED_MODE_UNTIL_REBOOT = 20972 DeviceConfig.SYNC_DISABLED_MODE_UNTIL_REBOOT; 20973 20974 /** 20975 * The content:// style URL for the config table. 20976 * 20977 * @hide 20978 */ 20979 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/config"); 20980 20981 private static final ContentProviderHolder sProviderHolder = 20982 new ContentProviderHolder(CONTENT_URI); 20983 20984 // Populated lazily, guarded by class object: 20985 private static final NameValueCache sNameValueCache = new NameValueCache( 20986 CONTENT_URI, 20987 CALL_METHOD_GET_CONFIG, 20988 CALL_METHOD_PUT_CONFIG, 20989 CALL_METHOD_DELETE_CONFIG, 20990 CALL_METHOD_LIST_CONFIG, 20991 CALL_METHOD_SET_ALL_CONFIG, 20992 sProviderHolder, 20993 Config.class); 20994 20995 // Should never be invoked Config()20996 private Config() { 20997 } 20998 20999 /** 21000 * Look up a name in the database. 21001 * @param name to look up in the table 21002 * @return the corresponding value, or null if not present 21003 * 21004 * @hide 21005 */ 21006 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21007 @Nullable 21008 @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) getString(@onNull String name)21009 public static String getString(@NonNull String name) { 21010 ContentResolver resolver = getContentResolver(); 21011 return sNameValueCache.getStringForUser(resolver, name, resolver.getUserId()); 21012 } 21013 21014 /** 21015 * Look up a list of names in the database, within the specified namespace. 21016 * 21017 * @param namespace to which the names belong 21018 * @param names to look up in the table 21019 * @return a non null, but possibly empty, map from name to value for any of the names that 21020 * were found during lookup. 21021 * 21022 * @hide 21023 */ 21024 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21025 @NonNull 21026 @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) getStrings(@onNull String namespace, @NonNull List<String> names)21027 public static Map<String, String> getStrings(@NonNull String namespace, 21028 @NonNull List<String> names) { 21029 return getStrings(getContentResolver(), namespace, names); 21030 } 21031 21032 /** 21033 * Return all stored flags. 21034 * 21035 * The keys take the form {@code namespace/flag}, and the values are the flag values. 21036 * 21037 * Note: this API is _not_ performant, and may make a large number of 21038 * Binder calls. It is intended for use in testing and debugging, and 21039 * should not be used in performance-sensitive code. 21040 * 21041 * @hide 21042 */ 21043 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21044 @NonNull getAllStrings()21045 public static Map<String, String> getAllStrings() { 21046 HashMap<String, String> allFlags = new HashMap<String, String>(); 21047 try { 21048 ContentResolver resolver = getContentResolver(); 21049 Bundle arg = new Bundle(); 21050 arg.putInt(Settings.CALL_METHOD_USER_KEY, resolver.getUserId()); 21051 IContentProvider cp = sProviderHolder.getProvider(resolver); 21052 21053 if (Flags.reduceBinderTransactionSizeForGetAllProperties()) { 21054 Bundle b = cp.call(resolver.getAttributionSource(), 21055 sProviderHolder.mUri.getAuthority(), 21056 CALL_METHOD_LIST_NAMESPACES_CONFIG, null, arg); 21057 if (b != null) { 21058 HashSet<String> namespaces = 21059 (HashSet) b.getSerializable(Settings.NameValueTable.VALUE, 21060 java.util.HashSet.class); 21061 for (String namespace : namespaces) { 21062 Map<String, String> keyValues = 21063 getStrings(namespace, new ArrayList()); 21064 for (String key : keyValues.keySet()) { 21065 allFlags.put(namespace + "/" + key, keyValues.get(key)); 21066 } 21067 } 21068 } 21069 } else { 21070 Bundle b = cp.call(resolver.getAttributionSource(), 21071 sProviderHolder.mUri.getAuthority(), 21072 CALL_METHOD_LIST_CONFIG, null, arg); 21073 if (b != null) { 21074 Map<String, String> flagsToValues = 21075 (HashMap) b.getSerializable(Settings.NameValueTable.VALUE, 21076 java.util.HashMap.class); 21077 allFlags.putAll(flagsToValues); 21078 } 21079 } 21080 } catch (RemoteException e) { 21081 Log.w(TAG, "Can't query configuration table for " + CONTENT_URI, e); 21082 } 21083 return allFlags; 21084 } 21085 21086 /** 21087 * Look up a list of names in the database, within the specified namespace. 21088 * 21089 * @param resolver to access the database with 21090 * @param namespace to which the names belong 21091 * @param names to look up in the table 21092 * @return a non null, but possibly empty, map from name to value for any of the names that 21093 * were found during lookup. 21094 * 21095 * @hide 21096 */ 21097 @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) getStrings(@onNull ContentResolver resolver, @NonNull String namespace, @NonNull List<String> names)21098 public static Map<String, String> getStrings(@NonNull ContentResolver resolver, 21099 @NonNull String namespace, @NonNull List<String> names) { 21100 String prefix = createPrefix(namespace); 21101 21102 return sNameValueCache.getStringsForPrefixStripPrefix(resolver, prefix, names); 21103 } 21104 21105 /** 21106 * Store a name/value pair into the database within the specified namespace. 21107 * <p> 21108 * Also the method takes an argument whether to make the value the default for this setting. 21109 * If the system already specified a default value, then the one passed in here will 21110 * <strong>not</strong> be set as the default. 21111 * </p> 21112 * 21113 * @param namespace to store the name/value pair in. 21114 * @param name to store. 21115 * @param value to associate with the name. 21116 * @param makeDefault whether to make the value the default one. 21117 * @return true if the value was set, false on database errors. 21118 * 21119 * @see #resetToDefaults(ContentResolver, int, String) 21120 * 21121 * @hide 21122 */ 21123 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21124 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) putString(@onNull String namespace, @NonNull String name, @Nullable String value, boolean makeDefault)21125 public static boolean putString(@NonNull String namespace, 21126 @NonNull String name, @Nullable String value, boolean makeDefault) { 21127 ContentResolver resolver = getContentResolver(); 21128 return sNameValueCache.putStringForUser(resolver, createCompositeName(namespace, name), 21129 value, null, makeDefault, resolver.getUserId(), 21130 DEFAULT_OVERRIDEABLE_BY_RESTORE); 21131 } 21132 21133 /** 21134 * Clear all name/value pairs for the provided namespace and save new name/value pairs in 21135 * their place. 21136 * 21137 * @param namespace to which the names should be set. 21138 * @param keyValues map of key names (without the prefix) to values. 21139 * @return true if the name/value pairs were set, false if setting was blocked 21140 * 21141 * @hide 21142 */ 21143 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21144 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) setStrings(@onNull String namespace, @NonNull Map<String, String> keyValues)21145 public static boolean setStrings(@NonNull String namespace, 21146 @NonNull Map<String, String> keyValues) 21147 throws DeviceConfig.BadConfigException { 21148 return setStrings(getContentResolver(), namespace, keyValues); 21149 } 21150 21151 /** 21152 * Clear all name/value pairs for the provided namespace and save new name/value pairs in 21153 * their place. 21154 * 21155 * @param resolver to access the database with. 21156 * @param namespace to which the names should be set. 21157 * @param keyValues map of key names (without the prefix) to values. 21158 * @return true if the name/value pairs were set, false if setting was blocked 21159 * 21160 * @hide 21161 */ 21162 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) setStrings(@onNull ContentResolver resolver, @NonNull String namespace, @NonNull Map<String, String> keyValues)21163 public static boolean setStrings(@NonNull ContentResolver resolver, 21164 @NonNull String namespace, @NonNull Map<String, String> keyValues) 21165 throws DeviceConfig.BadConfigException { 21166 HashMap<String, String> compositeKeyValueMap = new HashMap<>(keyValues.keySet().size()); 21167 for (Map.Entry<String, String> entry : keyValues.entrySet()) { 21168 compositeKeyValueMap.put( 21169 createCompositeName(namespace, entry.getKey()), entry.getValue()); 21170 } 21171 int result = sNameValueCache.setStringsForPrefix( 21172 resolver, createPrefix(namespace), compositeKeyValueMap); 21173 if (result == SET_ALL_RESULT_SUCCESS) { 21174 return true; 21175 } else if (result == SET_ALL_RESULT_DISABLED) { 21176 return false; 21177 } 21178 // If can't set given configuration that means it's bad 21179 throw new DeviceConfig.BadConfigException(); 21180 } 21181 21182 /** 21183 * Delete a name/value pair from the database for the specified namespace. 21184 * 21185 * @param namespace to delete the name/value pair from. 21186 * @param name to delete. 21187 * @return true if the value was deleted, false on database errors. If the name/value pair 21188 * did not exist, return True. 21189 * 21190 * @see #resetToDefaults(ContentResolver, int, String) 21191 * 21192 * @hide 21193 */ 21194 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21195 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) deleteString(@onNull String namespace, @NonNull String name)21196 public static boolean deleteString(@NonNull String namespace, 21197 @NonNull String name) { 21198 ContentResolver resolver = getContentResolver(); 21199 return sNameValueCache.deleteStringForUser(resolver, 21200 createCompositeName(namespace, name), resolver.getUserId()); 21201 } 21202 21203 /** 21204 * Reset the values to their defaults. 21205 * <p> 21206 * The method accepts an optional prefix parameter. If provided, only pairs with a name that 21207 * starts with the exact prefix will be reset. Otherwise all will be reset. 21208 * 21209 * @param resetMode The reset mode to use. 21210 * @param namespace Optionally, to limit which which namespace is reset. 21211 * 21212 * @see #putString(ContentResolver, String, String, String, boolean) 21213 * 21214 * @hide 21215 */ 21216 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21217 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) resetToDefaults(@esetMode int resetMode, @Nullable String namespace)21218 public static void resetToDefaults(@ResetMode int resetMode, 21219 @Nullable String namespace) { 21220 try { 21221 ContentResolver resolver = getContentResolver(); 21222 Bundle arg = new Bundle(); 21223 arg.putInt(CALL_METHOD_USER_KEY, resolver.getUserId()); 21224 arg.putInt(CALL_METHOD_RESET_MODE_KEY, resetMode); 21225 if (namespace != null) { 21226 arg.putString(Settings.CALL_METHOD_PREFIX_KEY, createPrefix(namespace)); 21227 } 21228 IContentProvider cp = sProviderHolder.getProvider(resolver); 21229 cp.call(resolver.getAttributionSource(), 21230 sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_CONFIG, null, arg); 21231 } catch (RemoteException e) { 21232 Log.w(TAG, "Can't reset to defaults for " + CONTENT_URI, e); 21233 } 21234 } 21235 21236 /** 21237 * Bridge method between {@link DeviceConfig#setSyncDisabledMode(int)} and the 21238 * {@link com.android.providers.settings.SettingsProvider} implementation. 21239 * 21240 * @hide 21241 */ 21242 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21243 @SuppressLint("AndroidFrameworkRequiresPermission") 21244 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) setSyncDisabledMode(@yncDisabledMode int disableSyncMode)21245 public static void setSyncDisabledMode(@SyncDisabledMode int disableSyncMode) { 21246 try { 21247 ContentResolver resolver = getContentResolver(); 21248 Bundle args = new Bundle(); 21249 args.putInt(CALL_METHOD_SYNC_DISABLED_MODE_KEY, disableSyncMode); 21250 IContentProvider cp = sProviderHolder.getProvider(resolver); 21251 cp.call(resolver.getAttributionSource(), sProviderHolder.mUri.getAuthority(), 21252 CALL_METHOD_SET_SYNC_DISABLED_MODE_CONFIG, null, args); 21253 } catch (RemoteException e) { 21254 Log.w(TAG, "Can't set sync disabled mode " + CONTENT_URI, e); 21255 } 21256 } 21257 21258 /** 21259 * Bridge method between {@link DeviceConfig#getSyncDisabledMode()} and the 21260 * {@link com.android.providers.settings.SettingsProvider} implementation. 21261 * 21262 * @hide 21263 */ 21264 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21265 @SuppressLint("AndroidFrameworkRequiresPermission") 21266 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) getSyncDisabledMode()21267 public static int getSyncDisabledMode() { 21268 try { 21269 ContentResolver resolver = getContentResolver(); 21270 Bundle args = Bundle.EMPTY; 21271 IContentProvider cp = sProviderHolder.getProvider(resolver); 21272 Bundle bundle = cp.call(resolver.getAttributionSource(), 21273 sProviderHolder.mUri.getAuthority(), 21274 CALL_METHOD_GET_SYNC_DISABLED_MODE_CONFIG, 21275 null, args); 21276 return bundle.getInt(KEY_CONFIG_GET_SYNC_DISABLED_MODE_RETURN); 21277 } catch (RemoteException e) { 21278 Log.w(TAG, "Can't query sync disabled mode " + CONTENT_URI, e); 21279 } 21280 return -1; 21281 } 21282 21283 /** 21284 * Setter callback for monitoring Config table. 21285 * 21286 * @param executor the {@link Executor} on which to invoke the callback 21287 * @param callback callback to set 21288 * 21289 * @hide 21290 */ 21291 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21292 @RequiresPermission(Manifest.permission.MONITOR_DEVICE_CONFIG_ACCESS) setMonitorCallback( @onNull ContentResolver resolver, @NonNull @CallbackExecutor Executor executor, @NonNull DeviceConfig.MonitorCallback callback)21293 public static void setMonitorCallback( 21294 @NonNull ContentResolver resolver, 21295 @NonNull @CallbackExecutor Executor executor, 21296 @NonNull DeviceConfig.MonitorCallback callback) { 21297 setMonitorCallbackAsUser(executor, resolver, resolver.getUserId(), callback); 21298 } 21299 21300 /** 21301 * Clear callback for monitoring Config table. 21302 * this may only be used to clear callback function registered by 21303 * {@link Config#setMonitorCallback} 21304 * @hide 21305 */ 21306 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 21307 @RequiresPermission(Manifest.permission.MONITOR_DEVICE_CONFIG_ACCESS) clearMonitorCallback(@onNull ContentResolver resolver)21308 public static void clearMonitorCallback(@NonNull ContentResolver resolver) { 21309 try { 21310 Bundle arg = new Bundle(); 21311 arg.putInt(CALL_METHOD_USER_KEY, resolver.getUserId()); 21312 IContentProvider cp = sProviderHolder.getProvider(resolver); 21313 cp.call(resolver.getAttributionSource(), 21314 sProviderHolder.mUri.getAuthority(), 21315 CALL_METHOD_UNREGISTER_MONITOR_CALLBACK_CONFIG, null, arg); 21316 } catch (RemoteException e) { 21317 Log.w(TAG, "Can't clear config monitor callback", e); 21318 } 21319 } 21320 21321 21322 /** 21323 * Register a content observer. 21324 * 21325 * @hide 21326 */ 21327 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) registerContentObserver(@ullable String namespace, boolean notifyForDescendants, @NonNull ContentObserver observer)21328 public static void registerContentObserver(@Nullable String namespace, 21329 boolean notifyForDescendants, @NonNull ContentObserver observer) { 21330 ActivityThread.currentApplication().getContentResolver() 21331 .registerContentObserver(createNamespaceUri(namespace), 21332 notifyForDescendants, observer); 21333 } 21334 21335 /** 21336 * Unregister a content observer. 21337 * this may only be used with content observers registered through 21338 * {@link Config#registerContentObserver} 21339 * 21340 * @hide 21341 */ 21342 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) unregisterContentObserver(@onNull ContentObserver observer)21343 public static void unregisterContentObserver(@NonNull ContentObserver observer) { 21344 ActivityThread.currentApplication().getContentResolver() 21345 .unregisterContentObserver(observer); 21346 } 21347 21348 /** 21349 * Determine whether the calling process of an IPC <em>or you</em> have been 21350 * granted a particular permission. This is the same as 21351 * {@link #checkCallingPermission}, except it grants your own permissions 21352 * if you are not currently processing an IPC. Use with care! 21353 * 21354 * @param permission The name of the permission being checked. 21355 * 21356 * @return {@link PackageManager#PERMISSION_GRANTED} if the calling 21357 * pid/uid is allowed that permission, or 21358 * {@link PackageManager#PERMISSION_DENIED} if it is not. 21359 * 21360 * @see PackageManager#checkPermission(String, String) 21361 * @see #checkPermission 21362 * @see #checkCallingPermission 21363 * @hide 21364 */ 21365 @PermissionMethod(orSelf = true) 21366 @PackageManager.PermissionResult checkCallingOrSelfPermission(@onNull @ermissionName String permission)21367 public static int checkCallingOrSelfPermission(@NonNull @PermissionName String permission) { 21368 return ActivityThread.currentApplication() 21369 .getApplicationContext().checkCallingOrSelfPermission(permission); 21370 } 21371 setMonitorCallbackAsUser( @onNull @allbackExecutor Executor executor, @NonNull ContentResolver resolver, @UserIdInt int userHandle, @NonNull DeviceConfig.MonitorCallback callback)21372 private static void setMonitorCallbackAsUser( 21373 @NonNull @CallbackExecutor Executor executor, 21374 @NonNull ContentResolver resolver, @UserIdInt int userHandle, 21375 @NonNull DeviceConfig.MonitorCallback callback) { 21376 try { 21377 Bundle arg = new Bundle(); 21378 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 21379 arg.putParcelable(CALL_METHOD_MONITOR_CALLBACK_KEY, 21380 new RemoteCallback(result -> { 21381 handleMonitorCallback(result, executor, callback); 21382 })); 21383 IContentProvider cp = sProviderHolder.getProvider(resolver); 21384 cp.call(resolver.getAttributionSource(), 21385 sProviderHolder.mUri.getAuthority(), 21386 CALL_METHOD_REGISTER_MONITOR_CALLBACK_CONFIG, null, arg); 21387 } catch (RemoteException e) { 21388 Log.w(TAG, "Can't set config monitor callback", e); 21389 } 21390 } 21391 21392 /** @hide */ clearProviderForTest()21393 public static void clearProviderForTest() { 21394 sProviderHolder.clearProviderForTest(); 21395 sNameValueCache.clearGenerationTrackerForTest(); 21396 } 21397 handleMonitorCallback( Bundle result, @NonNull @CallbackExecutor Executor executor, DeviceConfig.MonitorCallback monitorCallback)21398 private static void handleMonitorCallback( 21399 Bundle result, 21400 @NonNull @CallbackExecutor Executor executor, 21401 DeviceConfig.MonitorCallback monitorCallback) { 21402 String callbackType = result.getString(EXTRA_MONITOR_CALLBACK_TYPE, ""); 21403 switch (callbackType) { 21404 case EXTRA_NAMESPACE_UPDATED_CALLBACK: 21405 String updatedNamespace = result.getString(EXTRA_NAMESPACE); 21406 if (updatedNamespace != null) { 21407 executor.execute(() -> monitorCallback.onNamespaceUpdate(updatedNamespace)); 21408 } 21409 break; 21410 case EXTRA_ACCESS_CALLBACK: 21411 String callingPackage = result.getString(EXTRA_CALLING_PACKAGE, null); 21412 String namespace = result.getString(EXTRA_NAMESPACE, null); 21413 if (namespace != null && callingPackage != null) { 21414 executor.execute(() -> 21415 monitorCallback.onDeviceConfigAccess(callingPackage, namespace)); 21416 } 21417 break; 21418 default: 21419 Slog.w(TAG, "Unrecognized DeviceConfig callback"); 21420 break; 21421 } 21422 } 21423 createCompositeName(@onNull String namespace, @NonNull String name)21424 static String createCompositeName(@NonNull String namespace, @NonNull String name) { 21425 Preconditions.checkNotNull(namespace); 21426 Preconditions.checkNotNull(name); 21427 var sb = new StringBuilder(namespace.length() + 1 + name.length()); 21428 return sb.append(namespace).append('/').append(name).toString(); 21429 } 21430 createPrefix(@onNull String namespace)21431 private static String createPrefix(@NonNull String namespace) { 21432 Preconditions.checkNotNull(namespace); 21433 return namespace + '/'; 21434 } 21435 createNamespaceUri(@onNull String namespace)21436 private static Uri createNamespaceUri(@NonNull String namespace) { 21437 Preconditions.checkNotNull(namespace); 21438 return CONTENT_URI.buildUpon().appendPath(namespace).build(); 21439 } 21440 getContentResolver()21441 private static ContentResolver getContentResolver() { 21442 return ActivityThread.currentApplication().getContentResolver(); 21443 } 21444 } 21445 21446 /** 21447 * User-defined bookmarks and shortcuts. The target of each bookmark is an 21448 * Intent URL, allowing it to be either a web page or a particular 21449 * application activity. 21450 * 21451 * @hide 21452 */ 21453 public static final class Bookmarks implements BaseColumns 21454 { 21455 private static final String TAG = "Bookmarks"; 21456 21457 /** 21458 * The content:// style URL for this table 21459 */ 21460 @UnsupportedAppUsage 21461 public static final Uri CONTENT_URI = 21462 Uri.parse("content://" + AUTHORITY + "/bookmarks"); 21463 21464 /** 21465 * The row ID. 21466 * <p>Type: INTEGER</p> 21467 */ 21468 public static final String ID = "_id"; 21469 21470 /** 21471 * Descriptive name of the bookmark that can be displayed to the user. 21472 * If this is empty, the title should be resolved at display time (use 21473 * {@link #getTitle(Context, Cursor)} any time you want to display the 21474 * title of a bookmark.) 21475 * <P> 21476 * Type: TEXT 21477 * </P> 21478 */ 21479 public static final String TITLE = "title"; 21480 21481 /** 21482 * Arbitrary string (displayed to the user) that allows bookmarks to be 21483 * organized into categories. There are some special names for 21484 * standard folders, which all start with '@'. The label displayed for 21485 * the folder changes with the locale (via {@link #getLabelForFolder}) but 21486 * the folder name does not change so you can consistently query for 21487 * the folder regardless of the current locale. 21488 * 21489 * <P>Type: TEXT</P> 21490 * 21491 */ 21492 public static final String FOLDER = "folder"; 21493 21494 /** 21495 * The Intent URL of the bookmark, describing what it points to. This 21496 * value is given to {@link android.content.Intent#getIntent} to create 21497 * an Intent that can be launched. 21498 * <P>Type: TEXT</P> 21499 */ 21500 public static final String INTENT = "intent"; 21501 21502 /** 21503 * Optional shortcut character associated with this bookmark. 21504 * <P>Type: INTEGER</P> 21505 */ 21506 public static final String SHORTCUT = "shortcut"; 21507 21508 /** 21509 * The order in which the bookmark should be displayed 21510 * <P>Type: INTEGER</P> 21511 */ 21512 public static final String ORDERING = "ordering"; 21513 21514 private static final String[] sIntentProjection = { INTENT }; 21515 private static final String[] sShortcutProjection = { ID, SHORTCUT }; 21516 private static final String sShortcutSelection = SHORTCUT + "=?"; 21517 21518 /** 21519 * Convenience function to retrieve the bookmarked Intent for a 21520 * particular shortcut key. 21521 * 21522 * @param cr The ContentResolver to query. 21523 * @param shortcut The shortcut key. 21524 * 21525 * @return Intent The bookmarked URL, or null if there is no bookmark 21526 * matching the given shortcut. 21527 */ getIntentForShortcut(ContentResolver cr, char shortcut)21528 public static Intent getIntentForShortcut(ContentResolver cr, char shortcut) 21529 { 21530 Intent intent = null; 21531 21532 Cursor c = cr.query(CONTENT_URI, 21533 sIntentProjection, sShortcutSelection, 21534 new String[] { String.valueOf((int) shortcut) }, ORDERING); 21535 // Keep trying until we find a valid shortcut 21536 try { 21537 while (intent == null && c.moveToNext()) { 21538 try { 21539 String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT)); 21540 intent = Intent.parseUri(intentURI, 0); 21541 } catch (java.net.URISyntaxException e) { 21542 // The stored URL is bad... ignore it. 21543 } catch (IllegalArgumentException e) { 21544 // Column not found 21545 Log.w(TAG, "Intent column not found", e); 21546 } 21547 } 21548 } finally { 21549 if (c != null) c.close(); 21550 } 21551 21552 return intent; 21553 } 21554 21555 /** 21556 * Add a new bookmark to the system. 21557 * 21558 * @param cr The ContentResolver to query. 21559 * @param intent The desired target of the bookmark. 21560 * @param title Bookmark title that is shown to the user; null if none 21561 * or it should be resolved to the intent's title. 21562 * @param folder Folder in which to place the bookmark; null if none. 21563 * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If 21564 * this is non-zero and there is an existing bookmark entry 21565 * with this same shortcut, then that existing shortcut is 21566 * cleared (the bookmark is not removed). 21567 * @return The unique content URL for the new bookmark entry. 21568 */ 21569 @UnsupportedAppUsage add(ContentResolver cr, Intent intent, String title, String folder, char shortcut, int ordering)21570 public static Uri add(ContentResolver cr, 21571 Intent intent, 21572 String title, 21573 String folder, 21574 char shortcut, 21575 int ordering) 21576 { 21577 // If a shortcut is supplied, and it is already defined for 21578 // another bookmark, then remove the old definition. 21579 if (shortcut != 0) { 21580 cr.delete(CONTENT_URI, sShortcutSelection, 21581 new String[] { String.valueOf((int) shortcut) }); 21582 } 21583 21584 ContentValues values = new ContentValues(); 21585 if (title != null) values.put(TITLE, title); 21586 if (folder != null) values.put(FOLDER, folder); 21587 values.put(INTENT, intent.toUri(0)); 21588 if (shortcut != 0) values.put(SHORTCUT, (int) shortcut); 21589 values.put(ORDERING, ordering); 21590 return cr.insert(CONTENT_URI, values); 21591 } 21592 21593 /** 21594 * Return the folder name as it should be displayed to the user. This 21595 * takes care of localizing special folders. 21596 * 21597 * @param r Resources object for current locale; only need access to 21598 * system resources. 21599 * @param folder The value found in the {@link #FOLDER} column. 21600 * 21601 * @return CharSequence The label for this folder that should be shown 21602 * to the user. 21603 */ getLabelForFolder(Resources r, String folder)21604 public static CharSequence getLabelForFolder(Resources r, String folder) { 21605 return folder; 21606 } 21607 21608 /** 21609 * Return the title as it should be displayed to the user. This takes 21610 * care of localizing bookmarks that point to activities. 21611 * 21612 * @param context A context. 21613 * @param cursor A cursor pointing to the row whose title should be 21614 * returned. The cursor must contain at least the {@link #TITLE} 21615 * and {@link #INTENT} columns. 21616 * @return A title that is localized and can be displayed to the user, 21617 * or the empty string if one could not be found. 21618 */ getTitle(Context context, Cursor cursor)21619 public static CharSequence getTitle(Context context, Cursor cursor) { 21620 int titleColumn = cursor.getColumnIndex(TITLE); 21621 int intentColumn = cursor.getColumnIndex(INTENT); 21622 if (titleColumn == -1 || intentColumn == -1) { 21623 throw new IllegalArgumentException( 21624 "The cursor must contain the TITLE and INTENT columns."); 21625 } 21626 21627 String title = cursor.getString(titleColumn); 21628 if (!TextUtils.isEmpty(title)) { 21629 return title; 21630 } 21631 21632 String intentUri = cursor.getString(intentColumn); 21633 if (TextUtils.isEmpty(intentUri)) { 21634 return ""; 21635 } 21636 21637 Intent intent; 21638 try { 21639 intent = Intent.parseUri(intentUri, 0); 21640 } catch (URISyntaxException e) { 21641 return ""; 21642 } 21643 21644 PackageManager packageManager = context.getPackageManager(); 21645 ResolveInfo info = packageManager.resolveActivity(intent, 0); 21646 return info != null ? info.loadLabel(packageManager) : ""; 21647 } 21648 } 21649 21650 /** 21651 * <p> 21652 * A Settings panel is floating UI that contains a fixed subset of settings to address a 21653 * particular user problem. For example, the 21654 * {@link #ACTION_INTERNET_CONNECTIVITY Internet Panel} surfaces settings related to 21655 * connecting to the internet. 21656 * <p> 21657 * Settings panels appear above the calling app to address the problem without 21658 * the user needing to open Settings and thus leave their current screen. 21659 */ 21660 public static final class Panel { Panel()21661 private Panel() { 21662 } 21663 21664 /** 21665 * Activity Action: Show a settings dialog containing settings to enable internet 21666 * connection. 21667 * <p> 21668 * Input: Nothing. 21669 * <p> 21670 * Output: Nothing. 21671 */ 21672 @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) 21673 public static final String ACTION_INTERNET_CONNECTIVITY = 21674 "android.settings.panel.action.INTERNET_CONNECTIVITY"; 21675 21676 /** 21677 * Activity Action: Show a settings dialog containing NFC-related settings. 21678 * <p> 21679 * Input: Nothing. 21680 * <p> 21681 * Output: Nothing. 21682 */ 21683 @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) 21684 public static final String ACTION_NFC = 21685 "android.settings.panel.action.NFC"; 21686 21687 /** 21688 * Activity Action: Show a settings dialog containing controls for Wifi. 21689 * <p> 21690 * Input: Nothing. 21691 * <p> 21692 * Output: Nothing. 21693 */ 21694 @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) 21695 public static final String ACTION_WIFI = 21696 "android.settings.panel.action.WIFI"; 21697 21698 /** 21699 * Activity Action: Show a settings dialog containing all volume streams. 21700 * <p> 21701 * Input: Nothing. 21702 * <p> 21703 * Output: Nothing. 21704 */ 21705 @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) 21706 public static final String ACTION_VOLUME = 21707 "android.settings.panel.action.VOLUME"; 21708 } 21709 21710 /** 21711 * Activity Action: Show setting page to process the addition of Wi-Fi networks to the user's 21712 * saved network list. The app should send a new intent with an extra that holds a maximum 21713 * of five {@link android.net.wifi.WifiNetworkSuggestion} that specify credentials for the 21714 * networks to be added to the user's database. The Intent should be sent via the 21715 * {@link android.app.Activity#startActivityForResult(Intent, int)} API. 21716 * <p> 21717 * Note: The app sending the Intent to add the credentials doesn't get any ownership over the 21718 * newly added network(s). For the Wi-Fi stack, these networks will look like the user 21719 * manually added them from the Settings UI. 21720 * <p> 21721 * Input: The app should put parcelable array list of 21722 * {@link android.net.wifi.WifiNetworkSuggestion} into the {@link #EXTRA_WIFI_NETWORK_LIST} 21723 * extra. 21724 * <p> 21725 * Output: After {@link android.app.Activity#startActivityForResult(Intent, int)}, the 21726 * callback {@link android.app.Activity#onActivityResult(int, int, Intent)} will have a 21727 * result code {@link android.app.Activity#RESULT_OK} to indicate user pressed the save 21728 * button to save the networks or {@link android.app.Activity#RESULT_CANCELED} to indicate 21729 * that the user rejected the request. Additionally, an integer array list, stored in 21730 * {@link #EXTRA_WIFI_NETWORK_RESULT_LIST}, will indicate the process result of each network. 21731 */ 21732 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21733 public static final String ACTION_WIFI_ADD_NETWORKS = 21734 "android.settings.WIFI_ADD_NETWORKS"; 21735 21736 /** 21737 * A bundle extra of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that indicates the list 21738 * of the {@link android.net.wifi.WifiNetworkSuggestion} elements. The maximum count of the 21739 * {@link android.net.wifi.WifiNetworkSuggestion} elements in the list will be five. 21740 * <p> 21741 * For example: 21742 * To provide credentials for one open and one WPA2 networks: 21743 * 21744 * <pre>{@code 21745 * final WifiNetworkSuggestion suggestion1 = 21746 * new WifiNetworkSuggestion.Builder() 21747 * .setSsid("test111111") 21748 * .build(); 21749 * final WifiNetworkSuggestion suggestion2 = 21750 * new WifiNetworkSuggestion.Builder() 21751 * .setSsid("test222222") 21752 * .setWpa2Passphrase("test123456") 21753 * .build(); 21754 * final List<WifiNetworkSuggestion> suggestionsList = new ArrayList<>; 21755 * suggestionsList.add(suggestion1); 21756 * suggestionsList.add(suggestion2); 21757 * Bundle bundle = new Bundle(); 21758 * bundle.putParcelableArrayList(Settings.EXTRA_WIFI_NETWORK_LIST,(ArrayList<? extends 21759 * Parcelable>) suggestionsList); 21760 * final Intent intent = new Intent(Settings.ACTION_WIFI_ADD_NETWORKS); 21761 * intent.putExtras(bundle); 21762 * startActivityForResult(intent, 0); 21763 * }</pre> 21764 */ 21765 public static final String EXTRA_WIFI_NETWORK_LIST = 21766 "android.provider.extra.WIFI_NETWORK_LIST"; 21767 21768 /** 21769 * A bundle extra of the result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that 21770 * indicates the action result of the saved {@link android.net.wifi.WifiNetworkSuggestion}. 21771 * Its value is a list of integers, and all the elements will be 1:1 mapping to the elements 21772 * in {@link #EXTRA_WIFI_NETWORK_LIST}, if user press cancel to cancel the add networks 21773 * request, then its value will be null. 21774 * <p> 21775 * Note: The integer value will be one of the {@link #ADD_WIFI_RESULT_SUCCESS}, 21776 * {@link #ADD_WIFI_RESULT_ADD_OR_UPDATE_FAILED}, or {@link #ADD_WIFI_RESULT_ALREADY_EXISTS}}. 21777 */ 21778 public static final String EXTRA_WIFI_NETWORK_RESULT_LIST = 21779 "android.provider.extra.WIFI_NETWORK_RESULT_LIST"; 21780 21781 /** @hide */ 21782 @Retention(RetentionPolicy.SOURCE) 21783 @IntDef(prefix = {"ADD_WIFI_RESULT_"}, value = { 21784 ADD_WIFI_RESULT_SUCCESS, 21785 ADD_WIFI_RESULT_ADD_OR_UPDATE_FAILED, 21786 ADD_WIFI_RESULT_ALREADY_EXISTS 21787 }) 21788 public @interface AddWifiResult { 21789 } 21790 21791 /** 21792 * A result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that saving or updating the 21793 * corresponding Wi-Fi network was successful. 21794 */ 21795 public static final int ADD_WIFI_RESULT_SUCCESS = 0; 21796 21797 /** 21798 * A result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that saving the corresponding 21799 * Wi-Fi network failed. 21800 */ 21801 public static final int ADD_WIFI_RESULT_ADD_OR_UPDATE_FAILED = 1; 21802 21803 /** 21804 * A result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that indicates the Wi-Fi network 21805 * already exists. 21806 */ 21807 public static final int ADD_WIFI_RESULT_ALREADY_EXISTS = 2; 21808 21809 /** 21810 * Activity Action: Allows user to select current bug report handler. 21811 * <p> 21812 * Input: Nothing. 21813 * <p> 21814 * Output: Nothing. 21815 * 21816 * @hide 21817 */ 21818 @SystemApi 21819 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21820 public static final String ACTION_BUGREPORT_HANDLER_SETTINGS = 21821 "android.settings.BUGREPORT_HANDLER_SETTINGS"; 21822 21823 private static final String[] PM_WRITE_SETTINGS = { 21824 android.Manifest.permission.WRITE_SETTINGS 21825 }; 21826 private static final String[] PM_CHANGE_NETWORK_STATE = { 21827 android.Manifest.permission.CHANGE_NETWORK_STATE, 21828 android.Manifest.permission.WRITE_SETTINGS 21829 }; 21830 private static final String[] PM_SYSTEM_ALERT_WINDOW = { 21831 android.Manifest.permission.SYSTEM_ALERT_WINDOW 21832 }; 21833 21834 /** 21835 * Activity Action: Show screen for controlling which apps have access to manage external 21836 * storage. 21837 * <p> 21838 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 21839 * <p> 21840 * If you want to control a specific app's access to manage external storage, use 21841 * {@link #ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION} instead. 21842 * <p> 21843 * Output: Nothing. 21844 * @see #ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION 21845 */ 21846 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21847 public static final String ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION = 21848 "android.settings.MANAGE_ALL_FILES_ACCESS_PERMISSION"; 21849 21850 /** 21851 * Activity Action: Show screen for controlling if the app specified in the data URI of the 21852 * intent can manage external storage. 21853 * <p> 21854 * Launching the corresponding activity requires the permission 21855 * {@link Manifest.permission#MANAGE_EXTERNAL_STORAGE}. 21856 * <p> 21857 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 21858 * <p> 21859 * Input: The Intent's data URI MUST specify the application package name whose ability of 21860 * managing external storage you want to control. 21861 * For example "package:com.my.app". 21862 * <p> 21863 * Output: Nothing. 21864 * @see #ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION 21865 */ 21866 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21867 public static final String ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION = 21868 "android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION"; 21869 21870 /** 21871 * Activity Action: Show screen for controlling whether an app can send full screen intents. 21872 * <p> 21873 * Input: the intent's data URI must specify the application package name for which you want 21874 * to manage full screen intents. 21875 * <p> 21876 * Output: Nothing. 21877 */ 21878 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21879 public static final String ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT = 21880 "android.settings.MANAGE_APP_USE_FULL_SCREEN_INTENT"; 21881 21882 /** 21883 * Activity Action: For system or preinstalled apps to show their {@link Activity} embedded 21884 * in Settings app on large screen devices. 21885 * 21886 * Developers should resolve the Intent action before using it. 21887 * 21888 * <p> 21889 * Input: {@link #EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI} must be included to 21890 * specify the intent for the activity which will be embedded in Settings app. 21891 * It's an intent URI string from {@code intent.toUri(Intent.URI_INTENT_SCHEME)}. 21892 * 21893 * Input: {@link #EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY} must be included to 21894 * specify a key that indicates the menu item which will be highlighted on settings home menu. 21895 * <p> 21896 * Output: Nothing. 21897 */ 21898 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21899 public static final String ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY = 21900 "android.settings.SETTINGS_EMBED_DEEP_LINK_ACTIVITY"; 21901 21902 /** 21903 * Activity Extra: Specify the intent for the {@link Activity} which will be embedded in 21904 * Settings app. It's an intent URI string from 21905 * {@code intent.toUri(Intent.URI_INTENT_SCHEME)}. 21906 * <p> 21907 * This must be passed as an extra field to 21908 * {@link #ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY}. 21909 */ 21910 public static final String EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI = 21911 "android.provider.extra.SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI"; 21912 21913 /** 21914 * Activity Extra: Specify a key that indicates the menu item which should be highlighted on 21915 * settings home menu. 21916 * <p> 21917 * This must be passed as an extra field to 21918 * {@link #ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY}. 21919 */ 21920 public static final String EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY = 21921 "android.provider.extra.SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY"; 21922 21923 /** 21924 * Performs a strict and comprehensive check of whether a calling package is allowed to 21925 * write/modify system settings, as the condition differs for pre-M, M+, and 21926 * privileged/preinstalled apps. If the provided uid does not match the 21927 * callingPackage, a negative result will be returned. 21928 * @hide 21929 */ 21930 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) isCallingPackageAllowedToWriteSettings(Context context, int uid, String callingPackage, boolean throwException)21931 public static boolean isCallingPackageAllowedToWriteSettings(Context context, int uid, 21932 String callingPackage, boolean throwException) { 21933 return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, 21934 callingPackage, null /*attribution not needed when not making note */, 21935 throwException, AppOpsManager.OP_WRITE_SETTINGS, PM_WRITE_SETTINGS, 21936 false); 21937 } 21938 21939 /** 21940 * @deprecated Use {@link #checkAndNoteWriteSettingsOperation(Context, int, String, String, 21941 * boolean)} instead. 21942 * 21943 * @hide 21944 */ 21945 @Deprecated 21946 @SystemApi checkAndNoteWriteSettingsOperation(@onNull Context context, int uid, @NonNull String callingPackage, boolean throwException)21947 public static boolean checkAndNoteWriteSettingsOperation(@NonNull Context context, int uid, 21948 @NonNull String callingPackage, boolean throwException) { 21949 return checkAndNoteWriteSettingsOperation(context, uid, callingPackage, null, 21950 throwException); 21951 } 21952 21953 /** 21954 * Performs a strict and comprehensive check of whether a calling package is allowed to 21955 * write/modify system settings, as the condition differs for pre-M, M+, and 21956 * privileged/preinstalled apps. If the provided uid does not match the 21957 * callingPackage, a negative result will be returned. The caller is expected to have 21958 * the WRITE_SETTINGS permission declared. 21959 * 21960 * Note: if the check is successful, the operation of this app will be updated to the 21961 * current time. 21962 * @hide 21963 */ 21964 @SystemApi checkAndNoteWriteSettingsOperation(@onNull Context context, int uid, @NonNull String callingPackage, @Nullable String callingAttributionTag, boolean throwException)21965 public static boolean checkAndNoteWriteSettingsOperation(@NonNull Context context, int uid, 21966 @NonNull String callingPackage, @Nullable String callingAttributionTag, 21967 boolean throwException) { 21968 return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, 21969 callingPackage, callingAttributionTag, throwException, 21970 AppOpsManager.OP_WRITE_SETTINGS, PM_WRITE_SETTINGS, true); 21971 } 21972 21973 /** 21974 * Performs a strict and comprehensive check of whether a calling package is allowed to 21975 * draw on top of other apps, as the conditions differs for pre-M, M+, and 21976 * privileged/preinstalled apps. If the provided uid does not match the callingPackage, 21977 * a negative result will be returned. 21978 * @hide 21979 */ 21980 @UnsupportedAppUsage isCallingPackageAllowedToDrawOverlays(Context context, int uid, String callingPackage, boolean throwException)21981 public static boolean isCallingPackageAllowedToDrawOverlays(Context context, int uid, 21982 String callingPackage, boolean throwException) { 21983 return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, 21984 callingPackage, null /*attribution not needed when not making note */, 21985 throwException, AppOpsManager.OP_SYSTEM_ALERT_WINDOW, PM_SYSTEM_ALERT_WINDOW, 21986 false); 21987 } 21988 21989 /** 21990 * Performs a strict and comprehensive check of whether a calling package is allowed to 21991 * draw on top of other apps, as the conditions differs for pre-M, M+, and 21992 * privileged/preinstalled apps. If the provided uid does not match the callingPackage, 21993 * a negative result will be returned. 21994 * 21995 * Note: if the check is successful, the operation of this app will be updated to the 21996 * current time. 21997 * @hide 21998 */ checkAndNoteDrawOverlaysOperation(Context context, int uid, String callingPackage, String callingAttributionTag, boolean throwException)21999 public static boolean checkAndNoteDrawOverlaysOperation(Context context, int uid, 22000 String callingPackage, String callingAttributionTag, boolean throwException) { 22001 return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, 22002 callingPackage, callingAttributionTag, throwException, 22003 AppOpsManager.OP_SYSTEM_ALERT_WINDOW, PM_SYSTEM_ALERT_WINDOW, true); 22004 } 22005 22006 /** 22007 * @deprecated Use {@link #isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context, 22008 * int, String, String, boolean, int, String[], boolean)} instead. 22009 * 22010 * @hide 22011 */ 22012 @Deprecated 22013 @UnsupportedAppUsage isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context, int uid, String callingPackage, boolean throwException, int appOpsOpCode, String[] permissions, boolean makeNote)22014 public static boolean isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context, 22015 int uid, String callingPackage, boolean throwException, int appOpsOpCode, 22016 String[] permissions, boolean makeNote) { 22017 return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, 22018 callingPackage, null, throwException, appOpsOpCode, permissions, makeNote); 22019 } 22020 22021 /** 22022 * Helper method to perform a general and comprehensive check of whether an operation that is 22023 * protected by appops can be performed by a caller or not. e.g. OP_SYSTEM_ALERT_WINDOW and 22024 * OP_WRITE_SETTINGS 22025 * @hide 22026 */ isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context, int uid, String callingPackage, String callingAttributionTag, boolean throwException, int appOpsOpCode, String[] permissions, boolean makeNote)22027 public static boolean isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context, 22028 int uid, String callingPackage, String callingAttributionTag, boolean throwException, 22029 int appOpsOpCode, String[] permissions, boolean makeNote) { 22030 if (callingPackage == null) { 22031 return false; 22032 } 22033 22034 AppOpsManager appOpsMgr = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE); 22035 int mode = AppOpsManager.MODE_DEFAULT; 22036 if (makeNote) { 22037 mode = appOpsMgr.noteOpNoThrow(appOpsOpCode, uid, callingPackage, callingAttributionTag, 22038 null); 22039 } else { 22040 mode = appOpsMgr.checkOpNoThrow(appOpsOpCode, uid, callingPackage); 22041 } 22042 22043 switch (mode) { 22044 case AppOpsManager.MODE_ALLOWED: 22045 return true; 22046 22047 case AppOpsManager.MODE_DEFAULT: 22048 // this is the default operating mode after an app's installation 22049 // In this case we will check all associated static permission to see 22050 // if it is granted during install time. 22051 for (String permission : permissions) { 22052 if (context.checkCallingOrSelfPermission(permission) == PackageManager 22053 .PERMISSION_GRANTED) { 22054 // if either of the permissions are granted, we will allow it 22055 return true; 22056 } 22057 } 22058 22059 default: 22060 // this is for all other cases trickled down here... 22061 if (!throwException) { 22062 return false; 22063 } 22064 } 22065 22066 // prepare string to throw SecurityException 22067 StringBuilder exceptionMessage = new StringBuilder(); 22068 exceptionMessage.append(callingPackage); 22069 exceptionMessage.append(" was not granted "); 22070 if (permissions.length > 1) { 22071 exceptionMessage.append(" either of these permissions: "); 22072 } else { 22073 exceptionMessage.append(" this permission: "); 22074 } 22075 for (int i = 0; i < permissions.length; i++) { 22076 exceptionMessage.append(permissions[i]); 22077 exceptionMessage.append((i == permissions.length - 1) ? "." : ", "); 22078 } 22079 22080 throw new SecurityException(exceptionMessage.toString()); 22081 } 22082 22083 /** 22084 * Retrieves a correponding package name for a given uid. It will query all 22085 * packages that are associated with the given uid, but it will return only 22086 * the zeroth result. 22087 * Note: If package could not be found, a null is returned. 22088 * @hide 22089 */ getPackageNameForUid(Context context, int uid)22090 public static String getPackageNameForUid(Context context, int uid) { 22091 String[] packages = context.getPackageManager().getPackagesForUid(uid); 22092 if (packages == null) { 22093 return null; 22094 } 22095 return packages[0]; 22096 } 22097 } 22098