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.speech.tts.TextToSpeech; 89 import android.telephony.TelephonyManager; 90 import android.text.TextUtils; 91 import android.util.AndroidException; 92 import android.util.ArrayMap; 93 import android.util.ArraySet; 94 import android.util.Log; 95 import android.util.MemoryIntArray; 96 import android.util.Slog; 97 import android.view.Display; 98 import android.view.MotionEvent; 99 import android.view.ViewConfiguration; 100 import android.view.Window; 101 import android.view.WindowManager.LayoutParams; 102 import android.widget.Editor; 103 104 import com.android.internal.annotations.GuardedBy; 105 import com.android.internal.util.Preconditions; 106 107 import java.io.IOException; 108 import java.lang.annotation.ElementType; 109 import java.lang.annotation.Retention; 110 import java.lang.annotation.RetentionPolicy; 111 import java.lang.annotation.Target; 112 import java.lang.reflect.Field; 113 import java.net.URISyntaxException; 114 import java.util.HashMap; 115 import java.util.HashSet; 116 import java.util.List; 117 import java.util.Locale; 118 import java.util.Map; 119 import java.util.Objects; 120 import java.util.Set; 121 import java.util.concurrent.Executor; 122 import java.util.function.Consumer; 123 124 /** 125 * The Settings provider contains global system-level device preferences. 126 */ 127 public final class Settings { 128 /** @hide */ 129 public static final boolean DEFAULT_OVERRIDEABLE_BY_RESTORE = false; 130 131 // Intent actions for Settings 132 133 /** 134 * Activity Action: Show system settings. 135 * <p> 136 * Input: Nothing. 137 * <p> 138 * Output: Nothing. 139 */ 140 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 141 public static final String ACTION_SETTINGS = "android.settings.SETTINGS"; 142 143 /** 144 * Activity Action: Show settings to provide guide about carrier satellite messaging. 145 * <p> 146 * In some cases, a matching Activity may not exist, so ensure you 147 * safeguard against this. 148 * <p> 149 * Input: Nothing. 150 * <p> 151 * Output: Nothing. 152 */ 153 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 154 @FlaggedApi(com.android.internal.telephony.flags.Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG) 155 public static final String ACTION_SATELLITE_SETTING = "android.settings.SATELLITE_SETTING"; 156 157 /** 158 * Activity Action: Show settings to allow configuration of APNs. 159 * <p> 160 * Input: Nothing. 161 * <p> 162 * Output: Nothing. 163 * 164 * <p class="note"> 165 * In some cases, a matching Activity may not exist, so ensure you 166 * safeguard against this. 167 */ 168 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 169 public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS"; 170 171 /** 172 * Activity Action: Show settings to allow configuration of current location 173 * sources. 174 * <p> 175 * In some cases, a matching Activity may not exist, so ensure you 176 * safeguard against this. 177 * <p> 178 * Input: Nothing. 179 * <p> 180 * Output: Nothing. 181 */ 182 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 183 public static final String ACTION_LOCATION_SOURCE_SETTINGS = 184 "android.settings.LOCATION_SOURCE_SETTINGS"; 185 186 /** 187 * Activity Action: Show settings to allow configuration of location controller extra package. 188 * <p> 189 * In some cases, a matching Activity may not exist, so ensure you 190 * safeguard against this. 191 * <p> 192 * Input: Nothing. 193 * <p> 194 * Output: Nothing. 195 * 196 * @hide 197 */ 198 @SystemApi 199 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 200 public static final String ACTION_LOCATION_CONTROLLER_EXTRA_PACKAGE_SETTINGS = 201 "android.settings.LOCATION_CONTROLLER_EXTRA_PACKAGE_SETTINGS"; 202 203 /** 204 * Activity Action: Show scanning settings to allow configuration of Wi-Fi 205 * and Bluetooth scanning settings. 206 * <p> 207 * In some cases, a matching Activity may not exist, so ensure you 208 * safeguard against this. 209 * <p> 210 * Input: Nothing. 211 * <p> 212 * Output: Nothing. 213 * @hide 214 */ 215 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 216 public static final String ACTION_LOCATION_SCANNING_SETTINGS = 217 "android.settings.LOCATION_SCANNING_SETTINGS"; 218 219 /** 220 * Activity Action: Show settings to manage creation/deletion of cloned apps. 221 * <p> 222 * In some cases, a matching Activity may not exist, so ensure you 223 * safeguard against this. 224 * <p> 225 * Input: Nothing. 226 * <p> 227 * Output: Nothing. 228 * @hide 229 */ 230 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 231 public static final String ACTION_MANAGE_CLONED_APPS_SETTINGS = 232 "android.settings.MANAGE_CLONED_APPS_SETTINGS"; 233 234 /** 235 * Activity Action: Show settings to allow configuration of users. 236 * <p> 237 * In some cases, a matching Activity may not exist, so ensure you 238 * safeguard against this. 239 * <p> 240 * Input: Nothing. 241 * <p> 242 * Output: Nothing. 243 * @hide 244 */ 245 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 246 @SystemApi 247 public static final String ACTION_USER_SETTINGS = 248 "android.settings.USER_SETTINGS"; 249 250 /** 251 * Activity Action: Show settings to allow configuration of wireless controls 252 * such as Wi-Fi, Bluetooth and Mobile networks. 253 * <p> 254 * In some cases, a matching Activity may not exist, so ensure you 255 * safeguard against this. 256 * <p> 257 * Input: Nothing. 258 * <p> 259 * Output: Nothing. 260 */ 261 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 262 public static final String ACTION_WIRELESS_SETTINGS = 263 "android.settings.WIRELESS_SETTINGS"; 264 265 /** 266 * Activity Action: Show tether provisioning activity. 267 * 268 * <p> 269 * In some cases, a matching Activity may not exist, so ensure you 270 * safeguard against this. 271 * <p> 272 * Input: {@link ConnectivityManager#EXTRA_TETHER_TYPE} should be included to specify which type 273 * of tethering should be checked. {@link ConnectivityManager#EXTRA_PROVISION_CALLBACK} should 274 * contain a {@link ResultReceiver} which will be called back with a tether result code. 275 * <p> 276 * Output: The result of the provisioning check. 277 * {@link ConnectivityManager#TETHER_ERROR_NO_ERROR} if successful, 278 * {@link ConnectivityManager#TETHER_ERROR_PROVISION_FAILED} for failure. 279 * 280 * @hide 281 */ 282 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 283 @SystemApi 284 public static final String ACTION_TETHER_PROVISIONING_UI = 285 "android.settings.TETHER_PROVISIONING_UI"; 286 287 /** 288 * Activity Action: Show a dialog activity to notify tethering is NOT supported by carrier. 289 * 290 * When {@link android.telephony.CarrierConfigManager#KEY_CARRIER_SUPPORTS_TETHERING_BOOL} 291 * is false, and tethering is started by Settings, this dialog activity will be started to 292 * tell the user that tethering is not supported by carrier. 293 * 294 * @hide 295 */ 296 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 297 @SystemApi 298 public static final String ACTION_TETHER_UNSUPPORTED_CARRIER_UI = 299 "android.settings.TETHER_UNSUPPORTED_CARRIER_UI"; 300 301 /** 302 * Activity Action: Show settings to allow entering/exiting airplane mode. 303 * <p> 304 * In some cases, a matching Activity may not exist, so ensure you 305 * safeguard against this. 306 * <p> 307 * Input: Nothing. 308 * <p> 309 * Output: Nothing. 310 */ 311 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 312 public static final String ACTION_AIRPLANE_MODE_SETTINGS = 313 "android.settings.AIRPLANE_MODE_SETTINGS"; 314 315 /** 316 * Activity Action: Show enabled eSim profile in Settings 317 * <p> 318 * This opens the Settings page for the currently enabled eSim profile 319 * <p> 320 * Input: Nothing. 321 * <p> 322 * Output: Nothing. 323 * @hide 324 */ 325 public static final String ACTION_SHOW_ENABLED_ESIM_PROFILE = 326 "android.settings.SHOW_ENABLED_ESIM_PROFILE"; 327 328 /** 329 * Activity Action: Show mobile data usage list. 330 * <p> 331 * Input: {@link EXTRA_NETWORK_TEMPLATE} and {@link EXTRA_SUB_ID} should be included to specify 332 * how and what mobile data statistics should be collected. 333 * <p> 334 * Output: Nothing 335 * @hide 336 */ 337 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 338 public static final String ACTION_MOBILE_DATA_USAGE = 339 "android.settings.MOBILE_DATA_USAGE"; 340 341 /** @hide */ 342 public static final String EXTRA_NETWORK_TEMPLATE = "network_template"; 343 344 /** 345 * Activity Action: Show One-handed mode Settings page. 346 * <p> 347 * Input: Nothing 348 * <p> 349 * Output: Nothing 350 * @hide 351 */ 352 public static final String ACTION_ONE_HANDED_SETTINGS = 353 "android.settings.action.ONE_HANDED_SETTINGS"; 354 /** 355 * The return values for {@link Settings.Config#set} 356 * @hide 357 */ 358 @IntDef(prefix = "SET_ALL_RESULT_", 359 value = { SET_ALL_RESULT_FAILURE, SET_ALL_RESULT_SUCCESS, SET_ALL_RESULT_DISABLED }) 360 @Retention(RetentionPolicy.SOURCE) 361 @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE}) 362 public @interface SetAllResult {} 363 364 /** 365 * A return value for {@link #KEY_CONFIG_SET_ALL_RETURN}, indicates failure. 366 * @hide 367 */ 368 public static final int SET_ALL_RESULT_FAILURE = 0; 369 370 /** 371 * A return value for {@link #KEY_CONFIG_SET_ALL_RETURN}, indicates success. 372 * @hide 373 */ 374 public static final int SET_ALL_RESULT_SUCCESS = 1; 375 376 /** 377 * A return value for {@link #KEY_CONFIG_SET_ALL_RETURN}, indicates a set all is disabled. 378 * @hide 379 */ 380 public static final int SET_ALL_RESULT_DISABLED = 2; 381 382 /** @hide */ 383 public static final String KEY_CONFIG_SET_ALL_RETURN = "config_set_all_return"; 384 385 /** @hide */ 386 public static final String KEY_CONFIG_GET_SYNC_DISABLED_MODE_RETURN = 387 "config_get_sync_disabled_mode_return"; 388 389 /** 390 * An int extra specifying a subscription ID. 391 * 392 * @see android.telephony.SubscriptionInfo#getSubscriptionId 393 */ 394 public static final String EXTRA_SUB_ID = "android.provider.extra.SUB_ID"; 395 396 /** 397 * Activity Action: Modify Airplane mode settings using a voice command. 398 * <p> 399 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 400 * <p> 401 * This intent MUST be started using 402 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity 403 * startVoiceActivity}. 404 * <p> 405 * Note: The activity implementing this intent MUST verify that 406 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before 407 * modifying the setting. 408 * <p> 409 * Input: To tell which state airplane mode should be set to, add the 410 * {@link #EXTRA_AIRPLANE_MODE_ENABLED} extra to this Intent with the state specified. 411 * If the extra is not included, no changes will be made. 412 * <p> 413 * Output: Nothing. 414 */ 415 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 416 public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE = 417 "android.settings.VOICE_CONTROL_AIRPLANE_MODE"; 418 419 /** 420 * Activity Action: Show settings for accessibility modules. 421 * <p> 422 * In some cases, a matching Activity may not exist, so ensure you 423 * safeguard against this. 424 * <p> 425 * Input: Nothing. 426 * <p> 427 * Output: Nothing. 428 */ 429 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 430 public static final String ACTION_ACCESSIBILITY_SETTINGS = 431 "android.settings.ACCESSIBILITY_SETTINGS"; 432 433 /** 434 * Activity Action: Show detail settings of a particular accessibility service. 435 * <p> 436 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 437 * <p> 438 * Input: {@link Intent#EXTRA_COMPONENT_NAME} must specify the accessibility service component 439 * name to be shown. 440 * <p> 441 * Output: Nothing. 442 * @hide 443 **/ 444 @SystemApi 445 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 446 public static final String ACTION_ACCESSIBILITY_DETAILS_SETTINGS = 447 "android.settings.ACCESSIBILITY_DETAILS_SETTINGS"; 448 449 /** 450 * Activity Action: Show settings to allow configuration of an accessibility 451 * shortcut belonging to an accessibility feature or features. 452 * <p> 453 * Input: ":settings:show_fragment_args" must contain "targets" denoting the services to edit. 454 * <p> 455 * Output: Nothing. 456 * @hide 457 **/ 458 public static final String ACTION_ACCESSIBILITY_SHORTCUT_SETTINGS = 459 "android.settings.ACCESSIBILITY_SHORTCUT_SETTINGS"; 460 461 /** 462 * Activity Action: Show settings to allow configuration of accessibility color and motion. 463 * <p> 464 * In some cases, a matching Activity may not exist, so ensure you 465 * safeguard against this. 466 * <p> 467 * Input: Nothing. 468 * <p> 469 * Output: Nothing. 470 * @hide 471 */ 472 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 473 public static final String ACTION_ACCESSIBILITY_COLOR_MOTION_SETTINGS = 474 "android.settings.ACCESSIBILITY_COLOR_MOTION_SETTINGS"; 475 476 /** 477 * Activity Action: Show settings to allow configuration of accessibility color contrast. 478 * <p> 479 * In some cases, a matching Activity may not exist, so ensure you 480 * safeguard against this. 481 * <p> 482 * Input: Nothing. 483 * <p> 484 * Output: Nothing. 485 * @hide 486 */ 487 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 488 public static final String ACTION_ACCESSIBILITY_COLOR_CONTRAST_SETTINGS = 489 "android.settings.ACCESSIBILITY_COLOR_CONTRAST_SETTINGS"; 490 491 /** 492 * Activity Action: Show settings to allow configuration of Reduce Bright Colors. 493 * <p> 494 * In some cases, a matching Activity may not exist, so ensure you 495 * safeguard against this. 496 * <p> 497 * Input: Nothing. 498 * <p> 499 * Output: Nothing. 500 * @hide 501 */ 502 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 503 public static final String ACTION_REDUCE_BRIGHT_COLORS_SETTINGS = 504 "android.settings.REDUCE_BRIGHT_COLORS_SETTINGS"; 505 506 /** 507 * Activity Action: Show settings to allow configuration of Color correction. 508 * <p> 509 * In some cases, a matching Activity may not exist, so ensure you 510 * safeguard against this. 511 * <p> 512 * Input: Nothing. 513 * <p> 514 * Output: Nothing. 515 * @hide 516 */ 517 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 518 public static final String ACTION_COLOR_CORRECTION_SETTINGS = 519 "com.android.settings.ACCESSIBILITY_COLOR_SPACE_SETTINGS"; 520 521 /** 522 * Activity Action: Show settings to allow configuration of Color inversion. 523 * <p> 524 * In some cases, a matching Activity may not exist, so ensure you 525 * safeguard against this. 526 * <p> 527 * Input: Nothing. 528 * <p> 529 * Output: Nothing. 530 * @hide 531 */ 532 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 533 public static final String ACTION_COLOR_INVERSION_SETTINGS = 534 "android.settings.COLOR_INVERSION_SETTINGS"; 535 536 /** 537 * Activity Action: Show settings to allow configuration of text reading. 538 * <p> 539 * In some cases, a matching Activity may not exist, so ensure you 540 * safeguard against this. 541 * <p> 542 * Input: Nothing. 543 * <p> 544 * Output: Nothing. 545 * @hide 546 */ 547 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 548 public static final String ACTION_TEXT_READING_SETTINGS = 549 "android.settings.TEXT_READING_SETTINGS"; 550 551 /** 552 * Activity Action: Show settings to control access to usage information. 553 * <p> 554 * In some cases, a matching Activity may not exist, so ensure you 555 * safeguard against this. 556 * <p> 557 * Input: Nothing. 558 * <p> 559 * Output: Nothing. 560 */ 561 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 562 public static final String ACTION_USAGE_ACCESS_SETTINGS = 563 "android.settings.USAGE_ACCESS_SETTINGS"; 564 565 /** 566 * Activity Category: Show application settings related to usage access. 567 * <p> 568 * An activity that provides a user interface for adjusting usage access related 569 * preferences for its containing application. Optional but recommended for apps that 570 * use {@link android.Manifest.permission#PACKAGE_USAGE_STATS}. 571 * <p> 572 * The activity may define meta-data to describe what usage access is 573 * used for within their app with {@link #METADATA_USAGE_ACCESS_REASON}, which 574 * will be displayed in Settings. 575 * <p> 576 * Input: Nothing. 577 * <p> 578 * Output: Nothing. 579 */ 580 @SdkConstant(SdkConstantType.INTENT_CATEGORY) 581 public static final String INTENT_CATEGORY_USAGE_ACCESS_CONFIG = 582 "android.intent.category.USAGE_ACCESS_CONFIG"; 583 584 /** 585 * Metadata key: Reason for needing usage access. 586 * <p> 587 * A key for metadata attached to an activity that receives action 588 * {@link #INTENT_CATEGORY_USAGE_ACCESS_CONFIG}, shown to the 589 * user as description of how the app uses usage access. 590 * <p> 591 */ 592 public static final String METADATA_USAGE_ACCESS_REASON = 593 "android.settings.metadata.USAGE_ACCESS_REASON"; 594 595 /** 596 * Activity Action: Show settings to allow configuration of security and 597 * location privacy. 598 * <p> 599 * In some cases, a matching Activity may not exist, so ensure you 600 * safeguard against this. 601 * <p> 602 * Input: Nothing. 603 * <p> 604 * Output: Nothing. 605 */ 606 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 607 public static final String ACTION_SECURITY_SETTINGS = 608 "android.settings.SECURITY_SETTINGS"; 609 610 /** 611 * Activity Action: Show settings to allow configuration of trusted external sources 612 * 613 * Input: Optionally, the Intent's data URI can specify the application package name to 614 * directly invoke the management GUI specific to the package name. For example 615 * "package:com.my.app". 616 * <p> 617 * Output: Nothing. 618 */ 619 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 620 public static final String ACTION_MANAGE_UNKNOWN_APP_SOURCES = 621 "android.settings.MANAGE_UNKNOWN_APP_SOURCES"; 622 623 /** 624 * Activity Action: Show settings to allow configuration of 625 * {@link Manifest.permission#SCHEDULE_EXACT_ALARM} permission 626 * 627 * Input: Optionally, the Intent's data URI can specify the application package name to 628 * directly invoke the management GUI specific to the package name. For example 629 * "package:com.my.app". 630 * <p> 631 * Output: When a package data uri is passed as input, the activity result is set to 632 * {@link android.app.Activity#RESULT_OK} if the permission was granted to the app. Otherwise, 633 * the result is set to {@link android.app.Activity#RESULT_CANCELED}. 634 */ 635 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 636 public static final String ACTION_REQUEST_SCHEDULE_EXACT_ALARM = 637 "android.settings.REQUEST_SCHEDULE_EXACT_ALARM"; 638 639 /** 640 * Activity Action: Show settings to allow configuration of 641 * {@link Manifest.permission#MANAGE_MEDIA} permission 642 * 643 * Input: Optionally, the Intent's data URI can specify the application package name to 644 * directly invoke the management GUI specific to the package name. For example 645 * "package:com.my.app". 646 * <p> 647 * Output: Nothing. 648 */ 649 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 650 public static final String ACTION_REQUEST_MANAGE_MEDIA = 651 "android.settings.REQUEST_MANAGE_MEDIA"; 652 653 /** 654 * Activity Action: Show settings to allow configuration of 655 * {@link Manifest.permission#MEDIA_ROUTING_CONTROL} permission. 656 * 657 * Input: Optionally, the Intent's data URI can specify the application package name to 658 * directly invoke the management GUI specific to the package name. For example 659 * "package:com.my.app". However, modifying this permission setting for any package is allowed 660 * only when that package holds an appropriate companion device profile such as 661 * {@link android.companion.AssociationRequest#DEVICE_PROFILE_WATCH}. 662 * <p> 663 * Output: Nothing. 664 */ 665 @FlaggedApi("com.android.media.flags.enable_privileged_routing_for_media_routing_control") 666 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 667 public static final String ACTION_REQUEST_MEDIA_ROUTING_CONTROL = 668 "android.settings.REQUEST_MEDIA_ROUTING_CONTROL"; 669 670 /** 671 * Activity Action: Show settings to allow configuration of 672 * {@link Manifest.permission#RUN_USER_INITIATED_JOBS} permission 673 * 674 * Input: Optionally, the Intent's data URI can specify the application package name to 675 * directly invoke the management GUI specific to the package name. For example 676 * "package:com.my.app". 677 * <p> 678 * Output: When a package data uri is passed as input, the activity result is set to 679 * {@link android.app.Activity#RESULT_OK} if the permission was granted to the app. Otherwise, 680 * the result is set to {@link android.app.Activity#RESULT_CANCELED}. 681 * 682 * @hide 683 */ 684 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 685 public static final String ACTION_MANAGE_APP_LONG_RUNNING_JOBS = 686 "android.settings.MANAGE_APP_LONG_RUNNING_JOBS"; 687 688 /** 689 * Activity Action: Show settings to allow configuration of cross-profile access for apps 690 * 691 * Input: Optionally, the Intent's data URI can specify the application package name to 692 * directly invoke the management GUI specific to the package name. For example 693 * "package:com.my.app". 694 * <p> 695 * Output: Nothing. 696 * 697 * @hide 698 */ 699 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 700 public static final String ACTION_MANAGE_CROSS_PROFILE_ACCESS = 701 "android.settings.MANAGE_CROSS_PROFILE_ACCESS"; 702 703 /** 704 * Activity Action: Show the "Open by Default" page in a particular application's details page. 705 * <p> 706 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 707 * <p> 708 * Input: The Intent's data URI specifies the application package name 709 * to be shown, with the "package" scheme. That is "package:com.my.app". 710 * <p> 711 * Output: Nothing. 712 */ 713 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 714 public static final String ACTION_APP_OPEN_BY_DEFAULT_SETTINGS = 715 "android.settings.APP_OPEN_BY_DEFAULT_SETTINGS"; 716 717 /** 718 * Activity Action: Show trusted credentials settings, opening to the user tab, 719 * to allow management of installed credentials. 720 * <p> 721 * In some cases, a matching Activity may not exist, so ensure you 722 * safeguard against this. 723 * <p> 724 * Input: Nothing. 725 * <p> 726 * Output: Nothing. 727 * @hide 728 */ 729 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 730 @UnsupportedAppUsage 731 public static final String ACTION_TRUSTED_CREDENTIALS_USER = 732 "com.android.settings.TRUSTED_CREDENTIALS_USER"; 733 734 /** 735 * Activity Action: Show dialog explaining that an installed CA cert may enable 736 * monitoring of encrypted network traffic. 737 * <p> 738 * In some cases, a matching Activity may not exist, so ensure you 739 * safeguard against this. Add {@link #EXTRA_NUMBER_OF_CERTIFICATES} extra to indicate the 740 * number of certificates. 741 * <p> 742 * Input: Nothing. 743 * <p> 744 * Output: Nothing. 745 * @hide 746 */ 747 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 748 public static final String ACTION_MONITORING_CERT_INFO = 749 "com.android.settings.MONITORING_CERT_INFO"; 750 751 /** 752 * Activity Action: Show settings to allow configuration of privacy options, i.e. permission 753 * manager, privacy dashboard, privacy controls and more. 754 * <p> 755 * In some cases, a matching Activity may not exist, so ensure you 756 * safeguard against this. 757 * <p> 758 * Input: Nothing. 759 * <p> 760 * Output: Nothing. 761 */ 762 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 763 public static final String ACTION_PRIVACY_SETTINGS = 764 "android.settings.PRIVACY_SETTINGS"; 765 766 /** 767 * Activity Action: Show privacy controls sub-page, i.e. privacy (camera/mic) toggles and more. 768 * <p> 769 * In some cases, a matching Activity may not exist, so ensure you 770 * safeguard against this. 771 * <p> 772 * Input: Nothing. 773 * <p> 774 * Output: Nothing. 775 * @hide 776 */ 777 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 778 public static final String ACTION_PRIVACY_CONTROLS = 779 "android.settings.PRIVACY_CONTROLS"; 780 781 /** 782 * Activity Action: Show settings to allow configuration of VPN. 783 * <p> 784 * In some cases, a matching Activity may not exist, so ensure you 785 * safeguard against this. 786 * <p> 787 * Input: Nothing. 788 * <p> 789 * Output: Nothing. 790 */ 791 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 792 public static final String ACTION_VPN_SETTINGS = 793 "android.settings.VPN_SETTINGS"; 794 795 /** 796 * Activity Action: Show settings to allow configuration of Wi-Fi. 797 * <p> 798 * In some cases, a matching Activity may not exist, so ensure you 799 * safeguard against this. 800 * <p> 801 * Input: Nothing. 802 * <p> 803 * Output: Nothing. 804 */ 805 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 806 public static final String ACTION_WIFI_SETTINGS = 807 "android.settings.WIFI_SETTINGS"; 808 809 /** 810 * Activity Action: Show settings to allow configuration of Advanced memory protection. 811 * <p> 812 * Memory Tagging Extension (MTE) is a CPU extension that allows to protect against certain 813 * classes of security problems at a small runtime performance cost overhead. 814 * <p> 815 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 816 * <p> 817 * Input: Nothing. 818 * <p> 819 * Output: Nothing. 820 */ 821 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 822 public static final String ACTION_ADVANCED_MEMORY_PROTECTION_SETTINGS = 823 "android.settings.ADVANCED_MEMORY_PROTECTION_SETTINGS"; 824 825 /** 826 * Activity Action: Show settings to allow configuration of a static IP 827 * address for Wi-Fi. 828 * <p> 829 * In some cases, a matching Activity may not exist, so ensure you safeguard 830 * against this. 831 * <p> 832 * Input: Nothing. 833 * <p> 834 * Output: Nothing. 835 */ 836 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 837 public static final String ACTION_WIFI_IP_SETTINGS = 838 "android.settings.WIFI_IP_SETTINGS"; 839 840 /** 841 * Activity Action: Show setting page to process a Wi-Fi Easy Connect (aka DPP) URI and start 842 * configuration. This intent should be used when you want to use this device to take on the 843 * configurator role for an IoT/other device. When provided with a valid DPP URI 844 * string, Settings will open a Wi-Fi selection screen for the user to indicate which network 845 * they would like to configure the device specified in the DPP URI string and 846 * carry them through the rest of the flow for provisioning the device. 847 * <p> 848 * In some cases, a matching Activity may not exist, so ensure to safeguard against this by 849 * checking {@link WifiManager#isEasyConnectSupported()}. 850 * <p> 851 * Input: The Intent's data URI specifies bootstrapping information for authenticating and 852 * provisioning the peer, and uses a "DPP" scheme. The URI should be attached to the intent 853 * using {@link Intent#setData(Uri)}. The calling app can obtain a DPP URI in any 854 * way, e.g. by scanning a QR code or other out-of-band methods. The calling app may also 855 * attach the {@link #EXTRA_EASY_CONNECT_BAND_LIST} extra to provide information 856 * about the bands supported by the enrollee device. 857 * <p> 858 * Output: After calling {@link android.app.Activity#startActivityForResult}, the callback 859 * {@code onActivityResult} will have resultCode {@link android.app.Activity#RESULT_OK} if 860 * the Wi-Fi Easy Connect configuration succeeded and the user tapped the 'Done' button, or 861 * {@link android.app.Activity#RESULT_CANCELED} if the operation failed and user tapped the 862 * 'Cancel' button. In case the operation has failed, a status code from 863 * {@link android.net.wifi.EasyConnectStatusCallback} {@code EASY_CONNECT_EVENT_FAILURE_*} will 864 * be returned as an Extra {@link #EXTRA_EASY_CONNECT_ERROR_CODE}. Easy Connect R2 865 * Enrollees report additional details about the error they encountered, which will be 866 * provided in the {@link #EXTRA_EASY_CONNECT_ATTEMPTED_SSID}, 867 * {@link #EXTRA_EASY_CONNECT_CHANNEL_LIST}, and {@link #EXTRA_EASY_CONNECT_BAND_LIST}. 868 */ 869 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 870 public static final String ACTION_PROCESS_WIFI_EASY_CONNECT_URI = 871 "android.settings.PROCESS_WIFI_EASY_CONNECT_URI"; 872 873 /** 874 * Activity Extra: The Easy Connect operation error code 875 * <p> 876 * An extra returned on the result intent received when using the 877 * {@link #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation. 878 * This extra contains the integer error code of the operation - one of 879 * {@link android.net.wifi.EasyConnectStatusCallback} {@code EASY_CONNECT_EVENT_FAILURE_*}. If 880 * there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK}, 881 * then this extra is not attached to the result intent. 882 * <p> 883 * Use the {@link Intent#hasExtra(String)} to determine whether the extra is attached and 884 * {@link Intent#getIntExtra(String, int)} to obtain the error code data. 885 */ 886 public static final String EXTRA_EASY_CONNECT_ERROR_CODE = 887 "android.provider.extra.EASY_CONNECT_ERROR_CODE"; 888 889 /** 890 * Activity Extra: The SSID that the Enrollee tried to connect to. 891 * <p> 892 * An extra returned on the result intent received when using the {@link 893 * #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation. This 894 * extra contains the SSID of the Access Point that the remote Enrollee tried to connect to. 895 * This value is populated only by remote R2 devices, and only for the following error codes: 896 * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK} 897 * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION}. 898 * Therefore, always check if this extra is available using {@link Intent#hasExtra(String)}. If 899 * there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK}, then 900 * this extra is not attached to the result intent. 901 * <p> 902 * Use the {@link Intent#getStringExtra(String)} to obtain the SSID. 903 */ 904 public static final String EXTRA_EASY_CONNECT_ATTEMPTED_SSID = 905 "android.provider.extra.EASY_CONNECT_ATTEMPTED_SSID"; 906 907 /** 908 * Activity Extra: The Channel List that the Enrollee used to scan a network. 909 * <p> 910 * An extra returned on the result intent received when using the {@link 911 * #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation. This 912 * extra contains the channel list that the Enrollee scanned for a network. This value is 913 * populated only by remote R2 devices, and only for the following error code: {@link 914 * android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK}. 915 * Therefore, always check if this extra is available using {@link Intent#hasExtra(String)}. If 916 * there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK}, then 917 * this extra is not attached to the result intent. The list is JSON formatted, as an array 918 * (Wi-Fi global operating classes) of arrays (Wi-Fi channels). 919 * <p> 920 * Use the {@link Intent#getStringExtra(String)} to obtain the list. 921 */ 922 public static final String EXTRA_EASY_CONNECT_CHANNEL_LIST = 923 "android.provider.extra.EASY_CONNECT_CHANNEL_LIST"; 924 925 /** 926 * Activity Extra: The Band List that the Enrollee supports. 927 * <p> 928 * This extra contains the bands the Enrollee supports, expressed as the Global Operating 929 * Class, see Table E-4 in IEEE Std 802.11-2016 Global operating classes. It is used both as 930 * input, to configure the Easy Connect operation and as output of the operation. 931 * <p> 932 * As input: an optional extra to be attached to the 933 * {@link #ACTION_PROCESS_WIFI_EASY_CONNECT_URI}. If attached, it indicates the bands which 934 * the remote device (enrollee, device-to-be-configured) supports. The Settings operation 935 * may take this into account when presenting the user with list of networks configurations 936 * to be used. The calling app may obtain this information in any out-of-band method. The 937 * information should be attached as an array of raw integers - using the 938 * {@link Intent#putExtra(String, int[])}. 939 * <p> 940 * As output: an extra returned on the result intent received when using the 941 * {@link #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation 942 * . This value is populated only by remote R2 devices, and only for the following error 943 * codes: 944 * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK}, 945 * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION}, 946 * or 947 * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_ENROLLEE_REJECTED_CONFIGURATION}. 948 * Therefore, always check if this extra is available using {@link Intent#hasExtra(String)}. 949 * If there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK} 950 * , then this extra is not attached to the result intent. 951 * <p> 952 * Use the {@link Intent#getIntArrayExtra(String)} to obtain the list. 953 */ 954 public static final String EXTRA_EASY_CONNECT_BAND_LIST = 955 "android.provider.extra.EASY_CONNECT_BAND_LIST"; 956 957 /** 958 * Activity Action: Show settings to allow configuration of data and view data usage. 959 * <p> 960 * In some cases, a matching Activity may not exist, so ensure you 961 * safeguard against this. 962 * <p> 963 * Input: Nothing. 964 * <p> 965 * Output: Nothing. 966 */ 967 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 968 public static final String ACTION_DATA_USAGE_SETTINGS = 969 "android.settings.DATA_USAGE_SETTINGS"; 970 971 /** 972 * Activity Action: Show settings to allow configuration of Bluetooth. 973 * <p> 974 * In some cases, a matching Activity may not exist, so ensure you 975 * safeguard against this. 976 * <p> 977 * Input: Nothing. 978 * <p> 979 * Output: Nothing. 980 */ 981 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 982 public static final String ACTION_BLUETOOTH_SETTINGS = 983 "android.settings.BLUETOOTH_SETTINGS"; 984 985 /** 986 * Activity Action: Show settings to allow configuration of Hearing Devices. 987 * <p> 988 * In some cases, a matching Activity may not exist, so ensure you 989 * safeguard against this. 990 * <p> 991 * Input: Nothing. 992 * <p> 993 * Output: Nothing. 994 * @hide 995 */ 996 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 997 public static final String ACTION_HEARING_DEVICES_SETTINGS = 998 "android.settings.HEARING_DEVICES_SETTINGS"; 999 1000 /** 1001 * Activity action: Show Settings app search UI when this action is available for device. 1002 * <p> 1003 * Input: Nothing. 1004 * <p> 1005 * Output: Nothing. 1006 */ 1007 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1008 public static final String ACTION_APP_SEARCH_SETTINGS = "android.settings.APP_SEARCH_SETTINGS"; 1009 1010 /** 1011 * Activity Action: Show settings to allow configuration of Assist Gesture. 1012 * <p> 1013 * In some cases, a matching Activity may not exist, so ensure you 1014 * safeguard against this. 1015 * <p> 1016 * Input: Nothing. 1017 * <p> 1018 * Output: Nothing. 1019 * @hide 1020 */ 1021 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1022 public static final String ACTION_ASSIST_GESTURE_SETTINGS = 1023 "android.settings.ASSIST_GESTURE_SETTINGS"; 1024 1025 /** 1026 * Activity Action: Show settings to enroll fingerprints, and setup PIN/Pattern/Pass if 1027 * necessary. 1028 * @deprecated See {@link #ACTION_BIOMETRIC_ENROLL}. 1029 * <p> 1030 * Input: Nothing. 1031 * <p> 1032 * Output: Nothing. 1033 */ 1034 @Deprecated 1035 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1036 public static final String ACTION_FINGERPRINT_ENROLL = 1037 "android.settings.FINGERPRINT_ENROLL"; 1038 1039 /** 1040 * Activity Action: Show settings to enroll biometrics, and setup PIN/Pattern/Pass if 1041 * necessary. By default, this prompts the user to enroll biometrics with strength 1042 * Weak or above, as defined by the CDD. Only biometrics that meet or exceed Strong, as defined 1043 * in the CDD are allowed to participate in Keystore operations. 1044 * <p> 1045 * Input: extras {@link #EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED} as an integer, with 1046 * constants defined in {@link android.hardware.biometrics.BiometricManager.Authenticators}, 1047 * e.g. {@link android.hardware.biometrics.BiometricManager.Authenticators#BIOMETRIC_STRONG}. 1048 * If not specified, the default behavior is 1049 * {@link android.hardware.biometrics.BiometricManager.Authenticators#BIOMETRIC_WEAK}. 1050 * <p> 1051 * Output: Nothing. Note that callers should still check 1052 * {@link android.hardware.biometrics.BiometricManager#canAuthenticate(int)} 1053 * afterwards to ensure that the user actually completed enrollment. 1054 */ 1055 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1056 public static final String ACTION_BIOMETRIC_ENROLL = 1057 "android.settings.BIOMETRIC_ENROLL"; 1058 1059 /** 1060 * Activity Extra: The minimum strength to request enrollment for. 1061 * <p> 1062 * This can be passed as an extra field to the {@link #ACTION_BIOMETRIC_ENROLL} intent to 1063 * indicate that only enrollment for sensors that meet these requirements should be shown. The 1064 * value should be a combination of the constants defined in 1065 * {@link android.hardware.biometrics.BiometricManager.Authenticators}. 1066 */ 1067 public static final String EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED = 1068 "android.provider.extra.BIOMETRIC_AUTHENTICATORS_ALLOWED"; 1069 1070 /** 1071 * Activity Action: Show settings to allow configuration of cast endpoints. 1072 * <p> 1073 * In some cases, a matching Activity may not exist, so ensure you 1074 * safeguard against this. 1075 * <p> 1076 * Input: Nothing. 1077 * <p> 1078 * Output: Nothing. 1079 */ 1080 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1081 public static final String ACTION_CAST_SETTINGS = 1082 "android.settings.CAST_SETTINGS"; 1083 1084 /** 1085 * Activity Action: Show settings to allow configuration of date and time. 1086 * <p> 1087 * In some cases, a matching Activity may not exist, so ensure you 1088 * safeguard against this. 1089 * <p> 1090 * Input: Nothing. 1091 * <p> 1092 * Output: Nothing. 1093 */ 1094 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1095 public static final String ACTION_DATE_SETTINGS = 1096 "android.settings.DATE_SETTINGS"; 1097 1098 /** 1099 * Activity Action: Show settings to allow configuration of sound and volume. 1100 * <p> 1101 * In some cases, a matching Activity may not exist, so ensure you 1102 * safeguard against this. 1103 * <p> 1104 * Input: Nothing. 1105 * <p> 1106 * Output: Nothing. 1107 */ 1108 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1109 public static final String ACTION_SOUND_SETTINGS = 1110 "android.settings.SOUND_SETTINGS"; 1111 1112 /** 1113 * Activity Action: Show settings to allow configuration of display. 1114 * <p> 1115 * In some cases, a matching Activity may not exist, so ensure you 1116 * safeguard against this. 1117 * <p> 1118 * Input: Nothing. 1119 * <p> 1120 * Output: Nothing. 1121 */ 1122 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1123 public static final String ACTION_DISPLAY_SETTINGS = 1124 "android.settings.DISPLAY_SETTINGS"; 1125 1126 /** 1127 * Activity Action: Show Auto Rotate configuration settings. 1128 */ 1129 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1130 public static final String ACTION_AUTO_ROTATE_SETTINGS = 1131 "android.settings.AUTO_ROTATE_SETTINGS"; 1132 1133 /** 1134 * Activity Action: Show settings to allow configuration of Night display. 1135 * <p> 1136 * In some cases, a matching Activity may not exist, so ensure you 1137 * safeguard against this. 1138 * <p> 1139 * Input: Nothing. 1140 * <p> 1141 * Output: Nothing. 1142 */ 1143 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1144 public static final String ACTION_NIGHT_DISPLAY_SETTINGS = 1145 "android.settings.NIGHT_DISPLAY_SETTINGS"; 1146 1147 /** 1148 * Activity Action: Show settings to allow configuration of Dark theme. 1149 * <p> 1150 * In some cases, a matching Activity may not exist, so ensure you 1151 * safeguard against this. 1152 * <p> 1153 * Input: Nothing. 1154 * <p> 1155 * Output: Nothing. 1156 * 1157 * @hide 1158 */ 1159 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1160 public static final String ACTION_DARK_THEME_SETTINGS = 1161 "android.settings.DARK_THEME_SETTINGS"; 1162 1163 /** 1164 * Activity Action: Show settings to allow configuration of locale. 1165 * <p> 1166 * In some cases, a matching Activity may not exist, so ensure you 1167 * safeguard against this. 1168 * <p> 1169 * Input: The optional {@code #EXTRA_EXPLICIT_LOCALES} with language tags that contains locales 1170 * to limit available locales. This is only supported when device is under demo mode. 1171 * If intent does not contain this extra, it will show system supported locale list. 1172 * <br/> 1173 * If {@code #EXTRA_EXPLICIT_LOCALES} contain a unsupported locale, it will still show this 1174 * locale on list, but may not be supported by the devcie. 1175 * 1176 * Output: Nothing. 1177 */ 1178 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1179 public static final String ACTION_LOCALE_SETTINGS = 1180 "android.settings.LOCALE_SETTINGS"; 1181 1182 /** 1183 * Activity Extra: Show explicit locales in launched locale picker activity. 1184 * 1185 * This can be passed as an extra field in an Activity Intent with one or more language tags 1186 * as a {@link LocaleList}. This must be passed as an extra field to the 1187 * {@link #ACTION_LOCALE_SETTINGS}. 1188 * 1189 * @hide 1190 */ 1191 public static final String EXTRA_EXPLICIT_LOCALES = 1192 "android.provider.extra.EXPLICIT_LOCALES"; 1193 1194 /** 1195 * Activity Action: Show settings to allow configuration of per application locale. 1196 * <p> 1197 * Input: The Intent's data URI can specify the application package name to directly invoke the 1198 * app locale details GUI specific to the package name. 1199 * For example "package:com.my.app". 1200 * <p> 1201 * Output: Nothing. 1202 */ 1203 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1204 public static final String ACTION_APP_LOCALE_SETTINGS = 1205 "android.settings.APP_LOCALE_SETTINGS"; 1206 1207 /** 1208 * Activity Action: Show settings to allow configuration of regional preferences 1209 * <p> 1210 * Input: Nothing 1211 * <p> 1212 * Output: Nothing. 1213 */ 1214 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1215 public static final String ACTION_REGIONAL_PREFERENCES_SETTINGS = 1216 "android.settings.REGIONAL_PREFERENCES_SETTINGS"; 1217 1218 /** 1219 * Activity Action: Show settings to allow configuration of lockscreen. 1220 * <p> 1221 * In some cases, a matching Activity may not exist, so ensure you 1222 * safeguard against this. 1223 * <p> 1224 * Input: Nothing. 1225 * <p> 1226 * Output: Nothing. 1227 * 1228 * @hide 1229 */ 1230 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1231 public static final String ACTION_LOCKSCREEN_SETTINGS = "android.settings.LOCK_SCREEN_SETTINGS"; 1232 1233 /** 1234 * Activity Action: Show settings to allow pairing bluetooth devices. 1235 * <p> 1236 * In some cases, a matching Activity may not exist, so ensure you 1237 * safeguard against this. 1238 * <p> 1239 * Input: Nothing. 1240 * <p> 1241 * Output: Nothing. 1242 * 1243 * @hide 1244 */ 1245 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1246 public static final String ACTION_BLUETOOTH_PAIRING_SETTINGS = 1247 "android.settings.BLUETOOTH_PAIRING_SETTINGS"; 1248 1249 /** 1250 * Activity Action: Show settings to allow pairing hearing devices. 1251 * <p> 1252 * In some cases, a matching Activity may not exist, so ensure you 1253 * safeguard against this. 1254 * <p> 1255 * Input: Nothing. 1256 * <p> 1257 * Output: Nothing. 1258 * 1259 * @hide 1260 */ 1261 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1262 public static final String ACTION_HEARING_DEVICE_PAIRING_SETTINGS = 1263 "android.settings.HEARING_DEVICES_PAIRING_SETTINGS"; 1264 1265 /** 1266 * Activity Action: Show settings to configure input methods, in particular 1267 * allowing the user to enable input methods. 1268 * <p> 1269 * In some cases, a matching Activity may not exist, so ensure you 1270 * safeguard against this. 1271 * <p> 1272 * Input: Nothing. 1273 * <p> 1274 * Output: Nothing. 1275 */ 1276 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1277 public static final String ACTION_VOICE_INPUT_SETTINGS = 1278 "android.settings.VOICE_INPUT_SETTINGS"; 1279 1280 /** 1281 * Activity Action: Show settings to configure input methods, in particular 1282 * allowing the user to enable input methods. 1283 * <p> 1284 * In some cases, a matching Activity may not exist, so ensure you 1285 * safeguard against this. 1286 * <p> 1287 * Input: Nothing. 1288 * <p> 1289 * Output: Nothing. 1290 */ 1291 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1292 public static final String ACTION_INPUT_METHOD_SETTINGS = 1293 "android.settings.INPUT_METHOD_SETTINGS"; 1294 1295 /** 1296 * Activity Action: Show settings to enable/disable input method subtypes. 1297 * <p> 1298 * In some cases, a matching Activity may not exist, so ensure you 1299 * safeguard against this. 1300 * <p> 1301 * To tell which input method's subtypes are displayed in the settings, add 1302 * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id. 1303 * If there is no extra in this Intent, subtypes from all installed input methods 1304 * will be displayed in the settings. 1305 * 1306 * @see android.view.inputmethod.InputMethodInfo#getId 1307 * <p> 1308 * Input: Nothing. 1309 * <p> 1310 * Output: Nothing. 1311 */ 1312 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1313 public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS = 1314 "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS"; 1315 1316 /** 1317 * Activity Action: Show settings to manage the user input dictionary. 1318 * <p> 1319 * Starting with {@link android.os.Build.VERSION_CODES#KITKAT}, 1320 * it is guaranteed there will always be an appropriate implementation for this Intent action. 1321 * In prior releases of the platform this was optional, so ensure you safeguard against it. 1322 * <p> 1323 * Input: Nothing. 1324 * <p> 1325 * Output: Nothing. 1326 */ 1327 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1328 public static final String ACTION_USER_DICTIONARY_SETTINGS = 1329 "android.settings.USER_DICTIONARY_SETTINGS"; 1330 1331 /** 1332 * Activity Action: Show settings to configure the hardware keyboard. 1333 * <p> 1334 * In some cases, a matching Activity may not exist, so ensure you 1335 * safeguard against this. 1336 * <p> 1337 * Input: Nothing. 1338 * <p> 1339 * Output: Nothing. 1340 */ 1341 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1342 public static final String ACTION_HARD_KEYBOARD_SETTINGS = 1343 "android.settings.HARD_KEYBOARD_SETTINGS"; 1344 1345 /** 1346 * Activity Action: Adds a word to the user dictionary. 1347 * <p> 1348 * In some cases, a matching Activity may not exist, so ensure you 1349 * safeguard against this. 1350 * <p> 1351 * Input: An extra with key <code>word</code> that contains the word 1352 * that should be added to the dictionary. 1353 * <p> 1354 * Output: Nothing. 1355 * 1356 * @hide 1357 */ 1358 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1359 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 1360 public static final String ACTION_USER_DICTIONARY_INSERT = 1361 "com.android.settings.USER_DICTIONARY_INSERT"; 1362 1363 /** 1364 * Activity Action: Show settings to allow configuration of application-related settings. 1365 * <p> 1366 * In some cases, a matching Activity may not exist, so ensure you 1367 * safeguard against this. 1368 * <p> 1369 * Input: Nothing. 1370 * <p> 1371 * Output: Nothing. 1372 */ 1373 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1374 public static final String ACTION_APPLICATION_SETTINGS = 1375 "android.settings.APPLICATION_SETTINGS"; 1376 1377 /** 1378 * Activity Action: Show settings to allow configuration of application 1379 * development-related settings. As of 1380 * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is 1381 * a required part of the platform. 1382 * <p> 1383 * Input: Nothing. 1384 * <p> 1385 * Output: Nothing. 1386 */ 1387 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1388 public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS = 1389 "android.settings.APPLICATION_DEVELOPMENT_SETTINGS"; 1390 1391 /** 1392 * Activity Action: Show settings to allow configuration of quick launch shortcuts. 1393 * <p> 1394 * In some cases, a matching Activity may not exist, so ensure you 1395 * safeguard against this. 1396 * <p> 1397 * Input: Nothing. 1398 * <p> 1399 * Output: Nothing. 1400 */ 1401 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1402 public static final String ACTION_QUICK_LAUNCH_SETTINGS = 1403 "android.settings.QUICK_LAUNCH_SETTINGS"; 1404 1405 /** 1406 * Activity Action: Show settings to manage installed applications. 1407 * <p> 1408 * In some cases, a matching Activity may not exist, so ensure you 1409 * safeguard against this. 1410 * <p> 1411 * Input: Nothing. 1412 * <p> 1413 * Output: Nothing. 1414 */ 1415 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1416 public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS = 1417 "android.settings.MANAGE_APPLICATIONS_SETTINGS"; 1418 1419 /** 1420 * Activity Action: Show settings to manage all applications. 1421 * <p> 1422 * In some cases, a matching Activity may not exist, so ensure you 1423 * safeguard against this. 1424 * <p> 1425 * Input: Nothing. 1426 * <p> 1427 * Output: Nothing. 1428 */ 1429 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1430 public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS = 1431 "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS"; 1432 1433 /** 1434 * Activity Action: Show settings to manage all SIM profiles. 1435 * <p> 1436 * In some cases, a matching Activity may not exist, so ensure you 1437 * safeguard against this. 1438 * <p> 1439 * Input: Nothing. 1440 * <p> 1441 * Output: Nothing. 1442 */ 1443 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1444 public static final String ACTION_MANAGE_ALL_SIM_PROFILES_SETTINGS = 1445 "android.settings.MANAGE_ALL_SIM_PROFILES_SETTINGS"; 1446 1447 /** 1448 * Activity Action: Show screen for controlling which apps can draw on top of other apps. 1449 * <p> 1450 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 1451 * <p> 1452 * Input: Optionally, in versions of Android prior to {@link android.os.Build.VERSION_CODES#R}, 1453 * the Intent's data URI can specify the application package name to directly invoke the 1454 * management GUI specific to the package name. 1455 * For example "package:com.my.app". 1456 * <p> 1457 * Output: Nothing. 1458 */ 1459 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1460 public static final String ACTION_MANAGE_OVERLAY_PERMISSION = 1461 "android.settings.action.MANAGE_OVERLAY_PERMISSION"; 1462 1463 /** 1464 * Activity Action: Show screen for controlling if the app specified in the data URI of the 1465 * intent can draw on top of other apps. 1466 * <p> 1467 * Unlike {@link #ACTION_MANAGE_OVERLAY_PERMISSION}, which in Android {@link 1468 * android.os.Build.VERSION_CODES#R} can't be used to show a GUI for a specific package, 1469 * permission {@code android.permission.INTERNAL_SYSTEM_WINDOW} is needed to start an activity 1470 * with this intent. 1471 * <p> 1472 * In some cases, a matching Activity may not exist, so ensure you 1473 * safeguard against this. 1474 * <p> 1475 * Input: The Intent's data URI MUST specify the application package name whose ability of 1476 * drawing on top of other apps you want to control. 1477 * For example "package:com.my.app". 1478 * <p> 1479 * Output: Nothing. 1480 * 1481 * @hide 1482 */ 1483 @SystemApi 1484 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1485 public static final String ACTION_MANAGE_APP_OVERLAY_PERMISSION = 1486 "android.settings.MANAGE_APP_OVERLAY_PERMISSION"; 1487 1488 /** 1489 * Activity Action: Show screen for controlling which apps are allowed to write/modify 1490 * system settings. 1491 * <p> 1492 * In some cases, a matching Activity may not exist, so ensure you 1493 * safeguard against this. 1494 * <p> 1495 * Input: Optionally, the Intent's data URI can specify the application package name to 1496 * directly invoke the management GUI specific to the package name. For example 1497 * "package:com.my.app". 1498 * <p> 1499 * Output: Nothing. 1500 */ 1501 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1502 public static final String ACTION_MANAGE_WRITE_SETTINGS = 1503 "android.settings.action.MANAGE_WRITE_SETTINGS"; 1504 1505 /** 1506 * Activity Action: Show screen for controlling app usage properties for an app. 1507 * Input: Intent's extra {@link android.content.Intent#EXTRA_PACKAGE_NAME} must specify the 1508 * application package name. 1509 * Output: Nothing. 1510 */ 1511 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1512 public static final String ACTION_APP_USAGE_SETTINGS = 1513 "android.settings.action.APP_USAGE_SETTINGS"; 1514 1515 /** 1516 * Activity Action: Show screen of details about a particular application. 1517 * <p> 1518 * In some cases, a matching Activity may not exist, so ensure you 1519 * safeguard against this. 1520 * <p> 1521 * Input: The Intent's data URI specifies the application package name 1522 * to be shown, with the "package" scheme. That is "package:com.my.app". 1523 * <p> 1524 * Output: Nothing. 1525 */ 1526 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1527 public static final String ACTION_APPLICATION_DETAILS_SETTINGS = 1528 "android.settings.APPLICATION_DETAILS_SETTINGS"; 1529 1530 /** 1531 * Activity Action: Show list of applications that have been running 1532 * foreground services (to the user "running in the background"). 1533 * <p> 1534 * Input: Extras "packages" is a string array of package names. 1535 * <p> 1536 * Output: Nothing. 1537 * @hide 1538 */ 1539 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1540 public static final String ACTION_FOREGROUND_SERVICES_SETTINGS = 1541 "android.settings.FOREGROUND_SERVICES_SETTINGS"; 1542 1543 /** 1544 * Activity Action: Show screen for controlling which apps can ignore battery optimizations. 1545 * <p> 1546 * Input: Nothing. 1547 * <p> 1548 * Output: Nothing. 1549 * <p> 1550 * You can use {@link android.os.PowerManager#isIgnoringBatteryOptimizations 1551 * PowerManager.isIgnoringBatteryOptimizations()} to determine if an application is 1552 * already ignoring optimizations. You can use 1553 * {@link #ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS} to ask the user to put you 1554 * on this list. 1555 */ 1556 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1557 public static final String ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS = 1558 "android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS"; 1559 1560 /** 1561 * Activity Action: Ask the user to allow an app to ignore battery optimizations (that is, 1562 * put them on the allowlist of apps shown by 1563 * {@link #ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS}). For an app to use this, it also 1564 * must hold the {@link android.Manifest.permission#REQUEST_IGNORE_BATTERY_OPTIMIZATIONS} 1565 * permission. 1566 * <p><b>Note:</b> most applications should <em>not</em> use this; there are many facilities 1567 * provided by the platform for applications to operate correctly in the various power 1568 * saving modes. This is only for unusual applications that need to deeply control their own 1569 * execution, at the potential expense of the user's battery life. Note that these applications 1570 * greatly run the risk of showing to the user as high power consumers on their device.</p> 1571 * <p> 1572 * Input: The Intent's data URI must specify the application package name 1573 * to be shown, with the "package" scheme. That is "package:com.my.app". 1574 * <p> 1575 * Output: Nothing. 1576 * <p> 1577 * You can use {@link android.os.PowerManager#isIgnoringBatteryOptimizations 1578 * PowerManager.isIgnoringBatteryOptimizations()} to determine if an application is 1579 * already ignoring optimizations. 1580 */ 1581 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1582 public static final String ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = 1583 "android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"; 1584 1585 /** 1586 * Activity Action: Open the advanced power usage details page of an associated app. 1587 * <p> 1588 * Input: Intent's data URI set with an application name, using the 1589 * "package" schema (like "package:com.my.app") 1590 * <p> 1591 * Output: Nothing. 1592 * 1593 * @hide 1594 */ 1595 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1596 public static final String ACTION_VIEW_ADVANCED_POWER_USAGE_DETAIL = 1597 "android.settings.VIEW_ADVANCED_POWER_USAGE_DETAIL"; 1598 1599 /** 1600 * Activity Action: Show screen for controlling background data 1601 * restrictions for a particular application. 1602 * <p> 1603 * Input: Intent's data URI set with an application name, using the 1604 * "package" schema (like "package:com.my.app"). 1605 * 1606 * <p> 1607 * Output: Nothing. 1608 * <p> 1609 * Applications can also use {@link android.net.ConnectivityManager#getRestrictBackgroundStatus 1610 * ConnectivityManager#getRestrictBackgroundStatus()} to determine the 1611 * status of the background data restrictions for them. 1612 * 1613 * <p class="note"> 1614 * In some cases, a matching Activity may not exist, so ensure you 1615 * safeguard against this. 1616 */ 1617 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1618 public static final String ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS = 1619 "android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS"; 1620 1621 /** 1622 * @hide 1623 * Activity Action: Show the "app ops" settings screen. 1624 * <p> 1625 * Input: Nothing. 1626 * <p> 1627 * Output: Nothing. 1628 */ 1629 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1630 public static final String ACTION_APP_OPS_SETTINGS = 1631 "android.settings.APP_OPS_SETTINGS"; 1632 1633 /** 1634 * Activity Action: Show settings for system update functionality. 1635 * <p> 1636 * In some cases, a matching Activity may not exist, so ensure you 1637 * safeguard against this. 1638 * <p> 1639 * Input: Nothing. 1640 * <p> 1641 * Output: Nothing. 1642 * 1643 * @hide 1644 */ 1645 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1646 public static final String ACTION_SYSTEM_UPDATE_SETTINGS = 1647 "android.settings.SYSTEM_UPDATE_SETTINGS"; 1648 1649 /** 1650 * Activity Action: Show settings for managed profile settings. 1651 * <p> 1652 * In some cases, a matching Activity may not exist, so ensure you 1653 * safeguard against this. 1654 * <p> 1655 * Input: Nothing. 1656 * <p> 1657 * Output: Nothing. 1658 * 1659 * @hide 1660 */ 1661 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1662 public static final String ACTION_MANAGED_PROFILE_SETTINGS = 1663 "android.settings.MANAGED_PROFILE_SETTINGS"; 1664 1665 /** 1666 * Activity Action: Show settings to allow configuration of sync settings. 1667 * <p> 1668 * In some cases, a matching Activity may not exist, so ensure you 1669 * safeguard against this. 1670 * <p> 1671 * The account types available to add via the add account button may be restricted by adding an 1672 * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's 1673 * authorities. Only account types which can sync with that content provider will be offered to 1674 * the user. 1675 * <p> 1676 * Input: Nothing. 1677 * <p> 1678 * Output: Nothing. 1679 */ 1680 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1681 public static final String ACTION_SYNC_SETTINGS = 1682 "android.settings.SYNC_SETTINGS"; 1683 1684 /** 1685 * Activity Action: Show add account screen for creating a new account. 1686 * <p> 1687 * In some cases, a matching Activity may not exist, so ensure you 1688 * safeguard against this. 1689 * <p> 1690 * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES} 1691 * extra to the Intent with one or more syncable content provider's authorities. Only account 1692 * types which can sync with that content provider will be offered to the user. 1693 * <p> 1694 * Account types can also be filtered by adding an {@link #EXTRA_ACCOUNT_TYPES} extra to the 1695 * Intent with one or more account types. 1696 * <p> 1697 * Input: Nothing. 1698 * <p> 1699 * Output: Nothing. 1700 */ 1701 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1702 public static final String ACTION_ADD_ACCOUNT = 1703 "android.settings.ADD_ACCOUNT_SETTINGS"; 1704 1705 /** 1706 * Activity Action: Show settings for enabling or disabling data saver 1707 * <p></p> 1708 * In some cases, a matching Activity may not exist, so ensure you 1709 * safeguard against this. 1710 * <p> 1711 * Input: Nothing. 1712 * <p> 1713 * Output: Nothing. 1714 * 1715 * @hide 1716 */ 1717 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1718 public static final String ACTION_DATA_SAVER_SETTINGS = 1719 "android.settings.DATA_SAVER_SETTINGS"; 1720 1721 /** 1722 * Activity Action: Show settings for selecting the network operator. 1723 * <p> 1724 * In some cases, a matching Activity may not exist, so ensure you 1725 * safeguard against this. 1726 * <p> 1727 * The subscription ID of the subscription for which available network operators should be 1728 * displayed may be optionally specified with {@link #EXTRA_SUB_ID}. 1729 * <p> 1730 * Input: Nothing. 1731 * <p> 1732 * Output: Nothing. 1733 */ 1734 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1735 public static final String ACTION_NETWORK_OPERATOR_SETTINGS = 1736 "android.settings.NETWORK_OPERATOR_SETTINGS"; 1737 1738 /** 1739 * Activity Action: Show settings for selecting the network provider. 1740 * <p> 1741 * In some cases, a matching Activity may not be provided, so ensure you 1742 * safeguard against this. 1743 * <p> 1744 * Access to this preference can be customized via Settings' app. 1745 * <p> 1746 * Input: Nothing. 1747 * <p> 1748 * Output: Nothing. 1749 * 1750 * @hide 1751 */ 1752 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1753 public static final String ACTION_NETWORK_PROVIDER_SETTINGS = 1754 "android.settings.NETWORK_PROVIDER_SETTINGS"; 1755 1756 /** 1757 * Activity Action: Show settings for selection of 2G/3G. 1758 * <p> 1759 * In some cases, a matching Activity may not exist, so ensure you 1760 * safeguard against this. 1761 * <p> 1762 * Input: Nothing. 1763 * <p> 1764 * Output: Nothing. 1765 */ 1766 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1767 public static final String ACTION_DATA_ROAMING_SETTINGS = 1768 "android.settings.DATA_ROAMING_SETTINGS"; 1769 1770 /** 1771 * Activity Action: Show settings for internal storage. 1772 * <p> 1773 * In some cases, a matching Activity may not exist, so ensure you 1774 * safeguard against this. 1775 * <p> 1776 * Input: Nothing. 1777 * <p> 1778 * Output: Nothing. 1779 */ 1780 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1781 public static final String ACTION_INTERNAL_STORAGE_SETTINGS = 1782 "android.settings.INTERNAL_STORAGE_SETTINGS"; 1783 /** 1784 * Activity Action: Show settings for memory card storage. 1785 * <p> 1786 * In some cases, a matching Activity may not exist, so ensure you 1787 * safeguard against this. 1788 * <p> 1789 * Input: Nothing. 1790 * <p> 1791 * Output: Nothing. 1792 */ 1793 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1794 public static final String ACTION_MEMORY_CARD_SETTINGS = 1795 "android.settings.MEMORY_CARD_SETTINGS"; 1796 1797 /** 1798 * Activity Action: Show settings for global search. 1799 * <p> 1800 * In some cases, a matching Activity may not exist, so ensure you 1801 * safeguard against this. 1802 * <p> 1803 * Input: Nothing. 1804 * <p> 1805 * Output: Nothing 1806 */ 1807 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1808 public static final String ACTION_SEARCH_SETTINGS = 1809 "android.search.action.SEARCH_SETTINGS"; 1810 1811 /** 1812 * Activity Action: Show general device information settings (serial 1813 * number, software version, phone number, etc.). 1814 * <p> 1815 * In some cases, a matching Activity may not exist, so ensure you 1816 * safeguard against this. 1817 * <p> 1818 * Input: Nothing. 1819 * <p> 1820 * Output: Nothing 1821 */ 1822 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1823 public static final String ACTION_DEVICE_INFO_SETTINGS = 1824 "android.settings.DEVICE_INFO_SETTINGS"; 1825 1826 /** 1827 * Activity Action: Show NFC settings. 1828 * <p> 1829 * This shows UI that allows NFC to be turned on or off. 1830 * <p> 1831 * In some cases, a matching Activity may not exist, so ensure you 1832 * safeguard against this. 1833 * <p> 1834 * Input: Nothing. 1835 * <p> 1836 * Output: Nothing 1837 * @see android.nfc.NfcAdapter#isEnabled() 1838 */ 1839 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1840 public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS"; 1841 1842 /** 1843 * Activity Action: Show NFC Sharing settings. 1844 * <p> 1845 * This shows UI that allows NDEF Push (Android Beam) to be turned on or 1846 * off. 1847 * <p> 1848 * In some cases, a matching Activity may not exist, so ensure you 1849 * safeguard against this. 1850 * <p> 1851 * Input: Nothing. 1852 * <p> 1853 * Output: Nothing 1854 */ 1855 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1856 public static final String ACTION_NFCSHARING_SETTINGS = 1857 "android.settings.NFCSHARING_SETTINGS"; 1858 1859 /** 1860 * Activity Action: Show NFC Tap & Pay settings 1861 * <p> 1862 * This shows UI that allows the user to configure Tap&Pay 1863 * settings. 1864 * <p> 1865 * In some cases, a matching Activity may not exist, so ensure you 1866 * safeguard against this. 1867 * <p> 1868 * Input: Nothing. 1869 * <p> 1870 * Output: Nothing 1871 */ 1872 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1873 public static final String ACTION_NFC_PAYMENT_SETTINGS = 1874 "android.settings.NFC_PAYMENT_SETTINGS"; 1875 1876 /** 1877 * Activity Action: Show Daydream settings. 1878 * <p> 1879 * In some cases, a matching Activity may not exist, so ensure you 1880 * safeguard against this. 1881 * <p> 1882 * Input: Nothing. 1883 * <p> 1884 * Output: Nothing. 1885 * @see android.service.dreams.DreamService 1886 */ 1887 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1888 public static final String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS"; 1889 1890 /** 1891 * Activity Action: Show Communal settings. 1892 * <p> 1893 * In some cases, a matching Activity may not exist, so ensure you 1894 * safeguard against this. 1895 * <p> 1896 * Input: Nothing. 1897 * <p> 1898 * Output: Nothing. 1899 * 1900 * @hide 1901 */ 1902 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1903 public static final String ACTION_COMMUNAL_SETTING = "android.settings.COMMUNAL_SETTINGS"; 1904 1905 /** 1906 * Activity Action: Show Notification assistant settings. 1907 * <p> 1908 * In some cases, a matching Activity may not exist, so ensure you 1909 * safeguard against this. 1910 * <p> 1911 * Input: Nothing. 1912 * <p> 1913 * Output: Nothing. 1914 */ 1915 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1916 public static final String ACTION_NOTIFICATION_ASSISTANT_SETTINGS = 1917 "android.settings.NOTIFICATION_ASSISTANT_SETTINGS"; 1918 1919 /** 1920 * Activity Action: Show Notification listener settings. 1921 * <p> 1922 * In some cases, a matching Activity may not exist, so ensure you 1923 * safeguard against this. 1924 * <p> 1925 * Input: Nothing. 1926 * <p> 1927 * Output: Nothing. 1928 * @see android.service.notification.NotificationListenerService 1929 */ 1930 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1931 public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS 1932 = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"; 1933 1934 /** 1935 * Activity Action: Show notification listener permission settings page for app. 1936 * <p> 1937 * Users can grant and deny access to notifications for a {@link ComponentName} from here. 1938 * See 1939 * {@link android.app.NotificationManager#isNotificationListenerAccessGranted(ComponentName)} 1940 * for more details. 1941 * <p> 1942 * Input: The extra {@link #EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME} containing the name 1943 * of the component to grant or revoke notification listener access to. 1944 * <p> 1945 * Output: Nothing. 1946 */ 1947 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1948 public static final String ACTION_NOTIFICATION_LISTENER_DETAIL_SETTINGS = 1949 "android.settings.NOTIFICATION_LISTENER_DETAIL_SETTINGS"; 1950 1951 /** 1952 * Activity Extra: What component name to show the notification listener permission 1953 * page for. 1954 * <p> 1955 * A string extra containing a {@link ComponentName}. This must be passed as an extra field to 1956 * {@link #ACTION_NOTIFICATION_LISTENER_DETAIL_SETTINGS}. 1957 */ 1958 public static final String EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME = 1959 "android.provider.extra.NOTIFICATION_LISTENER_COMPONENT_NAME"; 1960 1961 /** 1962 * Activity Action: Show Do Not Disturb access settings. 1963 * <p> 1964 * Users can grant and deny access to Do Not Disturb configuration from here. Managed 1965 * profiles cannot grant Do Not Disturb access. 1966 * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more 1967 * details. 1968 * <p> 1969 * Input: Nothing. 1970 * <p> 1971 * Output: Nothing. 1972 * 1973 * <p class="note"> 1974 * In some cases, a matching Activity may not exist, so ensure you 1975 * safeguard against this. 1976 */ 1977 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1978 public static final String ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS 1979 = "android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS"; 1980 1981 /** 1982 * Activity Action: Show do not disturb setting page for app. 1983 * <p> 1984 * Users can grant and deny access to Do Not Disturb configuration for an app from here. 1985 * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more 1986 * details. 1987 * <p> 1988 * Input: Intent's data URI set with an application name, using the 1989 * "package" schema (like "package:com.my.app"). 1990 * <p> 1991 * Output: Nothing. 1992 * 1993 * @hide 1994 */ 1995 @SystemApi 1996 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 1997 public static final String ACTION_NOTIFICATION_POLICY_ACCESS_DETAIL_SETTINGS = 1998 "android.settings.NOTIFICATION_POLICY_ACCESS_DETAIL_SETTINGS"; 1999 2000 /** 2001 * Activity Action: Show the automatic do not disturb rule listing page 2002 * <p> 2003 * Users can add, enable, disable, and remove automatic do not disturb rules from this 2004 * screen. See {@link NotificationManager#addAutomaticZenRule(AutomaticZenRule)} for more 2005 * details. 2006 * </p> 2007 * <p> 2008 * Input: Nothing 2009 * Output: Nothing 2010 * </p> 2011 * 2012 */ 2013 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2014 public static final String ACTION_CONDITION_PROVIDER_SETTINGS 2015 = "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS"; 2016 2017 /** 2018 * Activity Action: Shows the settings page for an {@link AutomaticZenRule} mode. 2019 * <p> 2020 * Users can change the behavior of the mode when it's activated and access the owning app's 2021 * additional configuration screen, where triggering criteria can be modified (see 2022 * {@link AutomaticZenRule#setConfigurationActivity(ComponentName)}). 2023 * <p> 2024 * A matching Activity will only be found if 2025 * {@link NotificationManager#areAutomaticZenRulesUserManaged()} is true. 2026 * <p> 2027 * Input: The id of the rule, provided in the {@link #EXTRA_AUTOMATIC_ZEN_RULE_ID} extra. 2028 * <p> 2029 * Output: Nothing. 2030 */ 2031 @FlaggedApi(android.app.Flags.FLAG_MODES_API) 2032 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2033 public static final String ACTION_AUTOMATIC_ZEN_RULE_SETTINGS 2034 = "android.settings.AUTOMATIC_ZEN_RULE_SETTINGS"; 2035 2036 /** 2037 * Activity Extra: The String id of the {@link AutomaticZenRule mode} settings to display. 2038 * <p> 2039 * This must be passed as an extra field to the {@link #ACTION_AUTOMATIC_ZEN_RULE_SETTINGS}. 2040 */ 2041 @FlaggedApi(android.app.Flags.FLAG_MODES_API) 2042 public static final String EXTRA_AUTOMATIC_ZEN_RULE_ID 2043 = "android.provider.extra.AUTOMATIC_ZEN_RULE_ID"; 2044 2045 /** 2046 * Activity Action: Show settings for video captioning. 2047 * <p> 2048 * In some cases, a matching Activity may not exist, so ensure you safeguard 2049 * against this. 2050 * <p> 2051 * Input: Nothing. 2052 * <p> 2053 * Output: Nothing. 2054 */ 2055 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2056 public static final String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS"; 2057 2058 /** 2059 * Activity Action: Show the top level print settings. 2060 * <p> 2061 * In some cases, a matching Activity may not exist, so ensure you 2062 * safeguard against this. 2063 * <p> 2064 * Input: Nothing. 2065 * <p> 2066 * Output: Nothing. 2067 */ 2068 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2069 public static final String ACTION_PRINT_SETTINGS = 2070 "android.settings.ACTION_PRINT_SETTINGS"; 2071 2072 /** 2073 * Activity Action: Show Zen Mode configuration settings. 2074 * 2075 * @hide 2076 */ 2077 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2078 public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS"; 2079 2080 /** 2081 * Activity Action: Show Zen Mode visual effects configuration settings. 2082 * 2083 * @hide 2084 */ 2085 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2086 public static final String ZEN_MODE_BLOCKED_EFFECTS_SETTINGS = 2087 "android.settings.ZEN_MODE_BLOCKED_EFFECTS_SETTINGS"; 2088 2089 /** 2090 * Activity Action: Show Zen Mode onboarding activity. 2091 * 2092 * @hide 2093 */ 2094 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2095 public static final String ZEN_MODE_ONBOARDING = "android.settings.ZEN_MODE_ONBOARDING"; 2096 2097 /** 2098 * Activity Action: Show Zen Mode (aka Do Not Disturb) priority configuration settings. 2099 */ 2100 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2101 public static final String ACTION_ZEN_MODE_PRIORITY_SETTINGS 2102 = "android.settings.ZEN_MODE_PRIORITY_SETTINGS"; 2103 2104 /** 2105 * Activity Action: Show Zen Mode automation configuration settings. 2106 * 2107 * @hide 2108 */ 2109 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2110 public static final String ACTION_ZEN_MODE_AUTOMATION_SETTINGS 2111 = "android.settings.ZEN_MODE_AUTOMATION_SETTINGS"; 2112 2113 /** 2114 * Activity Action: Modify do not disturb mode settings. 2115 * <p> 2116 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 2117 * <p> 2118 * This intent MUST be started using 2119 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity 2120 * startVoiceActivity}. 2121 * <p> 2122 * Note: The Activity implementing this intent MUST verify that 2123 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction}. 2124 * returns true before modifying the setting. 2125 * <p> 2126 * Input: The optional {@link #EXTRA_DO_NOT_DISTURB_MODE_MINUTES} extra can be used to indicate 2127 * how long the user wishes to avoid interruptions for. The optional 2128 * {@link #EXTRA_DO_NOT_DISTURB_MODE_ENABLED} extra can be to indicate if the user is 2129 * enabling or disabling do not disturb mode. If either extra is not included, the 2130 * user maybe asked to provide the value. 2131 * <p> 2132 * Output: Nothing. 2133 */ 2134 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2135 public static final String ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE = 2136 "android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE"; 2137 2138 /** 2139 * Activity Action: Show Zen Mode schedule rule configuration settings. 2140 * 2141 * @hide 2142 */ 2143 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2144 public static final String ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS 2145 = "android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS"; 2146 2147 /** 2148 * Activity Action: Show Zen Mode event rule configuration settings. 2149 * 2150 * @hide 2151 */ 2152 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2153 public static final String ACTION_ZEN_MODE_EVENT_RULE_SETTINGS 2154 = "android.settings.ZEN_MODE_EVENT_RULE_SETTINGS"; 2155 2156 /** 2157 * Activity Action: Show Zen Mode external rule configuration settings. 2158 * 2159 * @hide 2160 */ 2161 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2162 public static final String ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS 2163 = "android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS"; 2164 2165 /** 2166 * Activity Action: Show the regulatory information screen for the device. 2167 * <p> 2168 * In some cases, a matching Activity may not exist, so ensure you safeguard 2169 * against this. 2170 * <p> 2171 * Input: Nothing. 2172 * <p> 2173 * Output: Nothing. 2174 */ 2175 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2176 public static final String 2177 ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO"; 2178 2179 /** 2180 * Activity Action: Show Device Name Settings. 2181 * <p> 2182 * In some cases, a matching Activity may not exist, so ensure you safeguard 2183 * against this. 2184 * 2185 * @hide 2186 */ 2187 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2188 public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME"; 2189 2190 /** 2191 * Activity Action: Show pairing settings. 2192 * <p> 2193 * In some cases, a matching Activity may not exist, so ensure you safeguard 2194 * against this. 2195 * 2196 * @hide 2197 */ 2198 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2199 public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS"; 2200 2201 /** 2202 * Activity Action: Show battery saver settings. 2203 * <p> 2204 * In some cases, a matching Activity may not exist, so ensure you safeguard 2205 * against this. 2206 */ 2207 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2208 public static final String ACTION_BATTERY_SAVER_SETTINGS 2209 = "android.settings.BATTERY_SAVER_SETTINGS"; 2210 2211 /** 2212 * Activity Action: Modify Battery Saver mode setting using a voice command. 2213 * <p> 2214 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 2215 * <p> 2216 * This intent MUST be started using 2217 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity 2218 * startVoiceActivity}. 2219 * <p> 2220 * Note: The activity implementing this intent MUST verify that 2221 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before 2222 * modifying the setting. 2223 * <p> 2224 * Input: To tell which state batter saver mode should be set to, add the 2225 * {@link #EXTRA_BATTERY_SAVER_MODE_ENABLED} extra to this Intent with the state specified. 2226 * If the extra is not included, no changes will be made. 2227 * <p> 2228 * Output: Nothing. 2229 */ 2230 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2231 public static final String ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE = 2232 "android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE"; 2233 2234 /** 2235 * Activity Action: Show Home selection settings. If there are multiple activities 2236 * that can satisfy the {@link Intent#CATEGORY_HOME} intent, this screen allows you 2237 * to pick your preferred activity. 2238 */ 2239 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2240 public static final String ACTION_HOME_SETTINGS 2241 = "android.settings.HOME_SETTINGS"; 2242 2243 /** 2244 * Activity Action: Show Default apps settings. 2245 * <p> 2246 * In some cases, a matching Activity may not exist, so ensure you 2247 * safeguard against this. 2248 * <p> 2249 * Input: Nothing. 2250 * <p> 2251 * Output: Nothing. 2252 */ 2253 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2254 public static final String ACTION_MANAGE_DEFAULT_APPS_SETTINGS 2255 = "android.settings.MANAGE_DEFAULT_APPS_SETTINGS"; 2256 2257 /** 2258 * Activity Action: Show More default apps settings. 2259 * <p> 2260 * If a Settings activity handles this intent action, a "More defaults" entry will be shown in 2261 * the Default apps settings, and clicking it will launch that activity. 2262 * <p> 2263 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 2264 * <p> 2265 * Input: Nothing. 2266 * <p> 2267 * Output: Nothing. 2268 * 2269 * @hide 2270 */ 2271 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2272 @SystemApi 2273 public static final String ACTION_MANAGE_MORE_DEFAULT_APPS_SETTINGS = 2274 "android.settings.MANAGE_MORE_DEFAULT_APPS_SETTINGS"; 2275 2276 /** 2277 * Activity Action: Show app screen size list settings for user to override app aspect 2278 * ratio. 2279 * <p> 2280 * In some cases, a matching Activity may not exist, so ensure you 2281 * safeguard against this. 2282 * <p> 2283 * Can include the following extra {@link android.content.Intent#EXTRA_PACKAGE_NAME} specifying 2284 * the name of the package to scroll to in the page. 2285 * @hide 2286 */ 2287 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2288 public static final String ACTION_MANAGE_USER_ASPECT_RATIO_SETTINGS = 2289 "android.settings.MANAGE_USER_ASPECT_RATIO_SETTINGS"; 2290 2291 /** 2292 * Activity Action: Show notification settings. 2293 * 2294 * @hide 2295 */ 2296 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2297 public static final String ACTION_NOTIFICATION_SETTINGS 2298 = "android.settings.NOTIFICATION_SETTINGS"; 2299 2300 /** 2301 * Activity Action: Show conversation settings. 2302 * 2303 * @hide 2304 */ 2305 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2306 public static final String ACTION_CONVERSATION_SETTINGS 2307 = "android.settings.CONVERSATION_SETTINGS"; 2308 2309 /** 2310 * Activity Action: Show notification history screen. 2311 * 2312 * @hide 2313 */ 2314 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2315 public static final String ACTION_NOTIFICATION_HISTORY 2316 = "android.settings.NOTIFICATION_HISTORY"; 2317 2318 /** 2319 * Activity Action: Show app listing settings, filtered by those that send notifications. 2320 * 2321 */ 2322 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2323 public static final String ACTION_ALL_APPS_NOTIFICATION_SETTINGS = 2324 "android.settings.ALL_APPS_NOTIFICATION_SETTINGS"; 2325 2326 /** 2327 * Activity Action: Show app settings specifically for sending notifications. Same as 2328 * ALL_APPS_NOTIFICATION_SETTINGS but meant for internal use. 2329 * @hide 2330 */ 2331 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2332 public static final String ACTION_ALL_APPS_NOTIFICATION_SETTINGS_FOR_REVIEW = 2333 "android.settings.ALL_APPS_NOTIFICATION_SETTINGS_FOR_REVIEW"; 2334 2335 /** 2336 * Activity Action: Show notification settings for a single app. 2337 * <p> 2338 * Input: {@link #EXTRA_APP_PACKAGE}, the package to display. 2339 * <p> 2340 * Output: Nothing. 2341 */ 2342 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2343 public static final String ACTION_APP_NOTIFICATION_SETTINGS 2344 = "android.settings.APP_NOTIFICATION_SETTINGS"; 2345 2346 /** 2347 * Activity Action: Show notification settings for a single {@link NotificationChannel}. 2348 * <p> 2349 * Input: {@link #EXTRA_APP_PACKAGE}, the package containing the channel to display. 2350 * Input: {@link #EXTRA_CHANNEL_ID}, the id of the channel to display. 2351 * <p> 2352 * Output: Nothing. 2353 */ 2354 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2355 public static final String ACTION_CHANNEL_NOTIFICATION_SETTINGS 2356 = "android.settings.CHANNEL_NOTIFICATION_SETTINGS"; 2357 2358 /** 2359 * Activity Action: Show notification bubble settings for a single app. 2360 * See {@link NotificationManager#getBubblePreference()}. 2361 * <p> 2362 * Input: {@link #EXTRA_APP_PACKAGE}, the package to display. 2363 * <p> 2364 * Output: Nothing. 2365 */ 2366 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2367 public static final String ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS 2368 = "android.settings.APP_NOTIFICATION_BUBBLE_SETTINGS"; 2369 2370 /** 2371 * Intent Extra: The value of {@link android.app.settings.SettingsEnums#EntryPointType} for 2372 * settings metrics that logs the entry point about physical keyboard settings. 2373 * <p> 2374 * This must be passed as an extra field to the {@link #ACTION_HARD_KEYBOARD_SETTINGS}. 2375 * @hide 2376 */ 2377 public static final String EXTRA_ENTRYPOINT = 2378 "com.android.settings.inputmethod.EXTRA_ENTRYPOINT"; 2379 2380 /** 2381 * Activity Extra: The package owner of the notification channel settings to display. 2382 * <p> 2383 * This must be passed as an extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. 2384 */ 2385 public static final String EXTRA_APP_PACKAGE = "android.provider.extra.APP_PACKAGE"; 2386 2387 /** 2388 * Activity Extra: The {@link NotificationChannel#getId()} of the notification channel settings 2389 * to display. 2390 * <p> 2391 * This must be passed as an extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. 2392 */ 2393 public static final String EXTRA_CHANNEL_ID = "android.provider.extra.CHANNEL_ID"; 2394 2395 /** 2396 * Activity Extra: The {@link NotificationChannel#getConversationId()} of the notification 2397 * conversation settings to display. 2398 * <p> 2399 * This is an optional extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. If 2400 * included the system will first look up notification settings by channel and conversation id, 2401 * and will fall back to channel id if a specialized channel for this conversation doesn't 2402 * exist, similar to {@link NotificationManager#getNotificationChannel(String, String)}. 2403 */ 2404 public static final String EXTRA_CONVERSATION_ID = "android.provider.extra.CONVERSATION_ID"; 2405 2406 /** 2407 * Activity Extra: An {@code Arraylist<String>} of {@link NotificationChannel} field names to 2408 * show on the Settings UI. 2409 * 2410 * <p> 2411 * This is an optional extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. If 2412 * included the system will filter out any Settings that doesn't appear in this list that 2413 * otherwise would display. 2414 */ 2415 public static final String EXTRA_CHANNEL_FILTER_LIST 2416 = "android.provider.extra.CHANNEL_FILTER_LIST"; 2417 2418 /** 2419 * Activity Action: Show notification redaction settings. 2420 * 2421 * @hide 2422 */ 2423 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2424 public static final String ACTION_APP_NOTIFICATION_REDACTION 2425 = "android.settings.ACTION_APP_NOTIFICATION_REDACTION"; 2426 2427 /** @hide */ 2428 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 2429 public static final String EXTRA_APP_UID = "app_uid"; 2430 2431 /** 2432 * Activity Action: Show power menu settings. 2433 * 2434 * @hide 2435 */ 2436 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2437 public static final String ACTION_POWER_MENU_SETTINGS = 2438 "android.settings.ACTION_POWER_MENU_SETTINGS"; 2439 2440 /** 2441 * Activity Action: Show controls settings. 2442 * 2443 * @hide 2444 */ 2445 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2446 public static final String ACTION_DEVICE_CONTROLS_SETTINGS = 2447 "android.settings.ACTION_DEVICE_CONTROLS_SETTINGS"; 2448 2449 /** 2450 * Activity Action: Show media control settings 2451 * 2452 * @hide 2453 */ 2454 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2455 public static final String ACTION_MEDIA_CONTROLS_SETTINGS = 2456 "android.settings.ACTION_MEDIA_CONTROLS_SETTINGS"; 2457 2458 /** 2459 * Activity Action: Show a dialog with disabled by policy message. 2460 * <p> If an user action is disabled by policy, this dialog can be triggered to let 2461 * the user know about this. 2462 * <p> 2463 * Input: {@link Intent#EXTRA_USER}: The user of the admin. 2464 * <p> 2465 * Output: Nothing. 2466 * 2467 * @hide 2468 */ 2469 // Intent#EXTRA_USER_ID can also be used 2470 @SystemApi 2471 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2472 public static final String ACTION_SHOW_ADMIN_SUPPORT_DETAILS = 2473 "android.settings.SHOW_ADMIN_SUPPORT_DETAILS"; 2474 2475 /** 2476 * Intent extra: The id of a setting restricted by supervisors. 2477 * <p> 2478 * Type: Integer with a value from the one of the SUPERVISOR_VERIFICATION_* constants below. 2479 * <ul> 2480 * <li>{@see #SUPERVISOR_VERIFICATION_SETTING_UNKNOWN} 2481 * <li>{@see #SUPERVISOR_VERIFICATION_SETTING_BIOMETRICS} 2482 * </ul> 2483 * </p> 2484 */ 2485 public static final String EXTRA_SUPERVISOR_RESTRICTED_SETTING_KEY = 2486 "android.provider.extra.SUPERVISOR_RESTRICTED_SETTING_KEY"; 2487 2488 /** 2489 * The unknown setting can usually be ignored and is used for compatibility with future 2490 * supervisor settings. 2491 */ 2492 public static final int SUPERVISOR_VERIFICATION_SETTING_UNKNOWN = 0; 2493 2494 /** 2495 * Settings for supervisors to control what kinds of biometric sensors, such a face and 2496 * fingerprint scanners, can be used on the device. 2497 */ 2498 public static final int SUPERVISOR_VERIFICATION_SETTING_BIOMETRICS = 1; 2499 2500 /** 2501 * Keys for {@link #EXTRA_SUPERVISOR_RESTRICTED_SETTING_KEY}. 2502 * @hide 2503 */ 2504 @Retention(RetentionPolicy.SOURCE) 2505 @IntDef(prefix = { "SUPERVISOR_VERIFICATION_SETTING_" }, value = { 2506 SUPERVISOR_VERIFICATION_SETTING_UNKNOWN, 2507 SUPERVISOR_VERIFICATION_SETTING_BIOMETRICS, 2508 }) 2509 public @interface SupervisorVerificationSetting {} 2510 2511 /** 2512 * Activity action: Launch UI to manage a setting restricted by supervisors. 2513 * <p> 2514 * Input: {@link #EXTRA_SUPERVISOR_RESTRICTED_SETTING_KEY} specifies what setting to open. 2515 * </p> 2516 * <p> 2517 * Output: Nothing. 2518 * </p> 2519 */ 2520 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2521 public static final String ACTION_MANAGE_SUPERVISOR_RESTRICTED_SETTING = 2522 "android.settings.MANAGE_SUPERVISOR_RESTRICTED_SETTING"; 2523 2524 /** 2525 * Activity Action: Show a dialog for remote bugreport flow. 2526 * <p> 2527 * Input: Nothing. 2528 * <p> 2529 * Output: Nothing. 2530 * 2531 * @hide 2532 */ 2533 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2534 public static final String ACTION_SHOW_REMOTE_BUGREPORT_DIALOG 2535 = "android.settings.SHOW_REMOTE_BUGREPORT_DIALOG"; 2536 2537 /** 2538 * Activity Action: Show VR listener settings. 2539 * <p> 2540 * Input: Nothing. 2541 * <p> 2542 * Output: Nothing. 2543 * 2544 * @see android.service.vr.VrListenerService 2545 */ 2546 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2547 public static final String ACTION_VR_LISTENER_SETTINGS 2548 = "android.settings.VR_LISTENER_SETTINGS"; 2549 2550 /** 2551 * Activity Action: Show Picture-in-picture settings. 2552 * <p> 2553 * Input: Nothing. 2554 * <p> 2555 * Output: Nothing. 2556 * 2557 * @hide 2558 */ 2559 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2560 public static final String ACTION_PICTURE_IN_PICTURE_SETTINGS 2561 = "android.settings.PICTURE_IN_PICTURE_SETTINGS"; 2562 2563 /** 2564 * Activity Action: Show Storage Manager settings. 2565 * <p> 2566 * Input: Nothing. 2567 * <p> 2568 * Output: Nothing. 2569 * 2570 * @hide 2571 */ 2572 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2573 public static final String ACTION_STORAGE_MANAGER_SETTINGS 2574 = "android.settings.STORAGE_MANAGER_SETTINGS"; 2575 2576 /** 2577 * Activity Action: Allows user to select current webview implementation. 2578 * <p> 2579 * Input: Nothing. 2580 * <p> 2581 * Output: Nothing. 2582 * <p class="note"> 2583 * In some cases, a matching Activity may not exist, so ensure you 2584 * safeguard against this. 2585 2586 */ 2587 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2588 public static final String ACTION_WEBVIEW_SETTINGS = "android.settings.WEBVIEW_SETTINGS"; 2589 2590 /** 2591 * Activity Action: Show enterprise privacy section. 2592 * <p> 2593 * Input: Nothing. 2594 * <p> 2595 * Output: Nothing. 2596 * @hide 2597 */ 2598 @SystemApi 2599 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2600 public static final String ACTION_ENTERPRISE_PRIVACY_SETTINGS 2601 = "android.settings.ENTERPRISE_PRIVACY_SETTINGS"; 2602 2603 /** 2604 * Activity Action: Show Work Policy info. 2605 * DPC apps can implement an activity that handles this intent in order to show device policies 2606 * associated with the work profile or managed device. 2607 * <p> 2608 * Input: Nothing. 2609 * <p> 2610 * Output: Nothing. 2611 * 2612 */ 2613 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2614 public static final String ACTION_SHOW_WORK_POLICY_INFO = 2615 "android.settings.SHOW_WORK_POLICY_INFO"; 2616 2617 /** 2618 * Activity Action: Show screen that let user select its Autofill Service. 2619 * <p> 2620 * Input: Intent's data URI set with an application name, using the 2621 * "package" schema (like "package:com.my.app"). 2622 * 2623 * <p> 2624 * Output: {@link android.app.Activity#RESULT_OK} if user selected an Autofill Service belonging 2625 * to the caller package. 2626 * 2627 * <p> 2628 * <b>NOTE: </b> Applications should call 2629 * {@link android.view.autofill.AutofillManager#hasEnabledAutofillServices()} and 2630 * {@link android.view.autofill.AutofillManager#isAutofillSupported()}, and only use this action 2631 * to start an activity if they return {@code false} and {@code true} respectively. 2632 */ 2633 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2634 public static final String ACTION_REQUEST_SET_AUTOFILL_SERVICE = 2635 "android.settings.REQUEST_SET_AUTOFILL_SERVICE"; 2636 2637 /** 2638 * Activity Action: Show screen that let user enable a Credential Manager provider. 2639 * <p> 2640 * Input: Intent's data URI set with an application name, using the 2641 * "package" schema (like "package:com.my.app"). 2642 * 2643 * <p> 2644 * Output: {@link android.app.Activity#RESULT_OK} if user selected a provider belonging 2645 * to the caller package. 2646 * <p> 2647 * <b>NOTE: </b> Applications should call 2648 * {@link android.credentials.CredentialManager#isEnabledCredentialProviderService( 2649 * ComponentName)} and only use this action to start an activity if they return {@code false}. 2650 */ 2651 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2652 @FlaggedApi(android.credentials.flags.Flags.FLAG_NEW_SETTINGS_INTENTS) 2653 public static final String ACTION_CREDENTIAL_PROVIDER = 2654 "android.settings.CREDENTIAL_PROVIDER"; 2655 2656 /** 2657 * Activity Action: Show screen for controlling the Quick Access Wallet. 2658 * <p> 2659 * In some cases, a matching Activity may not exist, so ensure you 2660 * safeguard against this. 2661 * <p> 2662 * Input: Nothing. 2663 * <p> 2664 * Output: Nothing. 2665 */ 2666 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2667 public static final String ACTION_QUICK_ACCESS_WALLET_SETTINGS = 2668 "android.settings.QUICK_ACCESS_WALLET_SETTINGS"; 2669 2670 /** 2671 * Activity Action: Show screen for controlling which apps have access on volume directories. 2672 * <p> 2673 * Input: Nothing. 2674 * <p> 2675 * Output: Nothing. 2676 * <p> 2677 * Applications typically use this action to ask the user to revert the "Do not ask again" 2678 * status of directory access requests made by 2679 * {@link android.os.storage.StorageVolume#createAccessIntent(String)}. 2680 * @deprecated use {@link #ACTION_APPLICATION_DETAILS_SETTINGS} to manage storage permissions 2681 * for a specific application 2682 */ 2683 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2684 @Deprecated 2685 public static final String ACTION_STORAGE_VOLUME_ACCESS_SETTINGS = 2686 "android.settings.STORAGE_VOLUME_ACCESS_SETTINGS"; 2687 2688 2689 /** 2690 * Activity Action: Show screen that let user select enable (or disable) Content Capture. 2691 * <p> 2692 * Input: Nothing. 2693 * 2694 * <p> 2695 * Output: Nothing 2696 * 2697 * @hide 2698 */ 2699 @SystemApi 2700 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2701 public static final String ACTION_REQUEST_ENABLE_CONTENT_CAPTURE = 2702 "android.settings.REQUEST_ENABLE_CONTENT_CAPTURE"; 2703 2704 /** 2705 * Activity Action: Show screen that let user manage how Android handles URL resolution. 2706 * <p> 2707 * Input: Nothing. 2708 * <p> 2709 * Output: Nothing 2710 * 2711 * @hide 2712 */ 2713 @SystemApi 2714 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2715 public static final String ACTION_MANAGE_DOMAIN_URLS = "android.settings.MANAGE_DOMAIN_URLS"; 2716 2717 /** 2718 * Activity Action: Show screen that let user select enable (or disable) tethering. 2719 * <p> 2720 * Input: Nothing. 2721 * <p> 2722 * Output: Nothing 2723 * 2724 * @hide 2725 */ 2726 @SystemApi 2727 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2728 public static final String ACTION_TETHER_SETTINGS = "android.settings.TETHER_SETTINGS"; 2729 2730 /** 2731 * Activity Action: Show screen that lets user configure wifi tethering. 2732 * <p> 2733 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 2734 * <p> 2735 * Input: Nothing 2736 * <p> 2737 * Output: Nothing 2738 * 2739 * @hide 2740 */ 2741 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2742 public static final String ACTION_WIFI_TETHER_SETTING = 2743 "com.android.settings.WIFI_TETHER_SETTINGS"; 2744 2745 /** 2746 * Broadcast to trigger notification of asking user to enable MMS. 2747 * Need to specify {@link #EXTRA_ENABLE_MMS_DATA_REQUEST_REASON} and {@link #EXTRA_SUB_ID}. 2748 * 2749 * @hide 2750 */ 2751 @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) 2752 public static final String ACTION_ENABLE_MMS_DATA_REQUEST = 2753 "android.settings.ENABLE_MMS_DATA_REQUEST"; 2754 2755 /** 2756 * Shows restrict settings dialog when settings is blocked. 2757 * 2758 * @hide 2759 */ 2760 @SystemApi 2761 @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) 2762 public static final String ACTION_SHOW_RESTRICTED_SETTING_DIALOG = 2763 "android.settings.SHOW_RESTRICTED_SETTING_DIALOG"; 2764 2765 /** 2766 * Integer value that specifies the reason triggering enable MMS data notification. 2767 * This must be passed as an extra field to the {@link #ACTION_ENABLE_MMS_DATA_REQUEST}. 2768 * Extra with value of EnableMmsDataReason interface. 2769 * @hide 2770 */ 2771 public static final String EXTRA_ENABLE_MMS_DATA_REQUEST_REASON = 2772 "android.settings.extra.ENABLE_MMS_DATA_REQUEST_REASON"; 2773 2774 /** @hide */ 2775 @Retention(RetentionPolicy.SOURCE) 2776 @IntDef(prefix = { "ENABLE_MMS_DATA_REQUEST_REASON_" }, value = { 2777 ENABLE_MMS_DATA_REQUEST_REASON_INCOMING_MMS, 2778 ENABLE_MMS_DATA_REQUEST_REASON_OUTGOING_MMS, 2779 }) 2780 public @interface EnableMmsDataReason{} 2781 2782 /** 2783 * Requesting to enable MMS data because there's an incoming MMS. 2784 * @hide 2785 */ 2786 public static final int ENABLE_MMS_DATA_REQUEST_REASON_INCOMING_MMS = 0; 2787 2788 /** 2789 * Requesting to enable MMS data because user is sending MMS. 2790 * @hide 2791 */ 2792 public static final int ENABLE_MMS_DATA_REQUEST_REASON_OUTGOING_MMS = 1; 2793 2794 /** 2795 * Activity Action: Show screen of a cellular subscription and highlight the 2796 * "enable MMS" toggle. 2797 * <p> 2798 * Input: {@link #EXTRA_SUB_ID}: Sub ID of the subscription. 2799 * <p> 2800 * Output: Nothing 2801 * 2802 * @hide 2803 */ 2804 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2805 public static final String ACTION_MMS_MESSAGE_SETTING = "android.settings.MMS_MESSAGE_SETTING"; 2806 2807 /** 2808 * Activity Action: Show a screen of bedtime settings, which is provided by the wellbeing app. 2809 * <p> 2810 * The handler of this intent action may not exist. 2811 * <p> 2812 * To start an activity with this intent, apps should set the wellbeing package explicitly in 2813 * the intent together with this action. The wellbeing package is defined in 2814 * {@code com.android.internal.R.string.config_systemWellbeing}. 2815 * <p> 2816 * Output: Nothing 2817 * 2818 * @hide 2819 */ 2820 @SystemApi 2821 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2822 public static final String ACTION_BEDTIME_SETTINGS = "android.settings.BEDTIME_SETTINGS"; 2823 2824 /** 2825 * Activity action: Launch UI to manage the permissions of an app. 2826 * <p> 2827 * Input: {@link android.content.Intent#EXTRA_PACKAGE_NAME} specifies the package whose 2828 * permissions will be managed by the launched UI. 2829 * </p> 2830 * <p> 2831 * Output: Nothing. 2832 * </p> 2833 * 2834 * @see android.content.Intent#EXTRA_PACKAGE_NAME 2835 * 2836 * @hide 2837 */ 2838 @SystemApi 2839 @RequiresPermission(android.Manifest.permission.LAUNCH_PERMISSION_SETTINGS) 2840 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 2841 public static final String ACTION_APP_PERMISSIONS_SETTINGS = 2842 "android.settings.APP_PERMISSIONS_SETTINGS"; 2843 2844 // End of Intent actions for Settings 2845 2846 /** 2847 * @hide - Private call() method on SettingsProvider to read from 'system' table. 2848 */ 2849 public static final String CALL_METHOD_GET_SYSTEM = "GET_system"; 2850 2851 /** 2852 * @hide - Private call() method on SettingsProvider to read from 'secure' table. 2853 */ 2854 public static final String CALL_METHOD_GET_SECURE = "GET_secure"; 2855 2856 /** 2857 * @hide - Private call() method on SettingsProvider to read from 'global' table. 2858 */ 2859 public static final String CALL_METHOD_GET_GLOBAL = "GET_global"; 2860 2861 /** 2862 * @hide - Private call() method on SettingsProvider to read from 'config' table. 2863 */ 2864 public static final String CALL_METHOD_GET_CONFIG = "GET_config"; 2865 2866 /** 2867 * @hide - Specifies that the caller of the fast-path call()-based flow tracks 2868 * the settings generation in order to cache values locally. If this key is 2869 * mapped to a <code>null</code> string extra in the request bundle, the response 2870 * bundle will contain the same key mapped to a parcelable extra which would be 2871 * an {@link android.util.MemoryIntArray}. The response will also contain an 2872 * integer mapped to the {@link #CALL_METHOD_GENERATION_INDEX_KEY} which is the 2873 * index in the array clients should use to lookup the generation. For efficiency 2874 * the caller should request the generation tracking memory array only if it 2875 * doesn't already have it. 2876 * 2877 * @see #CALL_METHOD_GENERATION_INDEX_KEY 2878 */ 2879 public static final String CALL_METHOD_TRACK_GENERATION_KEY = "_track_generation"; 2880 2881 /** 2882 * @hide Key with the location in the {@link android.util.MemoryIntArray} where 2883 * to look up the generation id of the backing table. The value is an integer. 2884 * 2885 * @see #CALL_METHOD_TRACK_GENERATION_KEY 2886 */ 2887 public static final String CALL_METHOD_GENERATION_INDEX_KEY = "_generation_index"; 2888 2889 /** 2890 * @hide Key with the settings table generation. The value is an integer. 2891 * 2892 * @see #CALL_METHOD_TRACK_GENERATION_KEY 2893 */ 2894 public static final String CALL_METHOD_GENERATION_KEY = "_generation"; 2895 2896 /** 2897 * @hide - User handle argument extra to the fast-path call()-based requests 2898 */ 2899 public static final String CALL_METHOD_USER_KEY = "_user"; 2900 2901 /** 2902 * @hide - Boolean argument extra to the fast-path call()-based requests 2903 */ 2904 public static final String CALL_METHOD_MAKE_DEFAULT_KEY = "_make_default"; 2905 2906 /** 2907 * @hide - User handle argument extra to the fast-path call()-based requests 2908 */ 2909 public static final String CALL_METHOD_RESET_MODE_KEY = "_reset_mode"; 2910 2911 /** 2912 * @hide - String argument extra to the fast-path call()-based requests 2913 */ 2914 public static final String CALL_METHOD_TAG_KEY = "_tag"; 2915 2916 /** 2917 * @hide - String argument extra to the fast-path call()-based requests 2918 */ 2919 public static final String CALL_METHOD_PREFIX_KEY = "_prefix"; 2920 2921 /** 2922 * @hide - String argument extra to the fast-path call()-based requests 2923 */ 2924 public static final String CALL_METHOD_SYNC_DISABLED_MODE_KEY = "_disabled_mode"; 2925 2926 /** 2927 * @hide - RemoteCallback monitor callback argument extra to the fast-path call()-based requests 2928 */ 2929 public static final String CALL_METHOD_MONITOR_CALLBACK_KEY = "_monitor_callback_key"; 2930 2931 /** 2932 * @hide - String argument extra to the fast-path call()-based requests 2933 */ 2934 public static final String CALL_METHOD_FLAGS_KEY = "_flags"; 2935 2936 /** 2937 * @hide - String argument extra to the fast-path call()-based requests 2938 */ 2939 public static final String CALL_METHOD_OVERRIDEABLE_BY_RESTORE_KEY = "_overrideable_by_restore"; 2940 2941 /** @hide - Private call() method to write to 'system' table */ 2942 public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system"; 2943 2944 /** @hide - Private call() method to write to 'secure' table */ 2945 public static final String CALL_METHOD_PUT_SECURE = "PUT_secure"; 2946 2947 /** @hide - Private call() method to write to 'global' table */ 2948 public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global"; 2949 2950 /** @hide - Private call() method to write to 'configuration' table */ 2951 public static final String CALL_METHOD_PUT_CONFIG = "PUT_config"; 2952 2953 /** @hide - Private call() method to write to and delete from the 'configuration' table */ 2954 public static final String CALL_METHOD_SET_ALL_CONFIG = "SET_ALL_config"; 2955 2956 /** @hide - Private call() method to delete from the 'system' table */ 2957 public static final String CALL_METHOD_DELETE_SYSTEM = "DELETE_system"; 2958 2959 /** @hide - Private call() method to delete from the 'secure' table */ 2960 public static final String CALL_METHOD_DELETE_SECURE = "DELETE_secure"; 2961 2962 /** @hide - Private call() method to delete from the 'global' table */ 2963 public static final String CALL_METHOD_DELETE_GLOBAL = "DELETE_global"; 2964 2965 /** @hide - Private call() method to reset to defaults the 'configuration' table */ 2966 public static final String CALL_METHOD_DELETE_CONFIG = "DELETE_config"; 2967 2968 /** @hide - Private call() method to reset to defaults the 'system' table */ 2969 public static final String CALL_METHOD_RESET_SYSTEM = "RESET_system"; 2970 2971 /** @hide - Private call() method to reset to defaults the 'secure' table */ 2972 public static final String CALL_METHOD_RESET_SECURE = "RESET_secure"; 2973 2974 /** @hide - Private call() method to reset to defaults the 'global' table */ 2975 public static final String CALL_METHOD_RESET_GLOBAL = "RESET_global"; 2976 2977 /** @hide - Private call() method to reset to defaults the 'configuration' table */ 2978 public static final String CALL_METHOD_RESET_CONFIG = "RESET_config"; 2979 2980 /** @hide - Private call() method to query the 'system' table */ 2981 public static final String CALL_METHOD_LIST_SYSTEM = "LIST_system"; 2982 2983 /** @hide - Private call() method to query the 'secure' table */ 2984 public static final String CALL_METHOD_LIST_SECURE = "LIST_secure"; 2985 2986 /** @hide - Private call() method to query the 'global' table */ 2987 public static final String CALL_METHOD_LIST_GLOBAL = "LIST_global"; 2988 2989 /** @hide - Private call() method to query the 'configuration' table */ 2990 public static final String CALL_METHOD_LIST_CONFIG = "LIST_config"; 2991 2992 /** @hide - Private call() method to disable / re-enable syncs to the 'configuration' table */ 2993 public static final String CALL_METHOD_SET_SYNC_DISABLED_MODE_CONFIG = 2994 "SET_SYNC_DISABLED_MODE_config"; 2995 2996 /** 2997 * @hide - Private call() method to return the current mode of sync disabling for the 2998 * 'configuration' table 2999 */ 3000 public static final String CALL_METHOD_GET_SYNC_DISABLED_MODE_CONFIG = 3001 "GET_SYNC_DISABLED_MODE_config"; 3002 3003 /** @hide - Private call() method to register monitor callback for 'configuration' table */ 3004 public static final String CALL_METHOD_REGISTER_MONITOR_CALLBACK_CONFIG = 3005 "REGISTER_MONITOR_CALLBACK_config"; 3006 3007 /** @hide - Private call() method to unregister monitor callback for 'configuration' table */ 3008 public static final String CALL_METHOD_UNREGISTER_MONITOR_CALLBACK_CONFIG = 3009 "UNREGISTER_MONITOR_CALLBACK_config"; 3010 3011 /** @hide - String argument extra to the config monitor callback */ 3012 public static final String EXTRA_MONITOR_CALLBACK_TYPE = "monitor_callback_type"; 3013 3014 /** @hide - String argument extra to the config monitor callback */ 3015 public static final String EXTRA_ACCESS_CALLBACK = "access_callback"; 3016 3017 /** @hide - String argument extra to the config monitor callback */ 3018 public static final String EXTRA_NAMESPACE_UPDATED_CALLBACK = 3019 "namespace_updated_callback"; 3020 3021 /** @hide - String argument extra to the config monitor callback */ 3022 public static final String EXTRA_NAMESPACE = "namespace"; 3023 3024 /** @hide - String argument extra to the config monitor callback */ 3025 public static final String EXTRA_CALLING_PACKAGE = "calling_package"; 3026 3027 /** 3028 * Activity Extra: Limit available options in launched activity based on the given authority. 3029 * <p> 3030 * This can be passed as an extra field in an Activity Intent with one or more syncable content 3031 * provider's authorities as a String[]. This field is used by some intents to alter the 3032 * behavior of the called activity. 3033 * <p> 3034 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based 3035 * on the authority given. 3036 */ 3037 public static final String EXTRA_AUTHORITIES = "authorities"; 3038 3039 /** 3040 * Activity Extra: Limit available options in launched activity based on the given account 3041 * types. 3042 * <p> 3043 * This can be passed as an extra field in an Activity Intent with one or more account types 3044 * as a String[]. This field is used by some intents to alter the behavior of the called 3045 * activity. 3046 * <p> 3047 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types to the specified 3048 * list. 3049 */ 3050 public static final String EXTRA_ACCOUNT_TYPES = "account_types"; 3051 3052 public static final String EXTRA_INPUT_METHOD_ID = "input_method_id"; 3053 3054 /** 3055 * Activity Extra: The device identifier to act upon. 3056 * <p> 3057 * This can be passed as an extra field in an Activity Intent with a single 3058 * InputDeviceIdentifier. This field is used by some activities to jump straight into the 3059 * settings for the given device. 3060 * <p> 3061 * Example: The {@link #ACTION_INPUT_METHOD_SETTINGS} intent opens the keyboard layout 3062 * dialog for the given device. 3063 * @hide 3064 */ 3065 public static final String EXTRA_INPUT_DEVICE_IDENTIFIER = "input_device_identifier"; 3066 3067 /** 3068 * Activity Extra: Enable or disable Airplane Mode. 3069 * <p> 3070 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE} 3071 * intent as a boolean to indicate if it should be enabled. 3072 */ 3073 public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled"; 3074 3075 /** 3076 * Activity Extra: Enable or disable Battery saver mode. 3077 * <p> 3078 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE} 3079 * intent as a boolean to indicate if it should be enabled. 3080 */ 3081 public static final String EXTRA_BATTERY_SAVER_MODE_ENABLED = 3082 "android.settings.extra.battery_saver_mode_enabled"; 3083 3084 /** 3085 * Activity Extra: Enable or disable Do Not Disturb mode. 3086 * <p> 3087 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE} 3088 * intent as a boolean to indicate if it should be enabled. 3089 */ 3090 public static final String EXTRA_DO_NOT_DISTURB_MODE_ENABLED = 3091 "android.settings.extra.do_not_disturb_mode_enabled"; 3092 3093 /** 3094 * Activity Extra: How many minutes to enable do not disturb mode for. 3095 * <p> 3096 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE} 3097 * intent to indicate how long do not disturb mode should be enabled for. 3098 */ 3099 public static final String EXTRA_DO_NOT_DISTURB_MODE_MINUTES = 3100 "android.settings.extra.do_not_disturb_mode_minutes"; 3101 3102 /** 3103 * Reset mode: reset to defaults only settings changed by the 3104 * calling package. If there is a default set the setting 3105 * will be set to it, otherwise the setting will be deleted. 3106 * This is the only type of reset available to non-system clients. 3107 * @hide 3108 */ 3109 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 3110 @TestApi 3111 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 3112 public static final int RESET_MODE_PACKAGE_DEFAULTS = 1; 3113 3114 /** 3115 * Reset mode: reset all settings set by untrusted packages, which is 3116 * packages that aren't a part of the system, to the current defaults. 3117 * If there is a default set the setting will be set to it, otherwise 3118 * the setting will be deleted. This mode is only available to the system. 3119 * @hide 3120 */ 3121 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 3122 public static final int RESET_MODE_UNTRUSTED_DEFAULTS = 2; 3123 3124 /** 3125 * Reset mode: delete all settings set by untrusted packages, which is 3126 * packages that aren't a part of the system. If a setting is set by an 3127 * untrusted package it will be deleted if its default is not provided 3128 * by the system, otherwise the setting will be set to its default. 3129 * This mode is only available to the system. 3130 * @hide 3131 */ 3132 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 3133 public static final int RESET_MODE_UNTRUSTED_CHANGES = 3; 3134 3135 /** 3136 * Reset mode: reset all settings to defaults specified by trusted 3137 * packages, which is packages that are a part of the system, and 3138 * delete all settings set by untrusted packages. If a setting has 3139 * a default set by a system package it will be set to the default, 3140 * otherwise the setting will be deleted. This mode is only available 3141 * to the system. 3142 * @hide 3143 */ 3144 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 3145 public static final int RESET_MODE_TRUSTED_DEFAULTS = 4; 3146 3147 /** @hide */ 3148 @Retention(RetentionPolicy.SOURCE) 3149 @IntDef(prefix = { "RESET_MODE_" }, value = { 3150 RESET_MODE_PACKAGE_DEFAULTS, 3151 RESET_MODE_UNTRUSTED_DEFAULTS, 3152 RESET_MODE_UNTRUSTED_CHANGES, 3153 RESET_MODE_TRUSTED_DEFAULTS 3154 }) 3155 public @interface ResetMode{} 3156 3157 /** 3158 * Activity Extra: Number of certificates 3159 * <p> 3160 * This can be passed as an extra field to the {@link #ACTION_MONITORING_CERT_INFO} 3161 * intent to indicate the number of certificates 3162 * @hide 3163 */ 3164 public static final String EXTRA_NUMBER_OF_CERTIFICATES = 3165 "android.settings.extra.number_of_certificates"; 3166 3167 private static final String SYSTEM_PACKAGE_NAME = "android"; 3168 3169 public static final String AUTHORITY = "settings"; 3170 3171 private static final String TAG = "Settings"; 3172 private static final boolean LOCAL_LOGV = false; 3173 3174 // Used in system server calling uid workaround in call() 3175 private static boolean sInSystemServer = false; 3176 private static final Object sInSystemServerLock = new Object(); 3177 3178 /** @hide */ setInSystemServer()3179 public static void setInSystemServer() { 3180 synchronized (sInSystemServerLock) { 3181 sInSystemServer = true; 3182 } 3183 } 3184 3185 /** @hide */ isInSystemServer()3186 public static boolean isInSystemServer() { 3187 synchronized (sInSystemServerLock) { 3188 return sInSystemServer; 3189 } 3190 } 3191 3192 public static class SettingNotFoundException extends AndroidException { SettingNotFoundException(String msg)3193 public SettingNotFoundException(String msg) { 3194 super(msg); 3195 } 3196 } 3197 3198 /** 3199 * Common base for tables of name/value settings. 3200 */ 3201 public static class NameValueTable implements BaseColumns { 3202 public static final String NAME = "name"; 3203 public static final String VALUE = "value"; 3204 // A flag indicating whether the current value of a setting should be preserved during 3205 // restore. 3206 /** @hide */ 3207 public static final String IS_PRESERVED_IN_RESTORE = "is_preserved_in_restore"; 3208 putString(ContentResolver resolver, Uri uri, String name, String value)3209 protected static boolean putString(ContentResolver resolver, Uri uri, 3210 String name, String value) { 3211 // The database will take care of replacing duplicates. 3212 try { 3213 ContentValues values = new ContentValues(); 3214 values.put(NAME, name); 3215 values.put(VALUE, value); 3216 resolver.insert(uri, values); 3217 return true; 3218 } catch (SQLException e) { 3219 Log.w(TAG, "Can't set key " + name + " in " + uri, e); 3220 return false; 3221 } 3222 } 3223 getUriFor(Uri uri, String name)3224 public static Uri getUriFor(Uri uri, String name) { 3225 return Uri.withAppendedPath(uri, name); 3226 } 3227 } 3228 3229 private static final class GenerationTracker { 3230 @NonNull private final String mName; 3231 @NonNull private final MemoryIntArray mArray; 3232 @NonNull private final Consumer<String> mErrorHandler; 3233 private final int mIndex; 3234 private int mCurrentGeneration; 3235 GenerationTracker(@onNull String name, @NonNull MemoryIntArray array, int index, int generation, Consumer<String> errorHandler)3236 GenerationTracker(@NonNull String name, @NonNull MemoryIntArray array, int index, 3237 int generation, Consumer<String> errorHandler) { 3238 mName = name; 3239 mArray = array; 3240 mIndex = index; 3241 mErrorHandler = errorHandler; 3242 mCurrentGeneration = generation; 3243 } 3244 3245 // This method also updates the obsolete generation code stored locally isGenerationChanged()3246 public boolean isGenerationChanged() { 3247 final int currentGeneration = readCurrentGeneration(); 3248 if (currentGeneration >= 0) { 3249 if (currentGeneration == mCurrentGeneration) { 3250 return false; 3251 } 3252 mCurrentGeneration = currentGeneration; 3253 } 3254 return true; 3255 } 3256 getCurrentGeneration()3257 public int getCurrentGeneration() { 3258 return mCurrentGeneration; 3259 } 3260 readCurrentGeneration()3261 private int readCurrentGeneration() { 3262 try { 3263 return mArray.get(mIndex); 3264 } catch (IOException e) { 3265 Log.e(TAG, "Error getting current generation", e); 3266 mErrorHandler.accept(mName); 3267 } 3268 return -1; 3269 } 3270 destroy()3271 public void destroy() { 3272 maybeCloseGenerationArray(mArray); 3273 } 3274 3275 @Override finalize()3276 protected void finalize() throws Throwable { 3277 try { 3278 destroy(); 3279 } finally { 3280 super.finalize(); 3281 } 3282 } 3283 } 3284 maybeCloseGenerationArray(@ullable MemoryIntArray array)3285 private static void maybeCloseGenerationArray(@Nullable MemoryIntArray array) { 3286 if (array == null) { 3287 return; 3288 } 3289 try { 3290 // If this process is the system server process, the MemoryIntArray received from Parcel 3291 // is the same object as the one kept inside SettingsProvider, so skipping the close(). 3292 if (!Settings.isInSystemServer() && !array.isClosed()) { 3293 array.close(); 3294 } 3295 } catch (IOException e) { 3296 Log.e(TAG, "Error closing the generation tracking array", e); 3297 } 3298 } 3299 3300 private static final class ContentProviderHolder { 3301 private final Object mLock = new Object(); 3302 3303 private final Uri mUri; 3304 @GuardedBy("mLock") 3305 @UnsupportedAppUsage 3306 private IContentProvider mContentProvider; 3307 ContentProviderHolder(Uri uri)3308 public ContentProviderHolder(Uri uri) { 3309 mUri = uri; 3310 } 3311 getProvider(ContentResolver contentResolver)3312 public IContentProvider getProvider(ContentResolver contentResolver) { 3313 synchronized (mLock) { 3314 if (mContentProvider == null) { 3315 mContentProvider = contentResolver 3316 .acquireProvider(mUri.getAuthority()); 3317 } 3318 return mContentProvider; 3319 } 3320 } 3321 clearProviderForTest()3322 public void clearProviderForTest() { 3323 synchronized (mLock) { 3324 mContentProvider = null; 3325 } 3326 } 3327 } 3328 3329 // Thread-safe. 3330 private static class NameValueCache { 3331 private static final boolean DEBUG = false; 3332 3333 private static final String[] SELECT_VALUE_PROJECTION = new String[] { 3334 Settings.NameValueTable.VALUE 3335 }; 3336 3337 private static final String NAME_EQ_PLACEHOLDER = "name=?"; 3338 3339 // Cached values of queried settings. 3340 // Key is the setting's name, value is the setting's value. 3341 // Must synchronize on 'this' to access mValues and mValuesVersion. 3342 private final ArrayMap<String, String> mValues = new ArrayMap<>(); 3343 3344 // Cached values for queried prefixes. 3345 // Key is the prefix, value is all of the settings under the prefix, mapped from a setting's 3346 // name to a setting's value. The name string doesn't include the prefix. 3347 // Must synchronize on 'this' to access. 3348 private final ArrayMap<String, ArrayMap<String, String>> mPrefixToValues = new ArrayMap<>(); 3349 3350 private final Uri mUri; 3351 @UnsupportedAppUsage 3352 private final ContentProviderHolder mProviderHolder; 3353 3354 // The method we'll call (or null, to not use) on the provider 3355 // for the fast path of retrieving settings. 3356 private final String mCallGetCommand; 3357 private final String mCallSetCommand; 3358 private final String mCallDeleteCommand; 3359 private final String mCallListCommand; 3360 private final String mCallSetAllCommand; 3361 3362 private final ArraySet<String> mReadableFields; 3363 private final ArraySet<String> mAllFields; 3364 private final ArrayMap<String, Integer> mReadableFieldsWithMaxTargetSdk; 3365 3366 // Mapping from the name of a setting (or the prefix of a namespace) to a generation tracker 3367 @GuardedBy("this") 3368 private ArrayMap<String, GenerationTracker> mGenerationTrackers = new ArrayMap<>(); 3369 3370 private Consumer<String> mGenerationTrackerErrorHandler = (String name) -> { 3371 synchronized (NameValueCache.this) { 3372 Log.e(TAG, "Error accessing generation tracker - removing"); 3373 final GenerationTracker tracker = mGenerationTrackers.get(name); 3374 if (tracker != null) { 3375 tracker.destroy(); 3376 mGenerationTrackers.remove(name); 3377 } 3378 mValues.remove(name); 3379 } 3380 }; 3381 NameValueCache(Uri uri, String getCommand, String setCommand, String deleteCommand, ContentProviderHolder providerHolder, Class<T> callerClass)3382 <T extends NameValueTable> NameValueCache(Uri uri, String getCommand, 3383 String setCommand, String deleteCommand, ContentProviderHolder providerHolder, 3384 Class<T> callerClass) { 3385 this(uri, getCommand, setCommand, deleteCommand, null, null, providerHolder, 3386 callerClass); 3387 } 3388 NameValueCache(Uri uri, String getCommand, String setCommand, String deleteCommand, String listCommand, String setAllCommand, ContentProviderHolder providerHolder, Class<T> callerClass)3389 private <T extends NameValueTable> NameValueCache(Uri uri, String getCommand, 3390 String setCommand, String deleteCommand, String listCommand, String setAllCommand, 3391 ContentProviderHolder providerHolder, Class<T> callerClass) { 3392 mUri = uri; 3393 mCallGetCommand = getCommand; 3394 mCallSetCommand = setCommand; 3395 mCallDeleteCommand = deleteCommand; 3396 mCallListCommand = listCommand; 3397 mCallSetAllCommand = setAllCommand; 3398 mProviderHolder = providerHolder; 3399 mReadableFields = new ArraySet<>(); 3400 mAllFields = new ArraySet<>(); 3401 mReadableFieldsWithMaxTargetSdk = new ArrayMap<>(); 3402 getPublicSettingsForClass(callerClass, mAllFields, mReadableFields, 3403 mReadableFieldsWithMaxTargetSdk); 3404 } 3405 putStringForUser(ContentResolver cr, String name, String value, String tag, boolean makeDefault, final int userHandle, boolean overrideableByRestore)3406 public boolean putStringForUser(ContentResolver cr, String name, String value, 3407 String tag, boolean makeDefault, final int userHandle, 3408 boolean overrideableByRestore) { 3409 try { 3410 Bundle arg = new Bundle(); 3411 arg.putString(Settings.NameValueTable.VALUE, value); 3412 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 3413 if (tag != null) { 3414 arg.putString(CALL_METHOD_TAG_KEY, tag); 3415 } 3416 if (makeDefault) { 3417 arg.putBoolean(CALL_METHOD_MAKE_DEFAULT_KEY, true); 3418 } 3419 if (overrideableByRestore) { 3420 arg.putBoolean(CALL_METHOD_OVERRIDEABLE_BY_RESTORE_KEY, true); 3421 } 3422 IContentProvider cp = mProviderHolder.getProvider(cr); 3423 cp.call(cr.getAttributionSource(), 3424 mProviderHolder.mUri.getAuthority(), mCallSetCommand, name, arg); 3425 } catch (RemoteException e) { 3426 Log.w(TAG, "Can't set key " + name + " in " + mUri, e); 3427 return false; 3428 } 3429 return true; 3430 } 3431 setStringsForPrefix(ContentResolver cr, String prefix, HashMap<String, String> keyValues)3432 public @SetAllResult int setStringsForPrefix(ContentResolver cr, String prefix, 3433 HashMap<String, String> keyValues) { 3434 if (mCallSetAllCommand == null) { 3435 // This NameValueCache does not support atomically setting multiple flags 3436 return SET_ALL_RESULT_FAILURE; 3437 } 3438 try { 3439 Bundle args = new Bundle(); 3440 args.putString(CALL_METHOD_PREFIX_KEY, prefix); 3441 args.putSerializable(CALL_METHOD_FLAGS_KEY, keyValues); 3442 IContentProvider cp = mProviderHolder.getProvider(cr); 3443 Bundle bundle = cp.call(cr.getAttributionSource(), 3444 mProviderHolder.mUri.getAuthority(), 3445 mCallSetAllCommand, null, args); 3446 return bundle.getInt(KEY_CONFIG_SET_ALL_RETURN); 3447 } catch (RemoteException e) { 3448 // Not supported by the remote side 3449 return SET_ALL_RESULT_FAILURE; 3450 } 3451 } 3452 deleteStringForUser(ContentResolver cr, String name, final int userHandle)3453 public boolean deleteStringForUser(ContentResolver cr, String name, final int userHandle) { 3454 try { 3455 Bundle arg = new Bundle(); 3456 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 3457 IContentProvider cp = mProviderHolder.getProvider(cr); 3458 cp.call(cr.getAttributionSource(), 3459 mProviderHolder.mUri.getAuthority(), mCallDeleteCommand, name, arg); 3460 } catch (RemoteException e) { 3461 Log.w(TAG, "Can't delete key " + name + " in " + mUri, e); 3462 return false; 3463 } 3464 return true; 3465 } 3466 3467 @UnsupportedAppUsage getStringForUser(ContentResolver cr, String name, final int userHandle)3468 public String getStringForUser(ContentResolver cr, String name, final int userHandle) { 3469 final boolean isSelf = (userHandle == UserHandle.myUserId()); 3470 final boolean useCache = isSelf && !isInSystemServer(); 3471 boolean needsGenerationTracker = false; 3472 if (useCache) { 3473 synchronized (NameValueCache.this) { 3474 final GenerationTracker generationTracker = mGenerationTrackers.get(name); 3475 if (generationTracker != null) { 3476 if (generationTracker.isGenerationChanged()) { 3477 if (DEBUG) { 3478 Log.i(TAG, "Generation changed for setting:" + name 3479 + " type:" + mUri.getPath() 3480 + " in package:" + cr.getPackageName() 3481 + " and user:" + userHandle); 3482 } 3483 // When a generation number changes, remove cached value, remove the old 3484 // generation tracker and request a new one 3485 mValues.remove(name); 3486 generationTracker.destroy(); 3487 mGenerationTrackers.remove(name); 3488 } else if (mValues.containsKey(name)) { 3489 if (DEBUG) { 3490 Log.i(TAG, "Cache hit for setting:" + name); 3491 } 3492 return mValues.get(name); 3493 } 3494 } 3495 } 3496 if (DEBUG) { 3497 Log.i(TAG, "Cache miss for setting:" + name + " for user:" 3498 + userHandle); 3499 } 3500 // Generation tracker doesn't exist or the value isn't cached 3501 needsGenerationTracker = true; 3502 } else { 3503 if (DEBUG || LOCAL_LOGV) { 3504 Log.v(TAG, "get setting for user " + userHandle 3505 + " by user " + UserHandle.myUserId() + " so skipping cache"); 3506 } 3507 } 3508 3509 // Check if the target settings key is readable. Reject if the caller is not system and 3510 // is trying to access a settings key defined in the Settings.Secure, Settings.System or 3511 // Settings.Global and is not annotated as @Readable. 3512 // Notice that a key string that is not defined in any of the Settings.* classes will 3513 // still be regarded as readable. 3514 if (!isCallerExemptFromReadableRestriction() && mAllFields.contains(name)) { 3515 if (!mReadableFields.contains(name)) { 3516 throw new SecurityException( 3517 "Settings key: <" + name + "> is not readable. From S+, settings keys " 3518 + "annotated with @hide are restricted to system_server and " 3519 + "system apps only, unless they are annotated with @Readable." 3520 ); 3521 } else { 3522 // When the target settings key has @Readable annotation, if the caller app's 3523 // target sdk is higher than the maxTargetSdk of the annotation, reject access. 3524 if (mReadableFieldsWithMaxTargetSdk.containsKey(name)) { 3525 final int maxTargetSdk = mReadableFieldsWithMaxTargetSdk.get(name); 3526 final Application application = ActivityThread.currentApplication(); 3527 final boolean targetSdkCheckOk = application != null 3528 && application.getApplicationInfo() != null 3529 && application.getApplicationInfo().targetSdkVersion 3530 <= maxTargetSdk; 3531 if (!targetSdkCheckOk) { 3532 throw new SecurityException( 3533 "Settings key: <" + name + "> is only readable to apps with " 3534 + "targetSdkVersion lower than or equal to: " 3535 + maxTargetSdk 3536 ); 3537 } 3538 } 3539 } 3540 } 3541 3542 IContentProvider cp = mProviderHolder.getProvider(cr); 3543 3544 // Try the fast path first, not using query(). If this 3545 // fails (alternate Settings provider that doesn't support 3546 // this interface?) then we fall back to the query/table 3547 // interface. 3548 if (mCallGetCommand != null) { 3549 try { 3550 Bundle args = new Bundle(); 3551 if (!isSelf) { 3552 args.putInt(CALL_METHOD_USER_KEY, userHandle); 3553 } 3554 if (needsGenerationTracker) { 3555 args.putString(CALL_METHOD_TRACK_GENERATION_KEY, null); 3556 if (DEBUG) { 3557 Log.i(TAG, "Requested generation tracker for setting:" + name 3558 + " type:" + mUri.getPath() 3559 + " in package:" + cr.getPackageName() 3560 + " and user:" + userHandle); 3561 } 3562 } 3563 Bundle b; 3564 // If we're in system server and in a binder transaction we need to clear the 3565 // calling uid. This works around code in system server that did not call 3566 // clearCallingIdentity, previously this wasn't needed because reading settings 3567 // did not do permission checking but thats no longer the case. 3568 // Long term this should be removed and callers should properly call 3569 // clearCallingIdentity or use a ContentResolver from the caller as needed. 3570 if (Settings.isInSystemServer() && Binder.getCallingUid() != Process.myUid()) { 3571 final long token = Binder.clearCallingIdentity(); 3572 try { 3573 b = cp.call(cr.getAttributionSource(), 3574 mProviderHolder.mUri.getAuthority(), mCallGetCommand, name, 3575 args); 3576 } finally { 3577 Binder.restoreCallingIdentity(token); 3578 } 3579 } else { 3580 b = cp.call(cr.getAttributionSource(), 3581 mProviderHolder.mUri.getAuthority(), mCallGetCommand, name, args); 3582 } 3583 if (b != null) { 3584 String value = b.getString(Settings.NameValueTable.VALUE); 3585 // Don't update our cache for reads of other users' data 3586 if (isSelf) { 3587 synchronized (NameValueCache.this) { 3588 if (needsGenerationTracker) { 3589 MemoryIntArray array = b.getParcelable( 3590 CALL_METHOD_TRACK_GENERATION_KEY, android.util.MemoryIntArray.class); 3591 final int index = b.getInt( 3592 CALL_METHOD_GENERATION_INDEX_KEY, -1); 3593 if (array != null && index >= 0) { 3594 final int generation = b.getInt( 3595 CALL_METHOD_GENERATION_KEY, 0); 3596 if (DEBUG) { 3597 Log.i(TAG, "Received generation tracker for setting:" 3598 + name 3599 + " type:" + mUri.getPath() 3600 + " in package:" + cr.getPackageName() 3601 + " and user:" + userHandle 3602 + " with index:" + index); 3603 } 3604 // Always make sure to close any pre-existing tracker before 3605 // replacing it, to prevent memory leaks 3606 var oldTracker = mGenerationTrackers.get(name); 3607 if (oldTracker != null) { 3608 oldTracker.destroy(); 3609 } 3610 mGenerationTrackers.put(name, new GenerationTracker(name, 3611 array, index, generation, 3612 mGenerationTrackerErrorHandler)); 3613 } else { 3614 maybeCloseGenerationArray(array); 3615 } 3616 } 3617 if (mGenerationTrackers.get(name) != null 3618 && !mGenerationTrackers.get(name).isGenerationChanged()) { 3619 if (DEBUG) { 3620 Log.i(TAG, "Updating cache for setting:" + name); 3621 } 3622 mValues.put(name, value); 3623 } 3624 } 3625 } else { 3626 if (DEBUG || LOCAL_LOGV) { 3627 Log.i(TAG, "call-query of user " + userHandle 3628 + " by " + UserHandle.myUserId() 3629 + (isInSystemServer() ? " in system_server" : "") 3630 + " so not updating cache"); 3631 } 3632 } 3633 return value; 3634 } 3635 // If the response Bundle is null, we fall through 3636 // to the query interface below. 3637 } catch (RemoteException e) { 3638 // Not supported by the remote side? Fall through 3639 // to query(). 3640 } 3641 } 3642 3643 Cursor c = null; 3644 try { 3645 Bundle queryArgs = ContentResolver.createSqlQueryBundle( 3646 NAME_EQ_PLACEHOLDER, new String[]{name}, null); 3647 // Same workaround as above. 3648 if (Settings.isInSystemServer() && Binder.getCallingUid() != Process.myUid()) { 3649 final long token = Binder.clearCallingIdentity(); 3650 try { 3651 c = cp.query(cr.getAttributionSource(), mUri, 3652 SELECT_VALUE_PROJECTION, queryArgs, null); 3653 } finally { 3654 Binder.restoreCallingIdentity(token); 3655 } 3656 } else { 3657 c = cp.query(cr.getAttributionSource(), mUri, 3658 SELECT_VALUE_PROJECTION, queryArgs, null); 3659 } 3660 if (c == null) { 3661 Log.w(TAG, "Can't get key " + name + " from " + mUri); 3662 return null; 3663 } 3664 3665 String value = c.moveToNext() ? c.getString(0) : null; 3666 synchronized (NameValueCache.this) { 3667 if (mGenerationTrackers.get(name) != null 3668 && !mGenerationTrackers.get(name).isGenerationChanged()) { 3669 if (DEBUG) { 3670 Log.i(TAG, "Updating cache for setting:" + name + " using query"); 3671 } 3672 mValues.put(name, value); 3673 } 3674 } 3675 return value; 3676 } catch (RemoteException e) { 3677 Log.w(TAG, "Can't get key " + name + " from " + mUri, e); 3678 return null; // Return null, but don't cache it. 3679 } finally { 3680 if (c != null) c.close(); 3681 } 3682 } 3683 isCallerExemptFromReadableRestriction()3684 private static boolean isCallerExemptFromReadableRestriction() { 3685 if (Settings.isInSystemServer()) { 3686 return true; 3687 } 3688 if (UserHandle.getAppId(Binder.getCallingUid()) < Process.FIRST_APPLICATION_UID) { 3689 return true; 3690 } 3691 final Application application = ActivityThread.currentApplication(); 3692 if (application == null || application.getApplicationInfo() == null) { 3693 return false; 3694 } 3695 final ApplicationInfo applicationInfo = application.getApplicationInfo(); 3696 final boolean isTestOnly = 3697 (applicationInfo.flags & ApplicationInfo.FLAG_TEST_ONLY) != 0; 3698 return isTestOnly || applicationInfo.isSystemApp() || applicationInfo.isPrivilegedApp() 3699 || applicationInfo.isSignedWithPlatformKey(); 3700 } 3701 getStringsForPrefixStripPrefix( ContentResolver cr, String prefix, List<String> names)3702 private Map<String, String> getStringsForPrefixStripPrefix( 3703 ContentResolver cr, String prefix, List<String> names) { 3704 String namespace = prefix.substring(0, prefix.length() - 1); 3705 ArrayMap<String, String> keyValues = new ArrayMap<>(); 3706 int substringLength = prefix.length(); 3707 int currentGeneration = -1; 3708 boolean needsGenerationTracker = false; 3709 synchronized (NameValueCache.this) { 3710 final GenerationTracker generationTracker = mGenerationTrackers.get(prefix); 3711 if (generationTracker != null) { 3712 if (generationTracker.isGenerationChanged()) { 3713 if (DEBUG) { 3714 Log.i(TAG, "Generation changed for prefix:" + prefix 3715 + " type:" + mUri.getPath() 3716 + " in package:" + cr.getPackageName()); 3717 } 3718 // When a generation number changes, remove cached values, remove the old 3719 // generation tracker and request a new one 3720 generationTracker.destroy(); 3721 mGenerationTrackers.remove(prefix); 3722 mPrefixToValues.remove(prefix); 3723 needsGenerationTracker = true; 3724 } else { 3725 final ArrayMap<String, String> cachedSettings = mPrefixToValues.get(prefix); 3726 if (cachedSettings != null) { 3727 if (!names.isEmpty()) { 3728 for (String name : names) { 3729 // The cache can contain "null" values, need to use containsKey. 3730 if (cachedSettings.containsKey(name)) { 3731 keyValues.put( 3732 name, 3733 cachedSettings.get(name)); 3734 } 3735 } 3736 } else { 3737 keyValues.putAll(cachedSettings); 3738 // Remove the hack added for the legacy behavior. 3739 keyValues.remove(""); 3740 } 3741 return keyValues; 3742 } 3743 } 3744 currentGeneration = generationTracker.getCurrentGeneration(); 3745 } else { 3746 needsGenerationTracker = true; 3747 } 3748 } 3749 if (mCallListCommand == null) { 3750 // No list command specified, return empty map 3751 return keyValues; 3752 } 3753 if (DEBUG) { 3754 Log.i(TAG, "Cache miss for prefix:" + prefix); 3755 } 3756 IContentProvider cp = mProviderHolder.getProvider(cr); 3757 3758 try { 3759 Bundle args = new Bundle(); 3760 args.putString(Settings.CALL_METHOD_PREFIX_KEY, prefix); 3761 if (needsGenerationTracker) { 3762 args.putString(CALL_METHOD_TRACK_GENERATION_KEY, null); 3763 if (DEBUG) { 3764 Log.i(TAG, "Requested generation tracker for prefix:" + prefix 3765 + " type: " + mUri.getPath() 3766 + " in package:" + cr.getPackageName()); 3767 } 3768 } 3769 3770 Bundle b; 3771 // If we're in system server and the caller did not call 3772 // clearCallingIdentity, the read would fail due to mismatched AttributionSources. 3773 if (Settings.isInSystemServer() && Binder.getCallingUid() != Process.myUid()) { 3774 final long token = Binder.clearCallingIdentity(); 3775 try { 3776 // Fetch all flags for the namespace at once for caching purposes 3777 b = cp.call(cr.getAttributionSource(), 3778 mProviderHolder.mUri.getAuthority(), mCallListCommand, null, args); 3779 } finally { 3780 Binder.restoreCallingIdentity(token); 3781 } 3782 } else { 3783 // Fetch all flags for the namespace at once for caching purposes 3784 b = cp.call(cr.getAttributionSource(), 3785 mProviderHolder.mUri.getAuthority(), mCallListCommand, null, args); 3786 } 3787 if (b == null) { 3788 // Invalid response, return an empty map 3789 return keyValues; 3790 } 3791 3792 // All flags for the namespace 3793 HashMap<String, String> flagsToValues = 3794 (HashMap) b.getSerializable(Settings.NameValueTable.VALUE, java.util.HashMap.class); 3795 if (flagsToValues == null) { 3796 return keyValues; 3797 } 3798 // Only the flags requested by the caller 3799 if (!names.isEmpty()) { 3800 for (String name : names) { 3801 // flagsToValues can contain "null" values, need to use containsKey. 3802 final String key = Config.createCompositeName(namespace, name); 3803 if (flagsToValues.containsKey(key)) { 3804 keyValues.put( 3805 name, 3806 flagsToValues.get(key)); 3807 } 3808 } 3809 } else { 3810 for (Map.Entry<String, String> flag : flagsToValues.entrySet()) { 3811 keyValues.put( 3812 flag.getKey().substring(substringLength), 3813 flag.getValue()); 3814 } 3815 } 3816 3817 synchronized (NameValueCache.this) { 3818 if (needsGenerationTracker) { 3819 MemoryIntArray array = b.getParcelable( 3820 CALL_METHOD_TRACK_GENERATION_KEY, android.util.MemoryIntArray.class); 3821 final int index = b.getInt( 3822 CALL_METHOD_GENERATION_INDEX_KEY, -1); 3823 if (array != null && index >= 0) { 3824 final int generation = b.getInt( 3825 CALL_METHOD_GENERATION_KEY, 0); 3826 if (DEBUG) { 3827 Log.i(TAG, "Received generation tracker for prefix:" + prefix 3828 + " type:" + mUri.getPath() 3829 + " in package:" + cr.getPackageName() 3830 + " with index:" + index); 3831 } 3832 // Always make sure to close any pre-existing tracker before 3833 // replacing it, to prevent memory leaks 3834 var oldTracker = mGenerationTrackers.get(prefix); 3835 if (oldTracker != null) { 3836 oldTracker.destroy(); 3837 } 3838 mGenerationTrackers.put(prefix, 3839 new GenerationTracker(prefix, array, index, generation, 3840 mGenerationTrackerErrorHandler)); 3841 currentGeneration = generation; 3842 } else { 3843 maybeCloseGenerationArray(array); 3844 } 3845 } 3846 if (mGenerationTrackers.get(prefix) != null && currentGeneration 3847 == mGenerationTrackers.get(prefix).getCurrentGeneration()) { 3848 if (DEBUG) { 3849 Log.i(TAG, "Updating cache for prefix:" + prefix); 3850 } 3851 // Cache the complete list of flags for the namespace for bulk queries. 3852 // In this cached list, the setting's name doesn't include the prefix. 3853 ArrayMap<String, String> namesToValues = 3854 new ArrayMap<>(flagsToValues.size() + 1); 3855 for (Map.Entry<String, String> flag : flagsToValues.entrySet()) { 3856 namesToValues.put( 3857 flag.getKey().substring(substringLength), 3858 flag.getValue()); 3859 } 3860 // Legacy behavior, we return <"", null> when queried with name = "" 3861 namesToValues.put("", null); 3862 mPrefixToValues.put(prefix, namesToValues); 3863 } 3864 } 3865 return keyValues; 3866 } catch (RemoteException e) { 3867 // Not supported by the remote side, return an empty map 3868 return keyValues; 3869 } 3870 } 3871 clearGenerationTrackerForTest()3872 public void clearGenerationTrackerForTest() { 3873 synchronized (NameValueCache.this) { 3874 for (int i = 0; i < mGenerationTrackers.size(); i++) { 3875 mGenerationTrackers.valueAt(i).destroy(); 3876 } 3877 mGenerationTrackers.clear(); 3878 mValues.clear(); 3879 } 3880 } 3881 } 3882 3883 /** 3884 * Checks if the specified context can draw on top of other apps. As of API 3885 * level 23, an app cannot draw on top of other apps unless it declares the 3886 * {@link android.Manifest.permission#SYSTEM_ALERT_WINDOW} permission in its 3887 * manifest, <em>and</em> the user specifically grants the app this 3888 * capability. To prompt the user to grant this approval, the app must send an 3889 * intent with the action 3890 * {@link android.provider.Settings#ACTION_MANAGE_OVERLAY_PERMISSION}, which 3891 * causes the system to display a permission management screen. 3892 * 3893 * @param context App context. 3894 * @return true if the specified context can draw on top of other apps, false otherwise 3895 */ canDrawOverlays(Context context)3896 public static boolean canDrawOverlays(Context context) { 3897 return Settings.isCallingPackageAllowedToDrawOverlays(context, Process.myUid(), 3898 context.getOpPackageName(), false) || context.checkSelfPermission( 3899 Manifest.permission.SYSTEM_APPLICATION_OVERLAY) 3900 == PackageManager.PERMISSION_GRANTED; 3901 } 3902 3903 /** 3904 * This annotation indicates that the value of a setting is allowed to be read 3905 * with the get* methods. The following settings should be readable: 3906 * 1) all the public settings 3907 * 2) all the hidden settings added before S 3908 */ 3909 @Target({ ElementType.FIELD }) 3910 @Retention(RetentionPolicy.RUNTIME) 3911 private @interface Readable { maxTargetSdk()3912 int maxTargetSdk() default 0; 3913 } 3914 getPublicSettingsForClass( Class<T> callerClass, Set<String> allKeys, Set<String> readableKeys, ArrayMap<String, Integer> keysWithMaxTargetSdk)3915 private static <T extends NameValueTable> void getPublicSettingsForClass( 3916 Class<T> callerClass, Set<String> allKeys, Set<String> readableKeys, 3917 ArrayMap<String, Integer> keysWithMaxTargetSdk) { 3918 final Field[] allFields = callerClass.getDeclaredFields(); 3919 try { 3920 for (int i = 0; i < allFields.length; i++) { 3921 final Field field = allFields[i]; 3922 if (!field.getType().equals(String.class)) { 3923 continue; 3924 } 3925 final Object value = field.get(callerClass); 3926 if (!value.getClass().equals(String.class)) { 3927 continue; 3928 } 3929 allKeys.add((String) value); 3930 final Readable annotation = field.getAnnotation(Readable.class); 3931 3932 if (annotation != null) { 3933 final String key = (String) value; 3934 final int maxTargetSdk = annotation.maxTargetSdk(); 3935 readableKeys.add(key); 3936 if (maxTargetSdk != 0) { 3937 keysWithMaxTargetSdk.put(key, maxTargetSdk); 3938 } 3939 } 3940 } 3941 } catch (IllegalAccessException ignored) { 3942 } 3943 } 3944 parseFloatSetting(String settingValue, String settingName)3945 private static float parseFloatSetting(String settingValue, String settingName) 3946 throws SettingNotFoundException { 3947 if (settingValue == null) { 3948 throw new SettingNotFoundException(settingName); 3949 } 3950 try { 3951 return Float.parseFloat(settingValue); 3952 } catch (NumberFormatException e) { 3953 throw new SettingNotFoundException(settingName); 3954 } 3955 } 3956 parseFloatSettingWithDefault(String settingValue, float defaultValue)3957 private static float parseFloatSettingWithDefault(String settingValue, float defaultValue) { 3958 try { 3959 return settingValue != null ? Float.parseFloat(settingValue) : defaultValue; 3960 } catch (NumberFormatException e) { 3961 return defaultValue; 3962 } 3963 } 3964 parseIntSetting(String settingValue, String settingName)3965 private static int parseIntSetting(String settingValue, String settingName) 3966 throws SettingNotFoundException { 3967 if (settingValue == null) { 3968 throw new SettingNotFoundException(settingName); 3969 } 3970 try { 3971 return Integer.parseInt(settingValue); 3972 } catch (NumberFormatException e) { 3973 throw new SettingNotFoundException(settingName); 3974 } 3975 } 3976 parseIntSettingWithDefault(String settingValue, int defaultValue)3977 private static int parseIntSettingWithDefault(String settingValue, int defaultValue) { 3978 try { 3979 return settingValue != null ? Integer.parseInt(settingValue) : defaultValue; 3980 } catch (NumberFormatException e) { 3981 return defaultValue; 3982 } 3983 } 3984 parseLongSetting(String settingValue, String settingName)3985 private static long parseLongSetting(String settingValue, String settingName) 3986 throws SettingNotFoundException { 3987 if (settingValue == null) { 3988 throw new SettingNotFoundException(settingName); 3989 } 3990 try { 3991 return Long.parseLong(settingValue); 3992 } catch (NumberFormatException e) { 3993 throw new SettingNotFoundException(settingName); 3994 } 3995 } 3996 parseLongSettingWithDefault(String settingValue, long defaultValue)3997 private static long parseLongSettingWithDefault(String settingValue, long defaultValue) { 3998 try { 3999 return settingValue != null ? Long.parseLong(settingValue) : defaultValue; 4000 } catch (NumberFormatException e) { 4001 return defaultValue; 4002 } 4003 } 4004 4005 /** 4006 * System settings, containing miscellaneous system preferences. This 4007 * table holds simple name/value pairs. There are convenience 4008 * functions for accessing individual settings entries. 4009 */ 4010 public static final class System extends NameValueTable { 4011 // NOTE: If you add new settings here, be sure to add them to 4012 // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoSystemSettingsLocked. 4013 4014 private static final float DEFAULT_FONT_SCALE = 1.0f; 4015 private static final int DEFAULT_FONT_WEIGHT = 0; 4016 4017 /** 4018 * The content:// style URL for this table 4019 */ 4020 public static final Uri CONTENT_URI = 4021 Uri.parse("content://" + AUTHORITY + "/system"); 4022 4023 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 4024 private static final ContentProviderHolder sProviderHolder = 4025 new ContentProviderHolder(CONTENT_URI); 4026 4027 @UnsupportedAppUsage 4028 private static final NameValueCache sNameValueCache = new NameValueCache( 4029 CONTENT_URI, 4030 CALL_METHOD_GET_SYSTEM, 4031 CALL_METHOD_PUT_SYSTEM, 4032 CALL_METHOD_DELETE_SYSTEM, 4033 sProviderHolder, 4034 System.class); 4035 4036 @UnsupportedAppUsage 4037 private static final HashSet<String> MOVED_TO_SECURE; 4038 static { 4039 MOVED_TO_SECURE = new HashSet<>(30); 4040 MOVED_TO_SECURE.add(Secure.ADAPTIVE_SLEEP); 4041 MOVED_TO_SECURE.add(Secure.ANDROID_ID); 4042 MOVED_TO_SECURE.add(Secure.HTTP_PROXY); 4043 MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED); 4044 MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS); 4045 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED); 4046 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE); 4047 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); 4048 MOVED_TO_SECURE.add(Secure.LOGGING_ID); 4049 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED); 4050 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE); 4051 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL); 4052 MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME); 4053 MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL); 4054 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); 4055 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); 4056 MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT); 4057 MOVED_TO_SECURE.add(Secure.WIFI_ON); 4058 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE); 4059 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT); 4060 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS); 4061 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED); 4062 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS); 4063 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT); 4064 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS); 4065 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON); 4066 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT); 4067 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS); 4068 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS); 4069 4070 // At one time in System, then Global, but now back in Secure 4071 MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS); 4072 } 4073 4074 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 4075 private static final HashSet<String> MOVED_TO_GLOBAL; 4076 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 4077 private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL; 4078 static { 4079 MOVED_TO_GLOBAL = new HashSet<>(); 4080 MOVED_TO_SECURE_THEN_GLOBAL = new HashSet<>(); 4081 4082 // these were originally in system but migrated to secure in the past, 4083 // so are duplicated in the Secure.* namespace 4084 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.ADB_ENABLED); 4085 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.BLUETOOTH_ON); 4086 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DATA_ROAMING); 4087 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DEVICE_PROVISIONED); 4088 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.HTTP_PROXY); 4089 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.NETWORK_PREFERENCE); 4090 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED); 4091 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS); 4092 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.WIFI_MAX_DHCP_RETRY_COUNT); 4093 4094 // these are moving directly from system to global 4095 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON); 4096 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS); 4097 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS); 4098 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME); 4099 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE); 4100 MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND); 4101 MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND); 4102 MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND); 4103 MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND); 4104 MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED); 4105 MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND); 4106 MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND); 4107 MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND); 4108 MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED); 4109 MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN); 4110 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY); 4111 MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER); 4112 MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE); 4113 MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE); 4114 MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE); 4115 MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS); 4116 MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE); 4117 MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE); 4118 MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY); 4119 MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP); 4120 MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER); 4121 MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES); 4122 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_CONTENT_URL); 4123 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_METADATA_URL); 4124 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_CONTENT_URL); 4125 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_METADATA_URL); 4126 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL); 4127 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL); 4128 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_CONTENT_URL); 4129 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL); 4130 MOVED_TO_GLOBAL.add(Settings.Global.RADIO_NFC); 4131 MOVED_TO_GLOBAL.add(Settings.Global.RADIO_CELL); 4132 MOVED_TO_GLOBAL.add(Settings.Global.RADIO_WIFI); 4133 MOVED_TO_GLOBAL.add(Settings.Global.RADIO_BLUETOOTH); 4134 MOVED_TO_GLOBAL.add(Settings.Global.RADIO_WIMAX); 4135 MOVED_TO_GLOBAL.add(Settings.Global.SHOW_PROCESSES); 4136 } 4137 4138 /** @hide */ getMovedToGlobalSettings(Set<String> outKeySet)4139 public static void getMovedToGlobalSettings(Set<String> outKeySet) { 4140 outKeySet.addAll(MOVED_TO_GLOBAL); 4141 outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL); 4142 } 4143 4144 /** @hide */ getMovedToSecureSettings(Set<String> outKeySet)4145 public static void getMovedToSecureSettings(Set<String> outKeySet) { 4146 outKeySet.addAll(MOVED_TO_SECURE); 4147 } 4148 4149 /** @hide */ getNonLegacyMovedKeys(HashSet<String> outKeySet)4150 public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) { 4151 outKeySet.addAll(MOVED_TO_GLOBAL); 4152 } 4153 4154 /** @hide */ clearProviderForTest()4155 public static void clearProviderForTest() { 4156 sProviderHolder.clearProviderForTest(); 4157 sNameValueCache.clearGenerationTrackerForTest(); 4158 } 4159 4160 /** @hide */ getPublicSettings(Set<String> allKeys, Set<String> readableKeys, ArrayMap<String, Integer> readableKeysWithMaxTargetSdk)4161 public static void getPublicSettings(Set<String> allKeys, Set<String> readableKeys, 4162 ArrayMap<String, Integer> readableKeysWithMaxTargetSdk) { 4163 getPublicSettingsForClass(System.class, allKeys, readableKeys, 4164 readableKeysWithMaxTargetSdk); 4165 } 4166 4167 /** 4168 * Look up a name in the database. 4169 * @param resolver to access the database with 4170 * @param name to look up in the table 4171 * @return the corresponding value, or null if not present 4172 */ getString(ContentResolver resolver, String name)4173 public static String getString(ContentResolver resolver, String name) { 4174 return getStringForUser(resolver, name, resolver.getUserId()); 4175 } 4176 4177 /** @hide */ 4178 @UnsupportedAppUsage getStringForUser(ContentResolver resolver, String name, int userHandle)4179 public static String getStringForUser(ContentResolver resolver, String name, 4180 int userHandle) { 4181 if (MOVED_TO_SECURE.contains(name)) { 4182 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4183 + " to android.provider.Settings.Secure, returning read-only value."); 4184 return Secure.getStringForUser(resolver, name, userHandle); 4185 } 4186 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { 4187 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4188 + " to android.provider.Settings.Global, returning read-only value."); 4189 return Global.getStringForUser(resolver, name, userHandle); 4190 } 4191 4192 return sNameValueCache.getStringForUser(resolver, name, userHandle); 4193 } 4194 4195 /** 4196 * Store a name/value pair into the database. 4197 * @param resolver to access the database with 4198 * @param name to store 4199 * @param value to associate with the name 4200 * @return true if the value was set, false on database errors 4201 */ putString(ContentResolver resolver, String name, String value)4202 public static boolean putString(ContentResolver resolver, String name, String value) { 4203 return putStringForUser(resolver, name, value, resolver.getUserId()); 4204 } 4205 4206 /** 4207 * Store a name/value pair into the database. Values written by this method will be 4208 * overridden if a restore happens in the future. 4209 * 4210 * @param resolver to access the database with 4211 * @param name to store 4212 * @param value to associate with the name 4213 * 4214 * @return true if the value was set, false on database errors 4215 * 4216 * @hide 4217 */ 4218 @RequiresPermission(Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) 4219 @SystemApi putString(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, boolean overrideableByRestore)4220 public static boolean putString(@NonNull ContentResolver resolver, 4221 @NonNull String name, @Nullable String value, boolean overrideableByRestore) { 4222 return putStringForUser(resolver, name, value, resolver.getUserId(), 4223 overrideableByRestore); 4224 } 4225 4226 /** 4227 * Store a name/value pair into the database. 4228 * 4229 * @param resolver to access the database with 4230 * @param name to store 4231 * @param value to associate with the name 4232 * @param makeDefault whether to make the value the default one 4233 * @param overrideableByRestore whether restore can override this value 4234 * @return true if the value was set, false on database errors 4235 * 4236 * @hide 4237 */ 4238 @RequiresPermission(Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) 4239 @SystemApi 4240 @FlaggedApi(Flags.FLAG_SYSTEM_SETTINGS_DEFAULT) putString(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, boolean makeDefault, boolean overrideableByRestore)4241 public static boolean putString(@NonNull ContentResolver resolver, @NonNull String name, 4242 @Nullable String value, boolean makeDefault, boolean overrideableByRestore) { 4243 return putStringForUser(resolver, name, value, /* tag= */ null, 4244 makeDefault, resolver.getUserId(), overrideableByRestore); 4245 } 4246 4247 /** @hide */ 4248 @UnsupportedAppUsage putStringForUser(ContentResolver resolver, String name, String value, int userHandle)4249 public static boolean putStringForUser(ContentResolver resolver, String name, String value, 4250 int userHandle) { 4251 return putStringForUser(resolver, name, value, userHandle, 4252 DEFAULT_OVERRIDEABLE_BY_RESTORE); 4253 } 4254 putStringForUser(ContentResolver resolver, String name, String value, int userHandle, boolean overrideableByRestore)4255 private static boolean putStringForUser(ContentResolver resolver, String name, String value, 4256 int userHandle, boolean overrideableByRestore) { 4257 return putStringForUser(resolver, name, value, /* tag= */ null, 4258 /* makeDefault= */ false, userHandle, overrideableByRestore); 4259 } 4260 putStringForUser(ContentResolver resolver, String name, String value, String tag, boolean makeDefault, int userHandle, boolean overrideableByRestore)4261 private static boolean putStringForUser(ContentResolver resolver, String name, String value, 4262 String tag, boolean makeDefault, int userHandle, boolean overrideableByRestore) { 4263 if (LOCAL_LOGV) { 4264 Log.v(TAG, "System.putString(name=" + name + ", value=" + value + ") for " 4265 + userHandle); 4266 } 4267 if (MOVED_TO_SECURE.contains(name)) { 4268 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4269 + " to android.provider.Settings.Secure, value is unchanged."); 4270 return false; 4271 } 4272 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { 4273 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4274 + " to android.provider.Settings.Global, value is unchanged."); 4275 return false; 4276 } 4277 return sNameValueCache.putStringForUser(resolver, name, value, tag, makeDefault, 4278 userHandle, overrideableByRestore); 4279 } 4280 4281 /** 4282 * Reset the settings to their defaults. This would reset <strong>only</strong> 4283 * settings set by the caller's package. Think of it of a way to undo your own 4284 * changes to the system settings. Passing in the optional tag will reset only 4285 * settings changed by your package and associated with this tag. 4286 * 4287 * @param resolver Handle to the content resolver. 4288 * @param tag Optional tag which should be associated with the settings to reset. 4289 * 4290 * @see #putString(ContentResolver, String, String, boolean, boolean) 4291 * 4292 * @hide 4293 */ 4294 @SystemApi 4295 @FlaggedApi(Flags.FLAG_SYSTEM_SETTINGS_DEFAULT) resetToDefaults(@onNull ContentResolver resolver, @Nullable String tag)4296 public static void resetToDefaults(@NonNull ContentResolver resolver, 4297 @Nullable String tag) { 4298 resetToDefaultsAsUser(resolver, tag, RESET_MODE_PACKAGE_DEFAULTS, 4299 resolver.getUserId()); 4300 } 4301 4302 /** 4303 * Reset the settings to their defaults for a given user with a specific mode. The 4304 * optional tag argument is valid only for {@link #RESET_MODE_PACKAGE_DEFAULTS} 4305 * allowing resetting the settings made by a package and associated with the tag. 4306 * 4307 * @param resolver Handle to the content resolver. 4308 * @param tag Optional tag which should be associated with the settings to reset. 4309 * @param mode The reset mode. 4310 * @param userHandle The user for which to reset to defaults. 4311 * 4312 * @see #RESET_MODE_PACKAGE_DEFAULTS 4313 * @see #RESET_MODE_UNTRUSTED_DEFAULTS 4314 * @see #RESET_MODE_UNTRUSTED_CHANGES 4315 * @see #RESET_MODE_TRUSTED_DEFAULTS 4316 * 4317 * @hide 4318 */ resetToDefaultsAsUser(@onNull ContentResolver resolver, @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle)4319 public static void resetToDefaultsAsUser(@NonNull ContentResolver resolver, 4320 @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle) { 4321 try { 4322 Bundle arg = new Bundle(); 4323 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 4324 if (tag != null) { 4325 arg.putString(CALL_METHOD_TAG_KEY, tag); 4326 } 4327 arg.putInt(CALL_METHOD_RESET_MODE_KEY, mode); 4328 IContentProvider cp = sProviderHolder.getProvider(resolver); 4329 cp.call(resolver.getAttributionSource(), 4330 sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_SYSTEM, null, arg); 4331 } catch (RemoteException e) { 4332 Log.w(TAG, "Can't reset do defaults for " + CONTENT_URI, e); 4333 } 4334 } 4335 4336 /** 4337 * Construct the content URI for a particular name/value pair, 4338 * useful for monitoring changes with a ContentObserver. 4339 * @param name to look up in the table 4340 * @return the corresponding content URI, or null if not present 4341 */ getUriFor(String name)4342 public static Uri getUriFor(String name) { 4343 if (MOVED_TO_SECURE.contains(name)) { 4344 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4345 + " to android.provider.Settings.Secure, returning Secure URI."); 4346 return Secure.getUriFor(Secure.CONTENT_URI, name); 4347 } 4348 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { 4349 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" 4350 + " to android.provider.Settings.Global, returning read-only global URI."); 4351 return Global.getUriFor(Global.CONTENT_URI, name); 4352 } 4353 return getUriFor(CONTENT_URI, name); 4354 } 4355 4356 /** 4357 * Convenience function for retrieving a single system settings value 4358 * as an integer. Note that internally setting values are always 4359 * stored as strings; this function converts the string to an integer 4360 * for you. The default value will be returned if the setting is 4361 * not defined or not an integer. 4362 * 4363 * @param cr The ContentResolver to access. 4364 * @param name The name of the setting to retrieve. 4365 * @param def Value to return if the setting is not defined. 4366 * 4367 * @return The setting's current value, or 'def' if it is not defined 4368 * or not a valid integer. 4369 */ getInt(ContentResolver cr, String name, int def)4370 public static int getInt(ContentResolver cr, String name, int def) { 4371 return getIntForUser(cr, name, def, cr.getUserId()); 4372 } 4373 4374 /** @hide */ 4375 @UnsupportedAppUsage getIntForUser(ContentResolver cr, String name, int def, int userHandle)4376 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { 4377 String v = getStringForUser(cr, name, userHandle); 4378 return parseIntSettingWithDefault(v, def); 4379 } 4380 4381 /** 4382 * Convenience function for retrieving a single system settings value 4383 * as an integer. Note that internally setting values are always 4384 * stored as strings; this function converts the string to an integer 4385 * for you. 4386 * <p> 4387 * This version does not take a default value. If the setting has not 4388 * been set, or the string value is not a number, 4389 * it throws {@link SettingNotFoundException}. 4390 * 4391 * @param cr The ContentResolver to access. 4392 * @param name The name of the setting to retrieve. 4393 * 4394 * @throws SettingNotFoundException Thrown if a setting by the given 4395 * name can't be found or the setting value is not an integer. 4396 * 4397 * @return The setting's current value. 4398 */ getInt(ContentResolver cr, String name)4399 public static int getInt(ContentResolver cr, String name) 4400 throws SettingNotFoundException { 4401 return getIntForUser(cr, name, cr.getUserId()); 4402 } 4403 4404 /** @hide */ 4405 @UnsupportedAppUsage getIntForUser(ContentResolver cr, String name, int userHandle)4406 public static int getIntForUser(ContentResolver cr, String name, int userHandle) 4407 throws SettingNotFoundException { 4408 String v = getStringForUser(cr, name, userHandle); 4409 return parseIntSetting(v, name); 4410 } 4411 4412 /** 4413 * Convenience function for updating a single settings value as an 4414 * integer. This will either create a new entry in the table if the 4415 * given name does not exist, or modify the value of the existing row 4416 * with that name. Note that internally setting values are always 4417 * stored as strings, so this function converts the given value to a 4418 * string before storing it. 4419 * 4420 * @param cr The ContentResolver to access. 4421 * @param name The name of the setting to modify. 4422 * @param value The new value for the setting. 4423 * @return true if the value was set, false on database errors 4424 */ putInt(ContentResolver cr, String name, int value)4425 public static boolean putInt(ContentResolver cr, String name, int value) { 4426 return putIntForUser(cr, name, value, cr.getUserId()); 4427 } 4428 4429 /** @hide */ 4430 @UnsupportedAppUsage putIntForUser(ContentResolver cr, String name, int value, int userHandle)4431 public static boolean putIntForUser(ContentResolver cr, String name, int value, 4432 int userHandle) { 4433 return putStringForUser(cr, name, Integer.toString(value), userHandle); 4434 } 4435 4436 /** 4437 * Convenience function for retrieving a single system settings value 4438 * as a {@code long}. Note that internally setting values are always 4439 * stored as strings; this function converts the string to a {@code long} 4440 * for you. The default value will be returned if the setting is 4441 * not defined or not a {@code long}. 4442 * 4443 * @param cr The ContentResolver to access. 4444 * @param name The name of the setting to retrieve. 4445 * @param def Value to return if the setting is not defined. 4446 * 4447 * @return The setting's current value, or 'def' if it is not defined 4448 * or not a valid {@code long}. 4449 */ getLong(ContentResolver cr, String name, long def)4450 public static long getLong(ContentResolver cr, String name, long def) { 4451 return getLongForUser(cr, name, def, cr.getUserId()); 4452 } 4453 4454 /** @hide */ getLongForUser(ContentResolver cr, String name, long def, int userHandle)4455 public static long getLongForUser(ContentResolver cr, String name, long def, 4456 int userHandle) { 4457 String v = getStringForUser(cr, name, userHandle); 4458 return parseLongSettingWithDefault(v, def); 4459 } 4460 4461 /** 4462 * Convenience function for retrieving a single system settings value 4463 * as a {@code long}. Note that internally setting values are always 4464 * stored as strings; this function converts the string to a {@code long} 4465 * for you. 4466 * <p> 4467 * This version does not take a default value. If the setting has not 4468 * been set, or the string value is not a number, 4469 * it throws {@link SettingNotFoundException}. 4470 * 4471 * @param cr The ContentResolver to access. 4472 * @param name The name of the setting to retrieve. 4473 * 4474 * @return The setting's current value. 4475 * @throws SettingNotFoundException Thrown if a setting by the given 4476 * name can't be found or the setting value is not an integer. 4477 */ getLong(ContentResolver cr, String name)4478 public static long getLong(ContentResolver cr, String name) 4479 throws SettingNotFoundException { 4480 return getLongForUser(cr, name, cr.getUserId()); 4481 } 4482 4483 /** @hide */ getLongForUser(ContentResolver cr, String name, int userHandle)4484 public static long getLongForUser(ContentResolver cr, String name, int userHandle) 4485 throws SettingNotFoundException { 4486 String v = getStringForUser(cr, name, userHandle); 4487 return parseLongSetting(v, name); 4488 } 4489 4490 /** 4491 * Convenience function for updating a single settings value as a long 4492 * integer. This will either create a new entry in the table if the 4493 * given name does not exist, or modify the value of the existing row 4494 * with that name. Note that internally setting values are always 4495 * stored as strings, so this function converts the given value to a 4496 * string before storing it. 4497 * 4498 * @param cr The ContentResolver to access. 4499 * @param name The name of the setting to modify. 4500 * @param value The new value for the setting. 4501 * @return true if the value was set, false on database errors 4502 */ putLong(ContentResolver cr, String name, long value)4503 public static boolean putLong(ContentResolver cr, String name, long value) { 4504 return putLongForUser(cr, name, value, cr.getUserId()); 4505 } 4506 4507 /** @hide */ putLongForUser(ContentResolver cr, String name, long value, int userHandle)4508 public static boolean putLongForUser(ContentResolver cr, String name, long value, 4509 int userHandle) { 4510 return putStringForUser(cr, name, Long.toString(value), userHandle); 4511 } 4512 4513 /** 4514 * Convenience function for retrieving a single system settings value 4515 * as a floating point number. Note that internally setting values are 4516 * always stored as strings; this function converts the string to an 4517 * float for you. The default value will be returned if the setting 4518 * is not defined or not a valid float. 4519 * 4520 * @param cr The ContentResolver to access. 4521 * @param name The name of the setting to retrieve. 4522 * @param def Value to return if the setting is not defined. 4523 * 4524 * @return The setting's current value, or 'def' if it is not defined 4525 * or not a valid float. 4526 */ getFloat(ContentResolver cr, String name, float def)4527 public static float getFloat(ContentResolver cr, String name, float def) { 4528 return getFloatForUser(cr, name, def, cr.getUserId()); 4529 } 4530 4531 /** @hide */ getFloatForUser(ContentResolver cr, String name, float def, int userHandle)4532 public static float getFloatForUser(ContentResolver cr, String name, float def, 4533 int userHandle) { 4534 String v = getStringForUser(cr, name, userHandle); 4535 return parseFloatSettingWithDefault(v, def); 4536 } 4537 4538 /** 4539 * Convenience function for retrieving a single system settings value 4540 * as a float. Note that internally setting values are always 4541 * stored as strings; this function converts the string to a float 4542 * for you. 4543 * <p> 4544 * This version does not take a default value. If the setting has not 4545 * been set, or the string value is not a number, 4546 * it throws {@link SettingNotFoundException}. 4547 * 4548 * @param cr The ContentResolver to access. 4549 * @param name The name of the setting to retrieve. 4550 * 4551 * @throws SettingNotFoundException Thrown if a setting by the given 4552 * name can't be found or the setting value is not a float. 4553 * 4554 * @return The setting's current value. 4555 */ getFloat(ContentResolver cr, String name)4556 public static float getFloat(ContentResolver cr, String name) 4557 throws SettingNotFoundException { 4558 return getFloatForUser(cr, name, cr.getUserId()); 4559 } 4560 4561 /** @hide */ getFloatForUser(ContentResolver cr, String name, int userHandle)4562 public static float getFloatForUser(ContentResolver cr, String name, int userHandle) 4563 throws SettingNotFoundException { 4564 String v = getStringForUser(cr, name, userHandle); 4565 return parseFloatSetting(v, name); 4566 } 4567 4568 /** 4569 * Convenience function for updating a single settings value as a 4570 * floating point number. This will either create a new entry in the 4571 * table if the given name does not exist, or modify the value of the 4572 * existing row with that name. Note that internally setting values 4573 * are always stored as strings, so this function converts the given 4574 * value to a string before storing it. 4575 * 4576 * @param cr The ContentResolver to access. 4577 * @param name The name of the setting to modify. 4578 * @param value The new value for the setting. 4579 * @return true if the value was set, false on database errors 4580 */ putFloat(ContentResolver cr, String name, float value)4581 public static boolean putFloat(ContentResolver cr, String name, float value) { 4582 return putFloatForUser(cr, name, value, cr.getUserId()); 4583 } 4584 4585 /** @hide */ putFloatForUser(ContentResolver cr, String name, float value, int userHandle)4586 public static boolean putFloatForUser(ContentResolver cr, String name, float value, 4587 int userHandle) { 4588 return putStringForUser(cr, name, Float.toString(value), userHandle); 4589 } 4590 4591 /** 4592 * Convenience function to read all of the current 4593 * configuration-related settings into a 4594 * {@link Configuration} object. 4595 * 4596 * @param cr The ContentResolver to access. 4597 * @param outConfig Where to place the configuration settings. 4598 */ getConfiguration(ContentResolver cr, Configuration outConfig)4599 public static void getConfiguration(ContentResolver cr, Configuration outConfig) { 4600 adjustConfigurationForUser(cr, outConfig, cr.getUserId(), 4601 false /* updateSettingsIfEmpty */); 4602 } 4603 4604 /** @hide */ adjustConfigurationForUser(ContentResolver cr, Configuration outConfig, int userHandle, boolean updateSettingsIfEmpty)4605 public static void adjustConfigurationForUser(ContentResolver cr, Configuration outConfig, 4606 int userHandle, boolean updateSettingsIfEmpty) { 4607 final float defaultFontScale = getDefaultFontScale(cr, userHandle); 4608 outConfig.fontScale = Settings.System.getFloatForUser( 4609 cr, FONT_SCALE, defaultFontScale, userHandle); 4610 if (outConfig.fontScale < 0) { 4611 outConfig.fontScale = defaultFontScale; 4612 } 4613 outConfig.fontWeightAdjustment = Settings.Secure.getIntForUser( 4614 cr, Settings.Secure.FONT_WEIGHT_ADJUSTMENT, DEFAULT_FONT_WEIGHT, userHandle); 4615 if (systemTermsOfAddressEnabled()) { 4616 GrammaticalInflectionManager manager = 4617 ActivityThread.currentApplication().getApplicationContext() 4618 .getSystemService(GrammaticalInflectionManager.class); 4619 outConfig.setGrammaticalGender( 4620 manager.peekSystemGrammaticalGenderByUserId(userHandle)); 4621 } 4622 4623 final String localeValue = 4624 Settings.System.getStringForUser(cr, SYSTEM_LOCALES, userHandle); 4625 if (localeValue != null) { 4626 outConfig.setLocales(LocaleList.forLanguageTags(localeValue)); 4627 } else { 4628 // Do not update configuration with emtpy settings since we need to take over the 4629 // locale list of previous user if the settings value is empty. This happens when a 4630 // new user is created. 4631 4632 if (updateSettingsIfEmpty) { 4633 // Make current configuration persistent. This is necessary the first time a 4634 // user log in. At the first login, the configuration settings are empty, so we 4635 // need to store the adjusted configuration as the initial settings. 4636 Settings.System.putStringForUser( 4637 cr, SYSTEM_LOCALES, outConfig.getLocales().toLanguageTags(), 4638 userHandle, DEFAULT_OVERRIDEABLE_BY_RESTORE); 4639 } 4640 } 4641 } 4642 getDefaultFontScale(ContentResolver cr, int userHandle)4643 private static float getDefaultFontScale(ContentResolver cr, int userHandle) { 4644 return com.android.window.flags.Flags.configurableFontScaleDefault() 4645 ? Settings.System.getFloatForUser(cr, DEFAULT_DEVICE_FONT_SCALE, 4646 DEFAULT_FONT_SCALE, userHandle) : DEFAULT_FONT_SCALE; 4647 } 4648 4649 /** 4650 * @hide Erase the fields in the Configuration that should be applied 4651 * by the settings. 4652 */ clearConfiguration(Configuration inoutConfig)4653 public static void clearConfiguration(Configuration inoutConfig) { 4654 inoutConfig.fontScale = 0; 4655 if (!inoutConfig.userSetLocale && !inoutConfig.getLocales().isEmpty()) { 4656 inoutConfig.clearLocales(); 4657 } 4658 inoutConfig.fontWeightAdjustment = Configuration.FONT_WEIGHT_ADJUSTMENT_UNDEFINED; 4659 } 4660 4661 /** 4662 * Convenience function to write a batch of configuration-related 4663 * settings from a {@link Configuration} object. 4664 * 4665 * @param cr The ContentResolver to access. 4666 * @param config The settings to write. 4667 * @return true if the values were set, false on database errors 4668 */ putConfiguration(ContentResolver cr, Configuration config)4669 public static boolean putConfiguration(ContentResolver cr, Configuration config) { 4670 return putConfigurationForUser(cr, config, cr.getUserId()); 4671 } 4672 4673 /** @hide */ putConfigurationForUser(ContentResolver cr, Configuration config, int userHandle)4674 public static boolean putConfigurationForUser(ContentResolver cr, Configuration config, 4675 int userHandle) { 4676 return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle) && 4677 Settings.System.putStringForUser( 4678 cr, SYSTEM_LOCALES, config.getLocales().toLanguageTags(), userHandle, 4679 DEFAULT_OVERRIDEABLE_BY_RESTORE); 4680 } 4681 4682 /** 4683 * Convenience function for checking if settings should be overwritten with config changes. 4684 * @see #putConfigurationForUser(ContentResolver, Configuration, int) 4685 * @hide 4686 */ hasInterestingConfigurationChanges(int changes)4687 public static boolean hasInterestingConfigurationChanges(int changes) { 4688 return (changes & ActivityInfo.CONFIG_FONT_SCALE) != 0 || 4689 (changes & ActivityInfo.CONFIG_LOCALE) != 0; 4690 } 4691 4692 /** @deprecated - Do not use */ 4693 @Deprecated getShowGTalkServiceStatus(ContentResolver cr)4694 public static boolean getShowGTalkServiceStatus(ContentResolver cr) { 4695 return getShowGTalkServiceStatusForUser(cr, cr.getUserId()); 4696 } 4697 4698 /** 4699 * @hide 4700 * @deprecated - Do not use 4701 */ 4702 @Deprecated getShowGTalkServiceStatusForUser(ContentResolver cr, int userHandle)4703 public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr, 4704 int userHandle) { 4705 return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0; 4706 } 4707 4708 /** @deprecated - Do not use */ 4709 @Deprecated setShowGTalkServiceStatus(ContentResolver cr, boolean flag)4710 public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) { 4711 setShowGTalkServiceStatusForUser(cr, flag, cr.getUserId()); 4712 } 4713 4714 /** 4715 * @hide 4716 * @deprecated - Do not use 4717 */ 4718 @Deprecated setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag, int userHandle)4719 public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag, 4720 int userHandle) { 4721 putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle); 4722 } 4723 4724 /** 4725 * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead 4726 */ 4727 @Deprecated 4728 public static final String STAY_ON_WHILE_PLUGGED_IN = Global.STAY_ON_WHILE_PLUGGED_IN; 4729 4730 /** 4731 * What happens when the user presses the end call button if they're not 4732 * on a call.<br/> 4733 * <b>Values:</b><br/> 4734 * 0 - The end button does nothing.<br/> 4735 * 1 - The end button goes to the home screen.<br/> 4736 * 2 - The end button puts the device to sleep and locks the keyguard.<br/> 4737 * 3 - The end button goes to the home screen. If the user is already on the 4738 * home screen, it puts the device to sleep. 4739 */ 4740 @Readable 4741 public static final String END_BUTTON_BEHAVIOR = "end_button_behavior"; 4742 4743 /** 4744 * END_BUTTON_BEHAVIOR value for "go home". 4745 * @hide 4746 */ 4747 public static final int END_BUTTON_BEHAVIOR_HOME = 0x1; 4748 4749 /** 4750 * END_BUTTON_BEHAVIOR value for "go to sleep". 4751 * @hide 4752 */ 4753 public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2; 4754 4755 /** 4756 * END_BUTTON_BEHAVIOR default value. 4757 * @hide 4758 */ 4759 public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP; 4760 4761 /** 4762 * Is advanced settings mode turned on. 0 == no, 1 == yes 4763 * @hide 4764 */ 4765 @Readable 4766 public static final String ADVANCED_SETTINGS = "advanced_settings"; 4767 4768 /** 4769 * ADVANCED_SETTINGS default value. 4770 * @hide 4771 */ 4772 public static final int ADVANCED_SETTINGS_DEFAULT = 0; 4773 4774 /** 4775 * If the triple press gesture for toggling accessibility is enabled. 4776 * Set to 1 for true and 0 for false. 4777 * 4778 * This setting is used only internally. 4779 * @hide 4780 */ 4781 public static final String WEAR_ACCESSIBILITY_GESTURE_ENABLED 4782 = "wear_accessibility_gesture_enabled"; 4783 4784 /** 4785 * If the triple press gesture for toggling accessibility is enabled during OOBE. 4786 * Set to 1 for true and 0 for false. 4787 * 4788 * This setting is used only internally. 4789 * @hide 4790 */ 4791 public static final String WEAR_ACCESSIBILITY_GESTURE_ENABLED_DURING_OOBE = 4792 "wear_accessibility_gesture_enabled_during_oobe"; 4793 4794 4795 /** 4796 * If the text-to-speech pre-warm is enabled. 4797 * Set to 1 for true and 0 for false. 4798 * 4799 * This setting is used only internally. 4800 * @hide 4801 */ 4802 public static final String WEAR_TTS_PREWARM_ENABLED = "wear_tts_prewarm_enabled"; 4803 4804 /** 4805 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead 4806 */ 4807 @Deprecated 4808 public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON; 4809 4810 /** 4811 * @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead 4812 */ 4813 @Deprecated 4814 public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH; 4815 4816 /** 4817 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead 4818 */ 4819 @Deprecated 4820 public static final String RADIO_WIFI = Global.RADIO_WIFI; 4821 4822 /** 4823 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead 4824 * {@hide} 4825 */ 4826 @Deprecated 4827 public static final String RADIO_WIMAX = Global.RADIO_WIMAX; 4828 4829 /** 4830 * @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead 4831 */ 4832 @Deprecated 4833 public static final String RADIO_CELL = Global.RADIO_CELL; 4834 4835 /** 4836 * @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead 4837 */ 4838 @Deprecated 4839 public static final String RADIO_NFC = Global.RADIO_NFC; 4840 4841 /** 4842 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead 4843 */ 4844 @Deprecated 4845 public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS; 4846 4847 /** 4848 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead 4849 * 4850 * {@hide} 4851 */ 4852 @Deprecated 4853 @UnsupportedAppUsage 4854 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = 4855 Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS; 4856 4857 /** 4858 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead 4859 */ 4860 @Deprecated 4861 public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY; 4862 4863 /** 4864 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead 4865 */ 4866 @Deprecated 4867 public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT; 4868 4869 /** 4870 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead 4871 */ 4872 @Deprecated 4873 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 4874 Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED; 4875 4876 /** 4877 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead 4878 */ 4879 @Deprecated 4880 public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER; 4881 4882 /** 4883 * @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead 4884 */ 4885 @Deprecated 4886 public static final String MODE_RINGER = Global.MODE_RINGER; 4887 4888 /** 4889 * Whether to use static IP and other static network attributes. 4890 * <p> 4891 * Set to 1 for true and 0 for false. 4892 * 4893 * @deprecated Use {@link WifiManager} instead 4894 */ 4895 @Deprecated 4896 @Readable 4897 public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip"; 4898 4899 /** 4900 * The static IP address. 4901 * <p> 4902 * Example: "192.168.1.51" 4903 * 4904 * @deprecated Use {@link WifiManager} instead 4905 */ 4906 @Deprecated 4907 @Readable 4908 public static final String WIFI_STATIC_IP = "wifi_static_ip"; 4909 4910 /** 4911 * If using static IP, the gateway's IP address. 4912 * <p> 4913 * Example: "192.168.1.1" 4914 * 4915 * @deprecated Use {@link WifiManager} instead 4916 */ 4917 @Deprecated 4918 @Readable 4919 public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway"; 4920 4921 /** 4922 * If using static IP, the net mask. 4923 * <p> 4924 * Example: "255.255.255.0" 4925 * 4926 * @deprecated Use {@link WifiManager} instead 4927 */ 4928 @Deprecated 4929 @Readable 4930 public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask"; 4931 4932 /** 4933 * If using static IP, the primary DNS's IP address. 4934 * <p> 4935 * Example: "192.168.1.1" 4936 * 4937 * @deprecated Use {@link WifiManager} instead 4938 */ 4939 @Deprecated 4940 @Readable 4941 public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1"; 4942 4943 /** 4944 * If using static IP, the secondary DNS's IP address. 4945 * <p> 4946 * Example: "192.168.1.2" 4947 * 4948 * @deprecated Use {@link WifiManager} instead 4949 */ 4950 @Deprecated 4951 @Readable 4952 public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2"; 4953 4954 /** 4955 * Determines whether remote devices may discover and/or connect to 4956 * this device. 4957 * <P>Type: INT</P> 4958 * 2 -- discoverable and connectable 4959 * 1 -- connectable but not discoverable 4960 * 0 -- neither connectable nor discoverable 4961 */ 4962 @Readable 4963 public static final String BLUETOOTH_DISCOVERABILITY = 4964 "bluetooth_discoverability"; 4965 4966 /** 4967 * Bluetooth discoverability timeout. If this value is nonzero, then 4968 * Bluetooth becomes discoverable for a certain number of seconds, 4969 * after which is becomes simply connectable. The value is in seconds. 4970 */ 4971 @Readable 4972 public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT = 4973 "bluetooth_discoverability_timeout"; 4974 4975 /** 4976 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED} 4977 * instead 4978 */ 4979 @Deprecated 4980 public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED; 4981 4982 /** 4983 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE} 4984 * instead 4985 */ 4986 @Deprecated 4987 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; 4988 4989 /** 4990 * @deprecated Use 4991 * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED} 4992 * instead 4993 */ 4994 @Deprecated 4995 public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = 4996 "lock_pattern_tactile_feedback_enabled"; 4997 4998 /** 4999 * A formatted string of the next alarm that is set, or the empty string 5000 * if there is no alarm set. 5001 * 5002 * @deprecated Use {@link android.app.AlarmManager#getNextAlarmClock()}. 5003 */ 5004 @Deprecated 5005 @Readable 5006 public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted"; 5007 5008 /** 5009 * Scaling factor for fonts, float. 5010 */ 5011 @Readable 5012 public static final String FONT_SCALE = "font_scale"; 5013 5014 /** 5015 * Default scaling factor for fonts for the specific device, float. 5016 * The value is read from the {@link R.dimen.def_device_font_scale} 5017 * configuration property. 5018 * 5019 * @hide 5020 */ 5021 @Readable 5022 public static final String DEFAULT_DEVICE_FONT_SCALE = "device_font_scale"; 5023 5024 /** 5025 * The serialized system locale value. 5026 * 5027 * Do not use this value directory. 5028 * To get system locale, use {@link LocaleList#getDefault} instead. 5029 * To update system locale, use {@link com.android.internal.app.LocalePicker#updateLocales} 5030 * instead. 5031 * @hide 5032 */ 5033 @Readable 5034 public static final String SYSTEM_LOCALES = "system_locales"; 5035 5036 5037 /** 5038 * Name of an application package to be debugged. 5039 * 5040 * @deprecated Use {@link Global#DEBUG_APP} instead 5041 */ 5042 @Deprecated 5043 public static final String DEBUG_APP = Global.DEBUG_APP; 5044 5045 /** 5046 * If 1, when launching DEBUG_APP it will wait for the debugger before 5047 * starting user code. If 0, it will run normally. 5048 * 5049 * @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead 5050 */ 5051 @Deprecated 5052 public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER; 5053 5054 /** 5055 * Whether or not to dim the screen. 0=no 1=yes 5056 * @deprecated This setting is no longer used. 5057 */ 5058 @Deprecated 5059 @Readable 5060 public static final String DIM_SCREEN = "dim_screen"; 5061 5062 /** 5063 * The display color mode. 5064 * @hide 5065 */ 5066 @Readable 5067 public static final String DISPLAY_COLOR_MODE = "display_color_mode"; 5068 5069 /** 5070 * Hint to decide whether restored vendor color modes are compatible with the new device. If 5071 * unset or a match is not made, only the standard color modes will be restored. 5072 * @hide 5073 */ 5074 public static final String DISPLAY_COLOR_MODE_VENDOR_HINT = 5075 "display_color_mode_vendor_hint"; 5076 5077 /** 5078 * The user selected min refresh rate in frames per second. If infinite, the user wants 5079 * the highest possible refresh rate. 5080 * 5081 * If this isn't set, 0 will be used. 5082 * @hide 5083 */ 5084 @Readable 5085 public static final String MIN_REFRESH_RATE = "min_refresh_rate"; 5086 5087 /** 5088 * The user selected peak refresh rate in frames per second. If infinite, the user wants 5089 * the highest possible refresh rate. 5090 * 5091 * If this isn't set, the system falls back to a device specific default. 5092 * @hide 5093 */ 5094 @Readable 5095 public static final String PEAK_REFRESH_RATE = "peak_refresh_rate"; 5096 5097 /** 5098 * Control lock behavior on fold 5099 * 5100 * If this isn't set, the system falls back to a device specific default. 5101 * @hide 5102 */ 5103 @Readable 5104 public static final String FOLD_LOCK_BEHAVIOR = "fold_lock_behavior_setting"; 5105 5106 /** 5107 * The amount of time in milliseconds before the device goes to sleep or begins 5108 * to dream after a period of inactivity. This value is also known as the 5109 * user activity timeout period since the screen isn't necessarily turned off 5110 * when it expires. 5111 * 5112 * <p> 5113 * This value is bounded by maximum timeout set by 5114 * {@link android.app.admin.DevicePolicyManager#setMaximumTimeToLock(ComponentName, long)}. 5115 */ 5116 @Readable 5117 public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout"; 5118 5119 /** 5120 * The screen backlight brightness between 0 and 255. 5121 */ 5122 @Readable 5123 public static final String SCREEN_BRIGHTNESS = "screen_brightness"; 5124 5125 /** 5126 * Control whether to enable automatic brightness mode. 5127 */ 5128 @Readable 5129 public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode"; 5130 5131 /** 5132 * Adjustment to auto-brightness to make it generally more (>0.0 <1.0) 5133 * or less (<0.0 >-1.0) bright. 5134 * @hide 5135 */ 5136 @UnsupportedAppUsage 5137 @Readable 5138 public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj"; 5139 5140 /** 5141 * SCREEN_BRIGHTNESS_MODE value for manual mode. 5142 */ 5143 public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0; 5144 5145 /** 5146 * SCREEN_BRIGHTNESS_MODE value for automatic mode. 5147 */ 5148 public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; 5149 5150 /** 5151 * Control whether to enable adaptive sleep mode. 5152 * @deprecated Use {@link android.provider.Settings.Secure#ADAPTIVE_SLEEP} instead. 5153 * @hide 5154 */ 5155 @Deprecated 5156 @Readable 5157 public static final String ADAPTIVE_SLEEP = "adaptive_sleep"; 5158 5159 /** 5160 * Control whether the process CPU usage meter should be shown. 5161 * 5162 * @deprecated This functionality is no longer available as of 5163 * {@link android.os.Build.VERSION_CODES#N_MR1}. 5164 */ 5165 @Deprecated 5166 public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES; 5167 5168 /** 5169 * If 1, the activity manager will aggressively finish activities and 5170 * processes as soon as they are no longer needed. If 0, the normal 5171 * extended lifetime is used. 5172 * 5173 * @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead 5174 */ 5175 @Deprecated 5176 public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES; 5177 5178 /** 5179 * Determines which streams are affected by ringer and zen mode changes. The 5180 * stream type's bit should be set to 1 if it should be muted when going 5181 * into an inaudible ringer mode. 5182 */ 5183 @Readable 5184 public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected"; 5185 5186 /** 5187 * Determines which streams are affected by mute. The 5188 * stream type's bit should be set to 1 if it should be muted when a mute request 5189 * is received. 5190 */ 5191 @Readable 5192 public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected"; 5193 5194 /** 5195 * Whether vibrate is on for different events. This is used internally, 5196 * changing this value will not change the vibrate. See AudioManager. 5197 */ 5198 @Readable 5199 public static final String VIBRATE_ON = "vibrate_on"; 5200 5201 /** 5202 * Whether applying ramping ringer on incoming phone call ringtone. 5203 * <p>1 = apply ramping ringer 5204 * <p>0 = do not apply ramping ringer 5205 * @hide 5206 */ 5207 @Readable 5208 public static final String APPLY_RAMPING_RINGER = "apply_ramping_ringer"; 5209 5210 /** 5211 * If 1, redirects the system vibrator to all currently attached input devices 5212 * that support vibration. If there are no such input devices, then the system 5213 * vibrator is used instead. 5214 * If 0, does not register the system vibrator. 5215 * 5216 * This setting is mainly intended to provide a compatibility mechanism for 5217 * applications that only know about the system vibrator and do not use the 5218 * input device vibrator API. 5219 * 5220 * @hide 5221 */ 5222 @Readable 5223 public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices"; 5224 5225 /** 5226 * The intensity of alarm vibrations, if configurable. 5227 * 5228 * Not all devices are capable of changing their vibration intensity; on these devices 5229 * there will likely be no difference between the various vibration intensities except for 5230 * intensity 0 (off) and the rest. 5231 * 5232 * <b>Values:</b><br/> 5233 * 0 - Vibration is disabled<br/> 5234 * 1 - Weak vibrations<br/> 5235 * 2 - Medium vibrations<br/> 5236 * 3 - Strong vibrations 5237 * @hide 5238 */ 5239 public static final String ALARM_VIBRATION_INTENSITY = 5240 "alarm_vibration_intensity"; 5241 5242 /** 5243 * The intensity of media vibrations, if configurable. 5244 * 5245 * This includes any vibration that is part of media, such as music, movie, soundtrack, 5246 * game or animations. 5247 * 5248 * Not all devices are capable of changing their vibration intensity; on these devices 5249 * there will likely be no difference between the various vibration intensities except for 5250 * intensity 0 (off) and the rest. 5251 * 5252 * <b>Values:</b><br/> 5253 * 0 - Vibration is disabled<br/> 5254 * 1 - Weak vibrations<br/> 5255 * 2 - Medium vibrations<br/> 5256 * 3 - Strong vibrations 5257 * @hide 5258 */ 5259 public static final String MEDIA_VIBRATION_INTENSITY = 5260 "media_vibration_intensity"; 5261 5262 /** 5263 * The intensity of notification vibrations, if configurable. 5264 * 5265 * Not all devices are capable of changing their vibration intensity; on these devices 5266 * there will likely be no difference between the various vibration intensities except for 5267 * intensity 0 (off) and the rest. 5268 * 5269 * <b>Values:</b><br/> 5270 * 0 - Vibration is disabled<br/> 5271 * 1 - Weak vibrations<br/> 5272 * 2 - Medium vibrations<br/> 5273 * 3 - Strong vibrations 5274 * @hide 5275 */ 5276 @Readable 5277 public static final String NOTIFICATION_VIBRATION_INTENSITY = 5278 "notification_vibration_intensity"; 5279 5280 /** 5281 * The intensity of ringtone vibrations, if configurable. 5282 * 5283 * Not all devices are capable of changing their vibration intensity; on these devices 5284 * there will likely be no difference between the various vibration intensities except for 5285 * intensity 0 (off) and the rest. 5286 * 5287 * <b>Values:</b><br/> 5288 * 0 - Vibration is disabled<br/> 5289 * 1 - Weak vibrations<br/> 5290 * 2 - Medium vibrations<br/> 5291 * 3 - Strong vibrations 5292 * @hide 5293 */ 5294 @Readable 5295 public static final String RING_VIBRATION_INTENSITY = 5296 "ring_vibration_intensity"; 5297 5298 /** 5299 * The intensity of haptic feedback vibrations, if configurable. 5300 * 5301 * Not all devices are capable of changing their feedback intensity; on these devices 5302 * there will likely be no difference between the various vibration intensities except for 5303 * intensity 0 (off) and the rest. 5304 * 5305 * <b>Values:</b><br/> 5306 * 0 - Vibration is disabled<br/> 5307 * 1 - Weak vibrations<br/> 5308 * 2 - Medium vibrations<br/> 5309 * 3 - Strong vibrations 5310 * @hide 5311 */ 5312 @Readable 5313 public static final String HAPTIC_FEEDBACK_INTENSITY = 5314 "haptic_feedback_intensity"; 5315 5316 /** 5317 * The intensity of haptic feedback vibrations for interaction with hardware components from 5318 * the device, like buttons and sensors, if configurable. 5319 * 5320 * Not all devices are capable of changing their feedback intensity; on these devices 5321 * there will likely be no difference between the various vibration intensities except for 5322 * intensity 0 (off) and the rest. 5323 * 5324 * <b>Values:</b><br/> 5325 * 0 - Vibration is disabled<br/> 5326 * 1 - Weak vibrations<br/> 5327 * 2 - Medium vibrations<br/> 5328 * 3 - Strong vibrations 5329 * @hide 5330 */ 5331 public static final String HARDWARE_HAPTIC_FEEDBACK_INTENSITY = 5332 "hardware_haptic_feedback_intensity"; 5333 5334 /** 5335 * Whether keyboard vibration feedback is enabled. The value is boolean (1 or 0). 5336 * 5337 * @hide 5338 */ 5339 @Readable 5340 public static final String KEYBOARD_VIBRATION_ENABLED = "keyboard_vibration_enabled"; 5341 5342 /** 5343 * Ringer volume. This is used internally, changing this value will not 5344 * change the volume. See AudioManager. 5345 * 5346 * @removed Not used by anything since API 2. 5347 */ 5348 @Readable 5349 public static final String VOLUME_RING = "volume_ring"; 5350 5351 /** 5352 * System/notifications volume. This is used internally, changing this 5353 * value will not change the volume. See AudioManager. 5354 * 5355 * @removed Not used by anything since API 2. 5356 */ 5357 @Readable 5358 public static final String VOLUME_SYSTEM = "volume_system"; 5359 5360 /** 5361 * Voice call volume. This is used internally, changing this value will 5362 * not change the volume. See AudioManager. 5363 * 5364 * @removed Not used by anything since API 2. 5365 */ 5366 @Readable 5367 public static final String VOLUME_VOICE = "volume_voice"; 5368 5369 /** 5370 * Music/media/gaming volume. This is used internally, changing this 5371 * value will not change the volume. See AudioManager. 5372 * 5373 * @removed Not used by anything since API 2. 5374 */ 5375 @Readable 5376 public static final String VOLUME_MUSIC = "volume_music"; 5377 5378 /** 5379 * Alarm volume. This is used internally, changing this 5380 * value will not change the volume. See AudioManager. 5381 * 5382 * @removed Not used by anything since API 2. 5383 */ 5384 @Readable 5385 public static final String VOLUME_ALARM = "volume_alarm"; 5386 5387 /** 5388 * Notification volume. This is used internally, changing this 5389 * value will not change the volume. See AudioManager. 5390 * 5391 * @removed Not used by anything since API 2. 5392 */ 5393 @Readable 5394 public static final String VOLUME_NOTIFICATION = "volume_notification"; 5395 5396 /** 5397 * Bluetooth Headset volume. This is used internally, changing this value will 5398 * not change the volume. See AudioManager. 5399 * 5400 * @removed Not used by anything since API 2. 5401 */ 5402 @Readable 5403 public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco"; 5404 5405 /** 5406 * @hide 5407 * Acessibility volume. This is used internally, changing this 5408 * value will not change the volume. 5409 */ 5410 @Readable 5411 public static final String VOLUME_ACCESSIBILITY = "volume_a11y"; 5412 5413 /** 5414 * @hide 5415 * Volume index for virtual assistant. 5416 */ 5417 @Readable 5418 public static final String VOLUME_ASSISTANT = "volume_assistant"; 5419 5420 /** 5421 * Master volume (float in the range 0.0f to 1.0f). 5422 * 5423 * @hide 5424 */ 5425 @Readable 5426 public static final String VOLUME_MASTER = "volume_master"; 5427 5428 /** 5429 * Master mono (int 1 = mono, 0 = normal). 5430 * 5431 * @hide 5432 */ 5433 @UnsupportedAppUsage 5434 @Readable 5435 public static final String MASTER_MONO = "master_mono"; 5436 5437 /** 5438 * Master balance (float -1.f = 100% left, 0.f = dead center, 1.f = 100% right). 5439 * 5440 * @hide 5441 */ 5442 @Readable 5443 public static final String MASTER_BALANCE = "master_balance"; 5444 5445 /** 5446 * Whether the notifications should use the ring volume (value of 1) or 5447 * a separate notification volume (value of 0). In most cases, users 5448 * will have this enabled so the notification and ringer volumes will be 5449 * the same. However, power users can disable this and use the separate 5450 * notification volume control. 5451 * <p> 5452 * Note: This is a one-off setting that will be removed in the future 5453 * when there is profile support. For this reason, it is kept hidden 5454 * from the public APIs. 5455 * 5456 * @hide 5457 * @deprecated 5458 */ 5459 @Deprecated 5460 @Readable 5461 public static final String NOTIFICATIONS_USE_RING_VOLUME = 5462 "notifications_use_ring_volume"; 5463 5464 /** 5465 * Whether silent mode should allow vibration feedback. This is used 5466 * internally in AudioService and the Sound settings activity to 5467 * coordinate decoupling of vibrate and silent modes. This setting 5468 * will likely be removed in a future release with support for 5469 * audio/vibe feedback profiles. 5470 * 5471 * Not used anymore. On devices with vibrator, the user explicitly selects 5472 * silent or vibrate mode. 5473 * Kept for use by legacy database upgrade code in DatabaseHelper. 5474 * @hide 5475 */ 5476 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 5477 @Readable 5478 public static final String VIBRATE_IN_SILENT = "vibrate_in_silent"; 5479 5480 /** 5481 * The mapping of stream type (integer) to its setting. 5482 * 5483 * @removed Not used by anything since API 2. 5484 */ 5485 public static final String[] VOLUME_SETTINGS = { 5486 VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC, 5487 VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO 5488 }; 5489 5490 /** 5491 * @hide 5492 * The mapping of stream type (integer) to its setting. 5493 * Unlike the VOLUME_SETTINGS array, this one contains as many entries as 5494 * AudioSystem.NUM_STREAM_TYPES, and has empty strings for stream types whose volumes 5495 * are never persisted. 5496 */ 5497 public static final String[] VOLUME_SETTINGS_INT = { 5498 VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC, 5499 VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO, 5500 "" /*STREAM_SYSTEM_ENFORCED, no setting for this stream*/, 5501 "" /*STREAM_DTMF, no setting for this stream*/, 5502 "" /*STREAM_TTS, no setting for this stream*/, 5503 VOLUME_ACCESSIBILITY, VOLUME_ASSISTANT 5504 }; 5505 5506 /** 5507 * Appended to various volume related settings to record the previous 5508 * values before they the settings were affected by a silent/vibrate 5509 * ringer mode change. 5510 * 5511 * @removed Not used by anything since API 2. 5512 */ 5513 @Readable 5514 public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible"; 5515 5516 /** 5517 * Persistent store for the system-wide default ringtone URI. 5518 * <p> 5519 * If you need to play the default ringtone at any given time, it is recommended 5520 * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve 5521 * to the set default ringtone at the time of playing. 5522 * 5523 * @see #DEFAULT_RINGTONE_URI 5524 */ 5525 @Readable 5526 public static final String RINGTONE = "ringtone"; 5527 5528 /** 5529 * A {@link Uri} that will point to the current default ringtone at any 5530 * given time. 5531 * <p> 5532 * If the current default ringtone is in the DRM provider and the caller 5533 * does not have permission, the exception will be a 5534 * FileNotFoundException. 5535 */ 5536 public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE); 5537 5538 /** {@hide} */ 5539 public static final String RINGTONE_CACHE = "ringtone_cache"; 5540 /** {@hide} */ 5541 public static final Uri RINGTONE_CACHE_URI = getUriFor(RINGTONE_CACHE); 5542 5543 /** 5544 * Persistent store for the system-wide default notification sound. 5545 * 5546 * @see #RINGTONE 5547 * @see #DEFAULT_NOTIFICATION_URI 5548 */ 5549 @Readable 5550 public static final String NOTIFICATION_SOUND = "notification_sound"; 5551 5552 /** 5553 * A {@link Uri} that will point to the current default notification 5554 * sound at any given time. 5555 * 5556 * @see #DEFAULT_RINGTONE_URI 5557 */ 5558 public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND); 5559 5560 /** {@hide} */ 5561 @Readable 5562 public static final String NOTIFICATION_SOUND_CACHE = "notification_sound_cache"; 5563 /** {@hide} */ 5564 public static final Uri NOTIFICATION_SOUND_CACHE_URI = getUriFor(NOTIFICATION_SOUND_CACHE); 5565 5566 /** 5567 * When enabled, notifications attention effects: sound, vibration, flashing 5568 * will have a cooldown timer. 5569 * 5570 * The value 1 - enable, 0 - disable 5571 * @hide 5572 */ 5573 public static final String NOTIFICATION_COOLDOWN_ENABLED = 5574 "notification_cooldown_enabled"; 5575 5576 /** 5577 * When enabled, notification cooldown will apply to all notifications. 5578 * Otherwise cooldown will only apply to conversations. 5579 * 5580 * The value 1 - enable, 0 - disable 5581 * Only valid if {@code NOTIFICATION_COOLDOWN_ENABLED} is enabled. 5582 * @hide 5583 */ 5584 public static final String NOTIFICATION_COOLDOWN_ALL = 5585 "notification_cooldown_all"; 5586 5587 /** 5588 * When enabled, notification attention effects will be restricted to vibration only 5589 * as long as the screen is unlocked. 5590 * 5591 * The value 1 - enable, 0 - disable 5592 * @hide 5593 */ 5594 public static final String NOTIFICATION_COOLDOWN_VIBRATE_UNLOCKED = 5595 "notification_cooldown_vibrate_unlocked"; 5596 5597 /** 5598 * Persistent store for the system-wide default alarm alert. 5599 * 5600 * @see #RINGTONE 5601 * @see #DEFAULT_ALARM_ALERT_URI 5602 */ 5603 @Readable 5604 public static final String ALARM_ALERT = "alarm_alert"; 5605 5606 /** 5607 * A {@link Uri} that will point to the current default alarm alert at 5608 * any given time. 5609 * 5610 * @see #DEFAULT_ALARM_ALERT_URI 5611 */ 5612 public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT); 5613 5614 /** {@hide} */ 5615 @Readable 5616 public static final String ALARM_ALERT_CACHE = "alarm_alert_cache"; 5617 /** {@hide} */ 5618 public static final Uri ALARM_ALERT_CACHE_URI = getUriFor(ALARM_ALERT_CACHE); 5619 5620 /** 5621 * Persistent store for the system default media button event receiver. 5622 * 5623 * @hide 5624 */ 5625 @Readable(maxTargetSdk = Build.VERSION_CODES.R) 5626 public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver"; 5627 5628 /** 5629 * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off 5630 */ 5631 @Readable 5632 public static final String TEXT_AUTO_REPLACE = "auto_replace"; 5633 5634 /** 5635 * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off 5636 */ 5637 @Readable 5638 public static final String TEXT_AUTO_CAPS = "auto_caps"; 5639 5640 /** 5641 * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This 5642 * feature converts two spaces to a "." and space. 5643 */ 5644 @Readable 5645 public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate"; 5646 5647 /** 5648 * Setting to showing password characters in text editors. 1 = On, 0 = Off 5649 */ 5650 @Readable 5651 public static final String TEXT_SHOW_PASSWORD = "show_password"; 5652 5653 @Readable 5654 public static final String SHOW_GTALK_SERVICE_STATUS = 5655 "SHOW_GTALK_SERVICE_STATUS"; 5656 5657 /** 5658 * Name of activity to use for wallpaper on the home screen. 5659 * 5660 * @deprecated Use {@link WallpaperManager} instead. 5661 */ 5662 @Deprecated 5663 @Readable 5664 public static final String WALLPAPER_ACTIVITY = "wallpaper_activity"; 5665 5666 /** 5667 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME} 5668 * instead 5669 */ 5670 @Deprecated 5671 public static final String AUTO_TIME = Global.AUTO_TIME; 5672 5673 /** 5674 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE} 5675 * instead 5676 */ 5677 @Deprecated 5678 public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE; 5679 5680 /** 5681 * Display the user's times, e.g. in the status bar, as 12 or 24 hours. 5682 * <ul> 5683 * <li>24 = 24 hour</li> 5684 * <li>12 = 12 hour</li> 5685 * <li>[unset] = use the device locale's default</li> 5686 * </ul> 5687 */ 5688 @Readable 5689 public static final String TIME_12_24 = "time_12_24"; 5690 5691 /** 5692 * @deprecated No longer used. Use {@link #TIME_12_24} instead. 5693 */ 5694 @Deprecated 5695 @Readable 5696 public static final String DATE_FORMAT = "date_format"; 5697 5698 /** 5699 * Whether the setup wizard has been run before (on first boot), or if 5700 * it still needs to be run. 5701 * 5702 * nonzero = it has been run in the past 5703 * 0 = it has not been run in the past 5704 */ 5705 @Readable 5706 public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run"; 5707 5708 /** 5709 * Scaling factor for normal window animations. Setting to 0 will disable window 5710 * animations. 5711 * 5712 * @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead 5713 */ 5714 @Deprecated 5715 public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE; 5716 5717 /** 5718 * Scaling factor for activity transition animations. Setting to 0 will disable window 5719 * animations. 5720 * 5721 * @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead 5722 */ 5723 @Deprecated 5724 public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE; 5725 5726 /** 5727 * Scaling factor for Animator-based animations. This affects both the start delay and 5728 * duration of all such animations. Setting to 0 will cause animations to end immediately. 5729 * The default value is 1. 5730 * 5731 * @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead 5732 */ 5733 @Deprecated 5734 public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE; 5735 5736 /** 5737 * Control whether the accelerometer will be used to change screen 5738 * orientation. If 0, it will not be used unless explicitly requested 5739 * by the application; if 1, it will be used by default unless explicitly 5740 * disabled by the application. 5741 */ 5742 @Readable 5743 public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; 5744 5745 /** 5746 * Default screen rotation when no other policy applies. 5747 * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a 5748 * preference, this rotation value will be used. Must be one of the 5749 * {@link android.view.Surface#ROTATION_0 Surface rotation constants}. 5750 * 5751 * @see Display#getRotation 5752 */ 5753 @Readable 5754 public static final String USER_ROTATION = "user_rotation"; 5755 5756 /** 5757 * Control whether the rotation lock toggle in the System UI should be hidden. 5758 * Typically this is done for accessibility purposes to make it harder for 5759 * the user to accidentally toggle the rotation lock while the display rotation 5760 * has been locked for accessibility. 5761 * 5762 * If 0, then rotation lock toggle is not hidden for accessibility (although it may be 5763 * unavailable for other reasons). If 1, then the rotation lock toggle is hidden. 5764 * 5765 * @hide 5766 */ 5767 @UnsupportedAppUsage 5768 @Readable 5769 public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY = 5770 "hide_rotation_lock_toggle_for_accessibility"; 5771 5772 /** 5773 * Whether the phone vibrates when it is ringing due to an incoming call. This will 5774 * be used by Phone and Setting apps; it shouldn't affect other apps. 5775 * The value is boolean (1 or 0). 5776 * 5777 * Note: this is not same as "vibrate on ring", which had been available until ICS. 5778 * It was about AudioManager's setting and thus affected all the applications which 5779 * relied on the setting, while this is purely about the vibration setting for incoming 5780 * calls. 5781 * 5782 * @deprecated Replaced by using {@link android.os.VibrationAttributes#USAGE_RINGTONE} on 5783 * vibrations for incoming calls. User settings are applied automatically by the service and 5784 * should not be applied by individual apps. 5785 */ 5786 @Deprecated 5787 @Readable 5788 public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing"; 5789 5790 /** 5791 * When {@code 1}, Telecom enhanced call blocking functionality is enabled. When 5792 * {@code 0}, enhanced call blocking functionality is disabled. 5793 * @hide 5794 */ 5795 @Readable 5796 public static final String DEBUG_ENABLE_ENHANCED_CALL_BLOCKING = 5797 "debug.enable_enhanced_calling"; 5798 5799 /** 5800 * Whether the audible DTMF tones are played by the dialer when dialing. The value is 5801 * boolean (1 or 0). 5802 */ 5803 @Readable 5804 public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone"; 5805 5806 /** 5807 * CDMA only settings 5808 * DTMF tone type played by the dialer when dialing. 5809 * 0 = Normal 5810 * 1 = Long 5811 */ 5812 @Readable 5813 public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; 5814 5815 /** 5816 * Whether the hearing aid is enabled. The value is 5817 * boolean (1 or 0). 5818 * @hide 5819 */ 5820 @UnsupportedAppUsage 5821 @Readable 5822 public static final String HEARING_AID = "hearing_aid"; 5823 5824 /** 5825 * CDMA only settings 5826 * TTY Mode 5827 * 0 = OFF 5828 * 1 = FULL 5829 * 2 = VCO 5830 * 3 = HCO 5831 * @hide 5832 */ 5833 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 5834 @Readable 5835 public static final String TTY_MODE = "tty_mode"; 5836 5837 /** 5838 * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is 5839 * boolean (1 or 0). 5840 */ 5841 @Readable 5842 public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; 5843 5844 /** 5845 * Whether haptic feedback (Vibrate on tap) is enabled. The value is 5846 * boolean (1 or 0). 5847 * 5848 * @deprecated Replaced by using {@link android.os.VibrationAttributes#USAGE_TOUCH} on 5849 * vibrations. User settings are applied automatically by the service and should not be 5850 * applied by individual apps. 5851 */ 5852 @Deprecated 5853 @Readable 5854 public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled"; 5855 5856 /** 5857 * @deprecated Each application that shows web suggestions should have its own 5858 * setting for this. 5859 */ 5860 @Deprecated 5861 @Readable 5862 public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; 5863 5864 /** 5865 * Whether the notification LED should repeatedly flash when a notification is 5866 * pending. The value is boolean (1 or 0). 5867 * @hide 5868 */ 5869 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 5870 @Readable 5871 public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; 5872 5873 /** 5874 * Show pointer location on screen? 5875 * 0 = no 5876 * 1 = yes 5877 * @hide 5878 */ 5879 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 5880 @Readable 5881 public static final String POINTER_LOCATION = "pointer_location"; 5882 5883 /** 5884 * Show touch positions on screen? 5885 * 0 = no 5886 * 1 = yes 5887 * @hide 5888 */ 5889 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 5890 @Readable 5891 public static final String SHOW_TOUCHES = "show_touches"; 5892 5893 /** 5894 * Show key presses dispatched to focused windows on the screen. 5895 * 0 = no 5896 * 1 = yes 5897 * @hide 5898 */ 5899 public static final String SHOW_KEY_PRESSES = "show_key_presses"; 5900 5901 /** 5902 * Show rotary input dispatched to focused windows on the screen. 5903 * 0 = no 5904 * 1 = yes 5905 * @hide 5906 */ 5907 public static final String SHOW_ROTARY_INPUT = "show_rotary_input"; 5908 5909 /** 5910 * The screen backlight brightness for automatic mode. 5911 * 5912 * <p>Value should be one of: 5913 * <ul> 5914 * <li>SCREEN_BRIGHTNESS_AUTOMATIC_BRIGHT 5915 * <li>SCREEN_BRIGHTNESS_AUTOMATIC_NORMAL 5916 * <li>SCREEN_BRIGHTNESS_AUTOMATIC_DIM 5917 * </ul> 5918 * @hide 5919 */ 5920 public static final String SCREEN_BRIGHTNESS_FOR_ALS = "screen_brightness_for_als"; 5921 5922 /** 5923 * SCREEN_BRIGHTNESS_FOR_ALS value for automatic bright. 5924 * @hide 5925 */ 5926 public static final int SCREEN_BRIGHTNESS_AUTOMATIC_BRIGHT = 1; 5927 5928 /** 5929 * SCREEN_BRIGHTNESS_FOR_ALS value for automatic normal. 5930 * @hide 5931 */ 5932 public static final int SCREEN_BRIGHTNESS_AUTOMATIC_NORMAL = 2; 5933 5934 /** 5935 * SCREEN_BRIGHTNESS_FOR_ALS value for automatic dim. 5936 * @hide 5937 */ 5938 public static final int SCREEN_BRIGHTNESS_AUTOMATIC_DIM = 3; 5939 5940 /** 5941 * Log raw orientation data from 5942 * {@link com.android.server.policy.WindowOrientationListener} for use with the 5943 * orientationplot.py tool. 5944 * 0 = no 5945 * 1 = yes 5946 * @hide 5947 */ 5948 @Readable 5949 public static final String WINDOW_ORIENTATION_LISTENER_LOG = 5950 "window_orientation_listener_log"; 5951 5952 /** 5953 * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED} 5954 * instead 5955 * @hide 5956 */ 5957 @Deprecated 5958 public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED; 5959 5960 /** 5961 * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED} 5962 * instead 5963 * @hide 5964 */ 5965 @Deprecated 5966 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 5967 public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED; 5968 5969 /** 5970 * Whether to play sounds when the keyguard is shown and dismissed. 5971 * @hide 5972 */ 5973 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 5974 @Readable 5975 public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled"; 5976 5977 /** 5978 * Whether the lockscreen should be completely disabled. 5979 * @hide 5980 */ 5981 @Readable 5982 public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled"; 5983 5984 /** 5985 * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND} 5986 * instead 5987 * @hide 5988 */ 5989 @Deprecated 5990 public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND; 5991 5992 /** 5993 * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND} 5994 * instead 5995 * @hide 5996 */ 5997 @Deprecated 5998 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 5999 public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND; 6000 6001 /** 6002 * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND} 6003 * instead 6004 * @hide 6005 */ 6006 @Deprecated 6007 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6008 public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND; 6009 6010 /** 6011 * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND} 6012 * instead 6013 * @hide 6014 */ 6015 @Deprecated 6016 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6017 public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND; 6018 6019 /** 6020 * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND} 6021 * instead 6022 * @hide 6023 */ 6024 @Deprecated 6025 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6026 public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND; 6027 6028 /** 6029 * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND} 6030 * instead 6031 * @hide 6032 */ 6033 @Deprecated 6034 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6035 public static final String LOCK_SOUND = Global.LOCK_SOUND; 6036 6037 /** 6038 * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND} 6039 * instead 6040 * @hide 6041 */ 6042 @Deprecated 6043 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6044 public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND; 6045 6046 /** 6047 * Receive incoming SIP calls? 6048 * 0 = no 6049 * 1 = yes 6050 * @hide 6051 */ 6052 @Readable 6053 public static final String SIP_RECEIVE_CALLS = "sip_receive_calls"; 6054 6055 /** 6056 * Call Preference String. 6057 * "SIP_ALWAYS" : Always use SIP with network access 6058 * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address 6059 * @hide 6060 */ 6061 @Readable 6062 public static final String SIP_CALL_OPTIONS = "sip_call_options"; 6063 6064 /** 6065 * One of the sip call options: Always use SIP with network access. 6066 * @hide 6067 */ 6068 @Readable 6069 public static final String SIP_ALWAYS = "SIP_ALWAYS"; 6070 6071 /** 6072 * One of the sip call options: Only if destination is a SIP address. 6073 * @hide 6074 */ 6075 @Readable 6076 public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY"; 6077 6078 /** 6079 * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that 6080 * the user should be prompted each time a call is made whether it should be placed using 6081 * SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with 6082 * SIP_ADDRESS_ONLY. 6083 * @hide 6084 */ 6085 @Deprecated 6086 @Readable 6087 public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME"; 6088 6089 /** 6090 * Pointer speed setting. 6091 * This is an integer value in a range between -7 and +7, so there are 15 possible values. 6092 * -7 = slowest 6093 * 0 = default speed 6094 * +7 = fastest 6095 * @hide 6096 */ 6097 @SuppressLint({"NoSettingsProvider", "UnflaggedApi"}) // TestApi without associated feature. 6098 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6099 @Readable 6100 @TestApi 6101 public static final String POINTER_SPEED = "pointer_speed"; 6102 6103 /** 6104 * Pointer scale setting. 6105 * 6106 * <p>This float value represents the scale by which the size of the pointer increases. 6107 * @hide 6108 */ 6109 @Readable 6110 public static final String POINTER_SCALE = "pointer_scale"; 6111 6112 /** 6113 * Touchpad pointer speed setting. 6114 * This is an integer value in a range between -7 and +7, so there are 15 possible values. 6115 * -7 = slowest 6116 * 0 = default speed 6117 * +7 = fastest 6118 * @hide 6119 */ 6120 public static final String TOUCHPAD_POINTER_SPEED = "touchpad_pointer_speed"; 6121 6122 /** 6123 * Whether to invert the touchpad scrolling direction. 6124 * 6125 * If set to 1 (the default), moving two fingers downwards on the touchpad will scroll 6126 * upwards, consistent with normal touchscreen scrolling. If set to 0, moving two fingers 6127 * downwards will scroll downwards. 6128 * 6129 * @hide 6130 */ 6131 @Readable 6132 public static final String TOUCHPAD_NATURAL_SCROLLING = "touchpad_natural_scrolling"; 6133 6134 /** 6135 * Whether to enable tap-to-click on touchpads. 6136 * 6137 * @hide 6138 */ 6139 public static final String TOUCHPAD_TAP_TO_CLICK = "touchpad_tap_to_click"; 6140 6141 /** 6142 * Whether to enable tap dragging on touchpads. 6143 * 6144 * @hide 6145 */ 6146 public static final String TOUCHPAD_TAP_DRAGGING = "touchpad_tap_dragging"; 6147 6148 /** 6149 * Whether to enable a right-click zone on touchpads. 6150 * 6151 * When set to 1, pressing to click in a section on the right-hand side of the touchpad will 6152 * result in a context click (a.k.a. right click). 6153 * 6154 * @hide 6155 */ 6156 public static final String TOUCHPAD_RIGHT_CLICK_ZONE = "touchpad_right_click_zone"; 6157 6158 /** 6159 * Pointer fill style, specified by 6160 * {@link android.view.PointerIcon.PointerIconVectorStyleFill} constants. 6161 * 6162 * @hide 6163 */ 6164 @Readable 6165 public static final String POINTER_FILL_STYLE = "pointer_fill_style"; 6166 6167 /** 6168 * Whether lock-to-app will be triggered by long-press on recents. 6169 * @hide 6170 */ 6171 @Readable 6172 public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled"; 6173 6174 /** 6175 * I am the lolrus. 6176 * <p> 6177 * Nonzero values indicate that the user has a bukkit. 6178 * Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>. 6179 * @hide 6180 */ 6181 @Readable 6182 public static final String EGG_MODE = "egg_mode"; 6183 6184 /** 6185 * Setting to determine whether or not to show the battery percentage in the status bar. 6186 * 0 - Don't show percentage 6187 * 1 - Show percentage 6188 * @hide 6189 */ 6190 @Readable 6191 public static final String SHOW_BATTERY_PERCENT = "status_bar_show_battery_percent"; 6192 6193 /** 6194 * Whether or not to enable multiple audio focus. 6195 * When enabled, requires more management by user over application playback activity, 6196 * for instance pausing media apps when another starts. 6197 * @hide 6198 */ 6199 @Readable 6200 public static final String MULTI_AUDIO_FOCUS_ENABLED = "multi_audio_focus_enabled"; 6201 6202 /** 6203 * The information of locale preference. This records user's preference to avoid 6204 * unsynchronized and existing locale preference in 6205 * {@link Locale#getDefault(Locale.Category)}. 6206 * 6207 * <p><b>Note:</b> The format follow the 6208 * <a href="https://www.rfc-editor.org/rfc/bcp/bcp47.txt">IETF BCP47 expression</a> 6209 * 6210 * E.g. : und-u-ca-gregorian-hc-h23 6211 * @hide 6212 */ 6213 public static final String LOCALE_PREFERENCES = "locale_preferences"; 6214 6215 /** 6216 * Setting to enable camera flash notification feature. 6217 * <ul> 6218 * <li> 0 = Off 6219 * <li> 1 = On 6220 * </ul> 6221 * @hide 6222 */ 6223 public static final String CAMERA_FLASH_NOTIFICATION = "camera_flash_notification"; 6224 6225 /** 6226 * Setting to enable screen flash notification feature. 6227 * <ul> 6228 * <li> 0 = Off 6229 * <li> 1 = On 6230 * </ul> 6231 * @hide 6232 */ 6233 public static final String SCREEN_FLASH_NOTIFICATION = "screen_flash_notification"; 6234 6235 /** 6236 * Integer property that specifes the color for screen flash notification as a 6237 * packed 32-bit color. 6238 * 6239 * @see android.graphics.Color#argb 6240 * @hide 6241 */ 6242 public static final String SCREEN_FLASH_NOTIFICATION_COLOR = 6243 "screen_flash_notification_color_global"; 6244 6245 /** 6246 * IMPORTANT: If you add a new public settings you also have to add it to 6247 * PUBLIC_SETTINGS below. If the new setting is hidden you have to add 6248 * it to PRIVATE_SETTINGS below. Also add a validator that can validate 6249 * the setting value. See an example above. 6250 */ 6251 6252 /** 6253 * Keys we no longer back up under the current schema, but want to continue to 6254 * process when restoring historical backup datasets. 6255 * 6256 * All settings in {@link LEGACY_RESTORE_SETTINGS} array *must* have a non-null validator, 6257 * otherwise they won't be restored. 6258 * 6259 * @hide 6260 */ 6261 public static final String[] LEGACY_RESTORE_SETTINGS = { 6262 }; 6263 6264 /** 6265 * These are all public system settings 6266 * 6267 * @hide 6268 */ 6269 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6270 public static final Set<String> PUBLIC_SETTINGS = new ArraySet<>(); 6271 static { 6272 PUBLIC_SETTINGS.add(END_BUTTON_BEHAVIOR); 6273 PUBLIC_SETTINGS.add(WIFI_USE_STATIC_IP); 6274 PUBLIC_SETTINGS.add(WIFI_STATIC_IP); 6275 PUBLIC_SETTINGS.add(WIFI_STATIC_GATEWAY); 6276 PUBLIC_SETTINGS.add(WIFI_STATIC_NETMASK); 6277 PUBLIC_SETTINGS.add(WIFI_STATIC_DNS1); 6278 PUBLIC_SETTINGS.add(WIFI_STATIC_DNS2); 6279 PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY); 6280 PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY_TIMEOUT); 6281 PUBLIC_SETTINGS.add(NEXT_ALARM_FORMATTED); 6282 PUBLIC_SETTINGS.add(FONT_SCALE); 6283 PUBLIC_SETTINGS.add(SYSTEM_LOCALES); 6284 PUBLIC_SETTINGS.add(DIM_SCREEN); 6285 PUBLIC_SETTINGS.add(SCREEN_OFF_TIMEOUT); 6286 PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS); 6287 PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_MODE); 6288 PUBLIC_SETTINGS.add(MODE_RINGER_STREAMS_AFFECTED); 6289 PUBLIC_SETTINGS.add(MUTE_STREAMS_AFFECTED); 6290 PUBLIC_SETTINGS.add(VIBRATE_ON); 6291 PUBLIC_SETTINGS.add(VOLUME_RING); 6292 PUBLIC_SETTINGS.add(VOLUME_SYSTEM); 6293 PUBLIC_SETTINGS.add(VOLUME_VOICE); 6294 PUBLIC_SETTINGS.add(VOLUME_MUSIC); 6295 PUBLIC_SETTINGS.add(VOLUME_ALARM); 6296 PUBLIC_SETTINGS.add(VOLUME_NOTIFICATION); 6297 PUBLIC_SETTINGS.add(VOLUME_BLUETOOTH_SCO); 6298 PUBLIC_SETTINGS.add(VOLUME_ASSISTANT); 6299 PUBLIC_SETTINGS.add(RINGTONE); 6300 PUBLIC_SETTINGS.add(NOTIFICATION_SOUND); 6301 PUBLIC_SETTINGS.add(ALARM_ALERT); 6302 PUBLIC_SETTINGS.add(TEXT_AUTO_REPLACE); 6303 PUBLIC_SETTINGS.add(TEXT_AUTO_CAPS); 6304 PUBLIC_SETTINGS.add(TEXT_AUTO_PUNCTUATE); 6305 PUBLIC_SETTINGS.add(TEXT_SHOW_PASSWORD); 6306 PUBLIC_SETTINGS.add(SHOW_GTALK_SERVICE_STATUS); 6307 PUBLIC_SETTINGS.add(WALLPAPER_ACTIVITY); 6308 PUBLIC_SETTINGS.add(TIME_12_24); 6309 PUBLIC_SETTINGS.add(DATE_FORMAT); 6310 PUBLIC_SETTINGS.add(SETUP_WIZARD_HAS_RUN); 6311 PUBLIC_SETTINGS.add(ACCELEROMETER_ROTATION); 6312 PUBLIC_SETTINGS.add(USER_ROTATION); 6313 PUBLIC_SETTINGS.add(DTMF_TONE_WHEN_DIALING); 6314 PUBLIC_SETTINGS.add(SOUND_EFFECTS_ENABLED); 6315 PUBLIC_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED); 6316 PUBLIC_SETTINGS.add(SHOW_WEB_SUGGESTIONS); 6317 PUBLIC_SETTINGS.add(VIBRATE_WHEN_RINGING); 6318 PUBLIC_SETTINGS.add(APPLY_RAMPING_RINGER); 6319 } 6320 6321 /** 6322 * These are all hidden system settings. 6323 * 6324 * @hide 6325 */ 6326 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6327 public static final Set<String> PRIVATE_SETTINGS = new ArraySet<>(); 6328 static { 6329 PRIVATE_SETTINGS.add(WIFI_USE_STATIC_IP); 6330 PRIVATE_SETTINGS.add(END_BUTTON_BEHAVIOR); 6331 PRIVATE_SETTINGS.add(ADVANCED_SETTINGS); 6332 PRIVATE_SETTINGS.add(WEAR_ACCESSIBILITY_GESTURE_ENABLED); 6333 PRIVATE_SETTINGS.add(WEAR_ACCESSIBILITY_GESTURE_ENABLED_DURING_OOBE); 6334 PRIVATE_SETTINGS.add(WEAR_TTS_PREWARM_ENABLED); 6335 PRIVATE_SETTINGS.add(SCREEN_AUTO_BRIGHTNESS_ADJ); 6336 PRIVATE_SETTINGS.add(VIBRATE_INPUT_DEVICES); 6337 PRIVATE_SETTINGS.add(VOLUME_MASTER); 6338 PRIVATE_SETTINGS.add(MASTER_MONO); 6339 PRIVATE_SETTINGS.add(MASTER_BALANCE); 6340 PRIVATE_SETTINGS.add(NOTIFICATIONS_USE_RING_VOLUME); 6341 PRIVATE_SETTINGS.add(VIBRATE_IN_SILENT); 6342 PRIVATE_SETTINGS.add(MEDIA_BUTTON_RECEIVER); 6343 PRIVATE_SETTINGS.add(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY); 6344 PRIVATE_SETTINGS.add(DTMF_TONE_TYPE_WHEN_DIALING); 6345 PRIVATE_SETTINGS.add(HEARING_AID); 6346 PRIVATE_SETTINGS.add(TTY_MODE); 6347 PRIVATE_SETTINGS.add(NOTIFICATION_LIGHT_PULSE); 6348 PRIVATE_SETTINGS.add(POINTER_LOCATION); 6349 PRIVATE_SETTINGS.add(SHOW_TOUCHES); 6350 PRIVATE_SETTINGS.add(SHOW_KEY_PRESSES); 6351 PRIVATE_SETTINGS.add(WINDOW_ORIENTATION_LISTENER_LOG); 6352 PRIVATE_SETTINGS.add(POWER_SOUNDS_ENABLED); 6353 PRIVATE_SETTINGS.add(DOCK_SOUNDS_ENABLED); 6354 PRIVATE_SETTINGS.add(LOCKSCREEN_SOUNDS_ENABLED); 6355 PRIVATE_SETTINGS.add(LOCKSCREEN_DISABLED); 6356 PRIVATE_SETTINGS.add(LOW_BATTERY_SOUND); 6357 PRIVATE_SETTINGS.add(DESK_DOCK_SOUND); 6358 PRIVATE_SETTINGS.add(DESK_UNDOCK_SOUND); 6359 PRIVATE_SETTINGS.add(CAR_DOCK_SOUND); 6360 PRIVATE_SETTINGS.add(CAR_UNDOCK_SOUND); 6361 PRIVATE_SETTINGS.add(LOCK_SOUND); 6362 PRIVATE_SETTINGS.add(UNLOCK_SOUND); 6363 PRIVATE_SETTINGS.add(SIP_RECEIVE_CALLS); 6364 PRIVATE_SETTINGS.add(SIP_CALL_OPTIONS); 6365 PRIVATE_SETTINGS.add(SIP_ALWAYS); 6366 PRIVATE_SETTINGS.add(SIP_ADDRESS_ONLY); 6367 PRIVATE_SETTINGS.add(SIP_ASK_ME_EACH_TIME); 6368 PRIVATE_SETTINGS.add(POINTER_SPEED); 6369 PRIVATE_SETTINGS.add(POINTER_FILL_STYLE); 6370 PRIVATE_SETTINGS.add(POINTER_SCALE); 6371 PRIVATE_SETTINGS.add(LOCK_TO_APP_ENABLED); 6372 PRIVATE_SETTINGS.add(EGG_MODE); 6373 PRIVATE_SETTINGS.add(SHOW_BATTERY_PERCENT); 6374 PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE); 6375 PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE_VENDOR_HINT); 6376 PRIVATE_SETTINGS.add(LOCALE_PREFERENCES); 6377 PRIVATE_SETTINGS.add(TOUCHPAD_POINTER_SPEED); 6378 PRIVATE_SETTINGS.add(TOUCHPAD_NATURAL_SCROLLING); 6379 PRIVATE_SETTINGS.add(TOUCHPAD_TAP_TO_CLICK); 6380 PRIVATE_SETTINGS.add(TOUCHPAD_TAP_DRAGGING); 6381 PRIVATE_SETTINGS.add(TOUCHPAD_RIGHT_CLICK_ZONE); 6382 PRIVATE_SETTINGS.add(CAMERA_FLASH_NOTIFICATION); 6383 PRIVATE_SETTINGS.add(SCREEN_FLASH_NOTIFICATION); 6384 PRIVATE_SETTINGS.add(SCREEN_FLASH_NOTIFICATION_COLOR); 6385 PRIVATE_SETTINGS.add(DEFAULT_DEVICE_FONT_SCALE); 6386 } 6387 6388 /** 6389 * These entries are considered common between the personal and the managed profile, 6390 * since the managed profile doesn't get to change them. 6391 */ 6392 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6393 private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>(); 6394 static { 6395 CLONE_TO_MANAGED_PROFILE.add(DATE_FORMAT); 6396 CLONE_TO_MANAGED_PROFILE.add(HAPTIC_FEEDBACK_ENABLED); 6397 CLONE_TO_MANAGED_PROFILE.add(SOUND_EFFECTS_ENABLED); 6398 CLONE_TO_MANAGED_PROFILE.add(TEXT_SHOW_PASSWORD); 6399 CLONE_TO_MANAGED_PROFILE.add(TIME_12_24); 6400 } 6401 6402 /** @hide */ getCloneToManagedProfileSettings(Set<String> outKeySet)6403 public static void getCloneToManagedProfileSettings(Set<String> outKeySet) { 6404 outKeySet.addAll(CLONE_TO_MANAGED_PROFILE); 6405 } 6406 6407 /** 6408 * These entries should be cloned from this profile's parent only if the dependency's 6409 * value is true ("1") 6410 * 6411 * Note: the dependencies must be Secure settings 6412 * 6413 * @hide 6414 */ 6415 public static final Map<String, String> CLONE_FROM_PARENT_ON_VALUE = new ArrayMap<>(); 6416 static { CLONE_FROM_PARENT_ON_VALUE.put(RINGTONE, Secure.SYNC_PARENT_SOUNDS)6417 CLONE_FROM_PARENT_ON_VALUE.put(RINGTONE, Secure.SYNC_PARENT_SOUNDS); CLONE_FROM_PARENT_ON_VALUE.put(NOTIFICATION_SOUND, Secure.SYNC_PARENT_SOUNDS)6418 CLONE_FROM_PARENT_ON_VALUE.put(NOTIFICATION_SOUND, Secure.SYNC_PARENT_SOUNDS); CLONE_FROM_PARENT_ON_VALUE.put(ALARM_ALERT, Secure.SYNC_PARENT_SOUNDS)6419 CLONE_FROM_PARENT_ON_VALUE.put(ALARM_ALERT, Secure.SYNC_PARENT_SOUNDS); 6420 } 6421 6422 /** @hide */ getCloneFromParentOnValueSettings(Map<String, String> outMap)6423 public static void getCloneFromParentOnValueSettings(Map<String, String> outMap) { 6424 outMap.putAll(CLONE_FROM_PARENT_ON_VALUE); 6425 } 6426 6427 /** 6428 * System settings which can be accessed by instant apps. 6429 * @hide 6430 */ 6431 public static final Set<String> INSTANT_APP_SETTINGS = new ArraySet<>(); 6432 static { 6433 INSTANT_APP_SETTINGS.add(TEXT_AUTO_REPLACE); 6434 INSTANT_APP_SETTINGS.add(TEXT_AUTO_CAPS); 6435 INSTANT_APP_SETTINGS.add(TEXT_AUTO_PUNCTUATE); 6436 INSTANT_APP_SETTINGS.add(TEXT_SHOW_PASSWORD); 6437 INSTANT_APP_SETTINGS.add(DATE_FORMAT); 6438 INSTANT_APP_SETTINGS.add(FONT_SCALE); 6439 INSTANT_APP_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED); 6440 INSTANT_APP_SETTINGS.add(TIME_12_24); 6441 INSTANT_APP_SETTINGS.add(SOUND_EFFECTS_ENABLED); 6442 INSTANT_APP_SETTINGS.add(ACCELEROMETER_ROTATION); 6443 } 6444 6445 /** 6446 * When to use Wi-Fi calling 6447 * 6448 * @see android.telephony.TelephonyManager.WifiCallingChoices 6449 * @hide 6450 */ 6451 @Readable 6452 public static final String WHEN_TO_MAKE_WIFI_CALLS = "when_to_make_wifi_calls"; 6453 6454 /** Controls whether bluetooth is on or off on wearable devices. 6455 * 6456 * <p>The valid values for this key are: 0 (disabled) or 1 (enabled). 6457 * 6458 * @hide 6459 */ 6460 public static final String CLOCKWORK_BLUETOOTH_SETTINGS_PREF = "cw_bt_settings_pref"; 6461 6462 /** 6463 * Controls whether the unread notification dot indicator is shown on wearable devices. 6464 * 6465 * <p>The valid values for this key are: 0 (disabled) or 1 (enabled). 6466 * 6467 * @hide 6468 */ 6469 public static final String UNREAD_NOTIFICATION_DOT_INDICATOR = 6470 "unread_notification_dot_indicator"; 6471 6472 /** 6473 * Controls whether auto-launching media controls is enabled on wearable devices. 6474 * 6475 * <p>The valid values for this key are: 0 (disabled) or 1 (enabled). 6476 * 6477 * @hide 6478 */ 6479 public static final String AUTO_LAUNCH_MEDIA_CONTROLS = "auto_launch_media_controls"; 6480 6481 // Settings moved to Settings.Secure 6482 6483 /** 6484 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} 6485 * instead 6486 */ 6487 @Deprecated 6488 public static final String ADB_ENABLED = Global.ADB_ENABLED; 6489 6490 /** 6491 * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead 6492 */ 6493 @Deprecated 6494 public static final String ANDROID_ID = Secure.ANDROID_ID; 6495 6496 /** 6497 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead 6498 */ 6499 @Deprecated 6500 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; 6501 6502 /** 6503 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead 6504 */ 6505 @Deprecated 6506 public static final String DATA_ROAMING = Global.DATA_ROAMING; 6507 6508 /** 6509 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead 6510 */ 6511 @Deprecated 6512 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; 6513 6514 /** 6515 * @deprecated Use {@link android.provider.Settings.Global#HTTP_PROXY} instead 6516 */ 6517 @Deprecated 6518 public static final String HTTP_PROXY = Global.HTTP_PROXY; 6519 6520 /** 6521 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead 6522 */ 6523 @Deprecated 6524 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; 6525 6526 /** 6527 * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED} 6528 * instead 6529 */ 6530 @Deprecated 6531 public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED; 6532 6533 /** 6534 * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead 6535 */ 6536 @Deprecated 6537 public static final String LOGGING_ID = Secure.LOGGING_ID; 6538 6539 /** 6540 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead 6541 */ 6542 @Deprecated 6543 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; 6544 6545 /** 6546 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED} 6547 * instead 6548 */ 6549 @Deprecated 6550 public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED; 6551 6552 /** 6553 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE} 6554 * instead 6555 */ 6556 @Deprecated 6557 public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE; 6558 6559 /** 6560 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL} 6561 * instead 6562 */ 6563 @Deprecated 6564 public static final String PARENTAL_CONTROL_REDIRECT_URL = 6565 Secure.PARENTAL_CONTROL_REDIRECT_URL; 6566 6567 /** 6568 * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead 6569 */ 6570 @Deprecated 6571 public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME; 6572 6573 /** 6574 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead 6575 */ 6576 @Deprecated 6577 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; 6578 6579 /** 6580 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead 6581 */ 6582 @Deprecated 6583 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; 6584 6585 /** 6586 * @deprecated Use 6587 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead 6588 */ 6589 @Deprecated 6590 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; 6591 6592 /** 6593 * @deprecated Use 6594 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead 6595 */ 6596 @Deprecated 6597 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = 6598 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; 6599 6600 /** 6601 * @deprecated Use 6602 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead 6603 */ 6604 @Deprecated 6605 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = 6606 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; 6607 6608 /** 6609 * @deprecated Use 6610 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead 6611 */ 6612 @Deprecated 6613 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = 6614 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; 6615 6616 /** 6617 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} 6618 * instead 6619 */ 6620 @Deprecated 6621 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = Global.WIFI_NUM_OPEN_NETWORKS_KEPT; 6622 6623 /** 6624 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead 6625 */ 6626 @Deprecated 6627 public static final String WIFI_ON = Global.WIFI_ON; 6628 6629 /** 6630 * @deprecated Use 6631 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE} 6632 * instead 6633 */ 6634 @Deprecated 6635 @Readable 6636 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = 6637 Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE; 6638 6639 /** 6640 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead 6641 */ 6642 @Deprecated 6643 public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT; 6644 6645 /** 6646 * @deprecated Use 6647 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead 6648 */ 6649 @Deprecated 6650 @Readable 6651 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = 6652 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS; 6653 6654 /** 6655 * @deprecated Use 6656 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead 6657 */ 6658 @Deprecated 6659 @Readable 6660 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = 6661 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED; 6662 6663 /** 6664 * @deprecated Use 6665 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS} 6666 * instead 6667 */ 6668 @Deprecated 6669 @Readable 6670 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = 6671 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS; 6672 6673 /** 6674 * @deprecated Use 6675 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead 6676 */ 6677 @Deprecated 6678 @Readable 6679 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = 6680 Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT; 6681 6682 /** 6683 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS} 6684 * instead 6685 */ 6686 @Deprecated 6687 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS; 6688 6689 /** 6690 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead 6691 */ 6692 @Deprecated 6693 public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON; 6694 6695 /** 6696 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead 6697 */ 6698 @Deprecated 6699 public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT; 6700 6701 /** 6702 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS} 6703 * instead 6704 */ 6705 @Deprecated 6706 public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS; 6707 6708 /** 6709 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS} 6710 * instead 6711 */ 6712 @Deprecated 6713 @Readable 6714 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = 6715 Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS; 6716 6717 /** 6718 * Checks if the specified app can modify system settings. As of API 6719 * level 23, an app cannot modify system settings unless it declares the 6720 * {@link android.Manifest.permission#WRITE_SETTINGS} 6721 * permission in its manifest, <em>and</em> the user specifically grants 6722 * the app this capability. To prompt the user to grant this approval, 6723 * the app must send an intent with the action {@link 6724 * android.provider.Settings#ACTION_MANAGE_WRITE_SETTINGS}, which causes 6725 * the system to display a permission management screen. 6726 * 6727 * @param context App context. 6728 * @return true if the calling app can write to system settings, false otherwise 6729 */ canWrite(Context context)6730 public static boolean canWrite(Context context) { 6731 return isCallingPackageAllowedToWriteSettings(context, Process.myUid(), 6732 context.getOpPackageName(), false); 6733 } 6734 } 6735 6736 /** 6737 * Secure system settings, containing system preferences that applications 6738 * can read but are not allowed to write. These are for preferences that 6739 * the user must explicitly modify through the UI of a system app. Normal 6740 * applications cannot modify the secure settings database, either directly 6741 * or by calling the "put" methods that this class contains. 6742 */ 6743 public static final class Secure extends NameValueTable { 6744 // NOTE: If you add new settings here, be sure to add them to 6745 // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoSecureSettingsLocked. 6746 6747 /** 6748 * The content:// style URL for this table 6749 */ 6750 public static final Uri CONTENT_URI = 6751 Uri.parse("content://" + AUTHORITY + "/secure"); 6752 6753 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 6754 private static final ContentProviderHolder sProviderHolder = 6755 new ContentProviderHolder(CONTENT_URI); 6756 6757 // Populated lazily, guarded by class object: 6758 @UnsupportedAppUsage 6759 private static final NameValueCache sNameValueCache = new NameValueCache( 6760 CONTENT_URI, 6761 CALL_METHOD_GET_SECURE, 6762 CALL_METHOD_PUT_SECURE, 6763 CALL_METHOD_DELETE_SECURE, 6764 sProviderHolder, 6765 Secure.class); 6766 6767 @UnsupportedAppUsage 6768 private static final HashSet<String> MOVED_TO_LOCK_SETTINGS; 6769 @UnsupportedAppUsage 6770 private static final HashSet<String> MOVED_TO_GLOBAL; 6771 static { 6772 MOVED_TO_LOCK_SETTINGS = new HashSet<>(3); 6773 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED); 6774 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE); 6775 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); 6776 6777 MOVED_TO_GLOBAL = new HashSet<>(); 6778 MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED); 6779 MOVED_TO_GLOBAL.add(Settings.Global.ASSISTED_GPS_ENABLED); 6780 MOVED_TO_GLOBAL.add(Settings.Global.BLUETOOTH_ON); 6781 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_CELL_BROADCAST_SMS); 6782 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_ROAMING_MODE); 6783 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_SUBSCRIPTION_MODE); 6784 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE); 6785 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI); 6786 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ROAMING); 6787 MOVED_TO_GLOBAL.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED); 6788 MOVED_TO_GLOBAL.add(Settings.Global.DEVICE_PROVISIONED); 6789 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_SIZE_FORCED); 6790 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE); 6791 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE); 6792 MOVED_TO_GLOBAL.add(Settings.Global.MOBILE_DATA); 6793 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION); 6794 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_DELETE_AGE); 6795 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES); 6796 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE); 6797 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_ENABLED); 6798 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES); 6799 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_POLL_INTERVAL); 6800 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_SAMPLE_ENABLED); 6801 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE); 6802 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION); 6803 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_DELETE_AGE); 6804 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES); 6805 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_ROTATE_AGE); 6806 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION); 6807 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE); 6808 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES); 6809 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE); 6810 MOVED_TO_GLOBAL.add(Settings.Global.NETWORK_PREFERENCE); 6811 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_DIFF); 6812 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING); 6813 MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER); 6814 MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT); 6815 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT); 6816 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS); 6817 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT); 6818 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS); 6819 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT); 6820 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL); 6821 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST); 6822 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL); 6823 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_APN); 6824 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_REQUIRED); 6825 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_SUPPORTED); 6826 MOVED_TO_GLOBAL.add(Settings.Global.USB_MASS_STORAGE_ENABLED); 6827 MOVED_TO_GLOBAL.add(Settings.Global.USE_GOOGLE_MAIL); 6828 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_COUNTRY_CODE); 6829 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS); 6830 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FREQUENCY_BAND); 6831 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_IDLE_MS); 6832 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT); 6833 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS); 6834 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); 6835 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); 6836 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT); 6837 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON); 6838 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME); 6839 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS); 6840 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED); 6841 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ENHANCED_AUTO_JOIN); 6842 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORK_SHOW_RSSI); 6843 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_ON); 6844 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED); 6845 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_PENDING_FACTORY_RESET); 6846 MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON); 6847 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT); 6848 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE); 6849 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS); 6850 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS); 6851 MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS); 6852 MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL); 6853 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD); 6854 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_THRESHOLD); 6855 MOVED_TO_GLOBAL.add(Settings.Global.SEND_ACTION_APP_ERROR); 6856 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_AGE_SECONDS); 6857 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_MAX_FILES); 6858 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_KB); 6859 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_PERCENT); 6860 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_RESERVE_PERCENT); 6861 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_TAG_PREFIX); 6862 MOVED_TO_GLOBAL.add(Settings.Global.ERROR_LOGCAT_PREFIX); 6863 MOVED_TO_GLOBAL.add(Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL); 6864 MOVED_TO_GLOBAL.add(Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD); 6865 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE); 6866 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES); 6867 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES); 6868 MOVED_TO_GLOBAL.add(Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS); 6869 MOVED_TO_GLOBAL.add(Settings.Global.CONNECTIVITY_CHANGE_DELAY); 6870 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED); 6871 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_SERVER); 6872 MOVED_TO_GLOBAL.add(Settings.Global.SET_INSTALL_LOCATION); 6873 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_INSTALL_LOCATION); 6874 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY); 6875 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY); 6876 MOVED_TO_GLOBAL.add(Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT); 6877 MOVED_TO_GLOBAL.add(Settings.Global.HTTP_PROXY); 6878 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_HOST); 6879 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_PORT); 6880 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST); 6881 MOVED_TO_GLOBAL.add(Settings.Global.SET_GLOBAL_HTTP_PROXY); 6882 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER); 6883 MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE); 6884 MOVED_TO_GLOBAL.add(Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY); 6885 MOVED_TO_GLOBAL.add(Settings.Global.SECURE_FRP_MODE); 6886 } 6887 6888 /** @hide */ getMovedToGlobalSettings(Set<String> outKeySet)6889 public static void getMovedToGlobalSettings(Set<String> outKeySet) { 6890 outKeySet.addAll(MOVED_TO_GLOBAL); 6891 } 6892 6893 /** @hide */ getMovedToSystemSettings(Set<String> outKeySet)6894 public static void getMovedToSystemSettings(Set<String> outKeySet) { 6895 } 6896 6897 /** @hide */ clearProviderForTest()6898 public static void clearProviderForTest() { 6899 sProviderHolder.clearProviderForTest(); 6900 sNameValueCache.clearGenerationTrackerForTest(); 6901 } 6902 6903 /** @hide */ getPublicSettings(Set<String> allKeys, Set<String> readableKeys, ArrayMap<String, Integer> readableKeysWithMaxTargetSdk)6904 public static void getPublicSettings(Set<String> allKeys, Set<String> readableKeys, 6905 ArrayMap<String, Integer> readableKeysWithMaxTargetSdk) { 6906 getPublicSettingsForClass(Secure.class, allKeys, readableKeys, 6907 readableKeysWithMaxTargetSdk); 6908 } 6909 6910 /** 6911 * Look up a name in the database. 6912 * @param resolver to access the database with 6913 * @param name to look up in the table 6914 * @return the corresponding value, or null if not present 6915 */ getString(ContentResolver resolver, String name)6916 public static String getString(ContentResolver resolver, String name) { 6917 return getStringForUser(resolver, name, resolver.getUserId()); 6918 } 6919 6920 /** @hide */ 6921 @UnsupportedAppUsage getStringForUser(ContentResolver resolver, String name, int userHandle)6922 public static String getStringForUser(ContentResolver resolver, String name, 6923 int userHandle) { 6924 if (MOVED_TO_GLOBAL.contains(name)) { 6925 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" 6926 + " to android.provider.Settings.Global."); 6927 return Global.getStringForUser(resolver, name, userHandle); 6928 } 6929 6930 if (MOVED_TO_LOCK_SETTINGS.contains(name) && Process.myUid() != Process.SYSTEM_UID) { 6931 // No context; use the ActivityThread's context as an approximation for 6932 // determining the target API level. 6933 Application application = ActivityThread.currentApplication(); 6934 6935 boolean isPreMnc = application != null 6936 && application.getApplicationInfo() != null 6937 && application.getApplicationInfo().targetSdkVersion 6938 <= VERSION_CODES.LOLLIPOP_MR1; 6939 if (isPreMnc) { 6940 // Old apps used to get the three deprecated LOCK_PATTERN_* settings from 6941 // ILockSettings.getString(). For security reasons, we now just return a 6942 // stubbed-out value. Note: the only one of these three settings actually known 6943 // to have been used was LOCK_PATTERN_ENABLED, and ILockSettings.getString() 6944 // already always returned "0" for that starting in Android 11. 6945 return "0"; 6946 } 6947 throw new SecurityException("Settings.Secure." + name + " is deprecated and no" + 6948 " longer accessible. See API documentation for potential replacements."); 6949 } 6950 6951 return sNameValueCache.getStringForUser(resolver, name, userHandle); 6952 } 6953 6954 /** 6955 * Store a name/value pair into the database. Values written by this method will be 6956 * overridden if a restore happens in the future. 6957 * 6958 * @param resolver to access the database with 6959 * @param name to store 6960 * @param value to associate with the name 6961 * @return true if the value was set, false on database errors 6962 * 6963 * @hide 6964 */ 6965 @RequiresPermission(Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) putString(ContentResolver resolver, String name, String value, boolean overrideableByRestore)6966 public static boolean putString(ContentResolver resolver, String name, 6967 String value, boolean overrideableByRestore) { 6968 return putStringForUser(resolver, name, value, /* tag */ null, /* makeDefault */ false, 6969 resolver.getUserId(), overrideableByRestore); 6970 } 6971 6972 /** 6973 * Store a name/value pair into the database. 6974 * @param resolver to access the database with 6975 * @param name to store 6976 * @param value to associate with the name 6977 * @return true if the value was set, false on database errors 6978 */ putString(ContentResolver resolver, String name, String value)6979 public static boolean putString(ContentResolver resolver, String name, String value) { 6980 return putStringForUser(resolver, name, value, resolver.getUserId()); 6981 } 6982 6983 /** @hide */ 6984 @UnsupportedAppUsage putStringForUser(ContentResolver resolver, String name, String value, int userHandle)6985 public static boolean putStringForUser(ContentResolver resolver, String name, String value, 6986 int userHandle) { 6987 return putStringForUser(resolver, name, value, null, false, userHandle, 6988 DEFAULT_OVERRIDEABLE_BY_RESTORE); 6989 } 6990 6991 /** @hide */ 6992 @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)6993 public static boolean putStringForUser(@NonNull ContentResolver resolver, 6994 @NonNull String name, @Nullable String value, @Nullable String tag, 6995 boolean makeDefault, @UserIdInt int userHandle, boolean overrideableByRestore) { 6996 if (LOCAL_LOGV) { 6997 Log.v(TAG, "Secure.putString(name=" + name + ", value=" + value + ") for " 6998 + userHandle); 6999 } 7000 if (MOVED_TO_GLOBAL.contains(name)) { 7001 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" 7002 + " to android.provider.Settings.Global"); 7003 return Global.putStringForUser(resolver, name, value, 7004 tag, makeDefault, userHandle, DEFAULT_OVERRIDEABLE_BY_RESTORE); 7005 } 7006 return sNameValueCache.putStringForUser(resolver, name, value, tag, 7007 makeDefault, userHandle, overrideableByRestore); 7008 } 7009 7010 /** 7011 * Store a name/value pair into the database. 7012 * <p> 7013 * The method takes an optional tag to associate with the setting 7014 * which can be used to clear only settings made by your package and 7015 * associated with this tag by passing the tag to {@link 7016 * #resetToDefaults(ContentResolver, String)}. Anyone can override 7017 * the current tag. Also if another package changes the setting 7018 * then the tag will be set to the one specified in the set call 7019 * which can be null. Also any of the settings setters that do not 7020 * take a tag as an argument effectively clears the tag. 7021 * </p><p> 7022 * For example, if you set settings A and B with tags T1 and T2 and 7023 * another app changes setting A (potentially to the same value), it 7024 * can assign to it a tag T3 (note that now the package that changed 7025 * the setting is not yours). Now if you reset your changes for T1 and 7026 * T2 only setting B will be reset and A not (as it was changed by 7027 * another package) but since A did not change you are in the desired 7028 * initial state. Now if the other app changes the value of A (assuming 7029 * you registered an observer in the beginning) you would detect that 7030 * the setting was changed by another app and handle this appropriately 7031 * (ignore, set back to some value, etc). 7032 * </p><p> 7033 * Also the method takes an argument whether to make the value the 7034 * default for this setting. If the system already specified a default 7035 * value, then the one passed in here will <strong>not</strong> 7036 * be set as the default. 7037 * </p> 7038 * 7039 * @param resolver to access the database with. 7040 * @param name to store. 7041 * @param value to associate with the name. 7042 * @param tag to associate with the setting. 7043 * @param makeDefault whether to make the value the default one. 7044 * @return true if the value was set, false on database errors. 7045 * 7046 * @see #resetToDefaults(ContentResolver, String) 7047 * 7048 * @hide 7049 */ 7050 @SystemApi 7051 @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) putString(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, @Nullable String tag, boolean makeDefault)7052 public static boolean putString(@NonNull ContentResolver resolver, 7053 @NonNull String name, @Nullable String value, @Nullable String tag, 7054 boolean makeDefault) { 7055 return putStringForUser(resolver, name, value, tag, makeDefault, 7056 resolver.getUserId(), DEFAULT_OVERRIDEABLE_BY_RESTORE); 7057 } 7058 7059 /** 7060 * Reset the settings to their defaults. This would reset <strong>only</strong> 7061 * settings set by the caller's package. Think of it of a way to undo your own 7062 * changes to the global settings. Passing in the optional tag will reset only 7063 * settings changed by your package and associated with this tag. 7064 * 7065 * @param resolver Handle to the content resolver. 7066 * @param tag Optional tag which should be associated with the settings to reset. 7067 * 7068 * @see #putString(ContentResolver, String, String, String, boolean) 7069 * 7070 * @hide 7071 */ 7072 @SystemApi 7073 @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) resetToDefaults(@onNull ContentResolver resolver, @Nullable String tag)7074 public static void resetToDefaults(@NonNull ContentResolver resolver, 7075 @Nullable String tag) { 7076 resetToDefaultsAsUser(resolver, tag, RESET_MODE_PACKAGE_DEFAULTS, 7077 resolver.getUserId()); 7078 } 7079 7080 /** 7081 * 7082 * Reset the settings to their defaults for a given user with a specific mode. The 7083 * optional tag argument is valid only for {@link #RESET_MODE_PACKAGE_DEFAULTS} 7084 * allowing resetting the settings made by a package and associated with the tag. 7085 * 7086 * @param resolver Handle to the content resolver. 7087 * @param tag Optional tag which should be associated with the settings to reset. 7088 * @param mode The reset mode. 7089 * @param userHandle The user for which to reset to defaults. 7090 * 7091 * @see #RESET_MODE_PACKAGE_DEFAULTS 7092 * @see #RESET_MODE_UNTRUSTED_DEFAULTS 7093 * @see #RESET_MODE_UNTRUSTED_CHANGES 7094 * @see #RESET_MODE_TRUSTED_DEFAULTS 7095 * 7096 * @hide 7097 */ resetToDefaultsAsUser(@onNull ContentResolver resolver, @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle)7098 public static void resetToDefaultsAsUser(@NonNull ContentResolver resolver, 7099 @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle) { 7100 try { 7101 Bundle arg = new Bundle(); 7102 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 7103 if (tag != null) { 7104 arg.putString(CALL_METHOD_TAG_KEY, tag); 7105 } 7106 arg.putInt(CALL_METHOD_RESET_MODE_KEY, mode); 7107 IContentProvider cp = sProviderHolder.getProvider(resolver); 7108 cp.call(resolver.getAttributionSource(), 7109 sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_SECURE, null, arg); 7110 } catch (RemoteException e) { 7111 Log.w(TAG, "Can't reset do defaults for " + CONTENT_URI, e); 7112 } 7113 } 7114 7115 /** 7116 * Construct the content URI for a particular name/value pair, 7117 * useful for monitoring changes with a ContentObserver. 7118 * @param name to look up in the table 7119 * @return the corresponding content URI, or null if not present 7120 */ getUriFor(String name)7121 public static Uri getUriFor(String name) { 7122 if (MOVED_TO_GLOBAL.contains(name)) { 7123 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" 7124 + " to android.provider.Settings.Global, returning global URI."); 7125 return Global.getUriFor(Global.CONTENT_URI, name); 7126 } 7127 return getUriFor(CONTENT_URI, name); 7128 } 7129 7130 /** 7131 * Convenience function for retrieving a single secure settings value 7132 * as an integer. Note that internally setting values are always 7133 * stored as strings; this function converts the string to an integer 7134 * for you. The default value will be returned if the setting is 7135 * not defined or not an integer. 7136 * 7137 * @param cr The ContentResolver to access. 7138 * @param name The name of the setting to retrieve. 7139 * @param def Value to return if the setting is not defined. 7140 * 7141 * @return The setting's current value, or 'def' if it is not defined 7142 * or not a valid integer. 7143 */ getInt(ContentResolver cr, String name, int def)7144 public static int getInt(ContentResolver cr, String name, int def) { 7145 return getIntForUser(cr, name, def, cr.getUserId()); 7146 } 7147 7148 /** @hide */ 7149 @UnsupportedAppUsage getIntForUser(ContentResolver cr, String name, int def, int userHandle)7150 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { 7151 String v = getStringForUser(cr, name, userHandle); 7152 return parseIntSettingWithDefault(v, def); 7153 } 7154 7155 /** 7156 * Convenience function for retrieving a single secure settings value 7157 * as an integer. Note that internally setting values are always 7158 * stored as strings; this function converts the string to an integer 7159 * for you. 7160 * <p> 7161 * This version does not take a default value. If the setting has not 7162 * been set, or the string value is not a number, 7163 * it throws {@link SettingNotFoundException}. 7164 * 7165 * @param cr The ContentResolver to access. 7166 * @param name The name of the setting to retrieve. 7167 * 7168 * @throws SettingNotFoundException Thrown if a setting by the given 7169 * name can't be found or the setting value is not an integer. 7170 * 7171 * @return The setting's current value. 7172 */ getInt(ContentResolver cr, String name)7173 public static int getInt(ContentResolver cr, String name) 7174 throws SettingNotFoundException { 7175 return getIntForUser(cr, name, cr.getUserId()); 7176 } 7177 7178 /** @hide */ getIntForUser(ContentResolver cr, String name, int userHandle)7179 public static int getIntForUser(ContentResolver cr, String name, int userHandle) 7180 throws SettingNotFoundException { 7181 String v = getStringForUser(cr, name, userHandle); 7182 return parseIntSetting(v, name); 7183 } 7184 7185 /** 7186 * Convenience function for updating a single settings value as an 7187 * integer. This will either create a new entry in the table if the 7188 * given name does not exist, or modify the value of the existing row 7189 * with that name. Note that internally setting values are always 7190 * stored as strings, so this function converts the given value to a 7191 * string before storing it. 7192 * 7193 * @param cr The ContentResolver to access. 7194 * @param name The name of the setting to modify. 7195 * @param value The new value for the setting. 7196 * @return true if the value was set, false on database errors 7197 */ putInt(ContentResolver cr, String name, int value)7198 public static boolean putInt(ContentResolver cr, String name, int value) { 7199 return putIntForUser(cr, name, value, cr.getUserId()); 7200 } 7201 7202 /** @hide */ 7203 @UnsupportedAppUsage putIntForUser(ContentResolver cr, String name, int value, int userHandle)7204 public static boolean putIntForUser(ContentResolver cr, String name, int value, 7205 int userHandle) { 7206 return putStringForUser(cr, name, Integer.toString(value), userHandle); 7207 } 7208 7209 /** 7210 * Convenience function for retrieving a single secure settings value 7211 * as a {@code long}. Note that internally setting values are always 7212 * stored as strings; this function converts the string to a {@code long} 7213 * for you. The default value will be returned if the setting is 7214 * not defined or not a {@code long}. 7215 * 7216 * @param cr The ContentResolver to access. 7217 * @param name The name of the setting to retrieve. 7218 * @param def Value to return if the setting is not defined. 7219 * 7220 * @return The setting's current value, or 'def' if it is not defined 7221 * or not a valid {@code long}. 7222 */ getLong(ContentResolver cr, String name, long def)7223 public static long getLong(ContentResolver cr, String name, long def) { 7224 return getLongForUser(cr, name, def, cr.getUserId()); 7225 } 7226 7227 /** @hide */ 7228 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) getLongForUser(ContentResolver cr, String name, long def, int userHandle)7229 public static long getLongForUser(ContentResolver cr, String name, long def, 7230 int userHandle) { 7231 String v = getStringForUser(cr, name, userHandle); 7232 return parseLongSettingWithDefault(v, def); 7233 } 7234 7235 /** 7236 * Convenience function for retrieving a single secure settings value 7237 * as a {@code long}. Note that internally setting values are always 7238 * stored as strings; this function converts the string to a {@code long} 7239 * for you. 7240 * <p> 7241 * This version does not take a default value. If the setting has not 7242 * been set, or the string value is not a number, 7243 * it throws {@link SettingNotFoundException}. 7244 * 7245 * @param cr The ContentResolver to access. 7246 * @param name The name of the setting to retrieve. 7247 * 7248 * @return The setting's current value. 7249 * @throws SettingNotFoundException Thrown if a setting by the given 7250 * name can't be found or the setting value is not an integer. 7251 */ getLong(ContentResolver cr, String name)7252 public static long getLong(ContentResolver cr, String name) 7253 throws SettingNotFoundException { 7254 return getLongForUser(cr, name, cr.getUserId()); 7255 } 7256 7257 /** @hide */ getLongForUser(ContentResolver cr, String name, int userHandle)7258 public static long getLongForUser(ContentResolver cr, String name, int userHandle) 7259 throws SettingNotFoundException { 7260 String v = getStringForUser(cr, name, userHandle); 7261 return parseLongSetting(v, name); 7262 } 7263 7264 /** 7265 * Convenience function for updating a secure settings value as a long 7266 * integer. This will either create a new entry in the table if the 7267 * given name does not exist, or modify the value of the existing row 7268 * with that name. Note that internally setting values are always 7269 * stored as strings, so this function converts the given value to a 7270 * string before storing it. 7271 * 7272 * @param cr The ContentResolver to access. 7273 * @param name The name of the setting to modify. 7274 * @param value The new value for the setting. 7275 * @return true if the value was set, false on database errors 7276 */ putLong(ContentResolver cr, String name, long value)7277 public static boolean putLong(ContentResolver cr, String name, long value) { 7278 return putLongForUser(cr, name, value, cr.getUserId()); 7279 } 7280 7281 /** @hide */ 7282 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) putLongForUser(ContentResolver cr, String name, long value, int userHandle)7283 public static boolean putLongForUser(ContentResolver cr, String name, long value, 7284 int userHandle) { 7285 return putStringForUser(cr, name, Long.toString(value), userHandle); 7286 } 7287 7288 /** 7289 * Convenience function for retrieving a single secure settings value 7290 * as a floating point number. Note that internally setting values are 7291 * always stored as strings; this function converts the string to an 7292 * float for you. The default value will be returned if the setting 7293 * is not defined or not a valid float. 7294 * 7295 * @param cr The ContentResolver to access. 7296 * @param name The name of the setting to retrieve. 7297 * @param def Value to return if the setting is not defined. 7298 * 7299 * @return The setting's current value, or 'def' if it is not defined 7300 * or not a valid float. 7301 */ getFloat(ContentResolver cr, String name, float def)7302 public static float getFloat(ContentResolver cr, String name, float def) { 7303 return getFloatForUser(cr, name, def, cr.getUserId()); 7304 } 7305 7306 /** @hide */ getFloatForUser(ContentResolver cr, String name, float def, int userHandle)7307 public static float getFloatForUser(ContentResolver cr, String name, float def, 7308 int userHandle) { 7309 String v = getStringForUser(cr, name, userHandle); 7310 return parseFloatSettingWithDefault(v, def); 7311 } 7312 7313 /** 7314 * Convenience function for retrieving a single secure settings value 7315 * as a float. Note that internally setting values are always 7316 * stored as strings; this function converts the string to a float 7317 * for you. 7318 * <p> 7319 * This version does not take a default value. If the setting has not 7320 * been set, or the string value is not a number, 7321 * it throws {@link SettingNotFoundException}. 7322 * 7323 * @param cr The ContentResolver to access. 7324 * @param name The name of the setting to retrieve. 7325 * 7326 * @throws SettingNotFoundException Thrown if a setting by the given 7327 * name can't be found or the setting value is not a float. 7328 * 7329 * @return The setting's current value. 7330 */ getFloat(ContentResolver cr, String name)7331 public static float getFloat(ContentResolver cr, String name) 7332 throws SettingNotFoundException { 7333 return getFloatForUser(cr, name, cr.getUserId()); 7334 } 7335 7336 /** @hide */ getFloatForUser(ContentResolver cr, String name, int userHandle)7337 public static float getFloatForUser(ContentResolver cr, String name, int userHandle) 7338 throws SettingNotFoundException { 7339 String v = getStringForUser(cr, name, userHandle); 7340 return parseFloatSetting(v, name); 7341 } 7342 7343 /** 7344 * Convenience function for updating a single settings value as a 7345 * floating point number. This will either create a new entry in the 7346 * table if the given name does not exist, or modify the value of the 7347 * existing row with that name. Note that internally setting values 7348 * are always stored as strings, so this function converts the given 7349 * value to a string before storing it. 7350 * 7351 * @param cr The ContentResolver to access. 7352 * @param name The name of the setting to modify. 7353 * @param value The new value for the setting. 7354 * @return true if the value was set, false on database errors 7355 */ putFloat(ContentResolver cr, String name, float value)7356 public static boolean putFloat(ContentResolver cr, String name, float value) { 7357 return putFloatForUser(cr, name, value, cr.getUserId()); 7358 } 7359 7360 /** @hide */ putFloatForUser(ContentResolver cr, String name, float value, int userHandle)7361 public static boolean putFloatForUser(ContentResolver cr, String name, float value, 7362 int userHandle) { 7363 return putStringForUser(cr, name, Float.toString(value), userHandle); 7364 } 7365 7366 /** 7367 * Control whether to enable adaptive sleep mode. 7368 * @hide 7369 */ 7370 @Readable 7371 public static final String ADAPTIVE_SLEEP = "adaptive_sleep"; 7372 7373 /** 7374 * Setting key to indicate whether camera-based autorotate is enabled. 7375 * 7376 * @hide 7377 */ 7378 public static final String CAMERA_AUTOROTATE = "camera_autorotate"; 7379 7380 /** 7381 * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED} 7382 * instead 7383 */ 7384 @Deprecated 7385 public static final String DEVELOPMENT_SETTINGS_ENABLED = 7386 Global.DEVELOPMENT_SETTINGS_ENABLED; 7387 7388 /** 7389 * When the user has enable the option to have a "bug report" command 7390 * in the power menu. 7391 * @hide 7392 */ 7393 @Readable 7394 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; 7395 7396 /** 7397 * The package name for the custom bugreport handler app. This app must be bugreport 7398 * allow-listed. This is currently used only by Power Menu short press. 7399 * @hide 7400 */ 7401 public static final String CUSTOM_BUGREPORT_HANDLER_APP = "custom_bugreport_handler_app"; 7402 7403 /** 7404 * The user id for the custom bugreport handler app. This is currently used only by Power 7405 * Menu short press. 7406 * @hide 7407 */ 7408 public static final String CUSTOM_BUGREPORT_HANDLER_USER = "custom_bugreport_handler_user"; 7409 7410 /** 7411 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} instead 7412 */ 7413 @Deprecated 7414 public static final String ADB_ENABLED = Global.ADB_ENABLED; 7415 7416 /** 7417 * Setting to allow mock locations and location provider status to be injected into the 7418 * LocationManager service for testing purposes during application development. These 7419 * locations and status values override actual location and status information generated 7420 * by network, gps, or other location providers. 7421 * 7422 * @deprecated This settings is not used anymore. 7423 */ 7424 @Deprecated 7425 @Readable 7426 public static final String ALLOW_MOCK_LOCATION = "mock_location"; 7427 7428 /** 7429 * This is used by Bluetooth Manager to store adapter name 7430 * @hide 7431 */ 7432 @Readable(maxTargetSdk = Build.VERSION_CODES.S) 7433 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 7434 @SuppressLint("NoSettingsProvider") 7435 public static final String BLUETOOTH_NAME = "bluetooth_name"; 7436 7437 /** 7438 * This is used by Bluetooth Manager to store adapter address 7439 * @hide 7440 */ 7441 @Readable(maxTargetSdk = Build.VERSION_CODES.S) 7442 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 7443 @SuppressLint("NoSettingsProvider") 7444 public static final String BLUETOOTH_ADDRESS = "bluetooth_address"; 7445 7446 /** 7447 * This is used by Bluetooth Manager to store whether adapter address is valid 7448 * @hide 7449 */ 7450 @Readable(maxTargetSdk = Build.VERSION_CODES.S) 7451 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 7452 @SuppressLint("NoSettingsProvider") 7453 public static final String BLUETOOTH_ADDR_VALID = "bluetooth_addr_valid"; 7454 7455 /** 7456 * This is used by LocalBluetoothLeBroadcast to store the broadcast program info. 7457 * @hide 7458 */ 7459 public static final String BLUETOOTH_LE_BROADCAST_PROGRAM_INFO = 7460 "bluetooth_le_broadcast_program_info"; 7461 7462 /** 7463 * This is used by LocalBluetoothLeBroadcast to store the broadcast name. 7464 * @hide 7465 */ 7466 public static final String BLUETOOTH_LE_BROADCAST_NAME = "bluetooth_le_broadcast_name"; 7467 7468 /** 7469 * This is used by LocalBluetoothLeBroadcast to store the broadcast code. 7470 * @hide 7471 */ 7472 public static final String BLUETOOTH_LE_BROADCAST_CODE = "bluetooth_le_broadcast_code"; 7473 7474 /** 7475 * This is used by LocalBluetoothLeBroadcast to store the app source name. 7476 * @hide 7477 */ 7478 public static final String BLUETOOTH_LE_BROADCAST_APP_SOURCE_NAME = 7479 "bluetooth_le_broadcast_app_source_name"; 7480 7481 /** 7482 * This is used by LocalBluetoothLeBroadcast to downgrade the broadcast quality to improve 7483 * compatibility. 7484 * 7485 * <ul> 7486 * <li>0 = false 7487 * <li>1 = true 7488 * </ul> 7489 * 7490 * @hide 7491 */ 7492 public static final String BLUETOOTH_LE_BROADCAST_IMPROVE_COMPATIBILITY = 7493 "bluetooth_le_broadcast_improve_compatibility"; 7494 7495 /** 7496 * This is used by LocalBluetoothLeBroadcast to store the fallback active device address. 7497 * 7498 * @hide 7499 */ 7500 public static final String BLUETOOTH_LE_BROADCAST_FALLBACK_ACTIVE_DEVICE_ADDRESS = 7501 "bluetooth_le_broadcast_fallback_active_device_address"; 7502 7503 /** 7504 * Ringtone routing value for hearing aid. It routes ringtone to hearing aid or device 7505 * speaker. 7506 * <ul> 7507 * <li> 0 = Default 7508 * <li> 1 = Route to hearing aid 7509 * <li> 2 = Route to device speaker 7510 * </ul> 7511 * @hide 7512 */ 7513 public static final String HEARING_AID_RINGTONE_ROUTING = 7514 "hearing_aid_ringtone_routing"; 7515 7516 /** 7517 * Phone call routing value for hearing aid. It routes phone call to hearing aid or 7518 * device speaker. 7519 * <ul> 7520 * <li> 0 = Default 7521 * <li> 1 = Route to hearing aid 7522 * <li> 2 = Route to device speaker 7523 * </ul> 7524 * @hide 7525 */ 7526 public static final String HEARING_AID_CALL_ROUTING = 7527 "hearing_aid_call_routing"; 7528 7529 /** 7530 * Media routing value for hearing aid. It routes media to hearing aid or device 7531 * speaker. 7532 * <ul> 7533 * <li> 0 = Default 7534 * <li> 1 = Route to hearing aid 7535 * <li> 2 = Route to device speaker 7536 * </ul> 7537 * @hide 7538 */ 7539 public static final String HEARING_AID_MEDIA_ROUTING = 7540 "hearing_aid_media_routing"; 7541 7542 /** 7543 * Notification routing value for hearing aid. It routes notification sounds to hearing aid 7544 * or device speaker. 7545 * <ul> 7546 * <li> 0 = Default 7547 * <li> 1 = Route to hearing aid 7548 * <li> 2 = Route to device speaker 7549 * </ul> 7550 * @hide 7551 */ 7552 public static final String HEARING_AID_NOTIFICATION_ROUTING = 7553 "hearing_aid_notification_routing"; 7554 7555 /** 7556 * Setting to indicate that on device captions are enabled. 7557 * 7558 * @hide 7559 */ 7560 @SystemApi 7561 @Readable 7562 public static final String ODI_CAPTIONS_ENABLED = "odi_captions_enabled"; 7563 7564 7565 /** 7566 * Setting to indicate live caption button show or hide in the volume 7567 * rocker. 7568 * 7569 * @hide 7570 */ 7571 public static final String ODI_CAPTIONS_VOLUME_UI_ENABLED = 7572 "odi_captions_volume_ui_enabled"; 7573 7574 /** 7575 * On Android 8.0 (API level 26) and higher versions of the platform, 7576 * a 64-bit number (expressed as a hexadecimal string), unique to 7577 * each combination of app-signing key, user, and device. 7578 * Values of {@code ANDROID_ID} are scoped by signing key and user. 7579 * The value may change if a factory reset is performed on the 7580 * device or if an APK signing key changes. 7581 * 7582 * For more information about how the platform handles {@code ANDROID_ID} 7583 * in Android 8.0 (API level 26) and higher, see <a 7584 * href="{@docRoot}about/versions/oreo/android-8.0-changes.html#privacy-all"> 7585 * Android 8.0 Behavior Changes</a>. 7586 * 7587 * <p class="note"><strong>Note:</strong> For apps that were installed 7588 * prior to updating the device to a version of Android 8.0 7589 * (API level 26) or higher, the value of {@code ANDROID_ID} changes 7590 * if the app is uninstalled and then reinstalled after the OTA. 7591 * To preserve values across uninstalls after an OTA to Android 8.0 7592 * or higher, developers can use 7593 * <a href="{@docRoot}guide/topics/data/keyvaluebackup.html"> 7594 * Key/Value Backup</a>.</p> 7595 * 7596 * <p>In versions of the platform lower than Android 8.0 (API level 26), 7597 * a 64-bit number (expressed as a hexadecimal string) that is randomly 7598 * generated when the user first sets up the device and should remain 7599 * constant for the lifetime of the user's device. 7600 * 7601 * On devices that have 7602 * <a href="{@docRoot}about/versions/android-4.2.html#MultipleUsers"> 7603 * multiple users</a>, each user appears as a 7604 * completely separate device, so the {@code ANDROID_ID} value is 7605 * unique to each user.</p> 7606 * 7607 * <p class="note"><strong>Note:</strong> If the caller is an Instant App the ID is scoped 7608 * to the Instant App, it is generated when the Instant App is first installed and reset if 7609 * the user clears the Instant App. 7610 */ 7611 @Readable 7612 public static final String ANDROID_ID = "android_id"; 7613 7614 /** 7615 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead 7616 */ 7617 @Deprecated 7618 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; 7619 7620 /** 7621 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead 7622 */ 7623 @Deprecated 7624 public static final String DATA_ROAMING = Global.DATA_ROAMING; 7625 7626 /** 7627 * Stores {@link android.view.inputmethod.InputMethodInfo#getId()} of the input method 7628 * service that is currently selected. 7629 * 7630 * <p>Although the name {@link #DEFAULT_INPUT_METHOD} implies that there is a concept of 7631 * <i>default</i> input method, in reality this setting is no more or less than the 7632 * <strong>currently selected</strong> input method. This setting can be updated at any 7633 * time as a result of user-initiated and system-initiated input method switching.</p> 7634 * 7635 * <p>Use {@link ComponentName#unflattenFromString(String)} to parse the stored value.</p> 7636 */ 7637 @Readable 7638 public static final String DEFAULT_INPUT_METHOD = "default_input_method"; 7639 7640 /** 7641 * Used only by {@link com.android.server.inputmethod.InputMethodManagerService} as a 7642 * temporary data store of {@link #DEFAULT_INPUT_METHOD} while a virtual-device-specific 7643 * input method is set as default.</p> 7644 * 7645 * <p>This should be considered to be an implementation detail of 7646 * {@link com.android.server.inputmethod.InputMethodManagerService}. Other system 7647 * components should never rely on this value.</p> 7648 * 7649 * @see #DEFAULT_INPUT_METHOD 7650 * @hide 7651 */ 7652 public static final String DEFAULT_DEVICE_INPUT_METHOD = "default_device_input_method"; 7653 7654 /** 7655 * Setting to record the input method subtype used by default, holding the ID 7656 * of the desired method. 7657 */ 7658 @Readable 7659 public static final String SELECTED_INPUT_METHOD_SUBTYPE = 7660 "selected_input_method_subtype"; 7661 7662 /** 7663 * The {@link android.view.inputmethod.InputMethodInfo.InputMethodInfo#getId() ID} of the 7664 * default voice input method. 7665 * <p> 7666 * This stores the last known default voice IME. If the related system config value changes, 7667 * this is reset by InputMethodManagerService. 7668 * <p> 7669 * This IME is not necessarily in the enabled IME list. That state is still stored in 7670 * {@link #ENABLED_INPUT_METHODS}. 7671 * 7672 * @hide 7673 */ 7674 public static final String DEFAULT_VOICE_INPUT_METHOD = "default_voice_input_method"; 7675 7676 /** 7677 * Setting to record the history of input method subtype, holding the pair of ID of IME 7678 * and its last used subtype. 7679 * @hide 7680 */ 7681 @Readable 7682 public static final String INPUT_METHODS_SUBTYPE_HISTORY = 7683 "input_methods_subtype_history"; 7684 7685 /** 7686 * Setting to record the visibility of input method selector 7687 */ 7688 @Readable 7689 public static final String INPUT_METHOD_SELECTOR_VISIBILITY = 7690 "input_method_selector_visibility"; 7691 7692 /** 7693 * Toggle for enabling stylus handwriting. When enabled, current Input method receives 7694 * stylus {@link MotionEvent}s if an {@link Editor} is focused. 7695 * 7696 * @see #STYLUS_HANDWRITING_DEFAULT_VALUE 7697 * @hide 7698 */ 7699 @TestApi 7700 @Readable 7701 @SuppressLint("NoSettingsProvider") 7702 public static final String STYLUS_HANDWRITING_ENABLED = "stylus_handwriting_enabled"; 7703 7704 /** 7705 * Default value for {@link #STYLUS_HANDWRITING_ENABLED}. 7706 * 7707 * @hide 7708 */ 7709 @TestApi 7710 @Readable 7711 @SuppressLint("NoSettingsProvider") 7712 public static final int STYLUS_HANDWRITING_DEFAULT_VALUE = 1; 7713 7714 /** 7715 * The currently selected voice interaction service flattened ComponentName. 7716 * @hide 7717 */ 7718 @TestApi 7719 @Readable 7720 public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service"; 7721 7722 7723 /** 7724 * The currently selected credential service(s) flattened ComponentName. 7725 * 7726 * @hide 7727 */ 7728 public static final String CREDENTIAL_SERVICE = "credential_service"; 7729 7730 /** 7731 * The currently selected primary credential service flattened ComponentName. 7732 * 7733 * @hide 7734 */ 7735 public static final String CREDENTIAL_SERVICE_PRIMARY = "credential_service_primary"; 7736 7737 /** 7738 * The currently selected autofill service flattened ComponentName. 7739 * @hide 7740 */ 7741 @TestApi 7742 @Readable 7743 public static final String AUTOFILL_SERVICE = "autofill_service"; 7744 7745 /** 7746 * Boolean indicating if Autofill supports field classification. 7747 * 7748 * @see android.service.autofill.AutofillService 7749 * 7750 * @hide 7751 */ 7752 @SystemApi 7753 @Readable 7754 public static final String AUTOFILL_FEATURE_FIELD_CLASSIFICATION = 7755 "autofill_field_classification"; 7756 7757 /** 7758 * Boolean indicating if the dark mode dialog shown on first toggle has been seen. 7759 * 7760 * @hide 7761 */ 7762 @Readable 7763 public static final String DARK_MODE_DIALOG_SEEN = 7764 "dark_mode_dialog_seen"; 7765 7766 /** 7767 * Custom time when Dark theme is scheduled to activate. 7768 * Represented as milliseconds from midnight (e.g. 79200000 == 10pm). 7769 * @hide 7770 */ 7771 @Readable 7772 public static final String DARK_THEME_CUSTOM_START_TIME = 7773 "dark_theme_custom_start_time"; 7774 7775 /** 7776 * Custom time when Dark theme is scheduled to deactivate. 7777 * Represented as milliseconds from midnight (e.g. 79200000 == 10pm). 7778 * @hide 7779 */ 7780 @Readable 7781 public static final String DARK_THEME_CUSTOM_END_TIME = 7782 "dark_theme_custom_end_time"; 7783 7784 /** 7785 * Defines value returned by {@link android.service.autofill.UserData#getMaxUserDataSize()}. 7786 * 7787 * @hide 7788 */ 7789 @SystemApi 7790 @Readable 7791 public static final String AUTOFILL_USER_DATA_MAX_USER_DATA_SIZE = 7792 "autofill_user_data_max_user_data_size"; 7793 7794 /** 7795 * Defines value returned by 7796 * {@link android.service.autofill.UserData#getMaxFieldClassificationIdsSize()}. 7797 * 7798 * @hide 7799 */ 7800 @SystemApi 7801 @Readable 7802 public static final String AUTOFILL_USER_DATA_MAX_FIELD_CLASSIFICATION_IDS_SIZE = 7803 "autofill_user_data_max_field_classification_size"; 7804 7805 /** 7806 * Defines value returned by 7807 * {@link android.service.autofill.UserData#getMaxCategoryCount()}. 7808 * 7809 * @hide 7810 */ 7811 @SystemApi 7812 @Readable 7813 public static final String AUTOFILL_USER_DATA_MAX_CATEGORY_COUNT = 7814 "autofill_user_data_max_category_count"; 7815 7816 /** 7817 * Defines value returned by {@link android.service.autofill.UserData#getMaxValueLength()}. 7818 * 7819 * @hide 7820 */ 7821 @SystemApi 7822 @Readable 7823 public static final String AUTOFILL_USER_DATA_MAX_VALUE_LENGTH = 7824 "autofill_user_data_max_value_length"; 7825 7826 /** 7827 * Defines value returned by {@link android.service.autofill.UserData#getMinValueLength()}. 7828 * 7829 * @hide 7830 */ 7831 @SystemApi 7832 @Readable 7833 public static final String AUTOFILL_USER_DATA_MIN_VALUE_LENGTH = 7834 "autofill_user_data_min_value_length"; 7835 7836 /** 7837 * Defines whether Content Capture is enabled for the user. 7838 * 7839 * <p>Type: {@code int} ({@code 0} for disabled, {@code 1} for enabled). 7840 * <p>Default: enabled 7841 * 7842 * @hide 7843 */ 7844 @TestApi 7845 @Readable 7846 public static final String CONTENT_CAPTURE_ENABLED = "content_capture_enabled"; 7847 7848 /** 7849 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead 7850 */ 7851 @Deprecated 7852 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; 7853 7854 /** 7855 * Indicates whether a DPC has been downloaded during provisioning. 7856 * 7857 * <p>Type: int (0 for false, 1 for true) 7858 * 7859 * <p>If this is true, then any attempts to begin setup again should result in factory reset 7860 * 7861 * @hide 7862 */ 7863 @Readable 7864 public static final String MANAGED_PROVISIONING_DPC_DOWNLOADED = 7865 "managed_provisioning_dpc_downloaded"; 7866 7867 /** 7868 * Indicates whether the device is under restricted secure FRP mode. 7869 * Secure FRP mode is enabled when the device is under FRP. On solving of FRP challenge, 7870 * device is removed from this mode. 7871 * <p> 7872 * Type: int (0 for false, 1 for true) 7873 * 7874 * @deprecated Use Global.SECURE_FRP_MODE 7875 */ 7876 @Deprecated 7877 @Readable 7878 public static final String SECURE_FRP_MODE = "secure_frp_mode"; 7879 7880 /** 7881 * Indicates whether the current user has completed setup via the setup wizard. 7882 * <p> 7883 * Type: int (0 for false, 1 for true) 7884 * 7885 * @hide 7886 */ 7887 @SystemApi 7888 @Readable 7889 public static final String USER_SETUP_COMPLETE = "user_setup_complete"; 7890 7891 /** 7892 * Indicates that the user has not started setup personalization. 7893 * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. 7894 * 7895 * @hide 7896 */ 7897 @SystemApi 7898 public static final int USER_SETUP_PERSONALIZATION_NOT_STARTED = 0; 7899 7900 /** 7901 * Indicates that the user has not yet completed setup personalization. 7902 * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. 7903 * 7904 * @hide 7905 */ 7906 @SystemApi 7907 public static final int USER_SETUP_PERSONALIZATION_STARTED = 1; 7908 7909 /** 7910 * Indicates that the user has snoozed personalization and will complete it later. 7911 * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. 7912 * 7913 * @hide 7914 */ 7915 @SystemApi 7916 public static final int USER_SETUP_PERSONALIZATION_PAUSED = 2; 7917 7918 /** 7919 * Indicates that the user has completed setup personalization. 7920 * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. 7921 * 7922 * @hide 7923 */ 7924 @SystemApi 7925 public static final int USER_SETUP_PERSONALIZATION_COMPLETE = 10; 7926 7927 /** @hide */ 7928 @Retention(RetentionPolicy.SOURCE) 7929 @IntDef({ 7930 USER_SETUP_PERSONALIZATION_NOT_STARTED, 7931 USER_SETUP_PERSONALIZATION_STARTED, 7932 USER_SETUP_PERSONALIZATION_PAUSED, 7933 USER_SETUP_PERSONALIZATION_COMPLETE 7934 }) 7935 public @interface UserSetupPersonalization {} 7936 7937 /** 7938 * Defines the user's current state of device personalization. 7939 * The possible states are defined in {@link UserSetupPersonalization}. 7940 * 7941 * @hide 7942 */ 7943 @SystemApi 7944 @Readable 7945 public static final String USER_SETUP_PERSONALIZATION_STATE = 7946 "user_setup_personalization_state"; 7947 7948 /** 7949 * Whether the current user has been set up via setup wizard (0 = false, 1 = true) 7950 * This value differs from USER_SETUP_COMPLETE in that it can be reset back to 0 7951 * in case SetupWizard has been re-enabled on TV devices. 7952 * 7953 * @hide 7954 */ 7955 @Readable 7956 public static final String TV_USER_SETUP_COMPLETE = "tv_user_setup_complete"; 7957 7958 /** 7959 * The prefix for a category name that indicates whether a suggested action from that 7960 * category was marked as completed. 7961 * <p> 7962 * Type: int (0 for false, 1 for true) 7963 * 7964 * @hide 7965 */ 7966 @SystemApi 7967 @Readable 7968 public static final String COMPLETED_CATEGORY_PREFIX = "suggested.completed_category."; 7969 7970 /** 7971 * Whether or not compress blocks should be released on install. 7972 * <p>The setting only determines if the platform will attempt to release 7973 * compress blocks; it does not guarantee that the files will have their 7974 * compress blocks released. Compression is currently only supported on 7975 * some f2fs filesystems. 7976 * <p> 7977 * Type: int (0 for false, 1 for true) 7978 * 7979 * @hide 7980 */ 7981 public static final String RELEASE_COMPRESS_BLOCKS_ON_INSTALL = 7982 "release_compress_blocks_on_install"; 7983 7984 /** 7985 * List of input methods that are currently enabled. This is a string 7986 * containing the IDs of all enabled input methods, each ID separated 7987 * by ':'. 7988 * 7989 * Format like "ime0;subtype0;subtype1;subtype2:ime1:ime2;subtype0" 7990 * where imeId is ComponentName and subtype is int32. 7991 * 7992 * <p>Note: This setting is not readable to the app targeting API level 34 or higher. use 7993 * {@link android.view.inputmethod.InputMethodManager#getEnabledInputMethodList()} instead. 7994 */ 7995 @Readable(maxTargetSdk = Build.VERSION_CODES.TIRAMISU) 7996 public static final String ENABLED_INPUT_METHODS = "enabled_input_methods"; 7997 7998 /** 7999 * List of system input methods that are currently disabled. This is a string 8000 * containing the IDs of all disabled input methods, each ID separated 8001 * by ':'. 8002 * @hide 8003 */ 8004 @Readable(maxTargetSdk = Build.VERSION_CODES.TIRAMISU) 8005 public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods"; 8006 8007 /** 8008 * Whether to show the IME when a hard keyboard is connected. This is a boolean that 8009 * determines if the IME should be shown when a hard keyboard is attached. 8010 * @hide 8011 */ 8012 @TestApi 8013 @Readable 8014 @SuppressLint("NoSettingsProvider") 8015 public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard"; 8016 8017 /** 8018 * Whether to enable bounce keys for Physical Keyboard accessibility. 8019 * 8020 * If set to non-zero value, any key press on physical keyboard within the provided 8021 * threshold duration (in milliseconds) of the same key, will be ignored. 8022 * 8023 * @hide 8024 */ 8025 @Readable 8026 public static final String ACCESSIBILITY_BOUNCE_KEYS = "accessibility_bounce_keys"; 8027 8028 /** 8029 * Whether to enable slow keys for Physical Keyboard accessibility. 8030 * 8031 * If set to non-zero value, any key press on physical keyboard needs to be pressed and 8032 * held for the provided threshold duration (in milliseconds) to be registered in the 8033 * system. 8034 * 8035 * @hide 8036 */ 8037 @Readable 8038 public static final String ACCESSIBILITY_SLOW_KEYS = "accessibility_slow_keys"; 8039 8040 /** 8041 * Whether to enable sticky keys for Physical Keyboard accessibility. 8042 * 8043 * This is a boolean value that determines if Sticky keys feature is enabled. 8044 * 8045 * @hide 8046 */ 8047 @Readable 8048 public static final String ACCESSIBILITY_STICKY_KEYS = "accessibility_sticky_keys"; 8049 8050 /** 8051 * Whether stylus button presses are disabled. This is a boolean that 8052 * determines if stylus buttons are ignored. 8053 * 8054 * @hide 8055 */ 8056 @TestApi 8057 @Readable 8058 @SuppressLint("NoSettingsProvider") 8059 public static final String STYLUS_BUTTONS_ENABLED = "stylus_buttons_enabled"; 8060 8061 /** 8062 * Preferred default user profile to use with the notes task button shortcut. 8063 * 8064 * @hide 8065 */ 8066 @SuppressLint("NoSettingsProvider") 8067 public static final String DEFAULT_NOTE_TASK_PROFILE = "default_note_task_profile"; 8068 8069 /** 8070 * Host name and port for global http proxy. Uses ':' seperator for 8071 * between host and port. 8072 * 8073 * @deprecated Use {@link Global#HTTP_PROXY} 8074 */ 8075 @Deprecated 8076 public static final String HTTP_PROXY = Global.HTTP_PROXY; 8077 8078 /** 8079 * Package designated as always-on VPN provider. 8080 * 8081 * @hide 8082 */ 8083 public static final String ALWAYS_ON_VPN_APP = "always_on_vpn_app"; 8084 8085 /** 8086 * Whether to block networking outside of VPN connections while always-on is set. 8087 * @see #ALWAYS_ON_VPN_APP 8088 * 8089 * @hide 8090 */ 8091 @Readable 8092 public static final String ALWAYS_ON_VPN_LOCKDOWN = "always_on_vpn_lockdown"; 8093 8094 /** 8095 * Comma separated list of packages that are allowed to access the network when VPN is in 8096 * lockdown mode but not running. 8097 * @see #ALWAYS_ON_VPN_LOCKDOWN 8098 * 8099 * @hide 8100 */ 8101 @Readable(maxTargetSdk = Build.VERSION_CODES.S) 8102 public static final String ALWAYS_ON_VPN_LOCKDOWN_WHITELIST = 8103 "always_on_vpn_lockdown_whitelist"; 8104 8105 /** 8106 * Whether applications can be installed for this user via the system's 8107 * {@link Intent#ACTION_INSTALL_PACKAGE} mechanism. 8108 * 8109 * <p>1 = permit app installation via the system package installer intent 8110 * <p>0 = do not allow use of the package installer 8111 * @deprecated Starting from {@link android.os.Build.VERSION_CODES#O}, apps should use 8112 * {@link PackageManager#canRequestPackageInstalls()} 8113 * @see PackageManager#canRequestPackageInstalls() 8114 */ 8115 @Deprecated 8116 @Readable 8117 public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps"; 8118 8119 /** 8120 * A flag to tell {@link com.android.server.devicepolicy.DevicePolicyManagerService} that 8121 * the default for {@link #INSTALL_NON_MARKET_APPS} is reversed for this user on OTA. So it 8122 * can set the restriction {@link android.os.UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES} 8123 * on behalf of the profile owner if needed to make the change transparent for profile 8124 * owners. 8125 * 8126 * @hide 8127 */ 8128 @Readable 8129 public static final String UNKNOWN_SOURCES_DEFAULT_REVERSED = 8130 "unknown_sources_default_reversed"; 8131 8132 /** 8133 * Comma-separated list of location providers that are enabled. Do not rely on this value 8134 * being present or correct, or on ContentObserver notifications on the corresponding Uri. 8135 * 8136 * @deprecated This setting no longer exists from Android S onwards as it no longer is 8137 * capable of realistically reflecting location settings. Use {@link 8138 * LocationManager#isProviderEnabled(String)} or {@link LocationManager#isLocationEnabled()} 8139 * instead. 8140 */ 8141 @Deprecated 8142 @Readable 8143 public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; 8144 8145 /** 8146 * The current location mode of the device. Do not rely on this value being present or on 8147 * ContentObserver notifications on the corresponding Uri. 8148 * 8149 * @deprecated The preferred methods for checking location mode and listening for changes 8150 * are via {@link LocationManager#isLocationEnabled()} and 8151 * {@link LocationManager#MODE_CHANGED_ACTION}. 8152 */ 8153 @Deprecated 8154 @Readable 8155 public static final String LOCATION_MODE = "location_mode"; 8156 8157 /** 8158 * The App or module that changes the location mode. 8159 * @hide 8160 */ 8161 @Readable 8162 public static final String LOCATION_CHANGER = "location_changer"; 8163 8164 /** 8165 * The location changer is unknown or unable to detect. 8166 * @hide 8167 */ 8168 public static final int LOCATION_CHANGER_UNKNOWN = 0; 8169 8170 /** 8171 * Location settings in system settings. 8172 * @hide 8173 */ 8174 public static final int LOCATION_CHANGER_SYSTEM_SETTINGS = 1; 8175 8176 /** 8177 * The location icon in drop down notification drawer. 8178 * @hide 8179 */ 8180 public static final int LOCATION_CHANGER_QUICK_SETTINGS = 2; 8181 8182 /** 8183 * Location mode is off. 8184 */ 8185 public static final int LOCATION_MODE_OFF = 0; 8186 8187 /** 8188 * This mode no longer has any distinct meaning, but is interpreted as the location mode is 8189 * on. 8190 * 8191 * @deprecated See {@link #LOCATION_MODE}. 8192 */ 8193 @Deprecated 8194 public static final int LOCATION_MODE_SENSORS_ONLY = 1; 8195 8196 /** 8197 * This mode no longer has any distinct meaning, but is interpreted as the location mode is 8198 * on. 8199 * 8200 * @deprecated See {@link #LOCATION_MODE}. 8201 */ 8202 @Deprecated 8203 public static final int LOCATION_MODE_BATTERY_SAVING = 2; 8204 8205 /** 8206 * This mode no longer has any distinct meaning, but is interpreted as the location mode is 8207 * on. 8208 * 8209 * @deprecated See {@link #LOCATION_MODE}. 8210 */ 8211 @Deprecated 8212 public static final int LOCATION_MODE_HIGH_ACCURACY = 3; 8213 8214 /** 8215 * Location mode is on. 8216 * 8217 * @hide 8218 */ 8219 @SystemApi 8220 public static final int LOCATION_MODE_ON = LOCATION_MODE_HIGH_ACCURACY; 8221 8222 /** 8223 * The current location time zone detection enabled state for the user. 8224 * 8225 * See {@link android.app.time.TimeManager#getTimeZoneCapabilitiesAndConfig} for access. 8226 * See {@link android.app.time.TimeManager#updateTimeZoneConfiguration} to update. 8227 * @hide 8228 */ 8229 public static final String LOCATION_TIME_ZONE_DETECTION_ENABLED = 8230 "location_time_zone_detection_enabled"; 8231 8232 /** 8233 * The accuracy in meters used for coarsening location for clients with only the coarse 8234 * location permission. 8235 * 8236 * @hide 8237 */ 8238 @Readable 8239 public static final String LOCATION_COARSE_ACCURACY_M = "locationCoarseAccuracy"; 8240 8241 /** 8242 * Whether or not to show display system location accesses. 8243 * @hide 8244 */ 8245 public static final String LOCATION_SHOW_SYSTEM_OPS = "locationShowSystemOps"; 8246 8247 /** 8248 * A flag containing settings used for biometric weak 8249 * @hide 8250 */ 8251 @Deprecated 8252 @Readable 8253 public static final String LOCK_BIOMETRIC_WEAK_FLAGS = 8254 "lock_biometric_weak_flags"; 8255 8256 /** 8257 * Whether lock-to-app will lock the keyguard when exiting. 8258 * @hide 8259 */ 8260 @Readable 8261 public static final String LOCK_TO_APP_EXIT_LOCKED = "lock_to_app_exit_locked"; 8262 8263 /** 8264 * Whether autolock is enabled (0 = false, 1 = true) 8265 * 8266 * @deprecated Use {@link android.app.KeyguardManager} to determine the state and security 8267 * level of the keyguard. Accessing this setting from an app that is targeting 8268 * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. 8269 */ 8270 @Deprecated 8271 @Readable 8272 public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; 8273 8274 /** 8275 * Whether lock pattern is visible as user enters (0 = false, 1 = true) 8276 * 8277 * @deprecated Accessing this setting from an app that is targeting 8278 * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. 8279 */ 8280 @Deprecated 8281 @Readable 8282 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; 8283 8284 /** 8285 * Whether lock pattern will vibrate as user enters (0 = false, 1 = 8286 * true) 8287 * 8288 * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the 8289 * lockscreen uses 8290 * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}. 8291 * Accessing this setting from an app that is targeting 8292 * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. 8293 */ 8294 @Deprecated 8295 @Readable 8296 public static final String 8297 LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; 8298 8299 /** 8300 * This preference allows the device to be locked given time after screen goes off, 8301 * subject to current DeviceAdmin policy limits. 8302 * @hide 8303 */ 8304 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 8305 @Readable 8306 public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout"; 8307 8308 8309 /** 8310 * This preference contains the string that shows for owner info on LockScreen. 8311 * @hide 8312 * @deprecated 8313 */ 8314 @Deprecated 8315 @Readable 8316 public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info"; 8317 8318 /** 8319 * Ids of the user-selected appwidgets on the lockscreen (comma-delimited). 8320 * @hide 8321 */ 8322 @Deprecated 8323 @Readable 8324 public static final String LOCK_SCREEN_APPWIDGET_IDS = 8325 "lock_screen_appwidget_ids"; 8326 8327 /** 8328 * Id of the appwidget shown on the lock screen when appwidgets are disabled. 8329 * @hide 8330 */ 8331 @Deprecated 8332 @Readable 8333 public static final String LOCK_SCREEN_FALLBACK_APPWIDGET_ID = 8334 "lock_screen_fallback_appwidget_id"; 8335 8336 /** 8337 * Index of the lockscreen appwidget to restore, -1 if none. 8338 * @hide 8339 */ 8340 @Deprecated 8341 @Readable 8342 public static final String LOCK_SCREEN_STICKY_APPWIDGET = 8343 "lock_screen_sticky_appwidget"; 8344 8345 /** 8346 * This preference enables showing the owner info on LockScreen. 8347 * @hide 8348 * @deprecated 8349 */ 8350 @Deprecated 8351 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 8352 @Readable 8353 public static final String LOCK_SCREEN_OWNER_INFO_ENABLED = 8354 "lock_screen_owner_info_enabled"; 8355 8356 /** 8357 * Indicates whether the user has allowed notifications to be shown atop a securely locked 8358 * screen in their full "private" form (same as when the device is unlocked). 8359 * <p> 8360 * Type: int (0 for false, 1 for true) 8361 * 8362 * @hide 8363 */ 8364 @SystemApi 8365 @Readable 8366 public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = 8367 "lock_screen_allow_private_notifications"; 8368 8369 /** 8370 * When set by a user, allows notification remote input atop a securely locked screen 8371 * without having to unlock 8372 * @hide 8373 */ 8374 @Readable 8375 public static final String LOCK_SCREEN_ALLOW_REMOTE_INPUT = 8376 "lock_screen_allow_remote_input"; 8377 8378 /** 8379 * Indicates which clock face to show on lock screen and AOD formatted as a serialized 8380 * {@link org.json.JSONObject} with the format: 8381 * {"clock": id, "_applied_timestamp": timestamp} 8382 * @hide 8383 */ 8384 @Readable 8385 public static final String LOCK_SCREEN_CUSTOM_CLOCK_FACE = "lock_screen_custom_clock_face"; 8386 8387 /** 8388 * Indicates which clock face to show on lock screen and AOD while docked. 8389 * @hide 8390 */ 8391 @Readable 8392 public static final String DOCKED_CLOCK_FACE = "docked_clock_face"; 8393 8394 /** 8395 * Set by the system to track if the user needs to see the call to action for 8396 * the lockscreen notification policy. 8397 * @hide 8398 */ 8399 @Readable 8400 public static final String SHOW_NOTE_ABOUT_NOTIFICATION_HIDING = 8401 "show_note_about_notification_hiding"; 8402 8403 /** 8404 * Set to 1 by the system after trust agents have been initialized. 8405 * @hide 8406 */ 8407 @Readable 8408 public static final String TRUST_AGENTS_INITIALIZED = 8409 "trust_agents_initialized"; 8410 8411 /** 8412 * Set to 1 by the system after the list of known trust agents have been initialized. 8413 * @hide 8414 */ 8415 public static final String KNOWN_TRUST_AGENTS_INITIALIZED = 8416 "known_trust_agents_initialized"; 8417 8418 /** 8419 * The Logging ID (a unique 64-bit value) as a hex string. 8420 * Used as a pseudonymous identifier for logging. 8421 * @deprecated This identifier is poorly initialized and has 8422 * many collisions. It should not be used. 8423 */ 8424 @Deprecated 8425 @Readable 8426 public static final String LOGGING_ID = "logging_id"; 8427 8428 /** 8429 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead 8430 */ 8431 @Deprecated 8432 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; 8433 8434 /** 8435 * No longer supported. 8436 */ 8437 @Readable 8438 public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled"; 8439 8440 /** 8441 * No longer supported. 8442 */ 8443 @Readable 8444 public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update"; 8445 8446 /** 8447 * No longer supported. 8448 */ 8449 @Readable 8450 public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url"; 8451 8452 /** 8453 * Settings classname to launch when Settings is clicked from All 8454 * Applications. Needed because of user testing between the old 8455 * and new Settings apps. 8456 */ 8457 // TODO: 881807 8458 @Readable 8459 public static final String SETTINGS_CLASSNAME = "settings_classname"; 8460 8461 /** 8462 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead 8463 */ 8464 @Deprecated 8465 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; 8466 8467 /** 8468 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead 8469 */ 8470 @Deprecated 8471 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; 8472 8473 /** 8474 * If accessibility is enabled. 8475 */ 8476 @Readable 8477 public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled"; 8478 8479 /** 8480 * Whether select sound track with audio description by default. 8481 * @hide 8482 */ 8483 public static final String ENABLED_ACCESSIBILITY_AUDIO_DESCRIPTION_BY_DEFAULT = 8484 "enabled_accessibility_audio_description_by_default"; 8485 8486 /** 8487 * Setting specifying if the accessibility shortcut is enabled. 8488 * @hide 8489 */ 8490 @Readable 8491 public static final String ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN = 8492 "accessibility_shortcut_on_lock_screen"; 8493 8494 /** 8495 * Setting specifying if the accessibility shortcut dialog has been shown to this user. 8496 * @hide 8497 */ 8498 @Readable 8499 public static final String ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN = 8500 "accessibility_shortcut_dialog_shown"; 8501 8502 /** 8503 * Setting specifying if the timeout restriction 8504 * {@link ViewConfiguration#getAccessibilityShortcutKeyTimeout()} 8505 * of the accessibility shortcut dialog is skipped. 8506 * 8507 * @hide 8508 */ 8509 public static final String SKIP_ACCESSIBILITY_SHORTCUT_DIALOG_TIMEOUT_RESTRICTION = 8510 "skip_accessibility_shortcut_dialog_timeout_restriction"; 8511 8512 /** 8513 * Setting specifying the accessibility services, accessibility shortcut targets, 8514 * or features to be toggled via the accessibility shortcut. 8515 * 8516 * <p> This is a colon-separated string list which contains the flattened 8517 * {@link ComponentName} and the class name of a system class implementing a supported 8518 * accessibility feature. 8519 * @hide 8520 */ 8521 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 8522 @TestApi 8523 @Readable 8524 public static final String ACCESSIBILITY_SHORTCUT_TARGET_SERVICE = 8525 "accessibility_shortcut_target_service"; 8526 8527 /** 8528 * Setting specifying the accessibility service or feature to be toggled via the 8529 * accessibility button in the navigation bar. This is either a flattened 8530 * {@link ComponentName} or the class name of a system class implementing a supported 8531 * accessibility feature. 8532 * @hide 8533 */ 8534 @Readable 8535 public static final String ACCESSIBILITY_BUTTON_TARGET_COMPONENT = 8536 "accessibility_button_target_component"; 8537 8538 /** 8539 * Setting specifying the accessibility services, accessibility shortcut targets, 8540 * or features to be toggled via the accessibility button in the navigation bar, 8541 * or the floating accessibility button. 8542 * 8543 * <p> This is a colon-separated string list which contains the flattened 8544 * {@link ComponentName} and the class name of a system class implementing a supported 8545 * accessibility feature. 8546 * @hide 8547 */ 8548 @Readable 8549 public static final String ACCESSIBILITY_BUTTON_TARGETS = "accessibility_button_targets"; 8550 8551 /** 8552 * Setting specifying the accessibility services, shortcut targets or features 8553 * to be toggled via the gesture shortcut 8554 * 8555 * <p> This is a colon-separated string list which contains the flattened 8556 * {@link ComponentName} and the class name of a system class 8557 * implementing a supported accessibility feature. 8558 * @hide 8559 */ 8560 @Readable 8561 public static final String ACCESSIBILITY_GESTURE_TARGETS = 8562 "accessibility_gesture_targets"; 8563 8564 /** 8565 * Setting specifying the accessibility services, accessibility shortcut targets, 8566 * or features to be toggled via a tile in the quick settings panel. 8567 * 8568 * <p> This is a colon-separated string list which contains the flattened 8569 * {@link ComponentName} and the class name of a system class implementing a supported 8570 * accessibility feature. 8571 * @hide 8572 */ 8573 public static final String ACCESSIBILITY_QS_TARGETS = "accessibility_qs_targets"; 8574 8575 /** 8576 * The system class name of magnification controller which is a target to be toggled via 8577 * accessibility shortcut or accessibility button. 8578 * 8579 * @hide 8580 */ 8581 @Readable 8582 public static final String ACCESSIBILITY_SHORTCUT_TARGET_MAGNIFICATION_CONTROLLER = 8583 "com.android.server.accessibility.MagnificationController"; 8584 8585 /** 8586 * If touch exploration is enabled. 8587 */ 8588 @Readable 8589 public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled"; 8590 8591 /** 8592 * List of the enabled accessibility providers. 8593 */ 8594 @Readable 8595 public static final String ENABLED_ACCESSIBILITY_SERVICES = 8596 "enabled_accessibility_services"; 8597 8598 /** 8599 * List of the notified non-accessibility category accessibility services. 8600 * 8601 * @hide 8602 */ 8603 @Readable 8604 public static final String NOTIFIED_NON_ACCESSIBILITY_CATEGORY_SERVICES = 8605 "notified_non_accessibility_category_services"; 8606 8607 /** 8608 * List of the accessibility services to which the user has granted 8609 * permission to put the device into touch exploration mode. 8610 * 8611 * @hide 8612 */ 8613 @Readable 8614 public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES = 8615 "touch_exploration_granted_accessibility_services"; 8616 8617 /** 8618 * Is talkback service enabled or not. 0 == no, 1 == yes 8619 * 8620 * @hide 8621 */ 8622 public static final String WEAR_TALKBACK_ENABLED = "wear_talkback_enabled"; 8623 8624 /** 8625 * Whether the Global Actions Panel is enabled. 8626 * @hide 8627 */ 8628 @Readable 8629 public static final String GLOBAL_ACTIONS_PANEL_ENABLED = "global_actions_panel_enabled"; 8630 8631 /** 8632 * Whether the Global Actions Panel can be toggled on or off in Settings. 8633 * @hide 8634 */ 8635 @Readable 8636 public static final String GLOBAL_ACTIONS_PANEL_AVAILABLE = 8637 "global_actions_panel_available"; 8638 8639 /** 8640 * Enables debug mode for the Global Actions Panel. 8641 * @hide 8642 */ 8643 @Readable 8644 public static final String GLOBAL_ACTIONS_PANEL_DEBUG_ENABLED = 8645 "global_actions_panel_debug_enabled"; 8646 8647 /** 8648 * Whether the hush gesture has ever been used 8649 * @hide 8650 */ 8651 @SystemApi 8652 @Readable 8653 public static final String HUSH_GESTURE_USED = "hush_gesture_used"; 8654 8655 /** 8656 * Number of times the user has manually clicked the ringer toggle 8657 * @hide 8658 */ 8659 @Readable 8660 public static final String MANUAL_RINGER_TOGGLE_COUNT = "manual_ringer_toggle_count"; 8661 8662 /** 8663 * Whether to play a sound for charging events. 8664 * @hide 8665 */ 8666 @Readable 8667 public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled"; 8668 8669 /** 8670 * Whether to vibrate for charging events. 8671 * @hide 8672 */ 8673 @Readable 8674 public static final String CHARGING_VIBRATION_ENABLED = "charging_vibration_enabled"; 8675 8676 /** 8677 * If 0, turning on dnd manually will last indefinitely. 8678 * Else if non-negative, turning on dnd manually will last for this many minutes. 8679 * Else (if negative), turning on dnd manually will surface a dialog that prompts 8680 * user to specify a duration. 8681 * @hide 8682 */ 8683 @Readable 8684 public static final String ZEN_DURATION = "zen_duration"; 8685 8686 /** @hide */ public static final int ZEN_DURATION_PROMPT = -1; 8687 /** @hide */ public static final int ZEN_DURATION_FOREVER = 0; 8688 8689 /** 8690 * If nonzero, will show the zen upgrade notification when the user toggles DND on/off. 8691 * @hide 8692 */ 8693 @Readable 8694 public static final String SHOW_ZEN_UPGRADE_NOTIFICATION = "show_zen_upgrade_notification"; 8695 8696 /** 8697 * If nonzero, will show the zen update settings suggestion. 8698 * @hide 8699 */ 8700 @Readable 8701 public static final String SHOW_ZEN_SETTINGS_SUGGESTION = "show_zen_settings_suggestion"; 8702 8703 /** 8704 * If nonzero, zen has not been updated to reflect new changes. 8705 * @hide 8706 */ 8707 @Readable 8708 public static final String ZEN_SETTINGS_UPDATED = "zen_settings_updated"; 8709 8710 /** 8711 * If nonzero, zen setting suggestion has been viewed by user 8712 * @hide 8713 */ 8714 @Readable 8715 public static final String ZEN_SETTINGS_SUGGESTION_VIEWED = 8716 "zen_settings_suggestion_viewed"; 8717 8718 /** 8719 * Whether the in call notification is enabled to play sound during calls. The value is 8720 * boolean (1 or 0). 8721 * @hide 8722 */ 8723 @Readable 8724 public static final String IN_CALL_NOTIFICATION_ENABLED = "in_call_notification_enabled"; 8725 8726 /** 8727 * Uri of the slice that's presented on the keyguard. 8728 * Defaults to a slice with the date and next alarm. 8729 * 8730 * @hide 8731 */ 8732 @Readable 8733 public static final String KEYGUARD_SLICE_URI = "keyguard_slice_uri"; 8734 8735 /** 8736 * The adjustment in font weight. This is used to draw text in bold. 8737 * 8738 * <p> This value can be negative. To display bolded text, the adjustment used is 300, 8739 * which is the difference between 8740 * {@link android.graphics.fonts.FontStyle#FONT_WEIGHT_NORMAL} and 8741 * {@link android.graphics.fonts.FontStyle#FONT_WEIGHT_BOLD}. 8742 * 8743 * @hide 8744 */ 8745 @Readable 8746 public static final String FONT_WEIGHT_ADJUSTMENT = "font_weight_adjustment"; 8747 8748 /** 8749 * Whether to speak passwords while in accessibility mode. 8750 * 8751 * @deprecated The speaking of passwords is controlled by individual accessibility services. 8752 * Apps should ignore this setting and provide complete information to accessibility 8753 * at all times, which was the behavior when this value was {@code true}. 8754 */ 8755 @Deprecated 8756 @Readable 8757 public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password"; 8758 8759 /** 8760 * Whether to draw text with high contrast while in accessibility mode. 8761 * 8762 * @hide 8763 */ 8764 @Readable 8765 public static final String ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED = 8766 "high_text_contrast_enabled"; 8767 8768 /** 8769 * The color contrast, float in [-1, 1], 1 being the highest contrast. 8770 * 8771 * @hide 8772 */ 8773 public static final String CONTRAST_LEVEL = "contrast_level"; 8774 8775 /** 8776 * Setting that specifies whether the display magnification is enabled via a system-wide 8777 * triple tap gesture. Display magnifications allows the user to zoom in the display content 8778 * and is targeted to low vision users. The current magnification scale is controlled by 8779 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}. 8780 * 8781 * @hide 8782 */ 8783 @UnsupportedAppUsage 8784 @TestApi 8785 @Readable 8786 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED = 8787 "accessibility_display_magnification_enabled"; 8788 8789 /** 8790 * Setting that specifies whether the display magnification is enabled via a shortcut 8791 * affordance within the system's navigation area. Display magnifications allows the user to 8792 * zoom in the display content and is targeted to low vision users. The current 8793 * magnification scale is controlled by {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}. 8794 * 8795 * @deprecated Use {@link #ACCESSIBILITY_BUTTON_TARGETS} instead. 8796 * {@link #ACCESSIBILITY_BUTTON_TARGETS} holds the magnification system class name 8797 * when navigation bar magnification is enabled. 8798 * @hide 8799 */ 8800 @SystemApi 8801 @Readable 8802 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED = 8803 "accessibility_display_magnification_navbar_enabled"; 8804 8805 /** 8806 * Setting that specifies what the display magnification scale is. 8807 * Display magnifications allows the user to zoom in the display 8808 * content and is targeted to low vision users. Whether a display 8809 * magnification is performed is controlled by 8810 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED} and 8811 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED} 8812 * 8813 * @hide 8814 */ 8815 @Readable 8816 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE = 8817 "accessibility_display_magnification_scale"; 8818 8819 /** 8820 * Unused mangnification setting 8821 * 8822 * @hide 8823 * @deprecated 8824 */ 8825 @Deprecated 8826 @Readable 8827 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE = 8828 "accessibility_display_magnification_auto_update"; 8829 8830 /** 8831 * Accessibility Window Magnification Allow diagonal scrolling value. The value is boolean. 8832 * 1 : on, 0 : off 8833 * 8834 * @hide 8835 */ 8836 public static final String ACCESSIBILITY_ALLOW_DIAGONAL_SCROLLING = 8837 "accessibility_allow_diagonal_scrolling"; 8838 8839 8840 /** 8841 * Setting that specifies what mode the soft keyboard is in (default or hidden). Can be 8842 * modified from an AccessibilityService using the SoftKeyboardController. 8843 * 8844 * @hide 8845 */ 8846 @Readable 8847 public static final String ACCESSIBILITY_SOFT_KEYBOARD_MODE = 8848 "accessibility_soft_keyboard_mode"; 8849 8850 /** 8851 * Default soft keyboard behavior. 8852 * 8853 * @hide 8854 */ 8855 public static final int SHOW_MODE_AUTO = 0; 8856 8857 /** 8858 * Soft keyboard is never shown. 8859 * 8860 * @hide 8861 */ 8862 public static final int SHOW_MODE_HIDDEN = 1; 8863 8864 /** 8865 * Setting that specifies whether timed text (captions) should be 8866 * displayed in video content. Text display properties are controlled by 8867 * the following settings: 8868 * <ul> 8869 * <li>{@link #ACCESSIBILITY_CAPTIONING_LOCALE} 8870 * <li>{@link #ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR} 8871 * <li>{@link #ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR} 8872 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_COLOR} 8873 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_TYPE} 8874 * <li>{@link #ACCESSIBILITY_CAPTIONING_TYPEFACE} 8875 * <li>{@link #ACCESSIBILITY_CAPTIONING_FONT_SCALE} 8876 * </ul> 8877 * 8878 * @hide 8879 */ 8880 @Readable 8881 public static final String ACCESSIBILITY_CAPTIONING_ENABLED = 8882 "accessibility_captioning_enabled"; 8883 8884 /** 8885 * Setting that specifies the language for captions as a locale string, 8886 * e.g. en_US. 8887 * 8888 * @see java.util.Locale#toString 8889 * @hide 8890 */ 8891 @Readable 8892 public static final String ACCESSIBILITY_CAPTIONING_LOCALE = 8893 "accessibility_captioning_locale"; 8894 8895 /** 8896 * Integer property that specifies the preset style for captions, one 8897 * of: 8898 * <ul> 8899 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESET_CUSTOM} 8900 * <li>a valid index of {@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESETS} 8901 * </ul> 8902 * 8903 * @see java.util.Locale#toString 8904 * @hide 8905 */ 8906 @Readable 8907 public static final String ACCESSIBILITY_CAPTIONING_PRESET = 8908 "accessibility_captioning_preset"; 8909 8910 /** 8911 * Integer property that specifes the background color for captions as a 8912 * packed 32-bit color. 8913 * 8914 * @see android.graphics.Color#argb 8915 * @hide 8916 */ 8917 @Readable 8918 public static final String ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR = 8919 "accessibility_captioning_background_color"; 8920 8921 /** 8922 * Integer property that specifes the foreground color for captions as a 8923 * packed 32-bit color. 8924 * 8925 * @see android.graphics.Color#argb 8926 * @hide 8927 */ 8928 @Readable 8929 public static final String ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR = 8930 "accessibility_captioning_foreground_color"; 8931 8932 /** 8933 * Integer property that specifes the edge type for captions, one of: 8934 * <ul> 8935 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_NONE} 8936 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE} 8937 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW} 8938 * </ul> 8939 * 8940 * @see #ACCESSIBILITY_CAPTIONING_EDGE_COLOR 8941 * @hide 8942 */ 8943 @Readable 8944 public static final String ACCESSIBILITY_CAPTIONING_EDGE_TYPE = 8945 "accessibility_captioning_edge_type"; 8946 8947 /** 8948 * Integer property that specifes the edge color for captions as a 8949 * packed 32-bit color. 8950 * 8951 * @see #ACCESSIBILITY_CAPTIONING_EDGE_TYPE 8952 * @see android.graphics.Color#argb 8953 * @hide 8954 */ 8955 @Readable 8956 public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR = 8957 "accessibility_captioning_edge_color"; 8958 8959 /** 8960 * Integer property that specifes the window color for captions as a 8961 * packed 32-bit color. 8962 * 8963 * @see android.graphics.Color#argb 8964 * @hide 8965 */ 8966 @Readable 8967 public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR = 8968 "accessibility_captioning_window_color"; 8969 8970 /** 8971 * String property that specifies the typeface for captions, one of: 8972 * <ul> 8973 * <li>DEFAULT 8974 * <li>MONOSPACE 8975 * <li>SANS_SERIF 8976 * <li>SERIF 8977 * </ul> 8978 * 8979 * @see android.graphics.Typeface 8980 * @hide 8981 */ 8982 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 8983 @Readable 8984 public static final String ACCESSIBILITY_CAPTIONING_TYPEFACE = 8985 "accessibility_captioning_typeface"; 8986 8987 /** 8988 * Floating point property that specifies font scaling for captions. 8989 * 8990 * @hide 8991 */ 8992 @Readable 8993 public static final String ACCESSIBILITY_CAPTIONING_FONT_SCALE = 8994 "accessibility_captioning_font_scale"; 8995 8996 /** 8997 * Setting that specifies whether display color inversion is enabled. 8998 */ 8999 @Readable 9000 public static final String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = 9001 "accessibility_display_inversion_enabled"; 9002 9003 /** 9004 * Flag that specifies whether font size has been changed. The flag will 9005 * be set when users change the scaled value of font size for the first time. 9006 * @hide 9007 */ 9008 @Readable 9009 public static final String ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED = 9010 "accessibility_font_scaling_has_been_changed"; 9011 9012 /** 9013 * Setting that specifies whether display color space adjustment is 9014 * enabled. 9015 * 9016 * @hide 9017 */ 9018 @UnsupportedAppUsage 9019 @Readable 9020 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED = 9021 "accessibility_display_daltonizer_enabled"; 9022 9023 /** 9024 * Integer property that specifies the type of color space adjustment to 9025 * perform. Valid values are defined in AccessibilityManager and Settings arrays.xml: 9026 * - AccessibilityManager.DALTONIZER_DISABLED = -1 9027 * - AccessibilityManager.DALTONIZER_SIMULATE_MONOCHROMACY = 0 9028 * - <item>@string/daltonizer_mode_protanomaly</item> = 11 9029 * - AccessibilityManager.DALTONIZER_CORRECT_DEUTERANOMALY and 9030 * <item>@string/daltonizer_mode_deuteranomaly</item> = 12 9031 * - <item>@string/daltonizer_mode_tritanomaly</item> = 13 9032 * 9033 * @hide 9034 */ 9035 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9036 @Readable 9037 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER = 9038 "accessibility_display_daltonizer"; 9039 9040 /** 9041 * Integer property that determines the saturation level of color correction. Default value 9042 * is defined in Settings config.xml. 9043 * [0-10] inclusive where 0 would look as if color space adustment is not applied at all. 9044 * 9045 * @hide 9046 */ 9047 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_SATURATION_LEVEL = 9048 "accessibility_display_daltonizer_saturation_level"; 9049 9050 /** 9051 * Setting that specifies whether automatic click when the mouse pointer stops moving is 9052 * enabled. 9053 * 9054 * @hide 9055 */ 9056 @UnsupportedAppUsage 9057 @Readable 9058 public static final String ACCESSIBILITY_AUTOCLICK_ENABLED = 9059 "accessibility_autoclick_enabled"; 9060 9061 /** 9062 * Integer setting specifying amount of time in ms the mouse pointer has to stay still 9063 * before performing click when {@link #ACCESSIBILITY_AUTOCLICK_ENABLED} is set. 9064 * 9065 * @see #ACCESSIBILITY_AUTOCLICK_ENABLED 9066 * @hide 9067 */ 9068 @Readable 9069 public static final String ACCESSIBILITY_AUTOCLICK_DELAY = 9070 "accessibility_autoclick_delay"; 9071 9072 /** 9073 * Whether or not larger size icons are used for the pointer of mouse/trackpad for 9074 * accessibility. 9075 * (0 = false, 1 = true) 9076 * @hide 9077 */ 9078 @UnsupportedAppUsage 9079 @Readable 9080 public static final String ACCESSIBILITY_LARGE_POINTER_ICON = 9081 "accessibility_large_pointer_icon"; 9082 9083 /** 9084 * The timeout for considering a press to be a long press in milliseconds. 9085 * @hide 9086 */ 9087 @UnsupportedAppUsage 9088 @Readable 9089 public static final String LONG_PRESS_TIMEOUT = "long_press_timeout"; 9090 9091 /** 9092 * The duration in milliseconds between the first tap's up event and the second tap's 9093 * down event for an interaction to be considered part of the same multi-press. 9094 * @hide 9095 */ 9096 @Readable 9097 public static final String MULTI_PRESS_TIMEOUT = "multi_press_timeout"; 9098 9099 /** 9100 * The duration before a key repeat begins in milliseconds. 9101 * @hide 9102 */ 9103 public static final String KEY_REPEAT_TIMEOUT_MS = "key_repeat_timeout"; 9104 9105 /** 9106 * The duration between successive key repeats in milliseconds. 9107 * @hide 9108 */ 9109 public static final String KEY_REPEAT_DELAY_MS = "key_repeat_delay"; 9110 9111 /** 9112 * Setting that specifies recommended timeout in milliseconds for controls 9113 * which don't need user's interactions. 9114 * 9115 * @hide 9116 */ 9117 @Readable 9118 public static final String ACCESSIBILITY_NON_INTERACTIVE_UI_TIMEOUT_MS = 9119 "accessibility_non_interactive_ui_timeout_ms"; 9120 9121 /** 9122 * Setting that specifies recommended timeout in milliseconds for controls 9123 * which need user's interactions. 9124 * 9125 * @hide 9126 */ 9127 @Readable 9128 public static final String ACCESSIBILITY_INTERACTIVE_UI_TIMEOUT_MS = 9129 "accessibility_interactive_ui_timeout_ms"; 9130 9131 9132 /** 9133 * Setting that specifies whether Reduce Bright Colors, or brightness dimming by color 9134 * adjustment, is enabled. 9135 * 9136 * @hide 9137 */ 9138 public static final String REDUCE_BRIGHT_COLORS_ACTIVATED = 9139 "reduce_bright_colors_activated"; 9140 9141 /** 9142 * Setting that specifies the level of Reduce Bright Colors in intensity. The range is 9143 * [0, 100]. 9144 * 9145 * @hide 9146 */ 9147 public static final String REDUCE_BRIGHT_COLORS_LEVEL = 9148 "reduce_bright_colors_level"; 9149 9150 /** 9151 * Setting that specifies whether Reduce Bright Colors should persist across reboots. 9152 * 9153 * @hide 9154 */ 9155 public static final String REDUCE_BRIGHT_COLORS_PERSIST_ACROSS_REBOOTS = 9156 "reduce_bright_colors_persist_across_reboots"; 9157 9158 /** 9159 * Setting that specifies whether Even Dimmer - a feature that allows the brightness 9160 * slider to go below what the display can conventionally do, should be enabled. 9161 * 9162 * @hide 9163 */ 9164 public static final String EVEN_DIMMER_ACTIVATED = 9165 "even_dimmer_activated"; 9166 9167 /** 9168 * Setting that specifies which nits level Even Dimmer should allow the screen brightness 9169 * to go down to. 9170 * 9171 * @hide 9172 */ 9173 public static final String EVEN_DIMMER_MIN_NITS = 9174 "even_dimmer_min_nits"; 9175 9176 /** 9177 * List of the enabled print services. 9178 * 9179 * N and beyond uses {@link #DISABLED_PRINT_SERVICES}. But this might be used in an upgrade 9180 * from pre-N. 9181 * 9182 * @hide 9183 */ 9184 @UnsupportedAppUsage 9185 @Readable 9186 public static final String ENABLED_PRINT_SERVICES = 9187 "enabled_print_services"; 9188 9189 /** 9190 * List of the disabled print services. 9191 * 9192 * @hide 9193 */ 9194 @TestApi 9195 @Readable 9196 public static final String DISABLED_PRINT_SERVICES = 9197 "disabled_print_services"; 9198 9199 /** 9200 * The saved value for WindowManagerService.setForcedDisplayDensity() 9201 * formatted as a single integer representing DPI. If unset, then use 9202 * the real display density. 9203 * 9204 * @hide 9205 */ 9206 @Readable 9207 public static final String DISPLAY_DENSITY_FORCED = "display_density_forced"; 9208 9209 /** 9210 * Setting to always use the default text-to-speech settings regardless 9211 * of the application settings. 9212 * 1 = override application settings, 9213 * 0 = use application settings (if specified). 9214 * 9215 * @deprecated The value of this setting is no longer respected by 9216 * the framework text to speech APIs as of the Ice Cream Sandwich release. 9217 */ 9218 @Deprecated 9219 @Readable 9220 public static final String TTS_USE_DEFAULTS = "tts_use_defaults"; 9221 9222 /** 9223 * Default text-to-speech engine speech rate. 100 = 1x 9224 */ 9225 @Readable 9226 public static final String TTS_DEFAULT_RATE = "tts_default_rate"; 9227 9228 /** 9229 * Default text-to-speech engine pitch. 100 = 1x 9230 */ 9231 @Readable 9232 public static final String TTS_DEFAULT_PITCH = "tts_default_pitch"; 9233 9234 /** 9235 * Default text-to-speech engine. 9236 */ 9237 @Readable 9238 public static final String TTS_DEFAULT_SYNTH = "tts_default_synth"; 9239 9240 /** 9241 * Default text-to-speech language. 9242 * 9243 * @deprecated this setting is no longer in use, as of the Ice Cream 9244 * Sandwich release. Apps should never need to read this setting directly, 9245 * instead can query the TextToSpeech framework classes for the default 9246 * locale. {@link TextToSpeech#getLanguage()}. 9247 */ 9248 @Deprecated 9249 @Readable 9250 public static final String TTS_DEFAULT_LANG = "tts_default_lang"; 9251 9252 /** 9253 * Default text-to-speech country. 9254 * 9255 * @deprecated this setting is no longer in use, as of the Ice Cream 9256 * Sandwich release. Apps should never need to read this setting directly, 9257 * instead can query the TextToSpeech framework classes for the default 9258 * locale. {@link TextToSpeech#getLanguage()}. 9259 */ 9260 @Deprecated 9261 @Readable 9262 public static final String TTS_DEFAULT_COUNTRY = "tts_default_country"; 9263 9264 /** 9265 * Default text-to-speech locale variant. 9266 * 9267 * @deprecated this setting is no longer in use, as of the Ice Cream 9268 * Sandwich release. Apps should never need to read this setting directly, 9269 * instead can query the TextToSpeech framework classes for the 9270 * locale that is in use {@link TextToSpeech#getLanguage()}. 9271 */ 9272 @Deprecated 9273 @Readable 9274 public static final String TTS_DEFAULT_VARIANT = "tts_default_variant"; 9275 9276 /** 9277 * Stores the default tts locales on a per engine basis. Stored as 9278 * a comma seperated list of values, each value being of the form 9279 * {@code engine_name:locale} for example, 9280 * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This 9281 * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and 9282 * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this 9283 * setting directly, and can query the TextToSpeech framework classes 9284 * for the locale that is in use. 9285 * 9286 * @hide 9287 */ 9288 @Readable 9289 public static final String TTS_DEFAULT_LOCALE = "tts_default_locale"; 9290 9291 /** 9292 * Space delimited list of plugin packages that are enabled. 9293 */ 9294 @Readable 9295 public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins"; 9296 9297 /** 9298 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} 9299 * instead. 9300 */ 9301 @Deprecated 9302 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = 9303 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; 9304 9305 /** 9306 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} 9307 * instead. 9308 */ 9309 @Deprecated 9310 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = 9311 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; 9312 9313 /** 9314 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} 9315 * instead. 9316 */ 9317 @Deprecated 9318 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = 9319 Global.WIFI_NUM_OPEN_NETWORKS_KEPT; 9320 9321 /** 9322 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} 9323 * instead. 9324 */ 9325 @Deprecated 9326 public static final String WIFI_ON = Global.WIFI_ON; 9327 9328 /** 9329 * The acceptable packet loss percentage (range 0 - 100) before trying 9330 * another AP on the same network. 9331 * @deprecated This setting is not used. 9332 */ 9333 @Deprecated 9334 @Readable 9335 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = 9336 "wifi_watchdog_acceptable_packet_loss_percentage"; 9337 9338 /** 9339 * The number of access points required for a network in order for the 9340 * watchdog to monitor it. 9341 * @deprecated This setting is not used. 9342 */ 9343 @Deprecated 9344 @Readable 9345 public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count"; 9346 9347 /** 9348 * The delay between background checks. 9349 * @deprecated This setting is not used. 9350 */ 9351 @Deprecated 9352 @Readable 9353 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = 9354 "wifi_watchdog_background_check_delay_ms"; 9355 9356 /** 9357 * Whether the Wi-Fi watchdog is enabled for background checking even 9358 * after it thinks the user has connected to a good access point. 9359 * @deprecated This setting is not used. 9360 */ 9361 @Deprecated 9362 @Readable 9363 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = 9364 "wifi_watchdog_background_check_enabled"; 9365 9366 /** 9367 * The timeout for a background ping 9368 * @deprecated This setting is not used. 9369 */ 9370 @Deprecated 9371 @Readable 9372 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = 9373 "wifi_watchdog_background_check_timeout_ms"; 9374 9375 /** 9376 * The number of initial pings to perform that *may* be ignored if they 9377 * fail. Again, if these fail, they will *not* be used in packet loss 9378 * calculation. For example, one network always seemed to time out for 9379 * the first couple pings, so this is set to 3 by default. 9380 * @deprecated This setting is not used. 9381 */ 9382 @Deprecated 9383 @Readable 9384 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = 9385 "wifi_watchdog_initial_ignored_ping_count"; 9386 9387 /** 9388 * The maximum number of access points (per network) to attempt to test. 9389 * If this number is reached, the watchdog will no longer monitor the 9390 * initial connection state for the network. This is a safeguard for 9391 * networks containing multiple APs whose DNS does not respond to pings. 9392 * @deprecated This setting is not used. 9393 */ 9394 @Deprecated 9395 @Readable 9396 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks"; 9397 9398 /** 9399 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead 9400 */ 9401 @Deprecated 9402 @Readable 9403 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; 9404 9405 /** 9406 * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled. 9407 * @deprecated This setting is not used. 9408 */ 9409 @Deprecated 9410 @Readable 9411 public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list"; 9412 9413 /** 9414 * The number of pings to test if an access point is a good connection. 9415 * @deprecated This setting is not used. 9416 */ 9417 @Deprecated 9418 @Readable 9419 public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count"; 9420 9421 /** 9422 * The delay between pings. 9423 * @deprecated This setting is not used. 9424 */ 9425 @Deprecated 9426 @Readable 9427 public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms"; 9428 9429 /** 9430 * The timeout per ping. 9431 * @deprecated This setting is not used. 9432 */ 9433 @Deprecated 9434 @Readable 9435 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms"; 9436 9437 /** 9438 * @deprecated Use 9439 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead 9440 */ 9441 @Deprecated 9442 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; 9443 9444 /** 9445 * @deprecated Use 9446 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead 9447 */ 9448 @Deprecated 9449 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = 9450 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; 9451 9452 /** 9453 * The number of milliseconds to hold on to a PendingIntent based request. This delay gives 9454 * the receivers of the PendingIntent an opportunity to make a new network request before 9455 * the Network satisfying the request is potentially removed. 9456 * 9457 * @hide 9458 */ 9459 @Readable 9460 public static final String CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS = 9461 "connectivity_release_pending_intent_delay_ms"; 9462 9463 /** 9464 * Whether background data usage is allowed. 9465 * 9466 * @deprecated As of {@link VERSION_CODES#ICE_CREAM_SANDWICH}, 9467 * availability of background data depends on several 9468 * combined factors. When background data is unavailable, 9469 * {@link ConnectivityManager#getActiveNetworkInfo()} will 9470 * now appear disconnected. 9471 */ 9472 @Deprecated 9473 @Readable 9474 public static final String BACKGROUND_DATA = "background_data"; 9475 9476 /** 9477 * Origins for which browsers should allow geolocation by default. 9478 * The value is a space-separated list of origins. 9479 */ 9480 @Readable 9481 public static final String ALLOWED_GEOLOCATION_ORIGINS 9482 = "allowed_geolocation_origins"; 9483 9484 /** 9485 * The preferred TTY mode 0 = TTy Off, CDMA default 9486 * 1 = TTY Full 9487 * 2 = TTY HCO 9488 * 3 = TTY VCO 9489 * @hide 9490 */ 9491 @Readable 9492 public static final String PREFERRED_TTY_MODE = 9493 "preferred_tty_mode"; 9494 9495 /** 9496 * Whether the enhanced voice privacy mode is enabled. 9497 * 0 = normal voice privacy 9498 * 1 = enhanced voice privacy 9499 * @hide 9500 */ 9501 @Readable 9502 public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled"; 9503 9504 /** 9505 * Whether the TTY mode mode is enabled. 9506 * 0 = disabled 9507 * 1 = enabled 9508 * @hide 9509 */ 9510 @Readable 9511 public static final String TTY_MODE_ENABLED = "tty_mode_enabled"; 9512 9513 /** 9514 * User-selected RTT mode. When on, outgoing and incoming calls will be answered as RTT 9515 * calls when supported by the device and carrier. Boolean value. 9516 * 0 = OFF 9517 * 1 = ON 9518 */ 9519 @Readable 9520 public static final String RTT_CALLING_MODE = "rtt_calling_mode"; 9521 9522 /** 9523 /** 9524 * Controls whether settings backup is enabled. 9525 * Type: int ( 0 = disabled, 1 = enabled ) 9526 * @hide 9527 */ 9528 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9529 @Readable 9530 public static final String BACKUP_ENABLED = "backup_enabled"; 9531 9532 /** 9533 * Controls whether application data is automatically restored from backup 9534 * at install time. 9535 * Type: int ( 0 = disabled, 1 = enabled ) 9536 * @hide 9537 */ 9538 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9539 @Readable 9540 public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore"; 9541 9542 /** 9543 * Controls whether framework backup scheduling is enabled. 9544 * @hide 9545 */ 9546 public static final String BACKUP_SCHEDULING_ENABLED = "backup_scheduling_enabled"; 9547 9548 /** 9549 * Indicates whether settings backup has been fully provisioned. 9550 * Type: int ( 0 = unprovisioned, 1 = fully provisioned ) 9551 * @hide 9552 */ 9553 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9554 @Readable 9555 public static final String BACKUP_PROVISIONED = "backup_provisioned"; 9556 9557 /** 9558 * Component of the transport to use for backup/restore. 9559 * @hide 9560 */ 9561 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9562 @Readable 9563 public static final String BACKUP_TRANSPORT = "backup_transport"; 9564 9565 /** 9566 * Indicates the version for which the setup wizard was last shown. The version gets 9567 * bumped for each release when there is new setup information to show. 9568 * 9569 * @hide 9570 */ 9571 @SystemApi 9572 @Readable 9573 public static final String LAST_SETUP_SHOWN = "last_setup_shown"; 9574 9575 /** 9576 * The interval in milliseconds after which Wi-Fi is considered idle. 9577 * When idle, it is possible for the device to be switched from Wi-Fi to 9578 * the mobile data network. 9579 * @hide 9580 * @deprecated Use {@link android.provider.Settings.Global#WIFI_IDLE_MS} 9581 * instead. 9582 */ 9583 @Deprecated 9584 public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS; 9585 9586 /** 9587 * The global search provider chosen by the user (if multiple global 9588 * search providers are installed). This will be the provider returned 9589 * by {@link SearchManager#getGlobalSearchActivity()} if it's still 9590 * installed. This setting is stored as a flattened component name as 9591 * per {@link ComponentName#flattenToString()}. 9592 * 9593 * @hide 9594 */ 9595 @Readable 9596 public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY = 9597 "search_global_search_activity"; 9598 9599 /** 9600 * The number of promoted sources in GlobalSearch. 9601 * @hide 9602 */ 9603 @Readable 9604 public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources"; 9605 /** 9606 * The maximum number of suggestions returned by GlobalSearch. 9607 * @hide 9608 */ 9609 @Readable 9610 public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display"; 9611 /** 9612 * The number of suggestions GlobalSearch will ask each non-web search source for. 9613 * @hide 9614 */ 9615 @Readable 9616 public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source"; 9617 /** 9618 * The number of suggestions the GlobalSearch will ask the web search source for. 9619 * @hide 9620 */ 9621 @Readable 9622 public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT = 9623 "search_web_results_override_limit"; 9624 /** 9625 * The number of milliseconds that GlobalSearch will wait for suggestions from 9626 * promoted sources before continuing with all other sources. 9627 * @hide 9628 */ 9629 @Readable 9630 public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS = 9631 "search_promoted_source_deadline_millis"; 9632 /** 9633 * The number of milliseconds before GlobalSearch aborts search suggesiton queries. 9634 * @hide 9635 */ 9636 @Readable 9637 public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis"; 9638 /** 9639 * The maximum number of milliseconds that GlobalSearch shows the previous results 9640 * after receiving a new query. 9641 * @hide 9642 */ 9643 @Readable 9644 public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis"; 9645 /** 9646 * The maximum age of log data used for shortcuts in GlobalSearch. 9647 * @hide 9648 */ 9649 @Readable 9650 public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis"; 9651 /** 9652 * The maximum age of log data used for source ranking in GlobalSearch. 9653 * @hide 9654 */ 9655 @Readable 9656 public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS = 9657 "search_max_source_event_age_millis"; 9658 /** 9659 * The minimum number of impressions needed to rank a source in GlobalSearch. 9660 * @hide 9661 */ 9662 @Readable 9663 public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING = 9664 "search_min_impressions_for_source_ranking"; 9665 /** 9666 * The minimum number of clicks needed to rank a source in GlobalSearch. 9667 * @hide 9668 */ 9669 @Readable 9670 public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING = 9671 "search_min_clicks_for_source_ranking"; 9672 /** 9673 * The maximum number of shortcuts shown by GlobalSearch. 9674 * @hide 9675 */ 9676 @Readable 9677 public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned"; 9678 /** 9679 * The size of the core thread pool for suggestion queries in GlobalSearch. 9680 * @hide 9681 */ 9682 @Readable 9683 public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE = 9684 "search_query_thread_core_pool_size"; 9685 /** 9686 * The maximum size of the thread pool for suggestion queries in GlobalSearch. 9687 * @hide 9688 */ 9689 @Readable 9690 public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE = 9691 "search_query_thread_max_pool_size"; 9692 /** 9693 * The size of the core thread pool for shortcut refreshing in GlobalSearch. 9694 * @hide 9695 */ 9696 @Readable 9697 public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE = 9698 "search_shortcut_refresh_core_pool_size"; 9699 /** 9700 * The maximum size of the thread pool for shortcut refreshing in GlobalSearch. 9701 * @hide 9702 */ 9703 @Readable 9704 public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE = 9705 "search_shortcut_refresh_max_pool_size"; 9706 /** 9707 * The maximun time that excess threads in the GlobalSeach thread pools will 9708 * wait before terminating. 9709 * @hide 9710 */ 9711 @Readable 9712 public static final String SEARCH_THREAD_KEEPALIVE_SECONDS = 9713 "search_thread_keepalive_seconds"; 9714 /** 9715 * The maximum number of concurrent suggestion queries to each source. 9716 * @hide 9717 */ 9718 @Readable 9719 public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT = 9720 "search_per_source_concurrent_query_limit"; 9721 9722 /** 9723 * Whether or not alert sounds are played on StorageManagerService events. 9724 * (0 = false, 1 = true) 9725 * @hide 9726 */ 9727 @Readable 9728 public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd"; 9729 9730 /** 9731 * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true) 9732 * @hide 9733 */ 9734 @Readable 9735 public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart"; 9736 9737 /** 9738 * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true) 9739 * @hide 9740 */ 9741 @Readable 9742 public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt"; 9743 9744 /** 9745 * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true) 9746 * @hide 9747 */ 9748 @Readable 9749 public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled"; 9750 9751 /** 9752 * If nonzero, ANRs in invisible background processes bring up a dialog. 9753 * Otherwise, the process will be silently killed. 9754 * 9755 * Also prevents ANRs and crash dialogs from being suppressed. 9756 * @hide 9757 */ 9758 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9759 @TestApi 9760 @Readable 9761 @SuppressLint("NoSettingsProvider") 9762 public static final String ANR_SHOW_BACKGROUND = "anr_show_background"; 9763 9764 /** 9765 * If nonzero, crashes in foreground processes will bring up a dialog. 9766 * Otherwise, the process will be silently killed. 9767 * @hide 9768 */ 9769 @TestApi 9770 @Readable 9771 @SuppressLint("NoSettingsProvider") 9772 public static final String SHOW_FIRST_CRASH_DIALOG_DEV_OPTION = 9773 "show_first_crash_dialog_dev_option"; 9774 9775 /** 9776 * The {@link ComponentName} string of the service to be used as the voice recognition 9777 * service. 9778 * 9779 * @hide 9780 */ 9781 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9782 @Readable 9783 public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service"; 9784 9785 /** 9786 * The {@link ComponentName} string of the selected spell checker service which is 9787 * one of the services managed by the text service manager. 9788 * 9789 * @hide 9790 */ 9791 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9792 @TestApi 9793 @Readable 9794 @SuppressLint("NoSettingsProvider") 9795 public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker"; 9796 9797 /** 9798 * {@link android.view.textservice.SpellCheckerSubtype#hashCode()} of the selected subtype 9799 * of the selected spell checker service which is one of the services managed by the text 9800 * service manager. 9801 * 9802 * @hide 9803 */ 9804 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 9805 @TestApi 9806 @Readable 9807 @SuppressLint("NoSettingsProvider") 9808 public static final String SELECTED_SPELL_CHECKER_SUBTYPE = 9809 "selected_spell_checker_subtype"; 9810 9811 /** 9812 * Whether spell checker is enabled or not. 9813 * 9814 * @hide 9815 */ 9816 @Readable 9817 public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled"; 9818 9819 /** 9820 * What happens when the user presses the Power button while in-call 9821 * and the screen is on.<br/> 9822 * <b>Values:</b><br/> 9823 * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/> 9824 * 2 - The Power button hangs up the current call.<br/> 9825 * 9826 * @hide 9827 */ 9828 @UnsupportedAppUsage 9829 @Readable 9830 public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior"; 9831 9832 /** 9833 * Whether the user allows minimal post processing or not. 9834 * 9835 * <p>Values: 9836 * 0 - Not allowed. Any preferences set through the Window.setPreferMinimalPostProcessing 9837 * API will be ignored. 9838 * 1 - Allowed. Any preferences set through the Window.setPreferMinimalPostProcessing API 9839 * will be respected and the appropriate signals will be sent to display. 9840 * (Default behaviour) 9841 * 9842 * @hide 9843 */ 9844 @Readable 9845 public static final String MINIMAL_POST_PROCESSING_ALLOWED = 9846 "minimal_post_processing_allowed"; 9847 9848 /** 9849 * No mode switching will happen. 9850 * 9851 * @see #MATCH_CONTENT_FRAME_RATE 9852 * @hide 9853 */ 9854 public static final int MATCH_CONTENT_FRAMERATE_NEVER = 0; 9855 9856 /** 9857 * Allow only refresh rate switching between modes in the same configuration group. 9858 * This way only switches without visual interruptions for the user will be allowed. 9859 * 9860 * @see #MATCH_CONTENT_FRAME_RATE 9861 * @hide 9862 */ 9863 public static final int MATCH_CONTENT_FRAMERATE_SEAMLESSS_ONLY = 1; 9864 9865 /** 9866 * Allow refresh rate switching between all refresh rates even if the switch will have 9867 * visual interruptions for the user. 9868 * 9869 * @see #MATCH_CONTENT_FRAME_RATE 9870 * @hide 9871 */ 9872 public static final int MATCH_CONTENT_FRAMERATE_ALWAYS = 2; 9873 9874 /** 9875 * User's preference for refresh rate switching. 9876 * 9877 * <p>Values: 9878 * 0 - Never switch refresh rates. 9879 * 1 - Switch refresh rates only when it can be done seamlessly. (Default behaviour) 9880 * 2 - Always prefer refresh rate switching even if it's going to have visual interruptions 9881 * for the user. 9882 * 9883 * @see android.view.Surface#setFrameRate 9884 * @see #MATCH_CONTENT_FRAMERATE_NEVER 9885 * @see #MATCH_CONTENT_FRAMERATE_SEAMLESSS_ONLY 9886 * @see #MATCH_CONTENT_FRAMERATE_ALWAYS 9887 * @hide 9888 */ 9889 public static final String MATCH_CONTENT_FRAME_RATE = 9890 "match_content_frame_rate"; 9891 9892 /** 9893 * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen". 9894 * @hide 9895 */ 9896 public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1; 9897 9898 /** 9899 * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up". 9900 * @hide 9901 */ 9902 public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2; 9903 9904 /** 9905 * INCALL_POWER_BUTTON_BEHAVIOR default value. 9906 * @hide 9907 */ 9908 public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT = 9909 INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF; 9910 9911 /** 9912 * What happens when the user presses the Back button while in-call 9913 * and the screen is on.<br/> 9914 * <b>Values:</b><br/> 9915 * 0 - The Back buttons does nothing different.<br/> 9916 * 1 - The Back button hangs up the current call.<br/> 9917 * 9918 * @hide 9919 */ 9920 @Readable 9921 public static final String INCALL_BACK_BUTTON_BEHAVIOR = "incall_back_button_behavior"; 9922 9923 /** 9924 * INCALL_BACK_BUTTON_BEHAVIOR value for no action. 9925 * @hide 9926 */ 9927 public static final int INCALL_BACK_BUTTON_BEHAVIOR_NONE = 0x0; 9928 9929 /** 9930 * INCALL_BACK_BUTTON_BEHAVIOR value for "hang up". 9931 * @hide 9932 */ 9933 public static final int INCALL_BACK_BUTTON_BEHAVIOR_HANGUP = 0x1; 9934 9935 /** 9936 * INCALL_POWER_BUTTON_BEHAVIOR default value. 9937 * @hide 9938 */ 9939 public static final int INCALL_BACK_BUTTON_BEHAVIOR_DEFAULT = 9940 INCALL_BACK_BUTTON_BEHAVIOR_NONE; 9941 9942 /** 9943 * Whether the device should wake when the wake gesture sensor detects motion. 9944 * @hide 9945 */ 9946 @Readable 9947 public static final String WAKE_GESTURE_ENABLED = "wake_gesture_enabled"; 9948 9949 /** 9950 * Whether the device should doze if configured. 9951 * @hide 9952 */ 9953 @UnsupportedAppUsage 9954 @Readable 9955 public static final String DOZE_ENABLED = "doze_enabled"; 9956 9957 /** 9958 * Indicates whether doze should be always on. 9959 * <p> 9960 * Type: int (0 for false, 1 for true) 9961 * 9962 * @hide 9963 */ 9964 @SystemApi 9965 @Readable 9966 public static final String DOZE_ALWAYS_ON = "doze_always_on"; 9967 9968 /** 9969 * Whether the device should pulse on pick up gesture. 9970 * @hide 9971 */ 9972 @Readable 9973 public static final String DOZE_PICK_UP_GESTURE = "doze_pulse_on_pick_up"; 9974 9975 /** 9976 * Whether the device should pulse on long press gesture. 9977 * @hide 9978 */ 9979 @Readable 9980 public static final String DOZE_PULSE_ON_LONG_PRESS = "doze_pulse_on_long_press"; 9981 9982 /** 9983 * Whether the device should pulse on double tap gesture. 9984 * @hide 9985 */ 9986 @Readable 9987 public static final String DOZE_DOUBLE_TAP_GESTURE = "doze_pulse_on_double_tap"; 9988 9989 /** 9990 * Whether the device should respond to the SLPI tap gesture. 9991 * @hide 9992 */ 9993 @Readable 9994 public static final String DOZE_TAP_SCREEN_GESTURE = "doze_tap_gesture"; 9995 9996 /** 9997 * Gesture that wakes up the display, showing some version of the lock screen. 9998 * @hide 9999 */ 10000 @Readable 10001 public static final String DOZE_WAKE_LOCK_SCREEN_GESTURE = "doze_wake_screen_gesture"; 10002 10003 /** 10004 * Gesture that wakes up the display, toggling between {@link Display.STATE_OFF} and 10005 * {@link Display.STATE_DOZE}. 10006 * @hide 10007 */ 10008 @Readable 10009 public static final String DOZE_WAKE_DISPLAY_GESTURE = "doze_wake_display_gesture"; 10010 10011 /** 10012 * Gesture that wakes up the display on quick pickup, toggling between 10013 * {@link Display.STATE_OFF} and {@link Display.STATE_DOZE}. 10014 * @hide 10015 */ 10016 public static final String DOZE_QUICK_PICKUP_GESTURE = "doze_quick_pickup_gesture"; 10017 10018 /** 10019 * Whether the device should suppress the current doze configuration and disable dozing. 10020 * @hide 10021 */ 10022 @Readable 10023 public static final String SUPPRESS_DOZE = "suppress_doze"; 10024 10025 /** 10026 * Gesture that skips media. 10027 * @hide 10028 */ 10029 @Readable 10030 public static final String SKIP_GESTURE = "skip_gesture"; 10031 10032 /** 10033 * Count of successful gestures. 10034 * @hide 10035 */ 10036 @Readable 10037 public static final String SKIP_GESTURE_COUNT = "skip_gesture_count"; 10038 10039 /** 10040 * Count of non-gesture interaction. 10041 * @hide 10042 */ 10043 @Readable 10044 public static final String SKIP_TOUCH_COUNT = "skip_touch_count"; 10045 10046 /** 10047 * Direction to advance media for skip gesture 10048 * @hide 10049 */ 10050 @Readable 10051 public static final String SKIP_DIRECTION = "skip_gesture_direction"; 10052 10053 /** 10054 * Gesture that silences sound (alarms, notification, calls). 10055 * @hide 10056 */ 10057 @Readable 10058 public static final String SILENCE_GESTURE = "silence_gesture"; 10059 10060 /** 10061 * Count of successful silence alarms gestures. 10062 * @hide 10063 */ 10064 @Readable 10065 public static final String SILENCE_ALARMS_GESTURE_COUNT = "silence_alarms_gesture_count"; 10066 10067 /** 10068 * Count of successful silence timer gestures. 10069 * @hide 10070 */ 10071 @Readable 10072 public static final String SILENCE_TIMER_GESTURE_COUNT = "silence_timer_gesture_count"; 10073 10074 /** 10075 * Count of successful silence call gestures. 10076 * @hide 10077 */ 10078 @Readable 10079 public static final String SILENCE_CALL_GESTURE_COUNT = "silence_call_gesture_count"; 10080 10081 /** 10082 * Count of non-gesture interaction. 10083 * @hide 10084 */ 10085 @Readable 10086 public static final String SILENCE_ALARMS_TOUCH_COUNT = "silence_alarms_touch_count"; 10087 10088 /** 10089 * Count of non-gesture interaction. 10090 * @hide 10091 */ 10092 @Readable 10093 public static final String SILENCE_TIMER_TOUCH_COUNT = "silence_timer_touch_count"; 10094 10095 /** 10096 * Count of non-gesture interaction. 10097 * @hide 10098 */ 10099 @Readable 10100 public static final String SILENCE_CALL_TOUCH_COUNT = "silence_call_touch_count"; 10101 10102 /** 10103 * Number of successful "Motion Sense" tap gestures to pause media. 10104 * @hide 10105 */ 10106 @Readable 10107 public static final String AWARE_TAP_PAUSE_GESTURE_COUNT = "aware_tap_pause_gesture_count"; 10108 10109 /** 10110 * Number of touch interactions to pause media when a "Motion Sense" gesture could 10111 * have been used. 10112 * @hide 10113 */ 10114 @Readable 10115 public static final String AWARE_TAP_PAUSE_TOUCH_COUNT = "aware_tap_pause_touch_count"; 10116 10117 /** 10118 * For user preference if swipe bottom to expand notification gesture enabled. 10119 * @hide 10120 */ 10121 public static final String SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED = 10122 "swipe_bottom_to_notification_enabled"; 10123 10124 /** 10125 * Controls whether One-Handed mode is currently activated. 10126 * @hide 10127 */ 10128 public static final String ONE_HANDED_MODE_ACTIVATED = "one_handed_mode_activated"; 10129 10130 /** 10131 * For user preference if One-Handed Mode enabled. 10132 * @hide 10133 */ 10134 public static final String ONE_HANDED_MODE_ENABLED = "one_handed_mode_enabled"; 10135 10136 /** 10137 * For user preference if One-Handed Mode timeout. 10138 * @hide 10139 */ 10140 public static final String ONE_HANDED_MODE_TIMEOUT = "one_handed_mode_timeout"; 10141 10142 /** 10143 * For user taps app to exit One-Handed Mode. 10144 * @hide 10145 */ 10146 public static final String TAPS_APP_TO_EXIT = "taps_app_to_exit"; 10147 10148 /** 10149 * Internal use, one handed mode tutorial showed times. 10150 * @hide 10151 */ 10152 public static final String ONE_HANDED_TUTORIAL_SHOW_COUNT = 10153 "one_handed_tutorial_show_count"; 10154 10155 /** 10156 * Toggle to enable/disable for the apps to use the Ui translation for Views. The value 10157 * indicates whether the Ui translation is enabled by the user. 10158 * <p> 10159 * Type: {@code int} ({@code 0} for disabled, {@code 1} for enabled) 10160 * 10161 * @hide 10162 */ 10163 @SystemApi 10164 @Readable 10165 @SuppressLint("NoSettingsProvider") 10166 public static final String UI_TRANSLATION_ENABLED = "ui_translation_enabled"; 10167 10168 /** 10169 * The current night mode that has been selected by the user. Owned 10170 * and controlled by UiModeManagerService. Constants are as per 10171 * UiModeManager. 10172 * @hide 10173 */ 10174 @Readable 10175 public static final String UI_NIGHT_MODE = "ui_night_mode"; 10176 10177 /** 10178 * The current night mode custom type that has been selected by the user. Owned 10179 * and controlled by UiModeManagerService. Constants are as per UiModeManager. 10180 * @hide 10181 */ 10182 @Readable 10183 @SuppressLint("NoSettingsProvider") 10184 public static final String UI_NIGHT_MODE_CUSTOM_TYPE = "ui_night_mode_custom_type"; 10185 10186 /** 10187 * The current night mode that has been overridden to turn on by the system. Owned 10188 * and controlled by UiModeManagerService. Constants are as per 10189 * UiModeManager. 10190 * @hide 10191 */ 10192 @Readable 10193 public static final String UI_NIGHT_MODE_OVERRIDE_ON = "ui_night_mode_override_on"; 10194 10195 /** 10196 * The last computed night mode bool the last time the phone was on 10197 * @hide 10198 */ 10199 public static final String UI_NIGHT_MODE_LAST_COMPUTED = "ui_night_mode_last_computed"; 10200 10201 /** 10202 * The current night mode that has been overridden to turn off by the system. Owned 10203 * and controlled by UiModeManagerService. Constants are as per 10204 * UiModeManager. 10205 * @hide 10206 */ 10207 @Readable 10208 public static final String UI_NIGHT_MODE_OVERRIDE_OFF = "ui_night_mode_override_off"; 10209 10210 /** 10211 * Whether screensavers are enabled. 10212 * @hide 10213 */ 10214 @Readable 10215 public static final String SCREENSAVER_ENABLED = "screensaver_enabled"; 10216 10217 /** 10218 * The user's chosen screensaver components. 10219 * 10220 * These will be launched by the PhoneWindowManager after a timeout when not on 10221 * battery, or upon dock insertion (if SCREENSAVER_ACTIVATE_ON_DOCK is set to 1). 10222 * @hide 10223 */ 10224 @Readable 10225 public static final String SCREENSAVER_COMPONENTS = "screensaver_components"; 10226 10227 /** 10228 * If screensavers are enabled, whether the screensaver should be automatically launched 10229 * when the device is inserted into a (desk) dock. 10230 * @hide 10231 */ 10232 @Readable 10233 public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock"; 10234 10235 /** 10236 * If screensavers are enabled, whether the screensaver should be automatically launched 10237 * when the screen times out when not on battery. 10238 * @hide 10239 */ 10240 @Readable 10241 public static final String SCREENSAVER_ACTIVATE_ON_SLEEP = "screensaver_activate_on_sleep"; 10242 10243 /** 10244 * If screensavers are enabled, the default screensaver component. 10245 * @hide 10246 */ 10247 @Readable 10248 public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component"; 10249 10250 /** 10251 * Whether complications are enabled to be shown over the screensaver by the user. 10252 * 10253 * @hide 10254 */ 10255 public static final String SCREENSAVER_COMPLICATIONS_ENABLED = 10256 "screensaver_complications_enabled"; 10257 10258 /** 10259 * Defines the enabled state for the glanceable hub. 10260 * 10261 * @hide 10262 */ 10263 public static final String GLANCEABLE_HUB_ENABLED = "glanceable_hub_enabled"; 10264 10265 /** 10266 * Whether home controls are enabled to be shown over the screensaver by the user. 10267 * 10268 * @hide 10269 */ 10270 public static final String SCREENSAVER_HOME_CONTROLS_ENABLED = 10271 "screensaver_home_controls_enabled"; 10272 10273 10274 /** 10275 * Default, indicates that the user has not yet started the dock setup flow. 10276 * 10277 * @hide 10278 */ 10279 public static final int DOCK_SETUP_NOT_STARTED = 0; 10280 10281 /** 10282 * Indicates that the user has started but not yet completed dock setup. 10283 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10284 * 10285 * @hide 10286 */ 10287 public static final int DOCK_SETUP_STARTED = 1; 10288 10289 /** 10290 * Indicates that the user has snoozed dock setup and will complete it later. 10291 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10292 * 10293 * @hide 10294 */ 10295 public static final int DOCK_SETUP_PAUSED = 2; 10296 10297 /** 10298 * Indicates that the user has been prompted to start dock setup. 10299 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10300 * 10301 * @hide 10302 */ 10303 public static final int DOCK_SETUP_PROMPTED = 3; 10304 10305 /** 10306 * Indicates that the user has started dock setup but never finished it. 10307 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10308 * 10309 * @hide 10310 */ 10311 public static final int DOCK_SETUP_INCOMPLETE = 4; 10312 10313 /** 10314 * Indicates that the user has completed dock setup. 10315 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10316 * 10317 * @hide 10318 */ 10319 public static final int DOCK_SETUP_COMPLETED = 10; 10320 10321 /** 10322 * Indicates that dock setup timed out before the user could complete it. 10323 * One of the possible states for {@link #DOCK_SETUP_STATE}. 10324 * 10325 * @hide 10326 */ 10327 public static final int DOCK_SETUP_TIMED_OUT = 11; 10328 10329 /** @hide */ 10330 @Retention(RetentionPolicy.SOURCE) 10331 @IntDef({ 10332 DOCK_SETUP_NOT_STARTED, 10333 DOCK_SETUP_STARTED, 10334 DOCK_SETUP_PAUSED, 10335 DOCK_SETUP_PROMPTED, 10336 DOCK_SETUP_INCOMPLETE, 10337 DOCK_SETUP_COMPLETED, 10338 DOCK_SETUP_TIMED_OUT 10339 }) 10340 public @interface DockSetupState { 10341 } 10342 10343 /** 10344 * Defines the user's current state of dock setup. 10345 * The possible states are defined in {@link DockSetupState}. 10346 * 10347 * @hide 10348 */ 10349 public static final String DOCK_SETUP_STATE = "dock_setup_state"; 10350 10351 10352 /** 10353 * Default, indicates that the user has not yet started the hub mode tutorial. 10354 * 10355 * @hide 10356 */ 10357 public static final int HUB_MODE_TUTORIAL_NOT_STARTED = 0; 10358 10359 /** 10360 * Indicates that the user has started but not yet completed the hub mode tutorial. 10361 * One of the possible states for {@link #HUB_MODE_TUTORIAL_STATE}. 10362 * 10363 * @hide 10364 */ 10365 public static final int HUB_MODE_TUTORIAL_STARTED = 1; 10366 10367 /** 10368 * Any value greater than or equal to this value is considered that the user has 10369 * completed the hub mode tutorial. 10370 * 10371 * One of the possible states for {@link #HUB_MODE_TUTORIAL_STATE}. 10372 * 10373 * @hide 10374 */ 10375 public static final int HUB_MODE_TUTORIAL_COMPLETED = 10; 10376 10377 /** @hide */ 10378 @Retention(RetentionPolicy.SOURCE) 10379 @IntDef({ 10380 HUB_MODE_TUTORIAL_NOT_STARTED, 10381 HUB_MODE_TUTORIAL_STARTED, 10382 HUB_MODE_TUTORIAL_COMPLETED 10383 }) 10384 public @interface HubModeTutorialState { 10385 } 10386 10387 /** 10388 * Defines the user's current state of navigating through the hub mode tutorial. 10389 * Some possible states are defined in {@link HubModeTutorialState}. 10390 * 10391 * Any value greater than or equal to {@link HUB_MODE_TUTORIAL_COMPLETED} indicates that 10392 * the user has completed that version of the hub mode tutorial. And tutorial may be 10393 * shown again when a new version becomes available. 10394 * @hide 10395 */ 10396 public static final String HUB_MODE_TUTORIAL_STATE = "hub_mode_tutorial_state"; 10397 10398 /** 10399 * The default NFC payment component 10400 * 10401 * @deprecated please use {@link android.app.role.RoleManager#getRoleHolders(String)} 10402 * with {@link android.app.role.RoleManager#ROLE_WALLET} parameter. 10403 * @hide 10404 */ 10405 @Deprecated 10406 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10407 public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component"; 10408 10409 /** 10410 * Whether NFC payment is handled by the foreground application or a default. 10411 * @hide 10412 */ 10413 @Readable 10414 public static final String NFC_PAYMENT_FOREGROUND = "nfc_payment_foreground"; 10415 10416 /** 10417 * Specifies the package name currently configured to be the primary sms application 10418 * @hide 10419 */ 10420 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10421 @Readable 10422 public static final String SMS_DEFAULT_APPLICATION = "sms_default_application"; 10423 10424 /** 10425 * Specifies the package name currently configured to be the default dialer application 10426 * @hide 10427 */ 10428 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10429 @Readable 10430 public static final String DIALER_DEFAULT_APPLICATION = "dialer_default_application"; 10431 10432 /** 10433 * Specifies the component name currently configured to be the default call screening 10434 * application 10435 * @hide 10436 */ 10437 @Readable 10438 public static final String CALL_SCREENING_DEFAULT_COMPONENT = 10439 "call_screening_default_component"; 10440 10441 /** 10442 * Specifies the package name currently configured to be the emergency assistance application 10443 * 10444 * @see android.telephony.TelephonyManager#ACTION_EMERGENCY_ASSISTANCE 10445 * 10446 * @hide 10447 */ 10448 @Readable 10449 public static final String EMERGENCY_ASSISTANCE_APPLICATION = "emergency_assistance_application"; 10450 10451 /** 10452 * Specifies whether the current app context on scren (assist data) will be sent to the 10453 * assist application (active voice interaction service). 10454 * 10455 * @hide 10456 */ 10457 @Readable 10458 public static final String ASSIST_STRUCTURE_ENABLED = "assist_structure_enabled"; 10459 10460 /** 10461 * Specifies whether a screenshot of the screen contents will be sent to the assist 10462 * application (active voice interaction service). 10463 * 10464 * @hide 10465 */ 10466 @Readable 10467 public static final String ASSIST_SCREENSHOT_ENABLED = "assist_screenshot_enabled"; 10468 10469 /** 10470 * Specifies whether the screen will show an animation if screen contents are sent to the 10471 * assist application (active voice interaction service). 10472 * 10473 * Note that the disclosure will be forced for third-party assistants or if the device 10474 * does not support disabling it. 10475 * 10476 * @hide 10477 */ 10478 @Readable 10479 public static final String ASSIST_DISCLOSURE_ENABLED = "assist_disclosure_enabled"; 10480 10481 /** 10482 * Control if rotation suggestions are sent to System UI when in rotation locked mode. 10483 * Done to enable screen rotation while the screen rotation is locked. Enabling will 10484 * poll the accelerometer in rotation locked mode. 10485 * 10486 * If 0, then rotation suggestions are not sent to System UI. If 1, suggestions are sent. 10487 * 10488 * @hide 10489 */ 10490 @Readable 10491 public static final String SHOW_ROTATION_SUGGESTIONS = "show_rotation_suggestions"; 10492 10493 /** 10494 * The disabled state of SHOW_ROTATION_SUGGESTIONS. 10495 * @hide 10496 */ 10497 public static final int SHOW_ROTATION_SUGGESTIONS_DISABLED = 0x0; 10498 10499 /** 10500 * The enabled state of SHOW_ROTATION_SUGGESTIONS. 10501 * @hide 10502 */ 10503 public static final int SHOW_ROTATION_SUGGESTIONS_ENABLED = 0x1; 10504 10505 /** 10506 * The default state of SHOW_ROTATION_SUGGESTIONS. 10507 * @hide 10508 */ 10509 public static final int SHOW_ROTATION_SUGGESTIONS_DEFAULT = 10510 SHOW_ROTATION_SUGGESTIONS_ENABLED; 10511 10512 /** 10513 * The number of accepted rotation suggestions. Used to determine if the user has been 10514 * introduced to rotation suggestions. 10515 * @hide 10516 */ 10517 @Readable 10518 public static final String NUM_ROTATION_SUGGESTIONS_ACCEPTED = 10519 "num_rotation_suggestions_accepted"; 10520 10521 /** 10522 * Read only list of the service components that the current user has explicitly allowed to 10523 * see and assist with all of the user's notifications. 10524 * 10525 * @deprecated Use 10526 * {@link NotificationManager#isNotificationAssistantAccessGranted(ComponentName)}. 10527 * @hide 10528 */ 10529 @Deprecated 10530 @Readable 10531 public static final String ENABLED_NOTIFICATION_ASSISTANT = 10532 "enabled_notification_assistant"; 10533 10534 /** 10535 * Read only list of the service components that the current user has explicitly allowed to 10536 * see all of the user's notifications, separated by ':'. 10537 * 10538 * @hide 10539 * @deprecated Use 10540 * {@link NotificationManager#isNotificationListenerAccessGranted(ComponentName)}. 10541 */ 10542 @Deprecated 10543 @UnsupportedAppUsage 10544 @Readable 10545 public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners"; 10546 10547 /** 10548 * Read only list of the packages that the current user has explicitly allowed to 10549 * manage do not disturb, separated by ':'. 10550 * 10551 * @deprecated Use {@link NotificationManager#isNotificationPolicyAccessGranted()}. 10552 * @hide 10553 */ 10554 @Deprecated 10555 @TestApi 10556 @Readable 10557 public static final String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES = 10558 "enabled_notification_policy_access_packages"; 10559 10560 /** 10561 * Defines whether managed profile ringtones should be synced from it's parent profile 10562 * <p> 10563 * 0 = ringtones are not synced 10564 * 1 = ringtones are synced from the profile's parent (default) 10565 * <p> 10566 * This value is only used for managed profiles. 10567 * @hide 10568 */ 10569 @TestApi 10570 @Readable 10571 @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) 10572 public static final String SYNC_PARENT_SOUNDS = "sync_parent_sounds"; 10573 10574 /** 10575 * @hide 10576 */ 10577 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 10578 @TestApi 10579 @Readable 10580 public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations"; 10581 10582 /** 10583 * This is the query URI for finding a print service to install. 10584 * 10585 * @hide 10586 */ 10587 @Readable 10588 public static final String PRINT_SERVICE_SEARCH_URI = "print_service_search_uri"; 10589 10590 /** 10591 * This is the query URI for finding a NFC payment service to install. 10592 * 10593 * @hide 10594 */ 10595 @Readable 10596 public static final String PAYMENT_SERVICE_SEARCH_URI = "payment_service_search_uri"; 10597 10598 /** 10599 * This is the query URI for finding a auto fill service to install. 10600 * 10601 * @hide 10602 */ 10603 @Readable 10604 public static final String AUTOFILL_SERVICE_SEARCH_URI = "autofill_service_search_uri"; 10605 10606 /** 10607 * If enabled, apps should try to skip any introductory hints on first launch. This might 10608 * apply to users that are already familiar with the environment or temporary users. 10609 * <p> 10610 * Type : int (0 to show hints, 1 to skip showing hints) 10611 */ 10612 @Readable 10613 public static final String SKIP_FIRST_USE_HINTS = "skip_first_use_hints"; 10614 10615 /** 10616 * Persisted playback time after a user confirmation of an unsafe volume level. 10617 * 10618 * @hide 10619 */ 10620 @Readable 10621 public static final String UNSAFE_VOLUME_MUSIC_ACTIVE_MS = "unsafe_volume_music_active_ms"; 10622 10623 /** 10624 * Indicates whether the spatial audio feature was enabled for this user. 10625 * 10626 * Type : int (0 disabled, 1 enabled) 10627 * 10628 * @hide 10629 */ 10630 public static final String SPATIAL_AUDIO_ENABLED = "spatial_audio_enabled"; 10631 10632 /** 10633 * Internal collection of audio device inventory items 10634 * The device item stored are {@link com.android.server.audio.AdiDeviceState} 10635 * @hide 10636 */ 10637 public static final String AUDIO_DEVICE_INVENTORY = "audio_device_inventory"; 10638 10639 /** 10640 * Stores a boolean that defines whether the CSD as a feature is enabled or not. 10641 * @hide 10642 */ 10643 public static final String AUDIO_SAFE_CSD_AS_A_FEATURE_ENABLED = 10644 "audio_safe_csd_as_a_feature_enabled"; 10645 10646 /** 10647 * Indicates whether notification display on the lock screen is enabled. 10648 * <p> 10649 * Type: int (0 for false, 1 for true) 10650 * 10651 * @hide 10652 */ 10653 @SystemApi 10654 @Readable 10655 public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = 10656 "lock_screen_show_notifications"; 10657 10658 /** 10659 * Indicates whether the lock screen should display silent notifications. 10660 * <p> 10661 * Type: int (0 for false, 1 for true) 10662 * 10663 * @hide 10664 */ 10665 @Readable 10666 public static final String LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS = 10667 "lock_screen_show_silent_notifications"; 10668 10669 /** 10670 * Indicates whether "seen" notifications should be suppressed from the lockscreen. 10671 * <p> 10672 * Type: int (0 for unset, 1 for true, 2 for false) 10673 * 10674 * @hide 10675 */ 10676 public static final String LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS = 10677 "lock_screen_show_only_unseen_notifications"; 10678 10679 /** 10680 * Indicates whether snooze options should be shown on notifications 10681 * <p> 10682 * Type: int (0 for false, 1 for true) 10683 * 10684 * @hide 10685 */ 10686 @Readable 10687 public static final String SHOW_NOTIFICATION_SNOOZE = "show_notification_snooze"; 10688 10689 /** 10690 * 1 if it is allowed to remove the primary GAIA account. 0 by default. 10691 * @hide 10692 */ 10693 public static final String ALLOW_PRIMARY_GAIA_ACCOUNT_REMOVAL_FOR_TESTS = 10694 "allow_primary_gaia_account_removal_for_tests"; 10695 10696 /** 10697 * List of TV inputs that are currently hidden. This is a string 10698 * containing the IDs of all hidden TV inputs. Each ID is encoded by 10699 * {@link android.net.Uri#encode(String)} and separated by ':'. 10700 * @hide 10701 */ 10702 @Readable 10703 public static final String TV_INPUT_HIDDEN_INPUTS = "tv_input_hidden_inputs"; 10704 10705 /** 10706 * List of custom TV input labels. This is a string containing <TV input id, custom name> 10707 * pairs. TV input id and custom name are encoded by {@link android.net.Uri#encode(String)} 10708 * and separated by ','. Each pair is separated by ':'. 10709 * @hide 10710 */ 10711 @Readable 10712 public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels"; 10713 10714 /** 10715 * Whether TV app uses non-system inputs. 10716 * 10717 * <p> 10718 * The value is boolean (1 or 0), where 1 means non-system TV inputs are allowed, 10719 * and 0 means non-system TV inputs are not allowed. 10720 * 10721 * <p> 10722 * Devices such as sound bars may have changed the system property allow_third_party_inputs 10723 * to false so the TV Application only uses HDMI and other built in inputs. This setting 10724 * allows user to override the default and have the TV Application use third party TV inputs 10725 * available on play store. 10726 * 10727 * @hide 10728 */ 10729 @Readable 10730 public static final String TV_APP_USES_NON_SYSTEM_INPUTS = "tv_app_uses_non_system_inputs"; 10731 10732 /** 10733 * Whether automatic routing of system audio to USB audio peripheral is disabled. 10734 * The value is boolean (1 or 0), where 1 means automatic routing is disabled, 10735 * and 0 means automatic routing is enabled. 10736 * 10737 * @hide 10738 */ 10739 @Readable 10740 public static final String USB_AUDIO_AUTOMATIC_ROUTING_DISABLED = 10741 "usb_audio_automatic_routing_disabled"; 10742 10743 /** 10744 * The timeout in milliseconds before the device fully goes to sleep after 10745 * a period of inactivity. This value sets an upper bound on how long the device 10746 * will stay awake or dreaming without user activity. It should generally 10747 * be longer than {@link Settings.System#SCREEN_OFF_TIMEOUT} as otherwise the device 10748 * will sleep before it ever has a chance to dream. 10749 * <p> 10750 * Use -1 to disable this timeout. 10751 * </p> 10752 * 10753 * @hide 10754 */ 10755 @Readable 10756 public static final String SLEEP_TIMEOUT = "sleep_timeout"; 10757 10758 /** 10759 * The timeout in milliseconds before the device goes to sleep due to user inattentiveness, 10760 * even if the system is holding wakelocks. It should generally be longer than {@code 10761 * config_attentiveWarningDuration}, as otherwise the device will show the attentive 10762 * warning constantly. Small timeouts are discouraged, as they will cause the device to 10763 * go to sleep quickly after waking up. 10764 * <p> 10765 * Use -1 to disable this timeout. 10766 * </p> 10767 * 10768 * @hide 10769 */ 10770 @Readable 10771 public static final String ATTENTIVE_TIMEOUT = "attentive_timeout"; 10772 10773 /** 10774 * Controls whether double tap to wake is enabled. 10775 * @hide 10776 */ 10777 @Readable 10778 public static final String DOUBLE_TAP_TO_WAKE = "double_tap_to_wake"; 10779 10780 /** 10781 * The current assistant component. It could be a voice interaction service, 10782 * or an activity that handles ACTION_ASSIST, or empty which means using the default 10783 * handling. 10784 * 10785 * <p>This should be set indirectly by setting the {@link 10786 * android.app.role.RoleManager#ROLE_ASSISTANT assistant role}. 10787 * 10788 * @hide 10789 */ 10790 @UnsupportedAppUsage 10791 @Readable 10792 public static final String ASSISTANT = "assistant"; 10793 10794 /** 10795 * Whether the camera launch gesture should be disabled. 10796 * 10797 * @hide 10798 */ 10799 @Readable 10800 public static final String CAMERA_GESTURE_DISABLED = "camera_gesture_disabled"; 10801 10802 /** 10803 * Whether the emergency gesture should be enabled. 10804 * 10805 * @hide 10806 */ 10807 public static final String EMERGENCY_GESTURE_ENABLED = "emergency_gesture_enabled"; 10808 10809 /** 10810 * Whether the emergency gesture sound should be enabled. 10811 * 10812 * @hide 10813 */ 10814 public static final String EMERGENCY_GESTURE_SOUND_ENABLED = 10815 "emergency_gesture_sound_enabled"; 10816 10817 /** 10818 * Whether the emergency gesture UI is currently showing. 10819 * 10820 * @hide 10821 */ 10822 public static final String EMERGENCY_GESTURE_UI_SHOWING = "emergency_gesture_ui_showing"; 10823 10824 /** 10825 * The last time the emergency gesture UI was started. 10826 * 10827 * @hide 10828 */ 10829 public static final String EMERGENCY_GESTURE_UI_LAST_STARTED_MILLIS = 10830 "emergency_gesture_ui_last_started_millis"; 10831 10832 /** 10833 * Whether the camera launch gesture to double tap the power button when the screen is off 10834 * should be disabled. 10835 * 10836 * @hide 10837 */ 10838 @Readable 10839 public static final String CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED = 10840 "camera_double_tap_power_gesture_disabled"; 10841 10842 /** 10843 * Whether the camera double twist gesture to flip between front and back mode should be 10844 * enabled. 10845 * 10846 * @hide 10847 */ 10848 @Readable 10849 public static final String CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED = 10850 "camera_double_twist_to_flip_enabled"; 10851 10852 /** 10853 * Whether or not the smart camera lift trigger that launches the camera when the user moves 10854 * the phone into a position for taking photos should be enabled. 10855 * 10856 * @hide 10857 */ 10858 @Readable 10859 public static final String CAMERA_LIFT_TRIGGER_ENABLED = "camera_lift_trigger_enabled"; 10860 10861 /** 10862 * The default enable state of the camera lift trigger. 10863 * 10864 * @hide 10865 */ 10866 public static final int CAMERA_LIFT_TRIGGER_ENABLED_DEFAULT = 1; 10867 10868 /** 10869 * Whether or not the flashlight (camera torch mode) is available required to turn 10870 * on flashlight. 10871 * 10872 * @hide 10873 */ 10874 @Readable 10875 public static final String FLASHLIGHT_AVAILABLE = "flashlight_available"; 10876 10877 /** 10878 * Whether or not flashlight is enabled. 10879 * 10880 * @hide 10881 */ 10882 @Readable 10883 public static final String FLASHLIGHT_ENABLED = "flashlight_enabled"; 10884 10885 /** 10886 * Whether or not face unlock is allowed on Keyguard. 10887 * @hide 10888 */ 10889 @Readable 10890 public static final String FACE_UNLOCK_KEYGUARD_ENABLED = "face_unlock_keyguard_enabled"; 10891 10892 /** 10893 * Whether or not face unlock dismisses the keyguard. 10894 * @hide 10895 */ 10896 @Readable 10897 public static final String FACE_UNLOCK_DISMISSES_KEYGUARD = 10898 "face_unlock_dismisses_keyguard"; 10899 10900 /** 10901 * Whether or not media is shown automatically when bypassing as a heads up. 10902 * @hide 10903 */ 10904 @Readable 10905 public static final String SHOW_MEDIA_WHEN_BYPASSING = 10906 "show_media_when_bypassing"; 10907 10908 /** 10909 * Whether or not face unlock requires attention. This is a cached value, the source of 10910 * truth is obtained through the HAL. 10911 * @hide 10912 */ 10913 @Readable 10914 public static final String FACE_UNLOCK_ATTENTION_REQUIRED = 10915 "face_unlock_attention_required"; 10916 10917 /** 10918 * Whether or not face unlock requires a diverse set of poses during enrollment. This is a 10919 * cached value, the source of truth is obtained through the HAL. 10920 * @hide 10921 */ 10922 @Readable 10923 public static final String FACE_UNLOCK_DIVERSITY_REQUIRED = 10924 "face_unlock_diversity_required"; 10925 10926 10927 /** 10928 * Whether or not face unlock is allowed for apps (through BiometricPrompt). 10929 * @hide 10930 */ 10931 @Readable 10932 public static final String FACE_UNLOCK_APP_ENABLED = "face_unlock_app_enabled"; 10933 10934 /** 10935 * Whether or not face unlock always requires user confirmation, meaning {@link 10936 * android.hardware.biometrics.BiometricPrompt.Builder#setConfirmationRequired(boolean)} 10937 * is always 'true'. This overrides the behavior that apps choose in the 10938 * setConfirmationRequired API. 10939 * @hide 10940 */ 10941 @Readable 10942 public static final String FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION = 10943 "face_unlock_always_require_confirmation"; 10944 10945 /** 10946 * Whether or not a user should re enroll their face. 10947 * 10948 * Face unlock re enroll. 10949 * 0 = No re enrollment. 10950 * 1 = Re enrollment is required. 10951 * 10952 * @hide 10953 */ 10954 @Readable 10955 public static final String FACE_UNLOCK_RE_ENROLL = "face_unlock_re_enroll"; 10956 10957 /** 10958 * The time (in millis) to wait for a power button before sending a 10959 * successful auth in to keyguard(for side fingerprint) 10960 * @hide 10961 */ 10962 @Readable 10963 public static final String FINGERPRINT_SIDE_FPS_KG_POWER_WINDOW = 10964 "fingerprint_side_fps_kg_power_window"; 10965 10966 /** 10967 * The time (in millis) to wait for a power button before sending 10968 * a successful auth in biometric prompt(for side fingerprint) 10969 * @hide 10970 */ 10971 @Readable 10972 public static final String FINGERPRINT_SIDE_FPS_BP_POWER_WINDOW = 10973 "fingerprint_side_fps_bp_power_window"; 10974 10975 /** 10976 * The time (in millis) that a finger tap will wait for a power button 10977 * before dismissing the power dialog during enrollment(for side 10978 * fingerprint) 10979 * @hide 10980 */ 10981 @Readable 10982 public static final String FINGERPRINT_SIDE_FPS_ENROLL_TAP_WINDOW = 10983 "fingerprint_side_fps_enroll_tap_window"; 10984 10985 /** 10986 * The time (in millis) that a power event will ignore future authentications 10987 * (for side fingerprint) 10988 * @hide 10989 */ 10990 @Readable 10991 public static final String FINGERPRINT_SIDE_FPS_AUTH_DOWNTIME = 10992 "fingerprint_side_fps_auth_downtime"; 10993 10994 /** 10995 * Whether or not a SFPS device is enabling the performant auth setting. 10996 * The "_V2" suffix was added to re-introduce the default behavior for 10997 * users. See b/265264294 fore more details. 10998 * @hide 10999 */ 11000 public static final String SFPS_PERFORMANT_AUTH_ENABLED = "sfps_performant_auth_enabled_v2"; 11001 11002 /** 11003 * Whether or not debugging is enabled. 11004 * @hide 11005 */ 11006 @Readable 11007 public static final String BIOMETRIC_DEBUG_ENABLED = 11008 "biometric_debug_enabled"; 11009 11010 /** 11011 * Whether or not both fingerprint and face virtual sensors are enabled. 11012 * @hide 11013 */ 11014 @TestApi 11015 @Readable 11016 public static final String BIOMETRIC_VIRTUAL_ENABLED = "biometric_virtual_enabled"; 11017 11018 /** 11019 * Whether or not fingerprint virtual sensors are enabled. 11020 * @hide 11021 */ 11022 @FlaggedApi("com.android.server.biometrics.face_vhal_feature") 11023 public static final String BIOMETRIC_FINGERPRINT_VIRTUAL_ENABLED = 11024 "biometric_fingerprint_virtual_enabled"; 11025 11026 /** 11027 * Whether or not face virtual sensors are enabled. 11028 * @hide 11029 */ 11030 @FlaggedApi("com.android.server.biometrics.face_vhal_feature") 11031 public static final String BIOMETRIC_FACE_VIRTUAL_ENABLED = 11032 "biometric_face_virtual_enabled"; 11033 11034 /** 11035 * Whether or not biometric is allowed on Keyguard. 11036 * @hide 11037 */ 11038 @Readable 11039 public static final String BIOMETRIC_KEYGUARD_ENABLED = "biometric_keyguard_enabled"; 11040 11041 /** 11042 * Whether or not biometric is allowed for apps (through BiometricPrompt). 11043 * @hide 11044 */ 11045 @Readable 11046 public static final String BIOMETRIC_APP_ENABLED = "biometric_app_enabled"; 11047 11048 /** 11049 * Whether or not active unlock triggers on wake. 11050 * @hide 11051 */ 11052 public static final String ACTIVE_UNLOCK_ON_WAKE = "active_unlock_on_wake"; 11053 11054 /** 11055 * Whether or not active unlock triggers on unlock intent. 11056 * @hide 11057 */ 11058 public static final String ACTIVE_UNLOCK_ON_UNLOCK_INTENT = 11059 "active_unlock_on_unlock_intent"; 11060 11061 /** 11062 * Whether or not active unlock triggers on biometric failure. 11063 * @hide 11064 */ 11065 public static final String ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL = 11066 "active_unlock_on_biometric_fail"; 11067 11068 /** 11069 * Whether or not active unlock triggers on legacy unlock intents. 11070 * @hide 11071 */ 11072 public static final String ACTIVE_UNLOCK_ON_UNLOCK_INTENT_LEGACY = 11073 "active_unlock_on_unlock_intent_legacy"; 11074 11075 /** 11076 * If active unlock triggers on biometric failures, include the following error codes 11077 * as a biometric failure. See {@link android.hardware.biometrics.BiometricFaceConstants}. 11078 * Error codes should be separated by a pipe. For example: "1|4|5". If active unlock 11079 * should never trigger on any face errors, this should be set to an empty string. 11080 * A null value will use the system default value (TIMEOUT). 11081 * @hide 11082 */ 11083 public static final String ACTIVE_UNLOCK_ON_FACE_ERRORS = 11084 "active_unlock_on_face_errors"; 11085 11086 /** 11087 * If active unlock triggers on biometric failures, include the following acquired info 11088 * as a "biometric failure". See {@link android.hardware.biometrics.BiometricFaceConstants}. 11089 * Acquired codes should be separated by a pipe. For example: "1|4|5". If active unlock 11090 * should never on trigger on any acquired info messages, this should be 11091 * set to an empty string. A null value will use the system default value (none). 11092 * @hide 11093 */ 11094 public static final String ACTIVE_UNLOCK_ON_FACE_ACQUIRE_INFO = 11095 "active_unlock_on_face_acquire_info"; 11096 11097 /** 11098 * If active unlock triggers on biometric failures, then also request active unlock on 11099 * unlock intent when each setting (BiometricType) is the only biometric type enrolled. 11100 * Biometric types should be separated by a pipe. For example: "0|3" or "0". If this 11101 * setting should be disabled, then this should be set to an empty string. A null value 11102 * will use the system default value (0 / None). 11103 * 0 = None, 1 = Any face, 2 = Any fingerprint, 3 = Under display fingerprint 11104 * @hide 11105 */ 11106 public static final String ACTIVE_UNLOCK_ON_UNLOCK_INTENT_WHEN_BIOMETRIC_ENROLLED = 11107 "active_unlock_on_unlock_intent_when_biometric_enrolled"; 11108 11109 /** 11110 * If active unlock triggers on unlock intents, then also request active unlock on 11111 * these wake-up reasons. See {@link PowerManager.WakeReason} for value mappings. 11112 * WakeReasons should be separated by a pipe. For example: "0|3" or "0". If this 11113 * setting should be disabled, then this should be set to an empty string. A null value 11114 * will use the system default value (WAKE_REASON_UNFOLD_DEVICE). 11115 * @hide 11116 */ 11117 public static final String ACTIVE_UNLOCK_WAKEUPS_CONSIDERED_UNLOCK_INTENTS = 11118 "active_unlock_wakeups_considered_unlock_intents"; 11119 11120 /** 11121 * If active unlock triggers and succeeds on these wakeups, force dismiss keyguard on 11122 * these wake reasons. See {@link PowerManager#WakeReason} for value mappings. 11123 * WakeReasons should be separated by a pipe. For example: "0|3" or "0". If this 11124 * setting should be disabled, then this should be set to an empty string. A null value 11125 * will use the system default value (WAKE_REASON_UNFOLD_DEVICE). 11126 * @hide 11127 */ 11128 public static final String ACTIVE_UNLOCK_WAKEUPS_TO_FORCE_DISMISS_KEYGUARD = 11129 "active_unlock_wakeups_to_force_dismiss_keyguard"; 11130 11131 /** 11132 * Whether the assist gesture should be enabled. 11133 * 11134 * @hide 11135 */ 11136 @Readable 11137 public static final String ASSIST_GESTURE_ENABLED = "assist_gesture_enabled"; 11138 11139 /** 11140 * Sensitivity control for the assist gesture. 11141 * 11142 * @hide 11143 */ 11144 @Readable 11145 public static final String ASSIST_GESTURE_SENSITIVITY = "assist_gesture_sensitivity"; 11146 11147 /** 11148 * Whether the assist gesture should silence alerts. 11149 * 11150 * @hide 11151 */ 11152 @Readable 11153 public static final String ASSIST_GESTURE_SILENCE_ALERTS_ENABLED = 11154 "assist_gesture_silence_alerts_enabled"; 11155 11156 /** 11157 * Whether the assist gesture should wake the phone. 11158 * 11159 * @hide 11160 */ 11161 @Readable 11162 public static final String ASSIST_GESTURE_WAKE_ENABLED = 11163 "assist_gesture_wake_enabled"; 11164 11165 /** 11166 * Indicates whether the Assist Gesture Deferred Setup has been completed. 11167 * <p> 11168 * Type: int (0 for false, 1 for true) 11169 * 11170 * @hide 11171 */ 11172 @SystemApi 11173 @Readable 11174 public static final String ASSIST_GESTURE_SETUP_COMPLETE = "assist_gesture_setup_complete"; 11175 11176 /** 11177 * Whether the assistant can be triggered by a touch gesture. 11178 * 11179 * @hide 11180 */ 11181 public static final String ASSIST_TOUCH_GESTURE_ENABLED = 11182 "assist_touch_gesture_enabled"; 11183 11184 /** 11185 * Whether the assistant can be triggered by long-pressing the home button 11186 * 11187 * @hide 11188 */ 11189 public static final String ASSIST_LONG_PRESS_HOME_ENABLED = 11190 "assist_long_press_home_enabled"; 11191 11192 /** 11193 * Whether all entrypoints can trigger search. Replaces individual settings. 11194 * 11195 * @hide 11196 */ 11197 public static final String SEARCH_ALL_ENTRYPOINTS_ENABLED = 11198 "search_all_entrypoints_enabled"; 11199 11200 /** 11201 * Whether or not the accessibility data streaming is enbled for the 11202 * {@link VisualQueryDetectedResult#setAccessibilityDetectionData}. 11203 * @hide 11204 */ 11205 public static final String VISUAL_QUERY_ACCESSIBILITY_DETECTION_ENABLED = 11206 "visual_query_accessibility_detection_enabled"; 11207 11208 /** 11209 * Timeout to be used for unbinding to the configured remote 11210 * {@link android.service.ondeviceintelligence.OnDeviceIntelligenceService} if there are no 11211 * requests in the queue. A value of -1 represents to never unbind. 11212 * 11213 * @hide 11214 */ 11215 public static final String ON_DEVICE_INTELLIGENCE_UNBIND_TIMEOUT_MS = 11216 "on_device_intelligence_unbind_timeout_ms"; 11217 11218 11219 /** 11220 * Timeout that represents maximum idle time before which a callback should be populated. 11221 * 11222 * @hide 11223 */ 11224 public static final String ON_DEVICE_INTELLIGENCE_IDLE_TIMEOUT_MS = 11225 "on_device_intelligence_idle_timeout_ms"; 11226 11227 /** 11228 * Timeout to be used for unbinding to the configured remote 11229 * {@link android.service.ondeviceintelligence.OnDeviceSandboxedInferenceService} if there 11230 * are no requests in the queue. A value of -1 represents to never unbind. 11231 * 11232 * @hide 11233 */ 11234 public static final String ON_DEVICE_INFERENCE_UNBIND_TIMEOUT_MS = 11235 "on_device_inference_unbind_timeout_ms"; 11236 11237 /** 11238 * Control whether Night display is currently activated. 11239 * @hide 11240 */ 11241 @Readable 11242 public static final String NIGHT_DISPLAY_ACTIVATED = "night_display_activated"; 11243 11244 /** 11245 * Control whether Night display will automatically activate/deactivate. 11246 * @hide 11247 */ 11248 @Readable 11249 public static final String NIGHT_DISPLAY_AUTO_MODE = "night_display_auto_mode"; 11250 11251 /** 11252 * Control the color temperature of Night Display, represented in Kelvin. 11253 * @hide 11254 */ 11255 @Readable 11256 public static final String NIGHT_DISPLAY_COLOR_TEMPERATURE = 11257 "night_display_color_temperature"; 11258 11259 /** 11260 * Custom time when Night display is scheduled to activate. 11261 * Represented as milliseconds from midnight (e.g. 79200000 == 10pm). 11262 * @hide 11263 */ 11264 @Readable 11265 public static final String NIGHT_DISPLAY_CUSTOM_START_TIME = 11266 "night_display_custom_start_time"; 11267 11268 /** 11269 * Custom time when Night display is scheduled to deactivate. 11270 * Represented as milliseconds from midnight (e.g. 21600000 == 6am). 11271 * @hide 11272 */ 11273 @Readable 11274 public static final String NIGHT_DISPLAY_CUSTOM_END_TIME = "night_display_custom_end_time"; 11275 11276 /** 11277 * A String representing the LocalDateTime when Night display was last activated. Use to 11278 * decide whether to apply the current activated state after a reboot or user change. In 11279 * legacy cases, this is represented by the time in milliseconds (since epoch). 11280 * @hide 11281 */ 11282 @Readable 11283 public static final String NIGHT_DISPLAY_LAST_ACTIVATED_TIME = 11284 "night_display_last_activated_time"; 11285 11286 /** 11287 * Control whether display white balance is currently enabled. 11288 * @hide 11289 */ 11290 @Readable 11291 public static final String DISPLAY_WHITE_BALANCE_ENABLED = "display_white_balance_enabled"; 11292 11293 /** 11294 * Used by DisplayManager to backup/restore the user-selected resolution mode. 11295 * @hide 11296 */ 11297 @Readable 11298 public static final String SCREEN_RESOLUTION_MODE = "screen_resolution_mode"; 11299 11300 /** 11301 * Resolution Mode Constants for SCREEN_RESOLUTION_MODE setting. 11302 * 11303 * @hide 11304 */ 11305 @IntDef(prefix = { "RESOLUTION_MODE_" }, value = { 11306 RESOLUTION_MODE_UNKNOWN, 11307 RESOLUTION_MODE_HIGH, 11308 RESOLUTION_MODE_FULL 11309 }) 11310 @Retention(RetentionPolicy.SOURCE) 11311 public @interface ResolutionMode {} 11312 /** @hide */ 11313 public static final int RESOLUTION_MODE_UNKNOWN = 0; 11314 /** @hide */ 11315 public static final int RESOLUTION_MODE_HIGH = 1; 11316 /** @hide */ 11317 public static final int RESOLUTION_MODE_FULL = 2; 11318 11319 /** 11320 * Names of the service components that the current user has explicitly allowed to 11321 * be a VR mode listener, separated by ':'. 11322 * 11323 * @hide 11324 */ 11325 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 11326 @TestApi 11327 @Readable 11328 public static final String ENABLED_VR_LISTENERS = "enabled_vr_listeners"; 11329 11330 /** 11331 * Behavior of the display while in VR mode. 11332 * 11333 * One of {@link #VR_DISPLAY_MODE_LOW_PERSISTENCE} or {@link #VR_DISPLAY_MODE_OFF}. 11334 * 11335 * @hide 11336 */ 11337 @Readable 11338 public static final String VR_DISPLAY_MODE = "vr_display_mode"; 11339 11340 /** 11341 * Lower the display persistence while the system is in VR mode. 11342 * 11343 * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE 11344 * 11345 * @hide. 11346 */ 11347 public static final int VR_DISPLAY_MODE_LOW_PERSISTENCE = 0; 11348 11349 /** 11350 * Do not alter the display persistence while the system is in VR mode. 11351 * 11352 * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE 11353 * 11354 * @hide. 11355 */ 11356 public static final int VR_DISPLAY_MODE_OFF = 1; 11357 11358 /** 11359 * The latest SDK version that CarrierAppUtils#disableCarrierAppsUntilPrivileged has been 11360 * executed for. 11361 * 11362 * <p>This is used to ensure that we only take one pass which will disable apps that are not 11363 * privileged (if any). From then on, we only want to enable apps (when a matching SIM is 11364 * inserted), to avoid disabling an app that the user might actively be using. 11365 * 11366 * <p>Will be set to {@link android.os.Build.VERSION#SDK_INT} once executed. Note that older 11367 * SDK versions prior to R set 1 for this value. 11368 * 11369 * @hide 11370 */ 11371 @Readable 11372 public static final String CARRIER_APPS_HANDLED = "carrier_apps_handled"; 11373 11374 /** 11375 * Whether parent user can access remote contact in managed profile. 11376 * 11377 * @hide 11378 */ 11379 @Readable 11380 public static final String MANAGED_PROFILE_CONTACT_REMOTE_SEARCH = 11381 "managed_profile_contact_remote_search"; 11382 11383 /** 11384 * Whether parent profile can access remote calendar data in managed profile. 11385 * 11386 * @hide 11387 */ 11388 @Readable 11389 public static final String CROSS_PROFILE_CALENDAR_ENABLED = 11390 "cross_profile_calendar_enabled"; 11391 11392 /** 11393 * Whether or not the automatic storage manager is enabled and should run on the device. 11394 * 11395 * @hide 11396 */ 11397 @Readable 11398 public static final String AUTOMATIC_STORAGE_MANAGER_ENABLED = 11399 "automatic_storage_manager_enabled"; 11400 11401 /** 11402 * How many days of information for the automatic storage manager to retain on the device. 11403 * 11404 * @hide 11405 */ 11406 @Readable 11407 public static final String AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN = 11408 "automatic_storage_manager_days_to_retain"; 11409 11410 /** 11411 * Default number of days of information for the automatic storage manager to retain. 11412 * 11413 * @hide 11414 */ 11415 public static final int AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN_DEFAULT = 90; 11416 11417 /** 11418 * How many bytes the automatic storage manager has cleared out. 11419 * 11420 * @hide 11421 */ 11422 @Readable 11423 public static final String AUTOMATIC_STORAGE_MANAGER_BYTES_CLEARED = 11424 "automatic_storage_manager_bytes_cleared"; 11425 11426 /** 11427 * Last run time for the automatic storage manager. 11428 * 11429 * @hide 11430 */ 11431 @Readable 11432 public static final String AUTOMATIC_STORAGE_MANAGER_LAST_RUN = 11433 "automatic_storage_manager_last_run"; 11434 /** 11435 * If the automatic storage manager has been disabled by policy. Note that this doesn't 11436 * mean that the automatic storage manager is prevented from being re-enabled -- this only 11437 * means that it was turned off by policy at least once. 11438 * 11439 * @hide 11440 */ 11441 @Readable 11442 public static final String AUTOMATIC_STORAGE_MANAGER_TURNED_OFF_BY_POLICY = 11443 "automatic_storage_manager_turned_off_by_policy"; 11444 11445 /** 11446 * Whether SystemUI navigation keys is enabled. 11447 * @hide 11448 */ 11449 @Readable 11450 public static final String SYSTEM_NAVIGATION_KEYS_ENABLED = 11451 "system_navigation_keys_enabled"; 11452 11453 /** 11454 * Holds comma separated list of ordering of QS tiles. 11455 * 11456 * @hide 11457 */ 11458 @Readable(maxTargetSdk = VERSION_CODES.TIRAMISU) 11459 public static final String QS_TILES = "sysui_qs_tiles"; 11460 11461 /** 11462 * Whether this user has enabled Quick controls. 11463 * 11464 * 0 indicates disabled and 1 indicates enabled. A non existent value should be treated as 11465 * enabled. 11466 * 11467 * @deprecated Controls are migrated to Quick Settings, rendering this unnecessary and will 11468 * be removed in a future release. 11469 * @hide 11470 */ 11471 @Readable 11472 @Deprecated 11473 public static final String CONTROLS_ENABLED = "controls_enabled"; 11474 11475 /** 11476 * Whether power menu content (cards, passes, controls) will be shown when device is locked. 11477 * 11478 * 0 indicates hide and 1 indicates show. A non existent value will be treated as hide. 11479 * @hide 11480 */ 11481 @TestApi 11482 @Readable 11483 public static final String POWER_MENU_LOCKED_SHOW_CONTENT = 11484 "power_menu_locked_show_content"; 11485 11486 /** 11487 * Whether home controls should be accessible from the lockscreen 11488 * 11489 * @hide 11490 */ 11491 public static final String LOCKSCREEN_SHOW_CONTROLS = "lockscreen_show_controls"; 11492 11493 /** 11494 * Whether trivial home controls can be used without authentication 11495 * 11496 * @hide 11497 */ 11498 public static final String LOCKSCREEN_ALLOW_TRIVIAL_CONTROLS = 11499 "lockscreen_allow_trivial_controls"; 11500 11501 /** 11502 * Whether wallet should be accessible from the lockscreen 11503 * 11504 * @hide 11505 */ 11506 public static final String LOCKSCREEN_SHOW_WALLET = "lockscreen_show_wallet"; 11507 11508 /** 11509 * Whether to use the lockscreen double-line clock 11510 * 11511 * @hide 11512 */ 11513 public static final String LOCKSCREEN_USE_DOUBLE_LINE_CLOCK = 11514 "lockscreen_use_double_line_clock"; 11515 11516 /** 11517 * Whether to show the vibrate icon in the Status Bar (default off) 11518 * 11519 * @hide 11520 */ 11521 public static final String STATUS_BAR_SHOW_VIBRATE_ICON = "status_bar_show_vibrate_icon"; 11522 11523 /** 11524 * Specifies whether the web action API is enabled. 11525 * 11526 * @hide 11527 */ 11528 @SystemApi 11529 @Readable 11530 public static final String INSTANT_APPS_ENABLED = "instant_apps_enabled"; 11531 11532 /** 11533 * Whether qr code scanner should be accessible from the lockscreen 11534 * 11535 * @hide 11536 */ 11537 public static final String LOCK_SCREEN_SHOW_QR_CODE_SCANNER = 11538 "lock_screen_show_qr_code_scanner"; 11539 11540 /** 11541 * Whether or not to enable qr code code scanner setting to enable/disable lockscreen 11542 * entry point. Any value apart from null means setting needs to be enabled 11543 * 11544 * @hide 11545 */ 11546 public static final String SHOW_QR_CODE_SCANNER_SETTING = 11547 "show_qr_code_scanner_setting"; 11548 11549 /** 11550 * Has this pairable device been paired or upgraded from a previously paired system. 11551 * @hide 11552 */ 11553 @Readable 11554 public static final String DEVICE_PAIRED = "device_paired"; 11555 11556 /** 11557 * Specifies additional package name for broadcasting the CMAS messages. 11558 * @hide 11559 */ 11560 @Readable 11561 public static final String CMAS_ADDITIONAL_BROADCAST_PKG = "cmas_additional_broadcast_pkg"; 11562 11563 /** 11564 * Whether the launcher should show any notification badges. 11565 * The value is boolean (1 or 0). 11566 * @hide 11567 */ 11568 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 11569 @TestApi 11570 @Readable 11571 public static final String NOTIFICATION_BADGING = "notification_badging"; 11572 11573 /** 11574 * When enabled the system will maintain a rolling history of received notifications. When 11575 * disabled the history will be disabled and deleted. 11576 * 11577 * The value 1 - enable, 0 - disable 11578 * @hide 11579 */ 11580 @Readable 11581 public static final String NOTIFICATION_HISTORY_ENABLED = "notification_history_enabled"; 11582 11583 /** 11584 * When enabled conversations marked as favorites will be set to bubble. 11585 * 11586 * The value 1 - enable, 0 - disable 11587 * @hide 11588 */ 11589 @Readable 11590 public static final String BUBBLE_IMPORTANT_CONVERSATIONS 11591 = "bubble_important_conversations"; 11592 11593 /** 11594 * When enabled, notifications able to bubble will display an affordance allowing the user 11595 * to bubble them. 11596 * The value is boolean (1 to enable or 0 to disable). 11597 * 11598 * @hide 11599 */ 11600 @TestApi 11601 @SuppressLint("NoSettingsProvider") 11602 @Readable 11603 public static final String NOTIFICATION_BUBBLES = "notification_bubbles"; 11604 11605 /** 11606 * Whether notifications are dismissed by a right-to-left swipe (instead of a left-to-right 11607 * swipe). 11608 * 11609 * @hide 11610 */ 11611 @Readable 11612 public static final String NOTIFICATION_DISMISS_RTL = "notification_dismiss_rtl"; 11613 11614 /** 11615 * Comma separated list of QS tiles that have been auto-added already. 11616 * @hide 11617 */ 11618 @Readable 11619 public static final String QS_AUTO_ADDED_TILES = "qs_auto_tiles"; 11620 11621 /** 11622 * The duration of timeout, in milliseconds, to switch from a non-Dock User to the 11623 * Dock User when the device is docked. 11624 * @hide 11625 */ 11626 public static final String TIMEOUT_TO_DOCK_USER = "timeout_to_dock_user"; 11627 11628 /** 11629 * Backup manager behavioral parameters. 11630 * This is encoded as a key=value list, separated by commas. Ex: 11631 * 11632 * "key_value_backup_interval_milliseconds=14400000,key_value_backup_require_charging=true" 11633 * 11634 * The following keys are supported: 11635 * 11636 * <pre> 11637 * key_value_backup_interval_milliseconds (long) 11638 * key_value_backup_fuzz_milliseconds (long) 11639 * key_value_backup_require_charging (boolean) 11640 * key_value_backup_required_network_type (int) 11641 * full_backup_interval_milliseconds (long) 11642 * full_backup_require_charging (boolean) 11643 * full_backup_required_network_type (int) 11644 * backup_finished_notification_receivers (String[]) 11645 * </pre> 11646 * 11647 * backup_finished_notification_receivers uses ":" as delimeter for values. 11648 * 11649 * <p> 11650 * Type: string 11651 * @hide 11652 */ 11653 @Readable 11654 public static final String BACKUP_MANAGER_CONSTANTS = "backup_manager_constants"; 11655 11656 11657 /** 11658 * Local transport parameters so we can configure it for tests. 11659 * This is encoded as a key=value list, separated by commas. 11660 * 11661 * The following keys are supported: 11662 * 11663 * <pre> 11664 * fake_encryption_flag (boolean) 11665 * </pre> 11666 * 11667 * <p> 11668 * Type: string 11669 * @hide 11670 */ 11671 @Readable 11672 public static final String BACKUP_LOCAL_TRANSPORT_PARAMETERS = 11673 "backup_local_transport_parameters"; 11674 11675 /** 11676 * Flag to set if the system should predictively attempt to re-enable Bluetooth while 11677 * the user is driving. 11678 * @hide 11679 */ 11680 @Readable 11681 public static final String BLUETOOTH_ON_WHILE_DRIVING = "bluetooth_on_while_driving"; 11682 11683 /** 11684 * Volume dialog timeout in ms. 11685 * @hide 11686 */ 11687 public static final String VOLUME_DIALOG_DISMISS_TIMEOUT = "volume_dialog_dismiss_timeout"; 11688 11689 /** 11690 * What behavior should be invoked when the volume hush gesture is triggered 11691 * One of VOLUME_HUSH_OFF, VOLUME_HUSH_VIBRATE, VOLUME_HUSH_MUTE. 11692 * 11693 * @hide 11694 */ 11695 @SystemApi 11696 @Readable 11697 public static final String VOLUME_HUSH_GESTURE = "volume_hush_gesture"; 11698 11699 /** @hide */ 11700 @SystemApi 11701 public static final int VOLUME_HUSH_OFF = 0; 11702 /** @hide */ 11703 @SystemApi 11704 public static final int VOLUME_HUSH_VIBRATE = 1; 11705 /** @hide */ 11706 @SystemApi 11707 public static final int VOLUME_HUSH_MUTE = 2; 11708 11709 /** 11710 * The number of times (integer) the user has manually enabled battery saver. 11711 * @hide 11712 */ 11713 @Readable 11714 public static final String LOW_POWER_MANUAL_ACTIVATION_COUNT = 11715 "low_power_manual_activation_count"; 11716 11717 /** 11718 * Whether the "first time battery saver warning" dialog needs to be shown (0: default) 11719 * or not (1). 11720 * 11721 * @hide 11722 */ 11723 @Readable 11724 public static final String LOW_POWER_WARNING_ACKNOWLEDGED = 11725 "low_power_warning_acknowledged"; 11726 11727 /** 11728 * Whether the "first time extra battery saver warning" dialog needs to be shown 11729 * (0: default) or not (1). 11730 * 11731 * @hide 11732 */ 11733 public static final String EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED = 11734 "extra_low_power_warning_acknowledged"; 11735 11736 /** 11737 * Whether the emergency thermal alert would be disabled 11738 * (0: default) or not (1). 11739 * 11740 * @hide 11741 */ 11742 public static final String EMERGENCY_THERMAL_ALERT_DISABLED = 11743 "emergency_thermal_alert_disabled"; 11744 11745 /** 11746 * 0 (default) Auto battery saver suggestion has not been suppressed. 1) it has been 11747 * suppressed. 11748 * @hide 11749 */ 11750 @Readable 11751 public static final String SUPPRESS_AUTO_BATTERY_SAVER_SUGGESTION = 11752 "suppress_auto_battery_saver_suggestion"; 11753 11754 /** 11755 * List of packages, which data need to be unconditionally cleared before full restore. 11756 * Type: string 11757 * @hide 11758 */ 11759 @Readable 11760 public static final String PACKAGES_TO_CLEAR_DATA_BEFORE_FULL_RESTORE = 11761 "packages_to_clear_data_before_full_restore"; 11762 11763 /** 11764 * How often to check for location access. 11765 * @hide 11766 * 11767 * @deprecated This has been moved to DeviceConfig property 11768 * {@link LocationAccessCheck#PROPERTY_LOCATION_ACCESS_PERIODIC_INTERVAL_MILLIS} in a T 11769 * module update 11770 * 11771 * Before Android T set this property to control the interval for the check 11772 * On Android T set this and the DeviceConfig property 11773 * After Android T set the DeviceConfig property 11774 */ 11775 @SystemApi 11776 @Deprecated 11777 @Readable 11778 public static final String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS = 11779 "location_access_check_interval_millis"; 11780 11781 /** 11782 * Delay between granting location access and checking it. 11783 * @hide 11784 * 11785 * @deprecated This has been moved to DeviceConfig property 11786 * {@link LocationAccessCheck#PROPERTY_LOCATION_ACCESS_CHECK_DELAY_MILLIS} in a T module 11787 * update 11788 * 11789 * Before Android T set this property to control the delay for the check 11790 * On Android T set this and the DeviceConfig property 11791 * After Android T set the DeviceConfig property 11792 */ 11793 @SystemApi 11794 @Deprecated 11795 @Readable 11796 public static final String LOCATION_ACCESS_CHECK_DELAY_MILLIS = 11797 "location_access_check_delay_millis"; 11798 11799 /** 11800 * @deprecated This setting does not have any effect anymore 11801 * @hide 11802 */ 11803 @SystemApi 11804 @Deprecated 11805 @Readable 11806 public static final String LOCATION_PERMISSIONS_UPGRADE_TO_Q_MODE = 11807 "location_permissions_upgrade_to_q_mode"; 11808 11809 /** 11810 * Whether or not the system Auto Revoke feature is disabled. 11811 * @hide 11812 */ 11813 @SystemApi 11814 @Readable 11815 public static final String AUTO_REVOKE_DISABLED = "auto_revoke_disabled"; 11816 11817 /** 11818 * Map of android.theme.customization.* categories to the enabled overlay package for that 11819 * category, formatted as a serialized {@link org.json.JSONObject}. If there is no 11820 * corresponding package included for a category, then all overlay packages in that 11821 * category must be disabled. 11822 * 11823 * A few category keys have special meaning and are used for Material You theming. 11824 * 11825 * A {@code FabricatedOverlay} containing Material You tonal palettes will be generated 11826 * in case {@code android.theme.customization.system_palette} contains a 11827 * {@link android.annotation.ColorInt}. 11828 * 11829 * The strategy used for generating the tonal palettes can be defined with the 11830 * {@code android.theme.customization.theme_style} key, with one of the following options: 11831 * <ul> 11832 * <li> {@code TONAL_SPOT} is a mid vibrancy palette that uses an accent 3 analogous to 11833 * accent 1.</li> 11834 * <li> {@code VIBRANT} is a high vibrancy palette that harmoniously blends subtle shifts 11835 * between colors.</li> 11836 * <li> {@code EXPRESSIVE} is a high vibrancy palette that pairs unexpected and unique 11837 * accents colors together.</li> 11838 * <li> {@code SPRITZ} is a low vibrancy palette that creates a soft wash between 11839 * colors.</li> 11840 * <li> {@code RAINBOW} uses both chromatic accents and neutral surfaces to create a more 11841 * subtle color experience for users.</li> 11842 * <li> {@code FRUIT_SALAD} experiments with the concept of "two tone colors" to give 11843 * users more expression.</li> 11844 * </ul> 11845 * 11846 * Example of valid fabricated theme specification: 11847 * <pre> 11848 * { 11849 * "android.theme.customization.system_palette":"B1611C", 11850 * "android.theme.customization.theme_style":"EXPRESSIVE" 11851 * } 11852 * </pre> 11853 * @hide 11854 */ 11855 @SystemApi 11856 @Readable 11857 public static final String THEME_CUSTOMIZATION_OVERLAY_PACKAGES = 11858 "theme_customization_overlay_packages"; 11859 11860 /** 11861 * Indicates whether the nav bar is forced to always be visible, even in immersive mode. 11862 * <p>Type: int (0 for false, 1 for true) 11863 * 11864 * @hide 11865 */ 11866 public static final String NAV_BAR_FORCE_VISIBLE = "nav_bar_force_visible"; 11867 11868 /** 11869 * Indicates whether the device is in kids nav mode. 11870 * <p>Type: int (0 for false, 1 for true) 11871 * 11872 * @hide 11873 */ 11874 public static final String NAV_BAR_KIDS_MODE = "nav_bar_kids_mode"; 11875 11876 /** 11877 * Navigation bar mode. 11878 * 0 = 3 button 11879 * 1 = 2 button 11880 * 2 = fully gestural 11881 * @hide 11882 */ 11883 @Readable 11884 public static final String NAVIGATION_MODE = 11885 "navigation_mode"; 11886 11887 /** 11888 * The value is from another(source) device's {@link #NAVIGATION_MODE} during restore. 11889 * It's supposed to be written only by 11890 * {@link com.android.providers.settings.SettingsHelper}. 11891 * This setting should not be added into backup array. 11892 * <p>Value: -1 = Can't get value from restore(default), 11893 * 0 = 3 button, 11894 * 1 = 2 button, 11895 * 2 = fully gestural. 11896 * @hide 11897 */ 11898 public static final String NAVIGATION_MODE_RESTORE = "navigation_mode_restore"; 11899 11900 /** 11901 * Scale factor for the back gesture inset size on the left side of the screen. 11902 * @hide 11903 */ 11904 @Readable 11905 public static final String BACK_GESTURE_INSET_SCALE_LEFT = 11906 "back_gesture_inset_scale_left"; 11907 11908 /** 11909 * Scale factor for the back gesture inset size on the right side of the screen. 11910 * @hide 11911 */ 11912 @Readable 11913 public static final String BACK_GESTURE_INSET_SCALE_RIGHT = 11914 "back_gesture_inset_scale_right"; 11915 11916 /** 11917 * Indicates whether the trackpad back gesture is enabled. 11918 * <p>Type: int (0 for false, 1 for true) 11919 * 11920 * @hide 11921 */ 11922 public static final String TRACKPAD_GESTURE_BACK_ENABLED = "trackpad_gesture_back_enabled"; 11923 11924 /** 11925 * Indicates whether the trackpad home gesture is enabled. 11926 * <p>Type: int (0 for false, 1 for true) 11927 * 11928 * @hide 11929 */ 11930 public static final String TRACKPAD_GESTURE_HOME_ENABLED = "trackpad_gesture_home_enabled"; 11931 11932 /** 11933 * Indicates whether the trackpad overview gesture is enabled. 11934 * <p>Type: int (0 for false, 1 for true) 11935 * 11936 * @hide 11937 */ 11938 public static final String TRACKPAD_GESTURE_OVERVIEW_ENABLED = 11939 "trackpad_gesture_overview_enabled"; 11940 11941 /** 11942 * Indicates whether the trackpad notification gesture is enabled. 11943 * <p>Type: int (0 for false, 1 for true) 11944 * 11945 * @hide 11946 */ 11947 public static final String TRACKPAD_GESTURE_NOTIFICATION_ENABLED = 11948 "trackpad_gesture_notification_enabled"; 11949 11950 /** 11951 * Indicates whether the trackpad quick switch gesture is enabled. 11952 * <p>Type: int (0 for false, 1 for true) 11953 * 11954 * @hide 11955 */ 11956 public static final String TRACKPAD_GESTURE_QUICK_SWITCH_ENABLED = 11957 "trackpad_gesture_quick_switch_enabled"; 11958 11959 /** 11960 * Current provider of proximity-based sharing services. 11961 * Default value in @string/config_defaultNearbySharingComponent. 11962 * No VALIDATOR as this setting will not be backed up. 11963 * @hide 11964 */ 11965 @Readable 11966 public static final String NEARBY_SHARING_COMPONENT = "nearby_sharing_component"; 11967 11968 /** 11969 * Nearby Sharing Slice URI for the SliceProvider to 11970 * read Nearby Sharing scan results and then draw the UI. 11971 * @hide 11972 */ 11973 public static final String NEARBY_SHARING_SLICE_URI = "nearby_sharing_slice_uri"; 11974 11975 /** 11976 * Current provider of Fast Pair saved devices page. 11977 * Default value in @string/config_defaultNearbyFastPairSettingsDevicesComponent. 11978 * No VALIDATOR as this setting will not be backed up. 11979 * @hide 11980 */ 11981 public static final String NEARBY_FAST_PAIR_SETTINGS_DEVICES_COMPONENT = 11982 "nearby_fast_pair_settings_devices_component"; 11983 11984 /** 11985 * Current provider of the component for requesting ambient context consent. 11986 * Default value in @string/config_defaultAmbientContextConsentComponent. 11987 * No VALIDATOR as this setting will not be backed up. 11988 * @hide 11989 */ 11990 public static final String AMBIENT_CONTEXT_CONSENT_COMPONENT = 11991 "ambient_context_consent_component"; 11992 11993 /** 11994 * Current provider of the intent extra key for the caller's package name while 11995 * requesting ambient context consent. 11996 * No VALIDATOR as this setting will not be backed up. 11997 * @hide 11998 */ 11999 public static final String AMBIENT_CONTEXT_PACKAGE_NAME_EXTRA_KEY = 12000 "ambient_context_package_name_key"; 12001 12002 /** 12003 * Current provider of the intent extra key for the event code int array while 12004 * requesting ambient context consent. 12005 * Default value in @string/config_ambientContextEventArrayExtraKey. 12006 * No VALIDATOR as this setting will not be backed up. 12007 * @hide 12008 */ 12009 public static final String AMBIENT_CONTEXT_EVENT_ARRAY_EXTRA_KEY = 12010 "ambient_context_event_array_key"; 12011 12012 /** 12013 * Controls whether aware is enabled. 12014 * @hide 12015 */ 12016 @Readable 12017 public static final String AWARE_ENABLED = "aware_enabled"; 12018 12019 /** 12020 * Controls whether aware_lock is enabled. 12021 * @hide 12022 */ 12023 @Readable 12024 public static final String AWARE_LOCK_ENABLED = "aware_lock_enabled"; 12025 12026 /** 12027 * Controls whether tap gesture is enabled. 12028 * @hide 12029 */ 12030 @Readable 12031 public static final String TAP_GESTURE = "tap_gesture"; 12032 12033 /** 12034 * Controls whether the people strip is enabled. 12035 * @hide 12036 */ 12037 @Readable 12038 public static final String PEOPLE_STRIP = "people_strip"; 12039 12040 /** 12041 * Whether or not to enable media resumption 12042 * When enabled, media controls in quick settings will populate on boot and persist if 12043 * resumable via a MediaBrowserService. 12044 * @see Settings.Global#SHOW_MEDIA_ON_QUICK_SETTINGS 12045 * @hide 12046 */ 12047 @Readable 12048 public static final String MEDIA_CONTROLS_RESUME = "qs_media_resumption"; 12049 12050 /** 12051 * Whether to enable media controls on lock screen. 12052 * When enabled, media controls will appear on lock screen. 12053 * @hide 12054 */ 12055 public static final String MEDIA_CONTROLS_LOCK_SCREEN = "media_controls_lock_screen"; 12056 12057 /** 12058 * Whether to enable camera extensions software fallback. 12059 * @hide 12060 */ 12061 @Readable 12062 public static final String CAMERA_EXTENSIONS_FALLBACK = "camera_extensions_fallback"; 12063 12064 /** 12065 * Controls whether contextual suggestions can be shown in the media controls. 12066 * @hide 12067 */ 12068 public static final String MEDIA_CONTROLS_RECOMMENDATION = "qs_media_recommend"; 12069 12070 /** 12071 * Controls magnification mode when magnification is enabled via a system-wide triple tap 12072 * gesture or the accessibility shortcut. 12073 * 12074 * @see #ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN 12075 * @see #ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW 12076 * @hide 12077 */ 12078 @TestApi 12079 @Readable 12080 public static final String ACCESSIBILITY_MAGNIFICATION_MODE = 12081 "accessibility_magnification_mode"; 12082 12083 /** 12084 * Magnification mode value that is a default value for the magnification logging feature. 12085 * @hide 12086 */ 12087 public static final int ACCESSIBILITY_MAGNIFICATION_MODE_NONE = 0x0; 12088 12089 /** 12090 * Magnification mode value that magnifies whole display. 12091 * @hide 12092 */ 12093 @TestApi 12094 public static final int ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN = 0x1; 12095 12096 /** 12097 * Magnification mode value that magnifies magnify particular region in a window 12098 * @hide 12099 */ 12100 @TestApi 12101 public static final int ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW = 0x2; 12102 12103 /** 12104 * Magnification mode value that is capable of magnifying whole display and particular 12105 * region in a window. 12106 * @hide 12107 */ 12108 @TestApi 12109 public static final int ACCESSIBILITY_MAGNIFICATION_MODE_ALL = 0x3; 12110 12111 /** 12112 * Whether the magnification always on feature is enabled. If true, the magnifier will not 12113 * deactivate on Activity transitions; it will only zoom out to 100%. 12114 * 12115 * @hide 12116 */ 12117 public static final String ACCESSIBILITY_MAGNIFICATION_ALWAYS_ON_ENABLED = 12118 "accessibility_magnification_always_on_enabled"; 12119 12120 /** 12121 * Whether the following typing focus feature for magnification is enabled. 12122 * @hide 12123 */ 12124 public static final String ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED = 12125 "accessibility_magnification_follow_typing_enabled"; 12126 12127 /** 12128 * Whether the magnification joystick controller feature is enabled. 12129 * @hide 12130 */ 12131 public static final String ACCESSIBILITY_MAGNIFICATION_JOYSTICK_ENABLED = 12132 "accessibility_magnification_joystick_enabled"; 12133 12134 /** 12135 * Setting that specifies whether the display magnification is enabled via a system-wide 12136 * two fingers triple tap gesture. 12137 * 12138 * @hide 12139 */ 12140 public static final String ACCESSIBILITY_MAGNIFICATION_TWO_FINGER_TRIPLE_TAP_ENABLED = 12141 "accessibility_magnification_two_finger_triple_tap_enabled"; 12142 12143 /** 12144 * For pinch to zoom anywhere feature. 12145 * 12146 * If true, you should be able to pinch to magnify the window anywhere. 12147 * 12148 * @hide 12149 */ 12150 public static final String ACCESSIBILITY_PINCH_TO_ZOOM_ANYWHERE_ENABLED = 12151 "accessibility_pinch_to_zoom_anywhere_enabled"; 12152 12153 /** 12154 * For magnification feature where panning can be controlled with a single finger. 12155 * 12156 * If true, you can pan using a single finger gesture. 12157 * 12158 * @hide 12159 */ 12160 public static final String ACCESSIBILITY_SINGLE_FINGER_PANNING_ENABLED = 12161 "accessibility_single_finger_panning_enabled"; 12162 12163 /** 12164 * Controls magnification capability. Accessibility magnification is capable of at least one 12165 * of the magnification modes. 12166 * 12167 * @see #ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN 12168 * @see #ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW 12169 * @see #ACCESSIBILITY_MAGNIFICATION_MODE_ALL 12170 * @hide 12171 */ 12172 @TestApi 12173 @Readable 12174 public static final String ACCESSIBILITY_MAGNIFICATION_CAPABILITY = 12175 "accessibility_magnification_capability"; 12176 12177 /** 12178 * Whether to show the window magnification prompt dialog when the user uses full-screen 12179 * magnification first time after database is upgraded. 12180 * 12181 * @hide 12182 */ 12183 public static final String ACCESSIBILITY_SHOW_WINDOW_MAGNIFICATION_PROMPT = 12184 "accessibility_show_window_magnification_prompt"; 12185 12186 /** 12187 * Controls the accessibility button mode. System will force-set the value to {@link 12188 * #ACCESSIBILITY_BUTTON_MODE_GESTURE} if {@link #NAVIGATION_MODE} is button; force-set the 12189 * value to {@link ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR} if {@link #NAVIGATION_MODE} is 12190 * gestural; otherwise, remain the option. 12191 * <ul> 12192 * <li> 0 = button in navigation bar </li> 12193 * <li> 1 = button floating on the display </li> 12194 * <li> 2 = button using gesture to trigger </li> 12195 * </ul> 12196 * 12197 * @see #ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR 12198 * @see #ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU 12199 * @see #ACCESSIBILITY_BUTTON_MODE_GESTURE 12200 * @hide 12201 */ 12202 public static final String ACCESSIBILITY_BUTTON_MODE = 12203 "accessibility_button_mode"; 12204 12205 /** 12206 * Accessibility button mode value that specifying the accessibility service or feature to 12207 * be toggled via the button in the navigation bar. 12208 * 12209 * @hide 12210 */ 12211 public static final int ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR = 0x0; 12212 12213 /** 12214 * Accessibility button mode value that specifying the accessibility service or feature to 12215 * be toggled via the button floating on the display. 12216 * 12217 * @hide 12218 */ 12219 public static final int ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU = 0x1; 12220 12221 /** 12222 * Accessibility button mode value that specifying the accessibility service or feature to 12223 * be toggled via the gesture. 12224 * 12225 * @hide 12226 */ 12227 public static final int ACCESSIBILITY_BUTTON_MODE_GESTURE = 0x2; 12228 12229 /** 12230 * The size of the accessibility floating menu. 12231 * <ul> 12232 * <li> 0 = small size 12233 * <li> 1 = large size 12234 * </ul> 12235 * 12236 * @hide 12237 */ 12238 public static final String ACCESSIBILITY_FLOATING_MENU_SIZE = 12239 "accessibility_floating_menu_size"; 12240 12241 /** 12242 * The icon type of the accessibility floating menu. 12243 * <ul> 12244 * <li> 0 = full circle type 12245 * <li> 1 = half circle type 12246 * </ul> 12247 * 12248 * @hide 12249 */ 12250 public static final String ACCESSIBILITY_FLOATING_MENU_ICON_TYPE = 12251 "accessibility_floating_menu_icon_type"; 12252 12253 /** 12254 * Whether the fade effect for the accessibility floating menu is enabled. 12255 * 12256 * @hide 12257 */ 12258 public static final String ACCESSIBILITY_FLOATING_MENU_FADE_ENABLED = 12259 "accessibility_floating_menu_fade_enabled"; 12260 12261 /** 12262 * The opacity value for the accessibility floating menu fade out effect, from 0.0 12263 * (transparent) to 1.0 (opaque). 12264 * 12265 * @hide 12266 */ 12267 public static final String ACCESSIBILITY_FLOATING_MENU_OPACITY = 12268 "accessibility_floating_menu_opacity"; 12269 12270 /** 12271 * Prompts the user to the Accessibility button is replaced with the floating menu. 12272 * <ul> 12273 * <li> 0 = disabled </li> 12274 * <li> 1 = enabled </li> 12275 * </ul> 12276 * 12277 * @hide 12278 */ 12279 public static final String ACCESSIBILITY_FLOATING_MENU_MIGRATION_TOOLTIP_PROMPT = 12280 "accessibility_floating_menu_migration_tooltip_prompt"; 12281 12282 /** 12283 * For the force dark theme feature which inverts any apps that don't already support dark 12284 * theme. 12285 * 12286 * If true, it will automatically invert any app that is mainly light. 12287 * 12288 * This is related to the force dark override setting, however it will always force the apps 12289 * colors and will ignore any developer hints or opt-out APIs. 12290 * 12291 * @hide 12292 */ 12293 @Readable 12294 public static final String ACCESSIBILITY_FORCE_INVERT_COLOR_ENABLED = 12295 "accessibility_force_invert_color_enabled"; 12296 12297 /** 12298 * Whether the Adaptive connectivity option is enabled. 12299 * 12300 * @hide 12301 */ 12302 public static final String ADAPTIVE_CONNECTIVITY_ENABLED = "adaptive_connectivity_enabled"; 12303 12304 /** 12305 * Controls the 'Sunlight boost' toggle in wearable devices (high brightness mode). 12306 * 12307 * Valid values for this key are: '0' (disabled) or '1' (enabled). 12308 * 12309 * @hide 12310 */ 12311 public static final String HBM_SETTING_KEY = 12312 "com.android.server.display.HBM_SETTING_KEY"; 12313 12314 /** 12315 * Keys we no longer back up under the current schema, but want to continue to 12316 * process when restoring historical backup datasets. 12317 * 12318 * All settings in {@link LEGACY_RESTORE_SETTINGS} array *must* have a non-null validator, 12319 * otherwise they won't be restored. 12320 * 12321 * @hide 12322 */ 12323 @Readable 12324 public static final String[] LEGACY_RESTORE_SETTINGS = { 12325 ENABLED_NOTIFICATION_LISTENERS, 12326 ENABLED_NOTIFICATION_ASSISTANT, 12327 ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES 12328 }; 12329 12330 /** 12331 * How long Assistant handles have enabled in milliseconds. 12332 * 12333 * @hide 12334 */ 12335 public static final String ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS = 12336 "reminder_exp_learning_time_elapsed"; 12337 12338 /** 12339 * How many times the Assistant has been triggered using the touch gesture. 12340 * 12341 * @hide 12342 */ 12343 public static final String ASSIST_HANDLES_LEARNING_EVENT_COUNT = 12344 "reminder_exp_learning_event_count"; 12345 12346 /** 12347 * Whether to show clipboard access notifications. 12348 * 12349 * @hide 12350 */ 12351 public static final String CLIPBOARD_SHOW_ACCESS_NOTIFICATIONS = 12352 "clipboard_show_access_notifications"; 12353 12354 /** 12355 * If nonzero, nas has not been updated to reflect new changes. 12356 * @hide 12357 */ 12358 @Readable 12359 public static final String NAS_SETTINGS_UPDATED = "nas_settings_updated"; 12360 12361 /** 12362 * Control whether Game Dashboard shortcut is always on for all games. 12363 * @hide 12364 */ 12365 @Readable 12366 public static final String GAME_DASHBOARD_ALWAYS_ON = "game_dashboard_always_on"; 12367 12368 12369 /** 12370 * For this device state, no specific auto-rotation lock setting should be applied. 12371 * If the user toggles the auto-rotate lock in this state, the setting will apply to the 12372 * previously valid device state. 12373 * @hide 12374 */ 12375 public static final int DEVICE_STATE_ROTATION_LOCK_IGNORED = 0; 12376 /** 12377 * For this device state, the setting for auto-rotation is locked. 12378 * @hide 12379 */ 12380 public static final int DEVICE_STATE_ROTATION_LOCK_LOCKED = 1; 12381 /** 12382 * For this device state, the setting for auto-rotation is unlocked. 12383 * @hide 12384 */ 12385 public static final int DEVICE_STATE_ROTATION_LOCK_UNLOCKED = 2; 12386 12387 /** 12388 * The different settings that can be used as values with 12389 * {@link #DEVICE_STATE_ROTATION_LOCK}. 12390 * @hide 12391 */ 12392 @IntDef(prefix = {"DEVICE_STATE_ROTATION_LOCK_"}, value = { 12393 DEVICE_STATE_ROTATION_LOCK_IGNORED, 12394 DEVICE_STATE_ROTATION_LOCK_LOCKED, 12395 DEVICE_STATE_ROTATION_LOCK_UNLOCKED, 12396 }) 12397 @Retention(RetentionPolicy.SOURCE) 12398 public @interface DeviceStateRotationLockSetting { 12399 } 12400 12401 /** @hide */ 12402 public static final int DEVICE_STATE_ROTATION_KEY_UNKNOWN = -1; 12403 /** @hide */ 12404 public static final int DEVICE_STATE_ROTATION_KEY_FOLDED = 0; 12405 /** @hide */ 12406 public static final int DEVICE_STATE_ROTATION_KEY_HALF_FOLDED = 1; 12407 /** @hide */ 12408 public static final int DEVICE_STATE_ROTATION_KEY_UNFOLDED = 2; 12409 /** @hide */ 12410 public static final int DEVICE_STATE_ROTATION_KEY_REAR_DISPLAY = 3; 12411 12412 /** 12413 * The different postures that can be used as keys with 12414 * {@link #DEVICE_STATE_ROTATION_LOCK}. 12415 * @hide 12416 */ 12417 @IntDef(prefix = {"DEVICE_STATE_ROTATION_KEY_"}, value = { 12418 DEVICE_STATE_ROTATION_KEY_UNKNOWN, 12419 DEVICE_STATE_ROTATION_KEY_FOLDED, 12420 DEVICE_STATE_ROTATION_KEY_HALF_FOLDED, 12421 DEVICE_STATE_ROTATION_KEY_UNFOLDED, 12422 DEVICE_STATE_ROTATION_KEY_REAR_DISPLAY, 12423 }) 12424 @Retention(RetentionPolicy.SOURCE) 12425 public @interface DeviceStateRotationLockKey { 12426 } 12427 12428 /** 12429 * Rotation lock setting keyed on device state. 12430 * 12431 * This holds a serialized map using int keys that represent postures in 12432 * {@link DeviceStateRotationLockKey} and value of 12433 * {@link DeviceStateRotationLockSetting} representing the rotation lock setting for that 12434 * posture. 12435 * 12436 * Serialized as key0:value0:key1:value1:...:keyN:valueN. 12437 * 12438 * Example: "0:1:1:2:2:1" 12439 * This example represents a map of: 12440 * <ul> 12441 * <li>DEVICE_STATE_ROTATION_KEY_FOLDED -> DEVICE_STATE_ROTATION_LOCK_LOCKED</li> 12442 * <li>DEVICE_STATE_ROTATION_KEY_HALF_FOLDED -> DEVICE_STATE_ROTATION_LOCK_UNLOCKED</li> 12443 * <li>DEVICE_STATE_ROTATION_KEY_UNFOLDED -> DEVICE_STATE_ROTATION_LOCK_IGNORED</li> 12444 * </ul> 12445 * 12446 * @hide 12447 */ 12448 public static final String DEVICE_STATE_ROTATION_LOCK = 12449 "device_state_rotation_lock"; 12450 12451 /** 12452 * Control whether communal mode is allowed on this device. 12453 * 12454 * @hide 12455 */ 12456 public static final String COMMUNAL_MODE_ENABLED = "communal_mode_enabled"; 12457 12458 /** 12459 * An array of SSIDs of Wi-Fi networks that, when connected, are considered safe to enable 12460 * the communal mode. 12461 * 12462 * @hide 12463 */ 12464 public static final String COMMUNAL_MODE_TRUSTED_NETWORKS = 12465 "communal_mode_trusted_networks"; 12466 12467 /** 12468 * Setting to store denylisted system languages by the CEC {@code <Set Menu Language>} 12469 * confirmation dialog. 12470 * 12471 * @hide 12472 */ 12473 public static final String HDMI_CEC_SET_MENU_LANGUAGE_DENYLIST = 12474 "hdmi_cec_set_menu_language_denylist"; 12475 12476 /** 12477 * Whether the Taskbar Education is about to be shown or is currently showing. 12478 * 12479 * <p>1 if true, 0 or unset otherwise. 12480 * 12481 * <p>This setting is used to inform other components that the Taskbar Education is 12482 * currently showing, which can prevent them from showing something else to the user. 12483 * 12484 * @hide 12485 */ 12486 public static final String LAUNCHER_TASKBAR_EDUCATION_SHOWING = 12487 "launcher_taskbar_education_showing"; 12488 12489 /** 12490 * Whether or not adaptive charging feature is enabled by user. 12491 * Type: int (0 for false, 1 for true) 12492 * Default: 1 12493 * 12494 * @hide 12495 */ 12496 public static final String ADAPTIVE_CHARGING_ENABLED = "adaptive_charging_enabled"; 12497 12498 /** 12499 * Whether battery saver is currently set to different schedule mode. 12500 * 12501 * @hide 12502 */ 12503 public static final String EXTRA_AUTOMATIC_POWER_SAVE_MODE = 12504 "extra_automatic_power_save_mode"; 12505 12506 /** 12507 * Whether contextual screen timeout is enabled. 12508 * 12509 * @hide 12510 */ 12511 public static final String CONTEXTUAL_SCREEN_TIMEOUT_ENABLED = 12512 "contextual_screen_timeout_enabled"; 12513 12514 /** 12515 * Whether lockscreen weather is enabled. 12516 * 12517 * @hide 12518 */ 12519 public static final String LOCK_SCREEN_WEATHER_ENABLED = "lockscreen_weather_enabled"; 12520 12521 /** 12522 * Whether the feature that the device will fire a haptic when users scroll and hit 12523 * the edge of the screen is enabled. 12524 * 12525 * @hide 12526 */ 12527 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_EDGE_HAPTIC_ENABLED = 12528 "accessibility_display_magnification_edge_haptic_enabled"; 12529 12530 /** 12531 * If 1, DND default allowed packages have been updated 12532 * 12533 * @hide 12534 */ 12535 public static final String DND_CONFIGS_MIGRATED = "dnd_settings_migrated"; 12536 12537 /** 12538 * Controls whether to hide private space entry point in All Apps 12539 * 12540 * @hide 12541 */ 12542 public static final String HIDE_PRIVATESPACE_ENTRY_POINT = "hide_privatespace_entry_point"; 12543 12544 /** 12545 * Whether or not secure windows should be disabled. This only works on debuggable builds. 12546 * 12547 * <p>When this setting is set to a non-zero value, all windows are treated as non-secure. 12548 * Content in windows with {@link android.view.WindowManager.LayoutParams#FLAG_SECURE} will 12549 * appear in screenshots and recordings. 12550 * 12551 * @hide 12552 */ 12553 public static final String DISABLE_SECURE_WINDOWS = "disable_secure_windows"; 12554 12555 /** @hide */ 12556 public static final int PRIVATE_SPACE_AUTO_LOCK_ON_DEVICE_LOCK = 0; 12557 /** @hide */ 12558 public static final int PRIVATE_SPACE_AUTO_LOCK_AFTER_INACTIVITY = 1; 12559 /** @hide */ 12560 public static final int PRIVATE_SPACE_AUTO_LOCK_AFTER_DEVICE_RESTART = 2; 12561 12562 /** 12563 * The different auto lock options for private space. 12564 * 12565 * @hide 12566 */ 12567 @IntDef(prefix = {"PRIVATE_SPACE_AUTO_LOCK_"}, value = { 12568 PRIVATE_SPACE_AUTO_LOCK_ON_DEVICE_LOCK, 12569 PRIVATE_SPACE_AUTO_LOCK_AFTER_INACTIVITY, 12570 PRIVATE_SPACE_AUTO_LOCK_AFTER_DEVICE_RESTART, 12571 }) 12572 @Retention(RetentionPolicy.SOURCE) 12573 public @interface PrivateSpaceAutoLockOption { 12574 } 12575 12576 12577 /** 12578 * Store auto lock value for private space. 12579 * The possible values are defined in {@link PrivateSpaceAutoLockOption}. 12580 * 12581 * @hide 12582 */ 12583 public static final String PRIVATE_SPACE_AUTO_LOCK = "private_space_auto_lock"; 12584 12585 /** 12586 * Toggle for enabling stylus pointer icon. Pointer icons for styluses will only be be shown 12587 * when this is enabled. Enabling this alone won't enable the stylus pointer; 12588 * config_enableStylusPointerIcon needs to be true as well. 12589 * 12590 * @hide 12591 */ 12592 @Readable 12593 public static final String STYLUS_POINTER_ICON_ENABLED = "stylus_pointer_icon_enabled"; 12594 12595 /** 12596 * These entries are considered common between the personal and the managed profile, 12597 * since the managed profile doesn't get to change them. 12598 */ 12599 private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>(); 12600 12601 static { 12602 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_ENABLED); 12603 CLONE_TO_MANAGED_PROFILE.add(ALLOW_MOCK_LOCATION); 12604 CLONE_TO_MANAGED_PROFILE.add(ALLOWED_GEOLOCATION_ORIGINS); 12605 CLONE_TO_MANAGED_PROFILE.add(CONTENT_CAPTURE_ENABLED); 12606 CLONE_TO_MANAGED_PROFILE.add(ENABLED_ACCESSIBILITY_SERVICES); 12607 CLONE_TO_MANAGED_PROFILE.add(LOCATION_CHANGER); 12608 CLONE_TO_MANAGED_PROFILE.add(LOCATION_MODE); 12609 CLONE_TO_MANAGED_PROFILE.add(SHOW_IME_WITH_HARD_KEYBOARD); 12610 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_BOUNCE_KEYS); 12611 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_SLOW_KEYS); 12612 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_STICKY_KEYS); 12613 CLONE_TO_MANAGED_PROFILE.add(NOTIFICATION_BUBBLES); 12614 CLONE_TO_MANAGED_PROFILE.add(NOTIFICATION_HISTORY_ENABLED); 12615 } 12616 12617 /** @hide */ getCloneToManagedProfileSettings(Set<String> outKeySet)12618 public static void getCloneToManagedProfileSettings(Set<String> outKeySet) { 12619 outKeySet.addAll(CLONE_TO_MANAGED_PROFILE); 12620 } 12621 12622 /** 12623 * Secure settings which can be accessed by instant apps. 12624 * @hide 12625 */ 12626 public static final Set<String> INSTANT_APP_SETTINGS = new ArraySet<>(); 12627 static { 12628 INSTANT_APP_SETTINGS.add(ENABLED_ACCESSIBILITY_SERVICES); 12629 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_SPEAK_PASSWORD); 12630 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_DISPLAY_INVERSION_ENABLED); 12631 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_ENABLED); 12632 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_PRESET); 12633 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_EDGE_TYPE); 12634 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_EDGE_COLOR); 12635 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_LOCALE); 12636 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR); 12637 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR); 12638 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_TYPEFACE); 12639 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_FONT_SCALE); 12640 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_WINDOW_COLOR); 12641 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED); 12642 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_DISPLAY_DALTONIZER); 12643 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_AUTOCLICK_DELAY); 12644 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_AUTOCLICK_ENABLED); 12645 INSTANT_APP_SETTINGS.add(ACCESSIBILITY_LARGE_POINTER_ICON); 12646 12647 INSTANT_APP_SETTINGS.add(DEFAULT_INPUT_METHOD); 12648 INSTANT_APP_SETTINGS.add(ENABLED_INPUT_METHODS); 12649 12650 INSTANT_APP_SETTINGS.add(ANDROID_ID); 12651 12652 INSTANT_APP_SETTINGS.add(ALLOW_MOCK_LOCATION); 12653 } 12654 12655 /** 12656 * Helper method for determining if a location provider is enabled. 12657 * 12658 * @param cr the content resolver to use 12659 * @param provider the location provider to query 12660 * @return true if the provider is enabled 12661 * 12662 * @deprecated use {@link LocationManager#isProviderEnabled(String)} 12663 */ 12664 @Deprecated isLocationProviderEnabled(ContentResolver cr, String provider)12665 public static boolean isLocationProviderEnabled(ContentResolver cr, String provider) { 12666 IBinder binder = ServiceManager.getService(Context.LOCATION_SERVICE); 12667 ILocationManager lm = Objects.requireNonNull(ILocationManager.Stub.asInterface(binder)); 12668 try { 12669 return lm.isProviderEnabledForUser(provider, cr.getUserId()); 12670 } catch (RemoteException e) { 12671 throw e.rethrowFromSystemServer(); 12672 } 12673 } 12674 12675 /** 12676 * Thread-safe method for enabling or disabling a single location provider. This will have 12677 * no effect on Android Q and above. 12678 * @param cr the content resolver to use 12679 * @param provider the location provider to enable or disable 12680 * @param enabled true if the provider should be enabled 12681 * @deprecated This API is deprecated 12682 */ 12683 @Deprecated setLocationProviderEnabled(ContentResolver cr, String provider, boolean enabled)12684 public static void setLocationProviderEnabled(ContentResolver cr, 12685 String provider, boolean enabled) { 12686 } 12687 12688 /** 12689 * List of system components that support restore in a V-> U OS downgrade but do not have 12690 * RestoreAnyVersion set to true. Value set before system restore. 12691 * This setting is not B&Rd 12692 * List is stored as a comma-separated string of package names e.g. "a,b,c" 12693 * @hide 12694 */ 12695 public static final String V_TO_U_RESTORE_ALLOWLIST = "v_to_u_restore_allowlist"; 12696 12697 /** 12698 * List of system components that have RestoreAnyVersion set to true but do not support 12699 * restore in a V-> U OS downgrade. Value set before system restore. 12700 * This setting is not B&Rd 12701 * List is stored as a comma-separated string of package names e.g. "a,b,c" 12702 * @hide 12703 */ 12704 public static final String V_TO_U_RESTORE_DENYLIST = "v_to_u_restore_denylist"; 12705 12706 /** 12707 * Integer property that determines which charging optimization mode is applied. 12708 * [0-10] inclusive representing different modes, where 0 is the default indicating 12709 * no optimization mode is applied. 12710 * 12711 * @hide 12712 */ 12713 public static final String CHARGE_OPTIMIZATION_MODE = "charge_optimization_mode"; 12714 12715 /** 12716 * String property which contains the package name of the contextual 12717 * search provider supplied by individual OEM's 12718 * R.string.config_defaultContextualSearchPackageName. 12719 * 12720 * @hide 12721 */ 12722 @Readable 12723 public static final String CONTEXTUAL_SEARCH_PACKAGE = "contextual_search_package"; 12724 } 12725 12726 /** 12727 * Global system settings, containing preferences that always apply identically 12728 * to all defined users. Applications can read these but are not allowed to write; 12729 * like the "Secure" settings, these are for preferences that the user must 12730 * explicitly modify through the system UI or specialized APIs for those values. 12731 */ 12732 public static final class Global extends NameValueTable { 12733 // NOTE: If you add new settings here, be sure to add them to 12734 // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoGlobalSettingsLocked. 12735 12736 /** 12737 * The content:// style URL for global secure settings items. Not public. 12738 */ 12739 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global"); 12740 12741 /** 12742 * Whether the notification bubbles are globally enabled 12743 * The value is boolean (1 or 0). 12744 * @hide 12745 * @deprecated moved to secure settings. 12746 */ 12747 @Deprecated 12748 @TestApi 12749 @Readable 12750 public static final String NOTIFICATION_BUBBLES = "notification_bubbles"; 12751 12752 /** 12753 * Whether users are allowed to add more users or guest from lockscreen. 12754 * <p> 12755 * Type: int 12756 * @hide 12757 */ 12758 @Readable 12759 public static final String ADD_USERS_WHEN_LOCKED = "add_users_when_locked"; 12760 12761 /** 12762 * Whether guest user should be removed on exit from guest mode. 12763 * <p> 12764 * Type: int 12765 * @hide 12766 */ 12767 public static final String REMOVE_GUEST_ON_EXIT = "remove_guest_on_exit"; 12768 12769 /** 12770 * Whether applying ramping ringer on incoming phone call ringtone. 12771 * <p>1 = apply ramping ringer 12772 * <p>0 = do not apply ramping ringer 12773 * @deprecated Use {@link AudioManager#isRampingRingerEnabled()} instead 12774 */ 12775 @Deprecated 12776 @Readable 12777 public static final String APPLY_RAMPING_RINGER = "apply_ramping_ringer"; 12778 12779 /** 12780 * Setting whether the global gesture for enabling accessibility is enabled. 12781 * If this gesture is enabled the user will be able to perfrom it to enable 12782 * the accessibility state without visiting the settings app. 12783 * 12784 * @hide 12785 * No longer used. Should be removed once all dependencies have been updated. 12786 */ 12787 @UnsupportedAppUsage 12788 @Readable 12789 public static final String ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED = 12790 "enable_accessibility_global_gesture_enabled"; 12791 12792 /** 12793 * Whether Airplane Mode is on. 12794 */ 12795 @Readable 12796 public static final String AIRPLANE_MODE_ON = "airplane_mode_on"; 12797 12798 /** 12799 * Whether Theater Mode is on. 12800 * {@hide} 12801 */ 12802 @SystemApi 12803 @Readable 12804 public static final String THEATER_MODE_ON = "theater_mode_on"; 12805 12806 /** 12807 * Constant for use in AIRPLANE_MODE_RADIOS or SATELLITE_MODE_RADIOS to specify Bluetooth 12808 * radio. 12809 */ 12810 @Readable 12811 public static final String RADIO_BLUETOOTH = "bluetooth"; 12812 12813 /** 12814 * Constant for use in AIRPLANE_MODE_RADIOS or SATELLITE_MODE_RADIOS to specify Wi-Fi radio. 12815 */ 12816 @Readable 12817 public static final String RADIO_WIFI = "wifi"; 12818 12819 /** 12820 * {@hide} 12821 */ 12822 @Readable 12823 public static final String RADIO_WIMAX = "wimax"; 12824 /** 12825 * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio. 12826 */ 12827 @Readable 12828 public static final String RADIO_CELL = "cell"; 12829 12830 /** 12831 * Constant for use in AIRPLANE_MODE_RADIOS or SATELLITE_MODE_RADIOS to specify NFC radio. 12832 */ 12833 @Readable 12834 public static final String RADIO_NFC = "nfc"; 12835 12836 /** 12837 * Constant for use in SATELLITE_MODE_RADIOS to specify UWB radio. 12838 * 12839 * {@hide} 12840 */ 12841 public static final String RADIO_UWB = "uwb"; 12842 12843 12844 /** 12845 * A comma separated list of radios that need to be disabled when satellite mode is on. 12846 * 12847 * {@hide} 12848 */ 12849 @Readable 12850 public static final String SATELLITE_MODE_RADIOS = "satellite_mode_radios"; 12851 12852 /** 12853 * The satellite mode is enabled for the user. When the satellite mode is enabled, the 12854 * satellite radio will be turned on and all other radios will be turned off. When the 12855 * satellite mode is disabled, the satellite radio will be turned off and the states of 12856 * other radios will be restored. 12857 * <p> 12858 * When this setting is set to 0, it means the satellite mode is disabled. When this 12859 * setting is set to 1, it means the satellite mode is enabled. 12860 * 12861 * {@hide} 12862 */ 12863 @Readable 12864 public static final String SATELLITE_MODE_ENABLED = "satellite_mode_enabled"; 12865 12866 /** 12867 * A comma separated list of radios that need to be disabled when airplane mode 12868 * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are 12869 * included in the comma separated list. 12870 */ 12871 @Readable 12872 public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; 12873 12874 /** 12875 * A comma separated list of radios that should to be disabled when airplane mode 12876 * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is 12877 * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi 12878 * will be turned off when entering airplane mode, but the user will be able to reenable 12879 * Wifi in the Settings app. 12880 * @hide 12881 */ 12882 @SystemApi 12883 @Readable 12884 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios"; 12885 12886 /** 12887 * An integer representing the Bluetooth Class of Device (CoD). 12888 * 12889 * @hide 12890 */ 12891 @Readable 12892 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 12893 @SuppressLint("NoSettingsProvider") 12894 public static final String BLUETOOTH_CLASS_OF_DEVICE = "bluetooth_class_of_device"; 12895 12896 /** 12897 * A Long representing a bitmap of profiles that should be disabled when bluetooth starts. 12898 * See {@link android.bluetooth.BluetoothProfile}. 12899 * {@hide} 12900 */ 12901 @Readable 12902 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 12903 @SuppressLint("NoSettingsProvider") 12904 public static final String BLUETOOTH_DISABLED_PROFILES = "bluetooth_disabled_profiles"; 12905 12906 /** 12907 * A semi-colon separated list of Bluetooth interoperability workarounds. 12908 * Each entry is a partial Bluetooth device address string and an integer representing 12909 * the feature to be disabled, separated by a comma. The integer must correspond 12910 * to a interoperability feature as defined in "interop.h" in /system/bt. 12911 * <p> 12912 * Example: <br/> 12913 * "00:11:22,0;01:02:03:04,2" 12914 * @hide 12915 */ 12916 @Readable 12917 public static final String BLUETOOTH_INTEROPERABILITY_LIST = "bluetooth_interoperability_list"; 12918 12919 /** 12920 * The policy for deciding when Wi-Fi should go to sleep (which will in 12921 * turn switch to using the mobile data as an Internet connection). 12922 * <p> 12923 * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT}, 12924 * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or 12925 * {@link #WIFI_SLEEP_POLICY_NEVER}. 12926 * @deprecated This is no longer used or set by the platform. 12927 */ 12928 @Deprecated 12929 @Readable 12930 public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy"; 12931 12932 /** 12933 * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep 12934 * policy, which is to sleep shortly after the turning off 12935 * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting. 12936 * @deprecated This is no longer used by the platform. 12937 */ 12938 @Deprecated 12939 public static final int WIFI_SLEEP_POLICY_DEFAULT = 0; 12940 12941 /** 12942 * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when 12943 * the device is on battery, and never go to sleep when the device is 12944 * plugged in. 12945 * @deprecated This is no longer used by the platform. 12946 */ 12947 @Deprecated 12948 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; 12949 12950 /** 12951 * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep. 12952 * @deprecated This is no longer used by the platform. 12953 */ 12954 @Deprecated 12955 public static final int WIFI_SLEEP_POLICY_NEVER = 2; 12956 12957 /** 12958 * Value to specify if the device's UTC system clock should be set automatically, e.g. using 12959 * telephony signals like NITZ, or other sources like GNSS or NTP. 12960 * 12961 * <p>Prefer {@code android.app.time.TimeManager} API calls to determine the state of 12962 * automatic time detection instead of directly observing this setting as it may be ignored 12963 * by the time_detector service under various conditions. 12964 * 12965 * <p>1=yes, 0=no (manual) 12966 */ 12967 @Readable 12968 public static final String AUTO_TIME = "auto_time"; 12969 12970 /** 12971 * Value to specify if the device's time zone system property should be set automatically, 12972 * e.g. using telephony signals like MCC and NITZ, or other mechanisms like the location. 12973 * 12974 * <p>Prefer {@code android.app.time.TimeManager} API calls to determine the state of 12975 * automatic time zone detection instead of directly observing this setting as it may be 12976 * ignored by the time_zone_detector service under various conditions. 12977 * 12978 * <p>1=yes, 0=no (manual). 12979 */ 12980 @Readable 12981 public static final String AUTO_TIME_ZONE = "auto_time_zone"; 12982 12983 /** 12984 * Records whether an explicit preference for {@link #AUTO_TIME_ZONE} has been expressed 12985 * instead of the current value being the default. This value is used to tell if the {@link 12986 * #AUTO_TIME_ZONE} value can be influenced by experiment flags that alter the setting's 12987 * value for internal testers: once the user indicates a preference they leave the 12988 * experiment, only users that are still using the default will be affected by the flag. 12989 * 12990 * <p>Since {@link #AUTO_TIME_ZONE} can be altered by components besides the system server, 12991 * and not just via the time_zone_detector logic that sets this value, this isn't guaranteed 12992 * to be set when the device diverges from the default in all cases. Important AOSP system 12993 * components like SettingsUI do use the time_zone_detector APIs. 12994 * 12995 * <p>1="has been set explicitly" 12996 * 12997 * @hide 12998 */ 12999 public static final String AUTO_TIME_ZONE_EXPLICIT = "auto_time_zone_explicit"; 13000 13001 /** 13002 * URI for the car dock "in" event sound. 13003 * @hide 13004 */ 13005 @Readable 13006 public static final String CAR_DOCK_SOUND = "car_dock_sound"; 13007 13008 /** 13009 * URI for the car dock "out" event sound. 13010 * @hide 13011 */ 13012 @Readable 13013 public static final String CAR_UNDOCK_SOUND = "car_undock_sound"; 13014 13015 /** 13016 * URI for the desk dock "in" event sound. 13017 * @hide 13018 */ 13019 @Readable 13020 public static final String DESK_DOCK_SOUND = "desk_dock_sound"; 13021 13022 /** 13023 * URI for the desk dock "out" event sound. 13024 * @hide 13025 */ 13026 @Readable 13027 public static final String DESK_UNDOCK_SOUND = "desk_undock_sound"; 13028 13029 /** 13030 * Whether to play a sound for dock events. 13031 * @hide 13032 */ 13033 @Readable 13034 public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled"; 13035 13036 /** 13037 * Whether to play a sound for dock events, only when an accessibility service is on. 13038 * @hide 13039 */ 13040 @Readable 13041 public static final String DOCK_SOUNDS_ENABLED_WHEN_ACCESSIBILITY = "dock_sounds_enabled_when_accessbility"; 13042 13043 /** 13044 * URI for the "device locked" (keyguard shown) sound. 13045 * @hide 13046 */ 13047 @Readable 13048 public static final String LOCK_SOUND = "lock_sound"; 13049 13050 /** 13051 * URI for the "device unlocked" sound. 13052 * @hide 13053 */ 13054 @Readable 13055 public static final String UNLOCK_SOUND = "unlock_sound"; 13056 13057 /** 13058 * URI for the "device is trusted" sound, which is played when the device enters the trusted 13059 * state without unlocking. 13060 * @hide 13061 */ 13062 @Readable 13063 public static final String TRUSTED_SOUND = "trusted_sound"; 13064 13065 /** 13066 * URI for the low battery sound file. 13067 * @hide 13068 */ 13069 @Readable 13070 public static final String LOW_BATTERY_SOUND = "low_battery_sound"; 13071 13072 /** 13073 * Whether to play a sound for low-battery alerts. 13074 * @hide 13075 */ 13076 @Readable 13077 public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled"; 13078 13079 /** 13080 * URI for the "wireless charging started" sound. 13081 * @hide 13082 */ 13083 @Readable 13084 public static final String WIRELESS_CHARGING_STARTED_SOUND = 13085 "wireless_charging_started_sound"; 13086 13087 /** 13088 * Whether to auto enable reverse charging once plugged-in. 13089 * @hide 13090 */ 13091 public static final String REVERSE_CHARGING_AUTO_ON = 13092 "settings_key_reverse_charging_auto_turn_on"; 13093 13094 /** 13095 * URI for "wired charging started" sound. 13096 * @hide 13097 */ 13098 @Readable 13099 public static final String CHARGING_STARTED_SOUND = "charging_started_sound"; 13100 13101 /** 13102 * Whether to play a sound for charging events. 13103 * @deprecated Use {@link android.provider.Settings.Secure#CHARGING_SOUNDS_ENABLED} instead 13104 * @hide 13105 */ 13106 @Deprecated 13107 public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled"; 13108 13109 /** 13110 * Whether to vibrate for wireless charging events. 13111 * @deprecated Use {@link android.provider.Settings.Secure#CHARGING_VIBRATION_ENABLED} 13112 * @hide 13113 */ 13114 @Deprecated 13115 public static final String CHARGING_VIBRATION_ENABLED = "charging_vibration_enabled"; 13116 13117 /** 13118 * Whether we keep the device on while the device is plugged in. 13119 * Supported values are: 13120 * <ul> 13121 * <li>{@code 0} to never stay on while plugged in</li> 13122 * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li> 13123 * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li> 13124 * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li> 13125 * <li>{@link BatteryManager#BATTERY_PLUGGED_DOCK} to stay on for dock charger</li> 13126 * </ul> 13127 * These values can be OR-ed together. 13128 */ 13129 @Readable 13130 public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; 13131 13132 /** 13133 * When the user has enable the option to have a "bug report" command 13134 * in the power menu. 13135 * @deprecated Use {@link android.provider.Settings.Secure#BUGREPORT_IN_POWER_MENU} instead 13136 * @hide 13137 */ 13138 @Deprecated 13139 @Readable 13140 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; 13141 13142 /** 13143 * The package name for the custom bugreport handler app. This app must be allowlisted. 13144 * This is currently used only by Power Menu short press. 13145 * @deprecated Use {@link android.provider.Settings.Secure#CUSTOM_BUGREPORT_HANDLER_APP} 13146 * instead 13147 * @hide 13148 */ 13149 @Deprecated 13150 @Readable 13151 public static final String CUSTOM_BUGREPORT_HANDLER_APP = "custom_bugreport_handler_app"; 13152 13153 /** 13154 * The user id for the custom bugreport handler app. This is currently used only by Power 13155 * Menu short press. 13156 * @deprecated Use {@link android.provider.Settings.Secure#CUSTOM_BUGREPORT_HANDLER_USER} 13157 * instead 13158 * @hide 13159 */ 13160 @Deprecated 13161 @Readable 13162 public static final String CUSTOM_BUGREPORT_HANDLER_USER = "custom_bugreport_handler_user"; 13163 13164 /** 13165 * Whether ADB over USB is enabled. 13166 */ 13167 @Readable 13168 public static final String ADB_ENABLED = "adb_enabled"; 13169 13170 /** 13171 * Whether ADB over Wifi is enabled. 13172 * @hide 13173 */ 13174 @Readable 13175 public static final String ADB_WIFI_ENABLED = "adb_wifi_enabled"; 13176 13177 /** 13178 * Whether existing ADB sessions over both USB and Wifi should be terminated when the user 13179 * revokes debugging authorizations. 13180 * @hide 13181 */ 13182 public static final String ADB_DISCONNECT_SESSIONS_ON_REVOKE = 13183 "adb_disconnect_sessions_on_revoke"; 13184 13185 /** 13186 * Whether Views are allowed to save their attribute data. 13187 * @hide 13188 */ 13189 @Readable 13190 public static final String DEBUG_VIEW_ATTRIBUTES = "debug_view_attributes"; 13191 13192 /** 13193 * Which application package is allowed to save View attribute data. 13194 * @hide 13195 */ 13196 @Readable 13197 public static final String DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE = 13198 "debug_view_attributes_application_package"; 13199 13200 /** 13201 * Whether assisted GPS should be enabled or not. 13202 * @hide 13203 */ 13204 @Readable 13205 public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled"; 13206 13207 /** 13208 * Whether bluetooth is enabled/disabled 13209 * 0=disabled. 1=enabled. 13210 */ 13211 @Readable 13212 public static final String BLUETOOTH_ON = "bluetooth_on"; 13213 13214 /** 13215 * CDMA Cell Broadcast SMS 13216 * 0 = CDMA Cell Broadcast SMS disabled 13217 * 1 = CDMA Cell Broadcast SMS enabled 13218 * @hide 13219 */ 13220 @Readable 13221 public static final String CDMA_CELL_BROADCAST_SMS = 13222 "cdma_cell_broadcast_sms"; 13223 13224 /** 13225 * The CDMA roaming mode 0 = Home Networks, CDMA default 13226 * 1 = Roaming on Affiliated networks 13227 * 2 = Roaming on any networks 13228 * @hide 13229 */ 13230 @Readable 13231 public static final String CDMA_ROAMING_MODE = "roaming_settings"; 13232 13233 /** 13234 * The CDMA subscription mode 0 = RUIM/SIM (default) 13235 * 1 = NV 13236 * @hide 13237 */ 13238 @Readable 13239 public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode"; 13240 13241 /** 13242 * The default value for whether background data is enabled or not. 13243 * 13244 * Used by {@code NetworkPolicyManagerService}. 13245 * 13246 * @hide 13247 */ 13248 @Readable 13249 public static final String DEFAULT_RESTRICT_BACKGROUND_DATA = 13250 "default_restrict_background_data"; 13251 13252 /** Inactivity timeout to track mobile data activity. 13253 * 13254 * If set to a positive integer, it indicates the inactivity timeout value in seconds to 13255 * infer the data activity of mobile network. After a period of no activity on mobile 13256 * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE} 13257 * intent is fired to indicate a transition of network status from "active" to "idle". Any 13258 * subsequent activity on mobile networks triggers the firing of {@code 13259 * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active". 13260 * 13261 * Network activity refers to transmitting or receiving data on the network interfaces. 13262 * 13263 * Tracking is disabled if set to zero or negative value. 13264 * 13265 * @hide 13266 */ 13267 @Readable 13268 public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile"; 13269 13270 /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE} 13271 * but for Wifi network. 13272 * @hide 13273 */ 13274 @Readable 13275 public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi"; 13276 13277 /** 13278 * Whether or not data roaming is enabled. (0 = false, 1 = true) 13279 * Use {@link TelephonyManager#isDataRoamingEnabled} instead of calling via settings. 13280 */ 13281 @Readable(maxTargetSdk = Build.VERSION_CODES.S_V2) 13282 public static final String DATA_ROAMING = "data_roaming"; 13283 13284 /** 13285 * The value passed to a Mobile DataConnection via bringUp which defines the 13286 * number of retries to perform when setting up the initial connection. The default 13287 * value defined in DataConnectionTrackerBase#DEFAULT_MDC_INITIAL_RETRY is currently 1. 13288 * @hide 13289 */ 13290 @Readable 13291 public static final String MDC_INITIAL_MAX_RETRY = "mdc_initial_max_retry"; 13292 13293 /** 13294 * Whether any package can be on external storage. When this is true, any 13295 * package, regardless of manifest values, is a candidate for installing 13296 * or moving onto external storage. (0 = false, 1 = true) 13297 * @hide 13298 */ 13299 @Readable 13300 public static final String FORCE_ALLOW_ON_EXTERNAL = "force_allow_on_external"; 13301 13302 /** 13303 * The default SM-DP+ configured for this device. 13304 * 13305 * <p>An SM-DP+ is used by an LPA (see {@link android.service.euicc.EuiccService}) to 13306 * download profiles. If this value is set, the LPA will query this server for any profiles 13307 * available to this device. If any are available, they may be downloaded during device 13308 * provisioning or in settings without needing the user to enter an activation code. 13309 * 13310 * @see android.service.euicc.EuiccService 13311 * @hide 13312 */ 13313 @SystemApi 13314 @Readable 13315 public static final String DEFAULT_SM_DP_PLUS = "default_sm_dp_plus"; 13316 13317 /** 13318 * Whether any profile has ever been downloaded onto a eUICC on the device. 13319 * 13320 * <p>Used to hide eUICC UI from users who have never made use of it and would only be 13321 * confused by seeing references to it in settings. 13322 * (0 = false, 1 = true) 13323 * @hide 13324 */ 13325 @SystemApi 13326 @Readable 13327 public static final String EUICC_PROVISIONED = "euicc_provisioned"; 13328 13329 /** 13330 * List of ISO country codes in which eUICC UI is shown. Country codes should be separated 13331 * by comma. 13332 * 13333 * Note: if {@link #EUICC_SUPPORTED_COUNTRIES} is empty, then {@link 13334 * #EUICC_UNSUPPORTED_COUNTRIES} is used. 13335 * 13336 * <p>Used to hide eUICC UI from users who are currently in countries where no carriers 13337 * support eUICC. 13338 * 13339 * @hide 13340 */ 13341 @SystemApi 13342 @Readable 13343 public static final String EUICC_SUPPORTED_COUNTRIES = "euicc_supported_countries"; 13344 13345 /** 13346 * List of ISO country codes in which eUICC UI is not shown. Country codes should be 13347 * separated by comma. 13348 * 13349 * Note: if {@link #EUICC_SUPPORTED_COUNTRIES} is empty, then {@link 13350 * #EUICC_UNSUPPORTED_COUNTRIES} is used. 13351 * 13352 * <p>Used to hide eUICC UI from users who are currently in countries where no carriers 13353 * support eUICC. 13354 * 13355 * @hide 13356 */ 13357 @SystemApi 13358 @Readable 13359 public static final String EUICC_UNSUPPORTED_COUNTRIES = "euicc_unsupported_countries"; 13360 13361 /** 13362 * Whether any activity can be resized. When this is true, any 13363 * activity, regardless of manifest values, can be resized for multi-window. 13364 * (0 = false, 1 = true) 13365 * @hide 13366 */ 13367 @Readable 13368 public static final String DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES 13369 = "force_resizable_activities"; 13370 13371 /** 13372 * Whether to enable experimental freeform support for windows. 13373 * @hide 13374 */ 13375 @Readable 13376 public static final String DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT 13377 = "enable_freeform_support"; 13378 13379 /** 13380 * Whether to enable experimental desktop mode on secondary displays. 13381 * @hide 13382 */ 13383 @Readable 13384 public static final String DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS = 13385 "force_desktop_mode_on_external_displays"; 13386 13387 /** 13388 * Whether to allow non-resizable apps to be shown in multi-window. The app will be 13389 * letterboxed if the request orientation is not met, and will be shown in size-compat 13390 * mode if the container size has changed. 13391 * @hide 13392 */ 13393 @TestApi 13394 @Readable 13395 @SuppressLint("NoSettingsProvider") 13396 public static final String DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW = 13397 "enable_non_resizable_multi_window"; 13398 13399 /** 13400 * If true, shadows drawn around the window will be rendered by the system compositor. If 13401 * false, shadows will be drawn by the client by setting an elevation on the root view and 13402 * the contents will be inset by the surface insets. 13403 * (0 = false, 1 = true) 13404 * @hide 13405 */ 13406 @Readable 13407 public static final String DEVELOPMENT_RENDER_SHADOWS_IN_COMPOSITOR = 13408 "render_shadows_in_compositor"; 13409 13410 /** 13411 * Path to the WindowManager display settings file. If unset, the default file path will 13412 * be used. 13413 * 13414 * @hide 13415 */ 13416 public static final String DEVELOPMENT_WM_DISPLAY_SETTINGS_PATH = 13417 "wm_display_settings_path"; 13418 13419 /** 13420 * Whether user has enabled development settings. 13421 */ 13422 @Readable 13423 public static final String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled"; 13424 13425 /** 13426 * Whether the device has been provisioned (0 = false, 1 = true). 13427 * <p>On a multiuser device with a separate system user, the screen may be locked 13428 * as soon as this is set to true and further activities cannot be launched on the 13429 * system user unless they are marked to show over keyguard. 13430 */ 13431 @Readable 13432 public static final String DEVICE_PROVISIONED = "device_provisioned"; 13433 13434 /** 13435 * Indicates whether the device is under restricted secure FRP mode. 13436 * Secure FRP mode is enabled when the device is under FRP. On solving of FRP challenge, 13437 * device is removed from this mode. 13438 * <p> 13439 * Type: int (0 for false, 1 for true) 13440 * 13441 */ 13442 @Readable 13443 @SuppressLint("NoSettingsProvider") 13444 public static final String SECURE_FRP_MODE = "secure_frp_mode"; 13445 13446 /** 13447 * Whether bypassing the device policy management role holder qualification is allowed, 13448 * (0 = false, 1 = true). 13449 * 13450 * @hide 13451 */ 13452 public static final String BYPASS_DEVICE_POLICY_MANAGEMENT_ROLE_QUALIFICATIONS = 13453 "bypass_device_policy_management_role_qualifications"; 13454 13455 /** 13456 * Whether work profile telephony feature is enabled for non 13457 * {@link android.app.role.RoleManager#ROLE_DEVICE_POLICY_MANAGEMENT} holders. 13458 * ("0" = false, "1" = true). 13459 * 13460 * @hide 13461 */ 13462 @Readable 13463 public static final String ALLOW_WORK_PROFILE_TELEPHONY_FOR_NON_DPM_ROLE_HOLDERS = 13464 "allow_work_profile_telephony_for_non_dpm_role_holders"; 13465 13466 /** 13467 * Indicates whether mobile data should be allowed while the device is being provisioned. 13468 * This allows the provisioning process to turn off mobile data before the user 13469 * has an opportunity to set things up, preventing other processes from burning 13470 * precious bytes before wifi is setup. 13471 * <p> 13472 * Type: int (0 for false, 1 for true) 13473 * 13474 * @hide 13475 */ 13476 @SystemApi 13477 @Readable 13478 public static final String DEVICE_PROVISIONING_MOBILE_DATA_ENABLED = 13479 "device_provisioning_mobile_data"; 13480 13481 /** 13482 * The saved value for WindowManagerService.setForcedDisplaySize(). 13483 * Two integers separated by a comma. If unset, then use the real display size. 13484 * @hide 13485 */ 13486 @Readable 13487 public static final String DISPLAY_SIZE_FORCED = "display_size_forced"; 13488 13489 /** 13490 * The saved value for WindowManagerService.setForcedDisplayScalingMode(). 13491 * 0 or unset if scaling is automatic, 1 if scaling is disabled. 13492 * @hide 13493 */ 13494 @Readable 13495 public static final String DISPLAY_SCALING_FORCE = "display_scaling_force"; 13496 13497 /** 13498 * The maximum size, in bytes, of a download that the download manager will transfer over 13499 * a non-wifi connection. 13500 * @hide 13501 */ 13502 @Readable 13503 public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE = 13504 "download_manager_max_bytes_over_mobile"; 13505 13506 /** 13507 * The recommended maximum size, in bytes, of a download that the download manager should 13508 * transfer over a non-wifi connection. Over this size, the use will be warned, but will 13509 * have the option to start the download over the mobile connection anyway. 13510 * @hide 13511 */ 13512 @Readable 13513 public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE = 13514 "download_manager_recommended_max_bytes_over_mobile"; 13515 13516 /** 13517 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead 13518 */ 13519 @Deprecated 13520 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; 13521 13522 /** 13523 * Whether or not media is shown automatically when bypassing as a heads up. 13524 * @hide 13525 */ 13526 @Readable 13527 public static final String SHOW_MEDIA_ON_QUICK_SETTINGS = 13528 "qs_media_controls"; 13529 13530 /** 13531 * The interval in milliseconds at which location requests will be throttled when they are 13532 * coming from the background. 13533 * 13534 * @hide 13535 */ 13536 @Readable 13537 public static final String LOCATION_BACKGROUND_THROTTLE_INTERVAL_MS = 13538 "location_background_throttle_interval_ms"; 13539 13540 /** 13541 * Most frequent location update interval in milliseconds that proximity alert is allowed 13542 * to request. 13543 * @hide 13544 */ 13545 @Readable 13546 public static final String LOCATION_BACKGROUND_THROTTLE_PROXIMITY_ALERT_INTERVAL_MS = 13547 "location_background_throttle_proximity_alert_interval_ms"; 13548 13549 /** 13550 * Packages that are allowlisted for background throttling (throttling will not be applied). 13551 * @hide 13552 */ 13553 @Readable 13554 public static final String LOCATION_BACKGROUND_THROTTLE_PACKAGE_WHITELIST = 13555 "location_background_throttle_package_whitelist"; 13556 13557 /** 13558 * Packages that are allowlisted for ignoring location settings (may retrieve location even 13559 * when user location settings are off), for emergency purposes. 13560 * @deprecated No longer used from Android 12+ 13561 * @hide 13562 */ 13563 @TestApi 13564 @Readable 13565 @Deprecated 13566 public static final String LOCATION_IGNORE_SETTINGS_PACKAGE_WHITELIST = 13567 "location_ignore_settings_package_whitelist"; 13568 13569 /** 13570 * Whether to throttle location when the device is in doze and still. 13571 * @hide 13572 */ 13573 public static final String LOCATION_ENABLE_STATIONARY_THROTTLE = 13574 "location_enable_stationary_throttle"; 13575 13576 /** 13577 * Whether TV will switch to MHL port when a mobile device is plugged in. 13578 * (0 = false, 1 = true) 13579 * @hide 13580 */ 13581 @Readable 13582 public static final String MHL_INPUT_SWITCHING_ENABLED = "mhl_input_switching_enabled"; 13583 13584 /** 13585 * Whether TV will charge the mobile device connected at MHL port. (0 = false, 1 = true) 13586 * @hide 13587 */ 13588 @Readable 13589 public static final String MHL_POWER_CHARGE_ENABLED = "mhl_power_charge_enabled"; 13590 13591 /** 13592 * Whether mobile data connections are allowed by the user. See 13593 * ConnectivityManager for more info. 13594 * @hide 13595 */ 13596 @UnsupportedAppUsage 13597 @Readable 13598 public static final String MOBILE_DATA = "mobile_data"; 13599 13600 /** 13601 * Whether the mobile data connection should remain active even when higher 13602 * priority networks like WiFi are active, to help make network switching faster. 13603 * 13604 * See ConnectivityService for more info. 13605 * 13606 * (0 = disabled, 1 = enabled) 13607 * @hide 13608 */ 13609 @Readable 13610 public static final String MOBILE_DATA_ALWAYS_ON = "mobile_data_always_on"; 13611 13612 /** 13613 * The duration in milliseconds of each action, separated by commas. Ex: 13614 * 13615 * "18000,18000,18000,18000,0" 13616 * 13617 * See com.android.internal.telephony.data.DataStallRecoveryManager for more info 13618 * @hide 13619 */ 13620 public static final String DSRM_DURATION_MILLIS = "dsrm_duration_millis"; 13621 13622 /** 13623 * The list of DSRM enabled actions, separated by commas. Ex: 13624 * 13625 * "true,true,false,true,true" 13626 * 13627 * See com.android.internal.telephony.data.DataStallRecoveryManager for more info 13628 * @hide 13629 */ 13630 public static final String DSRM_ENABLED_ACTIONS = "dsrm_enabled_actions"; 13631 13632 /** 13633 * Whether the wifi data connection should remain active even when higher 13634 * priority networks like Ethernet are active, to keep both networks. 13635 * In the case where higher priority networks are connected, wifi will be 13636 * unused unless an application explicitly requests to use it. 13637 * 13638 * See ConnectivityService for more info. 13639 * 13640 * (0 = disabled, 1 = enabled) 13641 * @hide 13642 */ 13643 @Readable 13644 public static final String WIFI_ALWAYS_REQUESTED = "wifi_always_requested"; 13645 13646 /** 13647 * Size of the event buffer for IP connectivity metrics. 13648 * @hide 13649 */ 13650 @Readable 13651 public static final String CONNECTIVITY_METRICS_BUFFER_SIZE = 13652 "connectivity_metrics_buffer_size"; 13653 13654 /** {@hide} */ 13655 @Readable 13656 public static final String NETSTATS_ENABLED = "netstats_enabled"; 13657 /** {@hide} */ 13658 @Readable 13659 public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval"; 13660 /** 13661 * @deprecated 13662 * {@hide} 13663 */ 13664 @Deprecated 13665 @Readable 13666 public static final String NETSTATS_TIME_CACHE_MAX_AGE = "netstats_time_cache_max_age"; 13667 /** {@hide} */ 13668 @Readable 13669 public static final String NETSTATS_GLOBAL_ALERT_BYTES = "netstats_global_alert_bytes"; 13670 /** {@hide} */ 13671 @Readable 13672 public static final String NETSTATS_SAMPLE_ENABLED = "netstats_sample_enabled"; 13673 /** {@hide} */ 13674 @Readable 13675 public static final String NETSTATS_AUGMENT_ENABLED = "netstats_augment_enabled"; 13676 /** {@hide} */ 13677 @Readable 13678 public static final String NETSTATS_COMBINE_SUBTYPE_ENABLED = 13679 "netstats_combine_subtype_enabled"; 13680 13681 /** {@hide} */ 13682 @Readable 13683 public static final String NETSTATS_DEV_BUCKET_DURATION = "netstats_dev_bucket_duration"; 13684 /** {@hide} */ 13685 @Readable 13686 public static final String NETSTATS_DEV_PERSIST_BYTES = "netstats_dev_persist_bytes"; 13687 /** {@hide} */ 13688 @Readable 13689 public static final String NETSTATS_DEV_ROTATE_AGE = "netstats_dev_rotate_age"; 13690 /** {@hide} */ 13691 @Readable 13692 public static final String NETSTATS_DEV_DELETE_AGE = "netstats_dev_delete_age"; 13693 13694 /** {@hide} */ 13695 @Readable 13696 public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration"; 13697 /** {@hide} */ 13698 @Readable 13699 public static final String NETSTATS_UID_PERSIST_BYTES = "netstats_uid_persist_bytes"; 13700 /** {@hide} */ 13701 @Readable 13702 public static final String NETSTATS_UID_ROTATE_AGE = "netstats_uid_rotate_age"; 13703 /** {@hide} */ 13704 @Readable 13705 public static final String NETSTATS_UID_DELETE_AGE = "netstats_uid_delete_age"; 13706 13707 /** {@hide} */ 13708 @Readable 13709 public static final String NETSTATS_UID_TAG_BUCKET_DURATION = 13710 "netstats_uid_tag_bucket_duration"; 13711 /** {@hide} */ 13712 @Readable 13713 public static final String NETSTATS_UID_TAG_PERSIST_BYTES = 13714 "netstats_uid_tag_persist_bytes"; 13715 /** {@hide} */ 13716 @Readable 13717 public static final String NETSTATS_UID_TAG_ROTATE_AGE = "netstats_uid_tag_rotate_age"; 13718 /** {@hide} */ 13719 @Readable 13720 public static final String NETSTATS_UID_TAG_DELETE_AGE = "netstats_uid_tag_delete_age"; 13721 13722 /** {@hide} */ 13723 @Readable 13724 public static final String NETPOLICY_QUOTA_ENABLED = "netpolicy_quota_enabled"; 13725 /** {@hide} */ 13726 @Readable 13727 public static final String NETPOLICY_QUOTA_UNLIMITED = "netpolicy_quota_unlimited"; 13728 /** {@hide} */ 13729 @Readable 13730 public static final String NETPOLICY_QUOTA_LIMITED = "netpolicy_quota_limited"; 13731 /** {@hide} */ 13732 @Readable 13733 public static final String NETPOLICY_QUOTA_FRAC_JOBS = "netpolicy_quota_frac_jobs"; 13734 /** {@hide} */ 13735 @Readable 13736 public static final String NETPOLICY_QUOTA_FRAC_MULTIPATH = 13737 "netpolicy_quota_frac_multipath"; 13738 13739 /** {@hide} */ 13740 @Readable 13741 public static final String NETPOLICY_OVERRIDE_ENABLED = "netpolicy_override_enabled"; 13742 13743 /** 13744 * User preference for which network(s) should be used. Only the 13745 * connectivity service should touch this. 13746 */ 13747 @Readable 13748 public static final String NETWORK_PREFERENCE = "network_preference"; 13749 13750 /** 13751 * Which package name to use for network scoring. If null, or if the package is not a valid 13752 * scorer app, external network scores will neither be requested nor accepted. 13753 * @hide 13754 */ 13755 @Readable 13756 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 13757 public static final String NETWORK_SCORER_APP = "network_scorer_app"; 13758 13759 /** 13760 * Whether night display forced auto mode is available. 13761 * 0 = unavailable, 1 = available. 13762 * @hide 13763 */ 13764 @Readable 13765 public static final String NIGHT_DISPLAY_FORCED_AUTO_MODE_AVAILABLE = 13766 "night_display_forced_auto_mode_available"; 13767 13768 /** 13769 * If Unix epoch time between two NITZ signals is greater than this value then the second 13770 * signal cannot be ignored. 13771 * 13772 * <p>This value is in milliseconds. It is used for telephony-based time and time zone 13773 * detection. 13774 * @hide 13775 */ 13776 @Readable 13777 public static final String NITZ_UPDATE_DIFF = "nitz_update_diff"; 13778 13779 /** 13780 * If the elapsed realtime between two NITZ signals is greater than this value then the 13781 * second signal cannot be ignored. 13782 * 13783 * <p>This value is in milliseconds. It is used for telephony-based time and time zone 13784 * detection. 13785 * @hide 13786 */ 13787 @Readable 13788 public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing"; 13789 13790 /** 13791 * If the device connects to a telephony network and was disconnected from a telephony 13792 * network for less than this time, a previously received NITZ signal can be restored. 13793 * 13794 * <p>This value is in milliseconds. It is used for telephony-based time and time zone 13795 * detection. 13796 * @hide 13797 */ 13798 public static final String NITZ_NETWORK_DISCONNECT_RETENTION = 13799 "nitz_network_disconnect_retention"; 13800 13801 /** 13802 * SNTP client config: The preferred NTP server. This setting overrides the static 13803 * config.xml configuration when present and valid. 13804 * 13805 * <p>The legacy form is the NTP server name as a string. 13806 * <p>Newer code should use the form: ntp://{server name}[:port] (the standard NTP port, 13807 * 123, is used if not specified). 13808 * 13809 * <p>The settings value can consist of a pipe ("|") delimited list of server names or 13810 * ntp:// URIs. When present, all server name / ntp:// URIs must be valid or the entire 13811 * setting value will be ignored and Android's xml config will be used. 13812 * 13813 * <p>For example, the following examples are valid: 13814 * <ul> 13815 * <li>"time.android.com"</li> 13816 * <li>"ntp://time.android.com"</li> 13817 * <li>"ntp://time.android.com:123"</li> 13818 * <li>"time.android.com|time.other"</li> 13819 * <li>"ntp://time.android.com:123|ntp://time.other:123"</li> 13820 * <li>"time.android.com|ntp://time.other:123"</li> 13821 * </ul> 13822 * 13823 * @hide 13824 */ 13825 @Readable 13826 public static final String NTP_SERVER = "ntp_server"; 13827 13828 /** 13829 * SNTP client config: Timeout to wait for an NTP server response. This setting overrides 13830 * the static config.xml configuration when present and valid. 13831 * 13832 * <p>The value is the timeout in milliseconds. It must be > 0. 13833 * 13834 * @hide 13835 */ 13836 @Readable 13837 public static final String NTP_TIMEOUT = "ntp_timeout"; 13838 13839 /** {@hide} */ 13840 @Readable 13841 public static final String STORAGE_BENCHMARK_INTERVAL = "storage_benchmark_interval"; 13842 13843 /** 13844 * Whether or not Settings should enable psd API. 13845 * {@hide} 13846 */ 13847 @Readable 13848 public static final String SETTINGS_USE_PSD_API = "settings_use_psd_api"; 13849 13850 /** 13851 * Whether or not Settings should enable external provider API. 13852 * {@hide} 13853 */ 13854 @Readable 13855 public static final String SETTINGS_USE_EXTERNAL_PROVIDER_API = 13856 "settings_use_external_provider_api"; 13857 13858 /** 13859 * Sample validity in seconds to configure for the system DNS resolver. 13860 * {@hide} 13861 */ 13862 @Readable 13863 public static final String DNS_RESOLVER_SAMPLE_VALIDITY_SECONDS = 13864 "dns_resolver_sample_validity_seconds"; 13865 13866 /** 13867 * Success threshold in percent for use with the system DNS resolver. 13868 * {@hide} 13869 */ 13870 @Readable 13871 public static final String DNS_RESOLVER_SUCCESS_THRESHOLD_PERCENT = 13872 "dns_resolver_success_threshold_percent"; 13873 13874 /** 13875 * Minimum number of samples needed for statistics to be considered meaningful in the 13876 * system DNS resolver. 13877 * {@hide} 13878 */ 13879 @Readable 13880 public static final String DNS_RESOLVER_MIN_SAMPLES = "dns_resolver_min_samples"; 13881 13882 /** 13883 * Maximum number taken into account for statistics purposes in the system DNS resolver. 13884 * {@hide} 13885 */ 13886 @Readable 13887 public static final String DNS_RESOLVER_MAX_SAMPLES = "dns_resolver_max_samples"; 13888 13889 /** 13890 * Whether to disable the automatic scheduling of system updates. 13891 * 1 = system updates won't be automatically scheduled (will always 13892 * present notification instead). 13893 * 0 = system updates will be automatically scheduled. (default) 13894 * @hide 13895 */ 13896 @SystemApi 13897 @Readable 13898 public static final String OTA_DISABLE_AUTOMATIC_UPDATE = "ota_disable_automatic_update"; 13899 13900 13901 /** 13902 * Whether to boot with 16K page size compatible kernel 13903 * 1 = Boot with 16K kernel 13904 * 0 = Boot with 4K kernel (default) 13905 * @hide 13906 */ 13907 @Readable 13908 public static final String ENABLE_16K_PAGES = "enable_16k_pages"; 13909 13910 /** Timeout for package verification. 13911 * @hide */ 13912 @Readable 13913 public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout"; 13914 13915 /** Timeout for package verification during streaming installations. 13916 * @hide */ 13917 @Readable 13918 public static final String PACKAGE_STREAMING_VERIFIER_TIMEOUT = 13919 "streaming_verifier_timeout"; 13920 13921 /** Timeout for app integrity verification. 13922 * @hide */ 13923 @Readable 13924 public static final String APP_INTEGRITY_VERIFICATION_TIMEOUT = 13925 "app_integrity_verification_timeout"; 13926 13927 /** Default response code for package verification. 13928 * @hide */ 13929 @Readable 13930 public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response"; 13931 13932 /** 13933 * Show package verification setting in the Settings app. 13934 * 1 = show (default) 13935 * 0 = hide 13936 * @hide 13937 */ 13938 @Readable 13939 public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible"; 13940 13941 /** 13942 * Run package verification on apps installed through ADB/ADT/USB 13943 * 1 = perform package verification on ADB installs (default) 13944 * 0 = bypass package verification on ADB installs 13945 * @hide 13946 */ 13947 @Readable 13948 public static final String PACKAGE_VERIFIER_INCLUDE_ADB = "verifier_verify_adb_installs"; 13949 13950 /** 13951 * Run integrity checks for integrity rule providers. 13952 * 0 = bypass integrity verification on installs from rule providers (default) 13953 * 1 = perform integrity verification on installs from rule providers 13954 * @hide 13955 */ 13956 @Readable 13957 public static final String INTEGRITY_CHECK_INCLUDES_RULE_PROVIDER = 13958 "verify_integrity_for_rule_provider"; 13959 13960 /** 13961 * Time since last fstrim (milliseconds) after which we force one to happen 13962 * during device startup. If unset, the default is 3 days. 13963 * @hide 13964 */ 13965 @Readable 13966 public static final String FSTRIM_MANDATORY_INTERVAL = "fstrim_mandatory_interval"; 13967 13968 /** 13969 * The interval in milliseconds at which to check packet counts on the 13970 * mobile data interface when screen is on, to detect possible data 13971 * connection problems. 13972 * @hide 13973 */ 13974 @Readable 13975 public static final String PDP_WATCHDOG_POLL_INTERVAL_MS = 13976 "pdp_watchdog_poll_interval_ms"; 13977 13978 /** 13979 * The interval in milliseconds at which to check packet counts on the 13980 * mobile data interface when screen is off, to detect possible data 13981 * connection problems. 13982 * @hide 13983 */ 13984 @Readable 13985 public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS = 13986 "pdp_watchdog_long_poll_interval_ms"; 13987 13988 /** 13989 * The interval in milliseconds at which to check packet counts on the 13990 * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} 13991 * outgoing packets has been reached without incoming packets. 13992 * @hide 13993 */ 13994 @Readable 13995 public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS = 13996 "pdp_watchdog_error_poll_interval_ms"; 13997 13998 /** 13999 * The number of outgoing packets sent without seeing an incoming packet 14000 * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT} 14001 * device is logged to the event log 14002 * @hide 14003 */ 14004 @Readable 14005 public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT = 14006 "pdp_watchdog_trigger_packet_count"; 14007 14008 /** 14009 * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS}) 14010 * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before 14011 * attempting data connection recovery. 14012 * @hide 14013 */ 14014 @Readable 14015 public static final String PDP_WATCHDOG_ERROR_POLL_COUNT = 14016 "pdp_watchdog_error_poll_count"; 14017 14018 /** 14019 * The number of failed PDP reset attempts before moving to something more 14020 * drastic: re-registering to the network. 14021 * @hide 14022 */ 14023 @Readable 14024 public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT = 14025 "pdp_watchdog_max_pdp_reset_fail_count"; 14026 14027 /** 14028 * URL to open browser on to allow user to manage a prepay account 14029 * @hide 14030 */ 14031 @Readable 14032 public static final String SETUP_PREPAID_DATA_SERVICE_URL = 14033 "setup_prepaid_data_service_url"; 14034 14035 /** 14036 * URL to attempt a GET on to see if this is a prepay device 14037 * @hide 14038 */ 14039 @Readable 14040 public static final String SETUP_PREPAID_DETECTION_TARGET_URL = 14041 "setup_prepaid_detection_target_url"; 14042 14043 /** 14044 * Host to check for a redirect to after an attempt to GET 14045 * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there, 14046 * this is a prepaid device with zero balance.) 14047 * @hide 14048 */ 14049 @Readable 14050 public static final String SETUP_PREPAID_DETECTION_REDIR_HOST = 14051 "setup_prepaid_detection_redir_host"; 14052 14053 /** 14054 * The interval in milliseconds at which to check the number of SMS sent out without asking 14055 * for use permit, to limit the un-authorized SMS usage. 14056 * 14057 * @hide 14058 */ 14059 @Readable 14060 public static final String SMS_OUTGOING_CHECK_INTERVAL_MS = 14061 "sms_outgoing_check_interval_ms"; 14062 14063 /** 14064 * The number of outgoing SMS sent without asking for user permit (of {@link 14065 * #SMS_OUTGOING_CHECK_INTERVAL_MS} 14066 * 14067 * @hide 14068 */ 14069 @Readable 14070 public static final String SMS_OUTGOING_CHECK_MAX_COUNT = 14071 "sms_outgoing_check_max_count"; 14072 14073 /** 14074 * Used to disable SMS short code confirmation - defaults to true. 14075 * True indcates we will do the check, etc. Set to false to disable. 14076 * @see com.android.internal.telephony.SmsUsageMonitor 14077 * @hide 14078 */ 14079 @Readable 14080 public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation"; 14081 14082 /** 14083 * Used to select which country we use to determine premium sms codes. 14084 * One of com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_SIM, 14085 * com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_NETWORK, 14086 * or com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_BOTH. 14087 * @hide 14088 */ 14089 @Readable 14090 public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule"; 14091 14092 /** 14093 * Used to select TCP's default initial receiver window size in segments - defaults to a 14094 * build config value. 14095 * @hide 14096 */ 14097 @Readable 14098 public static final String TCP_DEFAULT_INIT_RWND = "tcp_default_init_rwnd"; 14099 14100 /** 14101 * Used to disable Tethering on a device - defaults to true. 14102 * @hide 14103 */ 14104 @SystemApi 14105 @Readable 14106 public static final String TETHER_SUPPORTED = "tether_supported"; 14107 14108 /** 14109 * Used to require DUN APN on the device or not - defaults to a build config value 14110 * which defaults to false. 14111 * @hide 14112 */ 14113 @Readable 14114 public static final String TETHER_DUN_REQUIRED = "tether_dun_required"; 14115 14116 /** 14117 * Used to hold a gservices-provisioned apn value for DUN. If set, or the 14118 * corresponding build config values are set it will override the APN DB 14119 * values. 14120 * Consists of a comma separated list of strings: 14121 * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type" 14122 * note that empty fields can be omitted: "name,apn,,,,,,,,,310,260,,DUN" 14123 * @hide 14124 */ 14125 @Readable 14126 public static final String TETHER_DUN_APN = "tether_dun_apn"; 14127 14128 /** 14129 * Used to disable trying to talk to any available tethering offload HAL. 14130 * 14131 * Integer values are interpreted as boolean, and the absence of an explicit setting 14132 * is interpreted as |false|. 14133 * @hide 14134 */ 14135 @SystemApi 14136 @Readable 14137 public static final String TETHER_OFFLOAD_DISABLED = "tether_offload_disabled"; 14138 14139 /** 14140 * Use the old dnsmasq DHCP server for tethering instead of the framework implementation. 14141 * 14142 * Integer values are interpreted as boolean, and the absence of an explicit setting 14143 * is interpreted as |false|. 14144 * @hide 14145 */ 14146 @Readable 14147 public static final String TETHER_ENABLE_LEGACY_DHCP_SERVER = 14148 "tether_enable_legacy_dhcp_server"; 14149 14150 /** 14151 * List of certificate (hex string representation of the application's certificate - SHA-1 14152 * or SHA-256) and carrier app package pairs which are allowlisted to prompt the user for 14153 * install when a sim card with matching UICC carrier privilege rules is inserted. The 14154 * certificate is used as a key, so the certificate encoding here must be the same as the 14155 * certificate encoding used on the SIM. 14156 * 14157 * The value is "cert1:package1;cert2:package2;..." 14158 * @hide 14159 */ 14160 @SystemApi 14161 @Readable 14162 public static final String CARRIER_APP_WHITELIST = "carrier_app_whitelist"; 14163 14164 /** 14165 * Map of package name to application names. The application names cannot and will not be 14166 * localized. App names may not contain colons or semicolons. 14167 * 14168 * The value is "packageName1:appName1;packageName2:appName2;..." 14169 * @hide 14170 */ 14171 @SystemApi 14172 @Readable 14173 public static final String CARRIER_APP_NAMES = "carrier_app_names"; 14174 14175 /** 14176 * USB Mass Storage Enabled 14177 */ 14178 @Readable 14179 public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled"; 14180 14181 /** 14182 * If this setting is set (to anything), then all references 14183 * to Gmail on the device must change to Google Mail. 14184 */ 14185 @Readable 14186 public static final String USE_GOOGLE_MAIL = "use_google_mail"; 14187 14188 /** 14189 * Whether or not switching/creating users is enabled by user. 14190 * @hide 14191 */ 14192 @Readable 14193 public static final String USER_SWITCHER_ENABLED = "user_switcher_enabled"; 14194 14195 /** 14196 * Webview Data reduction proxy key. 14197 * @hide 14198 */ 14199 @Readable 14200 public static final String WEBVIEW_DATA_REDUCTION_PROXY_KEY = 14201 "webview_data_reduction_proxy_key"; 14202 14203 /** 14204 * Name of the package used as WebView provider (if unset the provider is instead determined 14205 * by the system). 14206 * @hide 14207 */ 14208 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 14209 @Readable 14210 public static final String WEBVIEW_PROVIDER = "webview_provider"; 14211 14212 /** 14213 * Developer setting to enable WebView multiprocess rendering. 14214 * @hide 14215 */ 14216 @SystemApi 14217 @Readable 14218 public static final String WEBVIEW_MULTIPROCESS = "webview_multiprocess"; 14219 14220 /** 14221 * The maximum number of notifications shown in 24 hours when switching networks. 14222 * @hide 14223 */ 14224 @Readable 14225 public static final String NETWORK_SWITCH_NOTIFICATION_DAILY_LIMIT = 14226 "network_switch_notification_daily_limit"; 14227 14228 /** 14229 * The minimum time in milliseconds between notifications when switching networks. 14230 * @hide 14231 */ 14232 @Readable 14233 public static final String NETWORK_SWITCH_NOTIFICATION_RATE_LIMIT_MILLIS = 14234 "network_switch_notification_rate_limit_millis"; 14235 14236 /** 14237 * Whether to automatically switch away from wifi networks that lose Internet access. 14238 * Only meaningful if config_networkAvoidBadWifi is set to 0, otherwise the system always 14239 * avoids such networks. Valid values are: 14240 * 14241 * 0: Don't avoid bad wifi, don't prompt the user. Get stuck on bad wifi like it's 2013. 14242 * null: Ask the user whether to switch away from bad wifi. 14243 * 1: Avoid bad wifi. 14244 * 14245 * @hide 14246 */ 14247 @Readable 14248 public static final String NETWORK_AVOID_BAD_WIFI = "network_avoid_bad_wifi"; 14249 14250 /** 14251 * User setting for ConnectivityManager.getMeteredMultipathPreference(). This value may be 14252 * overridden by the system based on device or application state. If null, the value 14253 * specified by config_networkMeteredMultipathPreference is used. 14254 * 14255 * @hide 14256 */ 14257 @Readable 14258 public static final String NETWORK_METERED_MULTIPATH_PREFERENCE = 14259 "network_metered_multipath_preference"; 14260 14261 /** 14262 * Default daily multipath budget used by ConnectivityManager.getMultipathPreference() 14263 * on metered networks. This default quota is only used if quota could not be determined 14264 * from data plan or data limit/warning set by the user. 14265 * @hide 14266 */ 14267 @Readable 14268 public static final String NETWORK_DEFAULT_DAILY_MULTIPATH_QUOTA_BYTES = 14269 "network_default_daily_multipath_quota_bytes"; 14270 14271 /** 14272 * Network watchlist last report time. 14273 * @hide 14274 */ 14275 @Readable 14276 public static final String NETWORK_WATCHLIST_LAST_REPORT_TIME = 14277 "network_watchlist_last_report_time"; 14278 14279 /** 14280 * The thresholds of the wifi throughput badging (SD, HD etc.) as a comma-delimited list of 14281 * colon-delimited key-value pairs. The key is the badging enum value defined in 14282 * android.net.ScoredNetwork and the value is the minimum sustained network throughput in 14283 * kbps required for the badge. For example: "10:3000,20:5000,30:25000" 14284 * 14285 * @hide 14286 */ 14287 @SystemApi 14288 @Readable 14289 public static final String WIFI_BADGING_THRESHOLDS = "wifi_badging_thresholds"; 14290 14291 /** 14292 * Whether Wifi display is enabled/disabled 14293 * 0=disabled. 1=enabled. 14294 * @hide 14295 */ 14296 @Readable 14297 public static final String WIFI_DISPLAY_ON = "wifi_display_on"; 14298 14299 /** 14300 * Whether Wifi display certification mode is enabled/disabled 14301 * 0=disabled. 1=enabled. 14302 * @hide 14303 */ 14304 @Readable 14305 public static final String WIFI_DISPLAY_CERTIFICATION_ON = 14306 "wifi_display_certification_on"; 14307 14308 /** 14309 * WPS Configuration method used by Wifi display, this setting only 14310 * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled). 14311 * 14312 * Possible values are: 14313 * 14314 * WpsInfo.INVALID: use default WPS method chosen by framework 14315 * WpsInfo.PBC : use Push button 14316 * WpsInfo.KEYPAD : use Keypad 14317 * WpsInfo.DISPLAY: use Display 14318 * @hide 14319 */ 14320 @Readable 14321 public static final String WIFI_DISPLAY_WPS_CONFIG = 14322 "wifi_display_wps_config"; 14323 14324 /** 14325 * Whether to notify the user of open networks. 14326 * <p> 14327 * If not connected and the scan results have an open network, we will 14328 * put this notification up. If we attempt to connect to a network or 14329 * the open network(s) disappear, we remove the notification. When we 14330 * show the notification, we will not show it again for 14331 * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time. 14332 * 14333 * @deprecated This feature is no longer controlled by this setting in 14334 * {@link android.os.Build.VERSION_CODES#O}. 14335 */ 14336 @Deprecated 14337 @Readable 14338 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = 14339 "wifi_networks_available_notification_on"; 14340 14341 /** 14342 * {@hide} 14343 */ 14344 @Readable 14345 public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON = 14346 "wimax_networks_available_notification_on"; 14347 14348 /** 14349 * Delay (in seconds) before repeating the Wi-Fi networks available notification. 14350 * Connecting to a network will reset the timer. 14351 * @deprecated This is no longer used or set by the platform. 14352 */ 14353 @Deprecated 14354 @Readable 14355 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = 14356 "wifi_networks_available_repeat_delay"; 14357 14358 /** 14359 * 802.11 country code in ISO 3166 format 14360 * @hide 14361 */ 14362 @Readable 14363 public static final String WIFI_COUNTRY_CODE = "wifi_country_code"; 14364 14365 /** 14366 * The interval in milliseconds to issue wake up scans when wifi needs 14367 * to connect. This is necessary to connect to an access point when 14368 * device is on the move and the screen is off. 14369 * @hide 14370 */ 14371 @Readable 14372 public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS = 14373 "wifi_framework_scan_interval_ms"; 14374 14375 /** 14376 * The interval in milliseconds after which Wi-Fi is considered idle. 14377 * When idle, it is possible for the device to be switched from Wi-Fi to 14378 * the mobile data network. 14379 * @hide 14380 */ 14381 @Readable 14382 public static final String WIFI_IDLE_MS = "wifi_idle_ms"; 14383 14384 /** 14385 * When the number of open networks exceeds this number, the 14386 * least-recently-used excess networks will be removed. 14387 * @deprecated This is no longer used or set by the platform. 14388 */ 14389 @Deprecated 14390 @Readable 14391 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept"; 14392 14393 /** 14394 * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this. 14395 */ 14396 @Readable 14397 public static final String WIFI_ON = "wifi_on"; 14398 14399 /** 14400 * Setting to allow scans to be enabled even wifi is turned off for connectivity. 14401 * @hide 14402 * @deprecated To be removed. Use {@link WifiManager#setScanAlwaysAvailable(boolean)} for 14403 * setting the value and {@link WifiManager#isScanAlwaysAvailable()} for query. 14404 */ 14405 @Deprecated 14406 @Readable 14407 public static final String WIFI_SCAN_ALWAYS_AVAILABLE = 14408 "wifi_scan_always_enabled"; 14409 14410 /** 14411 * Indicate whether factory reset request is pending. 14412 * 14413 * Type: int (0 for false, 1 for true) 14414 * @hide 14415 * @deprecated To be removed. 14416 */ 14417 @Deprecated 14418 @Readable 14419 public static final String WIFI_P2P_PENDING_FACTORY_RESET = 14420 "wifi_p2p_pending_factory_reset"; 14421 14422 /** 14423 * Whether soft AP will shut down after a timeout period when no devices are connected. 14424 * 14425 * Type: int (0 for false, 1 for true) 14426 * @hide 14427 * @deprecated To be removed. Use {@link SoftApConfiguration.Builder# 14428 * setAutoShutdownEnabled(boolean)} for setting the value and {@link SoftApConfiguration# 14429 * isAutoShutdownEnabled()} for query. 14430 */ 14431 @Deprecated 14432 @Readable 14433 public static final String SOFT_AP_TIMEOUT_ENABLED = "soft_ap_timeout_enabled"; 14434 14435 /** 14436 * Value to specify if Wi-Fi Wakeup feature is enabled. 14437 * 14438 * Type: int (0 for false, 1 for true) 14439 * @hide 14440 * @deprecated Use {@link WifiManager#setAutoWakeupEnabled(boolean)} for setting the value 14441 * and {@link WifiManager#isAutoWakeupEnabled()} for query. 14442 */ 14443 @Deprecated 14444 @SystemApi 14445 @Readable 14446 public static final String WIFI_WAKEUP_ENABLED = "wifi_wakeup_enabled"; 14447 14448 /** 14449 * Value to specify if wifi settings migration is complete or not. 14450 * Note: This should only be used from within {@link android.net.wifi.WifiMigration} class. 14451 * 14452 * Type: int (0 for false, 1 for true) 14453 * @hide 14454 */ 14455 @Readable 14456 public static final String WIFI_MIGRATION_COMPLETED = "wifi_migration_completed"; 14457 14458 /** 14459 * Whether UWB should be enabled. 14460 * @hide 14461 */ 14462 public static final String UWB_ENABLED = "uwb_enabled"; 14463 14464 /** 14465 * Value to specify whether network quality scores and badging should be shown in the UI. 14466 * 14467 * Type: int (0 for false, 1 for true) 14468 * @deprecated {@link NetworkScoreManager} is deprecated. 14469 * @hide 14470 */ 14471 @Deprecated 14472 @Readable 14473 public static final String NETWORK_SCORING_UI_ENABLED = "network_scoring_ui_enabled"; 14474 14475 /** 14476 * Value to specify how long in milliseconds to retain seen score cache curves to be used 14477 * when generating SSID only bases score curves. 14478 * 14479 * Type: long 14480 * @deprecated {@link NetworkScoreManager} is deprecated. 14481 * @hide 14482 */ 14483 @Deprecated 14484 @Readable 14485 public static final String SPEED_LABEL_CACHE_EVICTION_AGE_MILLIS = 14486 "speed_label_cache_eviction_age_millis"; 14487 14488 /** 14489 * Value to specify if network recommendations from 14490 * {@link com.android.server.NetworkScoreService} are enabled. 14491 * 14492 * Type: int 14493 * Valid values: 14494 * -1 = Forced off 14495 * 0 = Disabled 14496 * 1 = Enabled 14497 * 14498 * Most readers of this setting should simply check if value == 1 to determine the 14499 * enabled state. 14500 * @hide 14501 * @deprecated To be removed. 14502 */ 14503 @Deprecated 14504 @Readable 14505 public static final String NETWORK_RECOMMENDATIONS_ENABLED = 14506 "network_recommendations_enabled"; 14507 14508 /** 14509 * Which package name to use for network recommendations. If null, network recommendations 14510 * will neither be requested nor accepted. 14511 * 14512 * Use {@link NetworkScoreManager#getActiveScorerPackage()} to read this value and 14513 * {@link NetworkScoreManager#setActiveScorer(String)} to write it. 14514 * 14515 * Type: string - package name 14516 * @deprecated {@link NetworkScoreManager} is deprecated. 14517 * @hide 14518 */ 14519 @Deprecated 14520 @Readable 14521 public static final String NETWORK_RECOMMENDATIONS_PACKAGE = 14522 "network_recommendations_package"; 14523 14524 /** 14525 * The package name of the application that connect and secures high quality open wifi 14526 * networks automatically. 14527 * 14528 * Type: string package name or null if the feature is either not provided or disabled. 14529 * @deprecated {@link NetworkScoreManager} is deprecated. 14530 * @hide 14531 */ 14532 @Deprecated 14533 @TestApi 14534 @Readable 14535 public static final String USE_OPEN_WIFI_PACKAGE = "use_open_wifi_package"; 14536 14537 /** 14538 * The expiration time in milliseconds for the {@link android.net.WifiKey} request cache in 14539 * {@link com.android.server.wifi.RecommendedNetworkEvaluator}. 14540 * 14541 * Type: long 14542 * @deprecated {@link NetworkScoreManager} is deprecated. 14543 * @hide 14544 */ 14545 @Deprecated 14546 @Readable 14547 public static final String RECOMMENDED_NETWORK_EVALUATOR_CACHE_EXPIRY_MS = 14548 "recommended_network_evaluator_cache_expiry_ms"; 14549 14550 /** 14551 * Whether wifi scan throttle is enabled or not. 14552 * 14553 * Type: int (0 for false, 1 for true) 14554 * @hide 14555 * @deprecated Use {@link WifiManager#setScanThrottleEnabled(boolean)} for setting the value 14556 * and {@link WifiManager#isScanThrottleEnabled()} for query. 14557 */ 14558 @Deprecated 14559 @Readable 14560 public static final String WIFI_SCAN_THROTTLE_ENABLED = "wifi_scan_throttle_enabled"; 14561 14562 /** 14563 * Settings to allow BLE scans to be enabled even when Bluetooth is turned off for 14564 * connectivity. 14565 * @hide 14566 */ 14567 @Readable 14568 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 14569 @SuppressLint("NoSettingsProvider") 14570 public static final String BLE_SCAN_ALWAYS_AVAILABLE = "ble_scan_always_enabled"; 14571 14572 /** 14573 * The length in milliseconds of a BLE scan window in a low-power scan mode. 14574 * @hide 14575 */ 14576 @Readable 14577 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 14578 @SuppressLint("NoSettingsProvider") 14579 public static final String BLE_SCAN_LOW_POWER_WINDOW_MS = "ble_scan_low_power_window_ms"; 14580 14581 /** 14582 * The length in milliseconds of a BLE scan window in a balanced scan mode. 14583 * @hide 14584 */ 14585 @Readable 14586 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 14587 @SuppressLint("NoSettingsProvider") 14588 public static final String BLE_SCAN_BALANCED_WINDOW_MS = "ble_scan_balanced_window_ms"; 14589 14590 /** 14591 * The length in milliseconds of a BLE scan window in a low-latency scan mode. 14592 * @hide 14593 */ 14594 @Readable 14595 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 14596 @SuppressLint("NoSettingsProvider") 14597 public static final String BLE_SCAN_LOW_LATENCY_WINDOW_MS = 14598 "ble_scan_low_latency_window_ms"; 14599 14600 /** 14601 * The length in milliseconds of a BLE scan interval in a low-power scan mode. 14602 * @hide 14603 */ 14604 @Readable 14605 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 14606 @SuppressLint("NoSettingsProvider") 14607 public static final String BLE_SCAN_LOW_POWER_INTERVAL_MS = 14608 "ble_scan_low_power_interval_ms"; 14609 14610 /** 14611 * The length in milliseconds of a BLE scan interval in a balanced scan mode. 14612 * @hide 14613 */ 14614 @Readable 14615 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 14616 @SuppressLint("NoSettingsProvider") 14617 public static final String BLE_SCAN_BALANCED_INTERVAL_MS = 14618 "ble_scan_balanced_interval_ms"; 14619 14620 /** 14621 * The length in milliseconds of a BLE scan interval in a low-latency scan mode. 14622 * @hide 14623 */ 14624 @Readable 14625 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 14626 @SuppressLint("NoSettingsProvider") 14627 public static final String BLE_SCAN_LOW_LATENCY_INTERVAL_MS = 14628 "ble_scan_low_latency_interval_ms"; 14629 14630 /** 14631 * The mode that BLE scanning clients will be moved to when in the background. 14632 * @hide 14633 */ 14634 @Readable 14635 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 14636 @SuppressLint("NoSettingsProvider") 14637 public static final String BLE_SCAN_BACKGROUND_MODE = "ble_scan_background_mode"; 14638 14639 /** 14640 * The interval in milliseconds to scan as used by the wifi supplicant 14641 * @hide 14642 */ 14643 @Readable 14644 public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS = 14645 "wifi_supplicant_scan_interval_ms"; 14646 14647 /** 14648 * whether frameworks handles wifi auto-join 14649 * @hide 14650 */ 14651 @Readable 14652 public static final String WIFI_ENHANCED_AUTO_JOIN = 14653 "wifi_enhanced_auto_join"; 14654 14655 /** 14656 * whether settings show RSSI 14657 * @hide 14658 */ 14659 @Readable 14660 public static final String WIFI_NETWORK_SHOW_RSSI = 14661 "wifi_network_show_rssi"; 14662 14663 /** 14664 * The interval in milliseconds to scan at supplicant when p2p is connected 14665 * @hide 14666 */ 14667 @Readable 14668 public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS = 14669 "wifi_scan_interval_p2p_connected_ms"; 14670 14671 /** 14672 * Whether the Wi-Fi watchdog is enabled. 14673 */ 14674 @Readable 14675 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; 14676 14677 /** 14678 * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and 14679 * the setting needs to be set to 0 to disable it. 14680 * @hide 14681 */ 14682 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 14683 @Readable 14684 public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED = 14685 "wifi_watchdog_poor_network_test_enabled"; 14686 14687 /** 14688 * Setting to enable verbose logging in Wi-Fi; disabled by default, and setting to 1 14689 * will enable it. In the future, additional values may be supported. 14690 * @hide 14691 * @deprecated Use {@link WifiManager#setVerboseLoggingEnabled(boolean)} for setting the 14692 * value and {@link WifiManager#isVerboseLoggingEnabled()} for query. 14693 */ 14694 @Deprecated 14695 @Readable 14696 public static final String WIFI_VERBOSE_LOGGING_ENABLED = 14697 "wifi_verbose_logging_enabled"; 14698 14699 /** 14700 * Setting to enable connected MAC randomization in Wi-Fi; disabled by default, and 14701 * setting to 1 will enable it. In the future, additional values may be supported. 14702 * @deprecated MAC randomization is now a per-network setting 14703 * @hide 14704 */ 14705 @Deprecated 14706 @Readable 14707 public static final String WIFI_CONNECTED_MAC_RANDOMIZATION_ENABLED = 14708 "wifi_connected_mac_randomization_enabled"; 14709 14710 /** 14711 * Parameters to adjust the performance of framework wifi scoring methods. 14712 * <p> 14713 * Encoded as a comma-separated key=value list, for example: 14714 * "rssi5=-80:-77:-70:-57,rssi2=-83:-80:-73:-60,horizon=15" 14715 * This is intended for experimenting with new parameter values, 14716 * and is normally unset or empty. The example does not include all 14717 * parameters that may be honored. 14718 * Default values are provided by code or device configurations. 14719 * Errors in the parameters will cause the entire setting to be ignored. 14720 * @hide 14721 * @deprecated This is no longer used or set by the platform. 14722 */ 14723 @Deprecated 14724 @Readable 14725 public static final String WIFI_SCORE_PARAMS = 14726 "wifi_score_params"; 14727 14728 /** 14729 * The maximum number of times we will retry a connection to an access 14730 * point for which we have failed in acquiring an IP address from DHCP. 14731 * A value of N means that we will make N+1 connection attempts in all. 14732 */ 14733 @Readable 14734 public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; 14735 14736 /** 14737 * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile 14738 * data connectivity to be established after a disconnect from Wi-Fi. 14739 */ 14740 @Readable 14741 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = 14742 "wifi_mobile_data_transition_wakelock_timeout_ms"; 14743 14744 /** 14745 * This setting controls whether WiFi configurations created by a Device Owner app 14746 * should be locked down (that is, be editable or removable only by the Device Owner App, 14747 * not even by Settings app). 14748 * This setting takes integer values. Non-zero values mean DO created configurations 14749 * are locked down. Value of zero means they are not. Default value in the absence of 14750 * actual value to this setting is 0. 14751 */ 14752 @Readable 14753 public static final String WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN = 14754 "wifi_device_owner_configs_lockdown"; 14755 14756 /** 14757 * The operational wifi frequency band 14758 * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO}, 14759 * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or 14760 * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ} 14761 * 14762 * @hide 14763 */ 14764 @Readable 14765 public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band"; 14766 14767 /** 14768 * The Wi-Fi peer-to-peer device name 14769 * @hide 14770 * @deprecated Use {@link WifiP2pManager#setDeviceName(WifiP2pManager.Channel, String, 14771 * WifiP2pManager.ActionListener)} for setting the value and 14772 * {@link android.net.wifi.p2p.WifiP2pDevice#deviceName} for query. 14773 */ 14774 @Deprecated 14775 @Readable 14776 public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name"; 14777 14778 /** 14779 * Timeout for ephemeral networks when all known BSSIDs go out of range. We will disconnect 14780 * from an ephemeral network if there is no BSSID for that network with a non-null score that 14781 * has been seen in this time period. 14782 * 14783 * If this is less than or equal to zero, we use a more conservative behavior and only check 14784 * for a non-null score from the currently connected or target BSSID. 14785 * @hide 14786 */ 14787 @Readable 14788 public static final String WIFI_EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS = 14789 "wifi_ephemeral_out_of_range_timeout_ms"; 14790 14791 /** 14792 * The number of milliseconds to delay when checking for data stalls during 14793 * non-aggressive detection. (screen is turned off.) 14794 * @hide 14795 */ 14796 @Readable 14797 public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS = 14798 "data_stall_alarm_non_aggressive_delay_in_ms"; 14799 14800 /** 14801 * The number of milliseconds to delay when checking for data stalls during 14802 * aggressive detection. (screen on or suspected data stall) 14803 * @hide 14804 */ 14805 @Readable 14806 public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS = 14807 "data_stall_alarm_aggressive_delay_in_ms"; 14808 14809 /** 14810 * The number of milliseconds to allow the provisioning apn to remain active 14811 * @hide 14812 */ 14813 @Readable 14814 public static final String PROVISIONING_APN_ALARM_DELAY_IN_MS = 14815 "provisioning_apn_alarm_delay_in_ms"; 14816 14817 /** 14818 * The interval in milliseconds at which to check gprs registration 14819 * after the first registration mismatch of gprs and voice service, 14820 * to detect possible data network registration problems. 14821 * 14822 * @hide 14823 */ 14824 @Readable 14825 public static final String GPRS_REGISTER_CHECK_PERIOD_MS = 14826 "gprs_register_check_period_ms"; 14827 14828 /** 14829 * Nonzero causes Log.wtf() to crash. 14830 * @hide 14831 */ 14832 @Readable 14833 public static final String WTF_IS_FATAL = "wtf_is_fatal"; 14834 14835 /** 14836 * Ringer mode. This is used internally, changing this value will not 14837 * change the ringer mode. See AudioManager. 14838 */ 14839 @Readable 14840 public static final String MODE_RINGER = "mode_ringer"; 14841 14842 /** 14843 * Whether or not Alarm stream should always be muted with Ringer. 14844 * 14845 * @hide 14846 */ 14847 public static final String MUTE_ALARM_STREAM_WITH_RINGER_MODE = 14848 "mute_alarm_stream_with_ringer_mode"; 14849 14850 /** 14851 * The user's choice for whether or not Alarm stream should always be muted with Ringer. 14852 * 14853 * <p>Note that this is different from {@link #MUTE_ALARM_STREAM_WITH_RINGER_MODE}, which 14854 * controls the real state of whether or not the Alarm stream and Ringer association occurs. 14855 * The two Settings are not necessarily equal, if the final decision for the association 14856 * depends on factors beyond the user's preference. 14857 * 14858 * @hide 14859 */ 14860 public static final String MUTE_ALARM_STREAM_WITH_RINGER_MODE_USER_PREFERENCE = 14861 "mute_alarm_stream_with_ringer_mode_user_preference"; 14862 14863 /** 14864 * Overlay display devices setting. 14865 * The associated value is a specially formatted string that describes the 14866 * size and density of simulated secondary display devices. 14867 * <p> 14868 * Format: 14869 * <pre> 14870 * [display1];[display2];... 14871 * </pre> 14872 * with each display specified as: 14873 * <pre> 14874 * [mode1]|[mode2]|...,[flag1],[flag2],... 14875 * </pre> 14876 * with each mode specified as: 14877 * <pre> 14878 * [width]x[height]/[densityDpi] 14879 * </pre> 14880 * Supported flags: 14881 * <ul> 14882 * <li><pre>secure</pre>: creates a secure display</li> 14883 * <li><pre>own_content_only</pre>: only shows this display's own content</li> 14884 * <li><pre>should_show_system_decorations</pre>: supports system decorations</li> 14885 * </ul> 14886 * </p><p> 14887 * Example: 14888 * <ul> 14889 * <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li> 14890 * <li><code>1920x1080/320,secure;1280x720/213</code>: make two overlays, the first at 14891 * 1080p and secure; the second at 720p.</li> 14892 * <li><code>1920x1080/320|3840x2160/640</code>: make one overlay that is 1920x1080 at 14893 * 213dpi by default, but can also be upscaled to 3840x2160 at 640dpi by the system if the 14894 * display device allows.</li> 14895 * <li>If the value is empty, then no overlay display devices are created.</li> 14896 * </ul></p> 14897 * 14898 * @hide 14899 */ 14900 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 14901 @TestApi 14902 @Readable 14903 public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices"; 14904 14905 /** 14906 * Threshold values for the duration and level of a discharge cycle, 14907 * under which we log discharge cycle info. 14908 * 14909 * @hide 14910 */ 14911 @Readable 14912 public static final String 14913 BATTERY_DISCHARGE_DURATION_THRESHOLD = "battery_discharge_duration_threshold"; 14914 14915 /** @hide */ 14916 @Readable 14917 public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold"; 14918 14919 /** 14920 * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR 14921 * intents on application crashes and ANRs. If this is disabled, the 14922 * crash/ANR dialog will never display the "Report" button. 14923 * <p> 14924 * Type: int (0 = disallow, 1 = allow) 14925 * 14926 * @hide 14927 */ 14928 @Readable 14929 public static final String SEND_ACTION_APP_ERROR = "send_action_app_error"; 14930 14931 /** 14932 * Maximum age of entries kept by {@link DropBoxManager}. 14933 * 14934 * @hide 14935 */ 14936 @Readable 14937 public static final String DROPBOX_AGE_SECONDS = "dropbox_age_seconds"; 14938 14939 /** 14940 * Maximum number of entry files which {@link DropBoxManager} will keep 14941 * around. 14942 * 14943 * @hide 14944 */ 14945 @Readable 14946 public static final String DROPBOX_MAX_FILES = "dropbox_max_files"; 14947 14948 /** 14949 * Maximum amount of disk space used by {@link DropBoxManager} no matter 14950 * what. 14951 * 14952 * @hide 14953 */ 14954 @Readable 14955 public static final String DROPBOX_QUOTA_KB = "dropbox_quota_kb"; 14956 14957 /** 14958 * Percent of free disk (excluding reserve) which {@link DropBoxManager} 14959 * will use. 14960 * 14961 * @hide 14962 */ 14963 @Readable 14964 public static final String DROPBOX_QUOTA_PERCENT = "dropbox_quota_percent"; 14965 14966 /** 14967 * Percent of total disk which {@link DropBoxManager} will never dip 14968 * into. 14969 * 14970 * @hide 14971 */ 14972 @Readable 14973 public static final String DROPBOX_RESERVE_PERCENT = "dropbox_reserve_percent"; 14974 14975 /** 14976 * Prefix for per-tag dropbox disable/enable settings. 14977 * 14978 * @hide 14979 */ 14980 @Readable 14981 public static final String DROPBOX_TAG_PREFIX = "dropbox:"; 14982 14983 /** 14984 * Lines of kernel logs to include with system crash/ANR/etc. reports, as a 14985 * prefix of the dropbox tag of the report type. For example, 14986 * "kernel_logs_for_system_server_anr" controls the lines of kernel logs 14987 * captured with system server ANR reports. 0 to disable. 14988 * 14989 * @hide 14990 */ 14991 @Readable 14992 public static final String ERROR_KERNEL_LOG_PREFIX = "kernel_logs_for_"; 14993 14994 /** 14995 * Lines of logcat to include with system crash/ANR/etc. reports, as a 14996 * prefix of the dropbox tag of the report type. For example, 14997 * "logcat_for_system_server_anr" controls the lines of logcat captured 14998 * with system server ANR reports. 0 to disable. 14999 * 15000 * @hide 15001 */ 15002 @Readable 15003 public static final String ERROR_LOGCAT_PREFIX = "logcat_for_"; 15004 15005 /** 15006 * Maximum number of bytes of a system crash/ANR/etc. report that 15007 * ActivityManagerService should send to DropBox, as a prefix of the 15008 * dropbox tag of the report type. For example, 15009 * "max_error_bytes_for_system_server_anr" controls the maximum 15010 * number of bytes captured with system server ANR reports. 15011 * <p> 15012 * Type: int (max size in bytes) 15013 * 15014 * @hide 15015 */ 15016 @Readable 15017 public static final String MAX_ERROR_BYTES_PREFIX = "max_error_bytes_for_"; 15018 15019 /** 15020 * The interval in minutes after which the amount of free storage left 15021 * on the device is logged to the event log 15022 * 15023 * @hide 15024 */ 15025 @Readable 15026 public static final String SYS_FREE_STORAGE_LOG_INTERVAL = "sys_free_storage_log_interval"; 15027 15028 /** 15029 * Threshold for the amount of change in disk free space required to 15030 * report the amount of free space. Used to prevent spamming the logs 15031 * when the disk free space isn't changing frequently. 15032 * 15033 * @hide 15034 */ 15035 @Readable 15036 public static final String 15037 DISK_FREE_CHANGE_REPORTING_THRESHOLD = "disk_free_change_reporting_threshold"; 15038 15039 /** 15040 * Minimum percentage of free storage on the device that is used to 15041 * determine if the device is running low on storage. The default is 10. 15042 * <p> 15043 * Say this value is set to 10, the device is considered running low on 15044 * storage if 90% or more of the device storage is filled up. 15045 * 15046 * @hide 15047 */ 15048 @Readable 15049 public static final String 15050 SYS_STORAGE_THRESHOLD_PERCENTAGE = "sys_storage_threshold_percentage"; 15051 15052 /** 15053 * Maximum byte size of the low storage threshold. This is to ensure 15054 * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in an 15055 * overly large threshold for large storage devices. Currently this must 15056 * be less than 2GB. This default is 500MB. 15057 * 15058 * @hide 15059 */ 15060 @Readable 15061 public static final String 15062 SYS_STORAGE_THRESHOLD_MAX_BYTES = "sys_storage_threshold_max_bytes"; 15063 15064 /** 15065 * Minimum bytes of free storage on the device before the data partition 15066 * is considered full. By default, 1 MB is reserved to avoid system-wide 15067 * SQLite disk full exceptions. 15068 * 15069 * @hide 15070 */ 15071 @Readable 15072 public static final String 15073 SYS_STORAGE_FULL_THRESHOLD_BYTES = "sys_storage_full_threshold_bytes"; 15074 15075 /** 15076 * Minimum percentage of storage on the device that is reserved for 15077 * cached data. 15078 * 15079 * @hide 15080 */ 15081 @Readable 15082 public static final String 15083 SYS_STORAGE_CACHE_PERCENTAGE = "sys_storage_cache_percentage"; 15084 15085 /** 15086 * The maximum reconnect delay for short network outages or when the 15087 * network is suspended due to phone use. 15088 * 15089 * @hide 15090 */ 15091 @Readable 15092 public static final String 15093 SYNC_MAX_RETRY_DELAY_IN_SECONDS = "sync_max_retry_delay_in_seconds"; 15094 15095 /** 15096 * The number of milliseconds to delay before sending out 15097 * {@link ConnectivityManager#CONNECTIVITY_ACTION} broadcasts. Ignored. 15098 * 15099 * @hide 15100 */ 15101 @Readable 15102 public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay"; 15103 15104 15105 /** 15106 * Network sampling interval, in seconds. We'll generate link information 15107 * about bytes/packets sent and error rates based on data sampled in this interval 15108 * 15109 * @hide 15110 */ 15111 @Readable 15112 public static final String CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS = 15113 "connectivity_sampling_interval_in_seconds"; 15114 15115 /** 15116 * The series of successively longer delays used in retrying to download PAC file. 15117 * Last delay is used between successful PAC downloads. 15118 * 15119 * @hide 15120 */ 15121 @Readable 15122 public static final String PAC_CHANGE_DELAY = "pac_change_delay"; 15123 15124 /** 15125 * Don't attempt to detect captive portals. 15126 * 15127 * @hide 15128 */ 15129 public static final int CAPTIVE_PORTAL_MODE_IGNORE = 0; 15130 15131 /** 15132 * When detecting a captive portal, display a notification that 15133 * prompts the user to sign in. 15134 * 15135 * @hide 15136 */ 15137 public static final int CAPTIVE_PORTAL_MODE_PROMPT = 1; 15138 15139 /** 15140 * When detecting a captive portal, immediately disconnect from the 15141 * network and do not reconnect to that network in the future. 15142 * 15143 * @hide 15144 */ 15145 public static final int CAPTIVE_PORTAL_MODE_AVOID = 2; 15146 15147 /** 15148 * What to do when connecting a network that presents a captive portal. 15149 * Must be one of the CAPTIVE_PORTAL_MODE_* constants above. 15150 * 15151 * The default for this setting is CAPTIVE_PORTAL_MODE_PROMPT. 15152 * @hide 15153 */ 15154 @Readable 15155 public static final String CAPTIVE_PORTAL_MODE = "captive_portal_mode"; 15156 15157 /** 15158 * Setting to turn off captive portal detection. Feature is enabled by 15159 * default and the setting needs to be set to 0 to disable it. 15160 * 15161 * @deprecated use CAPTIVE_PORTAL_MODE_IGNORE to disable captive portal detection 15162 * @hide 15163 */ 15164 @Deprecated 15165 @Readable 15166 public static final String 15167 CAPTIVE_PORTAL_DETECTION_ENABLED = "captive_portal_detection_enabled"; 15168 15169 /** 15170 * The server used for captive portal detection upon a new conection. A 15171 * 204 response code from the server is used for validation. 15172 * TODO: remove this deprecated symbol. 15173 * 15174 * @hide 15175 */ 15176 @Readable 15177 public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server"; 15178 15179 /** 15180 * The URL used for HTTPS captive portal detection upon a new connection. 15181 * A 204 response code from the server is used for validation. 15182 * 15183 * @hide 15184 */ 15185 @Readable 15186 public static final String CAPTIVE_PORTAL_HTTPS_URL = "captive_portal_https_url"; 15187 15188 /** 15189 * The URL used for HTTP captive portal detection upon a new connection. 15190 * A 204 response code from the server is used for validation. 15191 * 15192 * @hide 15193 */ 15194 @Readable 15195 public static final String CAPTIVE_PORTAL_HTTP_URL = "captive_portal_http_url"; 15196 15197 /** 15198 * The URL used for fallback HTTP captive portal detection when previous HTTP 15199 * and HTTPS captive portal detection attemps did not return a conclusive answer. 15200 * 15201 * @hide 15202 */ 15203 @Readable 15204 public static final String CAPTIVE_PORTAL_FALLBACK_URL = "captive_portal_fallback_url"; 15205 15206 /** 15207 * A comma separated list of URLs used for captive portal detection in addition to the 15208 * fallback HTTP url associated with the CAPTIVE_PORTAL_FALLBACK_URL settings. 15209 * 15210 * @hide 15211 */ 15212 @Readable 15213 public static final String CAPTIVE_PORTAL_OTHER_FALLBACK_URLS = 15214 "captive_portal_other_fallback_urls"; 15215 15216 /** 15217 * A list of captive portal detection specifications used in addition to the fallback URLs. 15218 * Each spec has the format url@@/@@statusCodeRegex@@/@@contentRegex. Specs are separated 15219 * by "@@,@@". 15220 * @hide 15221 */ 15222 @Readable 15223 public static final String CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS = 15224 "captive_portal_fallback_probe_specs"; 15225 15226 /** 15227 * Whether to use HTTPS for network validation. This is enabled by default and the setting 15228 * needs to be set to 0 to disable it. This setting is a misnomer because captive portals 15229 * don't actually use HTTPS, but it's consistent with the other settings. 15230 * 15231 * @hide 15232 */ 15233 @Readable 15234 public static final String CAPTIVE_PORTAL_USE_HTTPS = "captive_portal_use_https"; 15235 15236 /** 15237 * Which User-Agent string to use in the header of the captive portal detection probes. 15238 * The User-Agent field is unset when this setting has no value (HttpUrlConnection default). 15239 * 15240 * @hide 15241 */ 15242 @Readable 15243 public static final String CAPTIVE_PORTAL_USER_AGENT = "captive_portal_user_agent"; 15244 15245 /** 15246 * Whether to try cellular data recovery when a bad network is reported. 15247 * 15248 * @hide 15249 */ 15250 @Readable 15251 public static final String DATA_STALL_RECOVERY_ON_BAD_NETWORK = 15252 "data_stall_recovery_on_bad_network"; 15253 15254 /** 15255 * Minumim duration in millisecodns between cellular data recovery attempts 15256 * 15257 * @hide 15258 */ 15259 @Readable 15260 public static final String MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS = 15261 "min_duration_between_recovery_steps"; 15262 15263 /** 15264 * Let user pick default install location. 15265 * 15266 * @hide 15267 */ 15268 @Readable 15269 public static final String SET_INSTALL_LOCATION = "set_install_location"; 15270 15271 /** 15272 * Default install location value. 15273 * 0 = auto, let system decide 15274 * 1 = internal 15275 * 2 = sdcard 15276 * @hide 15277 */ 15278 @Readable 15279 public static final String DEFAULT_INSTALL_LOCATION = "default_install_location"; 15280 15281 /** 15282 * ms during which to consume extra events related to Inet connection 15283 * condition after a transtion to fully-connected 15284 * 15285 * @hide 15286 */ 15287 @Readable 15288 public static final String 15289 INET_CONDITION_DEBOUNCE_UP_DELAY = "inet_condition_debounce_up_delay"; 15290 15291 /** 15292 * ms during which to consume extra events related to Inet connection 15293 * condtion after a transtion to partly-connected 15294 * 15295 * @hide 15296 */ 15297 @Readable 15298 public static final String 15299 INET_CONDITION_DEBOUNCE_DOWN_DELAY = "inet_condition_debounce_down_delay"; 15300 15301 /** {@hide} */ 15302 @Readable 15303 public static final String 15304 READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default"; 15305 15306 /** 15307 * Host name and port for global http proxy. Uses ':' seperator for 15308 * between host and port. 15309 */ 15310 @Readable 15311 public static final String HTTP_PROXY = "http_proxy"; 15312 15313 /** 15314 * Host name for global http proxy. Set via ConnectivityManager. 15315 * 15316 * @hide 15317 */ 15318 @Readable 15319 public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host"; 15320 15321 /** 15322 * Integer host port for global http proxy. Set via ConnectivityManager. 15323 * 15324 * @hide 15325 */ 15326 @Readable 15327 public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port"; 15328 15329 /** 15330 * Exclusion list for global proxy. This string contains a list of 15331 * comma-separated domains where the global proxy does not apply. 15332 * Domains should be listed in a comma- separated list. Example of 15333 * acceptable formats: ".domain1.com,my.domain2.com" Use 15334 * ConnectivityManager to set/get. 15335 * 15336 * @hide 15337 */ 15338 @Readable 15339 public static final String 15340 GLOBAL_HTTP_PROXY_EXCLUSION_LIST = "global_http_proxy_exclusion_list"; 15341 15342 /** 15343 * The location PAC File for the proxy. 15344 * @hide 15345 */ 15346 @Readable 15347 public static final String 15348 GLOBAL_HTTP_PROXY_PAC = "global_proxy_pac_url"; 15349 15350 /** 15351 * Enables the UI setting to allow the user to specify the global HTTP 15352 * proxy and associated exclusion list. 15353 * 15354 * @hide 15355 */ 15356 @Readable 15357 public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy"; 15358 15359 /** 15360 * Setting for default DNS in case nobody suggests one 15361 * 15362 * @hide 15363 */ 15364 @Readable 15365 public static final String DEFAULT_DNS_SERVER = "default_dns_server"; 15366 15367 /** 15368 * The requested Private DNS mode (string), and an accompanying specifier (string). 15369 * 15370 * Currently, the specifier holds the chosen provider name when the mode requests 15371 * a specific provider. It may be used to store the provider name even when the 15372 * mode changes so that temporarily disabling and re-enabling the specific 15373 * provider mode does not necessitate retyping the provider hostname. 15374 * 15375 * @hide 15376 */ 15377 @Readable 15378 public static final String PRIVATE_DNS_MODE = "private_dns_mode"; 15379 15380 /** 15381 * @hide 15382 */ 15383 @Readable 15384 public static final String PRIVATE_DNS_SPECIFIER = "private_dns_specifier"; 15385 15386 /** 15387 * Forced override of the default mode (hardcoded as "automatic", nee "opportunistic"). 15388 * This allows changing the default mode without effectively disabling other modes, 15389 * all of which require explicit user action to enable/configure. See also b/79719289. 15390 * 15391 * Value is a string, suitable for assignment to PRIVATE_DNS_MODE above. 15392 * 15393 * {@hide} 15394 */ 15395 @Readable 15396 public static final String PRIVATE_DNS_DEFAULT_MODE = "private_dns_default_mode"; 15397 15398 15399 /** {@hide} */ 15400 @Readable 15401 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 15402 @SuppressLint("NoSettingsProvider") 15403 public static final String 15404 BLUETOOTH_BTSNOOP_DEFAULT_MODE = "bluetooth_btsnoop_default_mode"; 15405 /** {@hide} */ 15406 @Readable 15407 public static final String 15408 BLUETOOTH_HEADSET_PRIORITY_PREFIX = "bluetooth_headset_priority_"; 15409 /** {@hide} */ 15410 @Readable 15411 public static final String 15412 BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX = "bluetooth_a2dp_sink_priority_"; 15413 /** {@hide} */ 15414 @Readable 15415 public static final String 15416 BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX = "bluetooth_a2dp_src_priority_"; 15417 /** {@hide} */ 15418 @Readable 15419 public static final String BLUETOOTH_A2DP_SUPPORTS_OPTIONAL_CODECS_PREFIX = 15420 "bluetooth_a2dp_supports_optional_codecs_"; 15421 /** {@hide} */ 15422 @Readable 15423 public static final String BLUETOOTH_A2DP_OPTIONAL_CODECS_ENABLED_PREFIX = 15424 "bluetooth_a2dp_optional_codecs_enabled_"; 15425 /** {@hide} */ 15426 @Readable 15427 public static final String 15428 BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX = "bluetooth_input_device_priority_"; 15429 /** {@hide} */ 15430 @Readable 15431 public static final String 15432 BLUETOOTH_MAP_PRIORITY_PREFIX = "bluetooth_map_priority_"; 15433 /** {@hide} */ 15434 @Readable 15435 public static final String 15436 BLUETOOTH_MAP_CLIENT_PRIORITY_PREFIX = "bluetooth_map_client_priority_"; 15437 /** {@hide} */ 15438 @Readable 15439 public static final String 15440 BLUETOOTH_PBAP_CLIENT_PRIORITY_PREFIX = "bluetooth_pbap_client_priority_"; 15441 /** {@hide} */ 15442 @Readable 15443 public static final String 15444 BLUETOOTH_SAP_PRIORITY_PREFIX = "bluetooth_sap_priority_"; 15445 /** {@hide} */ 15446 @Readable 15447 public static final String 15448 BLUETOOTH_PAN_PRIORITY_PREFIX = "bluetooth_pan_priority_"; 15449 /** {@hide} */ 15450 @Readable 15451 public static final String 15452 BLUETOOTH_HEARING_AID_PRIORITY_PREFIX = "bluetooth_hearing_aid_priority_"; 15453 15454 /** 15455 * Enable/disable radio bug detection 15456 * 15457 * {@hide} 15458 */ 15459 @Readable 15460 public static final String 15461 ENABLE_RADIO_BUG_DETECTION = "enable_radio_bug_detection"; 15462 15463 /** 15464 * Count threshold of RIL wakelock timeout for radio bug detection 15465 * 15466 * {@hide} 15467 */ 15468 @Readable 15469 public static final String 15470 RADIO_BUG_WAKELOCK_TIMEOUT_COUNT_THRESHOLD = 15471 "radio_bug_wakelock_timeout_count_threshold"; 15472 15473 /** 15474 * Count threshold of RIL system error for radio bug detection 15475 * 15476 * {@hide} 15477 */ 15478 @Readable 15479 public static final String 15480 RADIO_BUG_SYSTEM_ERROR_COUNT_THRESHOLD = 15481 "radio_bug_system_error_count_threshold"; 15482 15483 /** 15484 * Activity manager specific settings. 15485 * This is encoded as a key=value list, separated by commas. Ex: 15486 * 15487 * "gc_timeout=5000,max_cached_processes=24" 15488 * 15489 * The following keys are supported: 15490 * 15491 * <pre> 15492 * max_cached_processes (int) 15493 * background_settle_time (long) 15494 * fgservice_min_shown_time (long) 15495 * fgservice_min_report_time (long) 15496 * fgservice_screen_on_before_time (long) 15497 * fgservice_screen_on_after_time (long) 15498 * content_provider_retain_time (long) 15499 * gc_timeout (long) 15500 * gc_min_interval (long) 15501 * full_pss_min_interval (long) 15502 * full_pss_lowered_interval (long) 15503 * power_check_interval (long) 15504 * power_check_max_cpu_1 (int) 15505 * power_check_max_cpu_2 (int) 15506 * power_check_max_cpu_3 (int) 15507 * power_check_max_cpu_4 (int) 15508 * service_usage_interaction_time (long) 15509 * usage_stats_interaction_interval (long) 15510 * service_restart_duration (long) 15511 * service_reset_run_duration (long) 15512 * service_restart_duration_factor (int) 15513 * service_min_restart_time_between (long) 15514 * service_max_inactivity (long) 15515 * service_bg_start_timeout (long) 15516 * service_bg_activity_start_timeout (long) 15517 * process_start_async (boolean) 15518 * </pre> 15519 * 15520 * <p> 15521 * Type: string 15522 * @hide 15523 * @see com.android.server.am.ActivityManagerConstants 15524 */ 15525 @Readable 15526 public static final String ACTIVITY_MANAGER_CONSTANTS = "activity_manager_constants"; 15527 15528 /** 15529 * Feature flag to enable or disable the activity starts logging feature. 15530 * Type: int (0 for false, 1 for true) 15531 * Default: 1 15532 * @hide 15533 */ 15534 @Readable 15535 public static final String ACTIVITY_STARTS_LOGGING_ENABLED 15536 = "activity_starts_logging_enabled"; 15537 15538 /** 15539 * Feature flag to enable or disable the foreground service starts logging feature. 15540 * Type: int (0 for false, 1 for true) 15541 * Default: 1 15542 * @hide 15543 */ 15544 @Readable 15545 public static final String FOREGROUND_SERVICE_STARTS_LOGGING_ENABLED = 15546 "foreground_service_starts_logging_enabled"; 15547 15548 /** 15549 * Describes whether AM's AppProfiler should collect PSS even if RSS is the default. This 15550 * can be set by a user in developer settings. 15551 * Default: 0 15552 * @hide 15553 */ 15554 @Readable 15555 public static final String FORCE_ENABLE_PSS_PROFILING = 15556 "force_enable_pss_profiling"; 15557 15558 /** 15559 * @hide 15560 * @see com.android.server.appbinding.AppBindingConstants 15561 */ 15562 @Readable 15563 public static final String APP_BINDING_CONSTANTS = "app_binding_constants"; 15564 15565 /** 15566 * App ops specific settings. 15567 * This is encoded as a key=value list, separated by commas. Ex: 15568 * 15569 * "state_settle_time=10000" 15570 * 15571 * The following keys are supported: 15572 * 15573 * <pre> 15574 * top_state_settle_time (long) 15575 * fg_service_state_settle_time (long) 15576 * bg_state_settle_time (long) 15577 * </pre> 15578 * 15579 * <p> 15580 * Type: string 15581 * @hide 15582 * @see com.android.server.AppOpsService.Constants 15583 */ 15584 @TestApi 15585 @Readable 15586 public static final String APP_OPS_CONSTANTS = "app_ops_constants"; 15587 15588 /** 15589 * Device Idle (Doze) specific settings. 15590 * This is encoded as a key=value list, separated by commas. Ex: 15591 * 15592 * "inactive_to=60000,sensing_to=400000" 15593 * 15594 * The following keys are supported: 15595 * 15596 * <pre> 15597 * inactive_to (long) 15598 * sensing_to (long) 15599 * motion_inactive_to (long) 15600 * idle_after_inactive_to (long) 15601 * idle_pending_to (long) 15602 * max_idle_pending_to (long) 15603 * idle_pending_factor (float) 15604 * quick_doze_delay_to (long) 15605 * idle_to (long) 15606 * max_idle_to (long) 15607 * idle_factor (float) 15608 * min_time_to_alarm (long) 15609 * max_temp_app_whitelist_duration (long) 15610 * notification_whitelist_duration (long) 15611 * </pre> 15612 * 15613 * <p> 15614 * Type: string 15615 * @hide 15616 * @see com.android.server.DeviceIdleController.Constants 15617 */ 15618 public static final String DEVICE_IDLE_CONSTANTS = "device_idle_constants"; 15619 15620 /** 15621 * Battery Saver specific settings 15622 * This is encoded as a key=value list, separated by commas. Ex: 15623 * 15624 * "vibration_disabled=true,adjust_brightness_factor=0.5" 15625 * 15626 * The following keys are supported: 15627 * 15628 * <pre> 15629 * advertise_is_enabled (boolean) 15630 * datasaver_disabled (boolean) 15631 * enable_night_mode (boolean) 15632 * launch_boost_disabled (boolean) 15633 * vibration_disabled (boolean) 15634 * animation_disabled (boolean) 15635 * soundtrigger_disabled (boolean) 15636 * fullbackup_deferred (boolean) 15637 * keyvaluebackup_deferred (boolean) 15638 * firewall_disabled (boolean) 15639 * gps_mode (int) 15640 * adjust_brightness_disabled (boolean) 15641 * adjust_brightness_factor (float) 15642 * force_all_apps_standby (boolean) 15643 * force_background_check (boolean) 15644 * optional_sensors_disabled (boolean) 15645 * aod_disabled (boolean) 15646 * quick_doze_enabled (boolean) 15647 * </pre> 15648 * @hide 15649 * @see com.android.server.power.batterysaver.BatterySaverPolicy 15650 */ 15651 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 15652 @TestApi 15653 @Readable 15654 public static final String BATTERY_SAVER_CONSTANTS = "battery_saver_constants"; 15655 15656 /** 15657 * Battery Saver device specific settings 15658 * This is encoded as a key=value list, separated by commas. 15659 * 15660 * The following keys are supported: 15661 * 15662 * <pre> 15663 * cpufreq-i (list of "core-number:frequency" pairs concatenated with /) 15664 * cpufreq-n (list of "core-number:frequency" pairs concatenated with /) 15665 * </pre> 15666 * 15667 * See {@link com.android.server.power.batterysaver.BatterySaverPolicy} for the details. 15668 * 15669 * @hide 15670 */ 15671 @Readable 15672 public static final String BATTERY_SAVER_DEVICE_SPECIFIC_CONSTANTS = 15673 "battery_saver_device_specific_constants"; 15674 15675 /** 15676 * Battery tip specific settings 15677 * This is encoded as a key=value list, separated by commas. Ex: 15678 * 15679 * "battery_tip_enabled=true,summary_enabled=true,high_usage_enabled=true," 15680 * "high_usage_app_count=3,reduced_battery_enabled=false,reduced_battery_percent=50," 15681 * "high_usage_battery_draining=25,high_usage_period_ms=3000" 15682 * 15683 * The following keys are supported: 15684 * 15685 * <pre> 15686 * battery_tip_enabled (boolean) 15687 * summary_enabled (boolean) 15688 * battery_saver_tip_enabled (boolean) 15689 * high_usage_enabled (boolean) 15690 * high_usage_app_count (int) 15691 * high_usage_period_ms (long) 15692 * high_usage_battery_draining (int) 15693 * app_restriction_enabled (boolean) 15694 * reduced_battery_enabled (boolean) 15695 * reduced_battery_percent (int) 15696 * low_battery_enabled (boolean) 15697 * low_battery_hour (int) 15698 * </pre> 15699 * @hide 15700 */ 15701 @Readable 15702 public static final String BATTERY_TIP_CONSTANTS = "battery_tip_constants"; 15703 15704 /** 15705 * Battery anomaly detection specific settings 15706 * This is encoded as a key=value list, separated by commas. 15707 * wakeup_blacklisted_tags is a string, encoded as a set of tags, encoded via 15708 * {@link Uri#encode(String)}, separated by colons. Ex: 15709 * 15710 * "anomaly_detection_enabled=true,wakelock_threshold=2000,wakeup_alarm_enabled=true," 15711 * "wakeup_alarm_threshold=10,wakeup_blacklisted_tags=tag1:tag2:with%2Ccomma:with%3Acolon" 15712 * 15713 * The following keys are supported: 15714 * 15715 * <pre> 15716 * anomaly_detection_enabled (boolean) 15717 * wakelock_enabled (boolean) 15718 * wakelock_threshold (long) 15719 * wakeup_alarm_enabled (boolean) 15720 * wakeup_alarm_threshold (long) 15721 * wakeup_blacklisted_tags (string) 15722 * bluetooth_scan_enabled (boolean) 15723 * bluetooth_scan_threshold (long) 15724 * </pre> 15725 * @hide 15726 */ 15727 @Readable 15728 public static final String ANOMALY_DETECTION_CONSTANTS = "anomaly_detection_constants"; 15729 15730 /** 15731 * An integer to show the version of the anomaly config. Ex: 1, which means 15732 * current version is 1. 15733 * @hide 15734 */ 15735 @Readable 15736 public static final String ANOMALY_CONFIG_VERSION = "anomaly_config_version"; 15737 15738 /** 15739 * A base64-encoded string represents anomaly stats config, used for 15740 * {@link android.app.StatsManager}. 15741 * @hide 15742 */ 15743 @Readable 15744 public static final String ANOMALY_CONFIG = "anomaly_config"; 15745 15746 /** 15747 * Always on display(AOD) specific settings 15748 * This is encoded as a key=value list, separated by commas. Ex: 15749 * 15750 * "prox_screen_off_delay=10000,screen_brightness_array=0:1:2:3:4" 15751 * 15752 * The following keys are supported: 15753 * 15754 * <pre> 15755 * screen_brightness_array (int[]) 15756 * dimming_scrim_array (int[]) 15757 * prox_screen_off_delay (long) 15758 * prox_cooldown_trigger (long) 15759 * prox_cooldown_period (long) 15760 * </pre> 15761 * @hide 15762 */ 15763 @Readable 15764 public static final String ALWAYS_ON_DISPLAY_CONSTANTS = "always_on_display_constants"; 15765 15766 /** 15767 * UidCpuPower global setting. This links the sys.uidcpupower system property. 15768 * The following values are supported: 15769 * 0 -> /proc/uid_cpupower/* are disabled 15770 * 1 -> /proc/uid_cpupower/* are enabled 15771 * Any other value defaults to enabled. 15772 * @hide 15773 */ 15774 @Readable 15775 public static final String SYS_UIDCPUPOWER = "sys_uidcpupower"; 15776 15777 /** 15778 * traced global setting. This controls weather the deamons: traced and 15779 * traced_probes run. This links the sys.traced system property. 15780 * The following values are supported: 15781 * 0 -> traced and traced_probes are disabled 15782 * 1 -> traced and traced_probes are enabled 15783 * Any other value defaults to disabled. 15784 * @hide 15785 */ 15786 @Readable 15787 public static final String SYS_TRACED = "sys_traced"; 15788 15789 /** 15790 * An integer to reduce the FPS by this factor. Only for experiments. Need to reboot the 15791 * device for this setting to take full effect. 15792 * 15793 * @hide 15794 */ 15795 @Readable 15796 public static final String FPS_DEVISOR = "fps_divisor"; 15797 15798 /** 15799 * Flag to enable or disable display panel low power mode (lpm) 15800 * false -> Display panel power saving mode is disabled. 15801 * true -> Display panel power saving mode is enabled. 15802 * 15803 * @hide 15804 */ 15805 @Readable 15806 public static final String DISPLAY_PANEL_LPM = "display_panel_lpm"; 15807 15808 /** 15809 * App time limit usage source setting. 15810 * This controls which app in a task will be considered the source of usage when 15811 * calculating app usage time limits. 15812 * 15813 * 1 -> task root app 15814 * 2 -> current app 15815 * Any other value defaults to task root app. 15816 * 15817 * Need to reboot the device for this setting to take effect. 15818 * @hide 15819 */ 15820 @Readable 15821 public static final String APP_TIME_LIMIT_USAGE_SOURCE = "app_time_limit_usage_source"; 15822 15823 /** 15824 * Enable ART bytecode verification verifications for debuggable apps. 15825 * 0 = disable, 1 = enable. 15826 * @hide 15827 */ 15828 @Readable 15829 public static final String ART_VERIFIER_VERIFY_DEBUGGABLE = 15830 "art_verifier_verify_debuggable"; 15831 15832 /** 15833 * Power manager specific settings. 15834 * This is encoded as a key=value list, separated by commas. Ex: 15835 * 15836 * "no_cached_wake_locks=1" 15837 * 15838 * The following keys are supported: 15839 * 15840 * <pre> 15841 * no_cached_wake_locks (boolean) 15842 * </pre> 15843 * 15844 * <p> 15845 * Type: string 15846 * @hide 15847 * @see com.android.server.power.PowerManagerConstants 15848 */ 15849 @Readable 15850 public static final String POWER_MANAGER_CONSTANTS = "power_manager_constants"; 15851 15852 /** 15853 * ShortcutManager specific settings. 15854 * This is encoded as a key=value list, separated by commas. Ex: 15855 * 15856 * "reset_interval_sec=86400,max_updates_per_interval=1" 15857 * 15858 * The following keys are supported: 15859 * 15860 * <pre> 15861 * reset_interval_sec (long) 15862 * max_updates_per_interval (int) 15863 * max_icon_dimension_dp (int, DP) 15864 * max_icon_dimension_dp_lowram (int, DP) 15865 * max_shortcuts (int) 15866 * icon_quality (int, 0-100) 15867 * icon_format (String) 15868 * </pre> 15869 * 15870 * <p> 15871 * Type: string 15872 * @hide 15873 * @see com.android.server.pm.ShortcutService.ConfigConstants 15874 */ 15875 @Readable 15876 public static final String SHORTCUT_MANAGER_CONSTANTS = "shortcut_manager_constants"; 15877 15878 /** 15879 * DevicePolicyManager specific settings. 15880 * This is encoded as a key=value list, separated by commas. Ex: 15881 * 15882 * <pre> 15883 * das_died_service_reconnect_backoff_sec (long) 15884 * das_died_service_reconnect_backoff_increase (float) 15885 * das_died_service_reconnect_max_backoff_sec (long) 15886 * </pre> 15887 * 15888 * <p> 15889 * Type: string 15890 * @hide 15891 * see also com.android.server.devicepolicy.DevicePolicyConstants 15892 */ 15893 @Readable 15894 public static final String DEVICE_POLICY_CONSTANTS = "device_policy_constants"; 15895 15896 /** 15897 * TextClassifier specific settings. 15898 * This is encoded as a key=value list, separated by commas. String[] types like 15899 * entity_list_default use ":" as delimiter for values. Ex: 15900 * 15901 * <pre> 15902 * classify_text_max_range_length (int) 15903 * detect_language_from_text_enabled (boolean) 15904 * entity_list_default (String[]) 15905 * entity_list_editable (String[]) 15906 * entity_list_not_editable (String[]) 15907 * generate_links_log_sample_rate (int) 15908 * generate_links_max_text_length (int) 15909 * in_app_conversation_action_types_default (String[]) 15910 * lang_id_context_settings (float[]) 15911 * lang_id_threshold_override (float) 15912 * local_textclassifier_enabled (boolean) 15913 * model_dark_launch_enabled (boolean) 15914 * notification_conversation_action_types_default (String[]) 15915 * smart_linkify_enabled (boolean) 15916 * smart_select_animation_enabled (boolean) 15917 * smart_selection_enabled (boolean) 15918 * smart_text_share_enabled (boolean) 15919 * suggest_selection_max_range_length (int) 15920 * system_textclassifier_enabled (boolean) 15921 * template_intent_factory_enabled (boolean) 15922 * translate_in_classification_enabled (boolean) 15923 * </pre> 15924 * 15925 * <p> 15926 * Type: string 15927 * @hide 15928 * see also android.view.textclassifier.TextClassificationConstants 15929 */ 15930 @Readable 15931 public static final String TEXT_CLASSIFIER_CONSTANTS = "text_classifier_constants"; 15932 15933 /** 15934 * BatteryStats specific settings. 15935 * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true" 15936 * 15937 * The following keys are supported: 15938 * <pre> 15939 * track_cpu_times_by_proc_state (boolean) 15940 * track_cpu_active_cluster_time (boolean) 15941 * read_binary_cpu_time (boolean) 15942 * proc_state_cpu_times_read_delay_ms (long) 15943 * external_stats_collection_rate_limit_ms (long) 15944 * battery_level_collection_delay_ms (long) 15945 * max_history_files (int) 15946 * max_history_buffer_kb (int) 15947 * battery_charged_delay_ms (int) 15948 * battery_charging_enforce_level (int) 15949 * </pre> 15950 * 15951 * <p> 15952 * Type: string 15953 * @hide 15954 * see also com.android.internal.os.BatteryStatsImpl.Constants 15955 */ 15956 @Readable 15957 public static final String BATTERY_STATS_CONSTANTS = "battery_stats_constants"; 15958 15959 /** 15960 * SyncManager specific settings. 15961 * 15962 * <p> 15963 * Type: string 15964 * @hide 15965 * @see com.android.server.content.SyncManagerConstants 15966 */ 15967 @Readable 15968 public static final String SYNC_MANAGER_CONSTANTS = "sync_manager_constants"; 15969 15970 /** 15971 * Broadcast dispatch tuning parameters specific to foreground broadcasts. 15972 * 15973 * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true" 15974 * 15975 * The following keys are supported: 15976 * <pre> 15977 * bcast_timeout (long) 15978 * bcast_slow_time (long) 15979 * bcast_deferral (long) 15980 * bcast_deferral_decay_factor (float) 15981 * bcast_deferral_floor (long) 15982 * bcast_allow_bg_activity_start_timeout (long) 15983 * </pre> 15984 * 15985 * @hide 15986 */ 15987 @Readable 15988 public static final String BROADCAST_FG_CONSTANTS = "bcast_fg_constants"; 15989 15990 /** 15991 * Broadcast dispatch tuning parameters specific to background broadcasts. 15992 * 15993 * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true". 15994 * See {@link #BROADCAST_FG_CONSTANTS} for the list of supported keys. 15995 * 15996 * @hide 15997 */ 15998 @Readable 15999 public static final String BROADCAST_BG_CONSTANTS = "bcast_bg_constants"; 16000 16001 /** 16002 * Broadcast dispatch tuning parameters specific to specific "offline" broadcasts. 16003 * 16004 * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true". 16005 * See {@link #BROADCAST_FG_CONSTANTS} for the list of supported keys. 16006 * 16007 * @hide 16008 */ 16009 @Readable 16010 public static final String BROADCAST_OFFLOAD_CONSTANTS = "bcast_offload_constants"; 16011 16012 /** 16013 * Whether or not App Standby feature is enabled by system. This controls throttling of apps 16014 * based on usage patterns and predictions. Platform will turn on this feature if both this 16015 * flag and {@link #ADAPTIVE_BATTERY_MANAGEMENT_ENABLED} is on. 16016 * Type: int (0 for false, 1 for true) 16017 * Default: 1 16018 * @hide 16019 * @see #ADAPTIVE_BATTERY_MANAGEMENT_ENABLED 16020 */ 16021 @SystemApi 16022 @Readable 16023 public static final String APP_STANDBY_ENABLED = "app_standby_enabled"; 16024 16025 /** 16026 * Whether or not adaptive battery feature is enabled by user. Platform will turn on this 16027 * feature if both this flag and {@link #APP_STANDBY_ENABLED} is on. 16028 * Type: int (0 for false, 1 for true) 16029 * Default: 1 16030 * @hide 16031 * @see #APP_STANDBY_ENABLED 16032 */ 16033 @Readable 16034 public static final String ADAPTIVE_BATTERY_MANAGEMENT_ENABLED = 16035 "adaptive_battery_management_enabled"; 16036 16037 /** 16038 * Whether or not app auto restriction is enabled. When it is enabled, settings app will 16039 * auto restrict the app if it has bad behavior (e.g. hold wakelock for long time). 16040 * 16041 * Type: boolean (0 for false, 1 for true) 16042 * Default: 1 16043 * 16044 * @hide 16045 */ 16046 @Readable 16047 public static final String APP_AUTO_RESTRICTION_ENABLED = 16048 "app_auto_restriction_enabled"; 16049 16050 /** 16051 * Whether or not to enable Forced App Standby on small battery devices. 16052 * Type: int (0 for false, 1 for true) 16053 * Default: 0 16054 * @hide 16055 */ 16056 @Readable 16057 public static final String FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED 16058 = "forced_app_standby_for_small_battery_enabled"; 16059 16060 /** 16061 * Whether or not to enable the User Absent, Radios Off feature on small battery devices. 16062 * Type: int (0 for false, 1 for true) 16063 * Default: 0 16064 * @hide 16065 */ 16066 @Readable 16067 public static final String USER_ABSENT_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED 16068 = "user_absent_radios_off_for_small_battery_enabled"; 16069 16070 /** 16071 * Whether or not to enable the User Absent, Touch Off feature on small battery devices. 16072 * Type: int (0 for false, 1 for true) 16073 * Default: 0 16074 * @hide 16075 */ 16076 @Readable 16077 public static final String USER_ABSENT_TOUCH_OFF_FOR_SMALL_BATTERY_ENABLED 16078 = "user_absent_touch_off_for_small_battery_enabled"; 16079 16080 /** 16081 * Whether or not to turn on Wifi when proxy is disconnected. 16082 * Type: int (0 for false, 1 for true) 16083 * Default: 1 16084 * @hide 16085 */ 16086 @Readable 16087 public static final String WIFI_ON_WHEN_PROXY_DISCONNECTED 16088 = "wifi_on_when_proxy_disconnected"; 16089 16090 /** 16091 * Time Only Mode specific settings. 16092 * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true" 16093 * 16094 * The following keys are supported: 16095 * 16096 * <pre> 16097 * enabled (boolean) 16098 * disable_home (boolean) 16099 * disable_tilt_to_wake (boolean) 16100 * disable_touch_to_wake (boolean) 16101 * </pre> 16102 * Type: string 16103 * @hide 16104 */ 16105 @Readable 16106 public static final String TIME_ONLY_MODE_CONSTANTS 16107 = "time_only_mode_constants"; 16108 16109 /** 16110 * Whether of not to send keycode sleep for ungaze when Home is the foreground activity on 16111 * watch type devices. 16112 * Type: int (0 for false, 1 for true) 16113 * Default: 1 16114 * @hide 16115 */ 16116 @Readable 16117 public static final String UNGAZE_SLEEP_ENABLED = "ungaze_sleep_enabled"; 16118 16119 /** 16120 * Whether or not Network Watchlist feature is enabled. 16121 * Type: int (0 for false, 1 for true) 16122 * Default: 0 16123 * @hide 16124 */ 16125 @Readable 16126 public static final String NETWORK_WATCHLIST_ENABLED = "network_watchlist_enabled"; 16127 16128 /** 16129 * Whether or not show hidden launcher icon apps feature is enabled. 16130 * Type: int (0 for false, 1 for true) 16131 * Default: 1 16132 * @hide 16133 */ 16134 @Readable 16135 public static final String SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED = 16136 "show_hidden_icon_apps_enabled"; 16137 16138 /** 16139 * Whether or not show new app installed notification is enabled. 16140 * Type: int (0 for false, 1 for true) 16141 * Default: 0 16142 * @hide 16143 */ 16144 @Readable 16145 public static final String SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED = 16146 "show_new_app_installed_notification_enabled"; 16147 16148 /** 16149 * Flag to keep background restricted profiles running after exiting. If disabled, 16150 * the restricted profile can be put into stopped state as soon as the user leaves it. 16151 * Type: int (0 for false, 1 for true) 16152 * 16153 * Overridden by the system based on device information. If null, the value specified 16154 * by {@code config_keepRestrictedProfilesInBackground} is used. 16155 * 16156 * @hide 16157 */ 16158 @Readable 16159 public static final String KEEP_PROFILE_IN_BACKGROUND = "keep_profile_in_background"; 16160 16161 /** 16162 * The default time in ms within which a subsequent connection from an always allowed system 16163 * is allowed to reconnect without user interaction. 16164 * 16165 * @hide 16166 */ 16167 public static final long DEFAULT_ADB_ALLOWED_CONNECTION_TIME = 604800000; 16168 16169 /** 16170 * When the user first connects their device to a system a prompt is displayed to allow 16171 * the adb connection with an option to 'Always allow' connections from this system. If the 16172 * user selects this always allow option then the connection time is stored for the system. 16173 * This setting is the time in ms within which a subsequent connection from an always 16174 * allowed system is allowed to reconnect without user interaction. 16175 * 16176 * Type: long 16177 * 16178 * @hide 16179 */ 16180 @Readable 16181 public static final String ADB_ALLOWED_CONNECTION_TIME = 16182 "adb_allowed_connection_time"; 16183 16184 /** 16185 * Scaling factor for normal window animations. 16186 * 16187 * The value is a float. Setting to 0.0f will disable window animations. 16188 */ 16189 @Readable 16190 public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale"; 16191 16192 /** 16193 * Setting to disable cross-window blurs. This includes window blur behind, (see 16194 * {@link LayoutParams#setBlurBehindRadius}) and window background blur (see 16195 * {@link Window#setBackgroundBlurRadius}). 16196 * 16197 * The value is a boolean (1 or 0). 16198 * @hide 16199 */ 16200 @TestApi 16201 @Readable 16202 @SuppressLint("NoSettingsProvider") 16203 public static final String DISABLE_WINDOW_BLURS = "disable_window_blurs"; 16204 16205 /** 16206 * Scaling factor for activity transition animations. 16207 * 16208 * The value is a float. Setting to 0.0f will disable window animations. 16209 */ 16210 @Readable 16211 public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; 16212 16213 /** 16214 * Scaling factor for Animator-based animations. This affects both the 16215 * start delay and duration of all such animations. 16216 * 16217 * The value is a float. Setting to 0.0f will cause animations to end immediately. 16218 * The default value is 1.0f. 16219 */ 16220 @Readable 16221 public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; 16222 16223 /** 16224 * Scaling factor for normal window animations. Setting to 0 will 16225 * disable window animations. 16226 * 16227 * @hide 16228 */ 16229 @Readable 16230 public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations"; 16231 16232 /** 16233 * If 0, the compatibility mode is off for all applications. 16234 * If 1, older applications run under compatibility mode. 16235 * TODO: remove this settings before code freeze (bug/1907571) 16236 * @hide 16237 */ 16238 @Readable 16239 public static final String COMPATIBILITY_MODE = "compatibility_mode"; 16240 16241 /** 16242 * CDMA only settings 16243 * Emergency Tone 0 = Off 16244 * 1 = Alert 16245 * 2 = Vibrate 16246 * @hide 16247 */ 16248 @Readable 16249 public static final String EMERGENCY_TONE = "emergency_tone"; 16250 16251 /** 16252 * CDMA only settings 16253 * Whether the auto retry is enabled. The value is 16254 * boolean (1 or 0). 16255 * @hide 16256 */ 16257 @Readable 16258 public static final String CALL_AUTO_RETRY = "call_auto_retry"; 16259 16260 /** 16261 * A setting that can be read whether the emergency affordance is currently needed. 16262 * The value is a boolean (1 or 0). 16263 * @hide 16264 */ 16265 @Readable 16266 public static final String EMERGENCY_AFFORDANCE_NEEDED = "emergency_affordance_needed"; 16267 16268 /** 16269 * The power button "cooldown" period in milliseconds after the Emergency gesture is 16270 * triggered, during which single-key actions on the power button are suppressed. Cooldown 16271 * period is disabled if set to zero. 16272 * 16273 * @hide 16274 */ 16275 public static final String EMERGENCY_GESTURE_POWER_BUTTON_COOLDOWN_PERIOD_MS = 16276 "emergency_gesture_power_button_cooldown_period_ms"; 16277 16278 /** 16279 * The minimum time in milliseconds to perform the emergency gesture. 16280 * 16281 * @hide 16282 */ 16283 public static final String EMERGENCY_GESTURE_TAP_DETECTION_MIN_TIME_MS = 16284 "emergency_gesture_tap_detection_min_time_ms"; 16285 16286 /** 16287 * The maximum duration in milliseconds for which the emergency gesture UI can stay 16288 * "sticky", where the notification pull-down shade and navigation gestures/buttons are 16289 * temporarily disabled. The feature is disabled completely if the value is set to zero. 16290 * 16291 * @hide 16292 */ 16293 public static final String EMERGENCY_GESTURE_STICKY_UI_MAX_DURATION_MILLIS = 16294 "emergency_gesture_sticky_ui_max_duration_millis"; 16295 16296 /** 16297 * Whether to enable automatic system server heap dumps. This only works on userdebug or 16298 * eng builds, not on user builds. This is set by the user and overrides the config value. 16299 * 1 means enable, 0 means disable. 16300 * 16301 * @hide 16302 */ 16303 @Readable 16304 public static final String ENABLE_AUTOMATIC_SYSTEM_SERVER_HEAP_DUMPS = 16305 "enable_automatic_system_server_heap_dumps"; 16306 16307 /** 16308 * See RIL_PreferredNetworkType in ril.h 16309 * @hide 16310 */ 16311 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 16312 @Readable 16313 public static final String PREFERRED_NETWORK_MODE = 16314 "preferred_network_mode"; 16315 16316 /** 16317 * Name of an application package to be debugged. 16318 */ 16319 @Readable 16320 public static final String DEBUG_APP = "debug_app"; 16321 16322 /** 16323 * If 1, when launching DEBUG_APP it will wait for the debugger before 16324 * starting user code. If 0, it will run normally. 16325 */ 16326 @Readable 16327 public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger"; 16328 16329 /** 16330 * Allow GPU debug layers? 16331 * 0 = no 16332 * 1 = yes 16333 * @hide 16334 */ 16335 @Readable 16336 public static final String ENABLE_GPU_DEBUG_LAYERS = "enable_gpu_debug_layers"; 16337 16338 /** 16339 * App allowed to load GPU debug layers 16340 * @hide 16341 */ 16342 @Readable 16343 public static final String GPU_DEBUG_APP = "gpu_debug_app"; 16344 16345 /** 16346 * Package containing ANGLE libraries other than system, which are only available 16347 * to dumpable apps that opt-in. 16348 * @hide 16349 */ 16350 @Readable 16351 public static final String ANGLE_DEBUG_PACKAGE = "angle_debug_package"; 16352 16353 /** 16354 * Force all PKGs to use ANGLE, regardless of any other settings 16355 * The value is a boolean (1 or 0). 16356 * @hide 16357 */ 16358 @Readable 16359 public static final String ANGLE_GL_DRIVER_ALL_ANGLE = "angle_gl_driver_all_angle"; 16360 16361 /** 16362 * List of PKGs that have an OpenGL driver selected 16363 * @hide 16364 */ 16365 @Readable 16366 public static final String ANGLE_GL_DRIVER_SELECTION_PKGS = 16367 "angle_gl_driver_selection_pkgs"; 16368 16369 /** 16370 * List of selected OpenGL drivers, corresponding to the PKGs in GLOBAL_SETTINGS_DRIVER_PKGS 16371 * @hide 16372 */ 16373 @Readable 16374 public static final String ANGLE_GL_DRIVER_SELECTION_VALUES = 16375 "angle_gl_driver_selection_values"; 16376 16377 /** 16378 * Lists of ANGLE EGL features for debugging. 16379 * Each list of features is separated by a comma, each feature in each list is separated by 16380 * a colon. 16381 * e.g. feature1:feature2:feature3,feature1:feature3:feature5 16382 * @hide 16383 */ 16384 @Readable 16385 public static final String ANGLE_EGL_FEATURES = "angle_egl_features"; 16386 16387 /** 16388 * Show the "ANGLE In Use" dialog box to the user when ANGLE is the OpenGL driver. 16389 * The value is a boolean (1 or 0). 16390 * @hide 16391 */ 16392 @Readable 16393 public static final String SHOW_ANGLE_IN_USE_DIALOG_BOX = "show_angle_in_use_dialog_box"; 16394 16395 /** 16396 * Updatable driver global preference for all Apps. 16397 * 0 = Default 16398 * 1 = All Apps use updatable production driver 16399 * 2 = All apps use updatable prerelease driver 16400 * 3 = All Apps use system graphics driver 16401 * @hide 16402 */ 16403 @Readable 16404 public static final String UPDATABLE_DRIVER_ALL_APPS = "updatable_driver_all_apps"; 16405 16406 /** 16407 * List of Apps selected to use updatable production driver. 16408 * i.e. <pkg1>,<pkg2>,...,<pkgN> 16409 * @hide 16410 */ 16411 @Readable 16412 public static final String UPDATABLE_DRIVER_PRODUCTION_OPT_IN_APPS = 16413 "updatable_driver_production_opt_in_apps"; 16414 16415 /** 16416 * List of Apps selected to use updatable prerelease driver. 16417 * i.e. <pkg1>,<pkg2>,...,<pkgN> 16418 * @hide 16419 */ 16420 @Readable 16421 public static final String UPDATABLE_DRIVER_PRERELEASE_OPT_IN_APPS = 16422 "updatable_driver_prerelease_opt_in_apps"; 16423 16424 /** 16425 * List of Apps selected not to use updatable production driver. 16426 * i.e. <pkg1>,<pkg2>,...,<pkgN> 16427 * @hide 16428 */ 16429 @Readable 16430 public static final String UPDATABLE_DRIVER_PRODUCTION_OPT_OUT_APPS = 16431 "updatable_driver_production_opt_out_apps"; 16432 16433 /** 16434 * Apps on the denylist that are forbidden to use updatable production driver. 16435 * @hide 16436 */ 16437 @Readable 16438 public static final String UPDATABLE_DRIVER_PRODUCTION_DENYLIST = 16439 "updatable_driver_production_denylist"; 16440 16441 /** 16442 * List of denylists, each denylist is a denylist for a specific version of 16443 * updatable production driver. 16444 * @hide 16445 */ 16446 @Readable 16447 public static final String UPDATABLE_DRIVER_PRODUCTION_DENYLISTS = 16448 "updatable_driver_production_denylists"; 16449 16450 /** 16451 * Apps on the allowlist that are allowed to use updatable production driver. 16452 * The string is a list of application package names, seperated by comma. 16453 * i.e. <apk1>,<apk2>,...,<apkN> 16454 * @hide 16455 */ 16456 @Readable 16457 public static final String UPDATABLE_DRIVER_PRODUCTION_ALLOWLIST = 16458 "updatable_driver_production_allowlist"; 16459 16460 /** 16461 * List of libraries in sphal accessible by updatable driver 16462 * The string is a list of library names, separated by colon. 16463 * i.e. <lib1>:<lib2>:...:<libN> 16464 * @hide 16465 */ 16466 @Readable 16467 public static final String UPDATABLE_DRIVER_SPHAL_LIBRARIES = 16468 "updatable_driver_sphal_libraries"; 16469 16470 /** 16471 * Ordered GPU debug layer list for Vulkan 16472 * i.e. <layer1>:<layer2>:...:<layerN> 16473 * @hide 16474 */ 16475 @Readable 16476 public static final String GPU_DEBUG_LAYERS = "gpu_debug_layers"; 16477 16478 /** 16479 * Ordered GPU debug layer list for GLES 16480 * i.e. <layer1>:<layer2>:...:<layerN> 16481 * @hide 16482 */ 16483 @Readable 16484 public static final String GPU_DEBUG_LAYERS_GLES = "gpu_debug_layers_gles"; 16485 16486 /** 16487 * Addition app for GPU layer discovery 16488 * @hide 16489 */ 16490 @Readable 16491 public static final String GPU_DEBUG_LAYER_APP = "gpu_debug_layer_app"; 16492 16493 /** 16494 * Control whether the process CPU usage meter should be shown. 16495 * 16496 * @deprecated This functionality is no longer available as of 16497 * {@link android.os.Build.VERSION_CODES#N_MR1}. 16498 */ 16499 @Deprecated 16500 @Readable 16501 public static final String SHOW_PROCESSES = "show_processes"; 16502 16503 /** 16504 * If 1 low power mode (aka battery saver) is enabled. 16505 * @hide 16506 */ 16507 @TestApi 16508 @Readable 16509 public static final String LOW_POWER_MODE = "low_power"; 16510 16511 /** 16512 * If 1 extra low power mode is enabled. 16513 * @hide 16514 */ 16515 public static final String EXTRA_LOW_POWER_MODE = "extra_low_power"; 16516 16517 /** 16518 * If 1, battery saver ({@link #LOW_POWER_MODE}) will be re-activated after the device 16519 * is unplugged from a charger or rebooted. 16520 * @hide 16521 */ 16522 @TestApi 16523 @Readable 16524 public static final String LOW_POWER_MODE_STICKY = "low_power_sticky"; 16525 16526 /** 16527 * When a device is unplugged from a changer (or is rebooted), do not re-activate battery 16528 * saver even if {@link #LOW_POWER_MODE_STICKY} is 1, if the battery level is equal to or 16529 * above this threshold. 16530 * 16531 * @hide 16532 */ 16533 @Readable 16534 public static final String LOW_POWER_MODE_STICKY_AUTO_DISABLE_LEVEL = 16535 "low_power_sticky_auto_disable_level"; 16536 16537 /** 16538 * Whether sticky battery saver should be deactivated once the battery level has reached the 16539 * threshold specified by {@link #LOW_POWER_MODE_STICKY_AUTO_DISABLE_LEVEL}. 16540 * 16541 * @hide 16542 */ 16543 @Readable 16544 public static final String LOW_POWER_MODE_STICKY_AUTO_DISABLE_ENABLED = 16545 "low_power_sticky_auto_disable_enabled"; 16546 16547 /** 16548 * Battery level [1-100] at which low power mode automatically turns on. 16549 * If 0, it will not automatically turn on. For Q and newer, it will only automatically 16550 * turn on if the value is greater than 0 and the {@link #AUTOMATIC_POWER_SAVE_MODE} 16551 * setting is also set to 16552 * {@link android.os.PowerManager.AutoPowerSaveMode#POWER_SAVE_MODE_TRIGGER_PERCENTAGE}. 16553 * @see #AUTOMATIC_POWER_SAVE_MODE 16554 * @see android.os.PowerManager#getPowerSaveModeTrigger() 16555 * @hide 16556 */ 16557 @Readable 16558 public static final String LOW_POWER_MODE_TRIGGER_LEVEL = "low_power_trigger_level"; 16559 16560 /** 16561 * Whether battery saver is currently set to trigger based on percentage, dynamic power 16562 * savings trigger, or none. See {@link AutoPowerSaveModeTriggers} for 16563 * accepted values. 16564 * 16565 * @hide 16566 */ 16567 @TestApi 16568 @Readable 16569 public static final String AUTOMATIC_POWER_SAVE_MODE = "automatic_power_save_mode"; 16570 16571 /** 16572 * The setting that backs the disable threshold for the setPowerSavingsWarning api in 16573 * PowerManager 16574 * 16575 * @see android.os.PowerManager#setDynamicPowerSaveHint(boolean, int) 16576 * @hide 16577 */ 16578 @TestApi 16579 @Readable 16580 public static final String DYNAMIC_POWER_SAVINGS_DISABLE_THRESHOLD = 16581 "dynamic_power_savings_disable_threshold"; 16582 16583 /** 16584 * The setting which backs the setDynamicPowerSaveHint api in PowerManager. 16585 * 16586 * @see android.os.PowerManager#setDynamicPowerSaveHint(boolean, int) 16587 * @hide 16588 */ 16589 @TestApi 16590 @Readable 16591 public static final String DYNAMIC_POWER_SAVINGS_ENABLED = "dynamic_power_savings_enabled"; 16592 16593 /** 16594 * A long value indicating how much longer the system battery is estimated to last in 16595 * millis. See {@link #BATTERY_ESTIMATES_LAST_UPDATE_TIME} for the last time this value 16596 * was updated. 16597 * 16598 * @deprecated Use {@link PowerManager#getBatteryDischargePrediction()} instead. 16599 * @hide 16600 */ 16601 @Deprecated 16602 @Readable 16603 public static final String TIME_REMAINING_ESTIMATE_MILLIS = 16604 "time_remaining_estimate_millis"; 16605 16606 /** 16607 * A boolean indicating whether {@link #TIME_REMAINING_ESTIMATE_MILLIS} is customized 16608 * to the device's usage or using global models. See 16609 * {@link #BATTERY_ESTIMATES_LAST_UPDATE_TIME} for the last time this value was updated. 16610 * 16611 * @deprecated Use {@link PowerManager#isBatteryDischargePredictionPersonalized()} instead. 16612 * 16613 * @hide 16614 */ 16615 @Deprecated 16616 @Readable 16617 public static final String TIME_REMAINING_ESTIMATE_BASED_ON_USAGE = 16618 "time_remaining_estimate_based_on_usage"; 16619 16620 /** 16621 * A long value indicating how long the system battery takes to deplete from 100% to 0% on 16622 * average based on historical drain rates. See {@link #BATTERY_ESTIMATES_LAST_UPDATE_TIME} 16623 * for the last time this value was updated. 16624 * 16625 * @deprecated Use {@link PowerManager#getHistoricalDischargeTime()} instead. 16626 * @hide 16627 */ 16628 @Deprecated 16629 @Readable 16630 public static final String AVERAGE_TIME_TO_DISCHARGE = "average_time_to_discharge"; 16631 16632 /** 16633 * A long indicating the epoch time in milliseconds when 16634 * {@link #TIME_REMAINING_ESTIMATE_MILLIS}, {@link #TIME_REMAINING_ESTIMATE_BASED_ON_USAGE}, 16635 * and {@link #AVERAGE_TIME_TO_DISCHARGE} were last updated. 16636 * 16637 * @hide 16638 * @deprecated No longer needed due to {@link PowerManager#getBatteryDischargePrediction}. 16639 */ 16640 @Deprecated 16641 @Readable 16642 public static final String BATTERY_ESTIMATES_LAST_UPDATE_TIME = 16643 "battery_estimates_last_update_time"; 16644 16645 /** 16646 * The max value for {@link #LOW_POWER_MODE_TRIGGER_LEVEL}. If this setting is not set 16647 * or the value is 0, the default max will be used. 16648 * 16649 * @hide 16650 */ 16651 @Readable 16652 public static final String LOW_POWER_MODE_TRIGGER_LEVEL_MAX = "low_power_trigger_level_max"; 16653 16654 /** 16655 * See com.android.settingslib.fuelgauge.BatterySaverUtils. 16656 * @hide 16657 */ 16658 @Readable 16659 public static final String LOW_POWER_MODE_SUGGESTION_PARAMS = 16660 "low_power_mode_suggestion_params"; 16661 16662 /** 16663 * Whether low power mode reminder is enabled. If this value is 0, the device will not 16664 * receive low power notification. 16665 * 16666 * @hide 16667 */ 16668 public static final String LOW_POWER_MODE_REMINDER_ENABLED = 16669 "low_power_mode_reminder_enabled"; 16670 16671 /** 16672 * If not 0, the activity manager will aggressively finish activities and 16673 * processes as soon as they are no longer needed. If 0, the normal 16674 * extended lifetime is used. 16675 */ 16676 @Readable 16677 public static final String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; 16678 16679 /** 16680 * If nonzero, all system error dialogs will be hidden. For example, the 16681 * crash and ANR dialogs will not be shown, and the system will just proceed 16682 * as if they had been accepted by the user. 16683 * @hide 16684 */ 16685 @TestApi 16686 @Readable 16687 public static final String HIDE_ERROR_DIALOGS = "hide_error_dialogs"; 16688 16689 /** 16690 * Use Dock audio output for media: 16691 * 0 = disabled 16692 * 1 = enabled 16693 * @hide 16694 */ 16695 @Readable 16696 public static final String DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled"; 16697 16698 /** 16699 * The surround sound formats AC3, DTS or IEC61937 are 16700 * available for use if they are detected. 16701 * This is the default mode. 16702 * 16703 * Note that AUTO is equivalent to ALWAYS for Android TVs and other 16704 * devices that have an S/PDIF output. This is because S/PDIF 16705 * is unidirectional and the TV cannot know if a decoder is 16706 * connected. So it assumes they are always available. 16707 * @hide 16708 */ 16709 public static final int ENCODED_SURROUND_OUTPUT_AUTO = 0; 16710 16711 /** 16712 * AC3, DTS or IEC61937 are NEVER available, even if they 16713 * are detected by the hardware. Those formats will not be 16714 * reported. 16715 * 16716 * An example use case would be an AVR reports that it is capable of 16717 * surround sound decoding but is broken. If NEVER is chosen 16718 * then apps must use PCM output instead of encoded output. 16719 * @hide 16720 */ 16721 public static final int ENCODED_SURROUND_OUTPUT_NEVER = 1; 16722 16723 /** 16724 * AC3, DTS or IEC61937 are ALWAYS available, even if they 16725 * are not detected by the hardware. Those formats will be 16726 * reported as part of the HDMI output capability. Applications 16727 * are then free to use either PCM or encoded output. 16728 * 16729 * An example use case would be a when TV was connected over 16730 * TOS-link to an AVR. But the TV could not see it because TOS-link 16731 * is unidirectional. 16732 * @hide 16733 */ 16734 public static final int ENCODED_SURROUND_OUTPUT_ALWAYS = 2; 16735 16736 /** 16737 * Surround sound formats are available according to the choice 16738 * of user, even if they are not detected by the hardware. Those 16739 * formats will be reported as part of the HDMI output capability. 16740 * Applications are then free to use either PCM or encoded output. 16741 * 16742 * An example use case would be an AVR that doesn't report a surround 16743 * format while the user knows the AVR does support it. 16744 * @hide 16745 */ 16746 public static final int ENCODED_SURROUND_OUTPUT_MANUAL = 3; 16747 16748 /** 16749 * The maximum value for surround sound output mode in Android S. 16750 * @hide 16751 */ 16752 public static final int ENCODED_SURROUND_SC_MAX = ENCODED_SURROUND_OUTPUT_MANUAL; 16753 16754 /** 16755 * Set to ENCODED_SURROUND_OUTPUT_AUTO, 16756 * ENCODED_SURROUND_OUTPUT_NEVER, 16757 * ENCODED_SURROUND_OUTPUT_ALWAYS or 16758 * ENCODED_SURROUND_OUTPUT_MANUAL 16759 * @hide 16760 */ 16761 @Readable 16762 public static final String ENCODED_SURROUND_OUTPUT = "encoded_surround_output"; 16763 16764 /** 16765 * Surround sounds formats that are enabled when ENCODED_SURROUND_OUTPUT is set to 16766 * ENCODED_SURROUND_OUTPUT_MANUAL. Encoded as comma separated list. Allowed values 16767 * are the format constants defined in AudioFormat.java. Ex: 16768 * 16769 * "5,6" 16770 * 16771 * @hide 16772 */ 16773 @Readable 16774 public static final String ENCODED_SURROUND_OUTPUT_ENABLED_FORMATS = 16775 "encoded_surround_output_enabled_formats"; 16776 16777 /** 16778 * Persisted safe headphone volume management state by AudioService 16779 * @hide 16780 */ 16781 @Readable 16782 public static final String AUDIO_SAFE_VOLUME_STATE = "audio_safe_volume_state"; 16783 16784 /** 16785 * Persisted safe hearding current CSD value. Values are stored as float percentages where 16786 * 1.f represents 100% sound dose has been reached. 16787 * @hide 16788 */ 16789 public static final String AUDIO_SAFE_CSD_CURRENT_VALUE = "audio_safe_csd_current_value"; 16790 16791 /** 16792 * Persisted safe hearding next CSD warning value. Values are stored as float percentages. 16793 * @hide 16794 */ 16795 public static final String AUDIO_SAFE_CSD_NEXT_WARNING = "audio_safe_csd_next_warning"; 16796 16797 /** 16798 * Persisted safe hearding dose records (see {@link android.media.SoundDoseRecord}) 16799 * @hide 16800 */ 16801 public static final String AUDIO_SAFE_CSD_DOSE_RECORDS = "audio_safe_csd_dose_records"; 16802 16803 /** 16804 * URL for tzinfo (time zone) updates 16805 * @hide 16806 */ 16807 @Readable 16808 public static final String TZINFO_UPDATE_CONTENT_URL = "tzinfo_content_url"; 16809 16810 /** 16811 * URL for tzinfo (time zone) update metadata 16812 * @hide 16813 */ 16814 @Readable 16815 public static final String TZINFO_UPDATE_METADATA_URL = "tzinfo_metadata_url"; 16816 16817 /** 16818 * URL for selinux (mandatory access control) updates 16819 * @hide 16820 */ 16821 @Readable 16822 public static final String SELINUX_UPDATE_CONTENT_URL = "selinux_content_url"; 16823 16824 /** 16825 * URL for selinux (mandatory access control) update metadata 16826 * @hide 16827 */ 16828 @Readable 16829 public static final String SELINUX_UPDATE_METADATA_URL = "selinux_metadata_url"; 16830 16831 /** 16832 * URL for sms short code updates 16833 * @hide 16834 */ 16835 @Readable 16836 public static final String SMS_SHORT_CODES_UPDATE_CONTENT_URL = 16837 "sms_short_codes_content_url"; 16838 16839 /** 16840 * URL for sms short code update metadata 16841 * @hide 16842 */ 16843 @Readable 16844 public static final String SMS_SHORT_CODES_UPDATE_METADATA_URL = 16845 "sms_short_codes_metadata_url"; 16846 16847 /** 16848 * URL for apn_db updates 16849 * @hide 16850 */ 16851 @Readable 16852 public static final String APN_DB_UPDATE_CONTENT_URL = "apn_db_content_url"; 16853 16854 /** 16855 * URL for apn_db update metadata 16856 * @hide 16857 */ 16858 @Readable 16859 public static final String APN_DB_UPDATE_METADATA_URL = "apn_db_metadata_url"; 16860 16861 /** 16862 * URL for cert pinlist updates 16863 * @hide 16864 */ 16865 @Readable 16866 public static final String CERT_PIN_UPDATE_CONTENT_URL = "cert_pin_content_url"; 16867 16868 /** 16869 * URL for cert pinlist updates 16870 * @hide 16871 */ 16872 @Readable 16873 public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url"; 16874 16875 /** 16876 * URL for intent firewall updates 16877 * @hide 16878 */ 16879 @Readable 16880 public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL = 16881 "intent_firewall_content_url"; 16882 16883 /** 16884 * URL for intent firewall update metadata 16885 * @hide 16886 */ 16887 @Readable 16888 public static final String INTENT_FIREWALL_UPDATE_METADATA_URL = 16889 "intent_firewall_metadata_url"; 16890 16891 /** 16892 * URL for lang id model updates 16893 * @hide 16894 */ 16895 @Readable 16896 public static final String LANG_ID_UPDATE_CONTENT_URL = "lang_id_content_url"; 16897 16898 /** 16899 * URL for lang id model update metadata 16900 * @hide 16901 */ 16902 @Readable 16903 public static final String LANG_ID_UPDATE_METADATA_URL = "lang_id_metadata_url"; 16904 16905 /** 16906 * URL for smart selection model updates 16907 * @hide 16908 */ 16909 @Readable 16910 public static final String SMART_SELECTION_UPDATE_CONTENT_URL = 16911 "smart_selection_content_url"; 16912 16913 /** 16914 * URL for smart selection model update metadata 16915 * @hide 16916 */ 16917 @Readable 16918 public static final String SMART_SELECTION_UPDATE_METADATA_URL = 16919 "smart_selection_metadata_url"; 16920 16921 /** 16922 * URL for conversation actions model updates 16923 * @hide 16924 */ 16925 @Readable 16926 public static final String CONVERSATION_ACTIONS_UPDATE_CONTENT_URL = 16927 "conversation_actions_content_url"; 16928 16929 /** 16930 * URL for conversation actions model update metadata 16931 * @hide 16932 */ 16933 @Readable 16934 public static final String CONVERSATION_ACTIONS_UPDATE_METADATA_URL = 16935 "conversation_actions_metadata_url"; 16936 16937 /** 16938 * SELinux enforcement status. If 0, permissive; if 1, enforcing. 16939 * @hide 16940 */ 16941 @Readable 16942 public static final String SELINUX_STATUS = "selinux_status"; 16943 16944 /** 16945 * Developer setting to force RTL layout. 16946 * @hide 16947 */ 16948 @Readable 16949 public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl"; 16950 16951 /** 16952 * Milliseconds after screen-off after which low battery sounds will be silenced. 16953 * 16954 * If zero, battery sounds will always play. 16955 * Defaults to @integer/def_low_battery_sound_timeout in SettingsProvider. 16956 * 16957 * @hide 16958 */ 16959 @Readable 16960 public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout"; 16961 16962 /** 16963 * Milliseconds to wait before bouncing Wi-Fi after settings is restored. Note that after 16964 * the caller is done with this, they should call {@link ContentResolver#delete} to 16965 * clean up any value that they may have written. 16966 * 16967 * @hide 16968 */ 16969 @Readable 16970 public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms"; 16971 16972 /** 16973 * Defines global runtime overrides to window policy. 16974 * 16975 * See {@link com.android.server.wm.PolicyControl} for value format. 16976 * 16977 * @hide 16978 */ 16979 @Readable 16980 public static final String POLICY_CONTROL = "policy_control"; 16981 16982 /** 16983 * {@link android.view.DisplayCutout DisplayCutout} emulation mode. 16984 * 16985 * @hide 16986 */ 16987 @Readable 16988 public static final String EMULATE_DISPLAY_CUTOUT = "emulate_display_cutout"; 16989 16990 /** @hide */ public static final int EMULATE_DISPLAY_CUTOUT_OFF = 0; 16991 /** @hide */ public static final int EMULATE_DISPLAY_CUTOUT_ON = 1; 16992 16993 /** 16994 * A colon separated list of keys for Settings Slices. 16995 * 16996 * @hide 16997 */ 16998 @Readable 16999 public static final String BLOCKED_SLICES = "blocked_slices"; 17000 17001 /** 17002 * Defines global zen mode. ZEN_MODE_OFF, ZEN_MODE_IMPORTANT_INTERRUPTIONS, 17003 * or ZEN_MODE_NO_INTERRUPTIONS. 17004 * 17005 * @hide 17006 */ 17007 @UnsupportedAppUsage 17008 @Readable 17009 public static final String ZEN_MODE = "zen_mode"; 17010 17011 /** @hide */ 17012 @UnsupportedAppUsage 17013 public static final int ZEN_MODE_OFF = 0; 17014 /** @hide */ 17015 @UnsupportedAppUsage 17016 public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; 17017 /** @hide */ 17018 @UnsupportedAppUsage 17019 public static final int ZEN_MODE_NO_INTERRUPTIONS = 2; 17020 /** @hide */ 17021 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 17022 public static final int ZEN_MODE_ALARMS = 3; 17023 17024 /** 17025 * A comma-separated list of HDR formats that have been disabled by the user. 17026 * <p> 17027 * If present, these formats will not be reported to apps, even if the display supports 17028 * them. This list is treated as empty if the ARE_USER_DISABLED_HDR_FORMATS_ALLOWED setting 17029 * is '1'. 17030 * </p> 17031 * @hide 17032 */ 17033 @TestApi 17034 @Readable 17035 @SuppressLint("NoSettingsProvider") 17036 public static final String USER_DISABLED_HDR_FORMATS = "user_disabled_hdr_formats"; 17037 17038 /** 17039 * Whether or not user-disabled HDR formats are allowed. 17040 * <p> 17041 * The value is boolean (1 or 0). The value '1' means the user preference for disabling a 17042 * format is ignored, and the disabled formats are still reported to apps (if supported 17043 * by the display). The value '0' means the user-disabled formats are not reported to 17044 * apps, even if the display supports them. 17045 * </p><p> 17046 * The list of formats disabled by the user are contained in the 17047 * USER_DISABLED_HDR_FORMATS setting. This list is treated as empty when the value of 17048 * this setting is '1'. 17049 * </p> 17050 * @hide 17051 */ 17052 @TestApi 17053 @Readable 17054 @SuppressLint("NoSettingsProvider") 17055 public static final String ARE_USER_DISABLED_HDR_FORMATS_ALLOWED = 17056 "are_user_disabled_hdr_formats_allowed"; 17057 17058 /** 17059 * Whether or not syncs (bulk set operations) for {@link DeviceConfig} are currently 17060 * persistently disabled. This is only used for the {@link 17061 * Config#SYNC_DISABLED_MODE_PERSISTENT persistent} mode, {@link 17062 * Config#SYNC_DISABLED_MODE_UNTIL_REBOOT until_reboot} mode is not stored in settings. 17063 * The value is boolean (1 or 0). The value '1' means that {@link 17064 * DeviceConfig#setProperties(DeviceConfig.Properties)} will return {@code false}. 17065 * 17066 * @hide 17067 */ 17068 public static final String DEVICE_CONFIG_SYNC_DISABLED = "device_config_sync_disabled"; 17069 17070 17071 /** 17072 * Whether back preview animations are played when user does a back gesture or presses 17073 * the back button. 17074 * @hide 17075 */ 17076 public static final String ENABLE_BACK_ANIMATION = "enable_back_animation"; 17077 17078 /** 17079 * An allow list of packages for which the user has granted the permission to communicate 17080 * across profiles. 17081 * 17082 * @hide 17083 */ 17084 @Readable 17085 @FlaggedApi(android.app.admin.flags.Flags.FLAG_BACKUP_CONNECTED_APPS_SETTINGS) 17086 public static final String CONNECTED_APPS_ALLOWED_PACKAGES = 17087 "connected_apps_allowed_packages"; 17088 17089 /** 17090 * A block list of packages for which the user has denied the permission to communicate 17091 * across profiles. 17092 * 17093 * @hide 17094 */ 17095 @Readable 17096 @FlaggedApi(android.app.admin.flags.Flags.FLAG_BACKUP_CONNECTED_APPS_SETTINGS) 17097 public static final String CONNECTED_APPS_DISALLOWED_PACKAGES = 17098 "connected_apps_disallowed_packages"; 17099 zenModeToString(int mode)17100 /** @hide */ public static String zenModeToString(int mode) { 17101 if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS"; 17102 if (mode == ZEN_MODE_ALARMS) return "ZEN_MODE_ALARMS"; 17103 if (mode == ZEN_MODE_NO_INTERRUPTIONS) return "ZEN_MODE_NO_INTERRUPTIONS"; 17104 return "ZEN_MODE_OFF"; 17105 } 17106 isValidZenMode(int value)17107 /** @hide */ public static boolean isValidZenMode(int value) { 17108 switch (value) { 17109 case Global.ZEN_MODE_OFF: 17110 case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS: 17111 case Global.ZEN_MODE_ALARMS: 17112 case Global.ZEN_MODE_NO_INTERRUPTIONS: 17113 return true; 17114 default: 17115 return false; 17116 } 17117 } 17118 17119 /** 17120 * Value of the ringer before entering zen mode. 17121 * 17122 * @hide 17123 */ 17124 @Readable 17125 public static final String ZEN_MODE_RINGER_LEVEL = "zen_mode_ringer_level"; 17126 17127 /** 17128 * Opaque value, changes when persisted zen mode configuration changes. 17129 * 17130 * @hide 17131 */ 17132 @UnsupportedAppUsage 17133 @Readable 17134 public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag"; 17135 17136 /** 17137 * @deprecated Use {@link android.provider.Settings.Secure#ZEN_DURATION} instead 17138 * @hide 17139 */ 17140 @Deprecated 17141 public static final String ZEN_DURATION = "zen_duration"; 17142 17143 /** 17144 * @deprecated Use {@link android.provider.Settings.Secure#ZEN_DURATION_PROMPT} instead 17145 * @hide 17146 */ 17147 @Deprecated 17148 public static final int ZEN_DURATION_PROMPT = -1; 17149 17150 /** 17151 * @deprecated Use {@link android.provider.Settings.Secure#ZEN_DURATION_FOREVER} instead 17152 * @hide 17153 */ 17154 @Deprecated 17155 public static final int ZEN_DURATION_FOREVER = 0; 17156 17157 /** 17158 * Defines global heads up toggle. One of HEADS_UP_OFF, HEADS_UP_ON. 17159 * 17160 * @hide 17161 */ 17162 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 17163 @Readable 17164 public static final String HEADS_UP_NOTIFICATIONS_ENABLED = 17165 "heads_up_notifications_enabled"; 17166 17167 /** @hide */ 17168 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 17169 public static final int HEADS_UP_OFF = 0; 17170 /** @hide */ 17171 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 17172 public static final int HEADS_UP_ON = 1; 17173 17174 /** 17175 * The refresh rate chosen by the user. 17176 * 17177 * @hide 17178 */ 17179 @TestApi 17180 @Readable 17181 @SuppressLint("NoSettingsProvider") 17182 public static final String USER_PREFERRED_REFRESH_RATE = "user_preferred_refresh_rate"; 17183 17184 /** 17185 * The resolution height chosen by the user. 17186 * 17187 * @hide 17188 */ 17189 @TestApi 17190 @Readable 17191 @SuppressLint("NoSettingsProvider") 17192 public static final String USER_PREFERRED_RESOLUTION_HEIGHT = 17193 "user_preferred_resolution_height"; 17194 17195 /** 17196 * The resolution width chosen by the user. 17197 * 17198 * @hide 17199 */ 17200 @TestApi 17201 @Readable 17202 @SuppressLint("NoSettingsProvider") 17203 public static final String USER_PREFERRED_RESOLUTION_WIDTH = 17204 "user_preferred_resolution_width"; 17205 17206 /** 17207 * The HDR output mode chosen by the user. This is one of: 17208 * {@link android.hardware.display.HdrConversionMode#HDR_CONVERSION_PASSTHROUGH}, 17209 * {@link android.hardware.display.HdrConversionMode#HDR_CONVERSION_SYSTEM}, 17210 * {@link android.hardware.display.HdrConversionMode#HDR_CONVERSION_FORCE}. 17211 * 17212 * @hide 17213 */ 17214 @TestApi 17215 @Readable 17216 public static final String HDR_CONVERSION_MODE = "hdr_conversion_mode"; 17217 17218 /** 17219 * The output HDR type chosen by the user in case when {@link #HDR_CONVERSION_MODE} is 17220 * {@link #HDR_CONVERSION_FORCE}. This is one of: 17221 * {@link android.view.Display.HdrCapabilities#HDR_TYPE_INVALID}, 17222 * {@link android.view.Display.HdrCapabilities#HDR_TYPE_DOLBY_VISION}, 17223 * {@link android.view.Display.HdrCapabilities#HDR_TYPE_HDR10}, 17224 * {@link android.view.Display.HdrCapabilities#HDR_TYPE_HLG}, 17225 * {@link android.view.Display.HdrCapabilities#HDR_TYPE_HDR10_PLUS} 17226 * <p> 17227 * The value is {@link android.view.Display.HdrCapabilities#HDR_TYPE_INVALID} when user 17228 * chooses SDR output type. </p> 17229 * 17230 * @hide 17231 */ 17232 @TestApi 17233 @Readable 17234 public static final String HDR_FORCE_CONVERSION_TYPE = "hdr_force_conversion_type"; 17235 17236 /** 17237 * The name of the device 17238 */ 17239 @Readable 17240 public static final String DEVICE_NAME = "device_name"; 17241 17242 /** 17243 * Whether the NetworkScoringService has been first initialized. 17244 * <p> 17245 * Type: int (0 for false, 1 for true) 17246 * @hide 17247 */ 17248 @Readable 17249 public static final String NETWORK_SCORING_PROVISIONED = "network_scoring_provisioned"; 17250 17251 /** 17252 * On devices that use full-disk encryption, indicates whether the primary user's lockscreen 17253 * credential is required to decrypt the device on boot. 17254 * <p> 17255 * This setting does not do anything on devices that use file-based encryption. With 17256 * file-based encryption, the device boots without a credential being needed, but the 17257 * lockscreen credential is required to unlock credential-encrypted storage. All devices 17258 * that launched with Android 10 or higher use file-based encryption. 17259 * <p> 17260 * Type: int (0 for false, 1 for true) 17261 * 17262 * @hide 17263 */ 17264 @SystemApi 17265 @Readable 17266 public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt"; 17267 17268 /** 17269 * Whether the Volte is enabled. If this setting is not set then we use the Carrier Config 17270 * value 17271 * {@link android.telephony.CarrierConfigManager#KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL}. 17272 * <p> 17273 * Type: int (0 for false, 1 for true) 17274 * @hide 17275 * @deprecated Use 17276 * {@link android.provider.Telephony.SimInfo#COLUMN_ENHANCED_4G_MODE_ENABLED} instead. 17277 */ 17278 @Deprecated 17279 @Readable 17280 public static final String ENHANCED_4G_MODE_ENABLED = 17281 Telephony.SimInfo.COLUMN_ENHANCED_4G_MODE_ENABLED; 17282 17283 /** 17284 * Whether VT (Video Telephony over IMS) is enabled 17285 * <p> 17286 * Type: int (0 for false, 1 for true) 17287 * 17288 * @hide 17289 * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_VT_IMS_ENABLED} instead. 17290 */ 17291 @Deprecated 17292 @Readable 17293 public static final String VT_IMS_ENABLED = Telephony.SimInfo.COLUMN_VT_IMS_ENABLED; 17294 17295 /** 17296 * Whether WFC is enabled 17297 * <p> 17298 * Type: int (0 for false, 1 for true) 17299 * 17300 * @hide 17301 * @deprecated Use 17302 * {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_ENABLED} instead. 17303 */ 17304 @Deprecated 17305 @Readable 17306 public static final String WFC_IMS_ENABLED = Telephony.SimInfo.COLUMN_WFC_IMS_ENABLED; 17307 17308 /** 17309 * WFC mode on home/non-roaming network. 17310 * <p> 17311 * Type: int - 2=Wi-Fi preferred, 1=Cellular preferred, 0=Wi-Fi only 17312 * 17313 * @hide 17314 * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_MODE} instead. 17315 */ 17316 @Deprecated 17317 @Readable 17318 public static final String WFC_IMS_MODE = Telephony.SimInfo.COLUMN_WFC_IMS_MODE; 17319 17320 /** 17321 * WFC mode on roaming network. 17322 * <p> 17323 * Type: int - see {@link #WFC_IMS_MODE} for values 17324 * 17325 * @hide 17326 * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_ROAMING_MODE} 17327 * instead. 17328 */ 17329 @Deprecated 17330 @Readable 17331 public static final String WFC_IMS_ROAMING_MODE = 17332 Telephony.SimInfo.COLUMN_WFC_IMS_ROAMING_MODE; 17333 17334 /** 17335 * Whether WFC roaming is enabled 17336 * <p> 17337 * Type: int (0 for false, 1 for true) 17338 * 17339 * @hide 17340 * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_ROAMING_ENABLED} 17341 * instead 17342 */ 17343 @Deprecated 17344 @Readable 17345 public static final String WFC_IMS_ROAMING_ENABLED = 17346 Telephony.SimInfo.COLUMN_WFC_IMS_ROAMING_ENABLED; 17347 17348 /** 17349 * Whether user can enable/disable LTE as a preferred network. A carrier might control 17350 * this via gservices, OMA-DM, carrier app, etc. 17351 * <p> 17352 * Type: int (0 for false, 1 for true) 17353 * @hide 17354 */ 17355 @Readable 17356 public static final String LTE_SERVICE_FORCED = "lte_service_forced"; 17357 17358 17359 /** 17360 * Specifies the behaviour the lid triggers when closed 17361 * <p> 17362 * See WindowManagerPolicy.WindowManagerFuncs 17363 * @hide 17364 */ 17365 @Readable 17366 public static final String LID_BEHAVIOR = "lid_behavior"; 17367 17368 /** 17369 * Ephemeral app cookie max size in bytes. 17370 * <p> 17371 * Type: int 17372 * @hide 17373 */ 17374 @Readable 17375 public static final String EPHEMERAL_COOKIE_MAX_SIZE_BYTES = 17376 "ephemeral_cookie_max_size_bytes"; 17377 17378 /** 17379 * Toggle to enable/disable the entire ephemeral feature. By default, ephemeral is 17380 * enabled. Set to zero to disable. 17381 * <p> 17382 * Type: int (0 for false, 1 for true) 17383 * 17384 * @hide 17385 */ 17386 @Readable 17387 public static final String ENABLE_EPHEMERAL_FEATURE = "enable_ephemeral_feature"; 17388 17389 /** 17390 * Toggle to enable/disable dexopt for instant applications. The default is for dexopt 17391 * to be disabled. 17392 * <p> 17393 * Type: int (0 to disable, 1 to enable) 17394 * 17395 * @hide 17396 */ 17397 @Readable 17398 public static final String INSTANT_APP_DEXOPT_ENABLED = "instant_app_dexopt_enabled"; 17399 17400 /** 17401 * The min period for caching installed instant apps in milliseconds. 17402 * <p> 17403 * Type: long 17404 * @hide 17405 */ 17406 @Readable 17407 public static final String INSTALLED_INSTANT_APP_MIN_CACHE_PERIOD = 17408 "installed_instant_app_min_cache_period"; 17409 17410 /** 17411 * The max period for caching installed instant apps in milliseconds. 17412 * <p> 17413 * Type: long 17414 * @hide 17415 */ 17416 @Readable 17417 public static final String INSTALLED_INSTANT_APP_MAX_CACHE_PERIOD = 17418 "installed_instant_app_max_cache_period"; 17419 17420 /** 17421 * The min period for caching uninstalled instant apps in milliseconds. 17422 * <p> 17423 * Type: long 17424 * @hide 17425 */ 17426 @Readable 17427 public static final String UNINSTALLED_INSTANT_APP_MIN_CACHE_PERIOD = 17428 "uninstalled_instant_app_min_cache_period"; 17429 17430 /** 17431 * The max period for caching uninstalled instant apps in milliseconds. 17432 * <p> 17433 * Type: long 17434 * @hide 17435 */ 17436 @Readable 17437 public static final String UNINSTALLED_INSTANT_APP_MAX_CACHE_PERIOD = 17438 "uninstalled_instant_app_max_cache_period"; 17439 17440 /** 17441 * The min period for caching unused static shared libs in milliseconds. 17442 * <p> 17443 * Type: long 17444 * @hide 17445 */ 17446 @Readable 17447 public static final String UNUSED_STATIC_SHARED_LIB_MIN_CACHE_PERIOD = 17448 "unused_static_shared_lib_min_cache_period"; 17449 17450 /** 17451 * Allows switching users when system user is locked. 17452 * <p> 17453 * Type: int 17454 * @hide 17455 */ 17456 @Readable 17457 public static final String ALLOW_USER_SWITCHING_WHEN_SYSTEM_USER_LOCKED = 17458 "allow_user_switching_when_system_user_locked"; 17459 17460 /** 17461 * Boot count since the device starts running API level 24. 17462 * <p> 17463 * Type: int 17464 */ 17465 @Readable 17466 public static final String BOOT_COUNT = "boot_count"; 17467 17468 /** 17469 * Whether the safe boot is disallowed. 17470 * 17471 * <p>This setting should have the identical value as the corresponding user restriction. 17472 * The purpose of the setting is to make the restriction available in early boot stages 17473 * before the user restrictions are loaded. 17474 * @hide 17475 */ 17476 @Readable 17477 public static final String SAFE_BOOT_DISALLOWED = "safe_boot_disallowed"; 17478 17479 /** 17480 * Indicates whether this device is currently in retail demo mode. If true, the device 17481 * usage is severely limited. 17482 * <p> 17483 * Type: int (0 for false, 1 for true) 17484 * 17485 * @hide 17486 */ 17487 @SystemApi 17488 @Readable 17489 public static final String DEVICE_DEMO_MODE = "device_demo_mode"; 17490 17491 /** 17492 * The reason for the settings database being downgraded. This is only for 17493 * troubleshooting purposes and its value should not be interpreted in any way. 17494 * 17495 * Type: string 17496 * 17497 * @hide 17498 */ 17499 @Readable 17500 public static final String DATABASE_DOWNGRADE_REASON = "database_downgrade_reason"; 17501 17502 /** 17503 * The build id of when the settings database was first created (or re-created due it 17504 * being missing). 17505 * 17506 * Type: string 17507 * 17508 * @hide 17509 */ 17510 @Readable 17511 public static final String DATABASE_CREATION_BUILDID = "database_creation_buildid"; 17512 17513 /** 17514 * Flag to toggle journal mode WAL on or off for the contacts database. WAL is enabled by 17515 * default. Set to 0 to disable. 17516 * 17517 * @hide 17518 */ 17519 @Readable 17520 public static final String CONTACTS_DATABASE_WAL_ENABLED = "contacts_database_wal_enabled"; 17521 17522 /** 17523 * Flag to enable the link to location permissions in location setting. Set to 0 to disable. 17524 * 17525 * @hide 17526 */ 17527 @Readable 17528 public static final String LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED = 17529 "location_settings_link_to_permissions_enabled"; 17530 17531 /** 17532 * Flag to set the waiting time for removing invisible euicc profiles inside System > 17533 * Settings. 17534 * Type: long 17535 * 17536 * @hide 17537 */ 17538 @Readable 17539 public static final String EUICC_REMOVING_INVISIBLE_PROFILES_TIMEOUT_MILLIS = 17540 "euicc_removing_invisible_profiles_timeout_millis"; 17541 17542 /** 17543 * Flag to set the waiting time for euicc factory reset inside System > Settings 17544 * Type: long 17545 * 17546 * @hide 17547 */ 17548 @Readable 17549 public static final String EUICC_FACTORY_RESET_TIMEOUT_MILLIS = 17550 "euicc_factory_reset_timeout_millis"; 17551 17552 /** 17553 * Flag to set the waiting time for euicc slot switch. 17554 * Type: long 17555 * 17556 * @hide 17557 */ 17558 public static final String EUICC_SWITCH_SLOT_TIMEOUT_MILLIS = 17559 "euicc_switch_slot_timeout_millis"; 17560 17561 /** 17562 * Flag to set the waiting time for enabling multi SIM slot. 17563 * Type: long 17564 * 17565 * @hide 17566 */ 17567 public static final String ENABLE_MULTI_SLOT_TIMEOUT_MILLIS = 17568 "enable_multi_slot_timeout_millis"; 17569 17570 /** 17571 * Flag to set the timeout for when to refresh the storage settings cached data. 17572 * Type: long 17573 * 17574 * @hide 17575 */ 17576 @Readable 17577 public static final String STORAGE_SETTINGS_CLOBBER_THRESHOLD = 17578 "storage_settings_clobber_threshold"; 17579 17580 /** 17581 * If set to 1, SettingsProvider's restoreAnyVersion="true" attribute will be ignored 17582 * and restoring to lower version of platform API will be skipped. 17583 * 17584 * @hide 17585 */ 17586 @Readable 17587 public static final String OVERRIDE_SETTINGS_PROVIDER_RESTORE_ANY_VERSION = 17588 "override_settings_provider_restore_any_version"; 17589 /** 17590 * Flag to toggle whether system services report attribution chains when they attribute 17591 * battery use via a {@code WorkSource}. 17592 * 17593 * Type: int (0 to disable, 1 to enable) 17594 * 17595 * @hide 17596 */ 17597 @Readable 17598 public static final String CHAINED_BATTERY_ATTRIBUTION_ENABLED = 17599 "chained_battery_attribution_enabled"; 17600 17601 /** 17602 * Toggle to enable/disable the incremental ADB installation by default. 17603 * If not set, default adb installations are incremental; set to zero to use full ones. 17604 * Note: only ADB uses it, no usages in the Framework code. 17605 * <p> 17606 * Type: int (0 to disable, 1 to enable) 17607 * 17608 * @hide 17609 */ 17610 @Readable 17611 public static final String ENABLE_ADB_INCREMENTAL_INSTALL_DEFAULT = 17612 "enable_adb_incremental_install_default"; 17613 17614 /** 17615 * The packages allowlisted to be run in autofill compatibility mode. The list 17616 * of packages is {@code ":"} colon delimited, and each entry has the name of the 17617 * package and an optional list of url bar resource ids (the list is delimited by 17618 * brackets&mdash{@code [} and {@code ]}&mdash and is also comma delimited). 17619 * 17620 * <p>For example, a list with 3 packages {@code p1}, {@code p2}, and {@code p3}, where 17621 * package {@code p1} have one id ({@code url_bar}, {@code p2} has none, and {@code p3 } 17622 * have 2 ids {@code url_foo} and {@code url_bas}) would be 17623 * {@code p1[url_bar]:p2:p3[url_foo,url_bas]} 17624 * 17625 * @hide 17626 * @deprecated Use {@link android.view.autofill.AutofillManager 17627 * #DEVICE_CONFIG_AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES} instead. 17628 */ 17629 @Deprecated 17630 @SystemApi 17631 @Readable 17632 public static final String AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES = 17633 "autofill_compat_mode_allowed_packages"; 17634 17635 /** 17636 * Level of autofill logging. 17637 * 17638 * <p>Valid values are 17639 * {@link android.view.autofill.AutofillManager#NO_LOGGING}, 17640 * {@link android.view.autofill.AutofillManager#FLAG_ADD_CLIENT_DEBUG}, or 17641 * {@link android.view.autofill.AutofillManager#FLAG_ADD_CLIENT_VERBOSE}. 17642 * 17643 * @hide 17644 */ 17645 @Readable 17646 public static final String AUTOFILL_LOGGING_LEVEL = "autofill_logging_level"; 17647 17648 /** 17649 * Maximum number of partitions that can be allowed in an autofill session. 17650 * 17651 * @hide 17652 */ 17653 @Readable 17654 public static final String AUTOFILL_MAX_PARTITIONS_SIZE = "autofill_max_partitions_size"; 17655 17656 /** 17657 * Maximum number of visible datasets in the Autofill dataset picker UI, or {@code 0} to use 17658 * the default value from resources. 17659 * 17660 * @hide 17661 */ 17662 @Readable 17663 public static final String AUTOFILL_MAX_VISIBLE_DATASETS = "autofill_max_visible_datasets"; 17664 17665 /** 17666 * Indicates whether a stylus has ever been used on the device. 17667 * 17668 * @hide 17669 */ 17670 @Readable 17671 @SuppressLint("NoSettingsProvider") 17672 public static final String STYLUS_EVER_USED = "stylus_ever_used"; 17673 17674 /** 17675 * Exemptions to the hidden API denylist. 17676 * 17677 * @hide 17678 */ 17679 @TestApi 17680 @Readable 17681 public static final String HIDDEN_API_BLACKLIST_EXEMPTIONS = 17682 "hidden_api_blacklist_exemptions"; 17683 17684 /** 17685 * Hidden API enforcement policy for apps. 17686 * 17687 * Values correspond to @{@link 17688 * android.content.pm.ApplicationInfo.HiddenApiEnforcementPolicy} 17689 * 17690 * @hide 17691 */ 17692 @TestApi 17693 @Readable 17694 public static final String HIDDEN_API_POLICY = "hidden_api_policy"; 17695 17696 /** 17697 * Flag for forcing {@link com.android.server.compat.OverrideValidatorImpl} 17698 * to consider this a non-debuggable build. 17699 * 17700 * @hide 17701 */ 17702 public static final String FORCE_NON_DEBUGGABLE_FINAL_BUILD_FOR_COMPAT = 17703 "force_non_debuggable_final_build_for_compat"; 17704 17705 17706 /** 17707 * Current version of signed configuration applied. 17708 * 17709 * @hide 17710 */ 17711 @Readable 17712 public static final String SIGNED_CONFIG_VERSION = "signed_config_version"; 17713 17714 /** 17715 * Timeout for a single {@link android.media.soundtrigger.SoundTriggerDetectionService} 17716 * operation (in ms). 17717 * 17718 * @hide 17719 */ 17720 @Readable 17721 public static final String SOUND_TRIGGER_DETECTION_SERVICE_OP_TIMEOUT = 17722 "sound_trigger_detection_service_op_timeout"; 17723 17724 /** 17725 * Maximum number of {@link android.media.soundtrigger.SoundTriggerDetectionService} 17726 * operations per day. 17727 * 17728 * @hide 17729 */ 17730 @Readable 17731 public static final String MAX_SOUND_TRIGGER_DETECTION_SERVICE_OPS_PER_DAY = 17732 "max_sound_trigger_detection_service_ops_per_day"; 17733 17734 /** 17735 * Setting to determine if the Clockwork Home application is ready. 17736 * 17737 * <p> 17738 * Set to 1 when the Clockwork Home application has finished starting up. 17739 * </p> 17740 * 17741 * @hide 17742 */ 17743 public static final String CLOCKWORK_HOME_READY = "clockwork_home_ready"; 17744 17745 /** 17746 * Indicates whether aware is available in the current location. 17747 * @hide 17748 */ 17749 @Readable 17750 public static final String AWARE_ALLOWED = "aware_allowed"; 17751 17752 /** 17753 * Overrides internal R.integer.config_shortPressOnPowerBehavior. 17754 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 17755 * Used by PhoneWindowManager. 17756 * @hide 17757 */ 17758 public static final String POWER_BUTTON_SHORT_PRESS = "power_button_short_press"; 17759 17760 /** 17761 * Overrides internal R.integer.config_doublePressOnPowerBehavior. 17762 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 17763 * Used by PhoneWindowManager. 17764 * @hide 17765 */ 17766 public static final String POWER_BUTTON_DOUBLE_PRESS = "power_button_double_press"; 17767 17768 /** 17769 * Overrides internal R.integer.config_triplePressOnPowerBehavior. 17770 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 17771 * Used by PhoneWindowManager. 17772 * @hide 17773 */ 17774 public static final String POWER_BUTTON_TRIPLE_PRESS = "power_button_triple_press"; 17775 17776 /** 17777 * Overrides internal R.integer.config_longPressOnPowerBehavior. 17778 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 17779 * Used by PhoneWindowManager. 17780 * @hide 17781 */ 17782 @Readable 17783 public static final String POWER_BUTTON_LONG_PRESS = 17784 "power_button_long_press"; 17785 17786 /** 17787 * Override internal R.integer.config_longPressOnPowerDurationMs. It determines the length 17788 * of power button press to be considered a long press in milliseconds. 17789 * Used by PhoneWindowManager. 17790 * @hide 17791 */ 17792 @Readable 17793 public static final String POWER_BUTTON_LONG_PRESS_DURATION_MS = 17794 "power_button_long_press_duration_ms"; 17795 17796 /** 17797 * Overrides internal R.integer.config_veryLongPressOnPowerBehavior. 17798 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 17799 * Used by PhoneWindowManager. 17800 * @hide 17801 */ 17802 @Readable 17803 public static final String POWER_BUTTON_VERY_LONG_PRESS = 17804 "power_button_very_long_press"; 17805 17806 /** 17807 * Overrides internal R.integer.config_shortPressOnStemPrimaryBehavior. 17808 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 17809 * Used by PhoneWindowManager. 17810 * @hide 17811 */ 17812 public static final String STEM_PRIMARY_BUTTON_SHORT_PRESS = 17813 "stem_primary_button_short_press"; 17814 17815 /** 17816 * Overrides internal R.integer.config_doublePressOnStemPrimaryBehavior. 17817 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 17818 * Used by PhoneWindowManager. 17819 * @hide 17820 */ 17821 public static final String STEM_PRIMARY_BUTTON_DOUBLE_PRESS = 17822 "stem_primary_button_double_press"; 17823 17824 /** 17825 * Overrides internal R.integer.config_triplePressOnStemPrimaryBehavior. 17826 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 17827 * Used by PhoneWindowManager. 17828 * @hide 17829 */ 17830 public static final String STEM_PRIMARY_BUTTON_TRIPLE_PRESS = 17831 "stem_primary_button_triple_press"; 17832 17833 /** 17834 * Overrides internal R.integer.config_longPressOnStemPrimaryBehavior. 17835 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 17836 * Used by PhoneWindowManager. 17837 * @hide 17838 */ 17839 public static final String STEM_PRIMARY_BUTTON_LONG_PRESS = 17840 "stem_primary_button_long_press"; 17841 17842 /** 17843 * Overrides internal R.integer.config_keyChordPowerVolumeUp. 17844 * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. 17845 * Used by PhoneWindowManager. 17846 * @hide 17847 */ 17848 @Readable 17849 public static final String KEY_CHORD_POWER_VOLUME_UP = 17850 "key_chord_power_volume_up"; 17851 17852 /** 17853 * Record audio from near-field microphone (ie. TV remote) 17854 * Allows audio recording regardless of sensor privacy state, 17855 * as it is an intentional user interaction: hold-to-talk 17856 * 17857 * Type: int (0 to disable, 1 to enable) 17858 * 17859 * @hide 17860 */ 17861 public static final String RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO_ENABLED = 17862 "receive_explicit_user_interaction_audio_enabled"; 17863 17864 /** 17865 * Keyguard should be on the left hand side of the screen, for wide screen layouts. 17866 * 17867 * @hide 17868 */ 17869 public static final int ONE_HANDED_KEYGUARD_SIDE_LEFT = 0; 17870 17871 /** 17872 * Keyguard should be on the right hand side of the screen, for wide screen layouts. 17873 * 17874 * @hide 17875 */ 17876 public static final int ONE_HANDED_KEYGUARD_SIDE_RIGHT = 1; 17877 /** 17878 * In one handed mode, which side the keyguard should be on. Allowable values are one of 17879 * the ONE_HANDED_KEYGUARD_SIDE_* constants. 17880 * 17881 * @hide 17882 */ 17883 public static final String ONE_HANDED_KEYGUARD_SIDE = "one_handed_keyguard_side"; 17884 17885 /** 17886 * Global settings that shouldn't be persisted. 17887 * 17888 * @hide 17889 */ 17890 public static final String[] TRANSIENT_SETTINGS = { 17891 CLOCKWORK_HOME_READY, 17892 }; 17893 17894 /** 17895 * Keys we no longer back up under the current schema, but want to continue to 17896 * process when restoring historical backup datasets. 17897 * 17898 * All settings in {@link LEGACY_RESTORE_SETTINGS} array *must* have a non-null validator, 17899 * otherwise they won't be restored. 17900 * 17901 * @hide 17902 */ 17903 public static final String[] LEGACY_RESTORE_SETTINGS = { 17904 }; 17905 17906 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) 17907 private static final ContentProviderHolder sProviderHolder = 17908 new ContentProviderHolder(CONTENT_URI); 17909 17910 // Populated lazily, guarded by class object: 17911 @UnsupportedAppUsage 17912 private static final NameValueCache sNameValueCache = new NameValueCache( 17913 CONTENT_URI, 17914 CALL_METHOD_GET_GLOBAL, 17915 CALL_METHOD_PUT_GLOBAL, 17916 CALL_METHOD_DELETE_GLOBAL, 17917 sProviderHolder, 17918 Global.class); 17919 17920 // Certain settings have been moved from global to the per-user secure namespace 17921 @UnsupportedAppUsage 17922 private static final HashSet<String> MOVED_TO_SECURE; 17923 static { 17924 MOVED_TO_SECURE = new HashSet<>(8); 17925 MOVED_TO_SECURE.add(Global.INSTALL_NON_MARKET_APPS); 17926 MOVED_TO_SECURE.add(Global.ZEN_DURATION); 17927 MOVED_TO_SECURE.add(Global.SHOW_ZEN_UPGRADE_NOTIFICATION); 17928 MOVED_TO_SECURE.add(Global.SHOW_ZEN_SETTINGS_SUGGESTION); 17929 MOVED_TO_SECURE.add(Global.ZEN_SETTINGS_UPDATED); 17930 MOVED_TO_SECURE.add(Global.ZEN_SETTINGS_SUGGESTION_VIEWED); 17931 MOVED_TO_SECURE.add(Global.CHARGING_SOUNDS_ENABLED); 17932 MOVED_TO_SECURE.add(Global.CHARGING_VIBRATION_ENABLED); 17933 MOVED_TO_SECURE.add(Global.NOTIFICATION_BUBBLES); 17934 MOVED_TO_SECURE.add(Global.BUGREPORT_IN_POWER_MENU); 17935 MOVED_TO_SECURE.add(Global.CUSTOM_BUGREPORT_HANDLER_APP); 17936 MOVED_TO_SECURE.add(Global.CUSTOM_BUGREPORT_HANDLER_USER); 17937 } 17938 17939 // Certain settings have been moved from global to the per-user system namespace 17940 private static final HashSet<String> MOVED_TO_SYSTEM; 17941 static { 17942 MOVED_TO_SYSTEM = new HashSet<>(1); 17943 MOVED_TO_SYSTEM.add(Global.APPLY_RAMPING_RINGER); 17944 } 17945 17946 /** @hide */ getMovedToSecureSettings(Set<String> outKeySet)17947 public static void getMovedToSecureSettings(Set<String> outKeySet) { 17948 outKeySet.addAll(MOVED_TO_SECURE); 17949 } 17950 17951 /** @hide */ getMovedToSystemSettings(Set<String> outKeySet)17952 public static void getMovedToSystemSettings(Set<String> outKeySet) { 17953 outKeySet.addAll(MOVED_TO_SYSTEM); 17954 } 17955 17956 /** @hide */ clearProviderForTest()17957 public static void clearProviderForTest() { 17958 sProviderHolder.clearProviderForTest(); 17959 sNameValueCache.clearGenerationTrackerForTest(); 17960 } 17961 17962 /** @hide */ getPublicSettings(Set<String> allKeys, Set<String> readableKeys, ArrayMap<String, Integer> readableKeysWithMaxTargetSdk)17963 public static void getPublicSettings(Set<String> allKeys, Set<String> readableKeys, 17964 ArrayMap<String, Integer> readableKeysWithMaxTargetSdk) { 17965 getPublicSettingsForClass(Global.class, allKeys, readableKeys, 17966 readableKeysWithMaxTargetSdk); 17967 // Add Global.Wearable keys on watches. 17968 if (ActivityThread.currentApplication().getApplicationContext().getPackageManager() 17969 .hasSystemFeature(PackageManager.FEATURE_WATCH)) { 17970 getPublicSettingsForClass(Global.Wearable.class, allKeys, readableKeys, 17971 readableKeysWithMaxTargetSdk); 17972 } 17973 } 17974 17975 /** 17976 * Look up a name in the database. 17977 * @param resolver to access the database with 17978 * @param name to look up in the table 17979 * @return the corresponding value, or null if not present 17980 */ getString(ContentResolver resolver, String name)17981 public static String getString(ContentResolver resolver, String name) { 17982 return getStringForUser(resolver, name, resolver.getUserId()); 17983 } 17984 17985 /** @hide */ 17986 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) getStringForUser(ContentResolver resolver, String name, int userHandle)17987 public static String getStringForUser(ContentResolver resolver, String name, 17988 int userHandle) { 17989 if (MOVED_TO_SECURE.contains(name)) { 17990 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" 17991 + " to android.provider.Settings.Secure, returning read-only value."); 17992 return Secure.getStringForUser(resolver, name, userHandle); 17993 } 17994 if (MOVED_TO_SYSTEM.contains(name)) { 17995 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" 17996 + " to android.provider.Settings.System, returning read-only value."); 17997 return System.getStringForUser(resolver, name, userHandle); 17998 } 17999 return sNameValueCache.getStringForUser(resolver, name, userHandle); 18000 } 18001 18002 /** 18003 * Store a name/value pair into the database. 18004 * @param resolver to access the database with 18005 * @param name to store 18006 * @param value to associate with the name 18007 * @return true if the value was set, false on database errors 18008 */ putString(ContentResolver resolver, String name, String value)18009 public static boolean putString(ContentResolver resolver, 18010 String name, String value) { 18011 return putStringForUser(resolver, name, value, null, false, resolver.getUserId(), 18012 DEFAULT_OVERRIDEABLE_BY_RESTORE); 18013 } 18014 18015 /** 18016 * Store a name/value pair into the database. 18017 * 18018 * @param resolver to access the database with 18019 * @param name to store 18020 * @param value to associate with the name 18021 * @param tag to associated with the setting. 18022 * @param makeDefault whether to make the value the default one. 18023 * @param overrideableByRestore whether restore can override this value 18024 * @return true if the value was set, false on database errors 18025 * 18026 * @hide 18027 */ 18028 @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)18029 public static boolean putString(@NonNull ContentResolver resolver, 18030 @NonNull String name, @Nullable String value, @Nullable String tag, 18031 boolean makeDefault, boolean overrideableByRestore) { 18032 return putStringForUser(resolver, name, value, tag, makeDefault, 18033 resolver.getUserId(), overrideableByRestore); 18034 } 18035 18036 /** 18037 * Store a name/value pair into the database. 18038 * <p> 18039 * The method takes an optional tag to associate with the setting 18040 * which can be used to clear only settings made by your package and 18041 * associated with this tag by passing the tag to {@link 18042 * #resetToDefaults(ContentResolver, String)}. Anyone can override 18043 * the current tag. Also if another package changes the setting 18044 * then the tag will be set to the one specified in the set call 18045 * which can be null. Also any of the settings setters that do not 18046 * take a tag as an argument effectively clears the tag. 18047 * </p><p> 18048 * For example, if you set settings A and B with tags T1 and T2 and 18049 * another app changes setting A (potentially to the same value), it 18050 * can assign to it a tag T3 (note that now the package that changed 18051 * the setting is not yours). Now if you reset your changes for T1 and 18052 * T2 only setting B will be reset and A not (as it was changed by 18053 * another package) but since A did not change you are in the desired 18054 * initial state. Now if the other app changes the value of A (assuming 18055 * you registered an observer in the beginning) you would detect that 18056 * the setting was changed by another app and handle this appropriately 18057 * (ignore, set back to some value, etc). 18058 * </p><p> 18059 * Also the method takes an argument whether to make the value the 18060 * default for this setting. If the system already specified a default 18061 * value, then the one passed in here will <strong>not</strong> 18062 * be set as the default. 18063 * </p> 18064 * 18065 * @param resolver to access the database with. 18066 * @param name to store. 18067 * @param value to associate with the name. 18068 * @param tag to associated with the setting. 18069 * @param makeDefault whether to make the value the default one. 18070 * @return true if the value was set, false on database errors. 18071 * 18072 * @see #resetToDefaults(ContentResolver, String) 18073 * 18074 * @hide 18075 */ 18076 @SystemApi 18077 @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) putString(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, @Nullable String tag, boolean makeDefault)18078 public static boolean putString(@NonNull ContentResolver resolver, 18079 @NonNull String name, @Nullable String value, @Nullable String tag, 18080 boolean makeDefault) { 18081 return putStringForUser(resolver, name, value, tag, makeDefault, 18082 resolver.getUserId(), DEFAULT_OVERRIDEABLE_BY_RESTORE); 18083 } 18084 18085 /** 18086 * Reset the settings to their defaults. This would reset <strong>only</strong> 18087 * settings set by the caller's package. Think of it of a way to undo your own 18088 * changes to the secure settings. Passing in the optional tag will reset only 18089 * settings changed by your package and associated with this tag. 18090 * 18091 * @param resolver Handle to the content resolver. 18092 * @param tag Optional tag which should be associated with the settings to reset. 18093 * 18094 * @see #putString(ContentResolver, String, String, String, boolean) 18095 * 18096 * @hide 18097 */ 18098 @SystemApi 18099 @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) resetToDefaults(@onNull ContentResolver resolver, @Nullable String tag)18100 public static void resetToDefaults(@NonNull ContentResolver resolver, 18101 @Nullable String tag) { 18102 resetToDefaultsAsUser(resolver, tag, RESET_MODE_PACKAGE_DEFAULTS, 18103 resolver.getUserId()); 18104 } 18105 18106 /** 18107 * Reset the settings to their defaults for a given user with a specific mode. The 18108 * optional tag argument is valid only for {@link #RESET_MODE_PACKAGE_DEFAULTS} 18109 * allowing resetting the settings made by a package and associated with the tag. 18110 * 18111 * @param resolver Handle to the content resolver. 18112 * @param tag Optional tag which should be associated with the settings to reset. 18113 * @param mode The reset mode. 18114 * @param userHandle The user for which to reset to defaults. 18115 * 18116 * @see #RESET_MODE_PACKAGE_DEFAULTS 18117 * @see #RESET_MODE_UNTRUSTED_DEFAULTS 18118 * @see #RESET_MODE_UNTRUSTED_CHANGES 18119 * @see #RESET_MODE_TRUSTED_DEFAULTS 18120 * 18121 * @hide 18122 */ resetToDefaultsAsUser(@onNull ContentResolver resolver, @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle)18123 public static void resetToDefaultsAsUser(@NonNull ContentResolver resolver, 18124 @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle) { 18125 try { 18126 Bundle arg = new Bundle(); 18127 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 18128 if (tag != null) { 18129 arg.putString(CALL_METHOD_TAG_KEY, tag); 18130 } 18131 arg.putInt(CALL_METHOD_RESET_MODE_KEY, mode); 18132 IContentProvider cp = sProviderHolder.getProvider(resolver); 18133 cp.call(resolver.getAttributionSource(), 18134 sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_GLOBAL, null, arg); 18135 } catch (RemoteException e) { 18136 Log.w(TAG, "Can't reset do defaults for " + CONTENT_URI, e); 18137 } 18138 } 18139 18140 /** @hide */ 18141 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) putStringForUser(ContentResolver resolver, String name, String value, int userHandle)18142 public static boolean putStringForUser(ContentResolver resolver, 18143 String name, String value, int userHandle) { 18144 return putStringForUser(resolver, name, value, null, false, userHandle, 18145 DEFAULT_OVERRIDEABLE_BY_RESTORE); 18146 } 18147 18148 /** @hide */ putStringForUser(@onNull ContentResolver resolver, @NonNull String name, @Nullable String value, @Nullable String tag, boolean makeDefault, @UserIdInt int userHandle, boolean overrideableByRestore)18149 public static boolean putStringForUser(@NonNull ContentResolver resolver, 18150 @NonNull String name, @Nullable String value, @Nullable String tag, 18151 boolean makeDefault, @UserIdInt int userHandle, boolean overrideableByRestore) { 18152 if (LOCAL_LOGV) { 18153 Log.v(TAG, "Global.putString(name=" + name + ", value=" + value + ") for " 18154 + userHandle); 18155 } 18156 // Global and Secure have the same access policy so we can forward writes 18157 if (MOVED_TO_SECURE.contains(name)) { 18158 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" 18159 + " to android.provider.Settings.Secure, value is unchanged."); 18160 return Secure.putStringForUser(resolver, name, value, tag, 18161 makeDefault, userHandle, overrideableByRestore); 18162 } 18163 // Global and System have the same access policy so we can forward writes 18164 if (MOVED_TO_SYSTEM.contains(name)) { 18165 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" 18166 + " to android.provider.Settings.System, value is unchanged."); 18167 return System.putStringForUser(resolver, name, value, tag, 18168 makeDefault, userHandle, overrideableByRestore); 18169 } 18170 return sNameValueCache.putStringForUser(resolver, name, value, tag, 18171 makeDefault, userHandle, overrideableByRestore); 18172 } 18173 18174 /** 18175 * Construct the content URI for a particular name/value pair, 18176 * useful for monitoring changes with a ContentObserver. 18177 * @param name to look up in the table 18178 * @return the corresponding content URI, or null if not present 18179 */ getUriFor(String name)18180 public static Uri getUriFor(String name) { 18181 return getUriFor(CONTENT_URI, name); 18182 } 18183 18184 /** 18185 * Convenience function for retrieving a single secure settings value 18186 * as an integer. Note that internally setting values are always 18187 * stored as strings; this function converts the string to an integer 18188 * for you. The default value will be returned if the setting is 18189 * not defined or not an integer. 18190 * 18191 * @param cr The ContentResolver to access. 18192 * @param name The name of the setting to retrieve. 18193 * @param def Value to return if the setting is not defined. 18194 * 18195 * @return The setting's current value, or 'def' if it is not defined 18196 * or not a valid integer. 18197 */ getInt(ContentResolver cr, String name, int def)18198 public static int getInt(ContentResolver cr, String name, int def) { 18199 String v = getString(cr, name); 18200 return parseIntSettingWithDefault(v, def); 18201 } 18202 18203 /** 18204 * Convenience function for retrieving a single secure settings value 18205 * as an integer. Note that internally setting values are always 18206 * stored as strings; this function converts the string to an integer 18207 * for you. 18208 * <p> 18209 * This version does not take a default value. If the setting has not 18210 * been set, or the string value is not a number, 18211 * it throws {@link SettingNotFoundException}. 18212 * 18213 * @param cr The ContentResolver to access. 18214 * @param name The name of the setting to retrieve. 18215 * 18216 * @throws SettingNotFoundException Thrown if a setting by the given 18217 * name can't be found or the setting value is not an integer. 18218 * 18219 * @return The setting's current value. 18220 */ getInt(ContentResolver cr, String name)18221 public static int getInt(ContentResolver cr, String name) 18222 throws SettingNotFoundException { 18223 String v = getString(cr, name); 18224 return parseIntSetting(v, name); 18225 } 18226 18227 /** 18228 * Convenience function for updating a single settings value as an 18229 * integer. This will either create a new entry in the table if the 18230 * given name does not exist, or modify the value of the existing row 18231 * with that name. Note that internally setting values are always 18232 * stored as strings, so this function converts the given value to a 18233 * string before storing it. 18234 * 18235 * @param cr The ContentResolver to access. 18236 * @param name The name of the setting to modify. 18237 * @param value The new value for the setting. 18238 * @return true if the value was set, false on database errors 18239 */ putInt(ContentResolver cr, String name, int value)18240 public static boolean putInt(ContentResolver cr, String name, int value) { 18241 return putString(cr, name, Integer.toString(value)); 18242 } 18243 18244 /** 18245 * Convenience function for retrieving a single secure settings value 18246 * as a {@code long}. Note that internally setting values are always 18247 * stored as strings; this function converts the string to a {@code long} 18248 * for you. The default value will be returned if the setting is 18249 * not defined or not a {@code long}. 18250 * 18251 * @param cr The ContentResolver to access. 18252 * @param name The name of the setting to retrieve. 18253 * @param def Value to return if the setting is not defined. 18254 * 18255 * @return The setting's current value, or 'def' if it is not defined 18256 * or not a valid {@code long}. 18257 */ getLong(ContentResolver cr, String name, long def)18258 public static long getLong(ContentResolver cr, String name, long def) { 18259 String v = getString(cr, name); 18260 return parseLongSettingWithDefault(v, def); 18261 } 18262 18263 /** 18264 * Convenience function for retrieving a single secure settings value 18265 * as a {@code long}. Note that internally setting values are always 18266 * stored as strings; this function converts the string to a {@code long} 18267 * for you. 18268 * <p> 18269 * This version does not take a default value. If the setting has not 18270 * been set, or the string value is not a number, 18271 * it throws {@link SettingNotFoundException}. 18272 * 18273 * @param cr The ContentResolver to access. 18274 * @param name The name of the setting to retrieve. 18275 * 18276 * @return The setting's current value. 18277 * @throws SettingNotFoundException Thrown if a setting by the given 18278 * name can't be found or the setting value is not an integer. 18279 */ getLong(ContentResolver cr, String name)18280 public static long getLong(ContentResolver cr, String name) 18281 throws SettingNotFoundException { 18282 String v = getString(cr, name); 18283 return parseLongSetting(v, name); 18284 } 18285 18286 /** 18287 * Convenience function for updating a secure settings value as a long 18288 * integer. This will either create a new entry in the table if the 18289 * given name does not exist, or modify the value of the existing row 18290 * with that name. Note that internally setting values are always 18291 * stored as strings, so this function converts the given value to a 18292 * string before storing it. 18293 * 18294 * @param cr The ContentResolver to access. 18295 * @param name The name of the setting to modify. 18296 * @param value The new value for the setting. 18297 * @return true if the value was set, false on database errors 18298 */ putLong(ContentResolver cr, String name, long value)18299 public static boolean putLong(ContentResolver cr, String name, long value) { 18300 return putString(cr, name, Long.toString(value)); 18301 } 18302 18303 /** 18304 * Convenience function for retrieving a single secure settings value 18305 * as a floating point number. Note that internally setting values are 18306 * always stored as strings; this function converts the string to an 18307 * float for you. The default value will be returned if the setting 18308 * is not defined or not a valid float. 18309 * 18310 * @param cr The ContentResolver to access. 18311 * @param name The name of the setting to retrieve. 18312 * @param def Value to return if the setting is not defined. 18313 * 18314 * @return The setting's current value, or 'def' if it is not defined 18315 * or not a valid float. 18316 */ getFloat(ContentResolver cr, String name, float def)18317 public static float getFloat(ContentResolver cr, String name, float def) { 18318 String v = getString(cr, name); 18319 return parseFloatSettingWithDefault(v, def); 18320 } 18321 18322 /** 18323 * Convenience function for retrieving a single secure settings value 18324 * as a float. Note that internally setting values are always 18325 * stored as strings; this function converts the string to a float 18326 * for you. 18327 * <p> 18328 * This version does not take a default value. If the setting has not 18329 * been set, or the string value is not a number, 18330 * it throws {@link SettingNotFoundException}. 18331 * 18332 * @param cr The ContentResolver to access. 18333 * @param name The name of the setting to retrieve. 18334 * 18335 * @throws SettingNotFoundException Thrown if a setting by the given 18336 * name can't be found or the setting value is not a float. 18337 * 18338 * @return The setting's current value. 18339 */ getFloat(ContentResolver cr, String name)18340 public static float getFloat(ContentResolver cr, String name) 18341 throws SettingNotFoundException { 18342 String v = getString(cr, name); 18343 return parseFloatSetting(v, name); 18344 } 18345 18346 /** 18347 * Convenience function for updating a single settings value as a 18348 * floating point number. This will either create a new entry in the 18349 * table if the given name does not exist, or modify the value of the 18350 * existing row with that name. Note that internally setting values 18351 * are always stored as strings, so this function converts the given 18352 * value to a string before storing it. 18353 * 18354 * @param cr The ContentResolver to access. 18355 * @param name The name of the setting to modify. 18356 * @param value The new value for the setting. 18357 * @return true if the value was set, false on database errors 18358 */ putFloat(ContentResolver cr, String name, float value)18359 public static boolean putFloat(ContentResolver cr, String name, float value) { 18360 return putString(cr, name, Float.toString(value)); 18361 } 18362 18363 /** 18364 * Subscription Id to be used for voice call on a multi sim device. 18365 * @hide 18366 */ 18367 @Readable 18368 public static final String MULTI_SIM_VOICE_CALL_SUBSCRIPTION = "multi_sim_voice_call"; 18369 18370 /** 18371 * Used to provide option to user to select subscription during dial. 18372 * The supported values are 0 = disable or 1 = enable prompt. 18373 * @hide 18374 */ 18375 @UnsupportedAppUsage 18376 @Readable 18377 public static final String MULTI_SIM_VOICE_PROMPT = "multi_sim_voice_prompt"; 18378 18379 /** 18380 * Subscription Id to be used for data call on a multi sim device. 18381 * @hide 18382 */ 18383 @Readable 18384 public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call"; 18385 18386 /** 18387 * Subscription Id to be used for SMS on a multi sim device. 18388 * @hide 18389 */ 18390 @Readable 18391 public static final String MULTI_SIM_SMS_SUBSCRIPTION = "multi_sim_sms"; 18392 18393 /** 18394 * Used to provide option to user to select subscription during send SMS. 18395 * The value 1 - enable, 0 - disable 18396 * @hide 18397 */ 18398 @Readable 18399 public static final String MULTI_SIM_SMS_PROMPT = "multi_sim_sms_prompt"; 18400 18401 /** User preferred subscriptions setting. 18402 * This holds the details of the user selected subscription from the card and 18403 * the activation status. Each settings string have the comma separated values 18404 * iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index 18405 * @hide 18406 */ 18407 @UnsupportedAppUsage 18408 @Readable 18409 public static final String[] MULTI_SIM_USER_PREFERRED_SUBS = {"user_preferred_sub1", 18410 "user_preferred_sub2","user_preferred_sub3"}; 18411 18412 /** 18413 * Which subscription is enabled for a physical slot. 18414 * @hide 18415 */ 18416 @Readable 18417 public static final String ENABLED_SUBSCRIPTION_FOR_SLOT = "enabled_subscription_for_slot"; 18418 18419 /** 18420 * Whether corresponding logical modem is enabled for a physical slot. 18421 * The value 1 - enable, 0 - disable 18422 * @hide 18423 */ 18424 @Readable 18425 public static final String MODEM_STACK_ENABLED_FOR_SLOT = "modem_stack_enabled_for_slot"; 18426 18427 /** 18428 * Whether to enable new contacts aggregator or not. 18429 * The value 1 - enable, 0 - disable 18430 * @hide 18431 */ 18432 @Readable 18433 public static final String NEW_CONTACT_AGGREGATOR = "new_contact_aggregator"; 18434 18435 /** 18436 * Whether to enable contacts metadata syncing or not 18437 * The value 1 - enable, 0 - disable 18438 * 18439 * @removed 18440 */ 18441 @Deprecated 18442 @Readable 18443 public static final String CONTACT_METADATA_SYNC = "contact_metadata_sync"; 18444 18445 /** 18446 * Whether to enable contacts metadata syncing or not 18447 * The value 1 - enable, 0 - disable 18448 */ 18449 @Readable 18450 public static final String CONTACT_METADATA_SYNC_ENABLED = "contact_metadata_sync_enabled"; 18451 18452 /** 18453 * Whether to enable cellular on boot. 18454 * The value 1 - enable, 0 - disable 18455 * @hide 18456 */ 18457 @Readable 18458 public static final String ENABLE_CELLULAR_ON_BOOT = "enable_cellular_on_boot"; 18459 18460 /** 18461 * The maximum allowed notification enqueue rate in Hertz. 18462 * 18463 * Should be a float, and includes updates only. 18464 * @hide 18465 */ 18466 @Readable 18467 public static final String MAX_NOTIFICATION_ENQUEUE_RATE = "max_notification_enqueue_rate"; 18468 18469 /** 18470 * Displays toasts when an app posts a notification that does not specify a valid channel. 18471 * 18472 * The value 1 - enable, 0 - disable 18473 * @hide 18474 */ 18475 @Readable 18476 public static final String SHOW_NOTIFICATION_CHANNEL_WARNINGS = 18477 "show_notification_channel_warnings"; 18478 18479 /** 18480 * Whether to disable app and notification screen share protections. 18481 * 18482 * The value 1 - enable, 0 - disable 18483 * @hide 18484 */ 18485 @Readable 18486 public static final String DISABLE_SCREEN_SHARE_PROTECTIONS_FOR_APPS_AND_NOTIFICATIONS = 18487 "disable_screen_share_protections_for_apps_and_notifications"; 18488 18489 /** 18490 * Whether cell is enabled/disabled 18491 * @hide 18492 */ 18493 @Readable 18494 public static final String CELL_ON = "cell_on"; 18495 18496 /** 18497 * Global settings which can be accessed by instant apps. 18498 * @hide 18499 */ 18500 public static final Set<String> INSTANT_APP_SETTINGS = new ArraySet<>(); 18501 static { 18502 INSTANT_APP_SETTINGS.add(WAIT_FOR_DEBUGGER); 18503 INSTANT_APP_SETTINGS.add(DEVICE_PROVISIONED); 18504 INSTANT_APP_SETTINGS.add(DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES); 18505 INSTANT_APP_SETTINGS.add(DEVELOPMENT_FORCE_RTL); 18506 INSTANT_APP_SETTINGS.add(EPHEMERAL_COOKIE_MAX_SIZE_BYTES); 18507 INSTANT_APP_SETTINGS.add(AIRPLANE_MODE_ON); 18508 INSTANT_APP_SETTINGS.add(WINDOW_ANIMATION_SCALE); 18509 INSTANT_APP_SETTINGS.add(TRANSITION_ANIMATION_SCALE); 18510 INSTANT_APP_SETTINGS.add(ANIMATOR_DURATION_SCALE); 18511 INSTANT_APP_SETTINGS.add(DEBUG_VIEW_ATTRIBUTES); 18512 INSTANT_APP_SETTINGS.add(DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE); 18513 INSTANT_APP_SETTINGS.add(WTF_IS_FATAL); 18514 INSTANT_APP_SETTINGS.add(SEND_ACTION_APP_ERROR); 18515 INSTANT_APP_SETTINGS.add(ZEN_MODE); 18516 } 18517 18518 /** 18519 * Whether to show the high temperature warning notification. 18520 * @hide 18521 */ 18522 @Readable 18523 public static final String SHOW_TEMPERATURE_WARNING = "show_temperature_warning"; 18524 18525 /** 18526 * Whether to show the usb high temperature alarm notification. 18527 * @hide 18528 */ 18529 @Readable 18530 public static final String SHOW_USB_TEMPERATURE_ALARM = "show_usb_temperature_alarm"; 18531 18532 /** 18533 * Temperature at which the high temperature warning notification should be shown. 18534 * @hide 18535 */ 18536 @Readable 18537 public static final String WARNING_TEMPERATURE = "warning_temperature"; 18538 18539 /** 18540 * Whether the diskstats logging task is enabled/disabled. 18541 * @hide 18542 */ 18543 @Readable 18544 public static final String ENABLE_DISKSTATS_LOGGING = "enable_diskstats_logging"; 18545 18546 /** 18547 * Whether the cache quota calculation task is enabled/disabled. 18548 * @hide 18549 */ 18550 @Readable 18551 public static final String ENABLE_CACHE_QUOTA_CALCULATION = 18552 "enable_cache_quota_calculation"; 18553 18554 /** 18555 * Whether the Deletion Helper no threshold toggle is available. 18556 * @hide 18557 */ 18558 @Readable 18559 public static final String ENABLE_DELETION_HELPER_NO_THRESHOLD_TOGGLE = 18560 "enable_deletion_helper_no_threshold_toggle"; 18561 18562 /** 18563 * The list of snooze options for notifications 18564 * This is encoded as a key=value list, separated by commas. Ex: 18565 * 18566 * "default=60,options_array=15:30:60:120" 18567 * 18568 * The following keys are supported: 18569 * 18570 * <pre> 18571 * default (int) 18572 * options_array (int[]) 18573 * </pre> 18574 * 18575 * All delays in integer minutes. Array order is respected. 18576 * Options will be used in order up to the maximum allowed by the UI. 18577 * @hide 18578 */ 18579 @Readable 18580 public static final String NOTIFICATION_SNOOZE_OPTIONS = 18581 "notification_snooze_options"; 18582 18583 /** 18584 * When enabled, notifications the notification assistant service has modified will show an 18585 * indicator. When tapped, this indicator will describe the adjustment made and solicit 18586 * feedback. This flag will also add a "automatic" option to the long press menu. 18587 * 18588 * The value 1 - enable, 0 - disable 18589 * @hide 18590 */ 18591 public static final String NOTIFICATION_FEEDBACK_ENABLED = "notification_feedback_enabled"; 18592 18593 /** 18594 * Settings key for the ratio of notification dismissals to notification views - one of the 18595 * criteria for showing the notification blocking helper. 18596 * 18597 * <p>The value is a float ranging from 0.0 to 1.0 (the closer to 0.0, the more intrusive 18598 * the blocking helper will be). 18599 * 18600 * @hide 18601 */ 18602 @Readable 18603 public static final String BLOCKING_HELPER_DISMISS_TO_VIEW_RATIO_LIMIT = 18604 "blocking_helper_dismiss_to_view_ratio"; 18605 18606 /** 18607 * Settings key for the longest streak of dismissals - one of the criteria for showing the 18608 * notification blocking helper. 18609 * 18610 * <p>The value is an integer greater than 0. 18611 * 18612 * @hide 18613 */ 18614 @Readable 18615 public static final String BLOCKING_HELPER_STREAK_LIMIT = "blocking_helper_streak_limit"; 18616 18617 /** 18618 * Configuration flags for SQLite Compatibility WAL. Encoded as a key-value list, separated 18619 * by commas. E.g.: compatibility_wal_supported=true, wal_syncmode=OFF 18620 * 18621 * Supported keys:<br/> 18622 * <li> 18623 * <ul> {@code legacy_compatibility_wal_enabled} : A {code boolean} flag that determines 18624 * whether or not "compatibility WAL" mode is enabled by default. This is a legacy flag 18625 * and is honoured on Android Q and higher. This flag will be removed in a future release. 18626 * </ul> 18627 * <ul> {@code wal_syncmode} : A {@code String} representing the synchronization mode to use 18628 * when WAL is enabled, either via {@code legacy_compatibility_wal_enabled} or using the 18629 * obsolete {@code compatibility_wal_supported} flag. 18630 * </ul> 18631 * <ul> {@code truncate_size} : A {@code int} flag that specifies the truncate size of the 18632 * WAL journal. 18633 * </ul> 18634 * <ul> {@code compatibility_wal_supported} : A {code boolean} flag that specifies whether 18635 * the legacy "compatibility WAL" mode is enabled by default. This flag is obsolete and is 18636 * only supported on Android Pie. 18637 * </ul> 18638 * </li> 18639 * 18640 * @hide 18641 */ 18642 @Readable 18643 public static final String SQLITE_COMPATIBILITY_WAL_FLAGS = 18644 "sqlite_compatibility_wal_flags"; 18645 18646 /** 18647 * Enable GNSS Raw Measurements Full Tracking? 18648 * 0 = no 18649 * 1 = yes 18650 * @hide 18651 */ 18652 @Readable 18653 public static final String ENABLE_GNSS_RAW_MEAS_FULL_TRACKING = 18654 "enable_gnss_raw_meas_full_tracking"; 18655 18656 /** 18657 * Whether the notification should be ongoing (persistent) when a carrier app install is 18658 * required. 18659 * 18660 * The value is a boolean (1 or 0). 18661 * @hide 18662 */ 18663 @SystemApi 18664 @Readable 18665 public static final String INSTALL_CARRIER_APP_NOTIFICATION_PERSISTENT = 18666 "install_carrier_app_notification_persistent"; 18667 18668 /** 18669 * The amount of time (ms) to hide the install carrier app notification after the user has 18670 * ignored it. After this time passes, the notification will be shown again 18671 * 18672 * The value is a long 18673 * @hide 18674 */ 18675 @SystemApi 18676 @Readable 18677 public static final String INSTALL_CARRIER_APP_NOTIFICATION_SLEEP_MILLIS = 18678 "install_carrier_app_notification_sleep_millis"; 18679 18680 /** 18681 * Whether we've enabled zram on this device. Takes effect on 18682 * reboot. The value "1" enables zram; "0" disables it, and 18683 * everything else is unspecified. 18684 * @hide 18685 */ 18686 @Readable 18687 public static final String ZRAM_ENABLED = 18688 "zram_enabled"; 18689 18690 /** 18691 * Whether the app freezer is enabled on this device. 18692 * The value of "enabled" enables the app freezer, "disabled" disables it and 18693 * "device_default" will let the system decide whether to enable the freezer or not 18694 * @hide 18695 */ 18696 @Readable 18697 public static final String CACHED_APPS_FREEZER_ENABLED = "cached_apps_freezer"; 18698 18699 /** 18700 * Configuration flags for smart replies in notifications. 18701 * This is encoded as a key=value list, separated by commas. Ex: 18702 * 18703 * "enabled=1,max_squeeze_remeasure_count=3" 18704 * 18705 * The following keys are supported: 18706 * 18707 * <pre> 18708 * enabled (boolean) 18709 * requires_targeting_p (boolean) 18710 * max_squeeze_remeasure_attempts (int) 18711 * edit_choices_before_sending (boolean) 18712 * show_in_heads_up (boolean) 18713 * min_num_system_generated_replies (int) 18714 * max_num_actions (int) 18715 * </pre> 18716 * @see com.android.systemui.statusbar.policy.SmartReplyConstants 18717 * @hide 18718 */ 18719 @Readable 18720 public static final String SMART_REPLIES_IN_NOTIFICATIONS_FLAGS = 18721 "smart_replies_in_notifications_flags"; 18722 18723 /** 18724 * Configuration flags for the automatic generation of smart replies and smart actions in 18725 * notifications. This is encoded as a key=value list, separated by commas. Ex: 18726 * "generate_replies=false,generate_actions=true". 18727 * 18728 * The following keys are supported: 18729 * 18730 * <pre> 18731 * generate_replies (boolean) 18732 * generate_actions (boolean) 18733 * </pre> 18734 * @hide 18735 */ 18736 @Readable 18737 public static final String SMART_SUGGESTIONS_IN_NOTIFICATIONS_FLAGS = 18738 "smart_suggestions_in_notifications_flags"; 18739 18740 /** 18741 * If nonzero, crashes in foreground processes will bring up a dialog. 18742 * Otherwise, the process will be silently killed. 18743 * @hide 18744 */ 18745 @TestApi 18746 @Readable 18747 @SuppressLint("NoSettingsProvider") 18748 public static final String SHOW_FIRST_CRASH_DIALOG = "show_first_crash_dialog"; 18749 18750 /** 18751 * If nonzero, crash dialogs will show an option to restart the app. 18752 * @hide 18753 */ 18754 @Readable 18755 public static final String SHOW_RESTART_IN_CRASH_DIALOG = "show_restart_in_crash_dialog"; 18756 18757 /** 18758 * If nonzero, crash dialogs will show an option to mute all future crash dialogs for 18759 * this app. 18760 * @hide 18761 */ 18762 @Readable 18763 public static final String SHOW_MUTE_IN_CRASH_DIALOG = "show_mute_in_crash_dialog"; 18764 18765 18766 /** 18767 * If nonzero, will show the zen upgrade notification when the user toggles DND on/off. 18768 * @hide 18769 * @deprecated - Use {@link android.provider.Settings.Secure#SHOW_ZEN_UPGRADE_NOTIFICATION} 18770 */ 18771 @Deprecated 18772 public static final String SHOW_ZEN_UPGRADE_NOTIFICATION = "show_zen_upgrade_notification"; 18773 18774 /** 18775 * If nonzero, will show the zen update settings suggestion. 18776 * @hide 18777 * @deprecated - Use {@link android.provider.Settings.Secure#SHOW_ZEN_SETTINGS_SUGGESTION} 18778 */ 18779 @Deprecated 18780 public static final String SHOW_ZEN_SETTINGS_SUGGESTION = "show_zen_settings_suggestion"; 18781 18782 /** 18783 * If nonzero, zen has not been updated to reflect new changes. 18784 * @deprecated - Use {@link android.provider.Settings.Secure#ZEN_SETTINGS_UPDATED} 18785 * @hide 18786 */ 18787 @Deprecated 18788 public static final String ZEN_SETTINGS_UPDATED = "zen_settings_updated"; 18789 18790 /** 18791 * If nonzero, zen setting suggestion has been viewed by user 18792 * @hide 18793 * @deprecated - Use {@link android.provider.Settings.Secure#ZEN_SETTINGS_SUGGESTION_VIEWED} 18794 */ 18795 @Deprecated 18796 public static final String ZEN_SETTINGS_SUGGESTION_VIEWED = 18797 "zen_settings_suggestion_viewed"; 18798 18799 /** 18800 * Backup and restore agent timeout parameters. 18801 * These parameters are represented by a comma-delimited key-value list. 18802 * 18803 * The following strings are supported as keys: 18804 * <pre> 18805 * kv_backup_agent_timeout_millis (long) 18806 * full_backup_agent_timeout_millis (long) 18807 * shared_backup_agent_timeout_millis (long) 18808 * restore_agent_timeout_millis (long) 18809 * restore_agent_finished_timeout_millis (long) 18810 * </pre> 18811 * 18812 * They map to milliseconds represented as longs. 18813 * 18814 * Ex: "kv_backup_agent_timeout_millis=30000,full_backup_agent_timeout_millis=300000" 18815 * 18816 * @hide 18817 */ 18818 @Readable 18819 public static final String BACKUP_AGENT_TIMEOUT_PARAMETERS = 18820 "backup_agent_timeout_parameters"; 18821 18822 /** 18823 * Blocklist of GNSS satellites. 18824 * 18825 * This is a list of integers separated by commas to represent pairs of (constellation, 18826 * svid). Thus, the number of integers should be even. 18827 * 18828 * E.g.: "3,0,5,24" denotes (constellation=3, svid=0) and (constellation=5, svid=24) are 18829 * blocklisted. Note that svid=0 denotes all svids in the constellation are blocklisted. 18830 * 18831 * @hide 18832 */ 18833 public static final String GNSS_SATELLITE_BLOCKLIST = "gnss_satellite_blocklist"; 18834 18835 /** 18836 * Duration of updates in millisecond for GNSS location request from HAL to framework. 18837 * 18838 * If zero, the GNSS location request feature is disabled. 18839 * 18840 * The value is a non-negative long. 18841 * 18842 * @hide 18843 */ 18844 @Readable 18845 public static final String GNSS_HAL_LOCATION_REQUEST_DURATION_MILLIS = 18846 "gnss_hal_location_request_duration_millis"; 18847 18848 /** 18849 * Binder call stats settings. 18850 * 18851 * The following strings are supported as keys: 18852 * <pre> 18853 * enabled (boolean) 18854 * detailed_tracking (boolean) 18855 * upload_data (boolean) 18856 * sampling_interval (int) 18857 * </pre> 18858 * 18859 * @hide 18860 */ 18861 @Readable 18862 public static final String BINDER_CALLS_STATS = "binder_calls_stats"; 18863 18864 /** 18865 * Looper stats settings. 18866 * 18867 * The following strings are supported as keys: 18868 * <pre> 18869 * enabled (boolean) 18870 * sampling_interval (int) 18871 * </pre> 18872 * 18873 * @hide 18874 */ 18875 @Readable 18876 public static final String LOOPER_STATS = "looper_stats"; 18877 18878 /** 18879 * Settings for collecting statistics on CPU usage per thread 18880 * 18881 * The following strings are supported as keys: 18882 * <pre> 18883 * num_buckets (int) 18884 * collected_uids (string) 18885 * minimum_total_cpu_usage_millis (int) 18886 * </pre> 18887 * 18888 * @hide 18889 */ 18890 @Readable 18891 public static final String KERNEL_CPU_THREAD_READER = "kernel_cpu_thread_reader"; 18892 18893 /** 18894 * Whether we've enabled native flags health check on this device. Takes effect on 18895 * reboot. The value "1" enables native flags health check; otherwise it's disabled. 18896 * @hide 18897 */ 18898 @Readable 18899 public static final String NATIVE_FLAGS_HEALTH_CHECK_ENABLED = 18900 "native_flags_health_check_enabled"; 18901 18902 /** 18903 * Parameter for {@link #APPOP_HISTORY_PARAMETERS} that controls the mode 18904 * in which the historical registry operates. 18905 * 18906 * @hide 18907 */ 18908 @Readable 18909 public static final String APPOP_HISTORY_MODE = "mode"; 18910 18911 /** 18912 * Parameter for {@link #APPOP_HISTORY_PARAMETERS} that controls how long 18913 * is the interval between snapshots in the base case i.e. the most recent 18914 * part of the history. 18915 * 18916 * @hide 18917 */ 18918 @Readable 18919 public static final String APPOP_HISTORY_BASE_INTERVAL_MILLIS = "baseIntervalMillis"; 18920 18921 /** 18922 * Parameter for {@link #APPOP_HISTORY_PARAMETERS} that controls the base 18923 * for the logarithmic step when building app op history. 18924 * 18925 * @hide 18926 */ 18927 @Readable 18928 public static final String APPOP_HISTORY_INTERVAL_MULTIPLIER = "intervalMultiplier"; 18929 18930 /** 18931 * Appop history parameters. These parameters are represented by 18932 * a comma-delimited key-value list. 18933 * 18934 * The following strings are supported as keys: 18935 * <pre> 18936 * mode (int) 18937 * baseIntervalMillis (long) 18938 * intervalMultiplier (int) 18939 * </pre> 18940 * 18941 * Ex: "mode=HISTORICAL_MODE_ENABLED_ACTIVE,baseIntervalMillis=1000,intervalMultiplier=10" 18942 * 18943 * @see #APPOP_HISTORY_MODE 18944 * @see #APPOP_HISTORY_BASE_INTERVAL_MILLIS 18945 * @see #APPOP_HISTORY_INTERVAL_MULTIPLIER 18946 * 18947 * @hide 18948 */ 18949 @Readable 18950 public static final String APPOP_HISTORY_PARAMETERS = 18951 "appop_history_parameters"; 18952 18953 /** 18954 * Auto revoke parameters. These parameters are represented by 18955 * a comma-delimited key-value list. 18956 * 18957 * <pre> 18958 * enabledForPreRApps (bolean) 18959 * unusedThresholdMs (long) 18960 * checkFrequencyMs (long) 18961 * </pre> 18962 * 18963 * Ex: "enabledForPreRApps=false,unusedThresholdMs=7776000000,checkFrequencyMs=1296000000" 18964 * 18965 * @hide 18966 */ 18967 @Readable 18968 public static final String AUTO_REVOKE_PARAMETERS = 18969 "auto_revoke_parameters"; 18970 18971 /** 18972 * Delay for sending ACTION_CHARGING after device is plugged in. 18973 * This is used as an override for constants defined in BatteryStatsImpl. Its purposes are: 18974 * <ol> 18975 * <li>Ease of experimentation</li> 18976 * <li>Customization of different device</li> 18977 * </ol> 18978 * 18979 * @see com.android.internal.os.BatteryStatsImpl.Constants.KEY_BATTERY_CHARGED_DELAY_MS 18980 * @hide 18981 */ 18982 @Readable 18983 public static final String BATTERY_CHARGING_STATE_UPDATE_DELAY = 18984 "battery_charging_state_update_delay"; 18985 18986 /** 18987 * Threshold battery level to enforce battery state as charging. That means when battery 18988 * level is equal to or higher than this threshold, it is always considered charging, even 18989 * if battery level lowered. 18990 * This is used as an override for constants defined in BatteryStatsImpl. Its purposes are: 18991 * <ol> 18992 * <li>Ease of experimentation</li> 18993 * <li>Customization of different device</li> 18994 * </ol> 18995 * 18996 * @hide 18997 * @see com.android.internal.os.BatteryStatsImpl.Constants.BATTERY_CHARGING_ENFORCE_LEVEL 18998 */ 18999 public static final String BATTERY_CHARGING_STATE_ENFORCE_LEVEL = 19000 "battery_charging_state_enforce_level"; 19001 19002 /** 19003 * A serialized string of params that will be loaded into a text classifier action model. 19004 * 19005 * @hide 19006 */ 19007 @Readable 19008 public static final String TEXT_CLASSIFIER_ACTION_MODEL_PARAMS = 19009 "text_classifier_action_model_params"; 19010 19011 /** 19012 * The amount of time to suppress "power-off" from the power button after the device has 19013 * woken due to a gesture (lifting the phone). Since users have learned to hit the power 19014 * button immediately when lifting their device, it can cause the device to turn off if a 19015 * gesture has just woken the device. This value tells us the milliseconds to wait after 19016 * a gesture before "power-off" via power-button is functional again. A value of 0 is no 19017 * delay, and reverts to the old behavior. 19018 * 19019 * @hide 19020 */ 19021 @Readable 19022 public static final String POWER_BUTTON_SUPPRESSION_DELAY_AFTER_GESTURE_WAKE = 19023 "power_button_suppression_delay_after_gesture_wake"; 19024 19025 /** 19026 * The usage amount of advanced battery. The value is 0~100. 19027 * 19028 * @hide 19029 */ 19030 @Readable 19031 public static final String ADVANCED_BATTERY_USAGE_AMOUNT = "advanced_battery_usage_amount"; 19032 19033 /** 19034 * For 5G NSA capable devices, determines whether NR tracking indications are on 19035 * when the screen is off. 19036 * 19037 * Values are: 19038 * 0: off - All 5G NSA tracking indications are off when the screen is off. 19039 * 1: extended - All 5G NSA tracking indications are on when the screen is off as long as 19040 * the device is camped on 5G NSA (5G icon is showing in status bar). 19041 * If the device is not camped on 5G NSA, tracking indications are off. 19042 * 2: always on - All 5G NSA tracking indications are on whether the screen is on or off. 19043 * @hide 19044 */ 19045 @Readable 19046 public static final String NR_NSA_TRACKING_SCREEN_OFF_MODE = 19047 "nr_nsa_tracking_screen_off_mode"; 19048 19049 /** 19050 * Whether to show People Space. 19051 * Values are: 19052 * 0: Disabled (default) 19053 * 1: Enabled 19054 * @hide 19055 */ 19056 public static final String SHOW_PEOPLE_SPACE = "show_people_space"; 19057 19058 /** 19059 * Which types of conversation(s) to show in People Space. 19060 * Values are: 19061 * 0: Single user-selected conversation (default) 19062 * 1: Priority conversations only 19063 * 2: All conversations 19064 * @hide 19065 */ 19066 public static final String PEOPLE_SPACE_CONVERSATION_TYPE = 19067 "people_space_conversation_type"; 19068 19069 /** 19070 * Whether to show new notification dismissal. 19071 * Values are: 19072 * 0: Disabled 19073 * 1: Enabled 19074 * @hide 19075 */ 19076 public static final String SHOW_NEW_NOTIF_DISMISS = "show_new_notif_dismiss"; 19077 19078 /** 19079 * The maximum allowed obscuring opacity by UID to propagate touches. 19080 * 19081 * For certain window types (eg. SAWs), the decision of honoring {@link LayoutParams 19082 * #FLAG_NOT_TOUCHABLE} or not depends on the combined obscuring opacity of the windows 19083 * above the touch-consuming window. 19084 * 19085 * For a certain UID: 19086 * <ul> 19087 * <li>If it's the same as the UID of the touch-consuming window, allow it to propagate 19088 * the touch. 19089 * <li>Otherwise take all its windows of eligible window types above the touch-consuming 19090 * window, compute their combined obscuring opacity considering that {@code 19091 * opacity(A, B) = 1 - (1 - opacity(A))*(1 - opacity(B))}. If the computed value is 19092 * lesser than or equal to this setting and there are no other windows preventing the 19093 * touch, allow the UID to propagate the touch. 19094 * </ul> 19095 * 19096 * @see android.hardware.input.InputManager#getMaximumObscuringOpacityForTouch() 19097 * @see android.hardware.input.InputManager#setMaximumObscuringOpacityForTouch(float) 19098 * 19099 * @hide 19100 */ 19101 @Readable 19102 public static final String MAXIMUM_OBSCURING_OPACITY_FOR_TOUCH = 19103 "maximum_obscuring_opacity_for_touch"; 19104 19105 /** 19106 * Used to enable / disable the Restricted Networking Mode in which network access is 19107 * restricted to apps holding the CONNECTIVITY_USE_RESTRICTED_NETWORKS permission. 19108 * 19109 * Values are: 19110 * 0: disabled 19111 * 1: enabled 19112 * @hide 19113 */ 19114 public static final String RESTRICTED_NETWORKING_MODE = "restricted_networking_mode"; 19115 19116 /** 19117 * Setting indicating whether Low Power Standby is enabled, if supported. 19118 * 19119 * Values are: 19120 * 0: disabled 19121 * 1: enabled 19122 * 19123 * @hide 19124 */ 19125 public static final String LOW_POWER_STANDBY_ENABLED = "low_power_standby_enabled"; 19126 19127 /** 19128 * Setting indicating whether Low Power Standby is allowed to be active during doze 19129 * maintenance mode. 19130 * 19131 * Values are: 19132 * 0: Low Power Standby will be disabled during doze maintenance mode 19133 * 1: Low Power Standby can be active during doze maintenance mode 19134 * 19135 * @hide 19136 */ 19137 public static final String LOW_POWER_STANDBY_ACTIVE_DURING_MAINTENANCE = 19138 "low_power_standby_active_during_maintenance"; 19139 19140 /** 19141 * Timeout for the system server watchdog. 19142 * 19143 * @see {@link com.android.server.Watchdog}. 19144 * 19145 * @hide 19146 */ 19147 public static final String WATCHDOG_TIMEOUT_MILLIS = 19148 "system_server_watchdog_timeout_ms"; 19149 19150 /** 19151 * Whether to enable managed device provisioning via the role holder. 19152 * 19153 * @hide 19154 */ 19155 public static final String MANAGED_PROVISIONING_DEFER_PROVISIONING_TO_ROLE_HOLDER = 19156 "managed_provisioning_defer_provisioning_to_role_holder"; 19157 19158 /** 19159 * State of whether review notification permissions notification needs to 19160 * be shown the user, and whether the user has interacted. 19161 * 19162 * Valid values: 19163 * -1 = UNKNOWN 19164 * 0 = SHOULD_SHOW 19165 * 1 = USER_INTERACTED 19166 * 2 = DISMISSED 19167 * 3 = RESHOWN 19168 * @hide 19169 */ 19170 public static final String REVIEW_PERMISSIONS_NOTIFICATION_STATE = 19171 "review_permissions_notification_state"; 19172 19173 /** 19174 * Whether repair mode is active on the device. 19175 * <p> 19176 * Set to 1 for true and 0 for false. 19177 * 19178 * @hide 19179 */ 19180 public static final String REPAIR_MODE_ACTIVE = "repair_mode_active"; 19181 19182 /** 19183 * Settings migrated from Wear OS settings provider. 19184 * @hide 19185 */ 19186 public static final class Wearable extends NameValueTable { 19187 /** 19188 * Whether the user has any pay tokens on their watch. 19189 * @hide 19190 */ 19191 public static final String HAS_PAY_TOKENS = "has_pay_tokens"; 19192 19193 /** 19194 * Gcm checkin timeout in minutes. 19195 * @hide 19196 */ 19197 public static final String GMS_CHECKIN_TIMEOUT_MIN = "gms_checkin_timeout_min"; 19198 19199 /** 19200 * If hotword detection should be enabled. 19201 * @hide 19202 */ 19203 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19204 public static final String HOTWORD_DETECTION_ENABLED = "hotword_detection_enabled"; 19205 19206 /** 19207 * Whether Smart Replies are enabled within Wear. 19208 * @hide 19209 */ 19210 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19211 public static final String SMART_REPLIES_ENABLED = "smart_replies_enabled"; 19212 19213 /** 19214 * The default vibration pattern. 19215 * @hide 19216 */ 19217 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19218 public static final String DEFAULT_VIBRATION = "default_vibration"; 19219 19220 /** 19221 * If FLP should obtain location data from the paired device. 19222 * @hide 19223 */ 19224 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19225 public static final String OBTAIN_PAIRED_DEVICE_LOCATION = 19226 "obtain_paired_device_location"; 19227 19228 /** 19229 * The play store availability on companion phone. 19230 * @hide 19231 */ 19232 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19233 public static final String PHONE_PLAY_STORE_AVAILABILITY = 19234 "phone_play_store_availability"; 19235 19236 // Possible phone play store availability states 19237 /** @hide */ 19238 public static final int PHONE_PLAY_STORE_AVAILABILITY_UNKNOWN = 0; 19239 /** @hide */ 19240 public static final int PHONE_PLAY_STORE_AVAILABLE = 1; 19241 /** @hide */ 19242 public static final int PHONE_PLAY_STORE_UNAVAILABLE = 2; 19243 19244 /** 19245 * Whether the bug report is enabled. 19246 * @hide 19247 */ 19248 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19249 public static final String BUG_REPORT = "bug_report"; 19250 19251 // Possible bug report states 19252 /** @hide */ 19253 public static final int BUG_REPORT_DISABLED = 0; 19254 /** @hide */ 19255 public static final int BUG_REPORT_ENABLED = 1; 19256 19257 /** 19258 * The enabled/disabled state of the SmartIlluminate. 19259 * @hide 19260 */ 19261 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19262 public static final String SMART_ILLUMINATE_ENABLED = "smart_illuminate_enabled"; 19263 19264 /** 19265 * Whether automatic time is enabled on the watch. 19266 * @hide 19267 */ 19268 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19269 public static final String CLOCKWORK_AUTO_TIME = "clockwork_auto_time"; 19270 19271 // Possible clockwork auto time states 19272 /** @hide */ 19273 public static final int SYNC_TIME_FROM_PHONE = 0; 19274 /** @hide */ 19275 public static final int SYNC_TIME_FROM_NETWORK = 1; 19276 /** @hide */ 19277 public static final int AUTO_TIME_OFF = 2; 19278 /** @hide */ 19279 public static final int INVALID_AUTO_TIME_STATE = 3; 19280 19281 19282 /** 19283 * Whether automatic time zone is enabled on the watch. 19284 * @hide 19285 */ 19286 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19287 public static final String CLOCKWORK_AUTO_TIME_ZONE = "clockwork_auto_time_zone"; 19288 19289 // Possible clockwork auto time zone states 19290 /** @hide */ 19291 public static final int SYNC_TIME_ZONE_FROM_PHONE = 0; 19292 /** @hide */ 19293 public static final int SYNC_TIME_ZONE_FROM_NETWORK = 1; 19294 /** @hide */ 19295 public static final int AUTO_TIME_ZONE_OFF = 2; 19296 /** @hide */ 19297 public static final int INVALID_AUTO_TIME_ZONE_STATE = 3; 19298 19299 /** 19300 * Whether 24 hour time format is enabled on the watch. 19301 * @hide 19302 */ 19303 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19304 public static final String CLOCKWORK_24HR_TIME = "clockwork_24hr_time"; 19305 19306 /** 19307 * Whether the auto wifi toggle setting is enabled. 19308 * @hide 19309 */ 19310 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19311 public static final String AUTO_WIFI = "auto_wifi"; 19312 19313 // Possible force wifi on states 19314 /** @hide */ 19315 public static final int AUTO_WIFI_DISABLED = 0; 19316 /** @hide */ 19317 public static final int AUTO_WIFI_ENABLED = 1; 19318 19319 /** 19320 * The number of minutes after the WiFi enters power save mode. 19321 * @hide 19322 */ 19323 public static final String WIFI_POWER_SAVE = "wifi_power_save"; 19324 19325 /** 19326 * The time at which we should no longer skip the wifi requirement check (we skip the 19327 * wifi requirement until this time). The time is in millis since epoch. 19328 * @hide 19329 */ 19330 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19331 public static final String ALT_BYPASS_WIFI_REQUIREMENT_TIME_MILLIS = 19332 "alt_bypass_wifi_requirement_time_millis"; 19333 19334 /** 19335 * Whether the setup was skipped. 19336 * @hide 19337 */ 19338 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19339 public static final String SETUP_SKIPPED = "setup_skipped"; 19340 19341 // Possible setup_skipped states 19342 /** @hide */ 19343 public static final int SETUP_SKIPPED_UNKNOWN = 0; 19344 /** @hide */ 19345 public static final int SETUP_SKIPPED_YES = 1; 19346 /** @hide */ 19347 public static final int SETUP_SKIPPED_NO = 2; 19348 19349 /** 19350 * The last requested call forwarding action. 19351 * @hide 19352 */ 19353 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19354 public static final String LAST_CALL_FORWARD_ACTION = "last_call_forward_action"; 19355 19356 // Possible call forwarding actions 19357 /** @hide */ 19358 public static final int CALL_FORWARD_ACTION_ON = 1; 19359 /** @hide */ 19360 public static final int CALL_FORWARD_ACTION_OFF = 2; 19361 /** @hide */ 19362 public static final int CALL_FORWARD_NO_LAST_ACTION = -1; 19363 19364 // Stem button settings. 19365 /** @hide */ 19366 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19367 public static final String STEM_1_TYPE = "STEM_1_TYPE"; 19368 /** @hide */ 19369 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19370 public static final String STEM_1_DATA = "STEM_1_DATA"; 19371 /** @hide */ 19372 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19373 public static final String STEM_1_DEFAULT_DATA = "STEM_1_DEFAULT_DATA"; 19374 /** @hide */ 19375 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19376 public static final String STEM_2_TYPE = "STEM_2_TYPE"; 19377 /** @hide */ 19378 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19379 public static final String STEM_2_DATA = "STEM_2_DATA"; 19380 /** @hide */ 19381 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19382 public static final String STEM_2_DEFAULT_DATA = "STEM_2_DEFAULT_DATA"; 19383 /** @hide */ 19384 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19385 public static final String STEM_3_TYPE = "STEM_3_TYPE"; 19386 /** @hide */ 19387 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19388 public static final String STEM_3_DATA = "STEM_3_DATA"; 19389 /** @hide */ 19390 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19391 public static final String STEM_3_DEFAULT_DATA = "STEM_3_DEFAULT_DATA"; 19392 19393 // Stem types 19394 /** @hide */ 19395 public static final int STEM_TYPE_UNKNOWN = -1; 19396 /** @hide */ 19397 public static final int STEM_TYPE_APP_LAUNCH = 0; 19398 /** @hide */ 19399 public static final int STEM_TYPE_CONTACT_LAUNCH = 1; 19400 19401 /** 19402 * If the device should be muted when off body. 19403 * @hide 19404 */ 19405 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19406 public static final String MUTE_WHEN_OFF_BODY_ENABLED = "obtain_mute_when_off_body"; 19407 19408 /** 19409 * Wear OS version string. 19410 * @hide 19411 */ 19412 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19413 public static final String WEAR_OS_VERSION_STRING = "wear_os_version_string"; 19414 19415 /** 19416 * Whether there is a side button. 19417 * @hide 19418 */ 19419 public static final String SIDE_BUTTON = "side_button"; 19420 19421 /** 19422 * The android wear system version. 19423 * @hide 19424 */ 19425 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19426 public static final String ANDROID_WEAR_VERSION = "android_wear_version"; 19427 19428 /** 19429 * The wear system capabiltiies. 19430 * @hide 19431 */ 19432 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19433 public static final String SYSTEM_CAPABILITIES = "system_capabilities"; 19434 19435 /** 19436 * The android wear system edition. 19437 * @hide 19438 */ 19439 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19440 public static final String SYSTEM_EDITION = "android_wear_system_edition"; 19441 19442 /** 19443 * The Wear platform MR number. 19444 * @hide 19445 */ 19446 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19447 public static final String WEAR_PLATFORM_MR_NUMBER = "wear_platform_mr_number"; 19448 19449 /** 19450 * The mobile signal detector setting. 19451 * @hide 19452 */ 19453 public static final String MOBILE_SIGNAL_DETECTOR = "mobile_signal_detector"; 19454 19455 19456 /** 19457 * Whether ambient is currently enabled. 19458 * @hide 19459 */ 19460 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19461 public static final String AMBIENT_ENABLED = "ambient_enabled"; 19462 19463 /** 19464 * Whether ambient tilt to wake is enabled. 19465 * @hide 19466 */ 19467 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19468 public static final String AMBIENT_TILT_TO_WAKE = "ambient_tilt_to_wake"; 19469 19470 /** 19471 * Whether ambient low bit mode is enabled by developer options. 19472 * @hide 19473 */ 19474 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19475 public static final String AMBIENT_LOW_BIT_ENABLED_DEV = "ambient_low_bit_enabled_dev"; 19476 19477 /** 19478 * Whether ambient touch to wake is enabled. 19479 * @hide 19480 */ 19481 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19482 public static final String AMBIENT_TOUCH_TO_WAKE = "ambient_touch_to_wake"; 19483 19484 /** 19485 * Whether ambient tilt to bright is enabled. 19486 * @hide 19487 */ 19488 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19489 public static final String AMBIENT_TILT_TO_BRIGHT = "ambient_tilt_to_bright"; 19490 19491 /** 19492 * Whether touch and hold to edit WF is enabled 19493 * @hide 19494 */ 19495 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19496 public static final String GESTURE_TOUCH_AND_HOLD_WATCH_FACE_ENABLED = 19497 "gesture_touch_and_hold_watchface_enabled"; 19498 19499 /** 19500 * Whether screenshot is enabled. 19501 * @hide 19502 */ 19503 public static final String SCREENSHOT_ENABLED = "screenshot_enabled"; 19504 19505 /** 19506 * Whether bedtime mode is enabled. 19507 * @hide 19508 */ 19509 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19510 public static final String BEDTIME_MODE = "bedtime_mode"; 19511 19512 /** 19513 * Whether hard bedtime mode is active thus limiting user interactions. 19514 */ 19515 public static final String BEDTIME_HARD_MODE = "bedtime_hard_mode"; 19516 19517 /** 19518 * Whether the current watchface is decomposable. 19519 * @hide 19520 */ 19521 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19522 public static final String DECOMPOSABLE_WATCHFACE = "current_watchface_decomposable"; 19523 19524 /** 19525 * Whether to force ambient when docked. 19526 * @hide 19527 */ 19528 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19529 public static final String AMBIENT_FORCE_WHEN_DOCKED = "ambient_force_when_docked"; 19530 19531 /** 19532 * Whether the ambient low bit mode is enabled. 19533 * @hide 19534 */ 19535 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19536 public static final String AMBIENT_LOW_BIT_ENABLED = "ambient_low_bit_enabled"; 19537 19538 /** 19539 * The timeout duration in minutes of ambient mode when plugged in. 19540 * @hide 19541 */ 19542 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19543 public static final String AMBIENT_PLUGGED_TIMEOUT_MIN = "ambient_plugged_timeout_min"; 19544 19545 /** 19546 * What OS does paired device has. 19547 * @hide 19548 */ 19549 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19550 public static final String PAIRED_DEVICE_OS_TYPE = "paired_device_os_type"; 19551 19552 // Possible values of PAIRED_DEVICE_OS_TYPE 19553 /** @hide */ 19554 public static final int PAIRED_DEVICE_OS_TYPE_UNKNOWN = 0; 19555 /** @hide */ 19556 public static final int PAIRED_DEVICE_OS_TYPE_ANDROID = 1; 19557 /** @hide */ 19558 public static final int PAIRED_DEVICE_OS_TYPE_IOS = 2; 19559 19560 /** 19561 * The bluetooth settings selected BLE role for the companion. 19562 * @hide 19563 */ 19564 public static final String COMPANION_BLE_ROLE = "companion_ble_role"; 19565 19566 // Possible values of COMPANION_BLE_ROLE 19567 /** @hide */ 19568 public static final int BLUETOOTH_ROLE_CENTRAL = 1; 19569 /** @hide */ 19570 public static final int BLUETOOTH_ROLE_PERIPHERAL = 2; 19571 19572 /** 19573 * The bluetooth settings stored companion device name. 19574 * @hide 19575 */ 19576 public static final String COMPANION_NAME = "companion_bt_name"; 19577 19578 /** 19579 * The user's last setting for hfp client. 19580 * @hide 19581 */ 19582 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19583 public static final String USER_HFP_CLIENT_SETTING = "user_hfp_client_setting"; 19584 19585 // Possible hfp client user setting values 19586 /** @hide */ 19587 public static final int HFP_CLIENT_UNSET = 0; 19588 /** @hide */ 19589 public static final int HFP_CLIENT_ENABLED = 1; 19590 /** @hide */ 19591 public static final int HFP_CLIENT_DISABLED = 2; 19592 19593 /** 19594 * The companion phone's android version. 19595 * @hide 19596 */ 19597 public static final String COMPANION_OS_VERSION = "wear_companion_os_version"; 19598 19599 // Companion os version constants 19600 /** @hide */ 19601 public static final int COMPANION_OS_VERSION_UNDEFINED = -1; 19602 19603 /** 19604 * The companion App name. 19605 * @hide 19606 */ 19607 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19608 public static final String COMPANION_APP_NAME = "wear_companion_app_name"; 19609 19610 /** 19611 * A boolean value to indicate if we want to support all languages in LE edition on 19612 * wear. 1 for supporting, 0 for not supporting. 19613 * @hide 19614 */ 19615 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19616 public static final String ENABLE_ALL_LANGUAGES = "enable_all_languages"; 19617 19618 /** 19619 * The Locale (as language tag) the user chose at startup. 19620 * @hide 19621 */ 19622 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19623 public static final String SETUP_LOCALE = "setup_locale"; 19624 19625 /** 19626 * The version of oem setup present. 19627 * @hide 19628 */ 19629 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19630 public static final String OEM_SETUP_VERSION = "oem_setup_version"; 19631 19632 /** 19633 * The key to indicate to Setup Wizard if OEM setup is completed in Wear Services. 19634 * @hide 19635 */ 19636 public static final String OEM_SETUP_COMPLETED_STATUS = "oem_setup_completed_status"; 19637 19638 /** 19639 * Constant provided to Setup Wizard to inform about failure of OEM setup in Wear 19640 * Services. The value should be provided with setting name {@link 19641 * #OEM_SETUP_COMPLETED_STATUS}. 19642 * @hide 19643 */ 19644 public static final int OEM_SETUP_COMPLETED_FAILURE = 0; 19645 19646 /** 19647 * Constant provided to Setup Wizard to inform about successful completion of OEM setup 19648 * in Wear Services. The value should be provided with setting name {@link 19649 * #OEM_SETUP_COMPLETED_STATUS}. 19650 * @hide 19651 */ 19652 public static final int OEM_SETUP_COMPLETED_SUCCESS = 1; 19653 19654 /** 19655 * Controls the gestures feature. 19656 * @hide 19657 */ 19658 public static final String MASTER_GESTURES_ENABLED = "master_gestures_enabled"; 19659 19660 /** 19661 * Whether or not ungaze is enabled. 19662 * @hide 19663 */ 19664 public static final String UNGAZE_ENABLED = "ungaze_enabled"; 19665 19666 /** 19667 * The device's battery saver mode, which can be one of the following: 19668 * -{@link BATTERY_SAVER_MODE_NONE} 19669 * -{@link BATTERY_SAVER_MODE_LIGHT} 19670 * -{@link BATTERY_SAVER_MODE_TRADITIONAL_WATCH} 19671 * -{@link BATTERY_SAVER_MODE_TIME_ONLY} 19672 * -{@link BATTERY_SAVER_MODE_CUSTOM} 19673 * @hide 19674 */ 19675 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19676 public static final String BATTERY_SAVER_MODE = "battery_saver_mode"; 19677 19678 /** 19679 * Not in Battery Saver Mode 19680 * @hide 19681 */ 19682 public static final int BATTERY_SAVER_MODE_NONE = 0; 19683 /** 19684 * In Lightweight Battery Saver Mode 19685 * @hide 19686 */ 19687 public static final int BATTERY_SAVER_MODE_LIGHT = 1; 19688 /** 19689 * In Traditional Watch Mode Battery Saver Mode 19690 * @hide 19691 */ 19692 public static final int BATTERY_SAVER_MODE_TRADITIONAL_WATCH = 2; 19693 /** 19694 * In Time-only Mode Battery Saver Mode 19695 * @hide 19696 */ 19697 public static final int BATTERY_SAVER_MODE_TIME_ONLY = 3; 19698 /** 19699 * Partner's Battery Saver implementation is being used 19700 * @hide 19701 */ 19702 public static final int BATTERY_SAVER_MODE_CUSTOM = 4; 19703 19704 /** 19705 Whether 1P apps vote for enabling data during different modes, 19706 i.e. BTM, BBSM 19707 * @hide 19708 */ 19709 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19710 public static final String CONNECTIVITY_KEEP_DATA_ON = "wear_connectivity_keep_data_on"; 19711 19712 /** 19713 * The maximum ambient mode duration when an activity is allowed to auto resume. 19714 * @hide 19715 */ 19716 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19717 public static final String WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_MS = 19718 "wear_activity_auto_resume_timeout_ms"; 19719 19720 /** 19721 * If the current {@code WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_MS} value is set by user. 19722 * 1 for true, 0 for false. 19723 * @hide 19724 */ 19725 public static final String WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_SET_BY_USER = 19726 "wear_activity_auto_resume_timeout_set_by_user"; 19727 19728 /** 19729 * If burn in protection is enabled. 19730 * @hide 19731 */ 19732 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19733 public static final String BURN_IN_PROTECTION_ENABLED = "burn_in_protection"; 19734 19735 /** 19736 * Whether the device has combined location setting enabled. 19737 * 19738 * @deprecated Use LocationManager as the source of truth for all location states. 19739 * 19740 * @hide 19741 */ 19742 @Deprecated 19743 public static final String COMBINED_LOCATION_ENABLE = "combined_location_enable"; 19744 19745 /** 19746 * The wrist orientation mode of the device 19747 * Valid values - LEFT_WRIST_ROTATION_0 = "0" (default), LEFT_WRIST_ROTATION_180 = "1", 19748 * RIGHT_WRIST_ROTATION_0 = "2", RIGHT_WRIST_ROTATION_180 = "3" 19749 * @hide 19750 */ 19751 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19752 public static final String WRIST_ORIENTATION_MODE = "wear_wrist_orientation_mode"; 19753 19754 /** 19755 * Current lock screen state of the device 19756 * (null = default value of this setting (lockscreen is never set), 19757 * 0 = {@link #LOCK_SCREEN_STATE_NONE}, 19758 * 1 = {@link #LOCK_SCREEN_STATE_PIN}, 19759 * 2 = {@link #LOCK_SCREEN_STATE_PATTERN}) 19760 * @hide 19761 */ 19762 public static final String LOCK_SCREEN_STATE = "lock_screen_state"; 19763 19764 /** 19765 * No lock screen set 19766 * One of the possible states for {@link #LOCK_SCREEN_STATE}. 19767 * @hide 19768 */ 19769 public static final int LOCK_SCREEN_STATE_NONE = 0; 19770 19771 /** 19772 * Lock screen set as a pin 19773 * One of the possible states for {@link #LOCK_SCREEN_STATE}. 19774 * @hide 19775 */ 19776 public static final int LOCK_SCREEN_STATE_PIN = 1; 19777 19778 /** 19779 * Lock screen set as a pattern 19780 * One of the possible states for {@link #LOCK_SCREEN_STATE}. 19781 * @hide 19782 */ 19783 public static final int LOCK_SCREEN_STATE_PATTERN = 2; 19784 19785 /** 19786 * Setting indicating the name of the Wear OS app package containing the device's sysui. 19787 * 19788 * @hide 19789 */ 19790 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19791 public static final String CLOCKWORK_SYSUI_PACKAGE = "clockwork_sysui_package"; 19792 19793 /** 19794 * Setting indicating the name of the main activity of the Wear OS sysui. 19795 * 19796 * @hide 19797 */ 19798 public static final String CLOCKWORK_SYSUI_MAIN_ACTIVITY = 19799 "clockwork_sysui_main_activity"; 19800 19801 /** 19802 * Setting to disable power button long press launching Assistant. It's boolean, i.e. 19803 * enabled = 1, disabled = 0. By default, this setting is enabled. 19804 * 19805 * @hide 19806 */ 19807 public static final String CLOCKWORK_LONG_PRESS_TO_ASSISTANT_ENABLED = 19808 "clockwork_long_press_to_assistant_enabled"; 19809 19810 /** 19811 * Whether the device has Cooldown Mode enabled. 19812 * @hide 19813 */ 19814 public static final String COOLDOWN_MODE_ON = "cooldown_mode_on"; 19815 19816 /** 19817 * Whether the device has Wet Mode/ Touch Lock Mode enabled. 19818 * @hide 19819 */ 19820 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19821 public static final String WET_MODE_ON = "wet_mode_on"; 19822 19823 /** 19824 * Whether the RSB wake feature is enabled. 19825 * @hide 19826 */ 19827 public static final String RSB_WAKE_ENABLED = "rsb_wake_enabled"; 19828 19829 /** 19830 * Whether the screen-unlock (keyguard) sound is enabled. 19831 * @hide 19832 */ 19833 public static final String SCREEN_UNLOCK_SOUND_ENABLED = "screen_unlock_sound_enabled"; 19834 19835 /** 19836 * Whether charging sounds are enabled. 19837 * @hide 19838 */ 19839 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19840 public static final String CHARGING_SOUNDS_ENABLED = "wear_charging_sounds_enabled"; 19841 19842 /** 19843 * Whether dynamic color theming (e.g. Material You) is enabled for apps which support 19844 * it. 19845 * 19846 * @hide 19847 */ 19848 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19849 public static final String DYNAMIC_COLOR_THEME_ENABLED = "dynamic_color_theme_enabled"; 19850 19851 /** 19852 * Current state of accessibility vibration watch feature 19853 * (0 = false, 1 = true) 19854 * 19855 * @hide 19856 */ 19857 public static final String ACCESSIBILITY_VIBRATION_WATCH_ENABLED = 19858 "a11y_vibration_watch_enabled"; 19859 19860 /** 19861 * Stores current type of accessibility vibration 19862 * (0 = {@link #ACCESSIBILITY_VIBRATION_WATCH_TYPE_DIGIT}, 19863 * 1 = {@link #ACCESSIBILITY_VIBRATION_WATCH_TYPE_TERSE) 19864 * 19865 * @hide 19866 */ 19867 public static final String ACCESSIBILITY_VIBRATION_WATCH_TYPE = 19868 "a11y_vibration_watch_type"; 19869 19870 /** 19871 * Vibration watch type digit 19872 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_TYPE}. 19873 * 19874 * @hide 19875 */ 19876 public static final int ACCESSIBILITY_VIBRATION_WATCH_TYPE_DIGIT = 0; 19877 19878 /** 19879 * Vibration watch type terse 19880 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_TYPE}. 19881 * 19882 * @hide 19883 */ 19884 public static final int ACCESSIBILITY_VIBRATION_WATCH_TYPE_TERSE = 1; 19885 19886 /** 19887 * Stores current accessibility vibration watch speed 19888 * (0 = {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED_VERY_SLOW}, 19889 * 1 = {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED_SLOW}, 19890 * 2 = {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED_MEDIUM}, 19891 * 3 = {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED_FAST}, 19892 * 4 = {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED_VERY_FAST}) 19893 */ 19894 public static final String ACCESSIBILITY_VIBRATION_WATCH_SPEED = "vibration_speed"; 19895 19896 /** 19897 * Vibration watch speed type very slow 19898 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED}. 19899 * 19900 * @hide 19901 */ 19902 public static final int ACCESSIBILITY_VIBRATION_WATCH_SPEED_VERY_SLOW = 0; 19903 19904 /** 19905 * Vibration watch speed type slow 19906 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED}. 19907 * 19908 * @hide 19909 */ 19910 public static final int ACCESSIBILITY_VIBRATION_WATCH_SPEED_SLOW = 1; 19911 19912 /** 19913 * Vibration watch speed type medium 19914 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED}. 19915 * 19916 * @hide 19917 */ 19918 public static final int ACCESSIBILITY_VIBRATION_WATCH_SPEED_MEDIUM = 2; 19919 19920 /** 19921 * Vibration watch speed type fast 19922 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED}. 19923 * 19924 * @hide 19925 */ 19926 public static final int ACCESSIBILITY_VIBRATION_WATCH_SPEED_FAST = 3; 19927 19928 /** 19929 * Vibration watch speed type very fast 19930 * One of the possible states for {@link #ACCESSIBILITY_VIBRATION_WATCH_SPEED}. 19931 * 19932 * @hide 19933 */ 19934 public static final int ACCESSIBILITY_VIBRATION_WATCH_SPEED_VERY_FAST = 4; 19935 19936 /** 19937 * The key to indicate the data migration status on device upgrade in Wear Services. 19938 * @hide 19939 */ 19940 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19941 public static final String UPGRADE_DATA_MIGRATION_STATUS = 19942 "upgrade_data_migration_status"; 19943 19944 /** 19945 * Constant indicating that the data migration is not needed. 19946 * 19947 * The value should be provided with setting name {@link 19948 * #UPGRADE_DATA_MIGRATION_STATUS}. 19949 * @hide 19950 */ 19951 public static final int UPGRADE_DATA_MIGRATION_NOT_NEEDED = 0; 19952 19953 /** 19954 * Constant indicating that the data migration is not yet finished. 19955 * 19956 * The value should be provided with setting name {@link 19957 * #UPGRADE_DATA_MIGRATION_STATUS}. 19958 * @hide 19959 */ 19960 public static final int UPGRADE_DATA_MIGRATION_PENDING = 1; 19961 19962 /** 19963 * Constant indicating that the data migration is finished. 19964 * 19965 * The value should be provided with setting name {@link 19966 * #UPGRADE_DATA_MIGRATION_STATUS}. 19967 * @hide 19968 */ 19969 public static final int UPGRADE_DATA_MIGRATION_DONE = 2; 19970 19971 /** 19972 * Whether to disable AOD while plugged. 19973 * (0 = false, 1 = true) 19974 * @hide 19975 */ 19976 public static final String DISABLE_AOD_WHILE_PLUGGED = "disable_aod_while_plugged"; 19977 19978 /** 19979 * Whether the user has consented for network location provider (NLP). 19980 * This setting key will only be used once during OOBE to set NLP initial value through 19981 * the companion app ToS. This setting key will be synced over from Companion and 19982 * corresponding toggle in GMS will be enabled. 19983 * @hide 19984 */ 19985 public static final String NETWORK_LOCATION_OPT_IN = "network_location_opt_in"; 19986 19987 /** 19988 * Whether haptics are enabled for Active Unlock on wear. 19989 * @hide 19990 */ 19991 public static final String VIBRATE_FOR_ACTIVE_UNLOCK = "wear_vibrate_for_active_unlock"; 19992 19993 /** 19994 * The custom foreground color. 19995 * @hide 19996 */ 19997 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 19998 public static final String CUSTOM_COLOR_FOREGROUND = "custom_foreground_color"; 19999 20000 /** 20001 * The custom background color. 20002 * @hide 20003 */ 20004 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 20005 public static final String CUSTOM_COLOR_BACKGROUND = "custom_background_color"; 20006 20007 /** The status of the phone switching process. 20008 * @hide 20009 */ 20010 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 20011 public static final String PHONE_SWITCHING_STATUS = "phone_switching_status"; 20012 20013 /** 20014 * Phone switching not started 20015 * @hide 20016 */ 20017 public static final int PHONE_SWITCHING_STATUS_NOT_STARTED = 0; 20018 20019 /** 20020 * Phone switching started 20021 * @hide 20022 */ 20023 public static final int PHONE_SWITCHING_STATUS_STARTED = 1; 20024 20025 /** 20026 * Phone switching completed and was successful 20027 * @hide 20028 */ 20029 public static final int PHONE_SWITCHING_STATUS_SUCCESS = 2; 20030 20031 /** 20032 * Phone switching was cancelled 20033 * @hide 20034 */ 20035 public static final int PHONE_SWITCHING_STATUS_CANCELLED = 3; 20036 20037 /** 20038 * Phone switching failed 20039 * @hide 20040 */ 20041 public static final int PHONE_SWITCHING_STATUS_FAILED = 4; 20042 20043 /** 20044 * Phone switching is in progress of advertising to new companion device. 20045 * @hide 20046 */ 20047 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_ADVERTISING = 5; 20048 20049 /** 20050 * Phone switching successfully bonded with new companion device. 20051 * @hide 20052 */ 20053 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_BONDED = 6; 20054 20055 /** 20056 * Phone switching successfully completed on phone side. 20057 * @hide 20058 */ 20059 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_PHONE_COMPLETE = 7; 20060 20061 /** 20062 * Connection config migration in progress. 20063 * @hide 20064 */ 20065 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_MIGRATION = 8; 20066 20067 /** 20068 * Connection config migration failed. 20069 * @hide 20070 */ 20071 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_MIGRATION_FAILED = 9; 20072 20073 /** 20074 * Connection config migration cancellation in progress. 20075 * @hide 20076 */ 20077 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_MIGRATION_CANCELLED = 10; 20078 20079 /** 20080 * Connection config migration success. 20081 * @hide 20082 */ 20083 public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_MIGRATION_SUCCESS = 11; 20084 20085 20086 /** 20087 * Whether the device has enabled the feature to reduce motion and animation 20088 * (0 = false, 1 = true) 20089 * @hide 20090 */ 20091 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 20092 public static final String REDUCE_MOTION = "reduce_motion"; 20093 20094 /** 20095 * Whether RTL swipe-to-dismiss is enabled by developer options. 20096 * (0 = false, 1 = true) 20097 * @hide 20098 */ 20099 public static final String RTL_SWIPE_TO_DISMISS_ENABLED_DEV = 20100 "rtl_swipe_to_dismiss_enabled_dev"; 20101 20102 /** 20103 * Tethered Configuration state. 20104 * @hide 20105 */ 20106 public static final String TETHER_CONFIG_STATE = "tethered_config_state"; 20107 20108 /** 20109 * Tethered configuration state is unknown. 20110 * @hide 20111 */ 20112 public static final int TETHERED_CONFIG_UNKNOWN = 0; 20113 20114 /** 20115 * Device is set into standalone mode. 20116 * @hide 20117 */ 20118 public static final int TETHERED_CONFIG_STANDALONE = 1; 20119 20120 /** 20121 * Device is set in tethered mode. 20122 * @hide 20123 */ 20124 public static final int TETHERED_CONFIG_TETHERED = 2; 20125 20126 /** 20127 * Device is set in restricted mode. 20128 */ 20129 public static final int TETHERED_CONFIG_RESTRICTED = 3; 20130 20131 /** 20132 * Whether phone switching is supported. 20133 * 20134 * (0 = false, 1 = true) 20135 * @hide 20136 */ 20137 public static final String PHONE_SWITCHING_SUPPORTED = "phone_switching_supported"; 20138 20139 /** 20140 * Setting indicating the name of the Wear OS package that hosts the Media Controls UI. 20141 * 20142 * @hide 20143 */ 20144 @Readable 20145 public static final String WEAR_MEDIA_CONTROLS_PACKAGE = "wear_media_controls_package"; 20146 20147 /** 20148 * Setting indicating the name of the Wear OS package responsible for bridging media. 20149 * 20150 * @hide 20151 */ 20152 @Readable 20153 public static final String WEAR_MEDIA_SESSIONS_PACKAGE = "wear_media_sessions_package"; 20154 20155 /* 20156 * Controls the launcher ui mode on wearable devices. 20157 * @hide 20158 */ 20159 @Readable(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 20160 public static final String WEAR_LAUNCHER_UI_MODE = "wear_launcher_ui_mode"; 20161 20162 /** Whether Wear Power Anomaly Service is enabled. 20163 * 20164 * (0 = false, 1 = true) 20165 * @hide 20166 */ 20167 public static final String WEAR_POWER_ANOMALY_SERVICE_ENABLED = 20168 "wear_power_anomaly_service_enabled"; 20169 20170 /** 20171 * A boolean that tracks whether Wrist Detection Auto-Locking is enabled. 20172 * 20173 * @hide 20174 */ 20175 @Readable 20176 public static final String WRIST_DETECTION_AUTO_LOCKING_ENABLED = 20177 "wear_wrist_detection_auto_locking_enabled"; 20178 20179 /** 20180 * Whether consistent notification blocking experience is enabled. 20181 * 20182 * @hide 20183 */ 20184 @Readable 20185 public static final String CONSISTENT_NOTIFICATION_BLOCKING_ENABLED = 20186 "consistent_notification_blocking_enabled"; 20187 20188 /** 20189 * Whether the Auto Bedtime Mode experience is enabled. 20190 * 20191 * @hide 20192 */ 20193 public static final String AUTO_BEDTIME_MODE = "auto_bedtime_mode"; 20194 } 20195 } 20196 20197 /** 20198 * Configuration system settings, containing settings which are applied identically for all 20199 * defined users. Only Android can read these and only a specific configuration service can 20200 * write these. 20201 * 20202 * @hide 20203 */ 20204 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20205 public static final class Config extends NameValueTable { 20206 20207 /** 20208 * The modes that can be used when disabling syncs to the 'config' settings. 20209 * @hide 20210 */ 20211 @IntDef(prefix = "SYNC_DISABLED_MODE_", 20212 value = { SYNC_DISABLED_MODE_NONE, SYNC_DISABLED_MODE_PERSISTENT, 20213 SYNC_DISABLED_MODE_UNTIL_REBOOT }) 20214 @Retention(RetentionPolicy.SOURCE) 20215 @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE}) 20216 public @interface SyncDisabledMode {} 20217 20218 /** 20219 * Sync is not disabled. 20220 * 20221 * @deprecated use the constant in DeviceConfig 20222 * 20223 * @hide 20224 */ 20225 @Deprecated 20226 public static final int SYNC_DISABLED_MODE_NONE = DeviceConfig.SYNC_DISABLED_MODE_NONE; 20227 20228 /** 20229 * Disabling of Config bulk update / syncing is persistent, i.e. it survives a device 20230 * reboot. 20231 * 20232 * @deprecated use the constant in DeviceConfig 20233 * 20234 * @hide 20235 */ 20236 @Deprecated 20237 public static final int SYNC_DISABLED_MODE_PERSISTENT = 20238 DeviceConfig.SYNC_DISABLED_MODE_PERSISTENT; 20239 20240 /** 20241 * Disabling of Config bulk update / syncing is not persistent, i.e. it will not survive a 20242 * device reboot. 20243 * 20244 * @deprecated use the constant in DeviceConfig 20245 * 20246 * @hide 20247 */ 20248 @Deprecated 20249 public static final int SYNC_DISABLED_MODE_UNTIL_REBOOT = 20250 DeviceConfig.SYNC_DISABLED_MODE_UNTIL_REBOOT; 20251 20252 /** 20253 * The content:// style URL for the config table. 20254 * 20255 * @hide 20256 */ 20257 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/config"); 20258 20259 private static final ContentProviderHolder sProviderHolder = 20260 new ContentProviderHolder(CONTENT_URI); 20261 20262 // Populated lazily, guarded by class object: 20263 private static final NameValueCache sNameValueCache = new NameValueCache( 20264 CONTENT_URI, 20265 CALL_METHOD_GET_CONFIG, 20266 CALL_METHOD_PUT_CONFIG, 20267 CALL_METHOD_DELETE_CONFIG, 20268 CALL_METHOD_LIST_CONFIG, 20269 CALL_METHOD_SET_ALL_CONFIG, 20270 sProviderHolder, 20271 Config.class); 20272 20273 // Should never be invoked Config()20274 private Config() { 20275 } 20276 20277 /** 20278 * Look up a name in the database. 20279 * @param name to look up in the table 20280 * @return the corresponding value, or null if not present 20281 * 20282 * @hide 20283 */ 20284 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20285 @Nullable 20286 @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) getString(@onNull String name)20287 public static String getString(@NonNull String name) { 20288 ContentResolver resolver = getContentResolver(); 20289 return sNameValueCache.getStringForUser(resolver, name, resolver.getUserId()); 20290 } 20291 20292 /** 20293 * Look up a list of names in the database, within the specified namespace. 20294 * 20295 * @param namespace to which the names belong 20296 * @param names to look up in the table 20297 * @return a non null, but possibly empty, map from name to value for any of the names that 20298 * were found during lookup. 20299 * 20300 * @hide 20301 */ 20302 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20303 @NonNull 20304 @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) getStrings(@onNull String namespace, @NonNull List<String> names)20305 public static Map<String, String> getStrings(@NonNull String namespace, 20306 @NonNull List<String> names) { 20307 return getStrings(getContentResolver(), namespace, names); 20308 } 20309 20310 /** 20311 * Return all stored flags. 20312 * 20313 * The keys take the form {@code namespace/flag}, and the values are the flag values. 20314 * 20315 * @hide 20316 */ 20317 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20318 @NonNull getAllStrings()20319 public static Map<String, String> getAllStrings() { 20320 HashMap<String, String> allFlags = new HashMap<String, String>(); 20321 try { 20322 ContentResolver resolver = getContentResolver(); 20323 Bundle arg = new Bundle(); 20324 arg.putInt(Settings.CALL_METHOD_USER_KEY, resolver.getUserId()); 20325 IContentProvider cp = sProviderHolder.getProvider(resolver); 20326 Bundle b = cp.call(resolver.getAttributionSource(), 20327 sProviderHolder.mUri.getAuthority(), CALL_METHOD_LIST_CONFIG, null, arg); 20328 if (b != null) { 20329 Map<String, String> flagsToValues = 20330 (HashMap) b.getSerializable(Settings.NameValueTable.VALUE, 20331 java.util.HashMap.class); 20332 allFlags.putAll(flagsToValues); 20333 } 20334 } catch (RemoteException e) { 20335 Log.w(TAG, "Can't query configuration table for " + CONTENT_URI, e); 20336 } 20337 return allFlags; 20338 } 20339 20340 /** 20341 * Look up a list of names in the database, within the specified namespace. 20342 * 20343 * @param resolver to access the database with 20344 * @param namespace to which the names belong 20345 * @param names to look up in the table 20346 * @return a non null, but possibly empty, map from name to value for any of the names that 20347 * were found during lookup. 20348 * 20349 * @hide 20350 */ 20351 @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) getStrings(@onNull ContentResolver resolver, @NonNull String namespace, @NonNull List<String> names)20352 public static Map<String, String> getStrings(@NonNull ContentResolver resolver, 20353 @NonNull String namespace, @NonNull List<String> names) { 20354 String prefix = createPrefix(namespace); 20355 20356 return sNameValueCache.getStringsForPrefixStripPrefix(resolver, prefix, names); 20357 } 20358 20359 /** 20360 * Store a name/value pair into the database within the specified namespace. 20361 * <p> 20362 * Also the method takes an argument whether to make the value the default for this setting. 20363 * If the system already specified a default value, then the one passed in here will 20364 * <strong>not</strong> be set as the default. 20365 * </p> 20366 * 20367 * @param namespace to store the name/value pair in. 20368 * @param name to store. 20369 * @param value to associate with the name. 20370 * @param makeDefault whether to make the value the default one. 20371 * @return true if the value was set, false on database errors. 20372 * 20373 * @see #resetToDefaults(ContentResolver, int, String) 20374 * 20375 * @hide 20376 */ 20377 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20378 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) putString(@onNull String namespace, @NonNull String name, @Nullable String value, boolean makeDefault)20379 public static boolean putString(@NonNull String namespace, 20380 @NonNull String name, @Nullable String value, boolean makeDefault) { 20381 ContentResolver resolver = getContentResolver(); 20382 return sNameValueCache.putStringForUser(resolver, createCompositeName(namespace, name), 20383 value, null, makeDefault, resolver.getUserId(), 20384 DEFAULT_OVERRIDEABLE_BY_RESTORE); 20385 } 20386 20387 /** 20388 * Clear all name/value pairs for the provided namespace and save new name/value pairs in 20389 * their place. 20390 * 20391 * @param namespace to which the names should be set. 20392 * @param keyValues map of key names (without the prefix) to values. 20393 * @return true if the name/value pairs were set, false if setting was blocked 20394 * 20395 * @hide 20396 */ 20397 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20398 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) setStrings(@onNull String namespace, @NonNull Map<String, String> keyValues)20399 public static boolean setStrings(@NonNull String namespace, 20400 @NonNull Map<String, String> keyValues) 20401 throws DeviceConfig.BadConfigException { 20402 return setStrings(getContentResolver(), namespace, keyValues); 20403 } 20404 20405 /** 20406 * Clear all name/value pairs for the provided namespace and save new name/value pairs in 20407 * their place. 20408 * 20409 * @param resolver to access the database with. 20410 * @param namespace to which the names should be set. 20411 * @param keyValues map of key names (without the prefix) to values. 20412 * @return true if the name/value pairs were set, false if setting was blocked 20413 * 20414 * @hide 20415 */ 20416 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) setStrings(@onNull ContentResolver resolver, @NonNull String namespace, @NonNull Map<String, String> keyValues)20417 public static boolean setStrings(@NonNull ContentResolver resolver, 20418 @NonNull String namespace, @NonNull Map<String, String> keyValues) 20419 throws DeviceConfig.BadConfigException { 20420 HashMap<String, String> compositeKeyValueMap = new HashMap<>(keyValues.keySet().size()); 20421 for (Map.Entry<String, String> entry : keyValues.entrySet()) { 20422 compositeKeyValueMap.put( 20423 createCompositeName(namespace, entry.getKey()), entry.getValue()); 20424 } 20425 int result = sNameValueCache.setStringsForPrefix( 20426 resolver, createPrefix(namespace), compositeKeyValueMap); 20427 if (result == SET_ALL_RESULT_SUCCESS) { 20428 return true; 20429 } else if (result == SET_ALL_RESULT_DISABLED) { 20430 return false; 20431 } 20432 // If can't set given configuration that means it's bad 20433 throw new DeviceConfig.BadConfigException(); 20434 } 20435 20436 /** 20437 * Delete a name/value pair from the database for the specified namespace. 20438 * 20439 * @param namespace to delete the name/value pair from. 20440 * @param name to delete. 20441 * @return true if the value was deleted, false on database errors. If the name/value pair 20442 * did not exist, return True. 20443 * 20444 * @see #resetToDefaults(ContentResolver, int, String) 20445 * 20446 * @hide 20447 */ 20448 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20449 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) deleteString(@onNull String namespace, @NonNull String name)20450 public static boolean deleteString(@NonNull String namespace, 20451 @NonNull String name) { 20452 ContentResolver resolver = getContentResolver(); 20453 return sNameValueCache.deleteStringForUser(resolver, 20454 createCompositeName(namespace, name), resolver.getUserId()); 20455 } 20456 20457 /** 20458 * Reset the values to their defaults. 20459 * <p> 20460 * The method accepts an optional prefix parameter. If provided, only pairs with a name that 20461 * starts with the exact prefix will be reset. Otherwise all will be reset. 20462 * 20463 * @param resetMode The reset mode to use. 20464 * @param namespace Optionally, to limit which which namespace is reset. 20465 * 20466 * @see #putString(ContentResolver, String, String, String, boolean) 20467 * 20468 * @hide 20469 */ 20470 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20471 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) resetToDefaults(@esetMode int resetMode, @Nullable String namespace)20472 public static void resetToDefaults(@ResetMode int resetMode, 20473 @Nullable String namespace) { 20474 try { 20475 ContentResolver resolver = getContentResolver(); 20476 Bundle arg = new Bundle(); 20477 arg.putInt(CALL_METHOD_USER_KEY, resolver.getUserId()); 20478 arg.putInt(CALL_METHOD_RESET_MODE_KEY, resetMode); 20479 if (namespace != null) { 20480 arg.putString(Settings.CALL_METHOD_PREFIX_KEY, createPrefix(namespace)); 20481 } 20482 IContentProvider cp = sProviderHolder.getProvider(resolver); 20483 cp.call(resolver.getAttributionSource(), 20484 sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_CONFIG, null, arg); 20485 } catch (RemoteException e) { 20486 Log.w(TAG, "Can't reset to defaults for " + CONTENT_URI, e); 20487 } 20488 } 20489 20490 /** 20491 * Bridge method between {@link DeviceConfig#setSyncDisabledMode(int)} and the 20492 * {@link com.android.providers.settings.SettingsProvider} implementation. 20493 * 20494 * @hide 20495 */ 20496 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20497 @SuppressLint("AndroidFrameworkRequiresPermission") 20498 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) setSyncDisabledMode(@yncDisabledMode int disableSyncMode)20499 public static void setSyncDisabledMode(@SyncDisabledMode int disableSyncMode) { 20500 try { 20501 ContentResolver resolver = getContentResolver(); 20502 Bundle args = new Bundle(); 20503 args.putInt(CALL_METHOD_SYNC_DISABLED_MODE_KEY, disableSyncMode); 20504 IContentProvider cp = sProviderHolder.getProvider(resolver); 20505 cp.call(resolver.getAttributionSource(), sProviderHolder.mUri.getAuthority(), 20506 CALL_METHOD_SET_SYNC_DISABLED_MODE_CONFIG, null, args); 20507 } catch (RemoteException e) { 20508 Log.w(TAG, "Can't set sync disabled mode " + CONTENT_URI, e); 20509 } 20510 } 20511 20512 /** 20513 * Bridge method between {@link DeviceConfig#getSyncDisabledMode()} and the 20514 * {@link com.android.providers.settings.SettingsProvider} implementation. 20515 * 20516 * @hide 20517 */ 20518 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20519 @SuppressLint("AndroidFrameworkRequiresPermission") 20520 @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) getSyncDisabledMode()20521 public static int getSyncDisabledMode() { 20522 try { 20523 ContentResolver resolver = getContentResolver(); 20524 Bundle args = Bundle.EMPTY; 20525 IContentProvider cp = sProviderHolder.getProvider(resolver); 20526 Bundle bundle = cp.call(resolver.getAttributionSource(), 20527 sProviderHolder.mUri.getAuthority(), 20528 CALL_METHOD_GET_SYNC_DISABLED_MODE_CONFIG, 20529 null, args); 20530 return bundle.getInt(KEY_CONFIG_GET_SYNC_DISABLED_MODE_RETURN); 20531 } catch (RemoteException e) { 20532 Log.w(TAG, "Can't query sync disabled mode " + CONTENT_URI, e); 20533 } 20534 return -1; 20535 } 20536 20537 /** 20538 * Setter callback for monitoring Config table. 20539 * 20540 * @param executor the {@link Executor} on which to invoke the callback 20541 * @param callback callback to set 20542 * 20543 * @hide 20544 */ 20545 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20546 @RequiresPermission(Manifest.permission.MONITOR_DEVICE_CONFIG_ACCESS) setMonitorCallback( @onNull ContentResolver resolver, @NonNull @CallbackExecutor Executor executor, @NonNull DeviceConfig.MonitorCallback callback)20547 public static void setMonitorCallback( 20548 @NonNull ContentResolver resolver, 20549 @NonNull @CallbackExecutor Executor executor, 20550 @NonNull DeviceConfig.MonitorCallback callback) { 20551 setMonitorCallbackAsUser(executor, resolver, resolver.getUserId(), callback); 20552 } 20553 20554 /** 20555 * Clear callback for monitoring Config table. 20556 * this may only be used to clear callback function registered by 20557 * {@link Config#setMonitorCallback} 20558 * @hide 20559 */ 20560 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 20561 @RequiresPermission(Manifest.permission.MONITOR_DEVICE_CONFIG_ACCESS) clearMonitorCallback(@onNull ContentResolver resolver)20562 public static void clearMonitorCallback(@NonNull ContentResolver resolver) { 20563 try { 20564 Bundle arg = new Bundle(); 20565 arg.putInt(CALL_METHOD_USER_KEY, resolver.getUserId()); 20566 IContentProvider cp = sProviderHolder.getProvider(resolver); 20567 cp.call(resolver.getAttributionSource(), 20568 sProviderHolder.mUri.getAuthority(), 20569 CALL_METHOD_UNREGISTER_MONITOR_CALLBACK_CONFIG, null, arg); 20570 } catch (RemoteException e) { 20571 Log.w(TAG, "Can't clear config monitor callback", e); 20572 } 20573 } 20574 20575 20576 /** 20577 * Register a content observer. 20578 * 20579 * @hide 20580 */ 20581 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) registerContentObserver(@ullable String namespace, boolean notifyForDescendants, @NonNull ContentObserver observer)20582 public static void registerContentObserver(@Nullable String namespace, 20583 boolean notifyForDescendants, @NonNull ContentObserver observer) { 20584 ActivityThread.currentApplication().getContentResolver() 20585 .registerContentObserver(createNamespaceUri(namespace), 20586 notifyForDescendants, observer); 20587 } 20588 20589 /** 20590 * Unregister a content observer. 20591 * this may only be used with content observers registered through 20592 * {@link Config#registerContentObserver} 20593 * 20594 * @hide 20595 */ 20596 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) unregisterContentObserver(@onNull ContentObserver observer)20597 public static void unregisterContentObserver(@NonNull ContentObserver observer) { 20598 ActivityThread.currentApplication().getContentResolver() 20599 .unregisterContentObserver(observer); 20600 } 20601 20602 /** 20603 * Determine whether the calling process of an IPC <em>or you</em> have been 20604 * granted a particular permission. This is the same as 20605 * {@link #checkCallingPermission}, except it grants your own permissions 20606 * if you are not currently processing an IPC. Use with care! 20607 * 20608 * @param permission The name of the permission being checked. 20609 * 20610 * @return {@link PackageManager#PERMISSION_GRANTED} if the calling 20611 * pid/uid is allowed that permission, or 20612 * {@link PackageManager#PERMISSION_DENIED} if it is not. 20613 * 20614 * @see PackageManager#checkPermission(String, String) 20615 * @see #checkPermission 20616 * @see #checkCallingPermission 20617 * @hide 20618 */ 20619 @PermissionMethod(orSelf = true) 20620 @PackageManager.PermissionResult checkCallingOrSelfPermission(@onNull @ermissionName String permission)20621 public static int checkCallingOrSelfPermission(@NonNull @PermissionName String permission) { 20622 return ActivityThread.currentApplication() 20623 .getApplicationContext().checkCallingOrSelfPermission(permission); 20624 } 20625 setMonitorCallbackAsUser( @onNull @allbackExecutor Executor executor, @NonNull ContentResolver resolver, @UserIdInt int userHandle, @NonNull DeviceConfig.MonitorCallback callback)20626 private static void setMonitorCallbackAsUser( 20627 @NonNull @CallbackExecutor Executor executor, 20628 @NonNull ContentResolver resolver, @UserIdInt int userHandle, 20629 @NonNull DeviceConfig.MonitorCallback callback) { 20630 try { 20631 Bundle arg = new Bundle(); 20632 arg.putInt(CALL_METHOD_USER_KEY, userHandle); 20633 arg.putParcelable(CALL_METHOD_MONITOR_CALLBACK_KEY, 20634 new RemoteCallback(result -> { 20635 handleMonitorCallback(result, executor, callback); 20636 })); 20637 IContentProvider cp = sProviderHolder.getProvider(resolver); 20638 cp.call(resolver.getAttributionSource(), 20639 sProviderHolder.mUri.getAuthority(), 20640 CALL_METHOD_REGISTER_MONITOR_CALLBACK_CONFIG, null, arg); 20641 } catch (RemoteException e) { 20642 Log.w(TAG, "Can't set config monitor callback", e); 20643 } 20644 } 20645 20646 /** @hide */ clearProviderForTest()20647 public static void clearProviderForTest() { 20648 sProviderHolder.clearProviderForTest(); 20649 sNameValueCache.clearGenerationTrackerForTest(); 20650 } 20651 handleMonitorCallback( Bundle result, @NonNull @CallbackExecutor Executor executor, DeviceConfig.MonitorCallback monitorCallback)20652 private static void handleMonitorCallback( 20653 Bundle result, 20654 @NonNull @CallbackExecutor Executor executor, 20655 DeviceConfig.MonitorCallback monitorCallback) { 20656 String callbackType = result.getString(EXTRA_MONITOR_CALLBACK_TYPE, ""); 20657 switch (callbackType) { 20658 case EXTRA_NAMESPACE_UPDATED_CALLBACK: 20659 String updatedNamespace = result.getString(EXTRA_NAMESPACE); 20660 if (updatedNamespace != null) { 20661 executor.execute(() -> monitorCallback.onNamespaceUpdate(updatedNamespace)); 20662 } 20663 break; 20664 case EXTRA_ACCESS_CALLBACK: 20665 String callingPackage = result.getString(EXTRA_CALLING_PACKAGE, null); 20666 String namespace = result.getString(EXTRA_NAMESPACE, null); 20667 if (namespace != null && callingPackage != null) { 20668 executor.execute(() -> 20669 monitorCallback.onDeviceConfigAccess(callingPackage, namespace)); 20670 } 20671 break; 20672 default: 20673 Slog.w(TAG, "Unrecognized DeviceConfig callback"); 20674 break; 20675 } 20676 } 20677 createCompositeName(@onNull String namespace, @NonNull String name)20678 static String createCompositeName(@NonNull String namespace, @NonNull String name) { 20679 Preconditions.checkNotNull(namespace); 20680 Preconditions.checkNotNull(name); 20681 var sb = new StringBuilder(namespace.length() + 1 + name.length()); 20682 return sb.append(namespace).append('/').append(name).toString(); 20683 } 20684 createPrefix(@onNull String namespace)20685 private static String createPrefix(@NonNull String namespace) { 20686 Preconditions.checkNotNull(namespace); 20687 return namespace + '/'; 20688 } 20689 createNamespaceUri(@onNull String namespace)20690 private static Uri createNamespaceUri(@NonNull String namespace) { 20691 Preconditions.checkNotNull(namespace); 20692 return CONTENT_URI.buildUpon().appendPath(namespace).build(); 20693 } 20694 getContentResolver()20695 private static ContentResolver getContentResolver() { 20696 return ActivityThread.currentApplication().getContentResolver(); 20697 } 20698 } 20699 20700 /** 20701 * User-defined bookmarks and shortcuts. The target of each bookmark is an 20702 * Intent URL, allowing it to be either a web page or a particular 20703 * application activity. 20704 * 20705 * @hide 20706 */ 20707 public static final class Bookmarks implements BaseColumns 20708 { 20709 private static final String TAG = "Bookmarks"; 20710 20711 /** 20712 * The content:// style URL for this table 20713 */ 20714 @UnsupportedAppUsage 20715 public static final Uri CONTENT_URI = 20716 Uri.parse("content://" + AUTHORITY + "/bookmarks"); 20717 20718 /** 20719 * The row ID. 20720 * <p>Type: INTEGER</p> 20721 */ 20722 public static final String ID = "_id"; 20723 20724 /** 20725 * Descriptive name of the bookmark that can be displayed to the user. 20726 * If this is empty, the title should be resolved at display time (use 20727 * {@link #getTitle(Context, Cursor)} any time you want to display the 20728 * title of a bookmark.) 20729 * <P> 20730 * Type: TEXT 20731 * </P> 20732 */ 20733 public static final String TITLE = "title"; 20734 20735 /** 20736 * Arbitrary string (displayed to the user) that allows bookmarks to be 20737 * organized into categories. There are some special names for 20738 * standard folders, which all start with '@'. The label displayed for 20739 * the folder changes with the locale (via {@link #getLabelForFolder}) but 20740 * the folder name does not change so you can consistently query for 20741 * the folder regardless of the current locale. 20742 * 20743 * <P>Type: TEXT</P> 20744 * 20745 */ 20746 public static final String FOLDER = "folder"; 20747 20748 /** 20749 * The Intent URL of the bookmark, describing what it points to. This 20750 * value is given to {@link android.content.Intent#getIntent} to create 20751 * an Intent that can be launched. 20752 * <P>Type: TEXT</P> 20753 */ 20754 public static final String INTENT = "intent"; 20755 20756 /** 20757 * Optional shortcut character associated with this bookmark. 20758 * <P>Type: INTEGER</P> 20759 */ 20760 public static final String SHORTCUT = "shortcut"; 20761 20762 /** 20763 * The order in which the bookmark should be displayed 20764 * <P>Type: INTEGER</P> 20765 */ 20766 public static final String ORDERING = "ordering"; 20767 20768 private static final String[] sIntentProjection = { INTENT }; 20769 private static final String[] sShortcutProjection = { ID, SHORTCUT }; 20770 private static final String sShortcutSelection = SHORTCUT + "=?"; 20771 20772 /** 20773 * Convenience function to retrieve the bookmarked Intent for a 20774 * particular shortcut key. 20775 * 20776 * @param cr The ContentResolver to query. 20777 * @param shortcut The shortcut key. 20778 * 20779 * @return Intent The bookmarked URL, or null if there is no bookmark 20780 * matching the given shortcut. 20781 */ getIntentForShortcut(ContentResolver cr, char shortcut)20782 public static Intent getIntentForShortcut(ContentResolver cr, char shortcut) 20783 { 20784 Intent intent = null; 20785 20786 Cursor c = cr.query(CONTENT_URI, 20787 sIntentProjection, sShortcutSelection, 20788 new String[] { String.valueOf((int) shortcut) }, ORDERING); 20789 // Keep trying until we find a valid shortcut 20790 try { 20791 while (intent == null && c.moveToNext()) { 20792 try { 20793 String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT)); 20794 intent = Intent.parseUri(intentURI, 0); 20795 } catch (java.net.URISyntaxException e) { 20796 // The stored URL is bad... ignore it. 20797 } catch (IllegalArgumentException e) { 20798 // Column not found 20799 Log.w(TAG, "Intent column not found", e); 20800 } 20801 } 20802 } finally { 20803 if (c != null) c.close(); 20804 } 20805 20806 return intent; 20807 } 20808 20809 /** 20810 * Add a new bookmark to the system. 20811 * 20812 * @param cr The ContentResolver to query. 20813 * @param intent The desired target of the bookmark. 20814 * @param title Bookmark title that is shown to the user; null if none 20815 * or it should be resolved to the intent's title. 20816 * @param folder Folder in which to place the bookmark; null if none. 20817 * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If 20818 * this is non-zero and there is an existing bookmark entry 20819 * with this same shortcut, then that existing shortcut is 20820 * cleared (the bookmark is not removed). 20821 * @return The unique content URL for the new bookmark entry. 20822 */ 20823 @UnsupportedAppUsage add(ContentResolver cr, Intent intent, String title, String folder, char shortcut, int ordering)20824 public static Uri add(ContentResolver cr, 20825 Intent intent, 20826 String title, 20827 String folder, 20828 char shortcut, 20829 int ordering) 20830 { 20831 // If a shortcut is supplied, and it is already defined for 20832 // another bookmark, then remove the old definition. 20833 if (shortcut != 0) { 20834 cr.delete(CONTENT_URI, sShortcutSelection, 20835 new String[] { String.valueOf((int) shortcut) }); 20836 } 20837 20838 ContentValues values = new ContentValues(); 20839 if (title != null) values.put(TITLE, title); 20840 if (folder != null) values.put(FOLDER, folder); 20841 values.put(INTENT, intent.toUri(0)); 20842 if (shortcut != 0) values.put(SHORTCUT, (int) shortcut); 20843 values.put(ORDERING, ordering); 20844 return cr.insert(CONTENT_URI, values); 20845 } 20846 20847 /** 20848 * Return the folder name as it should be displayed to the user. This 20849 * takes care of localizing special folders. 20850 * 20851 * @param r Resources object for current locale; only need access to 20852 * system resources. 20853 * @param folder The value found in the {@link #FOLDER} column. 20854 * 20855 * @return CharSequence The label for this folder that should be shown 20856 * to the user. 20857 */ getLabelForFolder(Resources r, String folder)20858 public static CharSequence getLabelForFolder(Resources r, String folder) { 20859 return folder; 20860 } 20861 20862 /** 20863 * Return the title as it should be displayed to the user. This takes 20864 * care of localizing bookmarks that point to activities. 20865 * 20866 * @param context A context. 20867 * @param cursor A cursor pointing to the row whose title should be 20868 * returned. The cursor must contain at least the {@link #TITLE} 20869 * and {@link #INTENT} columns. 20870 * @return A title that is localized and can be displayed to the user, 20871 * or the empty string if one could not be found. 20872 */ getTitle(Context context, Cursor cursor)20873 public static CharSequence getTitle(Context context, Cursor cursor) { 20874 int titleColumn = cursor.getColumnIndex(TITLE); 20875 int intentColumn = cursor.getColumnIndex(INTENT); 20876 if (titleColumn == -1 || intentColumn == -1) { 20877 throw new IllegalArgumentException( 20878 "The cursor must contain the TITLE and INTENT columns."); 20879 } 20880 20881 String title = cursor.getString(titleColumn); 20882 if (!TextUtils.isEmpty(title)) { 20883 return title; 20884 } 20885 20886 String intentUri = cursor.getString(intentColumn); 20887 if (TextUtils.isEmpty(intentUri)) { 20888 return ""; 20889 } 20890 20891 Intent intent; 20892 try { 20893 intent = Intent.parseUri(intentUri, 0); 20894 } catch (URISyntaxException e) { 20895 return ""; 20896 } 20897 20898 PackageManager packageManager = context.getPackageManager(); 20899 ResolveInfo info = packageManager.resolveActivity(intent, 0); 20900 return info != null ? info.loadLabel(packageManager) : ""; 20901 } 20902 } 20903 20904 /** 20905 * <p> 20906 * A Settings panel is floating UI that contains a fixed subset of settings to address a 20907 * particular user problem. For example, the 20908 * {@link #ACTION_INTERNET_CONNECTIVITY Internet Panel} surfaces settings related to 20909 * connecting to the internet. 20910 * <p> 20911 * Settings panels appear above the calling app to address the problem without 20912 * the user needing to open Settings and thus leave their current screen. 20913 */ 20914 public static final class Panel { Panel()20915 private Panel() { 20916 } 20917 20918 /** 20919 * Activity Action: Show a settings dialog containing settings to enable internet 20920 * connection. 20921 * <p> 20922 * Input: Nothing. 20923 * <p> 20924 * Output: Nothing. 20925 */ 20926 @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) 20927 public static final String ACTION_INTERNET_CONNECTIVITY = 20928 "android.settings.panel.action.INTERNET_CONNECTIVITY"; 20929 20930 /** 20931 * Activity Action: Show a settings dialog containing NFC-related settings. 20932 * <p> 20933 * Input: Nothing. 20934 * <p> 20935 * Output: Nothing. 20936 */ 20937 @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) 20938 public static final String ACTION_NFC = 20939 "android.settings.panel.action.NFC"; 20940 20941 /** 20942 * Activity Action: Show a settings dialog containing controls for Wifi. 20943 * <p> 20944 * Input: Nothing. 20945 * <p> 20946 * Output: Nothing. 20947 */ 20948 @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) 20949 public static final String ACTION_WIFI = 20950 "android.settings.panel.action.WIFI"; 20951 20952 /** 20953 * Activity Action: Show a settings dialog containing all volume streams. 20954 * <p> 20955 * Input: Nothing. 20956 * <p> 20957 * Output: Nothing. 20958 */ 20959 @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) 20960 public static final String ACTION_VOLUME = 20961 "android.settings.panel.action.VOLUME"; 20962 } 20963 20964 /** 20965 * Activity Action: Show setting page to process the addition of Wi-Fi networks to the user's 20966 * saved network list. The app should send a new intent with an extra that holds a maximum 20967 * of five {@link android.net.wifi.WifiNetworkSuggestion} that specify credentials for the 20968 * networks to be added to the user's database. The Intent should be sent via the 20969 * {@link android.app.Activity#startActivityForResult(Intent, int)} API. 20970 * <p> 20971 * Note: The app sending the Intent to add the credentials doesn't get any ownership over the 20972 * newly added network(s). For the Wi-Fi stack, these networks will look like the user 20973 * manually added them from the Settings UI. 20974 * <p> 20975 * Input: The app should put parcelable array list of 20976 * {@link android.net.wifi.WifiNetworkSuggestion} into the {@link #EXTRA_WIFI_NETWORK_LIST} 20977 * extra. 20978 * <p> 20979 * Output: After {@link android.app.Activity#startActivityForResult(Intent, int)}, the 20980 * callback {@link android.app.Activity#onActivityResult(int, int, Intent)} will have a 20981 * result code {@link android.app.Activity#RESULT_OK} to indicate user pressed the save 20982 * button to save the networks or {@link android.app.Activity#RESULT_CANCELED} to indicate 20983 * that the user rejected the request. Additionally, an integer array list, stored in 20984 * {@link #EXTRA_WIFI_NETWORK_RESULT_LIST}, will indicate the process result of each network. 20985 */ 20986 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 20987 public static final String ACTION_WIFI_ADD_NETWORKS = 20988 "android.settings.WIFI_ADD_NETWORKS"; 20989 20990 /** 20991 * A bundle extra of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that indicates the list 20992 * of the {@link android.net.wifi.WifiNetworkSuggestion} elements. The maximum count of the 20993 * {@link android.net.wifi.WifiNetworkSuggestion} elements in the list will be five. 20994 * <p> 20995 * For example: 20996 * To provide credentials for one open and one WPA2 networks: 20997 * 20998 * <pre>{@code 20999 * final WifiNetworkSuggestion suggestion1 = 21000 * new WifiNetworkSuggestion.Builder() 21001 * .setSsid("test111111") 21002 * .build(); 21003 * final WifiNetworkSuggestion suggestion2 = 21004 * new WifiNetworkSuggestion.Builder() 21005 * .setSsid("test222222") 21006 * .setWpa2Passphrase("test123456") 21007 * .build(); 21008 * final List<WifiNetworkSuggestion> suggestionsList = new ArrayList<>; 21009 * suggestionsList.add(suggestion1); 21010 * suggestionsList.add(suggestion2); 21011 * Bundle bundle = new Bundle(); 21012 * bundle.putParcelableArrayList(Settings.EXTRA_WIFI_NETWORK_LIST,(ArrayList<? extends 21013 * Parcelable>) suggestionsList); 21014 * final Intent intent = new Intent(Settings.ACTION_WIFI_ADD_NETWORKS); 21015 * intent.putExtras(bundle); 21016 * startActivityForResult(intent, 0); 21017 * }</pre> 21018 */ 21019 public static final String EXTRA_WIFI_NETWORK_LIST = 21020 "android.provider.extra.WIFI_NETWORK_LIST"; 21021 21022 /** 21023 * A bundle extra of the result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that 21024 * indicates the action result of the saved {@link android.net.wifi.WifiNetworkSuggestion}. 21025 * Its value is a list of integers, and all the elements will be 1:1 mapping to the elements 21026 * in {@link #EXTRA_WIFI_NETWORK_LIST}, if user press cancel to cancel the add networks 21027 * request, then its value will be null. 21028 * <p> 21029 * Note: The integer value will be one of the {@link #ADD_WIFI_RESULT_SUCCESS}, 21030 * {@link #ADD_WIFI_RESULT_ADD_OR_UPDATE_FAILED}, or {@link #ADD_WIFI_RESULT_ALREADY_EXISTS}}. 21031 */ 21032 public static final String EXTRA_WIFI_NETWORK_RESULT_LIST = 21033 "android.provider.extra.WIFI_NETWORK_RESULT_LIST"; 21034 21035 /** @hide */ 21036 @Retention(RetentionPolicy.SOURCE) 21037 @IntDef(prefix = {"ADD_WIFI_RESULT_"}, value = { 21038 ADD_WIFI_RESULT_SUCCESS, 21039 ADD_WIFI_RESULT_ADD_OR_UPDATE_FAILED, 21040 ADD_WIFI_RESULT_ALREADY_EXISTS 21041 }) 21042 public @interface AddWifiResult { 21043 } 21044 21045 /** 21046 * A result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that saving or updating the 21047 * corresponding Wi-Fi network was successful. 21048 */ 21049 public static final int ADD_WIFI_RESULT_SUCCESS = 0; 21050 21051 /** 21052 * A result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that saving the corresponding 21053 * Wi-Fi network failed. 21054 */ 21055 public static final int ADD_WIFI_RESULT_ADD_OR_UPDATE_FAILED = 1; 21056 21057 /** 21058 * A result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that indicates the Wi-Fi network 21059 * already exists. 21060 */ 21061 public static final int ADD_WIFI_RESULT_ALREADY_EXISTS = 2; 21062 21063 /** 21064 * Activity Action: Allows user to select current bug report handler. 21065 * <p> 21066 * Input: Nothing. 21067 * <p> 21068 * Output: Nothing. 21069 * 21070 * @hide 21071 */ 21072 @SystemApi 21073 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21074 public static final String ACTION_BUGREPORT_HANDLER_SETTINGS = 21075 "android.settings.BUGREPORT_HANDLER_SETTINGS"; 21076 21077 private static final String[] PM_WRITE_SETTINGS = { 21078 android.Manifest.permission.WRITE_SETTINGS 21079 }; 21080 private static final String[] PM_CHANGE_NETWORK_STATE = { 21081 android.Manifest.permission.CHANGE_NETWORK_STATE, 21082 android.Manifest.permission.WRITE_SETTINGS 21083 }; 21084 private static final String[] PM_SYSTEM_ALERT_WINDOW = { 21085 android.Manifest.permission.SYSTEM_ALERT_WINDOW 21086 }; 21087 21088 /** 21089 * Activity Action: Show screen for controlling which apps have access to manage external 21090 * storage. 21091 * <p> 21092 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 21093 * <p> 21094 * If you want to control a specific app's access to manage external storage, use 21095 * {@link #ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION} instead. 21096 * <p> 21097 * Output: Nothing. 21098 * @see #ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION 21099 */ 21100 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21101 public static final String ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION = 21102 "android.settings.MANAGE_ALL_FILES_ACCESS_PERMISSION"; 21103 21104 /** 21105 * Activity Action: Show screen for controlling if the app specified in the data URI of the 21106 * intent can manage external storage. 21107 * <p> 21108 * Launching the corresponding activity requires the permission 21109 * {@link Manifest.permission#MANAGE_EXTERNAL_STORAGE}. 21110 * <p> 21111 * In some cases, a matching Activity may not exist, so ensure you safeguard against this. 21112 * <p> 21113 * Input: The Intent's data URI MUST specify the application package name whose ability of 21114 * managing external storage you want to control. 21115 * For example "package:com.my.app". 21116 * <p> 21117 * Output: Nothing. 21118 * @see #ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION 21119 */ 21120 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21121 public static final String ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION = 21122 "android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION"; 21123 21124 /** 21125 * Activity Action: Show screen for controlling whether an app can send full screen intents. 21126 * <p> 21127 * Input: the intent's data URI must specify the application package name for which you want 21128 * to manage full screen intents. 21129 * <p> 21130 * Output: Nothing. 21131 */ 21132 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21133 public static final String ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT = 21134 "android.settings.MANAGE_APP_USE_FULL_SCREEN_INTENT"; 21135 21136 /** 21137 * Activity Action: For system or preinstalled apps to show their {@link Activity} embedded 21138 * in Settings app on large screen devices. 21139 * 21140 * Developers should resolve the Intent action before using it. 21141 * 21142 * <p> 21143 * Input: {@link #EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI} must be included to 21144 * specify the intent for the activity which will be embedded in Settings app. 21145 * It's an intent URI string from {@code intent.toUri(Intent.URI_INTENT_SCHEME)}. 21146 * 21147 * Input: {@link #EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY} must be included to 21148 * specify a key that indicates the menu item which will be highlighted on settings home menu. 21149 * <p> 21150 * Output: Nothing. 21151 */ 21152 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) 21153 public static final String ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY = 21154 "android.settings.SETTINGS_EMBED_DEEP_LINK_ACTIVITY"; 21155 21156 /** 21157 * Activity Extra: Specify the intent for the {@link Activity} which will be embedded in 21158 * Settings app. It's an intent URI string from 21159 * {@code intent.toUri(Intent.URI_INTENT_SCHEME)}. 21160 * <p> 21161 * This must be passed as an extra field to 21162 * {@link #ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY}. 21163 */ 21164 public static final String EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI = 21165 "android.provider.extra.SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI"; 21166 21167 /** 21168 * Activity Extra: Specify a key that indicates the menu item which should be highlighted on 21169 * settings home menu. 21170 * <p> 21171 * This must be passed as an extra field to 21172 * {@link #ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY}. 21173 */ 21174 public static final String EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY = 21175 "android.provider.extra.SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY"; 21176 21177 /** 21178 * Performs a strict and comprehensive check of whether a calling package is allowed to 21179 * write/modify system settings, as the condition differs for pre-M, M+, and 21180 * privileged/preinstalled apps. If the provided uid does not match the 21181 * callingPackage, a negative result will be returned. 21182 * @hide 21183 */ 21184 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) isCallingPackageAllowedToWriteSettings(Context context, int uid, String callingPackage, boolean throwException)21185 public static boolean isCallingPackageAllowedToWriteSettings(Context context, int uid, 21186 String callingPackage, boolean throwException) { 21187 return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, 21188 callingPackage, null /*attribution not needed when not making note */, 21189 throwException, AppOpsManager.OP_WRITE_SETTINGS, PM_WRITE_SETTINGS, 21190 false); 21191 } 21192 21193 /** 21194 * @deprecated Use {@link #checkAndNoteWriteSettingsOperation(Context, int, String, String, 21195 * boolean)} instead. 21196 * 21197 * @hide 21198 */ 21199 @Deprecated 21200 @SystemApi checkAndNoteWriteSettingsOperation(@onNull Context context, int uid, @NonNull String callingPackage, boolean throwException)21201 public static boolean checkAndNoteWriteSettingsOperation(@NonNull Context context, int uid, 21202 @NonNull String callingPackage, boolean throwException) { 21203 return checkAndNoteWriteSettingsOperation(context, uid, callingPackage, null, 21204 throwException); 21205 } 21206 21207 /** 21208 * Performs a strict and comprehensive check of whether a calling package is allowed to 21209 * write/modify system settings, as the condition differs for pre-M, M+, and 21210 * privileged/preinstalled apps. If the provided uid does not match the 21211 * callingPackage, a negative result will be returned. The caller is expected to have 21212 * the WRITE_SETTINGS permission declared. 21213 * 21214 * Note: if the check is successful, the operation of this app will be updated to the 21215 * current time. 21216 * @hide 21217 */ 21218 @SystemApi checkAndNoteWriteSettingsOperation(@onNull Context context, int uid, @NonNull String callingPackage, @Nullable String callingAttributionTag, boolean throwException)21219 public static boolean checkAndNoteWriteSettingsOperation(@NonNull Context context, int uid, 21220 @NonNull String callingPackage, @Nullable String callingAttributionTag, 21221 boolean throwException) { 21222 return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, 21223 callingPackage, callingAttributionTag, throwException, 21224 AppOpsManager.OP_WRITE_SETTINGS, PM_WRITE_SETTINGS, true); 21225 } 21226 21227 /** 21228 * Performs a strict and comprehensive check of whether a calling package is allowed to 21229 * draw on top of other apps, as the conditions differs for pre-M, M+, and 21230 * privileged/preinstalled apps. If the provided uid does not match the callingPackage, 21231 * a negative result will be returned. 21232 * @hide 21233 */ 21234 @UnsupportedAppUsage isCallingPackageAllowedToDrawOverlays(Context context, int uid, String callingPackage, boolean throwException)21235 public static boolean isCallingPackageAllowedToDrawOverlays(Context context, int uid, 21236 String callingPackage, boolean throwException) { 21237 return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, 21238 callingPackage, null /*attribution not needed when not making note */, 21239 throwException, AppOpsManager.OP_SYSTEM_ALERT_WINDOW, PM_SYSTEM_ALERT_WINDOW, 21240 false); 21241 } 21242 21243 /** 21244 * Performs a strict and comprehensive check of whether a calling package is allowed to 21245 * draw on top of other apps, as the conditions differs for pre-M, M+, and 21246 * privileged/preinstalled apps. If the provided uid does not match the callingPackage, 21247 * a negative result will be returned. 21248 * 21249 * Note: if the check is successful, the operation of this app will be updated to the 21250 * current time. 21251 * @hide 21252 */ checkAndNoteDrawOverlaysOperation(Context context, int uid, String callingPackage, String callingAttributionTag, boolean throwException)21253 public static boolean checkAndNoteDrawOverlaysOperation(Context context, int uid, 21254 String callingPackage, String callingAttributionTag, boolean throwException) { 21255 return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, 21256 callingPackage, callingAttributionTag, throwException, 21257 AppOpsManager.OP_SYSTEM_ALERT_WINDOW, PM_SYSTEM_ALERT_WINDOW, true); 21258 } 21259 21260 /** 21261 * @deprecated Use {@link #isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context, 21262 * int, String, String, boolean, int, String[], boolean)} instead. 21263 * 21264 * @hide 21265 */ 21266 @Deprecated 21267 @UnsupportedAppUsage isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context, int uid, String callingPackage, boolean throwException, int appOpsOpCode, String[] permissions, boolean makeNote)21268 public static boolean isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context, 21269 int uid, String callingPackage, boolean throwException, int appOpsOpCode, 21270 String[] permissions, boolean makeNote) { 21271 return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, 21272 callingPackage, null, throwException, appOpsOpCode, permissions, makeNote); 21273 } 21274 21275 /** 21276 * Helper method to perform a general and comprehensive check of whether an operation that is 21277 * protected by appops can be performed by a caller or not. e.g. OP_SYSTEM_ALERT_WINDOW and 21278 * OP_WRITE_SETTINGS 21279 * @hide 21280 */ isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context, int uid, String callingPackage, String callingAttributionTag, boolean throwException, int appOpsOpCode, String[] permissions, boolean makeNote)21281 public static boolean isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context, 21282 int uid, String callingPackage, String callingAttributionTag, boolean throwException, 21283 int appOpsOpCode, String[] permissions, boolean makeNote) { 21284 if (callingPackage == null) { 21285 return false; 21286 } 21287 21288 AppOpsManager appOpsMgr = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE); 21289 int mode = AppOpsManager.MODE_DEFAULT; 21290 if (makeNote) { 21291 mode = appOpsMgr.noteOpNoThrow(appOpsOpCode, uid, callingPackage, callingAttributionTag, 21292 null); 21293 } else { 21294 mode = appOpsMgr.checkOpNoThrow(appOpsOpCode, uid, callingPackage); 21295 } 21296 21297 switch (mode) { 21298 case AppOpsManager.MODE_ALLOWED: 21299 return true; 21300 21301 case AppOpsManager.MODE_DEFAULT: 21302 // this is the default operating mode after an app's installation 21303 // In this case we will check all associated static permission to see 21304 // if it is granted during install time. 21305 for (String permission : permissions) { 21306 if (context.checkCallingOrSelfPermission(permission) == PackageManager 21307 .PERMISSION_GRANTED) { 21308 // if either of the permissions are granted, we will allow it 21309 return true; 21310 } 21311 } 21312 21313 default: 21314 // this is for all other cases trickled down here... 21315 if (!throwException) { 21316 return false; 21317 } 21318 } 21319 21320 // prepare string to throw SecurityException 21321 StringBuilder exceptionMessage = new StringBuilder(); 21322 exceptionMessage.append(callingPackage); 21323 exceptionMessage.append(" was not granted "); 21324 if (permissions.length > 1) { 21325 exceptionMessage.append(" either of these permissions: "); 21326 } else { 21327 exceptionMessage.append(" this permission: "); 21328 } 21329 for (int i = 0; i < permissions.length; i++) { 21330 exceptionMessage.append(permissions[i]); 21331 exceptionMessage.append((i == permissions.length - 1) ? "." : ", "); 21332 } 21333 21334 throw new SecurityException(exceptionMessage.toString()); 21335 } 21336 21337 /** 21338 * Retrieves a correponding package name for a given uid. It will query all 21339 * packages that are associated with the given uid, but it will return only 21340 * the zeroth result. 21341 * Note: If package could not be found, a null is returned. 21342 * @hide 21343 */ getPackageNameForUid(Context context, int uid)21344 public static String getPackageNameForUid(Context context, int uid) { 21345 String[] packages = context.getPackageManager().getPackagesForUid(uid); 21346 if (packages == null) { 21347 return null; 21348 } 21349 return packages[0]; 21350 } 21351 } 21352