Alan Viverette | 3da604b | 2020-06-10 18:34:39 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2006 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.provider; |
| 18 | |
| 19 | import android.Manifest; |
| 20 | import android.annotation.IntDef; |
| 21 | import android.annotation.IntRange; |
| 22 | import android.annotation.NonNull; |
| 23 | import android.annotation.Nullable; |
| 24 | import android.annotation.RequiresPermission; |
| 25 | import android.annotation.SdkConstant; |
| 26 | import android.annotation.SdkConstant.SdkConstantType; |
| 27 | import android.annotation.SystemApi; |
| 28 | import android.annotation.TestApi; |
| 29 | import android.annotation.UserIdInt; |
| 30 | import android.app.ActivityThread; |
| 31 | import android.app.AppOpsManager; |
| 32 | import android.app.Application; |
| 33 | import android.app.AutomaticZenRule; |
| 34 | import android.app.NotificationChannel; |
| 35 | import android.app.NotificationManager; |
| 36 | import android.app.SearchManager; |
| 37 | import android.app.WallpaperManager; |
| 38 | import android.compat.annotation.UnsupportedAppUsage; |
| 39 | import android.content.ComponentName; |
| 40 | import android.content.ContentResolver; |
| 41 | import android.content.ContentValues; |
| 42 | import android.content.Context; |
| 43 | import android.content.IContentProvider; |
| 44 | import android.content.Intent; |
| 45 | import android.content.pm.ActivityInfo; |
| 46 | import android.content.pm.PackageManager; |
| 47 | import android.content.pm.ResolveInfo; |
| 48 | import android.content.res.Configuration; |
| 49 | import android.content.res.Resources; |
| 50 | import android.database.Cursor; |
| 51 | import android.database.SQLException; |
| 52 | import android.location.LocationManager; |
| 53 | import android.net.ConnectivityManager; |
| 54 | import android.net.NetworkScoreManager; |
| 55 | import android.net.Uri; |
| 56 | import android.net.wifi.SoftApConfiguration; |
| 57 | import android.net.wifi.WifiManager; |
| 58 | import android.net.wifi.p2p.WifiP2pManager; |
| 59 | import android.os.BatteryManager; |
| 60 | import android.os.Binder; |
| 61 | import android.os.Build.VERSION_CODES; |
| 62 | import android.os.Bundle; |
| 63 | import android.os.DropBoxManager; |
| 64 | import android.os.IBinder; |
| 65 | import android.os.LocaleList; |
| 66 | import android.os.PowerManager.AutoPowerSaveModeTriggers; |
| 67 | import android.os.Process; |
| 68 | import android.os.RemoteCallback; |
| 69 | import android.os.RemoteException; |
| 70 | import android.os.ResultReceiver; |
| 71 | import android.os.ServiceManager; |
| 72 | import android.os.UserHandle; |
| 73 | import android.speech.tts.TextToSpeech; |
| 74 | import android.text.TextUtils; |
| 75 | import android.util.AndroidException; |
| 76 | import android.util.ArrayMap; |
| 77 | import android.util.ArraySet; |
| 78 | import android.util.Log; |
| 79 | import android.util.MemoryIntArray; |
| 80 | import android.view.Display; |
| 81 | |
| 82 | import com.android.internal.annotations.GuardedBy; |
| 83 | import com.android.internal.util.Preconditions; |
| 84 | import com.android.internal.widget.ILockSettings; |
| 85 | |
| 86 | import java.io.IOException; |
| 87 | import java.lang.annotation.Retention; |
| 88 | import java.lang.annotation.RetentionPolicy; |
| 89 | import java.net.URISyntaxException; |
| 90 | import java.util.ArrayList; |
| 91 | import java.util.HashMap; |
| 92 | import java.util.HashSet; |
| 93 | import java.util.List; |
| 94 | import java.util.Map; |
| 95 | import java.util.Set; |
| 96 | |
| 97 | /** |
| 98 | * The Settings provider contains global system-level device preferences. |
| 99 | */ |
| 100 | public final class Settings { |
| 101 | /** @hide */ |
| 102 | public static final boolean DEFAULT_OVERRIDEABLE_BY_RESTORE = false; |
| 103 | |
| 104 | // Intent actions for Settings |
| 105 | |
| 106 | /** |
| 107 | * Activity Action: Show system settings. |
| 108 | * <p> |
| 109 | * Input: Nothing. |
| 110 | * <p> |
| 111 | * Output: Nothing. |
| 112 | */ |
| 113 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 114 | public static final String ACTION_SETTINGS = "android.settings.SETTINGS"; |
| 115 | |
| 116 | /** |
| 117 | * Activity Action: Show settings to allow configuration of APNs. |
| 118 | * <p> |
| 119 | * Input: Nothing. |
| 120 | * <p> |
| 121 | * Output: Nothing. |
| 122 | * |
| 123 | * <p class="note"> |
| 124 | * In some cases, a matching Activity may not exist, so ensure you |
| 125 | * safeguard against this. |
| 126 | */ |
| 127 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 128 | public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS"; |
| 129 | |
| 130 | /** |
| 131 | * Activity Action: Show settings to allow configuration of current location |
| 132 | * sources. |
| 133 | * <p> |
| 134 | * In some cases, a matching Activity may not exist, so ensure you |
| 135 | * safeguard against this. |
| 136 | * <p> |
| 137 | * Input: Nothing. |
| 138 | * <p> |
| 139 | * Output: Nothing. |
| 140 | */ |
| 141 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 142 | public static final String ACTION_LOCATION_SOURCE_SETTINGS = |
| 143 | "android.settings.LOCATION_SOURCE_SETTINGS"; |
| 144 | |
| 145 | /** |
| 146 | * Activity Action: Show settings to allow configuration of location controller extra package. |
| 147 | * <p> |
| 148 | * In some cases, a matching Activity may not exist, so ensure you |
| 149 | * safeguard against this. |
| 150 | * <p> |
| 151 | * Input: Nothing. |
| 152 | * <p> |
| 153 | * Output: Nothing. |
| 154 | * |
| 155 | * @hide |
| 156 | */ |
| 157 | @SystemApi |
| 158 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 159 | public static final String ACTION_LOCATION_CONTROLLER_EXTRA_PACKAGE_SETTINGS = |
| 160 | "android.settings.LOCATION_CONTROLLER_EXTRA_PACKAGE_SETTINGS"; |
| 161 | |
| 162 | /** |
| 163 | * Activity Action: Show scanning settings to allow configuration of Wi-Fi |
| 164 | * and Bluetooth scanning settings. |
| 165 | * <p> |
| 166 | * In some cases, a matching Activity may not exist, so ensure you |
| 167 | * safeguard against this. |
| 168 | * <p> |
| 169 | * Input: Nothing. |
| 170 | * <p> |
| 171 | * Output: Nothing. |
| 172 | * @hide |
| 173 | */ |
| 174 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 175 | public static final String ACTION_LOCATION_SCANNING_SETTINGS = |
| 176 | "android.settings.LOCATION_SCANNING_SETTINGS"; |
| 177 | |
| 178 | /** |
| 179 | * Activity Action: Show settings to allow configuration of users. |
| 180 | * <p> |
| 181 | * In some cases, a matching Activity may not exist, so ensure you |
| 182 | * safeguard against this. |
| 183 | * <p> |
| 184 | * Input: Nothing. |
| 185 | * <p> |
| 186 | * Output: Nothing. |
| 187 | * @hide |
| 188 | */ |
| 189 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 190 | public static final String ACTION_USER_SETTINGS = |
| 191 | "android.settings.USER_SETTINGS"; |
| 192 | |
| 193 | /** |
| 194 | * Activity Action: Show settings to allow configuration of wireless controls |
| 195 | * such as Wi-Fi, Bluetooth and Mobile networks. |
| 196 | * <p> |
| 197 | * In some cases, a matching Activity may not exist, so ensure you |
| 198 | * safeguard against this. |
| 199 | * <p> |
| 200 | * Input: Nothing. |
| 201 | * <p> |
| 202 | * Output: Nothing. |
| 203 | */ |
| 204 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 205 | public static final String ACTION_WIRELESS_SETTINGS = |
| 206 | "android.settings.WIRELESS_SETTINGS"; |
| 207 | |
| 208 | /** |
| 209 | * Activity Action: Show tether provisioning activity. |
| 210 | * |
| 211 | * <p> |
| 212 | * In some cases, a matching Activity may not exist, so ensure you |
| 213 | * safeguard against this. |
| 214 | * <p> |
| 215 | * Input: {@link ConnectivityManager#EXTRA_TETHER_TYPE} should be included to specify which type |
| 216 | * of tethering should be checked. {@link ConnectivityManager#EXTRA_PROVISION_CALLBACK} should |
| 217 | * contain a {@link ResultReceiver} which will be called back with a tether result code. |
| 218 | * <p> |
| 219 | * Output: The result of the provisioning check. |
| 220 | * {@link ConnectivityManager#TETHER_ERROR_NO_ERROR} if successful, |
| 221 | * {@link ConnectivityManager#TETHER_ERROR_PROVISION_FAILED} for failure. |
| 222 | * |
| 223 | * @hide |
| 224 | */ |
| 225 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 226 | @SystemApi |
| 227 | @TestApi |
| 228 | public static final String ACTION_TETHER_PROVISIONING_UI = |
| 229 | "android.settings.TETHER_PROVISIONING_UI"; |
| 230 | |
| 231 | /** |
| 232 | * Activity Action: Show settings to allow entering/exiting airplane mode. |
| 233 | * <p> |
| 234 | * In some cases, a matching Activity may not exist, so ensure you |
| 235 | * safeguard against this. |
| 236 | * <p> |
| 237 | * Input: Nothing. |
| 238 | * <p> |
| 239 | * Output: Nothing. |
| 240 | */ |
| 241 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 242 | public static final String ACTION_AIRPLANE_MODE_SETTINGS = |
| 243 | "android.settings.AIRPLANE_MODE_SETTINGS"; |
| 244 | |
| 245 | /** |
| 246 | * Activity Action: Show mobile data usage list. |
| 247 | * <p> |
| 248 | * Input: {@link EXTRA_NETWORK_TEMPLATE} and {@link EXTRA_SUB_ID} should be included to specify |
| 249 | * how and what mobile data statistics should be collected. |
| 250 | * <p> |
| 251 | * Output: Nothing |
| 252 | * @hide |
| 253 | */ |
| 254 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 255 | public static final String ACTION_MOBILE_DATA_USAGE = |
| 256 | "android.settings.MOBILE_DATA_USAGE"; |
| 257 | |
| 258 | /** @hide */ |
| 259 | public static final String EXTRA_NETWORK_TEMPLATE = "network_template"; |
| 260 | |
| 261 | /** @hide */ |
| 262 | public static final String KEY_CONFIG_SET_RETURN = "config_set_return"; |
| 263 | |
| 264 | /** |
| 265 | * An int extra specifying a subscription ID. |
| 266 | * |
| 267 | * @see android.telephony.SubscriptionInfo#getSubscriptionId |
| 268 | */ |
| 269 | public static final String EXTRA_SUB_ID = "android.provider.extra.SUB_ID"; |
| 270 | |
| 271 | /** |
| 272 | * Activity Action: Modify Airplane mode settings using a voice command. |
| 273 | * <p> |
| 274 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 275 | * <p> |
| 276 | * This intent MUST be started using |
| 277 | * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity |
| 278 | * startVoiceActivity}. |
| 279 | * <p> |
| 280 | * Note: The activity implementing this intent MUST verify that |
| 281 | * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before |
| 282 | * modifying the setting. |
| 283 | * <p> |
| 284 | * Input: To tell which state airplane mode should be set to, add the |
| 285 | * {@link #EXTRA_AIRPLANE_MODE_ENABLED} extra to this Intent with the state specified. |
| 286 | * If the extra is not included, no changes will be made. |
| 287 | * <p> |
| 288 | * Output: Nothing. |
| 289 | */ |
| 290 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 291 | public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE = |
| 292 | "android.settings.VOICE_CONTROL_AIRPLANE_MODE"; |
| 293 | |
| 294 | /** |
| 295 | * Activity Action: Show settings for accessibility modules. |
| 296 | * <p> |
| 297 | * In some cases, a matching Activity may not exist, so ensure you |
| 298 | * safeguard against this. |
| 299 | * <p> |
| 300 | * Input: Nothing. |
| 301 | * <p> |
| 302 | * Output: Nothing. |
| 303 | */ |
| 304 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 305 | public static final String ACTION_ACCESSIBILITY_SETTINGS = |
| 306 | "android.settings.ACCESSIBILITY_SETTINGS"; |
| 307 | |
| 308 | /** |
| 309 | * Activity Action: Show detail settings of a particular accessibility service. |
| 310 | * <p> |
| 311 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 312 | * <p> |
| 313 | * Input: {@link Intent#EXTRA_COMPONENT_NAME} must specify the accessibility service component |
| 314 | * name to be shown. |
| 315 | * <p> |
| 316 | * Output: Nothing. |
| 317 | * @hide |
| 318 | **/ |
| 319 | @SystemApi |
| 320 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 321 | public static final String ACTION_ACCESSIBILITY_DETAILS_SETTINGS = |
| 322 | "android.settings.ACCESSIBILITY_DETAILS_SETTINGS"; |
| 323 | |
| 324 | /** |
| 325 | * Activity Action: Show settings to control access to usage information. |
| 326 | * <p> |
| 327 | * In some cases, a matching Activity may not exist, so ensure you |
| 328 | * safeguard against this. |
| 329 | * <p> |
| 330 | * Input: Nothing. |
| 331 | * <p> |
| 332 | * Output: Nothing. |
| 333 | */ |
| 334 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 335 | public static final String ACTION_USAGE_ACCESS_SETTINGS = |
| 336 | "android.settings.USAGE_ACCESS_SETTINGS"; |
| 337 | |
| 338 | /** |
| 339 | * Activity Category: Show application settings related to usage access. |
| 340 | * <p> |
| 341 | * An activity that provides a user interface for adjusting usage access related |
| 342 | * preferences for its containing application. Optional but recommended for apps that |
| 343 | * use {@link android.Manifest.permission#PACKAGE_USAGE_STATS}. |
| 344 | * <p> |
| 345 | * The activity may define meta-data to describe what usage access is |
| 346 | * used for within their app with {@link #METADATA_USAGE_ACCESS_REASON}, which |
| 347 | * will be displayed in Settings. |
| 348 | * <p> |
| 349 | * Input: Nothing. |
| 350 | * <p> |
| 351 | * Output: Nothing. |
| 352 | */ |
| 353 | @SdkConstant(SdkConstantType.INTENT_CATEGORY) |
| 354 | public static final String INTENT_CATEGORY_USAGE_ACCESS_CONFIG = |
| 355 | "android.intent.category.USAGE_ACCESS_CONFIG"; |
| 356 | |
| 357 | /** |
| 358 | * Metadata key: Reason for needing usage access. |
| 359 | * <p> |
| 360 | * A key for metadata attached to an activity that receives action |
| 361 | * {@link #INTENT_CATEGORY_USAGE_ACCESS_CONFIG}, shown to the |
| 362 | * user as description of how the app uses usage access. |
| 363 | * <p> |
| 364 | */ |
| 365 | public static final String METADATA_USAGE_ACCESS_REASON = |
| 366 | "android.settings.metadata.USAGE_ACCESS_REASON"; |
| 367 | |
| 368 | /** |
| 369 | * Activity Action: Show settings to allow configuration of security and |
| 370 | * location privacy. |
| 371 | * <p> |
| 372 | * In some cases, a matching Activity may not exist, so ensure you |
| 373 | * safeguard against this. |
| 374 | * <p> |
| 375 | * Input: Nothing. |
| 376 | * <p> |
| 377 | * Output: Nothing. |
| 378 | */ |
| 379 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 380 | public static final String ACTION_SECURITY_SETTINGS = |
| 381 | "android.settings.SECURITY_SETTINGS"; |
| 382 | |
| 383 | /** |
| 384 | * Activity Action: Show settings to allow configuration of trusted external sources |
| 385 | * |
| 386 | * Input: Optionally, the Intent's data URI can specify the application package name to |
| 387 | * directly invoke the management GUI specific to the package name. For example |
| 388 | * "package:com.my.app". |
| 389 | * <p> |
| 390 | * Output: Nothing. |
| 391 | */ |
| 392 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 393 | public static final String ACTION_MANAGE_UNKNOWN_APP_SOURCES = |
| 394 | "android.settings.MANAGE_UNKNOWN_APP_SOURCES"; |
| 395 | |
| 396 | /** |
| 397 | * Activity Action: Show settings to allow configuration of cross-profile access for apps |
| 398 | * |
| 399 | * Input: Optionally, the Intent's data URI can specify the application package name to |
| 400 | * directly invoke the management GUI specific to the package name. For example |
| 401 | * "package:com.my.app". |
| 402 | * <p> |
| 403 | * Output: Nothing. |
| 404 | * |
| 405 | * @hide |
| 406 | */ |
| 407 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 408 | public static final String ACTION_MANAGE_CROSS_PROFILE_ACCESS = |
| 409 | "android.settings.MANAGE_CROSS_PROFILE_ACCESS"; |
| 410 | |
| 411 | /** |
| 412 | * Activity Action: Show the "Open by Default" page in a particular application's details page. |
| 413 | * <p> |
| 414 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 415 | * <p> |
| 416 | * Input: The Intent's data URI specifies the application package name |
| 417 | * to be shown, with the "package" scheme. That is "package:com.my.app". |
| 418 | * <p> |
| 419 | * Output: Nothing. |
| 420 | * @hide |
| 421 | */ |
| 422 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 423 | public static final String ACTION_APP_OPEN_BY_DEFAULT_SETTINGS = |
| 424 | "com.android.settings.APP_OPEN_BY_DEFAULT_SETTINGS"; |
| 425 | |
| 426 | /** |
| 427 | * Activity Action: Show trusted credentials settings, opening to the user tab, |
| 428 | * to allow management of installed credentials. |
| 429 | * <p> |
| 430 | * In some cases, a matching Activity may not exist, so ensure you |
| 431 | * safeguard against this. |
| 432 | * <p> |
| 433 | * Input: Nothing. |
| 434 | * <p> |
| 435 | * Output: Nothing. |
| 436 | * @hide |
| 437 | */ |
| 438 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 439 | @UnsupportedAppUsage |
| 440 | public static final String ACTION_TRUSTED_CREDENTIALS_USER = |
| 441 | "com.android.settings.TRUSTED_CREDENTIALS_USER"; |
| 442 | |
| 443 | /** |
| 444 | * Activity Action: Show dialog explaining that an installed CA cert may enable |
| 445 | * monitoring of encrypted network traffic. |
| 446 | * <p> |
| 447 | * In some cases, a matching Activity may not exist, so ensure you |
| 448 | * safeguard against this. Add {@link #EXTRA_NUMBER_OF_CERTIFICATES} extra to indicate the |
| 449 | * number of certificates. |
| 450 | * <p> |
| 451 | * Input: Nothing. |
| 452 | * <p> |
| 453 | * Output: Nothing. |
| 454 | * @hide |
| 455 | */ |
| 456 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 457 | public static final String ACTION_MONITORING_CERT_INFO = |
| 458 | "com.android.settings.MONITORING_CERT_INFO"; |
| 459 | |
| 460 | /** |
| 461 | * Activity Action: Show settings to allow configuration of privacy options. |
| 462 | * <p> |
| 463 | * In some cases, a matching Activity may not exist, so ensure you |
| 464 | * safeguard against this. |
| 465 | * <p> |
| 466 | * Input: Nothing. |
| 467 | * <p> |
| 468 | * Output: Nothing. |
| 469 | */ |
| 470 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 471 | public static final String ACTION_PRIVACY_SETTINGS = |
| 472 | "android.settings.PRIVACY_SETTINGS"; |
| 473 | |
| 474 | /** |
| 475 | * Activity Action: Show settings to allow configuration of VPN. |
| 476 | * <p> |
| 477 | * In some cases, a matching Activity may not exist, so ensure you |
| 478 | * safeguard against this. |
| 479 | * <p> |
| 480 | * Input: Nothing. |
| 481 | * <p> |
| 482 | * Output: Nothing. |
| 483 | */ |
| 484 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 485 | public static final String ACTION_VPN_SETTINGS = |
| 486 | "android.settings.VPN_SETTINGS"; |
| 487 | |
| 488 | /** |
| 489 | * Activity Action: Show settings to allow configuration of Wi-Fi. |
| 490 | * <p> |
| 491 | * In some cases, a matching Activity may not exist, so ensure you |
| 492 | * safeguard against this. |
| 493 | * <p> |
| 494 | * Input: Nothing. |
| 495 | * <p> |
| 496 | * Output: Nothing. |
| 497 | */ |
| 498 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 499 | public static final String ACTION_WIFI_SETTINGS = |
| 500 | "android.settings.WIFI_SETTINGS"; |
| 501 | |
| 502 | /** |
| 503 | * Activity Action: Show settings to allow configuration of a static IP |
| 504 | * address for Wi-Fi. |
| 505 | * <p> |
| 506 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 507 | * against this. |
| 508 | * <p> |
| 509 | * Input: Nothing. |
| 510 | * <p> |
| 511 | * Output: Nothing. |
| 512 | */ |
| 513 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 514 | public static final String ACTION_WIFI_IP_SETTINGS = |
| 515 | "android.settings.WIFI_IP_SETTINGS"; |
| 516 | |
| 517 | /** |
| 518 | * Activity Action: Show setting page to process a Wi-Fi Easy Connect (aka DPP) URI and start |
| 519 | * configuration. This intent should be used when you want to use this device to take on the |
| 520 | * configurator role for an IoT/other device. When provided with a valid DPP URI |
| 521 | * string, Settings will open a Wi-Fi selection screen for the user to indicate which network |
| 522 | * they would like to configure the device specified in the DPP URI string and |
| 523 | * carry them through the rest of the flow for provisioning the device. |
| 524 | * <p> |
| 525 | * In some cases, a matching Activity may not exist, so ensure to safeguard against this by |
| 526 | * checking {@link WifiManager#isEasyConnectSupported()}. |
| 527 | * <p> |
| 528 | * Input: The Intent's data URI specifies bootstrapping information for authenticating and |
| 529 | * provisioning the peer, and uses a "DPP" scheme. The URI should be attached to the intent |
| 530 | * using {@link Intent#setData(Uri)}. The calling app can obtain a DPP URI in any |
| 531 | * way, e.g. by scanning a QR code or other out-of-band methods. The calling app may also |
| 532 | * attach the {@link #EXTRA_EASY_CONNECT_BAND_LIST} extra to provide information |
| 533 | * about the bands supported by the enrollee device. |
| 534 | * <p> |
| 535 | * Output: After calling {@link android.app.Activity#startActivityForResult}, the callback |
| 536 | * {@code onActivityResult} will have resultCode {@link android.app.Activity#RESULT_OK} if |
| 537 | * the Wi-Fi Easy Connect configuration succeeded and the user tapped the 'Done' button, or |
| 538 | * {@link android.app.Activity#RESULT_CANCELED} if the operation failed and user tapped the |
| 539 | * 'Cancel' button. In case the operation has failed, a status code from |
| 540 | * {@link android.net.wifi.EasyConnectStatusCallback} {@code EASY_CONNECT_EVENT_FAILURE_*} will |
| 541 | * be returned as an Extra {@link #EXTRA_EASY_CONNECT_ERROR_CODE}. Easy Connect R2 |
| 542 | * Enrollees report additional details about the error they encountered, which will be |
| 543 | * provided in the {@link #EXTRA_EASY_CONNECT_ATTEMPTED_SSID}, |
| 544 | * {@link #EXTRA_EASY_CONNECT_CHANNEL_LIST}, and {@link #EXTRA_EASY_CONNECT_BAND_LIST}. |
| 545 | */ |
| 546 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 547 | public static final String ACTION_PROCESS_WIFI_EASY_CONNECT_URI = |
| 548 | "android.settings.PROCESS_WIFI_EASY_CONNECT_URI"; |
| 549 | |
| 550 | /** |
| 551 | * Activity Extra: The Easy Connect operation error code |
| 552 | * <p> |
| 553 | * An extra returned on the result intent received when using the |
| 554 | * {@link #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation. |
| 555 | * This extra contains the integer error code of the operation - one of |
| 556 | * {@link android.net.wifi.EasyConnectStatusCallback} {@code EASY_CONNECT_EVENT_FAILURE_*}. If |
| 557 | * there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK}, |
| 558 | * then this extra is not attached to the result intent. |
| 559 | * <p> |
| 560 | * Use the {@link Intent#hasExtra(String)} to determine whether the extra is attached and |
| 561 | * {@link Intent#getIntExtra(String, int)} to obtain the error code data. |
| 562 | */ |
| 563 | public static final String EXTRA_EASY_CONNECT_ERROR_CODE = |
| 564 | "android.provider.extra.EASY_CONNECT_ERROR_CODE"; |
| 565 | |
| 566 | /** |
| 567 | * Activity Extra: The SSID that the Enrollee tried to connect to. |
| 568 | * <p> |
| 569 | * An extra returned on the result intent received when using the {@link |
| 570 | * #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation. This |
| 571 | * extra contains the SSID of the Access Point that the remote Enrollee tried to connect to. |
| 572 | * This value is populated only by remote R2 devices, and only for the following error codes: |
| 573 | * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK} |
| 574 | * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION}. |
| 575 | * Therefore, always check if this extra is available using {@link Intent#hasExtra(String)}. If |
| 576 | * there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK}, then |
| 577 | * this extra is not attached to the result intent. |
| 578 | * <p> |
| 579 | * Use the {@link Intent#getStringExtra(String)} to obtain the SSID. |
| 580 | */ |
| 581 | public static final String EXTRA_EASY_CONNECT_ATTEMPTED_SSID = |
| 582 | "android.provider.extra.EASY_CONNECT_ATTEMPTED_SSID"; |
| 583 | |
| 584 | /** |
| 585 | * Activity Extra: The Channel List that the Enrollee used to scan a network. |
| 586 | * <p> |
| 587 | * An extra returned on the result intent received when using the {@link |
| 588 | * #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation. This |
| 589 | * extra contains the channel list that the Enrollee scanned for a network. This value is |
| 590 | * populated only by remote R2 devices, and only for the following error code: {@link |
| 591 | * android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK}. |
| 592 | * Therefore, always check if this extra is available using {@link Intent#hasExtra(String)}. If |
| 593 | * there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK}, then |
| 594 | * this extra is not attached to the result intent. The list is JSON formatted, as an array |
| 595 | * (Wi-Fi global operating classes) of arrays (Wi-Fi channels). |
| 596 | * <p> |
| 597 | * Use the {@link Intent#getStringExtra(String)} to obtain the list. |
| 598 | */ |
| 599 | public static final String EXTRA_EASY_CONNECT_CHANNEL_LIST = |
| 600 | "android.provider.extra.EASY_CONNECT_CHANNEL_LIST"; |
| 601 | |
| 602 | /** |
| 603 | * Activity Extra: The Band List that the Enrollee supports. |
| 604 | * <p> |
| 605 | * This extra contains the bands the Enrollee supports, expressed as the Global Operating |
| 606 | * Class, see Table E-4 in IEEE Std 802.11-2016 Global operating classes. It is used both as |
| 607 | * input, to configure the Easy Connect operation and as output of the operation. |
| 608 | * <p> |
| 609 | * As input: an optional extra to be attached to the |
| 610 | * {@link #ACTION_PROCESS_WIFI_EASY_CONNECT_URI}. If attached, it indicates the bands which |
| 611 | * the remote device (enrollee, device-to-be-configured) supports. The Settings operation |
| 612 | * may take this into account when presenting the user with list of networks configurations |
| 613 | * to be used. The calling app may obtain this information in any out-of-band method. The |
| 614 | * information should be attached as an array of raw integers - using the |
| 615 | * {@link Intent#putExtra(String, int[])}. |
| 616 | * <p> |
| 617 | * As output: an extra returned on the result intent received when using the |
| 618 | * {@link #ACTION_PROCESS_WIFI_EASY_CONNECT_URI} intent to launch the Easy Connect Operation |
| 619 | * . This value is populated only by remote R2 devices, and only for the following error |
| 620 | * codes: |
| 621 | * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK}, |
| 622 | * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION}, |
| 623 | * or |
| 624 | * {@link android.net.wifi.EasyConnectStatusCallback#EASY_CONNECT_EVENT_FAILURE_ENROLLEE_REJECTED_CONFIGURATION}. |
| 625 | * Therefore, always check if this extra is available using {@link Intent#hasExtra(String)}. |
| 626 | * If there is no error, i.e. if the operation returns {@link android.app.Activity#RESULT_OK} |
| 627 | * , then this extra is not attached to the result intent. |
| 628 | * <p> |
| 629 | * Use the {@link Intent#getIntArrayExtra(String)} to obtain the list. |
| 630 | */ |
| 631 | public static final String EXTRA_EASY_CONNECT_BAND_LIST = |
| 632 | "android.provider.extra.EASY_CONNECT_BAND_LIST"; |
| 633 | |
| 634 | /** |
| 635 | * Activity Action: Show settings to allow configuration of data and view data usage. |
| 636 | * <p> |
| 637 | * In some cases, a matching Activity may not exist, so ensure you |
| 638 | * safeguard against this. |
| 639 | * <p> |
| 640 | * Input: Nothing. |
| 641 | * <p> |
| 642 | * Output: Nothing. |
| 643 | */ |
| 644 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 645 | public static final String ACTION_DATA_USAGE_SETTINGS = |
| 646 | "android.settings.DATA_USAGE_SETTINGS"; |
| 647 | |
| 648 | /** |
| 649 | * Activity Action: Show settings to allow configuration of Bluetooth. |
| 650 | * <p> |
| 651 | * In some cases, a matching Activity may not exist, so ensure you |
| 652 | * safeguard against this. |
| 653 | * <p> |
| 654 | * Input: Nothing. |
| 655 | * <p> |
| 656 | * Output: Nothing. |
| 657 | */ |
| 658 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 659 | public static final String ACTION_BLUETOOTH_SETTINGS = |
| 660 | "android.settings.BLUETOOTH_SETTINGS"; |
| 661 | |
| 662 | /** |
| 663 | * Activity action: Show Settings app search UI when this action is available for device. |
| 664 | * <p> |
| 665 | * Input: Nothing. |
| 666 | * <p> |
| 667 | * Output: Nothing. |
| 668 | */ |
| 669 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 670 | public static final String ACTION_APP_SEARCH_SETTINGS = "android.settings.APP_SEARCH_SETTINGS"; |
| 671 | |
| 672 | /** |
| 673 | * Activity Action: Show settings to allow configuration of Assist Gesture. |
| 674 | * <p> |
| 675 | * In some cases, a matching Activity may not exist, so ensure you |
| 676 | * safeguard against this. |
| 677 | * <p> |
| 678 | * Input: Nothing. |
| 679 | * <p> |
| 680 | * Output: Nothing. |
| 681 | * @hide |
| 682 | */ |
| 683 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 684 | public static final String ACTION_ASSIST_GESTURE_SETTINGS = |
| 685 | "android.settings.ASSIST_GESTURE_SETTINGS"; |
| 686 | |
| 687 | /** |
| 688 | * Activity Action: Show settings to enroll fingerprints, and setup PIN/Pattern/Pass if |
| 689 | * necessary. |
| 690 | * @deprecated See {@link #ACTION_BIOMETRIC_ENROLL}. |
| 691 | * <p> |
| 692 | * Input: Nothing. |
| 693 | * <p> |
| 694 | * Output: Nothing. |
| 695 | */ |
| 696 | @Deprecated |
| 697 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 698 | public static final String ACTION_FINGERPRINT_ENROLL = |
| 699 | "android.settings.FINGERPRINT_ENROLL"; |
| 700 | |
| 701 | /** |
| 702 | * Activity Action: Show settings to enroll biometrics, and setup PIN/Pattern/Pass if |
| 703 | * necessary. By default, this prompts the user to enroll biometrics with strength |
| 704 | * Weak or above, as defined by the CDD. Only biometrics that meet or exceed Strong, as defined |
| 705 | * in the CDD are allowed to participate in Keystore operations. |
| 706 | * <p> |
| 707 | * Input: extras {@link #EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED} as an integer, with |
| 708 | * constants defined in {@link android.hardware.biometrics.BiometricManager.Authenticators}, |
| 709 | * e.g. {@link android.hardware.biometrics.BiometricManager.Authenticators#BIOMETRIC_STRONG}. |
| 710 | * If not specified, the default behavior is |
| 711 | * {@link android.hardware.biometrics.BiometricManager.Authenticators#BIOMETRIC_WEAK}. |
| 712 | * <p> |
| 713 | * Output: Nothing. Note that callers should still check |
| 714 | * {@link android.hardware.biometrics.BiometricManager#canAuthenticate(int)} |
| 715 | * afterwards to ensure that the user actually completed enrollment. |
| 716 | */ |
| 717 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 718 | public static final String ACTION_BIOMETRIC_ENROLL = |
| 719 | "android.settings.BIOMETRIC_ENROLL"; |
| 720 | |
| 721 | /** |
| 722 | * Activity Extra: The minimum strength to request enrollment for. |
| 723 | * <p> |
| 724 | * This can be passed as an extra field to the {@link #ACTION_BIOMETRIC_ENROLL} intent to |
| 725 | * indicate that only enrollment for sensors that meet these requirements should be shown. The |
| 726 | * value should be a combination of the constants defined in |
| 727 | * {@link android.hardware.biometrics.BiometricManager.Authenticators}. |
| 728 | */ |
| 729 | public static final String EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED = |
| 730 | "android.provider.extra.BIOMETRIC_AUTHENTICATORS_ALLOWED"; |
| 731 | |
| 732 | /** |
| 733 | * Activity Action: Show settings to allow configuration of cast endpoints. |
| 734 | * <p> |
| 735 | * In some cases, a matching Activity may not exist, so ensure you |
| 736 | * safeguard against this. |
| 737 | * <p> |
| 738 | * Input: Nothing. |
| 739 | * <p> |
| 740 | * Output: Nothing. |
| 741 | */ |
| 742 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 743 | public static final String ACTION_CAST_SETTINGS = |
| 744 | "android.settings.CAST_SETTINGS"; |
| 745 | |
| 746 | /** |
| 747 | * Activity Action: Show settings to allow configuration of date and time. |
| 748 | * <p> |
| 749 | * In some cases, a matching Activity may not exist, so ensure you |
| 750 | * safeguard against this. |
| 751 | * <p> |
| 752 | * Input: Nothing. |
| 753 | * <p> |
| 754 | * Output: Nothing. |
| 755 | */ |
| 756 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 757 | public static final String ACTION_DATE_SETTINGS = |
| 758 | "android.settings.DATE_SETTINGS"; |
| 759 | |
| 760 | /** |
| 761 | * Activity Action: Show settings to allow configuration of sound and volume. |
| 762 | * <p> |
| 763 | * In some cases, a matching Activity may not exist, so ensure you |
| 764 | * safeguard against this. |
| 765 | * <p> |
| 766 | * Input: Nothing. |
| 767 | * <p> |
| 768 | * Output: Nothing. |
| 769 | */ |
| 770 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 771 | public static final String ACTION_SOUND_SETTINGS = |
| 772 | "android.settings.SOUND_SETTINGS"; |
| 773 | |
| 774 | /** |
| 775 | * Activity Action: Show settings to allow configuration of display. |
| 776 | * <p> |
| 777 | * In some cases, a matching Activity may not exist, so ensure you |
| 778 | * safeguard against this. |
| 779 | * <p> |
| 780 | * Input: Nothing. |
| 781 | * <p> |
| 782 | * Output: Nothing. |
| 783 | */ |
| 784 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 785 | public static final String ACTION_DISPLAY_SETTINGS = |
| 786 | "android.settings.DISPLAY_SETTINGS"; |
| 787 | |
| 788 | /** |
| 789 | * Activity Action: Show settings to allow configuration of Night display. |
| 790 | * <p> |
| 791 | * In some cases, a matching Activity may not exist, so ensure you |
| 792 | * safeguard against this. |
| 793 | * <p> |
| 794 | * Input: Nothing. |
| 795 | * <p> |
| 796 | * Output: Nothing. |
| 797 | */ |
| 798 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 799 | public static final String ACTION_NIGHT_DISPLAY_SETTINGS = |
| 800 | "android.settings.NIGHT_DISPLAY_SETTINGS"; |
| 801 | |
| 802 | /** |
| 803 | * Activity Action: Show settings to allow configuration of Dark theme. |
| 804 | * <p> |
| 805 | * In some cases, a matching Activity may not exist, so ensure you |
| 806 | * safeguard against this. |
| 807 | * <p> |
| 808 | * Input: Nothing. |
| 809 | * <p> |
| 810 | * Output: Nothing. |
| 811 | * |
| 812 | * @hide |
| 813 | */ |
| 814 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 815 | public static final String ACTION_DARK_THEME_SETTINGS = |
| 816 | "android.settings.DARK_THEME_SETTINGS"; |
| 817 | |
| 818 | /** |
| 819 | * Activity Action: Show settings to allow configuration of locale. |
| 820 | * <p> |
| 821 | * In some cases, a matching Activity may not exist, so ensure you |
| 822 | * safeguard against this. |
| 823 | * <p> |
| 824 | * Input: Nothing. |
| 825 | * <p> |
| 826 | * Output: Nothing. |
| 827 | */ |
| 828 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 829 | public static final String ACTION_LOCALE_SETTINGS = |
| 830 | "android.settings.LOCALE_SETTINGS"; |
| 831 | |
| 832 | /** |
| 833 | * Activity Action: Show settings to configure input methods, in particular |
| 834 | * allowing the user to enable input methods. |
| 835 | * <p> |
| 836 | * In some cases, a matching Activity may not exist, so ensure you |
| 837 | * safeguard against this. |
| 838 | * <p> |
| 839 | * Input: Nothing. |
| 840 | * <p> |
| 841 | * Output: Nothing. |
| 842 | */ |
| 843 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 844 | public static final String ACTION_VOICE_INPUT_SETTINGS = |
| 845 | "android.settings.VOICE_INPUT_SETTINGS"; |
| 846 | |
| 847 | /** |
| 848 | * Activity Action: Show settings to configure input methods, in particular |
| 849 | * allowing the user to enable input methods. |
| 850 | * <p> |
| 851 | * In some cases, a matching Activity may not exist, so ensure you |
| 852 | * safeguard against this. |
| 853 | * <p> |
| 854 | * Input: Nothing. |
| 855 | * <p> |
| 856 | * Output: Nothing. |
| 857 | */ |
| 858 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 859 | public static final String ACTION_INPUT_METHOD_SETTINGS = |
| 860 | "android.settings.INPUT_METHOD_SETTINGS"; |
| 861 | |
| 862 | /** |
| 863 | * Activity Action: Show settings to enable/disable input method subtypes. |
| 864 | * <p> |
| 865 | * In some cases, a matching Activity may not exist, so ensure you |
| 866 | * safeguard against this. |
| 867 | * <p> |
| 868 | * To tell which input method's subtypes are displayed in the settings, add |
| 869 | * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id. |
| 870 | * If there is no extra in this Intent, subtypes from all installed input methods |
| 871 | * will be displayed in the settings. |
| 872 | * |
| 873 | * @see android.view.inputmethod.InputMethodInfo#getId |
| 874 | * <p> |
| 875 | * Input: Nothing. |
| 876 | * <p> |
| 877 | * Output: Nothing. |
| 878 | */ |
| 879 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 880 | public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS = |
| 881 | "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS"; |
| 882 | |
| 883 | /** |
| 884 | * Activity Action: Show settings to manage the user input dictionary. |
| 885 | * <p> |
| 886 | * Starting with {@link android.os.Build.VERSION_CODES#KITKAT}, |
| 887 | * it is guaranteed there will always be an appropriate implementation for this Intent action. |
| 888 | * In prior releases of the platform this was optional, so ensure you safeguard against it. |
| 889 | * <p> |
| 890 | * Input: Nothing. |
| 891 | * <p> |
| 892 | * Output: Nothing. |
| 893 | */ |
| 894 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 895 | public static final String ACTION_USER_DICTIONARY_SETTINGS = |
| 896 | "android.settings.USER_DICTIONARY_SETTINGS"; |
| 897 | |
| 898 | /** |
| 899 | * Activity Action: Show settings to configure the hardware keyboard. |
| 900 | * <p> |
| 901 | * In some cases, a matching Activity may not exist, so ensure you |
| 902 | * safeguard against this. |
| 903 | * <p> |
| 904 | * Input: Nothing. |
| 905 | * <p> |
| 906 | * Output: Nothing. |
| 907 | */ |
| 908 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 909 | public static final String ACTION_HARD_KEYBOARD_SETTINGS = |
| 910 | "android.settings.HARD_KEYBOARD_SETTINGS"; |
| 911 | |
| 912 | /** |
| 913 | * Activity Action: Adds a word to the user dictionary. |
| 914 | * <p> |
| 915 | * In some cases, a matching Activity may not exist, so ensure you |
| 916 | * safeguard against this. |
| 917 | * <p> |
| 918 | * Input: An extra with key <code>word</code> that contains the word |
| 919 | * that should be added to the dictionary. |
| 920 | * <p> |
| 921 | * Output: Nothing. |
| 922 | * |
| 923 | * @hide |
| 924 | */ |
| 925 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 926 | @UnsupportedAppUsage |
| 927 | public static final String ACTION_USER_DICTIONARY_INSERT = |
| 928 | "com.android.settings.USER_DICTIONARY_INSERT"; |
| 929 | |
| 930 | /** |
| 931 | * Activity Action: Show settings to allow configuration of application-related settings. |
| 932 | * <p> |
| 933 | * In some cases, a matching Activity may not exist, so ensure you |
| 934 | * safeguard against this. |
| 935 | * <p> |
| 936 | * Input: Nothing. |
| 937 | * <p> |
| 938 | * Output: Nothing. |
| 939 | */ |
| 940 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 941 | public static final String ACTION_APPLICATION_SETTINGS = |
| 942 | "android.settings.APPLICATION_SETTINGS"; |
| 943 | |
| 944 | /** |
| 945 | * Activity Action: Show settings to allow configuration of application |
| 946 | * development-related settings. As of |
| 947 | * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is |
| 948 | * a required part of the platform. |
| 949 | * <p> |
| 950 | * Input: Nothing. |
| 951 | * <p> |
| 952 | * Output: Nothing. |
| 953 | */ |
| 954 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 955 | public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS = |
| 956 | "android.settings.APPLICATION_DEVELOPMENT_SETTINGS"; |
| 957 | |
| 958 | /** |
| 959 | * Activity Action: Show settings to allow configuration of quick launch shortcuts. |
| 960 | * <p> |
| 961 | * In some cases, a matching Activity may not exist, so ensure you |
| 962 | * safeguard against this. |
| 963 | * <p> |
| 964 | * Input: Nothing. |
| 965 | * <p> |
| 966 | * Output: Nothing. |
| 967 | */ |
| 968 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 969 | public static final String ACTION_QUICK_LAUNCH_SETTINGS = |
| 970 | "android.settings.QUICK_LAUNCH_SETTINGS"; |
| 971 | |
| 972 | /** |
| 973 | * Activity Action: Show settings to manage installed applications. |
| 974 | * <p> |
| 975 | * In some cases, a matching Activity may not exist, so ensure you |
| 976 | * safeguard against this. |
| 977 | * <p> |
| 978 | * Input: Nothing. |
| 979 | * <p> |
| 980 | * Output: Nothing. |
| 981 | */ |
| 982 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 983 | public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS = |
| 984 | "android.settings.MANAGE_APPLICATIONS_SETTINGS"; |
| 985 | |
| 986 | /** |
| 987 | * Activity Action: Show settings to manage all applications. |
| 988 | * <p> |
| 989 | * In some cases, a matching Activity may not exist, so ensure you |
| 990 | * safeguard against this. |
| 991 | * <p> |
| 992 | * Input: Nothing. |
| 993 | * <p> |
| 994 | * Output: Nothing. |
| 995 | */ |
| 996 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 997 | public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS = |
| 998 | "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS"; |
| 999 | |
| 1000 | /** |
| 1001 | * Activity Action: Show screen for controlling which apps can draw on top of other apps. |
| 1002 | * <p> |
| 1003 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 1004 | * <p> |
| 1005 | * Input: Optionally, in versions of Android prior to {@link android.os.Build.VERSION_CODES#R}, |
| 1006 | * the Intent's data URI can specify the application package name to directly invoke the |
| 1007 | * management GUI specific to the package name. |
| 1008 | * For example "package:com.my.app". |
| 1009 | * <p> |
| 1010 | * Output: Nothing. |
| 1011 | */ |
| 1012 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1013 | public static final String ACTION_MANAGE_OVERLAY_PERMISSION = |
| 1014 | "android.settings.action.MANAGE_OVERLAY_PERMISSION"; |
| 1015 | |
| 1016 | /** |
| 1017 | * Activity Action: Show screen for controlling if the app specified in the data URI of the |
| 1018 | * intent can draw on top of other apps. |
| 1019 | * <p> |
| 1020 | * Unlike {@link #ACTION_MANAGE_OVERLAY_PERMISSION}, which in Android {@link |
| 1021 | * android.os.Build.VERSION_CODES#R} can't be used to show a GUI for a specific package, |
| 1022 | * permission {@code android.permission.INTERNAL_SYSTEM_WINDOW} is needed to start an activity |
| 1023 | * with this intent. |
| 1024 | * <p> |
| 1025 | * In some cases, a matching Activity may not exist, so ensure you |
| 1026 | * safeguard against this. |
| 1027 | * <p> |
| 1028 | * Input: The Intent's data URI MUST specify the application package name whose ability of |
| 1029 | * drawing on top of other apps you want to control. |
| 1030 | * For example "package:com.my.app". |
| 1031 | * <p> |
| 1032 | * Output: Nothing. |
| 1033 | * |
| 1034 | * @hide |
| 1035 | */ |
| 1036 | @TestApi |
| 1037 | @SystemApi |
| 1038 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1039 | public static final String ACTION_MANAGE_APP_OVERLAY_PERMISSION = |
| 1040 | "android.settings.MANAGE_APP_OVERLAY_PERMISSION"; |
| 1041 | |
| 1042 | /** |
| 1043 | * Activity Action: Show screen for controlling which apps are allowed to write/modify |
| 1044 | * system settings. |
| 1045 | * <p> |
| 1046 | * In some cases, a matching Activity may not exist, so ensure you |
| 1047 | * safeguard against this. |
| 1048 | * <p> |
| 1049 | * Input: Optionally, the Intent's data URI can specify the application package name to |
| 1050 | * directly invoke the management GUI specific to the package name. For example |
| 1051 | * "package:com.my.app". |
| 1052 | * <p> |
| 1053 | * Output: Nothing. |
| 1054 | */ |
| 1055 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1056 | public static final String ACTION_MANAGE_WRITE_SETTINGS = |
| 1057 | "android.settings.action.MANAGE_WRITE_SETTINGS"; |
| 1058 | |
| 1059 | /** |
| 1060 | * Activity Action: Show screen for controlling app usage properties for an app. |
| 1061 | * Input: Intent's extra {@link android.content.Intent#EXTRA_PACKAGE_NAME} must specify the |
| 1062 | * application package name. |
| 1063 | * Output: Nothing. |
| 1064 | */ |
| 1065 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1066 | public static final String ACTION_APP_USAGE_SETTINGS = |
| 1067 | "android.settings.action.APP_USAGE_SETTINGS"; |
| 1068 | |
| 1069 | /** |
| 1070 | * Activity Action: Show screen of details about a particular application. |
| 1071 | * <p> |
| 1072 | * In some cases, a matching Activity may not exist, so ensure you |
| 1073 | * safeguard against this. |
| 1074 | * <p> |
| 1075 | * Input: The Intent's data URI specifies the application package name |
| 1076 | * to be shown, with the "package" scheme. That is "package:com.my.app". |
| 1077 | * <p> |
| 1078 | * Output: Nothing. |
| 1079 | */ |
| 1080 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1081 | public static final String ACTION_APPLICATION_DETAILS_SETTINGS = |
| 1082 | "android.settings.APPLICATION_DETAILS_SETTINGS"; |
| 1083 | |
| 1084 | /** |
| 1085 | * Activity Action: Show list of applications that have been running |
| 1086 | * foreground services (to the user "running in the background"). |
| 1087 | * <p> |
| 1088 | * Input: Extras "packages" is a string array of package names. |
| 1089 | * <p> |
| 1090 | * Output: Nothing. |
| 1091 | * @hide |
| 1092 | */ |
| 1093 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1094 | public static final String ACTION_FOREGROUND_SERVICES_SETTINGS = |
| 1095 | "android.settings.FOREGROUND_SERVICES_SETTINGS"; |
| 1096 | |
| 1097 | /** |
| 1098 | * Activity Action: Show screen for controlling which apps can ignore battery optimizations. |
| 1099 | * <p> |
| 1100 | * Input: Nothing. |
| 1101 | * <p> |
| 1102 | * Output: Nothing. |
| 1103 | * <p> |
| 1104 | * You can use {@link android.os.PowerManager#isIgnoringBatteryOptimizations |
| 1105 | * PowerManager.isIgnoringBatteryOptimizations()} to determine if an application is |
| 1106 | * already ignoring optimizations. You can use |
| 1107 | * {@link #ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS} to ask the user to put you |
| 1108 | * on this list. |
| 1109 | */ |
| 1110 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1111 | public static final String ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS = |
| 1112 | "android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS"; |
| 1113 | |
| 1114 | /** |
| 1115 | * Activity Action: Ask the user to allow an app to ignore battery optimizations (that is, |
| 1116 | * put them on the whitelist of apps shown by |
| 1117 | * {@link #ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS}). For an app to use this, it also |
| 1118 | * must hold the {@link android.Manifest.permission#REQUEST_IGNORE_BATTERY_OPTIMIZATIONS} |
| 1119 | * permission. |
| 1120 | * <p><b>Note:</b> most applications should <em>not</em> use this; there are many facilities |
| 1121 | * provided by the platform for applications to operate correctly in the various power |
| 1122 | * saving modes. This is only for unusual applications that need to deeply control their own |
| 1123 | * execution, at the potential expense of the user's battery life. Note that these applications |
| 1124 | * greatly run the risk of showing to the user as high power consumers on their device.</p> |
| 1125 | * <p> |
| 1126 | * Input: The Intent's data URI must specify the application package name |
| 1127 | * to be shown, with the "package" scheme. That is "package:com.my.app". |
| 1128 | * <p> |
| 1129 | * Output: Nothing. |
| 1130 | * <p> |
| 1131 | * You can use {@link android.os.PowerManager#isIgnoringBatteryOptimizations |
| 1132 | * PowerManager.isIgnoringBatteryOptimizations()} to determine if an application is |
| 1133 | * already ignoring optimizations. |
| 1134 | */ |
| 1135 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1136 | public static final String ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = |
| 1137 | "android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"; |
| 1138 | |
| 1139 | /** |
| 1140 | * Activity Action: Open the advanced power usage details page of an associated app. |
| 1141 | * <p> |
| 1142 | * Input: Intent's data URI set with an application name, using the |
| 1143 | * "package" schema (like "package:com.my.app") |
| 1144 | * <p> |
| 1145 | * Output: Nothing. |
| 1146 | * |
| 1147 | * @hide |
| 1148 | */ |
| 1149 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1150 | public static final String ACTION_VIEW_ADVANCED_POWER_USAGE_DETAIL = |
| 1151 | "android.settings.VIEW_ADVANCED_POWER_USAGE_DETAIL"; |
| 1152 | |
| 1153 | /** |
| 1154 | * Activity Action: Show screen for controlling background data |
| 1155 | * restrictions for a particular application. |
| 1156 | * <p> |
| 1157 | * Input: Intent's data URI set with an application name, using the |
| 1158 | * "package" schema (like "package:com.my.app"). |
| 1159 | * |
| 1160 | * <p> |
| 1161 | * Output: Nothing. |
| 1162 | * <p> |
| 1163 | * Applications can also use {@link android.net.ConnectivityManager#getRestrictBackgroundStatus |
| 1164 | * ConnectivityManager#getRestrictBackgroundStatus()} to determine the |
| 1165 | * status of the background data restrictions for them. |
| 1166 | * |
| 1167 | * <p class="note"> |
| 1168 | * In some cases, a matching Activity may not exist, so ensure you |
| 1169 | * safeguard against this. |
| 1170 | */ |
| 1171 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1172 | public static final String ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS = |
| 1173 | "android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS"; |
| 1174 | |
| 1175 | /** |
| 1176 | * @hide |
| 1177 | * Activity Action: Show the "app ops" settings screen. |
| 1178 | * <p> |
| 1179 | * Input: Nothing. |
| 1180 | * <p> |
| 1181 | * Output: Nothing. |
| 1182 | */ |
| 1183 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1184 | public static final String ACTION_APP_OPS_SETTINGS = |
| 1185 | "android.settings.APP_OPS_SETTINGS"; |
| 1186 | |
| 1187 | /** |
| 1188 | * Activity Action: Show settings for system update functionality. |
| 1189 | * <p> |
| 1190 | * In some cases, a matching Activity may not exist, so ensure you |
| 1191 | * safeguard against this. |
| 1192 | * <p> |
| 1193 | * Input: Nothing. |
| 1194 | * <p> |
| 1195 | * Output: Nothing. |
| 1196 | * |
| 1197 | * @hide |
| 1198 | */ |
| 1199 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1200 | public static final String ACTION_SYSTEM_UPDATE_SETTINGS = |
| 1201 | "android.settings.SYSTEM_UPDATE_SETTINGS"; |
| 1202 | |
| 1203 | /** |
| 1204 | * Activity Action: Show settings for managed profile settings. |
| 1205 | * <p> |
| 1206 | * In some cases, a matching Activity may not exist, so ensure you |
| 1207 | * safeguard against this. |
| 1208 | * <p> |
| 1209 | * Input: Nothing. |
| 1210 | * <p> |
| 1211 | * Output: Nothing. |
| 1212 | * |
| 1213 | * @hide |
| 1214 | */ |
| 1215 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1216 | public static final String ACTION_MANAGED_PROFILE_SETTINGS = |
| 1217 | "android.settings.MANAGED_PROFILE_SETTINGS"; |
| 1218 | |
| 1219 | /** |
| 1220 | * Activity Action: Show settings to allow configuration of sync settings. |
| 1221 | * <p> |
| 1222 | * In some cases, a matching Activity may not exist, so ensure you |
| 1223 | * safeguard against this. |
| 1224 | * <p> |
| 1225 | * The account types available to add via the add account button may be restricted by adding an |
| 1226 | * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's |
| 1227 | * authorities. Only account types which can sync with that content provider will be offered to |
| 1228 | * the user. |
| 1229 | * <p> |
| 1230 | * Input: Nothing. |
| 1231 | * <p> |
| 1232 | * Output: Nothing. |
| 1233 | */ |
| 1234 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1235 | public static final String ACTION_SYNC_SETTINGS = |
| 1236 | "android.settings.SYNC_SETTINGS"; |
| 1237 | |
| 1238 | /** |
| 1239 | * Activity Action: Show add account screen for creating a new account. |
| 1240 | * <p> |
| 1241 | * In some cases, a matching Activity may not exist, so ensure you |
| 1242 | * safeguard against this. |
| 1243 | * <p> |
| 1244 | * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES} |
| 1245 | * extra to the Intent with one or more syncable content provider's authorities. Only account |
| 1246 | * types which can sync with that content provider will be offered to the user. |
| 1247 | * <p> |
| 1248 | * Account types can also be filtered by adding an {@link #EXTRA_ACCOUNT_TYPES} extra to the |
| 1249 | * Intent with one or more account types. |
| 1250 | * <p> |
| 1251 | * Input: Nothing. |
| 1252 | * <p> |
| 1253 | * Output: Nothing. |
| 1254 | */ |
| 1255 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1256 | public static final String ACTION_ADD_ACCOUNT = |
| 1257 | "android.settings.ADD_ACCOUNT_SETTINGS"; |
| 1258 | |
| 1259 | /** |
| 1260 | * Activity Action: Show settings for enabling or disabling data saver |
| 1261 | * <p></p> |
| 1262 | * In some cases, a matching Activity may not exist, so ensure you |
| 1263 | * safeguard against this. |
| 1264 | * <p> |
| 1265 | * Input: Nothing. |
| 1266 | * <p> |
| 1267 | * Output: Nothing. |
| 1268 | * |
| 1269 | * @hide |
| 1270 | */ |
| 1271 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1272 | public static final String ACTION_DATA_SAVER_SETTINGS = |
| 1273 | "android.settings.DATA_SAVER_SETTINGS"; |
| 1274 | |
| 1275 | /** |
| 1276 | * Activity Action: Show settings for selecting the network operator. |
| 1277 | * <p> |
| 1278 | * In some cases, a matching Activity may not exist, so ensure you |
| 1279 | * safeguard against this. |
| 1280 | * <p> |
| 1281 | * The subscription ID of the subscription for which available network operators should be |
| 1282 | * displayed may be optionally specified with {@link #EXTRA_SUB_ID}. |
| 1283 | * <p> |
| 1284 | * Input: Nothing. |
| 1285 | * <p> |
| 1286 | * Output: Nothing. |
| 1287 | */ |
| 1288 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1289 | public static final String ACTION_NETWORK_OPERATOR_SETTINGS = |
| 1290 | "android.settings.NETWORK_OPERATOR_SETTINGS"; |
| 1291 | |
| 1292 | /** |
| 1293 | * Activity Action: Show settings for selection of 2G/3G. |
| 1294 | * <p> |
| 1295 | * In some cases, a matching Activity may not exist, so ensure you |
| 1296 | * safeguard against this. |
| 1297 | * <p> |
| 1298 | * Input: Nothing. |
| 1299 | * <p> |
| 1300 | * Output: Nothing. |
| 1301 | */ |
| 1302 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1303 | public static final String ACTION_DATA_ROAMING_SETTINGS = |
| 1304 | "android.settings.DATA_ROAMING_SETTINGS"; |
| 1305 | |
| 1306 | /** |
| 1307 | * Activity Action: Show settings for internal storage. |
| 1308 | * <p> |
| 1309 | * In some cases, a matching Activity may not exist, so ensure you |
| 1310 | * safeguard against this. |
| 1311 | * <p> |
| 1312 | * Input: Nothing. |
| 1313 | * <p> |
| 1314 | * Output: Nothing. |
| 1315 | */ |
| 1316 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1317 | public static final String ACTION_INTERNAL_STORAGE_SETTINGS = |
| 1318 | "android.settings.INTERNAL_STORAGE_SETTINGS"; |
| 1319 | /** |
| 1320 | * Activity Action: Show settings for memory card storage. |
| 1321 | * <p> |
| 1322 | * In some cases, a matching Activity may not exist, so ensure you |
| 1323 | * safeguard against this. |
| 1324 | * <p> |
| 1325 | * Input: Nothing. |
| 1326 | * <p> |
| 1327 | * Output: Nothing. |
| 1328 | */ |
| 1329 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1330 | public static final String ACTION_MEMORY_CARD_SETTINGS = |
| 1331 | "android.settings.MEMORY_CARD_SETTINGS"; |
| 1332 | |
| 1333 | /** |
| 1334 | * Activity Action: Show settings for global search. |
| 1335 | * <p> |
| 1336 | * In some cases, a matching Activity may not exist, so ensure you |
| 1337 | * safeguard against this. |
| 1338 | * <p> |
| 1339 | * Input: Nothing. |
| 1340 | * <p> |
| 1341 | * Output: Nothing |
| 1342 | */ |
| 1343 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1344 | public static final String ACTION_SEARCH_SETTINGS = |
| 1345 | "android.search.action.SEARCH_SETTINGS"; |
| 1346 | |
| 1347 | /** |
| 1348 | * Activity Action: Show general device information settings (serial |
| 1349 | * number, software version, phone number, etc.). |
| 1350 | * <p> |
| 1351 | * In some cases, a matching Activity may not exist, so ensure you |
| 1352 | * safeguard against this. |
| 1353 | * <p> |
| 1354 | * Input: Nothing. |
| 1355 | * <p> |
| 1356 | * Output: Nothing |
| 1357 | */ |
| 1358 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1359 | public static final String ACTION_DEVICE_INFO_SETTINGS = |
| 1360 | "android.settings.DEVICE_INFO_SETTINGS"; |
| 1361 | |
| 1362 | /** |
| 1363 | * Activity Action: Show NFC settings. |
| 1364 | * <p> |
| 1365 | * This shows UI that allows NFC to be turned on or off. |
| 1366 | * <p> |
| 1367 | * In some cases, a matching Activity may not exist, so ensure you |
| 1368 | * safeguard against this. |
| 1369 | * <p> |
| 1370 | * Input: Nothing. |
| 1371 | * <p> |
| 1372 | * Output: Nothing |
| 1373 | * @see android.nfc.NfcAdapter#isEnabled() |
| 1374 | */ |
| 1375 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1376 | public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS"; |
| 1377 | |
| 1378 | /** |
| 1379 | * Activity Action: Show NFC Sharing settings. |
| 1380 | * <p> |
| 1381 | * This shows UI that allows NDEF Push (Android Beam) to be turned on or |
| 1382 | * off. |
| 1383 | * <p> |
| 1384 | * In some cases, a matching Activity may not exist, so ensure you |
| 1385 | * safeguard against this. |
| 1386 | * <p> |
| 1387 | * Input: Nothing. |
| 1388 | * <p> |
| 1389 | * Output: Nothing |
| 1390 | * @see android.nfc.NfcAdapter#isNdefPushEnabled() |
| 1391 | */ |
| 1392 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1393 | public static final String ACTION_NFCSHARING_SETTINGS = |
| 1394 | "android.settings.NFCSHARING_SETTINGS"; |
| 1395 | |
| 1396 | /** |
| 1397 | * Activity Action: Show NFC Tap & Pay settings |
| 1398 | * <p> |
| 1399 | * This shows UI that allows the user to configure Tap&Pay |
| 1400 | * settings. |
| 1401 | * <p> |
| 1402 | * In some cases, a matching Activity may not exist, so ensure you |
| 1403 | * safeguard against this. |
| 1404 | * <p> |
| 1405 | * Input: Nothing. |
| 1406 | * <p> |
| 1407 | * Output: Nothing |
| 1408 | */ |
| 1409 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1410 | public static final String ACTION_NFC_PAYMENT_SETTINGS = |
| 1411 | "android.settings.NFC_PAYMENT_SETTINGS"; |
| 1412 | |
| 1413 | /** |
| 1414 | * Activity Action: Show Daydream settings. |
| 1415 | * <p> |
| 1416 | * In some cases, a matching Activity may not exist, so ensure you |
| 1417 | * safeguard against this. |
| 1418 | * <p> |
| 1419 | * Input: Nothing. |
| 1420 | * <p> |
| 1421 | * Output: Nothing. |
| 1422 | * @see android.service.dreams.DreamService |
| 1423 | */ |
| 1424 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1425 | public static final String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS"; |
| 1426 | |
| 1427 | /** |
| 1428 | * Activity Action: Show Notification assistant settings. |
| 1429 | * <p> |
| 1430 | * In some cases, a matching Activity may not exist, so ensure you |
| 1431 | * safeguard against this. |
| 1432 | * <p> |
| 1433 | * Input: Nothing. |
| 1434 | * <p> |
| 1435 | * Output: Nothing. |
| 1436 | * @see android.service.notification.NotificationAssistantService |
| 1437 | */ |
| 1438 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1439 | public static final String ACTION_NOTIFICATION_ASSISTANT_SETTINGS = |
| 1440 | "android.settings.NOTIFICATION_ASSISTANT_SETTINGS"; |
| 1441 | |
| 1442 | /** |
| 1443 | * Activity Action: Show Notification listener settings. |
| 1444 | * <p> |
| 1445 | * In some cases, a matching Activity may not exist, so ensure you |
| 1446 | * safeguard against this. |
| 1447 | * <p> |
| 1448 | * Input: Nothing. |
| 1449 | * <p> |
| 1450 | * Output: Nothing. |
| 1451 | * @see android.service.notification.NotificationListenerService |
| 1452 | */ |
| 1453 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1454 | public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS |
| 1455 | = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"; |
| 1456 | |
| 1457 | /** |
| 1458 | * Activity Action: Show notification listener permission settings page for app. |
| 1459 | * <p> |
| 1460 | * Users can grant and deny access to notifications for a {@link ComponentName} from here. |
| 1461 | * See |
| 1462 | * {@link android.app.NotificationManager#isNotificationListenerAccessGranted(ComponentName)} |
| 1463 | * for more details. |
| 1464 | * <p> |
| 1465 | * Input: The extra {@link #EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME} containing the name |
| 1466 | * of the component to grant or revoke notification listener access to. |
| 1467 | * <p> |
| 1468 | * Output: Nothing. |
| 1469 | */ |
| 1470 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1471 | public static final String ACTION_NOTIFICATION_LISTENER_DETAIL_SETTINGS = |
| 1472 | "android.settings.NOTIFICATION_LISTENER_DETAIL_SETTINGS"; |
| 1473 | |
| 1474 | /** |
| 1475 | * Activity Extra: What component name to show the notification listener permission |
| 1476 | * page for. |
| 1477 | * <p> |
| 1478 | * A string extra containing a {@link ComponentName}. This must be passed as an extra field to |
| 1479 | * {@link #ACTION_NOTIFICATION_LISTENER_DETAIL_SETTINGS}. |
| 1480 | */ |
| 1481 | public static final String EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME = |
| 1482 | "android.provider.extra.NOTIFICATION_LISTENER_COMPONENT_NAME"; |
| 1483 | |
| 1484 | /** |
| 1485 | * Activity Action: Show Do Not Disturb access settings. |
| 1486 | * <p> |
| 1487 | * Users can grant and deny access to Do Not Disturb configuration from here. Managed |
| 1488 | * profiles cannot grant Do Not Disturb access. |
| 1489 | * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more |
| 1490 | * details. |
| 1491 | * <p> |
| 1492 | * Input: Nothing. |
| 1493 | * <p> |
| 1494 | * Output: Nothing. |
| 1495 | * |
| 1496 | * <p class="note"> |
| 1497 | * In some cases, a matching Activity may not exist, so ensure you |
| 1498 | * safeguard against this. |
| 1499 | */ |
| 1500 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1501 | public static final String ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS |
| 1502 | = "android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS"; |
| 1503 | |
| 1504 | /** |
| 1505 | * Activity Action: Show do not disturb setting page for app. |
| 1506 | * <p> |
| 1507 | * Users can grant and deny access to Do Not Disturb configuration for an app from here. |
| 1508 | * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more |
| 1509 | * details. |
| 1510 | * <p> |
| 1511 | * Input: Intent's data URI set with an application name, using the |
| 1512 | * "package" schema (like "package:com.my.app"). |
| 1513 | * <p> |
| 1514 | * Output: Nothing. |
| 1515 | * |
| 1516 | * @hide |
| 1517 | */ |
| 1518 | @SystemApi |
| 1519 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1520 | public static final String ACTION_NOTIFICATION_POLICY_ACCESS_DETAIL_SETTINGS = |
| 1521 | "android.settings.NOTIFICATION_POLICY_ACCESS_DETAIL_SETTINGS"; |
| 1522 | |
| 1523 | /** |
| 1524 | * Activity Action: Show the automatic do not disturb rule listing page |
| 1525 | * <p> |
| 1526 | * Users can add, enable, disable, and remove automatic do not disturb rules from this |
| 1527 | * screen. See {@link NotificationManager#addAutomaticZenRule(AutomaticZenRule)} for more |
| 1528 | * details. |
| 1529 | * </p> |
| 1530 | * <p> |
| 1531 | * Input: Nothing |
| 1532 | * Output: Nothing |
| 1533 | * </p> |
| 1534 | * |
| 1535 | */ |
| 1536 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1537 | public static final String ACTION_CONDITION_PROVIDER_SETTINGS |
| 1538 | = "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS"; |
| 1539 | |
| 1540 | /** |
| 1541 | * Activity Action: Show settings for video captioning. |
| 1542 | * <p> |
| 1543 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 1544 | * against this. |
| 1545 | * <p> |
| 1546 | * Input: Nothing. |
| 1547 | * <p> |
| 1548 | * Output: Nothing. |
| 1549 | */ |
| 1550 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1551 | public static final String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS"; |
| 1552 | |
| 1553 | /** |
| 1554 | * Activity Action: Show the top level print settings. |
| 1555 | * <p> |
| 1556 | * In some cases, a matching Activity may not exist, so ensure you |
| 1557 | * safeguard against this. |
| 1558 | * <p> |
| 1559 | * Input: Nothing. |
| 1560 | * <p> |
| 1561 | * Output: Nothing. |
| 1562 | */ |
| 1563 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1564 | public static final String ACTION_PRINT_SETTINGS = |
| 1565 | "android.settings.ACTION_PRINT_SETTINGS"; |
| 1566 | |
| 1567 | /** |
| 1568 | * Activity Action: Show Zen Mode configuration settings. |
| 1569 | * |
| 1570 | * @hide |
| 1571 | */ |
| 1572 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1573 | public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS"; |
| 1574 | |
| 1575 | /** |
| 1576 | * Activity Action: Show Zen Mode visual effects configuration settings. |
| 1577 | * |
| 1578 | * @hide |
| 1579 | */ |
| 1580 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1581 | public static final String ZEN_MODE_BLOCKED_EFFECTS_SETTINGS = |
| 1582 | "android.settings.ZEN_MODE_BLOCKED_EFFECTS_SETTINGS"; |
| 1583 | |
| 1584 | /** |
| 1585 | * Activity Action: Show Zen Mode onboarding activity. |
| 1586 | * |
| 1587 | * @hide |
| 1588 | */ |
| 1589 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1590 | public static final String ZEN_MODE_ONBOARDING = "android.settings.ZEN_MODE_ONBOARDING"; |
| 1591 | |
| 1592 | /** |
| 1593 | * Activity Action: Show Zen Mode (aka Do Not Disturb) priority configuration settings. |
| 1594 | */ |
| 1595 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1596 | public static final String ACTION_ZEN_MODE_PRIORITY_SETTINGS |
| 1597 | = "android.settings.ZEN_MODE_PRIORITY_SETTINGS"; |
| 1598 | |
| 1599 | /** |
| 1600 | * Activity Action: Show Zen Mode automation configuration settings. |
| 1601 | * |
| 1602 | * @hide |
| 1603 | */ |
| 1604 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1605 | public static final String ACTION_ZEN_MODE_AUTOMATION_SETTINGS |
| 1606 | = "android.settings.ZEN_MODE_AUTOMATION_SETTINGS"; |
| 1607 | |
| 1608 | /** |
| 1609 | * Activity Action: Modify do not disturb mode settings. |
| 1610 | * <p> |
| 1611 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 1612 | * <p> |
| 1613 | * This intent MUST be started using |
| 1614 | * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity |
| 1615 | * startVoiceActivity}. |
| 1616 | * <p> |
| 1617 | * Note: The Activity implementing this intent MUST verify that |
| 1618 | * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction}. |
| 1619 | * returns true before modifying the setting. |
| 1620 | * <p> |
| 1621 | * Input: The optional {@link #EXTRA_DO_NOT_DISTURB_MODE_MINUTES} extra can be used to indicate |
| 1622 | * how long the user wishes to avoid interruptions for. The optional |
| 1623 | * {@link #EXTRA_DO_NOT_DISTURB_MODE_ENABLED} extra can be to indicate if the user is |
| 1624 | * enabling or disabling do not disturb mode. If either extra is not included, the |
| 1625 | * user maybe asked to provide the value. |
| 1626 | * <p> |
| 1627 | * Output: Nothing. |
| 1628 | */ |
| 1629 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1630 | public static final String ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE = |
| 1631 | "android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE"; |
| 1632 | |
| 1633 | /** |
| 1634 | * Activity Action: Show Zen Mode schedule rule configuration settings. |
| 1635 | * |
| 1636 | * @hide |
| 1637 | */ |
| 1638 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1639 | public static final String ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS |
| 1640 | = "android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS"; |
| 1641 | |
| 1642 | /** |
| 1643 | * Activity Action: Show Zen Mode event rule configuration settings. |
| 1644 | * |
| 1645 | * @hide |
| 1646 | */ |
| 1647 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1648 | public static final String ACTION_ZEN_MODE_EVENT_RULE_SETTINGS |
| 1649 | = "android.settings.ZEN_MODE_EVENT_RULE_SETTINGS"; |
| 1650 | |
| 1651 | /** |
| 1652 | * Activity Action: Show Zen Mode external rule configuration settings. |
| 1653 | * |
| 1654 | * @hide |
| 1655 | */ |
| 1656 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1657 | public static final String ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS |
| 1658 | = "android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS"; |
| 1659 | |
| 1660 | /** |
| 1661 | * Activity Action: Show the regulatory information screen for the device. |
| 1662 | * <p> |
| 1663 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 1664 | * against this. |
| 1665 | * <p> |
| 1666 | * Input: Nothing. |
| 1667 | * <p> |
| 1668 | * Output: Nothing. |
| 1669 | */ |
| 1670 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1671 | public static final String |
| 1672 | ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO"; |
| 1673 | |
| 1674 | /** |
| 1675 | * Activity Action: Show Device Name Settings. |
| 1676 | * <p> |
| 1677 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 1678 | * against this. |
| 1679 | * |
| 1680 | * @hide |
| 1681 | */ |
| 1682 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1683 | public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME"; |
| 1684 | |
| 1685 | /** |
| 1686 | * Activity Action: Show pairing settings. |
| 1687 | * <p> |
| 1688 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 1689 | * against this. |
| 1690 | * |
| 1691 | * @hide |
| 1692 | */ |
| 1693 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1694 | public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS"; |
| 1695 | |
| 1696 | /** |
| 1697 | * Activity Action: Show battery saver settings. |
| 1698 | * <p> |
| 1699 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 1700 | * against this. |
| 1701 | */ |
| 1702 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1703 | public static final String ACTION_BATTERY_SAVER_SETTINGS |
| 1704 | = "android.settings.BATTERY_SAVER_SETTINGS"; |
| 1705 | |
| 1706 | /** |
| 1707 | * Activity Action: Modify Battery Saver mode setting using a voice command. |
| 1708 | * <p> |
| 1709 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 1710 | * <p> |
| 1711 | * This intent MUST be started using |
| 1712 | * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity |
| 1713 | * startVoiceActivity}. |
| 1714 | * <p> |
| 1715 | * Note: The activity implementing this intent MUST verify that |
| 1716 | * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before |
| 1717 | * modifying the setting. |
| 1718 | * <p> |
| 1719 | * Input: To tell which state batter saver mode should be set to, add the |
| 1720 | * {@link #EXTRA_BATTERY_SAVER_MODE_ENABLED} extra to this Intent with the state specified. |
| 1721 | * If the extra is not included, no changes will be made. |
| 1722 | * <p> |
| 1723 | * Output: Nothing. |
| 1724 | */ |
| 1725 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1726 | public static final String ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE = |
| 1727 | "android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE"; |
| 1728 | |
| 1729 | /** |
| 1730 | * Activity Action: Show Home selection settings. If there are multiple activities |
| 1731 | * that can satisfy the {@link Intent#CATEGORY_HOME} intent, this screen allows you |
| 1732 | * to pick your preferred activity. |
| 1733 | */ |
| 1734 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1735 | public static final String ACTION_HOME_SETTINGS |
| 1736 | = "android.settings.HOME_SETTINGS"; |
| 1737 | |
| 1738 | /** |
| 1739 | * Activity Action: Show Default apps settings. |
| 1740 | * <p> |
| 1741 | * In some cases, a matching Activity may not exist, so ensure you |
| 1742 | * safeguard against this. |
| 1743 | * <p> |
| 1744 | * Input: Nothing. |
| 1745 | * <p> |
| 1746 | * Output: Nothing. |
| 1747 | */ |
| 1748 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1749 | public static final String ACTION_MANAGE_DEFAULT_APPS_SETTINGS |
| 1750 | = "android.settings.MANAGE_DEFAULT_APPS_SETTINGS"; |
| 1751 | |
| 1752 | /** |
| 1753 | * Activity Action: Show More default apps settings. |
| 1754 | * <p> |
| 1755 | * If a Settings activity handles this intent action, a "More defaults" entry will be shown in |
| 1756 | * the Default apps settings, and clicking it will launch that activity. |
| 1757 | * <p> |
| 1758 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 1759 | * <p> |
| 1760 | * Input: Nothing. |
| 1761 | * <p> |
| 1762 | * Output: Nothing. |
| 1763 | * |
| 1764 | * @hide |
| 1765 | */ |
| 1766 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1767 | @SystemApi |
| 1768 | public static final String ACTION_MANAGE_MORE_DEFAULT_APPS_SETTINGS = |
| 1769 | "android.settings.MANAGE_MORE_DEFAULT_APPS_SETTINGS"; |
| 1770 | |
| 1771 | /** |
| 1772 | * Activity Action: Show notification settings. |
| 1773 | * |
| 1774 | * @hide |
| 1775 | */ |
| 1776 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1777 | public static final String ACTION_NOTIFICATION_SETTINGS |
| 1778 | = "android.settings.NOTIFICATION_SETTINGS"; |
| 1779 | |
| 1780 | /** |
| 1781 | * Activity Action: Show notification history screen. |
| 1782 | * |
| 1783 | * @hide |
| 1784 | */ |
| 1785 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1786 | public static final String ACTION_NOTIFICATION_HISTORY |
| 1787 | = "android.settings.NOTIFICATION_HISTORY"; |
| 1788 | |
| 1789 | /** |
| 1790 | * Activity Action: Show app listing settings, filtered by those that send notifications. |
| 1791 | * |
| 1792 | * @hide |
| 1793 | */ |
| 1794 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1795 | public static final String ACTION_ALL_APPS_NOTIFICATION_SETTINGS = |
| 1796 | "android.settings.ALL_APPS_NOTIFICATION_SETTINGS"; |
| 1797 | |
| 1798 | /** |
| 1799 | * Activity Action: Show notification settings for a single app. |
| 1800 | * <p> |
| 1801 | * Input: {@link #EXTRA_APP_PACKAGE}, the package to display. |
| 1802 | * <p> |
| 1803 | * Output: Nothing. |
| 1804 | */ |
| 1805 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1806 | public static final String ACTION_APP_NOTIFICATION_SETTINGS |
| 1807 | = "android.settings.APP_NOTIFICATION_SETTINGS"; |
| 1808 | |
| 1809 | /** |
| 1810 | * Activity Action: Show notification settings for a single {@link NotificationChannel}. |
| 1811 | * <p> |
| 1812 | * Input: {@link #EXTRA_APP_PACKAGE}, the package containing the channel to display. |
| 1813 | * Input: {@link #EXTRA_CHANNEL_ID}, the id of the channel to display. |
| 1814 | * <p> |
| 1815 | * Output: Nothing. |
| 1816 | */ |
| 1817 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1818 | public static final String ACTION_CHANNEL_NOTIFICATION_SETTINGS |
| 1819 | = "android.settings.CHANNEL_NOTIFICATION_SETTINGS"; |
| 1820 | |
| 1821 | /** |
| 1822 | * Activity Action: Show notification bubble settings for a single app. |
| 1823 | * See {@link NotificationManager#areBubblesAllowed()}. |
| 1824 | * <p> |
| 1825 | * Input: {@link #EXTRA_APP_PACKAGE}, the package to display. |
| 1826 | * <p> |
| 1827 | * Output: Nothing. |
| 1828 | */ |
| 1829 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1830 | public static final String ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS |
| 1831 | = "android.settings.APP_NOTIFICATION_BUBBLE_SETTINGS"; |
| 1832 | |
| 1833 | /** |
| 1834 | * Activity Extra: The package owner of the notification channel settings to display. |
| 1835 | * <p> |
| 1836 | * This must be passed as an extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. |
| 1837 | */ |
| 1838 | public static final String EXTRA_APP_PACKAGE = "android.provider.extra.APP_PACKAGE"; |
| 1839 | |
| 1840 | /** |
| 1841 | * Activity Extra: The {@link NotificationChannel#getId()} of the notification channel settings |
| 1842 | * to display. |
| 1843 | * <p> |
| 1844 | * This must be passed as an extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. |
| 1845 | */ |
| 1846 | public static final String EXTRA_CHANNEL_ID = "android.provider.extra.CHANNEL_ID"; |
| 1847 | |
| 1848 | /** |
| 1849 | * Activity Extra: The {@link NotificationChannel#getConversationId()} of the notification |
| 1850 | * conversation settings to display. |
| 1851 | * <p> |
| 1852 | * This is an optional extra field to the {@link #ACTION_CHANNEL_NOTIFICATION_SETTINGS}. If |
| 1853 | * included the system will first look up notification settings by channel and conversation id, |
| 1854 | * and will fall back to channel id if a specialized channel for this conversation doesn't |
| 1855 | * exist, similar to {@link NotificationManager#getNotificationChannel(String, String)}. |
| 1856 | */ |
| 1857 | public static final String EXTRA_CONVERSATION_ID = "android.provider.extra.CONVERSATION_ID"; |
| 1858 | |
| 1859 | /** |
| 1860 | * Activity Action: Show notification redaction settings. |
| 1861 | * |
| 1862 | * @hide |
| 1863 | */ |
| 1864 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1865 | public static final String ACTION_APP_NOTIFICATION_REDACTION |
| 1866 | = "android.settings.ACTION_APP_NOTIFICATION_REDACTION"; |
| 1867 | |
| 1868 | /** @hide */ |
| 1869 | @UnsupportedAppUsage |
| 1870 | public static final String EXTRA_APP_UID = "app_uid"; |
| 1871 | |
| 1872 | /** |
| 1873 | * Activity Action: Show power menu settings. |
| 1874 | * |
| 1875 | * @hide |
| 1876 | */ |
| 1877 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1878 | public static final String ACTION_POWER_MENU_SETTINGS = |
| 1879 | "android.settings.ACTION_POWER_MENU_SETTINGS"; |
| 1880 | |
| 1881 | /** |
| 1882 | * Activity Action: Show controls settings. |
| 1883 | * |
| 1884 | * @hide |
| 1885 | */ |
| 1886 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1887 | public static final String ACTION_DEVICE_CONTROLS_SETTINGS = |
| 1888 | "android.settings.ACTION_DEVICE_CONTROLS_SETTINGS"; |
| 1889 | |
| 1890 | /** |
| 1891 | * Activity Action: Show a dialog with disabled by policy message. |
| 1892 | * <p> If an user action is disabled by policy, this dialog can be triggered to let |
| 1893 | * the user know about this. |
| 1894 | * <p> |
| 1895 | * Input: {@link Intent#EXTRA_USER}: The user of the admin. |
| 1896 | * <p> |
| 1897 | * Output: Nothing. |
| 1898 | * |
| 1899 | * @hide |
| 1900 | */ |
| 1901 | // Intent#EXTRA_USER_ID can also be used |
| 1902 | @SystemApi |
| 1903 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1904 | public static final String ACTION_SHOW_ADMIN_SUPPORT_DETAILS |
| 1905 | = "android.settings.SHOW_ADMIN_SUPPORT_DETAILS"; |
| 1906 | |
| 1907 | /** |
| 1908 | * Activity Action: Show a dialog for remote bugreport flow. |
| 1909 | * <p> |
| 1910 | * Input: Nothing. |
| 1911 | * <p> |
| 1912 | * Output: Nothing. |
| 1913 | * |
| 1914 | * @hide |
| 1915 | */ |
| 1916 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1917 | public static final String ACTION_SHOW_REMOTE_BUGREPORT_DIALOG |
| 1918 | = "android.settings.SHOW_REMOTE_BUGREPORT_DIALOG"; |
| 1919 | |
| 1920 | /** |
| 1921 | * Activity Action: Show VR listener settings. |
| 1922 | * <p> |
| 1923 | * Input: Nothing. |
| 1924 | * <p> |
| 1925 | * Output: Nothing. |
| 1926 | * |
| 1927 | * @see android.service.vr.VrListenerService |
| 1928 | */ |
| 1929 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1930 | public static final String ACTION_VR_LISTENER_SETTINGS |
| 1931 | = "android.settings.VR_LISTENER_SETTINGS"; |
| 1932 | |
| 1933 | /** |
| 1934 | * Activity Action: Show Picture-in-picture settings. |
| 1935 | * <p> |
| 1936 | * Input: Nothing. |
| 1937 | * <p> |
| 1938 | * Output: Nothing. |
| 1939 | * |
| 1940 | * @hide |
| 1941 | */ |
| 1942 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1943 | public static final String ACTION_PICTURE_IN_PICTURE_SETTINGS |
| 1944 | = "android.settings.PICTURE_IN_PICTURE_SETTINGS"; |
| 1945 | |
| 1946 | /** |
| 1947 | * Activity Action: Show Storage Manager settings. |
| 1948 | * <p> |
| 1949 | * Input: Nothing. |
| 1950 | * <p> |
| 1951 | * Output: Nothing. |
| 1952 | * |
| 1953 | * @hide |
| 1954 | */ |
| 1955 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1956 | public static final String ACTION_STORAGE_MANAGER_SETTINGS |
| 1957 | = "android.settings.STORAGE_MANAGER_SETTINGS"; |
| 1958 | |
| 1959 | /** |
| 1960 | * Activity Action: Allows user to select current webview implementation. |
| 1961 | * <p> |
| 1962 | * Input: Nothing. |
| 1963 | * <p> |
| 1964 | * Output: Nothing. |
| 1965 | */ |
| 1966 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1967 | public static final String ACTION_WEBVIEW_SETTINGS = "android.settings.WEBVIEW_SETTINGS"; |
| 1968 | |
| 1969 | /** |
| 1970 | * Activity Action: Show enterprise privacy section. |
| 1971 | * <p> |
| 1972 | * Input: Nothing. |
| 1973 | * <p> |
| 1974 | * Output: Nothing. |
| 1975 | * @hide |
| 1976 | */ |
| 1977 | @SystemApi |
| 1978 | @TestApi |
| 1979 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1980 | public static final String ACTION_ENTERPRISE_PRIVACY_SETTINGS |
| 1981 | = "android.settings.ENTERPRISE_PRIVACY_SETTINGS"; |
| 1982 | |
| 1983 | /** |
| 1984 | * Activity Action: Show Work Policy info. |
| 1985 | * DPC apps can implement an activity that handles this intent in order to show device policies |
| 1986 | * associated with the work profile or managed device. |
| 1987 | * <p> |
| 1988 | * Input: Nothing. |
| 1989 | * <p> |
| 1990 | * Output: Nothing. |
| 1991 | * |
| 1992 | */ |
| 1993 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1994 | public static final String ACTION_SHOW_WORK_POLICY_INFO = |
| 1995 | "android.settings.SHOW_WORK_POLICY_INFO"; |
| 1996 | |
| 1997 | /** |
| 1998 | * Activity Action: Show screen that let user select its Autofill Service. |
| 1999 | * <p> |
| 2000 | * Input: Intent's data URI set with an application name, using the |
| 2001 | * "package" schema (like "package:com.my.app"). |
| 2002 | * |
| 2003 | * <p> |
| 2004 | * Output: {@link android.app.Activity#RESULT_OK} if user selected an Autofill Service belonging |
| 2005 | * to the caller package. |
| 2006 | * |
| 2007 | * <p> |
| 2008 | * <b>NOTE: </b> Applications should call |
| 2009 | * {@link android.view.autofill.AutofillManager#hasEnabledAutofillServices()} and |
| 2010 | * {@link android.view.autofill.AutofillManager#isAutofillSupported()}, and only use this action |
| 2011 | * to start an activity if they return {@code false} and {@code true} respectively. |
| 2012 | */ |
| 2013 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 2014 | public static final String ACTION_REQUEST_SET_AUTOFILL_SERVICE = |
| 2015 | "android.settings.REQUEST_SET_AUTOFILL_SERVICE"; |
| 2016 | |
| 2017 | /** |
| 2018 | * Activity Action: Show screen for controlling the Quick Access Wallet. |
| 2019 | * <p> |
| 2020 | * In some cases, a matching Activity may not exist, so ensure you |
| 2021 | * safeguard against this. |
| 2022 | * <p> |
| 2023 | * Input: Nothing. |
| 2024 | * <p> |
| 2025 | * Output: Nothing. |
| 2026 | */ |
| 2027 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 2028 | public static final String ACTION_QUICK_ACCESS_WALLET_SETTINGS = |
| 2029 | "android.settings.QUICK_ACCESS_WALLET_SETTINGS"; |
| 2030 | |
| 2031 | /** |
| 2032 | * Activity Action: Show screen for controlling which apps have access on volume directories. |
| 2033 | * <p> |
| 2034 | * Input: Nothing. |
| 2035 | * <p> |
| 2036 | * Output: Nothing. |
| 2037 | * <p> |
| 2038 | * Applications typically use this action to ask the user to revert the "Do not ask again" |
| 2039 | * status of directory access requests made by |
| 2040 | * {@link android.os.storage.StorageVolume#createAccessIntent(String)}. |
| 2041 | * @deprecated use {@link #ACTION_APPLICATION_DETAILS_SETTINGS} to manage storage permissions |
| 2042 | * for a specific application |
| 2043 | */ |
| 2044 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 2045 | @Deprecated |
| 2046 | public static final String ACTION_STORAGE_VOLUME_ACCESS_SETTINGS = |
| 2047 | "android.settings.STORAGE_VOLUME_ACCESS_SETTINGS"; |
| 2048 | |
| 2049 | |
| 2050 | /** |
| 2051 | * Activity Action: Show screen that let user select enable (or disable) Content Capture. |
| 2052 | * <p> |
| 2053 | * Input: Nothing. |
| 2054 | * |
| 2055 | * <p> |
| 2056 | * Output: Nothing |
| 2057 | * |
| 2058 | * @hide |
| 2059 | */ |
| 2060 | @SystemApi |
| 2061 | @TestApi |
| 2062 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 2063 | public static final String ACTION_REQUEST_ENABLE_CONTENT_CAPTURE = |
| 2064 | "android.settings.REQUEST_ENABLE_CONTENT_CAPTURE"; |
| 2065 | |
| 2066 | /** |
| 2067 | * Activity Action: Show screen that let user manage how Android handles URL resolution. |
| 2068 | * <p> |
| 2069 | * Input: Nothing. |
| 2070 | * <p> |
| 2071 | * Output: Nothing |
| 2072 | * |
| 2073 | * @hide |
| 2074 | */ |
| 2075 | @SystemApi |
| 2076 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 2077 | public static final String ACTION_MANAGE_DOMAIN_URLS = "android.settings.MANAGE_DOMAIN_URLS"; |
| 2078 | |
| 2079 | /** |
| 2080 | * Activity Action: Show screen that let user select enable (or disable) tethering. |
| 2081 | * <p> |
| 2082 | * Input: Nothing. |
| 2083 | * <p> |
| 2084 | * Output: Nothing |
| 2085 | * |
| 2086 | * @hide |
| 2087 | */ |
| 2088 | @SystemApi |
| 2089 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 2090 | public static final String ACTION_TETHER_SETTINGS = "android.settings.TETHER_SETTINGS"; |
| 2091 | |
| 2092 | /** |
| 2093 | * Broadcast to trigger notification of asking user to enable MMS. |
| 2094 | * Need to specify {@link #EXTRA_ENABLE_MMS_DATA_REQUEST_REASON} and {@link #EXTRA_SUB_ID}. |
| 2095 | * |
| 2096 | * @hide |
| 2097 | */ |
| 2098 | @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) |
| 2099 | public static final String ACTION_ENABLE_MMS_DATA_REQUEST = |
| 2100 | "android.settings.ENABLE_MMS_DATA_REQUEST"; |
| 2101 | |
| 2102 | /** |
| 2103 | * Integer value that specifies the reason triggering enable MMS data notification. |
| 2104 | * This must be passed as an extra field to the {@link #ACTION_ENABLE_MMS_DATA_REQUEST}. |
| 2105 | * Extra with value of EnableMmsDataReason interface. |
| 2106 | * @hide |
| 2107 | */ |
| 2108 | public static final String EXTRA_ENABLE_MMS_DATA_REQUEST_REASON = |
| 2109 | "android.settings.extra.ENABLE_MMS_DATA_REQUEST_REASON"; |
| 2110 | |
| 2111 | /** @hide */ |
| 2112 | @Retention(RetentionPolicy.SOURCE) |
| 2113 | @IntDef(prefix = { "ENABLE_MMS_DATA_REQUEST_REASON_" }, value = { |
| 2114 | ENABLE_MMS_DATA_REQUEST_REASON_INCOMING_MMS, |
| 2115 | ENABLE_MMS_DATA_REQUEST_REASON_OUTGOING_MMS, |
| 2116 | }) |
| 2117 | public @interface EnableMmsDataReason{} |
| 2118 | |
| 2119 | /** |
| 2120 | * Requesting to enable MMS data because there's an incoming MMS. |
| 2121 | * @hide |
| 2122 | */ |
| 2123 | public static final int ENABLE_MMS_DATA_REQUEST_REASON_INCOMING_MMS = 0; |
| 2124 | |
| 2125 | /** |
| 2126 | * Requesting to enable MMS data because user is sending MMS. |
| 2127 | * @hide |
| 2128 | */ |
| 2129 | public static final int ENABLE_MMS_DATA_REQUEST_REASON_OUTGOING_MMS = 1; |
| 2130 | |
| 2131 | /** |
| 2132 | * Activity Action: Show screen of a cellular subscription and highlight the |
| 2133 | * "enable MMS" toggle. |
| 2134 | * <p> |
| 2135 | * Input: {@link #EXTRA_SUB_ID}: Sub ID of the subscription. |
| 2136 | * <p> |
| 2137 | * Output: Nothing |
| 2138 | * |
| 2139 | * @hide |
| 2140 | */ |
| 2141 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 2142 | public static final String ACTION_MMS_MESSAGE_SETTING = "android.settings.MMS_MESSAGE_SETTING"; |
| 2143 | |
| 2144 | // End of Intent actions for Settings |
| 2145 | |
| 2146 | /** |
| 2147 | * @hide - Private call() method on SettingsProvider to read from 'system' table. |
| 2148 | */ |
| 2149 | public static final String CALL_METHOD_GET_SYSTEM = "GET_system"; |
| 2150 | |
| 2151 | /** |
| 2152 | * @hide - Private call() method on SettingsProvider to read from 'secure' table. |
| 2153 | */ |
| 2154 | public static final String CALL_METHOD_GET_SECURE = "GET_secure"; |
| 2155 | |
| 2156 | /** |
| 2157 | * @hide - Private call() method on SettingsProvider to read from 'global' table. |
| 2158 | */ |
| 2159 | public static final String CALL_METHOD_GET_GLOBAL = "GET_global"; |
| 2160 | |
| 2161 | /** |
| 2162 | * @hide - Private call() method on SettingsProvider to read from 'config' table. |
| 2163 | */ |
| 2164 | public static final String CALL_METHOD_GET_CONFIG = "GET_config"; |
| 2165 | |
| 2166 | /** |
| 2167 | * @hide - Specifies that the caller of the fast-path call()-based flow tracks |
| 2168 | * the settings generation in order to cache values locally. If this key is |
| 2169 | * mapped to a <code>null</code> string extra in the request bundle, the response |
| 2170 | * bundle will contain the same key mapped to a parcelable extra which would be |
| 2171 | * an {@link android.util.MemoryIntArray}. The response will also contain an |
| 2172 | * integer mapped to the {@link #CALL_METHOD_GENERATION_INDEX_KEY} which is the |
| 2173 | * index in the array clients should use to lookup the generation. For efficiency |
| 2174 | * the caller should request the generation tracking memory array only if it |
| 2175 | * doesn't already have it. |
| 2176 | * |
| 2177 | * @see #CALL_METHOD_GENERATION_INDEX_KEY |
| 2178 | */ |
| 2179 | public static final String CALL_METHOD_TRACK_GENERATION_KEY = "_track_generation"; |
| 2180 | |
| 2181 | /** |
| 2182 | * @hide Key with the location in the {@link android.util.MemoryIntArray} where |
| 2183 | * to look up the generation id of the backing table. The value is an integer. |
| 2184 | * |
| 2185 | * @see #CALL_METHOD_TRACK_GENERATION_KEY |
| 2186 | */ |
| 2187 | public static final String CALL_METHOD_GENERATION_INDEX_KEY = "_generation_index"; |
| 2188 | |
| 2189 | /** |
| 2190 | * @hide Key with the settings table generation. The value is an integer. |
| 2191 | * |
| 2192 | * @see #CALL_METHOD_TRACK_GENERATION_KEY |
| 2193 | */ |
| 2194 | public static final String CALL_METHOD_GENERATION_KEY = "_generation"; |
| 2195 | |
| 2196 | /** |
| 2197 | * @hide - User handle argument extra to the fast-path call()-based requests |
| 2198 | */ |
| 2199 | public static final String CALL_METHOD_USER_KEY = "_user"; |
| 2200 | |
| 2201 | /** |
| 2202 | * @hide - Boolean argument extra to the fast-path call()-based requests |
| 2203 | */ |
| 2204 | public static final String CALL_METHOD_MAKE_DEFAULT_KEY = "_make_default"; |
| 2205 | |
| 2206 | /** |
| 2207 | * @hide - User handle argument extra to the fast-path call()-based requests |
| 2208 | */ |
| 2209 | public static final String CALL_METHOD_RESET_MODE_KEY = "_reset_mode"; |
| 2210 | |
| 2211 | /** |
| 2212 | * @hide - String argument extra to the fast-path call()-based requests |
| 2213 | */ |
| 2214 | public static final String CALL_METHOD_TAG_KEY = "_tag"; |
| 2215 | |
| 2216 | /** |
| 2217 | * @hide - String argument extra to the fast-path call()-based requests |
| 2218 | */ |
| 2219 | public static final String CALL_METHOD_PREFIX_KEY = "_prefix"; |
| 2220 | |
| 2221 | /** |
| 2222 | * @hide - RemoteCallback monitor callback argument extra to the fast-path call()-based requests |
| 2223 | */ |
| 2224 | public static final String CALL_METHOD_MONITOR_CALLBACK_KEY = "_monitor_callback_key"; |
| 2225 | |
| 2226 | /** |
| 2227 | * @hide - String argument extra to the fast-path call()-based requests |
| 2228 | */ |
| 2229 | public static final String CALL_METHOD_FLAGS_KEY = "_flags"; |
| 2230 | |
| 2231 | /** |
| 2232 | * @hide - String argument extra to the fast-path call()-based requests |
| 2233 | */ |
| 2234 | public static final String CALL_METHOD_OVERRIDEABLE_BY_RESTORE_KEY = "_overrideable_by_restore"; |
| 2235 | |
| 2236 | /** @hide - Private call() method to write to 'system' table */ |
| 2237 | public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system"; |
| 2238 | |
| 2239 | /** @hide - Private call() method to write to 'secure' table */ |
| 2240 | public static final String CALL_METHOD_PUT_SECURE = "PUT_secure"; |
| 2241 | |
| 2242 | /** @hide - Private call() method to write to 'global' table */ |
| 2243 | public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global"; |
| 2244 | |
| 2245 | /** @hide - Private call() method to write to 'configuration' table */ |
| 2246 | public static final String CALL_METHOD_PUT_CONFIG = "PUT_config"; |
| 2247 | |
| 2248 | /** @hide - Private call() method to write to and delete from the 'configuration' table */ |
| 2249 | public static final String CALL_METHOD_SET_ALL_CONFIG = "SET_ALL_config"; |
| 2250 | |
| 2251 | /** @hide - Private call() method to delete from the 'system' table */ |
| 2252 | public static final String CALL_METHOD_DELETE_SYSTEM = "DELETE_system"; |
| 2253 | |
| 2254 | /** @hide - Private call() method to delete from the 'secure' table */ |
| 2255 | public static final String CALL_METHOD_DELETE_SECURE = "DELETE_secure"; |
| 2256 | |
| 2257 | /** @hide - Private call() method to delete from the 'global' table */ |
| 2258 | public static final String CALL_METHOD_DELETE_GLOBAL = "DELETE_global"; |
| 2259 | |
| 2260 | /** @hide - Private call() method to reset to defaults the 'configuration' table */ |
| 2261 | public static final String CALL_METHOD_DELETE_CONFIG = "DELETE_config"; |
| 2262 | |
| 2263 | /** @hide - Private call() method to reset to defaults the 'secure' table */ |
| 2264 | public static final String CALL_METHOD_RESET_SECURE = "RESET_secure"; |
| 2265 | |
| 2266 | /** @hide - Private call() method to reset to defaults the 'global' table */ |
| 2267 | public static final String CALL_METHOD_RESET_GLOBAL = "RESET_global"; |
| 2268 | |
| 2269 | /** @hide - Private call() method to reset to defaults the 'configuration' table */ |
| 2270 | public static final String CALL_METHOD_RESET_CONFIG = "RESET_config"; |
| 2271 | |
| 2272 | /** @hide - Private call() method to query the 'system' table */ |
| 2273 | public static final String CALL_METHOD_LIST_SYSTEM = "LIST_system"; |
| 2274 | |
| 2275 | /** @hide - Private call() method to query the 'secure' table */ |
| 2276 | public static final String CALL_METHOD_LIST_SECURE = "LIST_secure"; |
| 2277 | |
| 2278 | /** @hide - Private call() method to query the 'global' table */ |
| 2279 | public static final String CALL_METHOD_LIST_GLOBAL = "LIST_global"; |
| 2280 | |
| 2281 | /** @hide - Private call() method to reset to defaults the 'configuration' table */ |
| 2282 | public static final String CALL_METHOD_LIST_CONFIG = "LIST_config"; |
| 2283 | |
| 2284 | /** @hide - Private call() method to register monitor callback for 'configuration' table */ |
| 2285 | public static final String CALL_METHOD_REGISTER_MONITOR_CALLBACK_CONFIG = |
| 2286 | "REGISTER_MONITOR_CALLBACK_config"; |
| 2287 | |
| 2288 | /** @hide - String argument extra to the config monitor callback */ |
| 2289 | public static final String EXTRA_MONITOR_CALLBACK_TYPE = "monitor_callback_type"; |
| 2290 | |
| 2291 | /** @hide - String argument extra to the config monitor callback */ |
| 2292 | public static final String EXTRA_ACCESS_CALLBACK = "access_callback"; |
| 2293 | |
| 2294 | /** @hide - String argument extra to the config monitor callback */ |
| 2295 | public static final String EXTRA_NAMESPACE_UPDATED_CALLBACK = |
| 2296 | "namespace_updated_callback"; |
| 2297 | |
| 2298 | /** @hide - String argument extra to the config monitor callback */ |
| 2299 | public static final String EXTRA_NAMESPACE = "namespace"; |
| 2300 | |
| 2301 | /** @hide - String argument extra to the config monitor callback */ |
| 2302 | public static final String EXTRA_CALLING_PACKAGE = "calling_package"; |
| 2303 | |
| 2304 | /** |
| 2305 | * Activity Extra: Limit available options in launched activity based on the given authority. |
| 2306 | * <p> |
| 2307 | * This can be passed as an extra field in an Activity Intent with one or more syncable content |
| 2308 | * provider's authorities as a String[]. This field is used by some intents to alter the |
| 2309 | * behavior of the called activity. |
| 2310 | * <p> |
| 2311 | * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based |
| 2312 | * on the authority given. |
| 2313 | */ |
| 2314 | public static final String EXTRA_AUTHORITIES = "authorities"; |
| 2315 | |
| 2316 | /** |
| 2317 | * Activity Extra: Limit available options in launched activity based on the given account |
| 2318 | * types. |
| 2319 | * <p> |
| 2320 | * This can be passed as an extra field in an Activity Intent with one or more account types |
| 2321 | * as a String[]. This field is used by some intents to alter the behavior of the called |
| 2322 | * activity. |
| 2323 | * <p> |
| 2324 | * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types to the specified |
| 2325 | * list. |
| 2326 | */ |
| 2327 | public static final String EXTRA_ACCOUNT_TYPES = "account_types"; |
| 2328 | |
| 2329 | public static final String EXTRA_INPUT_METHOD_ID = "input_method_id"; |
| 2330 | |
| 2331 | /** |
| 2332 | * Activity Extra: The device identifier to act upon. |
| 2333 | * <p> |
| 2334 | * This can be passed as an extra field in an Activity Intent with a single |
| 2335 | * InputDeviceIdentifier. This field is used by some activities to jump straight into the |
| 2336 | * settings for the given device. |
| 2337 | * <p> |
| 2338 | * Example: The {@link #ACTION_INPUT_METHOD_SETTINGS} intent opens the keyboard layout |
| 2339 | * dialog for the given device. |
| 2340 | * @hide |
| 2341 | */ |
| 2342 | public static final String EXTRA_INPUT_DEVICE_IDENTIFIER = "input_device_identifier"; |
| 2343 | |
| 2344 | /** |
| 2345 | * Activity Extra: Enable or disable Airplane Mode. |
| 2346 | * <p> |
| 2347 | * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE} |
| 2348 | * intent as a boolean to indicate if it should be enabled. |
| 2349 | */ |
| 2350 | public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled"; |
| 2351 | |
| 2352 | /** |
| 2353 | * Activity Extra: Enable or disable Battery saver mode. |
| 2354 | * <p> |
| 2355 | * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE} |
| 2356 | * intent as a boolean to indicate if it should be enabled. |
| 2357 | */ |
| 2358 | public static final String EXTRA_BATTERY_SAVER_MODE_ENABLED = |
| 2359 | "android.settings.extra.battery_saver_mode_enabled"; |
| 2360 | |
| 2361 | /** |
| 2362 | * Activity Extra: Enable or disable Do Not Disturb mode. |
| 2363 | * <p> |
| 2364 | * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE} |
| 2365 | * intent as a boolean to indicate if it should be enabled. |
| 2366 | */ |
| 2367 | public static final String EXTRA_DO_NOT_DISTURB_MODE_ENABLED = |
| 2368 | "android.settings.extra.do_not_disturb_mode_enabled"; |
| 2369 | |
| 2370 | /** |
| 2371 | * Activity Extra: How many minutes to enable do not disturb mode for. |
| 2372 | * <p> |
| 2373 | * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE} |
| 2374 | * intent to indicate how long do not disturb mode should be enabled for. |
| 2375 | */ |
| 2376 | public static final String EXTRA_DO_NOT_DISTURB_MODE_MINUTES = |
| 2377 | "android.settings.extra.do_not_disturb_mode_minutes"; |
| 2378 | |
| 2379 | /** |
| 2380 | * Reset mode: reset to defaults only settings changed by the |
| 2381 | * calling package. If there is a default set the setting |
| 2382 | * will be set to it, otherwise the setting will be deleted. |
| 2383 | * This is the only type of reset available to non-system clients. |
| 2384 | * @hide |
| 2385 | */ |
| 2386 | @UnsupportedAppUsage |
| 2387 | @TestApi |
| 2388 | public static final int RESET_MODE_PACKAGE_DEFAULTS = 1; |
| 2389 | |
| 2390 | /** |
| 2391 | * Reset mode: reset all settings set by untrusted packages, which is |
| 2392 | * packages that aren't a part of the system, to the current defaults. |
| 2393 | * If there is a default set the setting will be set to it, otherwise |
| 2394 | * the setting will be deleted. This mode is only available to the system. |
| 2395 | * @hide |
| 2396 | */ |
| 2397 | public static final int RESET_MODE_UNTRUSTED_DEFAULTS = 2; |
| 2398 | |
| 2399 | /** |
| 2400 | * Reset mode: delete all settings set by untrusted packages, which is |
| 2401 | * packages that aren't a part of the system. If a setting is set by an |
| 2402 | * untrusted package it will be deleted if its default is not provided |
| 2403 | * by the system, otherwise the setting will be set to its default. |
| 2404 | * This mode is only available to the system. |
| 2405 | * @hide |
| 2406 | */ |
| 2407 | public static final int RESET_MODE_UNTRUSTED_CHANGES = 3; |
| 2408 | |
| 2409 | /** |
| 2410 | * Reset mode: reset all settings to defaults specified by trusted |
| 2411 | * packages, which is packages that are a part of the system, and |
| 2412 | * delete all settings set by untrusted packages. If a setting has |
| 2413 | * a default set by a system package it will be set to the default, |
| 2414 | * otherwise the setting will be deleted. This mode is only available |
| 2415 | * to the system. |
| 2416 | * @hide |
| 2417 | */ |
| 2418 | public static final int RESET_MODE_TRUSTED_DEFAULTS = 4; |
| 2419 | |
| 2420 | /** @hide */ |
| 2421 | @Retention(RetentionPolicy.SOURCE) |
| 2422 | @IntDef(prefix = { "RESET_MODE_" }, value = { |
| 2423 | RESET_MODE_PACKAGE_DEFAULTS, |
| 2424 | RESET_MODE_UNTRUSTED_DEFAULTS, |
| 2425 | RESET_MODE_UNTRUSTED_CHANGES, |
| 2426 | RESET_MODE_TRUSTED_DEFAULTS |
| 2427 | }) |
| 2428 | public @interface ResetMode{} |
| 2429 | |
| 2430 | /** |
| 2431 | * Activity Extra: Number of certificates |
| 2432 | * <p> |
| 2433 | * This can be passed as an extra field to the {@link #ACTION_MONITORING_CERT_INFO} |
| 2434 | * intent to indicate the number of certificates |
| 2435 | * @hide |
| 2436 | */ |
| 2437 | public static final String EXTRA_NUMBER_OF_CERTIFICATES = |
| 2438 | "android.settings.extra.number_of_certificates"; |
| 2439 | |
| 2440 | private static final String JID_RESOURCE_PREFIX = "android"; |
| 2441 | |
| 2442 | public static final String AUTHORITY = "settings"; |
| 2443 | |
| 2444 | private static final String TAG = "Settings"; |
| 2445 | private static final boolean LOCAL_LOGV = false; |
| 2446 | |
| 2447 | // Used in system server calling uid workaround in call() |
| 2448 | private static boolean sInSystemServer = false; |
| 2449 | private static final Object sInSystemServerLock = new Object(); |
| 2450 | |
| 2451 | /** @hide */ |
| 2452 | public static void setInSystemServer() { |
| 2453 | synchronized (sInSystemServerLock) { |
| 2454 | sInSystemServer = true; |
| 2455 | } |
| 2456 | } |
| 2457 | |
| 2458 | /** @hide */ |
| 2459 | public static boolean isInSystemServer() { |
| 2460 | synchronized (sInSystemServerLock) { |
| 2461 | return sInSystemServer; |
| 2462 | } |
| 2463 | } |
| 2464 | |
| 2465 | public static class SettingNotFoundException extends AndroidException { |
| 2466 | public SettingNotFoundException(String msg) { |
| 2467 | super(msg); |
| 2468 | } |
| 2469 | } |
| 2470 | |
| 2471 | /** |
| 2472 | * Common base for tables of name/value settings. |
| 2473 | */ |
| 2474 | public static class NameValueTable implements BaseColumns { |
| 2475 | public static final String NAME = "name"; |
| 2476 | public static final String VALUE = "value"; |
| 2477 | // A flag indicating whether the current value of a setting should be preserved during |
| 2478 | // restore. |
| 2479 | /** @hide */ |
| 2480 | public static final String IS_PRESERVED_IN_RESTORE = "is_preserved_in_restore"; |
| 2481 | |
| 2482 | protected static boolean putString(ContentResolver resolver, Uri uri, |
| 2483 | String name, String value) { |
| 2484 | // The database will take care of replacing duplicates. |
| 2485 | try { |
| 2486 | ContentValues values = new ContentValues(); |
| 2487 | values.put(NAME, name); |
| 2488 | values.put(VALUE, value); |
| 2489 | resolver.insert(uri, values); |
| 2490 | return true; |
| 2491 | } catch (SQLException e) { |
| 2492 | Log.w(TAG, "Can't set key " + name + " in " + uri, e); |
| 2493 | return false; |
| 2494 | } |
| 2495 | } |
| 2496 | |
| 2497 | public static Uri getUriFor(Uri uri, String name) { |
| 2498 | return Uri.withAppendedPath(uri, name); |
| 2499 | } |
| 2500 | } |
| 2501 | |
| 2502 | private static final class GenerationTracker { |
| 2503 | private final MemoryIntArray mArray; |
| 2504 | private final Runnable mErrorHandler; |
| 2505 | private final int mIndex; |
| 2506 | private int mCurrentGeneration; |
| 2507 | |
| 2508 | public GenerationTracker(@NonNull MemoryIntArray array, int index, |
| 2509 | int generation, Runnable errorHandler) { |
| 2510 | mArray = array; |
| 2511 | mIndex = index; |
| 2512 | mErrorHandler = errorHandler; |
| 2513 | mCurrentGeneration = generation; |
| 2514 | } |
| 2515 | |
| 2516 | public boolean isGenerationChanged() { |
| 2517 | final int currentGeneration = readCurrentGeneration(); |
| 2518 | if (currentGeneration >= 0) { |
| 2519 | if (currentGeneration == mCurrentGeneration) { |
| 2520 | return false; |
| 2521 | } |
| 2522 | mCurrentGeneration = currentGeneration; |
| 2523 | } |
| 2524 | return true; |
| 2525 | } |
| 2526 | |
| 2527 | public int getCurrentGeneration() { |
| 2528 | return mCurrentGeneration; |
| 2529 | } |
| 2530 | |
| 2531 | private int readCurrentGeneration() { |
| 2532 | try { |
| 2533 | return mArray.get(mIndex); |
| 2534 | } catch (IOException e) { |
| 2535 | Log.e(TAG, "Error getting current generation", e); |
| 2536 | if (mErrorHandler != null) { |
| 2537 | mErrorHandler.run(); |
| 2538 | } |
| 2539 | } |
| 2540 | return -1; |
| 2541 | } |
| 2542 | |
| 2543 | public void destroy() { |
| 2544 | try { |
| 2545 | mArray.close(); |
| 2546 | } catch (IOException e) { |
| 2547 | Log.e(TAG, "Error closing backing array", e); |
| 2548 | if (mErrorHandler != null) { |
| 2549 | mErrorHandler.run(); |
| 2550 | } |
| 2551 | } |
| 2552 | } |
| 2553 | } |
| 2554 | |
| 2555 | private static final class ContentProviderHolder { |
| 2556 | private final Object mLock = new Object(); |
| 2557 | |
| 2558 | @GuardedBy("mLock") |
| 2559 | private final Uri mUri; |
| 2560 | @GuardedBy("mLock") |
| 2561 | @UnsupportedAppUsage |
| 2562 | private IContentProvider mContentProvider; |
| 2563 | |
| 2564 | public ContentProviderHolder(Uri uri) { |
| 2565 | mUri = uri; |
| 2566 | } |
| 2567 | |
| 2568 | public IContentProvider getProvider(ContentResolver contentResolver) { |
| 2569 | synchronized (mLock) { |
| 2570 | if (mContentProvider == null) { |
| 2571 | mContentProvider = contentResolver |
| 2572 | .acquireProvider(mUri.getAuthority()); |
| 2573 | } |
| 2574 | return mContentProvider; |
| 2575 | } |
| 2576 | } |
| 2577 | |
| 2578 | public void clearProviderForTest() { |
| 2579 | synchronized (mLock) { |
| 2580 | mContentProvider = null; |
| 2581 | } |
| 2582 | } |
| 2583 | } |
| 2584 | |
| 2585 | // Thread-safe. |
| 2586 | private static class NameValueCache { |
| 2587 | private static final boolean DEBUG = false; |
| 2588 | |
| 2589 | private static final String[] SELECT_VALUE_PROJECTION = new String[] { |
| 2590 | Settings.NameValueTable.VALUE |
| 2591 | }; |
| 2592 | |
| 2593 | private static final String NAME_EQ_PLACEHOLDER = "name=?"; |
| 2594 | |
| 2595 | // Must synchronize on 'this' to access mValues and mValuesVersion. |
| 2596 | private final ArrayMap<String, String> mValues = new ArrayMap<>(); |
| 2597 | |
| 2598 | private final Uri mUri; |
| 2599 | @UnsupportedAppUsage |
| 2600 | private final ContentProviderHolder mProviderHolder; |
| 2601 | |
| 2602 | // The method we'll call (or null, to not use) on the provider |
| 2603 | // for the fast path of retrieving settings. |
| 2604 | private final String mCallGetCommand; |
| 2605 | private final String mCallSetCommand; |
| 2606 | private final String mCallListCommand; |
| 2607 | private final String mCallSetAllCommand; |
| 2608 | |
| 2609 | @GuardedBy("this") |
| 2610 | private GenerationTracker mGenerationTracker; |
| 2611 | |
| 2612 | public NameValueCache(Uri uri, String getCommand, String setCommand, |
| 2613 | ContentProviderHolder providerHolder) { |
| 2614 | this(uri, getCommand, setCommand, null, null, providerHolder); |
| 2615 | } |
| 2616 | |
| 2617 | NameValueCache(Uri uri, String getCommand, String setCommand, String listCommand, |
| 2618 | String setAllCommand, ContentProviderHolder providerHolder) { |
| 2619 | mUri = uri; |
| 2620 | mCallGetCommand = getCommand; |
| 2621 | mCallSetCommand = setCommand; |
| 2622 | mCallListCommand = listCommand; |
| 2623 | mCallSetAllCommand = setAllCommand; |
| 2624 | mProviderHolder = providerHolder; |
| 2625 | } |
| 2626 | |
| 2627 | public boolean putStringForUser(ContentResolver cr, String name, String value, |
| 2628 | String tag, boolean makeDefault, final int userHandle, |
| 2629 | boolean overrideableByRestore) { |
| 2630 | try { |
| 2631 | Bundle arg = new Bundle(); |
| 2632 | arg.putString(Settings.NameValueTable.VALUE, value); |
| 2633 | arg.putInt(CALL_METHOD_USER_KEY, userHandle); |
| 2634 | if (tag != null) { |
| 2635 | arg.putString(CALL_METHOD_TAG_KEY, tag); |
| 2636 | } |
| 2637 | if (makeDefault) { |
| 2638 | arg.putBoolean(CALL_METHOD_MAKE_DEFAULT_KEY, true); |
| 2639 | } |
| 2640 | if (overrideableByRestore) { |
| 2641 | arg.putBoolean(CALL_METHOD_OVERRIDEABLE_BY_RESTORE_KEY, true); |
| 2642 | } |
| 2643 | IContentProvider cp = mProviderHolder.getProvider(cr); |
| 2644 | cp.call(cr.getPackageName(), cr.getAttributionTag(), |
| 2645 | mProviderHolder.mUri.getAuthority(), mCallSetCommand, name, arg); |
| 2646 | } catch (RemoteException e) { |
| 2647 | Log.w(TAG, "Can't set key " + name + " in " + mUri, e); |
| 2648 | return false; |
| 2649 | } |
| 2650 | return true; |
| 2651 | } |
| 2652 | |
| 2653 | public boolean setStringsForPrefix(ContentResolver cr, String prefix, |
| 2654 | HashMap<String, String> keyValues) { |
| 2655 | if (mCallSetAllCommand == null) { |
| 2656 | // This NameValueCache does not support atomically setting multiple flags |
| 2657 | return false; |
| 2658 | } |
| 2659 | try { |
| 2660 | Bundle args = new Bundle(); |
| 2661 | args.putString(CALL_METHOD_PREFIX_KEY, prefix); |
| 2662 | args.putSerializable(CALL_METHOD_FLAGS_KEY, keyValues); |
| 2663 | IContentProvider cp = mProviderHolder.getProvider(cr); |
| 2664 | Bundle bundle = cp.call(cr.getPackageName(), cr.getAttributionTag(), |
| 2665 | mProviderHolder.mUri.getAuthority(), |
| 2666 | mCallSetAllCommand, null, args); |
| 2667 | return bundle.getBoolean(KEY_CONFIG_SET_RETURN); |
| 2668 | } catch (RemoteException e) { |
| 2669 | // Not supported by the remote side |
| 2670 | return false; |
| 2671 | } |
| 2672 | } |
| 2673 | |
| 2674 | @UnsupportedAppUsage |
| 2675 | public String getStringForUser(ContentResolver cr, String name, final int userHandle) { |
| 2676 | final boolean isSelf = (userHandle == UserHandle.myUserId()); |
| 2677 | int currentGeneration = -1; |
| 2678 | if (isSelf) { |
| 2679 | synchronized (NameValueCache.this) { |
| 2680 | if (mGenerationTracker != null) { |
| 2681 | if (mGenerationTracker.isGenerationChanged()) { |
| 2682 | if (DEBUG) { |
| 2683 | Log.i(TAG, "Generation changed for type:" |
| 2684 | + mUri.getPath() + " in package:" |
| 2685 | + cr.getPackageName() +" and user:" + userHandle); |
| 2686 | } |
| 2687 | mValues.clear(); |
| 2688 | } else if (mValues.containsKey(name)) { |
| 2689 | return mValues.get(name); |
| 2690 | } |
| 2691 | if (mGenerationTracker != null) { |
| 2692 | currentGeneration = mGenerationTracker.getCurrentGeneration(); |
| 2693 | } |
| 2694 | } |
| 2695 | } |
| 2696 | } else { |
| 2697 | if (LOCAL_LOGV) Log.v(TAG, "get setting for user " + userHandle |
| 2698 | + " by user " + UserHandle.myUserId() + " so skipping cache"); |
| 2699 | } |
| 2700 | |
| 2701 | IContentProvider cp = mProviderHolder.getProvider(cr); |
| 2702 | |
| 2703 | // Try the fast path first, not using query(). If this |
| 2704 | // fails (alternate Settings provider that doesn't support |
| 2705 | // this interface?) then we fall back to the query/table |
| 2706 | // interface. |
| 2707 | if (mCallGetCommand != null) { |
| 2708 | try { |
| 2709 | Bundle args = null; |
| 2710 | if (!isSelf) { |
| 2711 | args = new Bundle(); |
| 2712 | args.putInt(CALL_METHOD_USER_KEY, userHandle); |
| 2713 | } |
| 2714 | boolean needsGenerationTracker = false; |
| 2715 | synchronized (NameValueCache.this) { |
| 2716 | if (isSelf && mGenerationTracker == null) { |
| 2717 | needsGenerationTracker = true; |
| 2718 | if (args == null) { |
| 2719 | args = new Bundle(); |
| 2720 | } |
| 2721 | args.putString(CALL_METHOD_TRACK_GENERATION_KEY, null); |
| 2722 | if (DEBUG) { |
| 2723 | Log.i(TAG, "Requested generation tracker for type: "+ mUri.getPath() |
| 2724 | + " in package:" + cr.getPackageName() +" and user:" |
| 2725 | + userHandle); |
| 2726 | } |
| 2727 | } |
| 2728 | } |
| 2729 | Bundle b; |
| 2730 | // If we're in system server and in a binder transaction we need to clear the |
| 2731 | // calling uid. This works around code in system server that did not call |
| 2732 | // clearCallingIdentity, previously this wasn't needed because reading settings |
| 2733 | // did not do permission checking but thats no longer the case. |
| 2734 | // Long term this should be removed and callers should properly call |
| 2735 | // clearCallingIdentity or use a ContentResolver from the caller as needed. |
| 2736 | if (Settings.isInSystemServer() && Binder.getCallingUid() != Process.myUid()) { |
| 2737 | final long token = Binder.clearCallingIdentity(); |
| 2738 | try { |
| 2739 | b = cp.call(cr.getPackageName(), cr.getAttributionTag(), |
| 2740 | mProviderHolder.mUri.getAuthority(), mCallGetCommand, name, |
| 2741 | args); |
| 2742 | } finally { |
| 2743 | Binder.restoreCallingIdentity(token); |
| 2744 | } |
| 2745 | } else { |
| 2746 | b = cp.call(cr.getPackageName(), cr.getAttributionTag(), |
| 2747 | mProviderHolder.mUri.getAuthority(), mCallGetCommand, name, args); |
| 2748 | } |
| 2749 | if (b != null) { |
| 2750 | String value = b.getString(Settings.NameValueTable.VALUE); |
| 2751 | // Don't update our cache for reads of other users' data |
| 2752 | if (isSelf) { |
| 2753 | synchronized (NameValueCache.this) { |
| 2754 | if (needsGenerationTracker) { |
| 2755 | MemoryIntArray array = b.getParcelable( |
| 2756 | CALL_METHOD_TRACK_GENERATION_KEY); |
| 2757 | final int index = b.getInt( |
| 2758 | CALL_METHOD_GENERATION_INDEX_KEY, -1); |
| 2759 | if (array != null && index >= 0) { |
| 2760 | final int generation = b.getInt( |
| 2761 | CALL_METHOD_GENERATION_KEY, 0); |
| 2762 | if (DEBUG) { |
| 2763 | Log.i(TAG, "Received generation tracker for type:" |
| 2764 | + mUri.getPath() + " in package:" |
| 2765 | + cr.getPackageName() + " and user:" |
| 2766 | + userHandle + " with index:" + index); |
| 2767 | } |
| 2768 | if (mGenerationTracker != null) { |
| 2769 | mGenerationTracker.destroy(); |
| 2770 | } |
| 2771 | mGenerationTracker = new GenerationTracker(array, index, |
| 2772 | generation, () -> { |
| 2773 | synchronized (NameValueCache.this) { |
| 2774 | Log.e(TAG, "Error accessing generation" |
| 2775 | + " tracker - removing"); |
| 2776 | if (mGenerationTracker != null) { |
| 2777 | GenerationTracker generationTracker = |
| 2778 | mGenerationTracker; |
| 2779 | mGenerationTracker = null; |
| 2780 | generationTracker.destroy(); |
| 2781 | mValues.clear(); |
| 2782 | } |
| 2783 | } |
| 2784 | }); |
| 2785 | currentGeneration = generation; |
| 2786 | } |
| 2787 | } |
| 2788 | if (mGenerationTracker != null && currentGeneration == |
| 2789 | mGenerationTracker.getCurrentGeneration()) { |
| 2790 | mValues.put(name, value); |
| 2791 | } |
| 2792 | } |
| 2793 | } else { |
| 2794 | if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle |
| 2795 | + " by " + UserHandle.myUserId() |
| 2796 | + " so not updating cache"); |
| 2797 | } |
| 2798 | return value; |
| 2799 | } |
| 2800 | // If the response Bundle is null, we fall through |
| 2801 | // to the query interface below. |
| 2802 | } catch (RemoteException e) { |
| 2803 | // Not supported by the remote side? Fall through |
| 2804 | // to query(). |
| 2805 | } |
| 2806 | } |
| 2807 | |
| 2808 | Cursor c = null; |
| 2809 | try { |
| 2810 | Bundle queryArgs = ContentResolver.createSqlQueryBundle( |
| 2811 | NAME_EQ_PLACEHOLDER, new String[]{name}, null); |
| 2812 | // Same workaround as above. |
| 2813 | if (Settings.isInSystemServer() && Binder.getCallingUid() != Process.myUid()) { |
| 2814 | final long token = Binder.clearCallingIdentity(); |
| 2815 | try { |
| 2816 | c = cp.query(cr.getPackageName(), cr.getAttributionTag(), mUri, |
| 2817 | SELECT_VALUE_PROJECTION, queryArgs, null); |
| 2818 | } finally { |
| 2819 | Binder.restoreCallingIdentity(token); |
| 2820 | } |
| 2821 | } else { |
| 2822 | c = cp.query(cr.getPackageName(), cr.getAttributionTag(), mUri, |
| 2823 | SELECT_VALUE_PROJECTION, queryArgs, null); |
| 2824 | } |
| 2825 | if (c == null) { |
| 2826 | Log.w(TAG, "Can't get key " + name + " from " + mUri); |
| 2827 | return null; |
| 2828 | } |
| 2829 | |
| 2830 | String value = c.moveToNext() ? c.getString(0) : null; |
| 2831 | synchronized (NameValueCache.this) { |
| 2832 | if (mGenerationTracker != null |
| 2833 | && currentGeneration == mGenerationTracker.getCurrentGeneration()) { |
| 2834 | mValues.put(name, value); |
| 2835 | } |
| 2836 | } |
| 2837 | if (LOCAL_LOGV) { |
| 2838 | Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " + |
| 2839 | name + " = " + (value == null ? "(null)" : value)); |
| 2840 | } |
| 2841 | return value; |
| 2842 | } catch (RemoteException e) { |
| 2843 | Log.w(TAG, "Can't get key " + name + " from " + mUri, e); |
| 2844 | return null; // Return null, but don't cache it. |
| 2845 | } finally { |
| 2846 | if (c != null) c.close(); |
| 2847 | } |
| 2848 | } |
| 2849 | |
| 2850 | public ArrayMap<String, String> getStringsForPrefix(ContentResolver cr, String prefix, |
| 2851 | List<String> names) { |
| 2852 | String namespace = prefix.substring(0, prefix.length() - 1); |
| 2853 | DeviceConfig.enforceReadPermission(ActivityThread.currentApplication(), namespace); |
| 2854 | ArrayMap<String, String> keyValues = new ArrayMap<>(); |
| 2855 | int currentGeneration = -1; |
| 2856 | |
| 2857 | synchronized (NameValueCache.this) { |
| 2858 | if (mGenerationTracker != null) { |
| 2859 | if (mGenerationTracker.isGenerationChanged()) { |
| 2860 | if (DEBUG) { |
| 2861 | Log.i(TAG, "Generation changed for type:" + mUri.getPath() |
| 2862 | + " in package:" + cr.getPackageName()); |
| 2863 | } |
| 2864 | mValues.clear(); |
| 2865 | } else { |
| 2866 | boolean prefixCached = mValues.containsKey(prefix); |
| 2867 | if (prefixCached) { |
| 2868 | if (!names.isEmpty()) { |
| 2869 | for (String name : names) { |
| 2870 | if (mValues.containsKey(name)) { |
| 2871 | keyValues.put(name, mValues.get(name)); |
| 2872 | } |
| 2873 | } |
| 2874 | } else { |
| 2875 | for (int i = 0; i < mValues.size(); ++i) { |
| 2876 | String key = mValues.keyAt(i); |
| 2877 | // Explicitly exclude the prefix as it is only there to |
| 2878 | // signal that the prefix has been cached. |
| 2879 | if (key.startsWith(prefix) && !key.equals(prefix)) { |
| 2880 | keyValues.put(key, mValues.get(key)); |
| 2881 | } |
| 2882 | } |
| 2883 | } |
| 2884 | return keyValues; |
| 2885 | } |
| 2886 | } |
| 2887 | if (mGenerationTracker != null) { |
| 2888 | currentGeneration = mGenerationTracker.getCurrentGeneration(); |
| 2889 | } |
| 2890 | } |
| 2891 | } |
| 2892 | |
| 2893 | if (mCallListCommand == null) { |
| 2894 | // No list command specified, return empty map |
| 2895 | return keyValues; |
| 2896 | } |
| 2897 | IContentProvider cp = mProviderHolder.getProvider(cr); |
| 2898 | |
| 2899 | try { |
| 2900 | Bundle args = new Bundle(); |
| 2901 | args.putString(Settings.CALL_METHOD_PREFIX_KEY, prefix); |
| 2902 | boolean needsGenerationTracker = false; |
| 2903 | synchronized (NameValueCache.this) { |
| 2904 | if (mGenerationTracker == null) { |
| 2905 | needsGenerationTracker = true; |
| 2906 | args.putString(CALL_METHOD_TRACK_GENERATION_KEY, null); |
| 2907 | if (DEBUG) { |
| 2908 | Log.i(TAG, "Requested generation tracker for type: " |
| 2909 | + mUri.getPath() + " in package:" + cr.getPackageName()); |
| 2910 | } |
| 2911 | } |
| 2912 | } |
| 2913 | |
| 2914 | // Fetch all flags for the namespace at once for caching purposes |
| 2915 | Bundle b = cp.call(cr.getPackageName(), cr.getAttributionTag(), |
| 2916 | mProviderHolder.mUri.getAuthority(), mCallListCommand, null, args); |
| 2917 | if (b == null) { |
| 2918 | // Invalid response, return an empty map |
| 2919 | return keyValues; |
| 2920 | } |
| 2921 | |
| 2922 | // All flags for the namespace |
| 2923 | Map<String, String> flagsToValues = |
| 2924 | (HashMap) b.getSerializable(Settings.NameValueTable.VALUE); |
| 2925 | // Only the flags requested by the caller |
| 2926 | if (!names.isEmpty()) { |
| 2927 | for (Map.Entry<String, String> flag : flagsToValues.entrySet()) { |
| 2928 | if (names.contains(flag.getKey())) { |
| 2929 | keyValues.put(flag.getKey(), flag.getValue()); |
| 2930 | } |
| 2931 | } |
| 2932 | } else { |
| 2933 | keyValues.putAll(flagsToValues); |
| 2934 | } |
| 2935 | |
| 2936 | synchronized (NameValueCache.this) { |
| 2937 | if (needsGenerationTracker) { |
| 2938 | MemoryIntArray array = b.getParcelable( |
| 2939 | CALL_METHOD_TRACK_GENERATION_KEY); |
| 2940 | final int index = b.getInt( |
| 2941 | CALL_METHOD_GENERATION_INDEX_KEY, -1); |
| 2942 | if (array != null && index >= 0) { |
| 2943 | final int generation = b.getInt( |
| 2944 | CALL_METHOD_GENERATION_KEY, 0); |
| 2945 | if (DEBUG) { |
| 2946 | Log.i(TAG, "Received generation tracker for type:" |
| 2947 | + mUri.getPath() + " in package:" |
| 2948 | + cr.getPackageName() + " with index:" + index); |
| 2949 | } |
| 2950 | if (mGenerationTracker != null) { |
| 2951 | mGenerationTracker.destroy(); |
| 2952 | } |
| 2953 | mGenerationTracker = new GenerationTracker(array, index, |
| 2954 | generation, () -> { |
| 2955 | synchronized (NameValueCache.this) { |
| 2956 | Log.e(TAG, "Error accessing generation tracker" |
| 2957 | + " - removing"); |
| 2958 | if (mGenerationTracker != null) { |
| 2959 | GenerationTracker generationTracker = |
| 2960 | mGenerationTracker; |
| 2961 | mGenerationTracker = null; |
| 2962 | generationTracker.destroy(); |
| 2963 | mValues.clear(); |
| 2964 | } |
| 2965 | } |
| 2966 | }); |
| 2967 | currentGeneration = generation; |
| 2968 | } |
| 2969 | } |
| 2970 | if (mGenerationTracker != null && currentGeneration |
| 2971 | == mGenerationTracker.getCurrentGeneration()) { |
| 2972 | // cache the complete list of flags for the namespace |
| 2973 | mValues.putAll(flagsToValues); |
| 2974 | // Adding the prefix as a signal that the prefix is cached. |
| 2975 | mValues.put(prefix, null); |
| 2976 | } |
| 2977 | } |
| 2978 | return keyValues; |
| 2979 | } catch (RemoteException e) { |
| 2980 | // Not supported by the remote side, return an empty map |
| 2981 | return keyValues; |
| 2982 | } |
| 2983 | } |
| 2984 | |
| 2985 | public void clearGenerationTrackerForTest() { |
| 2986 | synchronized (NameValueCache.this) { |
| 2987 | if (mGenerationTracker != null) { |
| 2988 | mGenerationTracker.destroy(); |
| 2989 | } |
| 2990 | mValues.clear(); |
| 2991 | mGenerationTracker = null; |
| 2992 | } |
| 2993 | } |
| 2994 | } |
| 2995 | |
| 2996 | /** |
| 2997 | * Checks if the specified context can draw on top of other apps. As of API |
| 2998 | * level 23, an app cannot draw on top of other apps unless it declares the |
| 2999 | * {@link android.Manifest.permission#SYSTEM_ALERT_WINDOW} permission in its |
| 3000 | * manifest, <em>and</em> the user specifically grants the app this |
| 3001 | * capability. To prompt the user to grant this approval, the app must send an |
| 3002 | * intent with the action |
| 3003 | * {@link android.provider.Settings#ACTION_MANAGE_OVERLAY_PERMISSION}, which |
| 3004 | * causes the system to display a permission management screen. |
| 3005 | * |
| 3006 | * @param context App context. |
| 3007 | * @return true if the specified context can draw on top of other apps, false otherwise |
| 3008 | */ |
| 3009 | public static boolean canDrawOverlays(Context context) { |
| 3010 | return Settings.isCallingPackageAllowedToDrawOverlays(context, Process.myUid(), |
| 3011 | context.getOpPackageName(), false); |
| 3012 | } |
| 3013 | |
| 3014 | /** |
| 3015 | * System settings, containing miscellaneous system preferences. This |
| 3016 | * table holds simple name/value pairs. There are convenience |
| 3017 | * functions for accessing individual settings entries. |
| 3018 | */ |
| 3019 | public static final class System extends NameValueTable { |
| 3020 | // NOTE: If you add new settings here, be sure to add them to |
| 3021 | // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoSystemSettingsLocked. |
| 3022 | |
| 3023 | private static final float DEFAULT_FONT_SCALE = 1.0f; |
| 3024 | |
| 3025 | /** |
| 3026 | * The content:// style URL for this table |
| 3027 | */ |
| 3028 | public static final Uri CONTENT_URI = |
| 3029 | Uri.parse("content://" + AUTHORITY + "/system"); |
| 3030 | |
| 3031 | @UnsupportedAppUsage |
| 3032 | private static final ContentProviderHolder sProviderHolder = |
| 3033 | new ContentProviderHolder(CONTENT_URI); |
| 3034 | |
| 3035 | @UnsupportedAppUsage |
| 3036 | private static final NameValueCache sNameValueCache = new NameValueCache( |
| 3037 | CONTENT_URI, |
| 3038 | CALL_METHOD_GET_SYSTEM, |
| 3039 | CALL_METHOD_PUT_SYSTEM, |
| 3040 | sProviderHolder); |
| 3041 | |
| 3042 | @UnsupportedAppUsage |
| 3043 | private static final HashSet<String> MOVED_TO_SECURE; |
| 3044 | static { |
| 3045 | MOVED_TO_SECURE = new HashSet<>(30); |
| 3046 | MOVED_TO_SECURE.add(Secure.ADAPTIVE_SLEEP); |
| 3047 | MOVED_TO_SECURE.add(Secure.ANDROID_ID); |
| 3048 | MOVED_TO_SECURE.add(Secure.HTTP_PROXY); |
| 3049 | MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED); |
| 3050 | MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS); |
| 3051 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED); |
| 3052 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE); |
| 3053 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); |
| 3054 | MOVED_TO_SECURE.add(Secure.LOGGING_ID); |
| 3055 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED); |
| 3056 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE); |
| 3057 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL); |
| 3058 | MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME); |
| 3059 | MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL); |
| 3060 | MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); |
| 3061 | MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); |
| 3062 | MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT); |
| 3063 | MOVED_TO_SECURE.add(Secure.WIFI_ON); |
| 3064 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE); |
| 3065 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT); |
| 3066 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS); |
| 3067 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED); |
| 3068 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS); |
| 3069 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT); |
| 3070 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS); |
| 3071 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON); |
| 3072 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT); |
| 3073 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS); |
| 3074 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS); |
| 3075 | |
| 3076 | // At one time in System, then Global, but now back in Secure |
| 3077 | MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS); |
| 3078 | } |
| 3079 | |
| 3080 | @UnsupportedAppUsage |
| 3081 | private static final HashSet<String> MOVED_TO_GLOBAL; |
| 3082 | @UnsupportedAppUsage |
| 3083 | private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL; |
| 3084 | static { |
| 3085 | MOVED_TO_GLOBAL = new HashSet<>(); |
| 3086 | MOVED_TO_SECURE_THEN_GLOBAL = new HashSet<>(); |
| 3087 | |
| 3088 | // these were originally in system but migrated to secure in the past, |
| 3089 | // so are duplicated in the Secure.* namespace |
| 3090 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.ADB_ENABLED); |
| 3091 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.BLUETOOTH_ON); |
| 3092 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DATA_ROAMING); |
| 3093 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DEVICE_PROVISIONED); |
| 3094 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED); |
| 3095 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.HTTP_PROXY); |
| 3096 | |
| 3097 | // these are moving directly from system to global |
| 3098 | MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON); |
| 3099 | MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS); |
| 3100 | MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS); |
| 3101 | MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME); |
| 3102 | MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE); |
| 3103 | MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND); |
| 3104 | MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND); |
| 3105 | MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND); |
| 3106 | MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND); |
| 3107 | MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED); |
| 3108 | MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND); |
| 3109 | MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND); |
| 3110 | MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND); |
| 3111 | MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED); |
| 3112 | MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN); |
| 3113 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY); |
| 3114 | MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER); |
| 3115 | MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE); |
| 3116 | MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE); |
| 3117 | MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE); |
| 3118 | MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS); |
| 3119 | MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE); |
| 3120 | MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE); |
| 3121 | MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY); |
| 3122 | MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP); |
| 3123 | MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER); |
| 3124 | MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES); |
| 3125 | MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_CONTENT_URL); |
| 3126 | MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_METADATA_URL); |
| 3127 | MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_CONTENT_URL); |
| 3128 | MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_METADATA_URL); |
| 3129 | MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL); |
| 3130 | MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL); |
| 3131 | MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_CONTENT_URL); |
| 3132 | MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL); |
| 3133 | } |
| 3134 | |
| 3135 | /** @hide */ |
| 3136 | public static void getMovedToGlobalSettings(Set<String> outKeySet) { |
| 3137 | outKeySet.addAll(MOVED_TO_GLOBAL); |
| 3138 | outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL); |
| 3139 | } |
| 3140 | |
| 3141 | /** @hide */ |
| 3142 | public static void getMovedToSecureSettings(Set<String> outKeySet) { |
| 3143 | outKeySet.addAll(MOVED_TO_SECURE); |
| 3144 | } |
| 3145 | |
| 3146 | /** @hide */ |
| 3147 | public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) { |
| 3148 | outKeySet.addAll(MOVED_TO_GLOBAL); |
| 3149 | } |
| 3150 | |
| 3151 | /** @hide */ |
| 3152 | public static void clearProviderForTest() { |
| 3153 | sProviderHolder.clearProviderForTest(); |
| 3154 | sNameValueCache.clearGenerationTrackerForTest(); |
| 3155 | } |
| 3156 | |
| 3157 | /** |
| 3158 | * Look up a name in the database. |
| 3159 | * @param resolver to access the database with |
| 3160 | * @param name to look up in the table |
| 3161 | * @return the corresponding value, or null if not present |
| 3162 | */ |
| 3163 | public static String getString(ContentResolver resolver, String name) { |
| 3164 | return getStringForUser(resolver, name, resolver.getUserId()); |
| 3165 | } |
| 3166 | |
| 3167 | /** @hide */ |
| 3168 | @UnsupportedAppUsage |
| 3169 | public static String getStringForUser(ContentResolver resolver, String name, |
| 3170 | int userHandle) { |
| 3171 | if (MOVED_TO_SECURE.contains(name)) { |
| 3172 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 3173 | + " to android.provider.Settings.Secure, returning read-only value."); |
| 3174 | return Secure.getStringForUser(resolver, name, userHandle); |
| 3175 | } |
| 3176 | if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { |
| 3177 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 3178 | + " to android.provider.Settings.Global, returning read-only value."); |
| 3179 | return Global.getStringForUser(resolver, name, userHandle); |
| 3180 | } |
| 3181 | return sNameValueCache.getStringForUser(resolver, name, userHandle); |
| 3182 | } |
| 3183 | |
| 3184 | /** |
| 3185 | * Store a name/value pair into the database. |
| 3186 | * @param resolver to access the database with |
| 3187 | * @param name to store |
| 3188 | * @param value to associate with the name |
| 3189 | * @return true if the value was set, false on database errors |
| 3190 | */ |
| 3191 | public static boolean putString(ContentResolver resolver, String name, String value) { |
| 3192 | return putStringForUser(resolver, name, value, resolver.getUserId()); |
| 3193 | } |
| 3194 | |
| 3195 | /** |
| 3196 | * Store a name/value pair into the database. Values written by this method will be |
| 3197 | * overridden if a restore happens in the future. |
| 3198 | * |
| 3199 | * @param resolver to access the database with |
| 3200 | * @param name to store |
| 3201 | * @param value to associate with the name |
| 3202 | * |
| 3203 | * @return true if the value was set, false on database errors |
| 3204 | * |
| 3205 | * @hide |
| 3206 | */ |
| 3207 | @RequiresPermission(Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) |
| 3208 | @SystemApi |
| 3209 | public static boolean putString(@NonNull ContentResolver resolver, |
| 3210 | @NonNull String name, @Nullable String value, boolean overrideableByRestore) { |
| 3211 | return putStringForUser(resolver, name, value, resolver.getUserId(), |
| 3212 | overrideableByRestore); |
| 3213 | } |
| 3214 | |
| 3215 | /** @hide */ |
| 3216 | @UnsupportedAppUsage |
| 3217 | public static boolean putStringForUser(ContentResolver resolver, String name, String value, |
| 3218 | int userHandle) { |
| 3219 | return putStringForUser(resolver, name, value, userHandle, |
| 3220 | DEFAULT_OVERRIDEABLE_BY_RESTORE); |
| 3221 | } |
| 3222 | |
| 3223 | private static boolean putStringForUser(ContentResolver resolver, String name, String value, |
| 3224 | int userHandle, boolean overrideableByRestore) { |
| 3225 | if (MOVED_TO_SECURE.contains(name)) { |
| 3226 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 3227 | + " to android.provider.Settings.Secure, value is unchanged."); |
| 3228 | return false; |
| 3229 | } |
| 3230 | if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { |
| 3231 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 3232 | + " to android.provider.Settings.Global, value is unchanged."); |
| 3233 | return false; |
| 3234 | } |
| 3235 | return sNameValueCache.putStringForUser(resolver, name, value, null, false, userHandle, |
| 3236 | overrideableByRestore); |
| 3237 | } |
| 3238 | |
| 3239 | /** |
| 3240 | * Construct the content URI for a particular name/value pair, |
| 3241 | * useful for monitoring changes with a ContentObserver. |
| 3242 | * @param name to look up in the table |
| 3243 | * @return the corresponding content URI, or null if not present |
| 3244 | */ |
| 3245 | public static Uri getUriFor(String name) { |
| 3246 | if (MOVED_TO_SECURE.contains(name)) { |
| 3247 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 3248 | + " to android.provider.Settings.Secure, returning Secure URI."); |
| 3249 | return Secure.getUriFor(Secure.CONTENT_URI, name); |
| 3250 | } |
| 3251 | if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { |
| 3252 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 3253 | + " to android.provider.Settings.Global, returning read-only global URI."); |
| 3254 | return Global.getUriFor(Global.CONTENT_URI, name); |
| 3255 | } |
| 3256 | return getUriFor(CONTENT_URI, name); |
| 3257 | } |
| 3258 | |
| 3259 | /** |
| 3260 | * Convenience function for retrieving a single system settings value |
| 3261 | * as an integer. Note that internally setting values are always |
| 3262 | * stored as strings; this function converts the string to an integer |
| 3263 | * for you. The default value will be returned if the setting is |
| 3264 | * not defined or not an integer. |
| 3265 | * |
| 3266 | * @param cr The ContentResolver to access. |
| 3267 | * @param name The name of the setting to retrieve. |
| 3268 | * @param def Value to return if the setting is not defined. |
| 3269 | * |
| 3270 | * @return The setting's current value, or 'def' if it is not defined |
| 3271 | * or not a valid integer. |
| 3272 | */ |
| 3273 | public static int getInt(ContentResolver cr, String name, int def) { |
| 3274 | return getIntForUser(cr, name, def, cr.getUserId()); |
| 3275 | } |
| 3276 | |
| 3277 | /** @hide */ |
| 3278 | @UnsupportedAppUsage |
| 3279 | public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { |
| 3280 | String v = getStringForUser(cr, name, userHandle); |
| 3281 | try { |
| 3282 | return v != null ? Integer.parseInt(v) : def; |
| 3283 | } catch (NumberFormatException e) { |
| 3284 | return def; |
| 3285 | } |
| 3286 | } |
| 3287 | |
| 3288 | /** |
| 3289 | * Convenience function for retrieving a single system settings value |
| 3290 | * as an integer. Note that internally setting values are always |
| 3291 | * stored as strings; this function converts the string to an integer |
| 3292 | * for you. |
| 3293 | * <p> |
| 3294 | * This version does not take a default value. If the setting has not |
| 3295 | * been set, or the string value is not a number, |
| 3296 | * it throws {@link SettingNotFoundException}. |
| 3297 | * |
| 3298 | * @param cr The ContentResolver to access. |
| 3299 | * @param name The name of the setting to retrieve. |
| 3300 | * |
| 3301 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 3302 | * name can't be found or the setting value is not an integer. |
| 3303 | * |
| 3304 | * @return The setting's current value. |
| 3305 | */ |
| 3306 | public static int getInt(ContentResolver cr, String name) |
| 3307 | throws SettingNotFoundException { |
| 3308 | return getIntForUser(cr, name, cr.getUserId()); |
| 3309 | } |
| 3310 | |
| 3311 | /** @hide */ |
| 3312 | @UnsupportedAppUsage |
| 3313 | public static int getIntForUser(ContentResolver cr, String name, int userHandle) |
| 3314 | throws SettingNotFoundException { |
| 3315 | String v = getStringForUser(cr, name, userHandle); |
| 3316 | try { |
| 3317 | return Integer.parseInt(v); |
| 3318 | } catch (NumberFormatException e) { |
| 3319 | throw new SettingNotFoundException(name); |
| 3320 | } |
| 3321 | } |
| 3322 | |
| 3323 | /** |
| 3324 | * Convenience function for updating a single settings value as an |
| 3325 | * integer. This will either create a new entry in the table if the |
| 3326 | * given name does not exist, or modify the value of the existing row |
| 3327 | * with that name. Note that internally setting values are always |
| 3328 | * stored as strings, so this function converts the given value to a |
| 3329 | * string before storing it. |
| 3330 | * |
| 3331 | * @param cr The ContentResolver to access. |
| 3332 | * @param name The name of the setting to modify. |
| 3333 | * @param value The new value for the setting. |
| 3334 | * @return true if the value was set, false on database errors |
| 3335 | */ |
| 3336 | public static boolean putInt(ContentResolver cr, String name, int value) { |
| 3337 | return putIntForUser(cr, name, value, cr.getUserId()); |
| 3338 | } |
| 3339 | |
| 3340 | /** @hide */ |
| 3341 | @UnsupportedAppUsage |
| 3342 | public static boolean putIntForUser(ContentResolver cr, String name, int value, |
| 3343 | int userHandle) { |
| 3344 | return putStringForUser(cr, name, Integer.toString(value), userHandle); |
| 3345 | } |
| 3346 | |
| 3347 | /** |
| 3348 | * Convenience function for retrieving a single system settings value |
| 3349 | * as a {@code long}. Note that internally setting values are always |
| 3350 | * stored as strings; this function converts the string to a {@code long} |
| 3351 | * for you. The default value will be returned if the setting is |
| 3352 | * not defined or not a {@code long}. |
| 3353 | * |
| 3354 | * @param cr The ContentResolver to access. |
| 3355 | * @param name The name of the setting to retrieve. |
| 3356 | * @param def Value to return if the setting is not defined. |
| 3357 | * |
| 3358 | * @return The setting's current value, or 'def' if it is not defined |
| 3359 | * or not a valid {@code long}. |
| 3360 | */ |
| 3361 | public static long getLong(ContentResolver cr, String name, long def) { |
| 3362 | return getLongForUser(cr, name, def, cr.getUserId()); |
| 3363 | } |
| 3364 | |
| 3365 | /** @hide */ |
| 3366 | public static long getLongForUser(ContentResolver cr, String name, long def, |
| 3367 | int userHandle) { |
| 3368 | String valString = getStringForUser(cr, name, userHandle); |
| 3369 | long value; |
| 3370 | try { |
| 3371 | value = valString != null ? Long.parseLong(valString) : def; |
| 3372 | } catch (NumberFormatException e) { |
| 3373 | value = def; |
| 3374 | } |
| 3375 | return value; |
| 3376 | } |
| 3377 | |
| 3378 | /** |
| 3379 | * Convenience function for retrieving a single system settings value |
| 3380 | * as a {@code long}. Note that internally setting values are always |
| 3381 | * stored as strings; this function converts the string to a {@code long} |
| 3382 | * for you. |
| 3383 | * <p> |
| 3384 | * This version does not take a default value. If the setting has not |
| 3385 | * been set, or the string value is not a number, |
| 3386 | * it throws {@link SettingNotFoundException}. |
| 3387 | * |
| 3388 | * @param cr The ContentResolver to access. |
| 3389 | * @param name The name of the setting to retrieve. |
| 3390 | * |
| 3391 | * @return The setting's current value. |
| 3392 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 3393 | * name can't be found or the setting value is not an integer. |
| 3394 | */ |
| 3395 | public static long getLong(ContentResolver cr, String name) |
| 3396 | throws SettingNotFoundException { |
| 3397 | return getLongForUser(cr, name, cr.getUserId()); |
| 3398 | } |
| 3399 | |
| 3400 | /** @hide */ |
| 3401 | public static long getLongForUser(ContentResolver cr, String name, int userHandle) |
| 3402 | throws SettingNotFoundException { |
| 3403 | String valString = getStringForUser(cr, name, userHandle); |
| 3404 | try { |
| 3405 | return Long.parseLong(valString); |
| 3406 | } catch (NumberFormatException e) { |
| 3407 | throw new SettingNotFoundException(name); |
| 3408 | } |
| 3409 | } |
| 3410 | |
| 3411 | /** |
| 3412 | * Convenience function for updating a single settings value as a long |
| 3413 | * integer. This will either create a new entry in the table if the |
| 3414 | * given name does not exist, or modify the value of the existing row |
| 3415 | * with that name. Note that internally setting values are always |
| 3416 | * stored as strings, so this function converts the given value to a |
| 3417 | * string before storing it. |
| 3418 | * |
| 3419 | * @param cr The ContentResolver to access. |
| 3420 | * @param name The name of the setting to modify. |
| 3421 | * @param value The new value for the setting. |
| 3422 | * @return true if the value was set, false on database errors |
| 3423 | */ |
| 3424 | public static boolean putLong(ContentResolver cr, String name, long value) { |
| 3425 | return putLongForUser(cr, name, value, cr.getUserId()); |
| 3426 | } |
| 3427 | |
| 3428 | /** @hide */ |
| 3429 | public static boolean putLongForUser(ContentResolver cr, String name, long value, |
| 3430 | int userHandle) { |
| 3431 | return putStringForUser(cr, name, Long.toString(value), userHandle); |
| 3432 | } |
| 3433 | |
| 3434 | /** |
| 3435 | * Convenience function for retrieving a single system settings value |
| 3436 | * as a floating point number. Note that internally setting values are |
| 3437 | * always stored as strings; this function converts the string to an |
| 3438 | * float for you. The default value will be returned if the setting |
| 3439 | * is not defined or not a valid float. |
| 3440 | * |
| 3441 | * @param cr The ContentResolver to access. |
| 3442 | * @param name The name of the setting to retrieve. |
| 3443 | * @param def Value to return if the setting is not defined. |
| 3444 | * |
| 3445 | * @return The setting's current value, or 'def' if it is not defined |
| 3446 | * or not a valid float. |
| 3447 | */ |
| 3448 | public static float getFloat(ContentResolver cr, String name, float def) { |
| 3449 | return getFloatForUser(cr, name, def, cr.getUserId()); |
| 3450 | } |
| 3451 | |
| 3452 | /** @hide */ |
| 3453 | public static float getFloatForUser(ContentResolver cr, String name, float def, |
| 3454 | int userHandle) { |
| 3455 | String v = getStringForUser(cr, name, userHandle); |
| 3456 | try { |
| 3457 | return v != null ? Float.parseFloat(v) : def; |
| 3458 | } catch (NumberFormatException e) { |
| 3459 | return def; |
| 3460 | } |
| 3461 | } |
| 3462 | |
| 3463 | /** |
| 3464 | * Convenience function for retrieving a single system settings value |
| 3465 | * as a float. Note that internally setting values are always |
| 3466 | * stored as strings; this function converts the string to a float |
| 3467 | * for you. |
| 3468 | * <p> |
| 3469 | * This version does not take a default value. If the setting has not |
| 3470 | * been set, or the string value is not a number, |
| 3471 | * it throws {@link SettingNotFoundException}. |
| 3472 | * |
| 3473 | * @param cr The ContentResolver to access. |
| 3474 | * @param name The name of the setting to retrieve. |
| 3475 | * |
| 3476 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 3477 | * name can't be found or the setting value is not a float. |
| 3478 | * |
| 3479 | * @return The setting's current value. |
| 3480 | */ |
| 3481 | public static float getFloat(ContentResolver cr, String name) |
| 3482 | throws SettingNotFoundException { |
| 3483 | return getFloatForUser(cr, name, cr.getUserId()); |
| 3484 | } |
| 3485 | |
| 3486 | /** @hide */ |
| 3487 | public static float getFloatForUser(ContentResolver cr, String name, int userHandle) |
| 3488 | throws SettingNotFoundException { |
| 3489 | String v = getStringForUser(cr, name, userHandle); |
| 3490 | if (v == null) { |
| 3491 | throw new SettingNotFoundException(name); |
| 3492 | } |
| 3493 | try { |
| 3494 | return Float.parseFloat(v); |
| 3495 | } catch (NumberFormatException e) { |
| 3496 | throw new SettingNotFoundException(name); |
| 3497 | } |
| 3498 | } |
| 3499 | |
| 3500 | /** |
| 3501 | * Convenience function for updating a single settings value as a |
| 3502 | * floating point number. This will either create a new entry in the |
| 3503 | * table if the given name does not exist, or modify the value of the |
| 3504 | * existing row with that name. Note that internally setting values |
| 3505 | * are always stored as strings, so this function converts the given |
| 3506 | * value to a string before storing it. |
| 3507 | * |
| 3508 | * @param cr The ContentResolver to access. |
| 3509 | * @param name The name of the setting to modify. |
| 3510 | * @param value The new value for the setting. |
| 3511 | * @return true if the value was set, false on database errors |
| 3512 | */ |
| 3513 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
| 3514 | return putFloatForUser(cr, name, value, cr.getUserId()); |
| 3515 | } |
| 3516 | |
| 3517 | /** @hide */ |
| 3518 | public static boolean putFloatForUser(ContentResolver cr, String name, float value, |
| 3519 | int userHandle) { |
| 3520 | return putStringForUser(cr, name, Float.toString(value), userHandle); |
| 3521 | } |
| 3522 | |
| 3523 | /** |
| 3524 | * Convenience function to read all of the current |
| 3525 | * configuration-related settings into a |
| 3526 | * {@link Configuration} object. |
| 3527 | * |
| 3528 | * @param cr The ContentResolver to access. |
| 3529 | * @param outConfig Where to place the configuration settings. |
| 3530 | */ |
| 3531 | public static void getConfiguration(ContentResolver cr, Configuration outConfig) { |
| 3532 | adjustConfigurationForUser(cr, outConfig, cr.getUserId(), |
| 3533 | false /* updateSettingsIfEmpty */); |
| 3534 | } |
| 3535 | |
| 3536 | /** @hide */ |
| 3537 | public static void adjustConfigurationForUser(ContentResolver cr, Configuration outConfig, |
| 3538 | int userHandle, boolean updateSettingsIfEmpty) { |
| 3539 | outConfig.fontScale = Settings.System.getFloatForUser( |
| 3540 | cr, FONT_SCALE, DEFAULT_FONT_SCALE, userHandle); |
| 3541 | if (outConfig.fontScale < 0) { |
| 3542 | outConfig.fontScale = DEFAULT_FONT_SCALE; |
| 3543 | } |
| 3544 | |
| 3545 | final String localeValue = |
| 3546 | Settings.System.getStringForUser(cr, SYSTEM_LOCALES, userHandle); |
| 3547 | if (localeValue != null) { |
| 3548 | outConfig.setLocales(LocaleList.forLanguageTags(localeValue)); |
| 3549 | } else { |
| 3550 | // Do not update configuration with emtpy settings since we need to take over the |
| 3551 | // locale list of previous user if the settings value is empty. This happens when a |
| 3552 | // new user is created. |
| 3553 | |
| 3554 | if (updateSettingsIfEmpty) { |
| 3555 | // Make current configuration persistent. This is necessary the first time a |
| 3556 | // user log in. At the first login, the configuration settings are empty, so we |
| 3557 | // need to store the adjusted configuration as the initial settings. |
| 3558 | Settings.System.putStringForUser( |
| 3559 | cr, SYSTEM_LOCALES, outConfig.getLocales().toLanguageTags(), |
| 3560 | userHandle, DEFAULT_OVERRIDEABLE_BY_RESTORE); |
| 3561 | } |
| 3562 | } |
| 3563 | } |
| 3564 | |
| 3565 | /** |
| 3566 | * @hide Erase the fields in the Configuration that should be applied |
| 3567 | * by the settings. |
| 3568 | */ |
| 3569 | public static void clearConfiguration(Configuration inoutConfig) { |
| 3570 | inoutConfig.fontScale = 0; |
| 3571 | if (!inoutConfig.userSetLocale && !inoutConfig.getLocales().isEmpty()) { |
| 3572 | inoutConfig.clearLocales(); |
| 3573 | } |
| 3574 | } |
| 3575 | |
| 3576 | /** |
| 3577 | * Convenience function to write a batch of configuration-related |
| 3578 | * settings from a {@link Configuration} object. |
| 3579 | * |
| 3580 | * @param cr The ContentResolver to access. |
| 3581 | * @param config The settings to write. |
| 3582 | * @return true if the values were set, false on database errors |
| 3583 | */ |
| 3584 | public static boolean putConfiguration(ContentResolver cr, Configuration config) { |
| 3585 | return putConfigurationForUser(cr, config, cr.getUserId()); |
| 3586 | } |
| 3587 | |
| 3588 | /** @hide */ |
| 3589 | public static boolean putConfigurationForUser(ContentResolver cr, Configuration config, |
| 3590 | int userHandle) { |
| 3591 | return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle) && |
| 3592 | Settings.System.putStringForUser( |
| 3593 | cr, SYSTEM_LOCALES, config.getLocales().toLanguageTags(), userHandle, |
| 3594 | DEFAULT_OVERRIDEABLE_BY_RESTORE); |
| 3595 | } |
| 3596 | |
| 3597 | /** @hide */ |
| 3598 | public static boolean hasInterestingConfigurationChanges(int changes) { |
| 3599 | return (changes & ActivityInfo.CONFIG_FONT_SCALE) != 0 || |
| 3600 | (changes & ActivityInfo.CONFIG_LOCALE) != 0; |
| 3601 | } |
| 3602 | |
| 3603 | /** @deprecated - Do not use */ |
| 3604 | @Deprecated |
| 3605 | public static boolean getShowGTalkServiceStatus(ContentResolver cr) { |
| 3606 | return getShowGTalkServiceStatusForUser(cr, cr.getUserId()); |
| 3607 | } |
| 3608 | |
| 3609 | /** |
| 3610 | * @hide |
| 3611 | * @deprecated - Do not use |
| 3612 | */ |
| 3613 | @Deprecated |
| 3614 | public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr, |
| 3615 | int userHandle) { |
| 3616 | return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0; |
| 3617 | } |
| 3618 | |
| 3619 | /** @deprecated - Do not use */ |
| 3620 | @Deprecated |
| 3621 | public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) { |
| 3622 | setShowGTalkServiceStatusForUser(cr, flag, cr.getUserId()); |
| 3623 | } |
| 3624 | |
| 3625 | /** |
| 3626 | * @hide |
| 3627 | * @deprecated - Do not use |
| 3628 | */ |
| 3629 | @Deprecated |
| 3630 | public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag, |
| 3631 | int userHandle) { |
| 3632 | putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle); |
| 3633 | } |
| 3634 | |
| 3635 | /** |
| 3636 | * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead |
| 3637 | */ |
| 3638 | @Deprecated |
| 3639 | public static final String STAY_ON_WHILE_PLUGGED_IN = Global.STAY_ON_WHILE_PLUGGED_IN; |
| 3640 | |
| 3641 | /** |
| 3642 | * What happens when the user presses the end call button if they're not |
| 3643 | * on a call.<br/> |
| 3644 | * <b>Values:</b><br/> |
| 3645 | * 0 - The end button does nothing.<br/> |
| 3646 | * 1 - The end button goes to the home screen.<br/> |
| 3647 | * 2 - The end button puts the device to sleep and locks the keyguard.<br/> |
| 3648 | * 3 - The end button goes to the home screen. If the user is already on the |
| 3649 | * home screen, it puts the device to sleep. |
| 3650 | */ |
| 3651 | public static final String END_BUTTON_BEHAVIOR = "end_button_behavior"; |
| 3652 | |
| 3653 | /** |
| 3654 | * END_BUTTON_BEHAVIOR value for "go home". |
| 3655 | * @hide |
| 3656 | */ |
| 3657 | public static final int END_BUTTON_BEHAVIOR_HOME = 0x1; |
| 3658 | |
| 3659 | /** |
| 3660 | * END_BUTTON_BEHAVIOR value for "go to sleep". |
| 3661 | * @hide |
| 3662 | */ |
| 3663 | public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2; |
| 3664 | |
| 3665 | /** |
| 3666 | * END_BUTTON_BEHAVIOR default value. |
| 3667 | * @hide |
| 3668 | */ |
| 3669 | public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP; |
| 3670 | |
| 3671 | /** |
| 3672 | * Is advanced settings mode turned on. 0 == no, 1 == yes |
| 3673 | * @hide |
| 3674 | */ |
| 3675 | public static final String ADVANCED_SETTINGS = "advanced_settings"; |
| 3676 | |
| 3677 | /** |
| 3678 | * ADVANCED_SETTINGS default value. |
| 3679 | * @hide |
| 3680 | */ |
| 3681 | public static final int ADVANCED_SETTINGS_DEFAULT = 0; |
| 3682 | |
| 3683 | /** |
| 3684 | * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead |
| 3685 | */ |
| 3686 | @Deprecated |
| 3687 | public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON; |
| 3688 | |
| 3689 | /** |
| 3690 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead |
| 3691 | */ |
| 3692 | @Deprecated |
| 3693 | public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH; |
| 3694 | |
| 3695 | /** |
| 3696 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead |
| 3697 | */ |
| 3698 | @Deprecated |
| 3699 | public static final String RADIO_WIFI = Global.RADIO_WIFI; |
| 3700 | |
| 3701 | /** |
| 3702 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead |
| 3703 | * {@hide} |
| 3704 | */ |
| 3705 | @Deprecated |
| 3706 | public static final String RADIO_WIMAX = Global.RADIO_WIMAX; |
| 3707 | |
| 3708 | /** |
| 3709 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead |
| 3710 | */ |
| 3711 | @Deprecated |
| 3712 | public static final String RADIO_CELL = Global.RADIO_CELL; |
| 3713 | |
| 3714 | /** |
| 3715 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead |
| 3716 | */ |
| 3717 | @Deprecated |
| 3718 | public static final String RADIO_NFC = Global.RADIO_NFC; |
| 3719 | |
| 3720 | /** |
| 3721 | * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead |
| 3722 | */ |
| 3723 | @Deprecated |
| 3724 | public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS; |
| 3725 | |
| 3726 | /** |
| 3727 | * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead |
| 3728 | * |
| 3729 | * {@hide} |
| 3730 | */ |
| 3731 | @Deprecated |
| 3732 | @UnsupportedAppUsage |
| 3733 | public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = |
| 3734 | Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS; |
| 3735 | |
| 3736 | /** |
| 3737 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead |
| 3738 | */ |
| 3739 | @Deprecated |
| 3740 | public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY; |
| 3741 | |
| 3742 | /** |
| 3743 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead |
| 3744 | */ |
| 3745 | @Deprecated |
| 3746 | public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT; |
| 3747 | |
| 3748 | /** |
| 3749 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead |
| 3750 | */ |
| 3751 | @Deprecated |
| 3752 | public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = |
| 3753 | Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED; |
| 3754 | |
| 3755 | /** |
| 3756 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead |
| 3757 | */ |
| 3758 | @Deprecated |
| 3759 | public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER; |
| 3760 | |
| 3761 | /** |
| 3762 | * @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead |
| 3763 | */ |
| 3764 | @Deprecated |
| 3765 | public static final String MODE_RINGER = Global.MODE_RINGER; |
| 3766 | |
| 3767 | /** |
| 3768 | * Whether to use static IP and other static network attributes. |
| 3769 | * <p> |
| 3770 | * Set to 1 for true and 0 for false. |
| 3771 | * |
| 3772 | * @deprecated Use {@link WifiManager} instead |
| 3773 | */ |
| 3774 | @Deprecated |
| 3775 | public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip"; |
| 3776 | |
| 3777 | /** |
| 3778 | * The static IP address. |
| 3779 | * <p> |
| 3780 | * Example: "192.168.1.51" |
| 3781 | * |
| 3782 | * @deprecated Use {@link WifiManager} instead |
| 3783 | */ |
| 3784 | @Deprecated |
| 3785 | public static final String WIFI_STATIC_IP = "wifi_static_ip"; |
| 3786 | |
| 3787 | /** |
| 3788 | * If using static IP, the gateway's IP address. |
| 3789 | * <p> |
| 3790 | * Example: "192.168.1.1" |
| 3791 | * |
| 3792 | * @deprecated Use {@link WifiManager} instead |
| 3793 | */ |
| 3794 | @Deprecated |
| 3795 | public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway"; |
| 3796 | |
| 3797 | /** |
| 3798 | * If using static IP, the net mask. |
| 3799 | * <p> |
| 3800 | * Example: "255.255.255.0" |
| 3801 | * |
| 3802 | * @deprecated Use {@link WifiManager} instead |
| 3803 | */ |
| 3804 | @Deprecated |
| 3805 | public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask"; |
| 3806 | |
| 3807 | /** |
| 3808 | * If using static IP, the primary DNS's IP address. |
| 3809 | * <p> |
| 3810 | * Example: "192.168.1.1" |
| 3811 | * |
| 3812 | * @deprecated Use {@link WifiManager} instead |
| 3813 | */ |
| 3814 | @Deprecated |
| 3815 | public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1"; |
| 3816 | |
| 3817 | /** |
| 3818 | * If using static IP, the secondary DNS's IP address. |
| 3819 | * <p> |
| 3820 | * Example: "192.168.1.2" |
| 3821 | * |
| 3822 | * @deprecated Use {@link WifiManager} instead |
| 3823 | */ |
| 3824 | @Deprecated |
| 3825 | public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2"; |
| 3826 | |
| 3827 | /** |
| 3828 | * Determines whether remote devices may discover and/or connect to |
| 3829 | * this device. |
| 3830 | * <P>Type: INT</P> |
| 3831 | * 2 -- discoverable and connectable |
| 3832 | * 1 -- connectable but not discoverable |
| 3833 | * 0 -- neither connectable nor discoverable |
| 3834 | */ |
| 3835 | public static final String BLUETOOTH_DISCOVERABILITY = |
| 3836 | "bluetooth_discoverability"; |
| 3837 | |
| 3838 | /** |
| 3839 | * Bluetooth discoverability timeout. If this value is nonzero, then |
| 3840 | * Bluetooth becomes discoverable for a certain number of seconds, |
| 3841 | * after which is becomes simply connectable. The value is in seconds. |
| 3842 | */ |
| 3843 | public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT = |
| 3844 | "bluetooth_discoverability_timeout"; |
| 3845 | |
| 3846 | /** |
| 3847 | * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED} |
| 3848 | * instead |
| 3849 | */ |
| 3850 | @Deprecated |
| 3851 | public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED; |
| 3852 | |
| 3853 | /** |
| 3854 | * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE} |
| 3855 | * instead |
| 3856 | */ |
| 3857 | @Deprecated |
| 3858 | public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; |
| 3859 | |
| 3860 | /** |
| 3861 | * @deprecated Use |
| 3862 | * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED} |
| 3863 | * instead |
| 3864 | */ |
| 3865 | @Deprecated |
| 3866 | public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = |
| 3867 | "lock_pattern_tactile_feedback_enabled"; |
| 3868 | |
| 3869 | /** |
| 3870 | * A formatted string of the next alarm that is set, or the empty string |
| 3871 | * if there is no alarm set. |
| 3872 | * |
| 3873 | * @deprecated Use {@link android.app.AlarmManager#getNextAlarmClock()}. |
| 3874 | */ |
| 3875 | @Deprecated |
| 3876 | public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted"; |
| 3877 | |
| 3878 | /** |
| 3879 | * Scaling factor for fonts, float. |
| 3880 | */ |
| 3881 | public static final String FONT_SCALE = "font_scale"; |
| 3882 | |
| 3883 | /** |
| 3884 | * The serialized system locale value. |
| 3885 | * |
| 3886 | * Do not use this value directory. |
| 3887 | * To get system locale, use {@link LocaleList#getDefault} instead. |
| 3888 | * To update system locale, use {@link com.android.internal.app.LocalePicker#updateLocales} |
| 3889 | * instead. |
| 3890 | * @hide |
| 3891 | */ |
| 3892 | public static final String SYSTEM_LOCALES = "system_locales"; |
| 3893 | |
| 3894 | |
| 3895 | /** |
| 3896 | * Name of an application package to be debugged. |
| 3897 | * |
| 3898 | * @deprecated Use {@link Global#DEBUG_APP} instead |
| 3899 | */ |
| 3900 | @Deprecated |
| 3901 | public static final String DEBUG_APP = Global.DEBUG_APP; |
| 3902 | |
| 3903 | /** |
| 3904 | * If 1, when launching DEBUG_APP it will wait for the debugger before |
| 3905 | * starting user code. If 0, it will run normally. |
| 3906 | * |
| 3907 | * @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead |
| 3908 | */ |
| 3909 | @Deprecated |
| 3910 | public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER; |
| 3911 | |
| 3912 | /** |
| 3913 | * Whether or not to dim the screen. 0=no 1=yes |
| 3914 | * @deprecated This setting is no longer used. |
| 3915 | */ |
| 3916 | @Deprecated |
| 3917 | public static final String DIM_SCREEN = "dim_screen"; |
| 3918 | |
| 3919 | /** |
| 3920 | * The display color mode. |
| 3921 | * @hide |
| 3922 | */ |
| 3923 | public static final String DISPLAY_COLOR_MODE = "display_color_mode"; |
| 3924 | |
| 3925 | /** |
| 3926 | * The user selected min refresh rate in frames per second. |
| 3927 | * |
| 3928 | * If this isn't set, 0 will be used. |
| 3929 | * @hide |
| 3930 | */ |
| 3931 | public static final String MIN_REFRESH_RATE = "min_refresh_rate"; |
| 3932 | |
| 3933 | /** |
| 3934 | * The user selected peak refresh rate in frames per second. |
| 3935 | * |
| 3936 | * If this isn't set, the system falls back to a device specific default. |
| 3937 | * @hide |
| 3938 | */ |
| 3939 | public static final String PEAK_REFRESH_RATE = "peak_refresh_rate"; |
| 3940 | |
| 3941 | /** |
| 3942 | * The amount of time in milliseconds before the device goes to sleep or begins |
| 3943 | * to dream after a period of inactivity. This value is also known as the |
| 3944 | * user activity timeout period since the screen isn't necessarily turned off |
| 3945 | * when it expires. |
| 3946 | * |
| 3947 | * <p> |
| 3948 | * This value is bounded by maximum timeout set by |
| 3949 | * {@link android.app.admin.DevicePolicyManager#setMaximumTimeToLock(ComponentName, long)}. |
| 3950 | */ |
| 3951 | public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout"; |
| 3952 | |
| 3953 | /** |
| 3954 | * The screen backlight brightness between 0 and 255. |
| 3955 | */ |
| 3956 | public static final String SCREEN_BRIGHTNESS = "screen_brightness"; |
| 3957 | |
| 3958 | /** |
| 3959 | * The screen backlight brightness between 0 and 255. |
| 3960 | * @hide |
| 3961 | */ |
| 3962 | public static final String SCREEN_BRIGHTNESS_FOR_VR = "screen_brightness_for_vr"; |
| 3963 | |
| 3964 | /** |
| 3965 | * The screen backlight brightness between 0.0f and 1.0f. |
| 3966 | * @hide |
| 3967 | */ |
| 3968 | public static final String SCREEN_BRIGHTNESS_FOR_VR_FLOAT = |
| 3969 | "screen_brightness_for_vr_float"; |
| 3970 | |
| 3971 | /** |
| 3972 | * The screen backlight brightness between 0.0f and 1.0f. |
| 3973 | * @hide |
| 3974 | */ |
| 3975 | public static final String SCREEN_BRIGHTNESS_FLOAT = "screen_brightness_float"; |
| 3976 | |
| 3977 | /** |
| 3978 | * Control whether to enable automatic brightness mode. |
| 3979 | */ |
| 3980 | public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode"; |
| 3981 | |
| 3982 | /** |
| 3983 | * Adjustment to auto-brightness to make it generally more (>0.0 <1.0) |
| 3984 | * or less (<0.0 >-1.0) bright. |
| 3985 | * @hide |
| 3986 | */ |
| 3987 | @UnsupportedAppUsage |
| 3988 | public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj"; |
| 3989 | |
| 3990 | /** |
| 3991 | * SCREEN_BRIGHTNESS_MODE value for manual mode. |
| 3992 | */ |
| 3993 | public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0; |
| 3994 | |
| 3995 | /** |
| 3996 | * SCREEN_BRIGHTNESS_MODE value for automatic mode. |
| 3997 | */ |
| 3998 | public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; |
| 3999 | |
| 4000 | /** |
| 4001 | * Control whether to enable adaptive sleep mode. |
| 4002 | * @deprecated Use {@link android.provider.Settings.Secure#ADAPTIVE_SLEEP} instead. |
| 4003 | * @hide |
| 4004 | */ |
| 4005 | public static final String ADAPTIVE_SLEEP = "adaptive_sleep"; |
| 4006 | |
| 4007 | /** |
| 4008 | * Control whether the process CPU usage meter should be shown. |
| 4009 | * |
| 4010 | * @deprecated This functionality is no longer available as of |
| 4011 | * {@link android.os.Build.VERSION_CODES#N_MR1}. |
| 4012 | */ |
| 4013 | @Deprecated |
| 4014 | public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES; |
| 4015 | |
| 4016 | /** |
| 4017 | * If 1, the activity manager will aggressively finish activities and |
| 4018 | * processes as soon as they are no longer needed. If 0, the normal |
| 4019 | * extended lifetime is used. |
| 4020 | * |
| 4021 | * @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead |
| 4022 | */ |
| 4023 | @Deprecated |
| 4024 | public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES; |
| 4025 | |
| 4026 | /** |
| 4027 | * Determines which streams are affected by ringer and zen mode changes. The |
| 4028 | * stream type's bit should be set to 1 if it should be muted when going |
| 4029 | * into an inaudible ringer mode. |
| 4030 | */ |
| 4031 | public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected"; |
| 4032 | |
| 4033 | /** |
| 4034 | * Determines which streams are affected by mute. The |
| 4035 | * stream type's bit should be set to 1 if it should be muted when a mute request |
| 4036 | * is received. |
| 4037 | */ |
| 4038 | public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected"; |
| 4039 | |
| 4040 | /** |
| 4041 | * Whether vibrate is on for different events. This is used internally, |
| 4042 | * changing this value will not change the vibrate. See AudioManager. |
| 4043 | */ |
| 4044 | public static final String VIBRATE_ON = "vibrate_on"; |
| 4045 | |
| 4046 | /** |
| 4047 | * If 1, redirects the system vibrator to all currently attached input devices |
| 4048 | * that support vibration. If there are no such input devices, then the system |
| 4049 | * vibrator is used instead. |
| 4050 | * If 0, does not register the system vibrator. |
| 4051 | * |
| 4052 | * This setting is mainly intended to provide a compatibility mechanism for |
| 4053 | * applications that only know about the system vibrator and do not use the |
| 4054 | * input device vibrator API. |
| 4055 | * |
| 4056 | * @hide |
| 4057 | */ |
| 4058 | public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices"; |
| 4059 | |
| 4060 | /** |
| 4061 | * The intensity of notification vibrations, if configurable. |
| 4062 | * |
| 4063 | * Not all devices are capable of changing their vibration intensity; on these devices |
| 4064 | * there will likely be no difference between the various vibration intensities except for |
| 4065 | * intensity 0 (off) and the rest. |
| 4066 | * |
| 4067 | * <b>Values:</b><br/> |
| 4068 | * 0 - Vibration is disabled<br/> |
| 4069 | * 1 - Weak vibrations<br/> |
| 4070 | * 2 - Medium vibrations<br/> |
| 4071 | * 3 - Strong vibrations |
| 4072 | * @hide |
| 4073 | */ |
| 4074 | public static final String NOTIFICATION_VIBRATION_INTENSITY = |
| 4075 | "notification_vibration_intensity"; |
| 4076 | /** |
| 4077 | * The intensity of ringtone vibrations, if configurable. |
| 4078 | * |
| 4079 | * Not all devices are capable of changing their vibration intensity; on these devices |
| 4080 | * there will likely be no difference between the various vibration intensities except for |
| 4081 | * intensity 0 (off) and the rest. |
| 4082 | * |
| 4083 | * <b>Values:</b><br/> |
| 4084 | * 0 - Vibration is disabled<br/> |
| 4085 | * 1 - Weak vibrations<br/> |
| 4086 | * 2 - Medium vibrations<br/> |
| 4087 | * 3 - Strong vibrations |
| 4088 | * @hide |
| 4089 | */ |
| 4090 | public static final String RING_VIBRATION_INTENSITY = |
| 4091 | "ring_vibration_intensity"; |
| 4092 | |
| 4093 | /** |
| 4094 | * The intensity of haptic feedback vibrations, if configurable. |
| 4095 | * |
| 4096 | * Not all devices are capable of changing their feedback intensity; on these devices |
| 4097 | * there will likely be no difference between the various vibration intensities except for |
| 4098 | * intensity 0 (off) and the rest. |
| 4099 | * |
| 4100 | * <b>Values:</b><br/> |
| 4101 | * 0 - Vibration is disabled<br/> |
| 4102 | * 1 - Weak vibrations<br/> |
| 4103 | * 2 - Medium vibrations<br/> |
| 4104 | * 3 - Strong vibrations |
| 4105 | * @hide |
| 4106 | */ |
| 4107 | public static final String HAPTIC_FEEDBACK_INTENSITY = |
| 4108 | "haptic_feedback_intensity"; |
| 4109 | |
| 4110 | /** |
| 4111 | * Ringer volume. This is used internally, changing this value will not |
| 4112 | * change the volume. See AudioManager. |
| 4113 | * |
| 4114 | * @removed Not used by anything since API 2. |
| 4115 | */ |
| 4116 | public static final String VOLUME_RING = "volume_ring"; |
| 4117 | |
| 4118 | /** |
| 4119 | * System/notifications volume. This is used internally, changing this |
| 4120 | * value will not change the volume. See AudioManager. |
| 4121 | * |
| 4122 | * @removed Not used by anything since API 2. |
| 4123 | */ |
| 4124 | public static final String VOLUME_SYSTEM = "volume_system"; |
| 4125 | |
| 4126 | /** |
| 4127 | * Voice call volume. This is used internally, changing this value will |
| 4128 | * not change the volume. See AudioManager. |
| 4129 | * |
| 4130 | * @removed Not used by anything since API 2. |
| 4131 | */ |
| 4132 | public static final String VOLUME_VOICE = "volume_voice"; |
| 4133 | |
| 4134 | /** |
| 4135 | * Music/media/gaming volume. This is used internally, changing this |
| 4136 | * value will not change the volume. See AudioManager. |
| 4137 | * |
| 4138 | * @removed Not used by anything since API 2. |
| 4139 | */ |
| 4140 | public static final String VOLUME_MUSIC = "volume_music"; |
| 4141 | |
| 4142 | /** |
| 4143 | * Alarm volume. This is used internally, changing this |
| 4144 | * value will not change the volume. See AudioManager. |
| 4145 | * |
| 4146 | * @removed Not used by anything since API 2. |
| 4147 | */ |
| 4148 | public static final String VOLUME_ALARM = "volume_alarm"; |
| 4149 | |
| 4150 | /** |
| 4151 | * Notification volume. This is used internally, changing this |
| 4152 | * value will not change the volume. See AudioManager. |
| 4153 | * |
| 4154 | * @removed Not used by anything since API 2. |
| 4155 | */ |
| 4156 | public static final String VOLUME_NOTIFICATION = "volume_notification"; |
| 4157 | |
| 4158 | /** |
| 4159 | * Bluetooth Headset volume. This is used internally, changing this value will |
| 4160 | * not change the volume. See AudioManager. |
| 4161 | * |
| 4162 | * @removed Not used by anything since API 2. |
| 4163 | */ |
| 4164 | public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco"; |
| 4165 | |
| 4166 | /** |
| 4167 | * @hide |
| 4168 | * Acessibility volume. This is used internally, changing this |
| 4169 | * value will not change the volume. |
| 4170 | */ |
| 4171 | public static final String VOLUME_ACCESSIBILITY = "volume_a11y"; |
| 4172 | |
| 4173 | /** |
| 4174 | * @hide |
| 4175 | * Volume index for virtual assistant. |
| 4176 | */ |
| 4177 | public static final String VOLUME_ASSISTANT = "volume_assistant"; |
| 4178 | |
| 4179 | /** |
| 4180 | * Master volume (float in the range 0.0f to 1.0f). |
| 4181 | * |
| 4182 | * @hide |
| 4183 | */ |
| 4184 | public static final String VOLUME_MASTER = "volume_master"; |
| 4185 | |
| 4186 | /** |
| 4187 | * Master mono (int 1 = mono, 0 = normal). |
| 4188 | * |
| 4189 | * @hide |
| 4190 | */ |
| 4191 | @UnsupportedAppUsage |
| 4192 | public static final String MASTER_MONO = "master_mono"; |
| 4193 | |
| 4194 | /** |
| 4195 | * Master balance (float -1.f = 100% left, 0.f = dead center, 1.f = 100% right). |
| 4196 | * |
| 4197 | * @hide |
| 4198 | */ |
| 4199 | public static final String MASTER_BALANCE = "master_balance"; |
| 4200 | |
| 4201 | /** |
| 4202 | * Whether the notifications should use the ring volume (value of 1) or |
| 4203 | * a separate notification volume (value of 0). In most cases, users |
| 4204 | * will have this enabled so the notification and ringer volumes will be |
| 4205 | * the same. However, power users can disable this and use the separate |
| 4206 | * notification volume control. |
| 4207 | * <p> |
| 4208 | * Note: This is a one-off setting that will be removed in the future |
| 4209 | * when there is profile support. For this reason, it is kept hidden |
| 4210 | * from the public APIs. |
| 4211 | * |
| 4212 | * @hide |
| 4213 | * @deprecated |
| 4214 | */ |
| 4215 | @Deprecated |
| 4216 | public static final String NOTIFICATIONS_USE_RING_VOLUME = |
| 4217 | "notifications_use_ring_volume"; |
| 4218 | |
| 4219 | /** |
| 4220 | * Whether silent mode should allow vibration feedback. This is used |
| 4221 | * internally in AudioService and the Sound settings activity to |
| 4222 | * coordinate decoupling of vibrate and silent modes. This setting |
| 4223 | * will likely be removed in a future release with support for |
| 4224 | * audio/vibe feedback profiles. |
| 4225 | * |
| 4226 | * Not used anymore. On devices with vibrator, the user explicitly selects |
| 4227 | * silent or vibrate mode. |
| 4228 | * Kept for use by legacy database upgrade code in DatabaseHelper. |
| 4229 | * @hide |
| 4230 | */ |
| 4231 | @UnsupportedAppUsage |
| 4232 | public static final String VIBRATE_IN_SILENT = "vibrate_in_silent"; |
| 4233 | |
| 4234 | /** |
| 4235 | * The mapping of stream type (integer) to its setting. |
| 4236 | * |
| 4237 | * @removed Not used by anything since API 2. |
| 4238 | */ |
| 4239 | public static final String[] VOLUME_SETTINGS = { |
| 4240 | VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC, |
| 4241 | VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO |
| 4242 | }; |
| 4243 | |
| 4244 | /** |
| 4245 | * @hide |
| 4246 | * The mapping of stream type (integer) to its setting. |
| 4247 | * Unlike the VOLUME_SETTINGS array, this one contains as many entries as |
| 4248 | * AudioSystem.NUM_STREAM_TYPES, and has empty strings for stream types whose volumes |
| 4249 | * are never persisted. |
| 4250 | */ |
| 4251 | public static final String[] VOLUME_SETTINGS_INT = { |
| 4252 | VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC, |
| 4253 | VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO, |
| 4254 | "" /*STREAM_SYSTEM_ENFORCED, no setting for this stream*/, |
| 4255 | "" /*STREAM_DTMF, no setting for this stream*/, |
| 4256 | "" /*STREAM_TTS, no setting for this stream*/, |
| 4257 | VOLUME_ACCESSIBILITY, VOLUME_ASSISTANT |
| 4258 | }; |
| 4259 | |
| 4260 | /** |
| 4261 | * Appended to various volume related settings to record the previous |
| 4262 | * values before they the settings were affected by a silent/vibrate |
| 4263 | * ringer mode change. |
| 4264 | * |
| 4265 | * @removed Not used by anything since API 2. |
| 4266 | */ |
| 4267 | public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible"; |
| 4268 | |
| 4269 | /** |
| 4270 | * Persistent store for the system-wide default ringtone URI. |
| 4271 | * <p> |
| 4272 | * If you need to play the default ringtone at any given time, it is recommended |
| 4273 | * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve |
| 4274 | * to the set default ringtone at the time of playing. |
| 4275 | * |
| 4276 | * @see #DEFAULT_RINGTONE_URI |
| 4277 | */ |
| 4278 | public static final String RINGTONE = "ringtone"; |
| 4279 | |
| 4280 | /** |
| 4281 | * A {@link Uri} that will point to the current default ringtone at any |
| 4282 | * given time. |
| 4283 | * <p> |
| 4284 | * If the current default ringtone is in the DRM provider and the caller |
| 4285 | * does not have permission, the exception will be a |
| 4286 | * FileNotFoundException. |
| 4287 | */ |
| 4288 | public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE); |
| 4289 | |
| 4290 | /** {@hide} */ |
| 4291 | public static final String RINGTONE_CACHE = "ringtone_cache"; |
| 4292 | /** {@hide} */ |
| 4293 | public static final Uri RINGTONE_CACHE_URI = getUriFor(RINGTONE_CACHE); |
| 4294 | |
| 4295 | /** |
| 4296 | * Persistent store for the system-wide default notification sound. |
| 4297 | * |
| 4298 | * @see #RINGTONE |
| 4299 | * @see #DEFAULT_NOTIFICATION_URI |
| 4300 | */ |
| 4301 | public static final String NOTIFICATION_SOUND = "notification_sound"; |
| 4302 | |
| 4303 | /** |
| 4304 | * A {@link Uri} that will point to the current default notification |
| 4305 | * sound at any given time. |
| 4306 | * |
| 4307 | * @see #DEFAULT_RINGTONE_URI |
| 4308 | */ |
| 4309 | public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND); |
| 4310 | |
| 4311 | /** {@hide} */ |
| 4312 | public static final String NOTIFICATION_SOUND_CACHE = "notification_sound_cache"; |
| 4313 | /** {@hide} */ |
| 4314 | public static final Uri NOTIFICATION_SOUND_CACHE_URI = getUriFor(NOTIFICATION_SOUND_CACHE); |
| 4315 | |
| 4316 | /** |
| 4317 | * Persistent store for the system-wide default alarm alert. |
| 4318 | * |
| 4319 | * @see #RINGTONE |
| 4320 | * @see #DEFAULT_ALARM_ALERT_URI |
| 4321 | */ |
| 4322 | public static final String ALARM_ALERT = "alarm_alert"; |
| 4323 | |
| 4324 | /** |
| 4325 | * A {@link Uri} that will point to the current default alarm alert at |
| 4326 | * any given time. |
| 4327 | * |
| 4328 | * @see #DEFAULT_ALARM_ALERT_URI |
| 4329 | */ |
| 4330 | public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT); |
| 4331 | |
| 4332 | /** {@hide} */ |
| 4333 | public static final String ALARM_ALERT_CACHE = "alarm_alert_cache"; |
| 4334 | /** {@hide} */ |
| 4335 | public static final Uri ALARM_ALERT_CACHE_URI = getUriFor(ALARM_ALERT_CACHE); |
| 4336 | |
| 4337 | /** |
| 4338 | * Persistent store for the system default media button event receiver. |
| 4339 | * |
| 4340 | * @hide |
| 4341 | */ |
| 4342 | public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver"; |
| 4343 | |
| 4344 | /** |
| 4345 | * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off |
| 4346 | */ |
| 4347 | public static final String TEXT_AUTO_REPLACE = "auto_replace"; |
| 4348 | |
| 4349 | /** |
| 4350 | * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off |
| 4351 | */ |
| 4352 | public static final String TEXT_AUTO_CAPS = "auto_caps"; |
| 4353 | |
| 4354 | /** |
| 4355 | * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This |
| 4356 | * feature converts two spaces to a "." and space. |
| 4357 | */ |
| 4358 | public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate"; |
| 4359 | |
| 4360 | /** |
| 4361 | * Setting to showing password characters in text editors. 1 = On, 0 = Off |
| 4362 | */ |
| 4363 | public static final String TEXT_SHOW_PASSWORD = "show_password"; |
| 4364 | |
| 4365 | public static final String SHOW_GTALK_SERVICE_STATUS = |
| 4366 | "SHOW_GTALK_SERVICE_STATUS"; |
| 4367 | |
| 4368 | /** |
| 4369 | * Name of activity to use for wallpaper on the home screen. |
| 4370 | * |
| 4371 | * @deprecated Use {@link WallpaperManager} instead. |
| 4372 | */ |
| 4373 | @Deprecated |
| 4374 | public static final String WALLPAPER_ACTIVITY = "wallpaper_activity"; |
| 4375 | |
| 4376 | /** |
| 4377 | * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME} |
| 4378 | * instead |
| 4379 | */ |
| 4380 | @Deprecated |
| 4381 | public static final String AUTO_TIME = Global.AUTO_TIME; |
| 4382 | |
| 4383 | /** |
| 4384 | * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE} |
| 4385 | * instead |
| 4386 | */ |
| 4387 | @Deprecated |
| 4388 | public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE; |
| 4389 | |
| 4390 | /** |
| 4391 | * Display times as 12 or 24 hours |
| 4392 | * 12 |
| 4393 | * 24 |
| 4394 | */ |
| 4395 | public static final String TIME_12_24 = "time_12_24"; |
| 4396 | |
| 4397 | /** |
| 4398 | * Date format string |
| 4399 | * mm/dd/yyyy |
| 4400 | * dd/mm/yyyy |
| 4401 | * yyyy/mm/dd |
| 4402 | */ |
| 4403 | public static final String DATE_FORMAT = "date_format"; |
| 4404 | |
| 4405 | /** |
| 4406 | * Whether the setup wizard has been run before (on first boot), or if |
| 4407 | * it still needs to be run. |
| 4408 | * |
| 4409 | * nonzero = it has been run in the past |
| 4410 | * 0 = it has not been run in the past |
| 4411 | */ |
| 4412 | public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run"; |
| 4413 | |
| 4414 | /** |
| 4415 | * Scaling factor for normal window animations. Setting to 0 will disable window |
| 4416 | * animations. |
| 4417 | * |
| 4418 | * @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead |
| 4419 | */ |
| 4420 | @Deprecated |
| 4421 | public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE; |
| 4422 | |
| 4423 | /** |
| 4424 | * Scaling factor for activity transition animations. Setting to 0 will disable window |
| 4425 | * animations. |
| 4426 | * |
| 4427 | * @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead |
| 4428 | */ |
| 4429 | @Deprecated |
| 4430 | public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE; |
| 4431 | |
| 4432 | /** |
| 4433 | * Scaling factor for Animator-based animations. This affects both the start delay and |
| 4434 | * duration of all such animations. Setting to 0 will cause animations to end immediately. |
| 4435 | * The default value is 1. |
| 4436 | * |
| 4437 | * @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead |
| 4438 | */ |
| 4439 | @Deprecated |
| 4440 | public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE; |
| 4441 | |
| 4442 | /** |
| 4443 | * Control whether the accelerometer will be used to change screen |
| 4444 | * orientation. If 0, it will not be used unless explicitly requested |
| 4445 | * by the application; if 1, it will be used by default unless explicitly |
| 4446 | * disabled by the application. |
| 4447 | */ |
| 4448 | public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; |
| 4449 | |
| 4450 | /** |
| 4451 | * Default screen rotation when no other policy applies. |
| 4452 | * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a |
| 4453 | * preference, this rotation value will be used. Must be one of the |
| 4454 | * {@link android.view.Surface#ROTATION_0 Surface rotation constants}. |
| 4455 | * |
| 4456 | * @see Display#getRotation |
| 4457 | */ |
| 4458 | public static final String USER_ROTATION = "user_rotation"; |
| 4459 | |
| 4460 | /** |
| 4461 | * Control whether the rotation lock toggle in the System UI should be hidden. |
| 4462 | * Typically this is done for accessibility purposes to make it harder for |
| 4463 | * the user to accidentally toggle the rotation lock while the display rotation |
| 4464 | * has been locked for accessibility. |
| 4465 | * |
| 4466 | * If 0, then rotation lock toggle is not hidden for accessibility (although it may be |
| 4467 | * unavailable for other reasons). If 1, then the rotation lock toggle is hidden. |
| 4468 | * |
| 4469 | * @hide |
| 4470 | */ |
| 4471 | @UnsupportedAppUsage |
| 4472 | public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY = |
| 4473 | "hide_rotation_lock_toggle_for_accessibility"; |
| 4474 | |
| 4475 | /** |
| 4476 | * Whether the phone vibrates when it is ringing due to an incoming call. This will |
| 4477 | * be used by Phone and Setting apps; it shouldn't affect other apps. |
| 4478 | * The value is boolean (1 or 0). |
| 4479 | * |
| 4480 | * Note: this is not same as "vibrate on ring", which had been available until ICS. |
| 4481 | * It was about AudioManager's setting and thus affected all the applications which |
| 4482 | * relied on the setting, while this is purely about the vibration setting for incoming |
| 4483 | * calls. |
| 4484 | */ |
| 4485 | public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing"; |
| 4486 | |
| 4487 | /** |
| 4488 | * When {@code 1}, Telecom enhanced call blocking functionality is enabled. When |
| 4489 | * {@code 0}, enhanced call blocking functionality is disabled. |
| 4490 | * @hide |
| 4491 | */ |
| 4492 | public static final String DEBUG_ENABLE_ENHANCED_CALL_BLOCKING = |
| 4493 | "debug.enable_enhanced_calling"; |
| 4494 | |
| 4495 | /** |
| 4496 | * Whether the audible DTMF tones are played by the dialer when dialing. The value is |
| 4497 | * boolean (1 or 0). |
| 4498 | */ |
| 4499 | public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone"; |
| 4500 | |
| 4501 | /** |
| 4502 | * CDMA only settings |
| 4503 | * DTMF tone type played by the dialer when dialing. |
| 4504 | * 0 = Normal |
| 4505 | * 1 = Long |
| 4506 | */ |
| 4507 | public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; |
| 4508 | |
| 4509 | /** |
| 4510 | * Whether the hearing aid is enabled. The value is |
| 4511 | * boolean (1 or 0). |
| 4512 | * @hide |
| 4513 | */ |
| 4514 | @UnsupportedAppUsage |
| 4515 | public static final String HEARING_AID = "hearing_aid"; |
| 4516 | |
| 4517 | /** |
| 4518 | * CDMA only settings |
| 4519 | * TTY Mode |
| 4520 | * 0 = OFF |
| 4521 | * 1 = FULL |
| 4522 | * 2 = VCO |
| 4523 | * 3 = HCO |
| 4524 | * @hide |
| 4525 | */ |
| 4526 | @UnsupportedAppUsage |
| 4527 | public static final String TTY_MODE = "tty_mode"; |
| 4528 | |
| 4529 | /** |
| 4530 | * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is |
| 4531 | * boolean (1 or 0). |
| 4532 | */ |
| 4533 | public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; |
| 4534 | |
| 4535 | /** |
| 4536 | * Whether haptic feedback (Vibrate on tap) is enabled. The value is |
| 4537 | * boolean (1 or 0). |
| 4538 | */ |
| 4539 | public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled"; |
| 4540 | |
| 4541 | /** |
| 4542 | * @deprecated Each application that shows web suggestions should have its own |
| 4543 | * setting for this. |
| 4544 | */ |
| 4545 | @Deprecated |
| 4546 | public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; |
| 4547 | |
| 4548 | /** |
| 4549 | * Whether the notification LED should repeatedly flash when a notification is |
| 4550 | * pending. The value is boolean (1 or 0). |
| 4551 | * @hide |
| 4552 | */ |
| 4553 | @UnsupportedAppUsage |
| 4554 | public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; |
| 4555 | |
| 4556 | /** |
| 4557 | * Show pointer location on screen? |
| 4558 | * 0 = no |
| 4559 | * 1 = yes |
| 4560 | * @hide |
| 4561 | */ |
| 4562 | @UnsupportedAppUsage |
| 4563 | public static final String POINTER_LOCATION = "pointer_location"; |
| 4564 | |
| 4565 | /** |
| 4566 | * Show touch positions on screen? |
| 4567 | * 0 = no |
| 4568 | * 1 = yes |
| 4569 | * @hide |
| 4570 | */ |
| 4571 | @UnsupportedAppUsage |
| 4572 | public static final String SHOW_TOUCHES = "show_touches"; |
| 4573 | |
| 4574 | /** |
| 4575 | * Log raw orientation data from |
| 4576 | * {@link com.android.server.policy.WindowOrientationListener} for use with the |
| 4577 | * orientationplot.py tool. |
| 4578 | * 0 = no |
| 4579 | * 1 = yes |
| 4580 | * @hide |
| 4581 | */ |
| 4582 | public static final String WINDOW_ORIENTATION_LISTENER_LOG = |
| 4583 | "window_orientation_listener_log"; |
| 4584 | |
| 4585 | /** |
| 4586 | * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED} |
| 4587 | * instead |
| 4588 | * @hide |
| 4589 | */ |
| 4590 | @Deprecated |
| 4591 | public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED; |
| 4592 | |
| 4593 | /** |
| 4594 | * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED} |
| 4595 | * instead |
| 4596 | * @hide |
| 4597 | */ |
| 4598 | @Deprecated |
| 4599 | @UnsupportedAppUsage |
| 4600 | public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED; |
| 4601 | |
| 4602 | /** |
| 4603 | * Whether to play sounds when the keyguard is shown and dismissed. |
| 4604 | * @hide |
| 4605 | */ |
| 4606 | @UnsupportedAppUsage |
| 4607 | public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled"; |
| 4608 | |
| 4609 | /** |
| 4610 | * Whether the lockscreen should be completely disabled. |
| 4611 | * @hide |
| 4612 | */ |
| 4613 | public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled"; |
| 4614 | |
| 4615 | /** |
| 4616 | * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND} |
| 4617 | * instead |
| 4618 | * @hide |
| 4619 | */ |
| 4620 | @Deprecated |
| 4621 | public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND; |
| 4622 | |
| 4623 | /** |
| 4624 | * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND} |
| 4625 | * instead |
| 4626 | * @hide |
| 4627 | */ |
| 4628 | @Deprecated |
| 4629 | @UnsupportedAppUsage |
| 4630 | public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND; |
| 4631 | |
| 4632 | /** |
| 4633 | * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND} |
| 4634 | * instead |
| 4635 | * @hide |
| 4636 | */ |
| 4637 | @Deprecated |
| 4638 | @UnsupportedAppUsage |
| 4639 | public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND; |
| 4640 | |
| 4641 | /** |
| 4642 | * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND} |
| 4643 | * instead |
| 4644 | * @hide |
| 4645 | */ |
| 4646 | @Deprecated |
| 4647 | @UnsupportedAppUsage |
| 4648 | public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND; |
| 4649 | |
| 4650 | /** |
| 4651 | * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND} |
| 4652 | * instead |
| 4653 | * @hide |
| 4654 | */ |
| 4655 | @Deprecated |
| 4656 | @UnsupportedAppUsage |
| 4657 | public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND; |
| 4658 | |
| 4659 | /** |
| 4660 | * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND} |
| 4661 | * instead |
| 4662 | * @hide |
| 4663 | */ |
| 4664 | @Deprecated |
| 4665 | @UnsupportedAppUsage |
| 4666 | public static final String LOCK_SOUND = Global.LOCK_SOUND; |
| 4667 | |
| 4668 | /** |
| 4669 | * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND} |
| 4670 | * instead |
| 4671 | * @hide |
| 4672 | */ |
| 4673 | @Deprecated |
| 4674 | @UnsupportedAppUsage |
| 4675 | public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND; |
| 4676 | |
| 4677 | /** |
| 4678 | * Receive incoming SIP calls? |
| 4679 | * 0 = no |
| 4680 | * 1 = yes |
| 4681 | * @hide |
| 4682 | */ |
| 4683 | public static final String SIP_RECEIVE_CALLS = "sip_receive_calls"; |
| 4684 | |
| 4685 | /** |
| 4686 | * Call Preference String. |
| 4687 | * "SIP_ALWAYS" : Always use SIP with network access |
| 4688 | * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address |
| 4689 | * @hide |
| 4690 | */ |
| 4691 | public static final String SIP_CALL_OPTIONS = "sip_call_options"; |
| 4692 | |
| 4693 | /** |
| 4694 | * One of the sip call options: Always use SIP with network access. |
| 4695 | * @hide |
| 4696 | */ |
| 4697 | public static final String SIP_ALWAYS = "SIP_ALWAYS"; |
| 4698 | |
| 4699 | /** |
| 4700 | * One of the sip call options: Only if destination is a SIP address. |
| 4701 | * @hide |
| 4702 | */ |
| 4703 | public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY"; |
| 4704 | |
| 4705 | /** |
| 4706 | * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that |
| 4707 | * the user should be prompted each time a call is made whether it should be placed using |
| 4708 | * SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with |
| 4709 | * SIP_ADDRESS_ONLY. |
| 4710 | * @hide |
| 4711 | */ |
| 4712 | @Deprecated |
| 4713 | public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME"; |
| 4714 | |
| 4715 | /** |
| 4716 | * Pointer speed setting. |
| 4717 | * This is an integer value in a range between -7 and +7, so there are 15 possible values. |
| 4718 | * -7 = slowest |
| 4719 | * 0 = default speed |
| 4720 | * +7 = fastest |
| 4721 | * @hide |
| 4722 | */ |
| 4723 | @UnsupportedAppUsage |
| 4724 | public static final String POINTER_SPEED = "pointer_speed"; |
| 4725 | |
| 4726 | /** |
| 4727 | * Whether lock-to-app will be triggered by long-press on recents. |
| 4728 | * @hide |
| 4729 | */ |
| 4730 | public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled"; |
| 4731 | |
| 4732 | /** |
| 4733 | * I am the lolrus. |
| 4734 | * <p> |
| 4735 | * Nonzero values indicate that the user has a bukkit. |
| 4736 | * Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>. |
| 4737 | * @hide |
| 4738 | */ |
| 4739 | public static final String EGG_MODE = "egg_mode"; |
| 4740 | |
| 4741 | /** |
| 4742 | * Setting to determine whether or not to show the battery percentage in the status bar. |
| 4743 | * 0 - Don't show percentage |
| 4744 | * 1 - Show percentage |
| 4745 | * @hide |
| 4746 | */ |
| 4747 | public static final String SHOW_BATTERY_PERCENT = "status_bar_show_battery_percent"; |
| 4748 | |
| 4749 | /** |
| 4750 | * Whether or not to enable multiple audio focus. |
| 4751 | * When enabled, requires more management by user over application playback activity, |
| 4752 | * for instance pausing media apps when another starts. |
| 4753 | * @hide |
| 4754 | */ |
| 4755 | public static final String MULTI_AUDIO_FOCUS_ENABLED = "multi_audio_focus_enabled"; |
| 4756 | |
| 4757 | /** |
| 4758 | * IMPORTANT: If you add a new public settings you also have to add it to |
| 4759 | * PUBLIC_SETTINGS below. If the new setting is hidden you have to add |
| 4760 | * it to PRIVATE_SETTINGS below. Also add a validator that can validate |
| 4761 | * the setting value. See an example above. |
| 4762 | */ |
| 4763 | |
| 4764 | /** |
| 4765 | * Keys we no longer back up under the current schema, but want to continue to |
| 4766 | * process when restoring historical backup datasets. |
| 4767 | * |
| 4768 | * All settings in {@link LEGACY_RESTORE_SETTINGS} array *must* have a non-null validator, |
| 4769 | * otherwise they won't be restored. |
| 4770 | * |
| 4771 | * @hide |
| 4772 | */ |
| 4773 | public static final String[] LEGACY_RESTORE_SETTINGS = { |
| 4774 | }; |
| 4775 | |
| 4776 | /** |
| 4777 | * These are all public system settings |
| 4778 | * |
| 4779 | * @hide |
| 4780 | */ |
| 4781 | @UnsupportedAppUsage |
| 4782 | public static final Set<String> PUBLIC_SETTINGS = new ArraySet<>(); |
| 4783 | static { |
| 4784 | PUBLIC_SETTINGS.add(END_BUTTON_BEHAVIOR); |
| 4785 | PUBLIC_SETTINGS.add(WIFI_USE_STATIC_IP); |
| 4786 | PUBLIC_SETTINGS.add(WIFI_STATIC_IP); |
| 4787 | PUBLIC_SETTINGS.add(WIFI_STATIC_GATEWAY); |
| 4788 | PUBLIC_SETTINGS.add(WIFI_STATIC_NETMASK); |
| 4789 | PUBLIC_SETTINGS.add(WIFI_STATIC_DNS1); |
| 4790 | PUBLIC_SETTINGS.add(WIFI_STATIC_DNS2); |
| 4791 | PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY); |
| 4792 | PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY_TIMEOUT); |
| 4793 | PUBLIC_SETTINGS.add(NEXT_ALARM_FORMATTED); |
| 4794 | PUBLIC_SETTINGS.add(FONT_SCALE); |
| 4795 | PUBLIC_SETTINGS.add(SYSTEM_LOCALES); |
| 4796 | PUBLIC_SETTINGS.add(DIM_SCREEN); |
| 4797 | PUBLIC_SETTINGS.add(SCREEN_OFF_TIMEOUT); |
| 4798 | PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS); |
| 4799 | PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_FLOAT); |
| 4800 | PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_FOR_VR); |
| 4801 | PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_FOR_VR_FLOAT); |
| 4802 | PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_MODE); |
| 4803 | PUBLIC_SETTINGS.add(MODE_RINGER_STREAMS_AFFECTED); |
| 4804 | PUBLIC_SETTINGS.add(MUTE_STREAMS_AFFECTED); |
| 4805 | PUBLIC_SETTINGS.add(VIBRATE_ON); |
| 4806 | PUBLIC_SETTINGS.add(VOLUME_RING); |
| 4807 | PUBLIC_SETTINGS.add(VOLUME_SYSTEM); |
| 4808 | PUBLIC_SETTINGS.add(VOLUME_VOICE); |
| 4809 | PUBLIC_SETTINGS.add(VOLUME_MUSIC); |
| 4810 | PUBLIC_SETTINGS.add(VOLUME_ALARM); |
| 4811 | PUBLIC_SETTINGS.add(VOLUME_NOTIFICATION); |
| 4812 | PUBLIC_SETTINGS.add(VOLUME_BLUETOOTH_SCO); |
| 4813 | PUBLIC_SETTINGS.add(VOLUME_ASSISTANT); |
| 4814 | PUBLIC_SETTINGS.add(RINGTONE); |
| 4815 | PUBLIC_SETTINGS.add(NOTIFICATION_SOUND); |
| 4816 | PUBLIC_SETTINGS.add(ALARM_ALERT); |
| 4817 | PUBLIC_SETTINGS.add(TEXT_AUTO_REPLACE); |
| 4818 | PUBLIC_SETTINGS.add(TEXT_AUTO_CAPS); |
| 4819 | PUBLIC_SETTINGS.add(TEXT_AUTO_PUNCTUATE); |
| 4820 | PUBLIC_SETTINGS.add(TEXT_SHOW_PASSWORD); |
| 4821 | PUBLIC_SETTINGS.add(SHOW_GTALK_SERVICE_STATUS); |
| 4822 | PUBLIC_SETTINGS.add(WALLPAPER_ACTIVITY); |
| 4823 | PUBLIC_SETTINGS.add(TIME_12_24); |
| 4824 | PUBLIC_SETTINGS.add(DATE_FORMAT); |
| 4825 | PUBLIC_SETTINGS.add(SETUP_WIZARD_HAS_RUN); |
| 4826 | PUBLIC_SETTINGS.add(ACCELEROMETER_ROTATION); |
| 4827 | PUBLIC_SETTINGS.add(USER_ROTATION); |
| 4828 | PUBLIC_SETTINGS.add(DTMF_TONE_WHEN_DIALING); |
| 4829 | PUBLIC_SETTINGS.add(SOUND_EFFECTS_ENABLED); |
| 4830 | PUBLIC_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED); |
| 4831 | PUBLIC_SETTINGS.add(SHOW_WEB_SUGGESTIONS); |
| 4832 | PUBLIC_SETTINGS.add(VIBRATE_WHEN_RINGING); |
| 4833 | } |
| 4834 | |
| 4835 | /** |
| 4836 | * These are all hidden system settings. |
| 4837 | * |
| 4838 | * @hide |
| 4839 | */ |
| 4840 | @UnsupportedAppUsage |
| 4841 | public static final Set<String> PRIVATE_SETTINGS = new ArraySet<>(); |
| 4842 | static { |
| 4843 | PRIVATE_SETTINGS.add(WIFI_USE_STATIC_IP); |
| 4844 | PRIVATE_SETTINGS.add(END_BUTTON_BEHAVIOR); |
| 4845 | PRIVATE_SETTINGS.add(ADVANCED_SETTINGS); |
| 4846 | PRIVATE_SETTINGS.add(SCREEN_AUTO_BRIGHTNESS_ADJ); |
| 4847 | PRIVATE_SETTINGS.add(VIBRATE_INPUT_DEVICES); |
| 4848 | PRIVATE_SETTINGS.add(VOLUME_MASTER); |
| 4849 | PRIVATE_SETTINGS.add(MASTER_MONO); |
| 4850 | PRIVATE_SETTINGS.add(MASTER_BALANCE); |
| 4851 | PRIVATE_SETTINGS.add(NOTIFICATIONS_USE_RING_VOLUME); |
| 4852 | PRIVATE_SETTINGS.add(VIBRATE_IN_SILENT); |
| 4853 | PRIVATE_SETTINGS.add(MEDIA_BUTTON_RECEIVER); |
| 4854 | PRIVATE_SETTINGS.add(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY); |
| 4855 | PRIVATE_SETTINGS.add(DTMF_TONE_TYPE_WHEN_DIALING); |
| 4856 | PRIVATE_SETTINGS.add(HEARING_AID); |
| 4857 | PRIVATE_SETTINGS.add(TTY_MODE); |
| 4858 | PRIVATE_SETTINGS.add(NOTIFICATION_LIGHT_PULSE); |
| 4859 | PRIVATE_SETTINGS.add(POINTER_LOCATION); |
| 4860 | PRIVATE_SETTINGS.add(SHOW_TOUCHES); |
| 4861 | PRIVATE_SETTINGS.add(WINDOW_ORIENTATION_LISTENER_LOG); |
| 4862 | PRIVATE_SETTINGS.add(POWER_SOUNDS_ENABLED); |
| 4863 | PRIVATE_SETTINGS.add(DOCK_SOUNDS_ENABLED); |
| 4864 | PRIVATE_SETTINGS.add(LOCKSCREEN_SOUNDS_ENABLED); |
| 4865 | PRIVATE_SETTINGS.add(LOCKSCREEN_DISABLED); |
| 4866 | PRIVATE_SETTINGS.add(LOW_BATTERY_SOUND); |
| 4867 | PRIVATE_SETTINGS.add(DESK_DOCK_SOUND); |
| 4868 | PRIVATE_SETTINGS.add(DESK_UNDOCK_SOUND); |
| 4869 | PRIVATE_SETTINGS.add(CAR_DOCK_SOUND); |
| 4870 | PRIVATE_SETTINGS.add(CAR_UNDOCK_SOUND); |
| 4871 | PRIVATE_SETTINGS.add(LOCK_SOUND); |
| 4872 | PRIVATE_SETTINGS.add(UNLOCK_SOUND); |
| 4873 | PRIVATE_SETTINGS.add(SIP_RECEIVE_CALLS); |
| 4874 | PRIVATE_SETTINGS.add(SIP_CALL_OPTIONS); |
| 4875 | PRIVATE_SETTINGS.add(SIP_ALWAYS); |
| 4876 | PRIVATE_SETTINGS.add(SIP_ADDRESS_ONLY); |
| 4877 | PRIVATE_SETTINGS.add(SIP_ASK_ME_EACH_TIME); |
| 4878 | PRIVATE_SETTINGS.add(POINTER_SPEED); |
| 4879 | PRIVATE_SETTINGS.add(LOCK_TO_APP_ENABLED); |
| 4880 | PRIVATE_SETTINGS.add(EGG_MODE); |
| 4881 | PRIVATE_SETTINGS.add(SHOW_BATTERY_PERCENT); |
| 4882 | PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE); |
| 4883 | } |
| 4884 | |
| 4885 | /** |
| 4886 | * These entries are considered common between the personal and the managed profile, |
| 4887 | * since the managed profile doesn't get to change them. |
| 4888 | */ |
| 4889 | @UnsupportedAppUsage |
| 4890 | private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>(); |
| 4891 | static { |
| 4892 | CLONE_TO_MANAGED_PROFILE.add(DATE_FORMAT); |
| 4893 | CLONE_TO_MANAGED_PROFILE.add(HAPTIC_FEEDBACK_ENABLED); |
| 4894 | CLONE_TO_MANAGED_PROFILE.add(SOUND_EFFECTS_ENABLED); |
| 4895 | CLONE_TO_MANAGED_PROFILE.add(TEXT_SHOW_PASSWORD); |
| 4896 | CLONE_TO_MANAGED_PROFILE.add(TIME_12_24); |
| 4897 | } |
| 4898 | |
| 4899 | /** @hide */ |
| 4900 | public static void getCloneToManagedProfileSettings(Set<String> outKeySet) { |
| 4901 | outKeySet.addAll(CLONE_TO_MANAGED_PROFILE); |
| 4902 | } |
| 4903 | |
| 4904 | /** |
| 4905 | * These entries should be cloned from this profile's parent only if the dependency's |
| 4906 | * value is true ("1") |
| 4907 | * |
| 4908 | * Note: the dependencies must be Secure settings |
| 4909 | * |
| 4910 | * @hide |
| 4911 | */ |
| 4912 | public static final Map<String, String> CLONE_FROM_PARENT_ON_VALUE = new ArrayMap<>(); |
| 4913 | static { |
| 4914 | CLONE_FROM_PARENT_ON_VALUE.put(RINGTONE, Secure.SYNC_PARENT_SOUNDS); |
| 4915 | CLONE_FROM_PARENT_ON_VALUE.put(NOTIFICATION_SOUND, Secure.SYNC_PARENT_SOUNDS); |
| 4916 | CLONE_FROM_PARENT_ON_VALUE.put(ALARM_ALERT, Secure.SYNC_PARENT_SOUNDS); |
| 4917 | } |
| 4918 | |
| 4919 | /** @hide */ |
| 4920 | public static void getCloneFromParentOnValueSettings(Map<String, String> outMap) { |
| 4921 | outMap.putAll(CLONE_FROM_PARENT_ON_VALUE); |
| 4922 | } |
| 4923 | |
| 4924 | /** |
| 4925 | * System settings which can be accessed by instant apps. |
| 4926 | * @hide |
| 4927 | */ |
| 4928 | public static final Set<String> INSTANT_APP_SETTINGS = new ArraySet<>(); |
| 4929 | static { |
| 4930 | INSTANT_APP_SETTINGS.add(TEXT_AUTO_REPLACE); |
| 4931 | INSTANT_APP_SETTINGS.add(TEXT_AUTO_CAPS); |
| 4932 | INSTANT_APP_SETTINGS.add(TEXT_AUTO_PUNCTUATE); |
| 4933 | INSTANT_APP_SETTINGS.add(TEXT_SHOW_PASSWORD); |
| 4934 | INSTANT_APP_SETTINGS.add(DATE_FORMAT); |
| 4935 | INSTANT_APP_SETTINGS.add(FONT_SCALE); |
| 4936 | INSTANT_APP_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED); |
| 4937 | INSTANT_APP_SETTINGS.add(TIME_12_24); |
| 4938 | INSTANT_APP_SETTINGS.add(SOUND_EFFECTS_ENABLED); |
| 4939 | INSTANT_APP_SETTINGS.add(ACCELEROMETER_ROTATION); |
| 4940 | } |
| 4941 | |
| 4942 | /** |
| 4943 | * When to use Wi-Fi calling |
| 4944 | * |
| 4945 | * @see android.telephony.TelephonyManager.WifiCallingChoices |
| 4946 | * @hide |
| 4947 | */ |
| 4948 | public static final String WHEN_TO_MAKE_WIFI_CALLS = "when_to_make_wifi_calls"; |
| 4949 | |
| 4950 | // Settings moved to Settings.Secure |
| 4951 | |
| 4952 | /** |
| 4953 | * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} |
| 4954 | * instead |
| 4955 | */ |
| 4956 | @Deprecated |
| 4957 | public static final String ADB_ENABLED = Global.ADB_ENABLED; |
| 4958 | |
| 4959 | /** |
| 4960 | * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead |
| 4961 | */ |
| 4962 | @Deprecated |
| 4963 | public static final String ANDROID_ID = Secure.ANDROID_ID; |
| 4964 | |
| 4965 | /** |
| 4966 | * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead |
| 4967 | */ |
| 4968 | @Deprecated |
| 4969 | public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; |
| 4970 | |
| 4971 | /** |
| 4972 | * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead |
| 4973 | */ |
| 4974 | @Deprecated |
| 4975 | public static final String DATA_ROAMING = Global.DATA_ROAMING; |
| 4976 | |
| 4977 | /** |
| 4978 | * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead |
| 4979 | */ |
| 4980 | @Deprecated |
| 4981 | public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; |
| 4982 | |
| 4983 | /** |
| 4984 | * @deprecated Use {@link android.provider.Settings.Global#HTTP_PROXY} instead |
| 4985 | */ |
| 4986 | @Deprecated |
| 4987 | public static final String HTTP_PROXY = Global.HTTP_PROXY; |
| 4988 | |
| 4989 | /** |
| 4990 | * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead |
| 4991 | */ |
| 4992 | @Deprecated |
| 4993 | public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; |
| 4994 | |
| 4995 | /** |
| 4996 | * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED} |
| 4997 | * instead |
| 4998 | */ |
| 4999 | @Deprecated |
| 5000 | public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED; |
| 5001 | |
| 5002 | /** |
| 5003 | * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead |
| 5004 | */ |
| 5005 | @Deprecated |
| 5006 | public static final String LOGGING_ID = Secure.LOGGING_ID; |
| 5007 | |
| 5008 | /** |
| 5009 | * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead |
| 5010 | */ |
| 5011 | @Deprecated |
| 5012 | public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; |
| 5013 | |
| 5014 | /** |
| 5015 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED} |
| 5016 | * instead |
| 5017 | */ |
| 5018 | @Deprecated |
| 5019 | public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED; |
| 5020 | |
| 5021 | /** |
| 5022 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE} |
| 5023 | * instead |
| 5024 | */ |
| 5025 | @Deprecated |
| 5026 | public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE; |
| 5027 | |
| 5028 | /** |
| 5029 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL} |
| 5030 | * instead |
| 5031 | */ |
| 5032 | @Deprecated |
| 5033 | public static final String PARENTAL_CONTROL_REDIRECT_URL = |
| 5034 | Secure.PARENTAL_CONTROL_REDIRECT_URL; |
| 5035 | |
| 5036 | /** |
| 5037 | * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead |
| 5038 | */ |
| 5039 | @Deprecated |
| 5040 | public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME; |
| 5041 | |
| 5042 | /** |
| 5043 | * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead |
| 5044 | */ |
| 5045 | @Deprecated |
| 5046 | public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; |
| 5047 | |
| 5048 | /** |
| 5049 | * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead |
| 5050 | */ |
| 5051 | @Deprecated |
| 5052 | public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; |
| 5053 | |
| 5054 | /** |
| 5055 | * @deprecated Use |
| 5056 | * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead |
| 5057 | */ |
| 5058 | @Deprecated |
| 5059 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; |
| 5060 | |
| 5061 | /** |
| 5062 | * @deprecated Use |
| 5063 | * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead |
| 5064 | */ |
| 5065 | @Deprecated |
| 5066 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
| 5067 | Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; |
| 5068 | |
| 5069 | /** |
| 5070 | * @deprecated Use |
| 5071 | * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead |
| 5072 | */ |
| 5073 | @Deprecated |
| 5074 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 5075 | Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; |
| 5076 | |
| 5077 | /** |
| 5078 | * @deprecated Use |
| 5079 | * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead |
| 5080 | */ |
| 5081 | @Deprecated |
| 5082 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
| 5083 | Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; |
| 5084 | |
| 5085 | /** |
| 5086 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} |
| 5087 | * instead |
| 5088 | */ |
| 5089 | @Deprecated |
| 5090 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = Global.WIFI_NUM_OPEN_NETWORKS_KEPT; |
| 5091 | |
| 5092 | /** |
| 5093 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead |
| 5094 | */ |
| 5095 | @Deprecated |
| 5096 | public static final String WIFI_ON = Global.WIFI_ON; |
| 5097 | |
| 5098 | /** |
| 5099 | * @deprecated Use |
| 5100 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE} |
| 5101 | * instead |
| 5102 | */ |
| 5103 | @Deprecated |
| 5104 | public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = |
| 5105 | Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE; |
| 5106 | |
| 5107 | /** |
| 5108 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead |
| 5109 | */ |
| 5110 | @Deprecated |
| 5111 | public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT; |
| 5112 | |
| 5113 | /** |
| 5114 | * @deprecated Use |
| 5115 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead |
| 5116 | */ |
| 5117 | @Deprecated |
| 5118 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = |
| 5119 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS; |
| 5120 | |
| 5121 | /** |
| 5122 | * @deprecated Use |
| 5123 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead |
| 5124 | */ |
| 5125 | @Deprecated |
| 5126 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = |
| 5127 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED; |
| 5128 | |
| 5129 | /** |
| 5130 | * @deprecated Use |
| 5131 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS} |
| 5132 | * instead |
| 5133 | */ |
| 5134 | @Deprecated |
| 5135 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = |
| 5136 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS; |
| 5137 | |
| 5138 | /** |
| 5139 | * @deprecated Use |
| 5140 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead |
| 5141 | */ |
| 5142 | @Deprecated |
| 5143 | public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = |
| 5144 | Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT; |
| 5145 | |
| 5146 | /** |
| 5147 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS} |
| 5148 | * instead |
| 5149 | */ |
| 5150 | @Deprecated |
| 5151 | public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS; |
| 5152 | |
| 5153 | /** |
| 5154 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead |
| 5155 | */ |
| 5156 | @Deprecated |
| 5157 | public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON; |
| 5158 | |
| 5159 | /** |
| 5160 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead |
| 5161 | */ |
| 5162 | @Deprecated |
| 5163 | public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT; |
| 5164 | |
| 5165 | /** |
| 5166 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS} |
| 5167 | * instead |
| 5168 | */ |
| 5169 | @Deprecated |
| 5170 | public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS; |
| 5171 | |
| 5172 | /** |
| 5173 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS} |
| 5174 | * instead |
| 5175 | */ |
| 5176 | @Deprecated |
| 5177 | public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = |
| 5178 | Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS; |
| 5179 | |
| 5180 | /** |
| 5181 | * Checks if the specified app can modify system settings. As of API |
| 5182 | * level 23, an app cannot modify system settings unless it declares the |
| 5183 | * {@link android.Manifest.permission#WRITE_SETTINGS} |
| 5184 | * permission in its manifest, <em>and</em> the user specifically grants |
| 5185 | * the app this capability. To prompt the user to grant this approval, |
| 5186 | * the app must send an intent with the action {@link |
| 5187 | * android.provider.Settings#ACTION_MANAGE_WRITE_SETTINGS}, which causes |
| 5188 | * the system to display a permission management screen. |
| 5189 | * |
| 5190 | * @param context App context. |
| 5191 | * @return true if the calling app can write to system settings, false otherwise |
| 5192 | */ |
| 5193 | public static boolean canWrite(Context context) { |
| 5194 | return isCallingPackageAllowedToWriteSettings(context, Process.myUid(), |
| 5195 | context.getOpPackageName(), false); |
| 5196 | } |
| 5197 | } |
| 5198 | |
| 5199 | /** |
| 5200 | * Secure system settings, containing system preferences that applications |
| 5201 | * can read but are not allowed to write. These are for preferences that |
| 5202 | * the user must explicitly modify through the system UI or specialized |
| 5203 | * APIs for those values, not modified directly by applications. |
| 5204 | */ |
| 5205 | public static final class Secure extends NameValueTable { |
| 5206 | // NOTE: If you add new settings here, be sure to add them to |
| 5207 | // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoSecureSettingsLocked. |
| 5208 | |
| 5209 | /** |
| 5210 | * The content:// style URL for this table |
| 5211 | */ |
| 5212 | public static final Uri CONTENT_URI = |
| 5213 | Uri.parse("content://" + AUTHORITY + "/secure"); |
| 5214 | |
| 5215 | @UnsupportedAppUsage |
| 5216 | private static final ContentProviderHolder sProviderHolder = |
| 5217 | new ContentProviderHolder(CONTENT_URI); |
| 5218 | |
| 5219 | // Populated lazily, guarded by class object: |
| 5220 | @UnsupportedAppUsage |
| 5221 | private static final NameValueCache sNameValueCache = new NameValueCache( |
| 5222 | CONTENT_URI, |
| 5223 | CALL_METHOD_GET_SECURE, |
| 5224 | CALL_METHOD_PUT_SECURE, |
| 5225 | sProviderHolder); |
| 5226 | |
| 5227 | private static ILockSettings sLockSettings = null; |
| 5228 | |
| 5229 | private static boolean sIsSystemProcess; |
| 5230 | @UnsupportedAppUsage |
| 5231 | private static final HashSet<String> MOVED_TO_LOCK_SETTINGS; |
| 5232 | @UnsupportedAppUsage |
| 5233 | private static final HashSet<String> MOVED_TO_GLOBAL; |
| 5234 | static { |
| 5235 | MOVED_TO_LOCK_SETTINGS = new HashSet<>(3); |
| 5236 | MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED); |
| 5237 | MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE); |
| 5238 | MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); |
| 5239 | |
| 5240 | MOVED_TO_GLOBAL = new HashSet<>(); |
| 5241 | MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED); |
| 5242 | MOVED_TO_GLOBAL.add(Settings.Global.ASSISTED_GPS_ENABLED); |
| 5243 | MOVED_TO_GLOBAL.add(Settings.Global.BLUETOOTH_ON); |
| 5244 | MOVED_TO_GLOBAL.add(Settings.Global.BUGREPORT_IN_POWER_MENU); |
| 5245 | MOVED_TO_GLOBAL.add(Settings.Global.CDMA_CELL_BROADCAST_SMS); |
| 5246 | MOVED_TO_GLOBAL.add(Settings.Global.CDMA_ROAMING_MODE); |
| 5247 | MOVED_TO_GLOBAL.add(Settings.Global.CDMA_SUBSCRIPTION_MODE); |
| 5248 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE); |
| 5249 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI); |
| 5250 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_ROAMING); |
| 5251 | MOVED_TO_GLOBAL.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED); |
| 5252 | MOVED_TO_GLOBAL.add(Settings.Global.DEVICE_PROVISIONED); |
| 5253 | MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_SIZE_FORCED); |
| 5254 | MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE); |
| 5255 | MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE); |
| 5256 | MOVED_TO_GLOBAL.add(Settings.Global.MOBILE_DATA); |
| 5257 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION); |
| 5258 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_DELETE_AGE); |
| 5259 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES); |
| 5260 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE); |
| 5261 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_ENABLED); |
| 5262 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES); |
| 5263 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_POLL_INTERVAL); |
| 5264 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_SAMPLE_ENABLED); |
| 5265 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE); |
| 5266 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION); |
| 5267 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_DELETE_AGE); |
| 5268 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES); |
| 5269 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_ROTATE_AGE); |
| 5270 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION); |
| 5271 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE); |
| 5272 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES); |
| 5273 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE); |
| 5274 | MOVED_TO_GLOBAL.add(Settings.Global.NETWORK_PREFERENCE); |
| 5275 | MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_DIFF); |
| 5276 | MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING); |
| 5277 | MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER); |
| 5278 | MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT); |
| 5279 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT); |
| 5280 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS); |
| 5281 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT); |
| 5282 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS); |
| 5283 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT); |
| 5284 | MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL); |
| 5285 | MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST); |
| 5286 | MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL); |
| 5287 | MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_APN); |
| 5288 | MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_REQUIRED); |
| 5289 | MOVED_TO_GLOBAL.add(Settings.Global.TETHER_SUPPORTED); |
| 5290 | MOVED_TO_GLOBAL.add(Settings.Global.USB_MASS_STORAGE_ENABLED); |
| 5291 | MOVED_TO_GLOBAL.add(Settings.Global.USE_GOOGLE_MAIL); |
| 5292 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_COUNTRY_CODE); |
| 5293 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS); |
| 5294 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FREQUENCY_BAND); |
| 5295 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_IDLE_MS); |
| 5296 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT); |
| 5297 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS); |
| 5298 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); |
| 5299 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); |
| 5300 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT); |
| 5301 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON); |
| 5302 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME); |
| 5303 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS); |
| 5304 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED); |
| 5305 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ENHANCED_AUTO_JOIN); |
| 5306 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORK_SHOW_RSSI); |
| 5307 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_ON); |
| 5308 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED); |
| 5309 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_PENDING_FACTORY_RESET); |
| 5310 | MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON); |
| 5311 | MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT); |
| 5312 | MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE); |
| 5313 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS); |
| 5314 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS); |
| 5315 | MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS); |
| 5316 | MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL); |
| 5317 | MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD); |
| 5318 | MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_THRESHOLD); |
| 5319 | MOVED_TO_GLOBAL.add(Settings.Global.SEND_ACTION_APP_ERROR); |
| 5320 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_AGE_SECONDS); |
| 5321 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_MAX_FILES); |
| 5322 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_KB); |
| 5323 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_PERCENT); |
| 5324 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_RESERVE_PERCENT); |
| 5325 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_TAG_PREFIX); |
| 5326 | MOVED_TO_GLOBAL.add(Settings.Global.ERROR_LOGCAT_PREFIX); |
| 5327 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL); |
| 5328 | MOVED_TO_GLOBAL.add(Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD); |
| 5329 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE); |
| 5330 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES); |
| 5331 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES); |
| 5332 | MOVED_TO_GLOBAL.add(Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS); |
| 5333 | MOVED_TO_GLOBAL.add(Settings.Global.CONNECTIVITY_CHANGE_DELAY); |
| 5334 | MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED); |
| 5335 | MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_SERVER); |
| 5336 | MOVED_TO_GLOBAL.add(Settings.Global.NSD_ON); |
| 5337 | MOVED_TO_GLOBAL.add(Settings.Global.SET_INSTALL_LOCATION); |
| 5338 | MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_INSTALL_LOCATION); |
| 5339 | MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY); |
| 5340 | MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY); |
| 5341 | MOVED_TO_GLOBAL.add(Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT); |
| 5342 | MOVED_TO_GLOBAL.add(Settings.Global.HTTP_PROXY); |
| 5343 | MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_HOST); |
| 5344 | MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_PORT); |
| 5345 | MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST); |
| 5346 | MOVED_TO_GLOBAL.add(Settings.Global.SET_GLOBAL_HTTP_PROXY); |
| 5347 | MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER); |
| 5348 | MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE); |
| 5349 | MOVED_TO_GLOBAL.add(Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY); |
| 5350 | } |
| 5351 | |
| 5352 | /** @hide */ |
| 5353 | public static void getMovedToGlobalSettings(Set<String> outKeySet) { |
| 5354 | outKeySet.addAll(MOVED_TO_GLOBAL); |
| 5355 | } |
| 5356 | |
| 5357 | /** @hide */ |
| 5358 | public static void clearProviderForTest() { |
| 5359 | sProviderHolder.clearProviderForTest(); |
| 5360 | sNameValueCache.clearGenerationTrackerForTest(); |
| 5361 | } |
| 5362 | |
| 5363 | /** |
| 5364 | * Look up a name in the database. |
| 5365 | * @param resolver to access the database with |
| 5366 | * @param name to look up in the table |
| 5367 | * @return the corresponding value, or null if not present |
| 5368 | */ |
| 5369 | public static String getString(ContentResolver resolver, String name) { |
| 5370 | return getStringForUser(resolver, name, resolver.getUserId()); |
| 5371 | } |
| 5372 | |
| 5373 | /** @hide */ |
| 5374 | @UnsupportedAppUsage |
| 5375 | public static String getStringForUser(ContentResolver resolver, String name, |
| 5376 | int userHandle) { |
| 5377 | if (MOVED_TO_GLOBAL.contains(name)) { |
| 5378 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" |
| 5379 | + " to android.provider.Settings.Global."); |
| 5380 | return Global.getStringForUser(resolver, name, userHandle); |
| 5381 | } |
| 5382 | |
| 5383 | if (MOVED_TO_LOCK_SETTINGS.contains(name)) { |
| 5384 | synchronized (Secure.class) { |
| 5385 | if (sLockSettings == null) { |
| 5386 | sLockSettings = ILockSettings.Stub.asInterface( |
| 5387 | (IBinder) ServiceManager.getService("lock_settings")); |
| 5388 | sIsSystemProcess = Process.myUid() == Process.SYSTEM_UID; |
| 5389 | } |
| 5390 | } |
| 5391 | if (sLockSettings != null && !sIsSystemProcess) { |
| 5392 | // No context; use the ActivityThread's context as an approximation for |
| 5393 | // determining the target API level. |
| 5394 | Application application = ActivityThread.currentApplication(); |
| 5395 | |
| 5396 | boolean isPreMnc = application != null |
| 5397 | && application.getApplicationInfo() != null |
| 5398 | && application.getApplicationInfo().targetSdkVersion |
| 5399 | <= VERSION_CODES.LOLLIPOP_MR1; |
| 5400 | if (isPreMnc) { |
| 5401 | try { |
| 5402 | return sLockSettings.getString(name, "0", userHandle); |
| 5403 | } catch (RemoteException re) { |
| 5404 | // Fall through |
| 5405 | } |
| 5406 | } else { |
| 5407 | throw new SecurityException("Settings.Secure." + name |
| 5408 | + " is deprecated and no longer accessible." |
| 5409 | + " See API documentation for potential replacements."); |
| 5410 | } |
| 5411 | } |
| 5412 | } |
| 5413 | |
| 5414 | return sNameValueCache.getStringForUser(resolver, name, userHandle); |
| 5415 | } |
| 5416 | |
| 5417 | /** |
| 5418 | * Store a name/value pair into the database. Values written by this method will be |
| 5419 | * overridden if a restore happens in the future. |
| 5420 | * |
| 5421 | * @param resolver to access the database with |
| 5422 | * @param name to store |
| 5423 | * @param value to associate with the name |
| 5424 | * @return true if the value was set, false on database errors |
| 5425 | * |
| 5426 | * @hide |
| 5427 | */ |
| 5428 | @RequiresPermission(Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) |
| 5429 | public static boolean putString(ContentResolver resolver, String name, |
| 5430 | String value, boolean overrideableByRestore) { |
| 5431 | return putStringForUser(resolver, name, value, /* tag */ null, /* makeDefault */ false, |
| 5432 | resolver.getUserId(), overrideableByRestore); |
| 5433 | } |
| 5434 | |
| 5435 | /** |
| 5436 | * Store a name/value pair into the database. |
| 5437 | * @param resolver to access the database with |
| 5438 | * @param name to store |
| 5439 | * @param value to associate with the name |
| 5440 | * @return true if the value was set, false on database errors |
| 5441 | */ |
| 5442 | public static boolean putString(ContentResolver resolver, String name, String value) { |
| 5443 | return putStringForUser(resolver, name, value, resolver.getUserId()); |
| 5444 | } |
| 5445 | |
| 5446 | /** @hide */ |
| 5447 | @UnsupportedAppUsage |
| 5448 | public static boolean putStringForUser(ContentResolver resolver, String name, String value, |
| 5449 | int userHandle) { |
| 5450 | return putStringForUser(resolver, name, value, null, false, userHandle, |
| 5451 | DEFAULT_OVERRIDEABLE_BY_RESTORE); |
| 5452 | } |
| 5453 | |
| 5454 | /** @hide */ |
| 5455 | @UnsupportedAppUsage |
| 5456 | public static boolean putStringForUser(@NonNull ContentResolver resolver, |
| 5457 | @NonNull String name, @Nullable String value, @Nullable String tag, |
| 5458 | boolean makeDefault, @UserIdInt int userHandle, boolean overrideableByRestore) { |
| 5459 | if (MOVED_TO_GLOBAL.contains(name)) { |
| 5460 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" |
| 5461 | + " to android.provider.Settings.Global"); |
| 5462 | return Global.putStringForUser(resolver, name, value, |
| 5463 | tag, makeDefault, userHandle, DEFAULT_OVERRIDEABLE_BY_RESTORE); |
| 5464 | } |
| 5465 | return sNameValueCache.putStringForUser(resolver, name, value, tag, |
| 5466 | makeDefault, userHandle, overrideableByRestore); |
| 5467 | } |
| 5468 | |
| 5469 | /** |
| 5470 | * Store a name/value pair into the database. |
| 5471 | * <p> |
| 5472 | * The method takes an optional tag to associate with the setting |
| 5473 | * which can be used to clear only settings made by your package and |
| 5474 | * associated with this tag by passing the tag to {@link |
| 5475 | * #resetToDefaults(ContentResolver, String)}. Anyone can override |
| 5476 | * the current tag. Also if another package changes the setting |
| 5477 | * then the tag will be set to the one specified in the set call |
| 5478 | * which can be null. Also any of the settings setters that do not |
| 5479 | * take a tag as an argument effectively clears the tag. |
| 5480 | * </p><p> |
| 5481 | * For example, if you set settings A and B with tags T1 and T2 and |
| 5482 | * another app changes setting A (potentially to the same value), it |
| 5483 | * can assign to it a tag T3 (note that now the package that changed |
| 5484 | * the setting is not yours). Now if you reset your changes for T1 and |
| 5485 | * T2 only setting B will be reset and A not (as it was changed by |
| 5486 | * another package) but since A did not change you are in the desired |
| 5487 | * initial state. Now if the other app changes the value of A (assuming |
| 5488 | * you registered an observer in the beginning) you would detect that |
| 5489 | * the setting was changed by another app and handle this appropriately |
| 5490 | * (ignore, set back to some value, etc). |
| 5491 | * </p><p> |
| 5492 | * Also the method takes an argument whether to make the value the |
| 5493 | * default for this setting. If the system already specified a default |
| 5494 | * value, then the one passed in here will <strong>not</strong> |
| 5495 | * be set as the default. |
| 5496 | * </p> |
| 5497 | * |
| 5498 | * @param resolver to access the database with. |
| 5499 | * @param name to store. |
| 5500 | * @param value to associate with the name. |
| 5501 | * @param tag to associate with the setting. |
| 5502 | * @param makeDefault whether to make the value the default one. |
| 5503 | * @return true if the value was set, false on database errors. |
| 5504 | * |
| 5505 | * @see #resetToDefaults(ContentResolver, String) |
| 5506 | * |
| 5507 | * @hide |
| 5508 | */ |
| 5509 | @SystemApi |
| 5510 | @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) |
| 5511 | public static boolean putString(@NonNull ContentResolver resolver, |
| 5512 | @NonNull String name, @Nullable String value, @Nullable String tag, |
| 5513 | boolean makeDefault) { |
| 5514 | return putStringForUser(resolver, name, value, tag, makeDefault, |
| 5515 | resolver.getUserId(), DEFAULT_OVERRIDEABLE_BY_RESTORE); |
| 5516 | } |
| 5517 | |
| 5518 | /** |
| 5519 | * Reset the settings to their defaults. This would reset <strong>only</strong> |
| 5520 | * settings set by the caller's package. Think of it of a way to undo your own |
| 5521 | * changes to the global settings. Passing in the optional tag will reset only |
| 5522 | * settings changed by your package and associated with this tag. |
| 5523 | * |
| 5524 | * @param resolver Handle to the content resolver. |
| 5525 | * @param tag Optional tag which should be associated with the settings to reset. |
| 5526 | * |
| 5527 | * @see #putString(ContentResolver, String, String, String, boolean) |
| 5528 | * |
| 5529 | * @hide |
| 5530 | */ |
| 5531 | @SystemApi |
| 5532 | @TestApi |
| 5533 | @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) |
| 5534 | public static void resetToDefaults(@NonNull ContentResolver resolver, |
| 5535 | @Nullable String tag) { |
| 5536 | resetToDefaultsAsUser(resolver, tag, RESET_MODE_PACKAGE_DEFAULTS, |
| 5537 | resolver.getUserId()); |
| 5538 | } |
| 5539 | |
| 5540 | /** |
| 5541 | * |
| 5542 | * Reset the settings to their defaults for a given user with a specific mode. The |
| 5543 | * optional tag argument is valid only for {@link #RESET_MODE_PACKAGE_DEFAULTS} |
| 5544 | * allowing resetting the settings made by a package and associated with the tag. |
| 5545 | * |
| 5546 | * @param resolver Handle to the content resolver. |
| 5547 | * @param tag Optional tag which should be associated with the settings to reset. |
| 5548 | * @param mode The reset mode. |
| 5549 | * @param userHandle The user for which to reset to defaults. |
| 5550 | * |
| 5551 | * @see #RESET_MODE_PACKAGE_DEFAULTS |
| 5552 | * @see #RESET_MODE_UNTRUSTED_DEFAULTS |
| 5553 | * @see #RESET_MODE_UNTRUSTED_CHANGES |
| 5554 | * @see #RESET_MODE_TRUSTED_DEFAULTS |
| 5555 | * |
| 5556 | * @hide |
| 5557 | */ |
| 5558 | public static void resetToDefaultsAsUser(@NonNull ContentResolver resolver, |
| 5559 | @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle) { |
| 5560 | try { |
| 5561 | Bundle arg = new Bundle(); |
| 5562 | arg.putInt(CALL_METHOD_USER_KEY, userHandle); |
| 5563 | if (tag != null) { |
| 5564 | arg.putString(CALL_METHOD_TAG_KEY, tag); |
| 5565 | } |
| 5566 | arg.putInt(CALL_METHOD_RESET_MODE_KEY, mode); |
| 5567 | IContentProvider cp = sProviderHolder.getProvider(resolver); |
| 5568 | cp.call(resolver.getPackageName(), resolver.getAttributionTag(), |
| 5569 | sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_SECURE, null, arg); |
| 5570 | } catch (RemoteException e) { |
| 5571 | Log.w(TAG, "Can't reset do defaults for " + CONTENT_URI, e); |
| 5572 | } |
| 5573 | } |
| 5574 | |
| 5575 | /** |
| 5576 | * Construct the content URI for a particular name/value pair, |
| 5577 | * useful for monitoring changes with a ContentObserver. |
| 5578 | * @param name to look up in the table |
| 5579 | * @return the corresponding content URI, or null if not present |
| 5580 | */ |
| 5581 | public static Uri getUriFor(String name) { |
| 5582 | if (MOVED_TO_GLOBAL.contains(name)) { |
| 5583 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" |
| 5584 | + " to android.provider.Settings.Global, returning global URI."); |
| 5585 | return Global.getUriFor(Global.CONTENT_URI, name); |
| 5586 | } |
| 5587 | return getUriFor(CONTENT_URI, name); |
| 5588 | } |
| 5589 | |
| 5590 | /** |
| 5591 | * Convenience function for retrieving a single secure settings value |
| 5592 | * as an integer. Note that internally setting values are always |
| 5593 | * stored as strings; this function converts the string to an integer |
| 5594 | * for you. The default value will be returned if the setting is |
| 5595 | * not defined or not an integer. |
| 5596 | * |
| 5597 | * @param cr The ContentResolver to access. |
| 5598 | * @param name The name of the setting to retrieve. |
| 5599 | * @param def Value to return if the setting is not defined. |
| 5600 | * |
| 5601 | * @return The setting's current value, or 'def' if it is not defined |
| 5602 | * or not a valid integer. |
| 5603 | */ |
| 5604 | public static int getInt(ContentResolver cr, String name, int def) { |
| 5605 | return getIntForUser(cr, name, def, cr.getUserId()); |
| 5606 | } |
| 5607 | |
| 5608 | /** @hide */ |
| 5609 | @UnsupportedAppUsage |
| 5610 | public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { |
| 5611 | String v = getStringForUser(cr, name, userHandle); |
| 5612 | try { |
| 5613 | return v != null ? Integer.parseInt(v) : def; |
| 5614 | } catch (NumberFormatException e) { |
| 5615 | return def; |
| 5616 | } |
| 5617 | } |
| 5618 | |
| 5619 | /** |
| 5620 | * Convenience function for retrieving a single secure settings value |
| 5621 | * as an integer. Note that internally setting values are always |
| 5622 | * stored as strings; this function converts the string to an integer |
| 5623 | * for you. |
| 5624 | * <p> |
| 5625 | * This version does not take a default value. If the setting has not |
| 5626 | * been set, or the string value is not a number, |
| 5627 | * it throws {@link SettingNotFoundException}. |
| 5628 | * |
| 5629 | * @param cr The ContentResolver to access. |
| 5630 | * @param name The name of the setting to retrieve. |
| 5631 | * |
| 5632 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 5633 | * name can't be found or the setting value is not an integer. |
| 5634 | * |
| 5635 | * @return The setting's current value. |
| 5636 | */ |
| 5637 | public static int getInt(ContentResolver cr, String name) |
| 5638 | throws SettingNotFoundException { |
| 5639 | return getIntForUser(cr, name, cr.getUserId()); |
| 5640 | } |
| 5641 | |
| 5642 | /** @hide */ |
| 5643 | public static int getIntForUser(ContentResolver cr, String name, int userHandle) |
| 5644 | throws SettingNotFoundException { |
| 5645 | String v = getStringForUser(cr, name, userHandle); |
| 5646 | try { |
| 5647 | return Integer.parseInt(v); |
| 5648 | } catch (NumberFormatException e) { |
| 5649 | throw new SettingNotFoundException(name); |
| 5650 | } |
| 5651 | } |
| 5652 | |
| 5653 | /** |
| 5654 | * Convenience function for updating a single settings value as an |
| 5655 | * integer. This will either create a new entry in the table if the |
| 5656 | * given name does not exist, or modify the value of the existing row |
| 5657 | * with that name. Note that internally setting values are always |
| 5658 | * stored as strings, so this function converts the given value to a |
| 5659 | * string before storing it. |
| 5660 | * |
| 5661 | * @param cr The ContentResolver to access. |
| 5662 | * @param name The name of the setting to modify. |
| 5663 | * @param value The new value for the setting. |
| 5664 | * @return true if the value was set, false on database errors |
| 5665 | */ |
| 5666 | public static boolean putInt(ContentResolver cr, String name, int value) { |
| 5667 | return putIntForUser(cr, name, value, cr.getUserId()); |
| 5668 | } |
| 5669 | |
| 5670 | /** @hide */ |
| 5671 | @UnsupportedAppUsage |
| 5672 | public static boolean putIntForUser(ContentResolver cr, String name, int value, |
| 5673 | int userHandle) { |
| 5674 | return putStringForUser(cr, name, Integer.toString(value), userHandle); |
| 5675 | } |
| 5676 | |
| 5677 | /** |
| 5678 | * Convenience function for retrieving a single secure settings value |
| 5679 | * as a {@code long}. Note that internally setting values are always |
| 5680 | * stored as strings; this function converts the string to a {@code long} |
| 5681 | * for you. The default value will be returned if the setting is |
| 5682 | * not defined or not a {@code long}. |
| 5683 | * |
| 5684 | * @param cr The ContentResolver to access. |
| 5685 | * @param name The name of the setting to retrieve. |
| 5686 | * @param def Value to return if the setting is not defined. |
| 5687 | * |
| 5688 | * @return The setting's current value, or 'def' if it is not defined |
| 5689 | * or not a valid {@code long}. |
| 5690 | */ |
| 5691 | public static long getLong(ContentResolver cr, String name, long def) { |
| 5692 | return getLongForUser(cr, name, def, cr.getUserId()); |
| 5693 | } |
| 5694 | |
| 5695 | /** @hide */ |
| 5696 | @UnsupportedAppUsage |
| 5697 | public static long getLongForUser(ContentResolver cr, String name, long def, |
| 5698 | int userHandle) { |
| 5699 | String valString = getStringForUser(cr, name, userHandle); |
| 5700 | long value; |
| 5701 | try { |
| 5702 | value = valString != null ? Long.parseLong(valString) : def; |
| 5703 | } catch (NumberFormatException e) { |
| 5704 | value = def; |
| 5705 | } |
| 5706 | return value; |
| 5707 | } |
| 5708 | |
| 5709 | /** |
| 5710 | * Convenience function for retrieving a single secure settings value |
| 5711 | * as a {@code long}. Note that internally setting values are always |
| 5712 | * stored as strings; this function converts the string to a {@code long} |
| 5713 | * for you. |
| 5714 | * <p> |
| 5715 | * This version does not take a default value. If the setting has not |
| 5716 | * been set, or the string value is not a number, |
| 5717 | * it throws {@link SettingNotFoundException}. |
| 5718 | * |
| 5719 | * @param cr The ContentResolver to access. |
| 5720 | * @param name The name of the setting to retrieve. |
| 5721 | * |
| 5722 | * @return The setting's current value. |
| 5723 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 5724 | * name can't be found or the setting value is not an integer. |
| 5725 | */ |
| 5726 | public static long getLong(ContentResolver cr, String name) |
| 5727 | throws SettingNotFoundException { |
| 5728 | return getLongForUser(cr, name, cr.getUserId()); |
| 5729 | } |
| 5730 | |
| 5731 | /** @hide */ |
| 5732 | public static long getLongForUser(ContentResolver cr, String name, int userHandle) |
| 5733 | throws SettingNotFoundException { |
| 5734 | String valString = getStringForUser(cr, name, userHandle); |
| 5735 | try { |
| 5736 | return Long.parseLong(valString); |
| 5737 | } catch (NumberFormatException e) { |
| 5738 | throw new SettingNotFoundException(name); |
| 5739 | } |
| 5740 | } |
| 5741 | |
| 5742 | /** |
| 5743 | * Convenience function for updating a secure settings value as a long |
| 5744 | * integer. This will either create a new entry in the table if the |
| 5745 | * given name does not exist, or modify the value of the existing row |
| 5746 | * with that name. Note that internally setting values are always |
| 5747 | * stored as strings, so this function converts the given value to a |
| 5748 | * string before storing it. |
| 5749 | * |
| 5750 | * @param cr The ContentResolver to access. |
| 5751 | * @param name The name of the setting to modify. |
| 5752 | * @param value The new value for the setting. |
| 5753 | * @return true if the value was set, false on database errors |
| 5754 | */ |
| 5755 | public static boolean putLong(ContentResolver cr, String name, long value) { |
| 5756 | return putLongForUser(cr, name, value, cr.getUserId()); |
| 5757 | } |
| 5758 | |
| 5759 | /** @hide */ |
| 5760 | @UnsupportedAppUsage |
| 5761 | public static boolean putLongForUser(ContentResolver cr, String name, long value, |
| 5762 | int userHandle) { |
| 5763 | return putStringForUser(cr, name, Long.toString(value), userHandle); |
| 5764 | } |
| 5765 | |
| 5766 | /** |
| 5767 | * Convenience function for retrieving a single secure settings value |
| 5768 | * as a floating point number. Note that internally setting values are |
| 5769 | * always stored as strings; this function converts the string to an |
| 5770 | * float for you. The default value will be returned if the setting |
| 5771 | * is not defined or not a valid float. |
| 5772 | * |
| 5773 | * @param cr The ContentResolver to access. |
| 5774 | * @param name The name of the setting to retrieve. |
| 5775 | * @param def Value to return if the setting is not defined. |
| 5776 | * |
| 5777 | * @return The setting's current value, or 'def' if it is not defined |
| 5778 | * or not a valid float. |
| 5779 | */ |
| 5780 | public static float getFloat(ContentResolver cr, String name, float def) { |
| 5781 | return getFloatForUser(cr, name, def, cr.getUserId()); |
| 5782 | } |
| 5783 | |
| 5784 | /** @hide */ |
| 5785 | public static float getFloatForUser(ContentResolver cr, String name, float def, |
| 5786 | int userHandle) { |
| 5787 | String v = getStringForUser(cr, name, userHandle); |
| 5788 | try { |
| 5789 | return v != null ? Float.parseFloat(v) : def; |
| 5790 | } catch (NumberFormatException e) { |
| 5791 | return def; |
| 5792 | } |
| 5793 | } |
| 5794 | |
| 5795 | /** |
| 5796 | * Convenience function for retrieving a single secure settings value |
| 5797 | * as a float. Note that internally setting values are always |
| 5798 | * stored as strings; this function converts the string to a float |
| 5799 | * for you. |
| 5800 | * <p> |
| 5801 | * This version does not take a default value. If the setting has not |
| 5802 | * been set, or the string value is not a number, |
| 5803 | * it throws {@link SettingNotFoundException}. |
| 5804 | * |
| 5805 | * @param cr The ContentResolver to access. |
| 5806 | * @param name The name of the setting to retrieve. |
| 5807 | * |
| 5808 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 5809 | * name can't be found or the setting value is not a float. |
| 5810 | * |
| 5811 | * @return The setting's current value. |
| 5812 | */ |
| 5813 | public static float getFloat(ContentResolver cr, String name) |
| 5814 | throws SettingNotFoundException { |
| 5815 | return getFloatForUser(cr, name, cr.getUserId()); |
| 5816 | } |
| 5817 | |
| 5818 | /** @hide */ |
| 5819 | public static float getFloatForUser(ContentResolver cr, String name, int userHandle) |
| 5820 | throws SettingNotFoundException { |
| 5821 | String v = getStringForUser(cr, name, userHandle); |
| 5822 | if (v == null) { |
| 5823 | throw new SettingNotFoundException(name); |
| 5824 | } |
| 5825 | try { |
| 5826 | return Float.parseFloat(v); |
| 5827 | } catch (NumberFormatException e) { |
| 5828 | throw new SettingNotFoundException(name); |
| 5829 | } |
| 5830 | } |
| 5831 | |
| 5832 | /** |
| 5833 | * Convenience function for updating a single settings value as a |
| 5834 | * floating point number. This will either create a new entry in the |
| 5835 | * table if the given name does not exist, or modify the value of the |
| 5836 | * existing row with that name. Note that internally setting values |
| 5837 | * are always stored as strings, so this function converts the given |
| 5838 | * value to a string before storing it. |
| 5839 | * |
| 5840 | * @param cr The ContentResolver to access. |
| 5841 | * @param name The name of the setting to modify. |
| 5842 | * @param value The new value for the setting. |
| 5843 | * @return true if the value was set, false on database errors |
| 5844 | */ |
| 5845 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
| 5846 | return putFloatForUser(cr, name, value, cr.getUserId()); |
| 5847 | } |
| 5848 | |
| 5849 | /** @hide */ |
| 5850 | public static boolean putFloatForUser(ContentResolver cr, String name, float value, |
| 5851 | int userHandle) { |
| 5852 | return putStringForUser(cr, name, Float.toString(value), userHandle); |
| 5853 | } |
| 5854 | |
| 5855 | /** |
| 5856 | * Control whether to enable adaptive sleep mode. |
| 5857 | * @hide |
| 5858 | */ |
| 5859 | public static final String ADAPTIVE_SLEEP = "adaptive_sleep"; |
| 5860 | |
| 5861 | /** |
| 5862 | * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED} |
| 5863 | * instead |
| 5864 | */ |
| 5865 | @Deprecated |
| 5866 | public static final String DEVELOPMENT_SETTINGS_ENABLED = |
| 5867 | Global.DEVELOPMENT_SETTINGS_ENABLED; |
| 5868 | |
| 5869 | /** |
| 5870 | * When the user has enable the option to have a "bug report" command |
| 5871 | * in the power menu. |
| 5872 | * @deprecated Use {@link android.provider.Settings.Global#BUGREPORT_IN_POWER_MENU} instead |
| 5873 | * @hide |
| 5874 | */ |
| 5875 | @Deprecated |
| 5876 | public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; |
| 5877 | |
| 5878 | /** |
| 5879 | * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} instead |
| 5880 | */ |
| 5881 | @Deprecated |
| 5882 | public static final String ADB_ENABLED = Global.ADB_ENABLED; |
| 5883 | |
| 5884 | /** |
| 5885 | * Setting to allow mock locations and location provider status to be injected into the |
| 5886 | * LocationManager service for testing purposes during application development. These |
| 5887 | * locations and status values override actual location and status information generated |
| 5888 | * by network, gps, or other location providers. |
| 5889 | * |
| 5890 | * @deprecated This settings is not used anymore. |
| 5891 | */ |
| 5892 | @Deprecated |
| 5893 | public static final String ALLOW_MOCK_LOCATION = "mock_location"; |
| 5894 | |
| 5895 | /** |
| 5896 | * Setting to indicate that on device captions are enabled. |
| 5897 | * |
| 5898 | * @hide |
| 5899 | */ |
| 5900 | @SystemApi |
| 5901 | public static final String ODI_CAPTIONS_ENABLED = "odi_captions_enabled"; |
| 5902 | |
| 5903 | /** |
| 5904 | * On Android 8.0 (API level 26) and higher versions of the platform, |
| 5905 | * a 64-bit number (expressed as a hexadecimal string), unique to |
| 5906 | * each combination of app-signing key, user, and device. |
| 5907 | * Values of {@code ANDROID_ID} are scoped by signing key and user. |
| 5908 | * The value may change if a factory reset is performed on the |
| 5909 | * device or if an APK signing key changes. |
| 5910 | * |
| 5911 | * For more information about how the platform handles {@code ANDROID_ID} |
| 5912 | * in Android 8.0 (API level 26) and higher, see <a |
| 5913 | * href="{@docRoot}about/versions/oreo/android-8.0-changes.html#privacy-all"> |
| 5914 | * Android 8.0 Behavior Changes</a>. |
| 5915 | * |
| 5916 | * <p class="note"><strong>Note:</strong> For apps that were installed |
| 5917 | * prior to updating the device to a version of Android 8.0 |
| 5918 | * (API level 26) or higher, the value of {@code ANDROID_ID} changes |
| 5919 | * if the app is uninstalled and then reinstalled after the OTA. |
| 5920 | * To preserve values across uninstalls after an OTA to Android 8.0 |
| 5921 | * or higher, developers can use |
| 5922 | * <a href="{@docRoot}guide/topics/data/keyvaluebackup.html"> |
| 5923 | * Key/Value Backup</a>.</p> |
| 5924 | * |
| 5925 | * <p>In versions of the platform lower than Android 8.0 (API level 26), |
| 5926 | * a 64-bit number (expressed as a hexadecimal string) that is randomly |
| 5927 | * generated when the user first sets up the device and should remain |
| 5928 | * constant for the lifetime of the user's device. |
| 5929 | * |
| 5930 | * On devices that have |
| 5931 | * <a href="{@docRoot}about/versions/android-4.2.html#MultipleUsers"> |
| 5932 | * multiple users</a>, each user appears as a |
| 5933 | * completely separate device, so the {@code ANDROID_ID} value is |
| 5934 | * unique to each user.</p> |
| 5935 | * |
| 5936 | * <p class="note"><strong>Note:</strong> If the caller is an Instant App the ID is scoped |
| 5937 | * to the Instant App, it is generated when the Instant App is first installed and reset if |
| 5938 | * the user clears the Instant App. |
| 5939 | */ |
| 5940 | public static final String ANDROID_ID = "android_id"; |
| 5941 | |
| 5942 | /** |
| 5943 | * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead |
| 5944 | */ |
| 5945 | @Deprecated |
| 5946 | public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; |
| 5947 | |
| 5948 | /** |
| 5949 | * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead |
| 5950 | */ |
| 5951 | @Deprecated |
| 5952 | public static final String DATA_ROAMING = Global.DATA_ROAMING; |
| 5953 | |
| 5954 | /** |
| 5955 | * Setting to record the input method used by default, holding the ID |
| 5956 | * of the desired method. |
| 5957 | */ |
| 5958 | public static final String DEFAULT_INPUT_METHOD = "default_input_method"; |
| 5959 | |
| 5960 | /** |
| 5961 | * Setting to record the input method subtype used by default, holding the ID |
| 5962 | * of the desired method. |
| 5963 | */ |
| 5964 | public static final String SELECTED_INPUT_METHOD_SUBTYPE = |
| 5965 | "selected_input_method_subtype"; |
| 5966 | |
| 5967 | /** |
| 5968 | * Setting to record the history of input method subtype, holding the pair of ID of IME |
| 5969 | * and its last used subtype. |
| 5970 | * @hide |
| 5971 | */ |
| 5972 | public static final String INPUT_METHODS_SUBTYPE_HISTORY = |
| 5973 | "input_methods_subtype_history"; |
| 5974 | |
| 5975 | /** |
| 5976 | * Setting to record the visibility of input method selector |
| 5977 | */ |
| 5978 | public static final String INPUT_METHOD_SELECTOR_VISIBILITY = |
| 5979 | "input_method_selector_visibility"; |
| 5980 | |
| 5981 | /** |
| 5982 | * The currently selected voice interaction service flattened ComponentName. |
| 5983 | * @hide |
| 5984 | */ |
| 5985 | @TestApi |
| 5986 | public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service"; |
| 5987 | |
| 5988 | /** |
| 5989 | * The currently selected autofill service flattened ComponentName. |
| 5990 | * @hide |
| 5991 | */ |
| 5992 | @TestApi |
| 5993 | public static final String AUTOFILL_SERVICE = "autofill_service"; |
| 5994 | |
| 5995 | /** |
| 5996 | * Boolean indicating if Autofill supports field classification. |
| 5997 | * |
| 5998 | * @see android.service.autofill.AutofillService |
| 5999 | * |
| 6000 | * @hide |
| 6001 | */ |
| 6002 | @SystemApi |
| 6003 | @TestApi |
| 6004 | public static final String AUTOFILL_FEATURE_FIELD_CLASSIFICATION = |
| 6005 | "autofill_field_classification"; |
| 6006 | |
| 6007 | /** |
| 6008 | * Boolean indicating if the dark mode dialog shown on first toggle has been seen. |
| 6009 | * |
| 6010 | * @hide |
| 6011 | */ |
| 6012 | public static final String DARK_MODE_DIALOG_SEEN = |
| 6013 | "dark_mode_dialog_seen"; |
| 6014 | |
| 6015 | /** |
| 6016 | * Custom time when Dark theme is scheduled to activate. |
| 6017 | * Represented as milliseconds from midnight (e.g. 79200000 == 10pm). |
| 6018 | * @hide |
| 6019 | */ |
| 6020 | public static final String DARK_THEME_CUSTOM_START_TIME = |
| 6021 | "dark_theme_custom_start_time"; |
| 6022 | |
| 6023 | /** |
| 6024 | * Custom time when Dark theme is scheduled to deactivate. |
| 6025 | * Represented as milliseconds from midnight (e.g. 79200000 == 10pm). |
| 6026 | * @hide |
| 6027 | */ |
| 6028 | public static final String DARK_THEME_CUSTOM_END_TIME = |
| 6029 | "dark_theme_custom_end_time"; |
| 6030 | |
| 6031 | /** |
| 6032 | * Defines value returned by {@link android.service.autofill.UserData#getMaxUserDataSize()}. |
| 6033 | * |
| 6034 | * @hide |
| 6035 | */ |
| 6036 | @SystemApi |
| 6037 | @TestApi |
| 6038 | public static final String AUTOFILL_USER_DATA_MAX_USER_DATA_SIZE = |
| 6039 | "autofill_user_data_max_user_data_size"; |
| 6040 | |
| 6041 | /** |
| 6042 | * Defines value returned by |
| 6043 | * {@link android.service.autofill.UserData#getMaxFieldClassificationIdsSize()}. |
| 6044 | * |
| 6045 | * @hide |
| 6046 | */ |
| 6047 | @SystemApi |
| 6048 | @TestApi |
| 6049 | public static final String AUTOFILL_USER_DATA_MAX_FIELD_CLASSIFICATION_IDS_SIZE = |
| 6050 | "autofill_user_data_max_field_classification_size"; |
| 6051 | |
| 6052 | /** |
| 6053 | * Defines value returned by |
| 6054 | * {@link android.service.autofill.UserData#getMaxCategoryCount()}. |
| 6055 | * |
| 6056 | * @hide |
| 6057 | */ |
| 6058 | @SystemApi |
| 6059 | @TestApi |
| 6060 | public static final String AUTOFILL_USER_DATA_MAX_CATEGORY_COUNT = |
| 6061 | "autofill_user_data_max_category_count"; |
| 6062 | |
| 6063 | /** |
| 6064 | * Defines value returned by {@link android.service.autofill.UserData#getMaxValueLength()}. |
| 6065 | * |
| 6066 | * @hide |
| 6067 | */ |
| 6068 | @SystemApi |
| 6069 | @TestApi |
| 6070 | public static final String AUTOFILL_USER_DATA_MAX_VALUE_LENGTH = |
| 6071 | "autofill_user_data_max_value_length"; |
| 6072 | |
| 6073 | /** |
| 6074 | * Defines value returned by {@link android.service.autofill.UserData#getMinValueLength()}. |
| 6075 | * |
| 6076 | * @hide |
| 6077 | */ |
| 6078 | @SystemApi |
| 6079 | @TestApi |
| 6080 | public static final String AUTOFILL_USER_DATA_MIN_VALUE_LENGTH = |
| 6081 | "autofill_user_data_min_value_length"; |
| 6082 | |
| 6083 | /** |
| 6084 | * Defines whether Content Capture is enabled for the user. |
| 6085 | * |
| 6086 | * <p>Type: {@code int} ({@code 0} for disabled, {@code 1} for enabled). |
| 6087 | * <p>Default: enabled |
| 6088 | * |
| 6089 | * @hide |
| 6090 | */ |
| 6091 | @TestApi |
| 6092 | public static final String CONTENT_CAPTURE_ENABLED = "content_capture_enabled"; |
| 6093 | |
| 6094 | /** |
| 6095 | * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead |
| 6096 | */ |
| 6097 | @Deprecated |
| 6098 | public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; |
| 6099 | |
| 6100 | /** |
| 6101 | * Indicates whether a DPC has been downloaded during provisioning. |
| 6102 | * |
| 6103 | * <p>Type: int (0 for false, 1 for true) |
| 6104 | * |
| 6105 | * <p>If this is true, then any attempts to begin setup again should result in factory reset |
| 6106 | * |
| 6107 | * @hide |
| 6108 | */ |
| 6109 | public static final String MANAGED_PROVISIONING_DPC_DOWNLOADED = |
| 6110 | "managed_provisioning_dpc_downloaded"; |
| 6111 | |
| 6112 | /** |
| 6113 | * Indicates whether the device is under restricted secure FRP mode. |
| 6114 | * Secure FRP mode is enabled when the device is under FRP. On solving of FRP challenge, |
| 6115 | * device is removed from this mode. |
| 6116 | * <p> |
| 6117 | * Type: int (0 for false, 1 for true) |
| 6118 | */ |
| 6119 | public static final String SECURE_FRP_MODE = "secure_frp_mode"; |
| 6120 | |
| 6121 | /** |
| 6122 | * Indicates whether the current user has completed setup via the setup wizard. |
| 6123 | * <p> |
| 6124 | * Type: int (0 for false, 1 for true) |
| 6125 | * |
| 6126 | * @hide |
| 6127 | */ |
| 6128 | @SystemApi |
| 6129 | @TestApi |
| 6130 | public static final String USER_SETUP_COMPLETE = "user_setup_complete"; |
| 6131 | |
| 6132 | /** |
| 6133 | * Indicates that the user has not started setup personalization. |
| 6134 | * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. |
| 6135 | * |
| 6136 | * @hide |
| 6137 | */ |
| 6138 | @SystemApi |
| 6139 | public static final int USER_SETUP_PERSONALIZATION_NOT_STARTED = 0; |
| 6140 | |
| 6141 | /** |
| 6142 | * Indicates that the user has not yet completed setup personalization. |
| 6143 | * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. |
| 6144 | * |
| 6145 | * @hide |
| 6146 | */ |
| 6147 | @SystemApi |
| 6148 | public static final int USER_SETUP_PERSONALIZATION_STARTED = 1; |
| 6149 | |
| 6150 | /** |
| 6151 | * Indicates that the user has snoozed personalization and will complete it later. |
| 6152 | * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. |
| 6153 | * |
| 6154 | * @hide |
| 6155 | */ |
| 6156 | @SystemApi |
| 6157 | public static final int USER_SETUP_PERSONALIZATION_PAUSED = 2; |
| 6158 | |
| 6159 | /** |
| 6160 | * Indicates that the user has completed setup personalization. |
| 6161 | * One of the possible states for {@link #USER_SETUP_PERSONALIZATION_STATE}. |
| 6162 | * |
| 6163 | * @hide |
| 6164 | */ |
| 6165 | @SystemApi |
| 6166 | public static final int USER_SETUP_PERSONALIZATION_COMPLETE = 10; |
| 6167 | |
| 6168 | /** @hide */ |
| 6169 | @Retention(RetentionPolicy.SOURCE) |
| 6170 | @IntDef({ |
| 6171 | USER_SETUP_PERSONALIZATION_NOT_STARTED, |
| 6172 | USER_SETUP_PERSONALIZATION_STARTED, |
| 6173 | USER_SETUP_PERSONALIZATION_PAUSED, |
| 6174 | USER_SETUP_PERSONALIZATION_COMPLETE |
| 6175 | }) |
| 6176 | public @interface UserSetupPersonalization {} |
| 6177 | |
| 6178 | /** |
| 6179 | * Defines the user's current state of device personalization. |
| 6180 | * The possible states are defined in {@link UserSetupPersonalization}. |
| 6181 | * |
| 6182 | * @hide |
| 6183 | */ |
| 6184 | @SystemApi |
| 6185 | public static final String USER_SETUP_PERSONALIZATION_STATE = |
| 6186 | "user_setup_personalization_state"; |
| 6187 | |
| 6188 | /** |
| 6189 | * Whether the current user has been set up via setup wizard (0 = false, 1 = true) |
| 6190 | * This value differs from USER_SETUP_COMPLETE in that it can be reset back to 0 |
| 6191 | * in case SetupWizard has been re-enabled on TV devices. |
| 6192 | * |
| 6193 | * @hide |
| 6194 | */ |
| 6195 | public static final String TV_USER_SETUP_COMPLETE = "tv_user_setup_complete"; |
| 6196 | |
| 6197 | /** |
| 6198 | * The prefix for a category name that indicates whether a suggested action from that |
| 6199 | * category was marked as completed. |
| 6200 | * <p> |
| 6201 | * Type: int (0 for false, 1 for true) |
| 6202 | * |
| 6203 | * @hide |
| 6204 | */ |
| 6205 | @SystemApi |
| 6206 | public static final String COMPLETED_CATEGORY_PREFIX = "suggested.completed_category."; |
| 6207 | |
| 6208 | /** |
| 6209 | * List of input methods that are currently enabled. This is a string |
| 6210 | * containing the IDs of all enabled input methods, each ID separated |
| 6211 | * by ':'. |
| 6212 | * |
| 6213 | * Format like "ime0;subtype0;subtype1;subtype2:ime1:ime2;subtype0" |
| 6214 | * where imeId is ComponentName and subtype is int32. |
| 6215 | */ |
| 6216 | public static final String ENABLED_INPUT_METHODS = "enabled_input_methods"; |
| 6217 | |
| 6218 | /** |
| 6219 | * List of system input methods that are currently disabled. This is a string |
| 6220 | * containing the IDs of all disabled input methods, each ID separated |
| 6221 | * by ':'. |
| 6222 | * @hide |
| 6223 | */ |
| 6224 | public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods"; |
| 6225 | |
| 6226 | /** |
| 6227 | * Whether to show the IME when a hard keyboard is connected. This is a boolean that |
| 6228 | * determines if the IME should be shown when a hard keyboard is attached. |
| 6229 | * @hide |
| 6230 | */ |
| 6231 | public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard"; |
| 6232 | |
| 6233 | /** |
| 6234 | * Host name and port for global http proxy. Uses ':' seperator for |
| 6235 | * between host and port. |
| 6236 | * |
| 6237 | * @deprecated Use {@link Global#HTTP_PROXY} |
| 6238 | */ |
| 6239 | @Deprecated |
| 6240 | public static final String HTTP_PROXY = Global.HTTP_PROXY; |
| 6241 | |
| 6242 | /** |
| 6243 | * Package designated as always-on VPN provider. |
| 6244 | * |
| 6245 | * @hide |
| 6246 | */ |
| 6247 | public static final String ALWAYS_ON_VPN_APP = "always_on_vpn_app"; |
| 6248 | |
| 6249 | /** |
| 6250 | * Whether to block networking outside of VPN connections while always-on is set. |
| 6251 | * @see #ALWAYS_ON_VPN_APP |
| 6252 | * |
| 6253 | * @hide |
| 6254 | */ |
| 6255 | public static final String ALWAYS_ON_VPN_LOCKDOWN = "always_on_vpn_lockdown"; |
| 6256 | |
| 6257 | /** |
| 6258 | * Comma separated list of packages that are allowed to access the network when VPN is in |
| 6259 | * lockdown mode but not running. |
| 6260 | * @see #ALWAYS_ON_VPN_LOCKDOWN |
| 6261 | * |
| 6262 | * @hide |
| 6263 | */ |
| 6264 | public static final String ALWAYS_ON_VPN_LOCKDOWN_WHITELIST = |
| 6265 | "always_on_vpn_lockdown_whitelist"; |
| 6266 | |
| 6267 | /** |
| 6268 | * Whether applications can be installed for this user via the system's |
| 6269 | * {@link Intent#ACTION_INSTALL_PACKAGE} mechanism. |
| 6270 | * |
| 6271 | * <p>1 = permit app installation via the system package installer intent |
| 6272 | * <p>0 = do not allow use of the package installer |
| 6273 | * @deprecated Starting from {@link android.os.Build.VERSION_CODES#O}, apps should use |
| 6274 | * {@link PackageManager#canRequestPackageInstalls()} |
| 6275 | * @see PackageManager#canRequestPackageInstalls() |
| 6276 | */ |
| 6277 | public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps"; |
| 6278 | |
| 6279 | /** |
| 6280 | * A flag to tell {@link com.android.server.devicepolicy.DevicePolicyManagerService} that |
| 6281 | * the default for {@link #INSTALL_NON_MARKET_APPS} is reversed for this user on OTA. So it |
| 6282 | * can set the restriction {@link android.os.UserManager#DISALLOW_INSTALL_UNKNOWN_SOURCES} |
| 6283 | * on behalf of the profile owner if needed to make the change transparent for profile |
| 6284 | * owners. |
| 6285 | * |
| 6286 | * @hide |
| 6287 | */ |
| 6288 | public static final String UNKNOWN_SOURCES_DEFAULT_REVERSED = |
| 6289 | "unknown_sources_default_reversed"; |
| 6290 | |
| 6291 | /** |
| 6292 | * Comma-separated list of location providers that are enabled. Do not rely on this value |
| 6293 | * being present or correct, or on ContentObserver notifications on the corresponding Uri. |
| 6294 | * |
| 6295 | * @deprecated The preferred methods for checking provider status and listening for changes |
| 6296 | * are via {@link LocationManager#isProviderEnabled(String)} and |
| 6297 | * {@link LocationManager#PROVIDERS_CHANGED_ACTION}. |
| 6298 | */ |
| 6299 | @Deprecated |
| 6300 | public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; |
| 6301 | |
| 6302 | /** |
| 6303 | * The current location mode of the device. Do not rely on this value being present or on |
| 6304 | * ContentObserver notifications on the corresponding Uri. |
| 6305 | * |
| 6306 | * @deprecated The preferred methods for checking location mode and listening for changes |
| 6307 | * are via {@link LocationManager#isLocationEnabled()} and |
| 6308 | * {@link LocationManager#MODE_CHANGED_ACTION}. |
| 6309 | */ |
| 6310 | @Deprecated |
| 6311 | public static final String LOCATION_MODE = "location_mode"; |
| 6312 | |
| 6313 | /** |
| 6314 | * The App or module that changes the location mode. |
| 6315 | * @hide |
| 6316 | */ |
| 6317 | public static final String LOCATION_CHANGER = "location_changer"; |
| 6318 | |
| 6319 | /** |
| 6320 | * The location changer is unknown or unable to detect. |
| 6321 | * @hide |
| 6322 | */ |
| 6323 | public static final int LOCATION_CHANGER_UNKNOWN = 0; |
| 6324 | |
| 6325 | /** |
| 6326 | * Location settings in system settings. |
| 6327 | * @hide |
| 6328 | */ |
| 6329 | public static final int LOCATION_CHANGER_SYSTEM_SETTINGS = 1; |
| 6330 | |
| 6331 | /** |
| 6332 | * The location icon in drop down notification drawer. |
| 6333 | * @hide |
| 6334 | */ |
| 6335 | public static final int LOCATION_CHANGER_QUICK_SETTINGS = 2; |
| 6336 | |
| 6337 | /** |
| 6338 | * Location mode is off. |
| 6339 | */ |
| 6340 | public static final int LOCATION_MODE_OFF = 0; |
| 6341 | |
| 6342 | /** |
| 6343 | * This mode no longer has any distinct meaning, but is interpreted as the location mode is |
| 6344 | * on. |
| 6345 | * |
| 6346 | * @deprecated See {@link #LOCATION_MODE}. |
| 6347 | */ |
| 6348 | @Deprecated |
| 6349 | public static final int LOCATION_MODE_SENSORS_ONLY = 1; |
| 6350 | |
| 6351 | /** |
| 6352 | * This mode no longer has any distinct meaning, but is interpreted as the location mode is |
| 6353 | * on. |
| 6354 | * |
| 6355 | * @deprecated See {@link #LOCATION_MODE}. |
| 6356 | */ |
| 6357 | @Deprecated |
| 6358 | public static final int LOCATION_MODE_BATTERY_SAVING = 2; |
| 6359 | |
| 6360 | /** |
| 6361 | * This mode no longer has any distinct meaning, but is interpreted as the location mode is |
| 6362 | * on. |
| 6363 | * |
| 6364 | * @deprecated See {@link #LOCATION_MODE}. |
| 6365 | */ |
| 6366 | @Deprecated |
| 6367 | public static final int LOCATION_MODE_HIGH_ACCURACY = 3; |
| 6368 | |
| 6369 | /** |
| 6370 | * Location mode is on. |
| 6371 | * |
| 6372 | * @hide |
| 6373 | */ |
| 6374 | @SystemApi |
| 6375 | public static final int LOCATION_MODE_ON = LOCATION_MODE_HIGH_ACCURACY; |
| 6376 | |
| 6377 | /** |
| 6378 | * The accuracy in meters used for coarsening location for clients with only the coarse |
| 6379 | * location permission. |
| 6380 | * |
| 6381 | * @hide |
| 6382 | */ |
| 6383 | public static final String LOCATION_COARSE_ACCURACY_M = "locationCoarseAccuracy"; |
| 6384 | |
| 6385 | /** |
| 6386 | * A flag containing settings used for biometric weak |
| 6387 | * @hide |
| 6388 | */ |
| 6389 | @Deprecated |
| 6390 | public static final String LOCK_BIOMETRIC_WEAK_FLAGS = |
| 6391 | "lock_biometric_weak_flags"; |
| 6392 | |
| 6393 | /** |
| 6394 | * Whether lock-to-app will lock the keyguard when exiting. |
| 6395 | * @hide |
| 6396 | */ |
| 6397 | public static final String LOCK_TO_APP_EXIT_LOCKED = "lock_to_app_exit_locked"; |
| 6398 | |
| 6399 | /** |
| 6400 | * Whether autolock is enabled (0 = false, 1 = true) |
| 6401 | * |
| 6402 | * @deprecated Use {@link android.app.KeyguardManager} to determine the state and security |
| 6403 | * level of the keyguard. Accessing this setting from an app that is targeting |
| 6404 | * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. |
| 6405 | */ |
| 6406 | @Deprecated |
| 6407 | public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; |
| 6408 | |
| 6409 | /** |
| 6410 | * Whether lock pattern is visible as user enters (0 = false, 1 = true) |
| 6411 | * |
| 6412 | * @deprecated Accessing this setting from an app that is targeting |
| 6413 | * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. |
| 6414 | */ |
| 6415 | @Deprecated |
| 6416 | public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; |
| 6417 | |
| 6418 | /** |
| 6419 | * Whether lock pattern will vibrate as user enters (0 = false, 1 = |
| 6420 | * true) |
| 6421 | * |
| 6422 | * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the |
| 6423 | * lockscreen uses |
| 6424 | * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}. |
| 6425 | * Accessing this setting from an app that is targeting |
| 6426 | * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. |
| 6427 | */ |
| 6428 | @Deprecated |
| 6429 | public static final String |
| 6430 | LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; |
| 6431 | |
| 6432 | /** |
| 6433 | * This preference allows the device to be locked given time after screen goes off, |
| 6434 | * subject to current DeviceAdmin policy limits. |
| 6435 | * @hide |
| 6436 | */ |
| 6437 | @UnsupportedAppUsage |
| 6438 | public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout"; |
| 6439 | |
| 6440 | |
| 6441 | /** |
| 6442 | * This preference contains the string that shows for owner info on LockScreen. |
| 6443 | * @hide |
| 6444 | * @deprecated |
| 6445 | */ |
| 6446 | @Deprecated |
| 6447 | public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info"; |
| 6448 | |
| 6449 | /** |
| 6450 | * Ids of the user-selected appwidgets on the lockscreen (comma-delimited). |
| 6451 | * @hide |
| 6452 | */ |
| 6453 | @Deprecated |
| 6454 | public static final String LOCK_SCREEN_APPWIDGET_IDS = |
| 6455 | "lock_screen_appwidget_ids"; |
| 6456 | |
| 6457 | /** |
| 6458 | * Id of the appwidget shown on the lock screen when appwidgets are disabled. |
| 6459 | * @hide |
| 6460 | */ |
| 6461 | @Deprecated |
| 6462 | public static final String LOCK_SCREEN_FALLBACK_APPWIDGET_ID = |
| 6463 | "lock_screen_fallback_appwidget_id"; |
| 6464 | |
| 6465 | /** |
| 6466 | * Index of the lockscreen appwidget to restore, -1 if none. |
| 6467 | * @hide |
| 6468 | */ |
| 6469 | @Deprecated |
| 6470 | public static final String LOCK_SCREEN_STICKY_APPWIDGET = |
| 6471 | "lock_screen_sticky_appwidget"; |
| 6472 | |
| 6473 | /** |
| 6474 | * This preference enables showing the owner info on LockScreen. |
| 6475 | * @hide |
| 6476 | * @deprecated |
| 6477 | */ |
| 6478 | @Deprecated |
| 6479 | @UnsupportedAppUsage |
| 6480 | public static final String LOCK_SCREEN_OWNER_INFO_ENABLED = |
| 6481 | "lock_screen_owner_info_enabled"; |
| 6482 | |
| 6483 | /** |
| 6484 | * Indicates whether the user has allowed notifications to be shown atop a securely locked |
| 6485 | * screen in their full "private" form (same as when the device is unlocked). |
| 6486 | * <p> |
| 6487 | * Type: int (0 for false, 1 for true) |
| 6488 | * |
| 6489 | * @hide |
| 6490 | */ |
| 6491 | @SystemApi |
| 6492 | @TestApi |
| 6493 | public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = |
| 6494 | "lock_screen_allow_private_notifications"; |
| 6495 | |
| 6496 | /** |
| 6497 | * When set by a user, allows notification remote input atop a securely locked screen |
| 6498 | * without having to unlock |
| 6499 | * @hide |
| 6500 | */ |
| 6501 | public static final String LOCK_SCREEN_ALLOW_REMOTE_INPUT = |
| 6502 | "lock_screen_allow_remote_input"; |
| 6503 | |
| 6504 | /** |
| 6505 | * Indicates which clock face to show on lock screen and AOD formatted as a serialized |
| 6506 | * {@link org.json.JSONObject} with the format: |
| 6507 | * {"clock": id, "_applied_timestamp": timestamp} |
| 6508 | * @hide |
| 6509 | */ |
| 6510 | public static final String LOCK_SCREEN_CUSTOM_CLOCK_FACE = "lock_screen_custom_clock_face"; |
| 6511 | |
| 6512 | /** |
| 6513 | * Indicates which clock face to show on lock screen and AOD while docked. |
| 6514 | * @hide |
| 6515 | */ |
| 6516 | public static final String DOCKED_CLOCK_FACE = "docked_clock_face"; |
| 6517 | |
| 6518 | /** |
| 6519 | * Set by the system to track if the user needs to see the call to action for |
| 6520 | * the lockscreen notification policy. |
| 6521 | * @hide |
| 6522 | */ |
| 6523 | public static final String SHOW_NOTE_ABOUT_NOTIFICATION_HIDING = |
| 6524 | "show_note_about_notification_hiding"; |
| 6525 | |
| 6526 | /** |
| 6527 | * Set to 1 by the system after trust agents have been initialized. |
| 6528 | * @hide |
| 6529 | */ |
| 6530 | public static final String TRUST_AGENTS_INITIALIZED = |
| 6531 | "trust_agents_initialized"; |
| 6532 | |
| 6533 | /** |
| 6534 | * The Logging ID (a unique 64-bit value) as a hex string. |
| 6535 | * Used as a pseudonymous identifier for logging. |
| 6536 | * @deprecated This identifier is poorly initialized and has |
| 6537 | * many collisions. It should not be used. |
| 6538 | */ |
| 6539 | @Deprecated |
| 6540 | public static final String LOGGING_ID = "logging_id"; |
| 6541 | |
| 6542 | /** |
| 6543 | * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead |
| 6544 | */ |
| 6545 | @Deprecated |
| 6546 | public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; |
| 6547 | |
| 6548 | /** |
| 6549 | * No longer supported. |
| 6550 | */ |
| 6551 | public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled"; |
| 6552 | |
| 6553 | /** |
| 6554 | * No longer supported. |
| 6555 | */ |
| 6556 | public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update"; |
| 6557 | |
| 6558 | /** |
| 6559 | * No longer supported. |
| 6560 | */ |
| 6561 | public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url"; |
| 6562 | |
| 6563 | /** |
| 6564 | * Settings classname to launch when Settings is clicked from All |
| 6565 | * Applications. Needed because of user testing between the old |
| 6566 | * and new Settings apps. |
| 6567 | */ |
| 6568 | // TODO: 881807 |
| 6569 | public static final String SETTINGS_CLASSNAME = "settings_classname"; |
| 6570 | |
| 6571 | /** |
| 6572 | * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead |
| 6573 | */ |
| 6574 | @Deprecated |
| 6575 | public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; |
| 6576 | |
| 6577 | /** |
| 6578 | * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead |
| 6579 | */ |
| 6580 | @Deprecated |
| 6581 | public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; |
| 6582 | |
| 6583 | /** |
| 6584 | * If accessibility is enabled. |
| 6585 | */ |
| 6586 | public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled"; |
| 6587 | |
| 6588 | /** |
| 6589 | * Setting specifying if the accessibility shortcut is enabled. |
| 6590 | * @hide |
| 6591 | */ |
| 6592 | public static final String ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN = |
| 6593 | "accessibility_shortcut_on_lock_screen"; |
| 6594 | |
| 6595 | /** |
| 6596 | * Setting specifying if the accessibility shortcut dialog has been shown to this user. |
| 6597 | * @hide |
| 6598 | */ |
| 6599 | public static final String ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN = |
| 6600 | "accessibility_shortcut_dialog_shown"; |
| 6601 | |
| 6602 | /** |
| 6603 | * Setting specifying the accessibility services, accessibility shortcut targets, |
| 6604 | * or features to be toggled via the accessibility shortcut. |
| 6605 | * |
| 6606 | * <p> This is a colon-separated string list which contains the flattened |
| 6607 | * {@link ComponentName} and the class name of a system class implementing a supported |
| 6608 | * accessibility feature. |
| 6609 | * @hide |
| 6610 | */ |
| 6611 | @UnsupportedAppUsage |
| 6612 | @TestApi |
| 6613 | public static final String ACCESSIBILITY_SHORTCUT_TARGET_SERVICE = |
| 6614 | "accessibility_shortcut_target_service"; |
| 6615 | |
| 6616 | /** |
| 6617 | * Setting specifying the accessibility service or feature to be toggled via the |
| 6618 | * accessibility button in the navigation bar. This is either a flattened |
| 6619 | * {@link ComponentName} or the class name of a system class implementing a supported |
| 6620 | * accessibility feature. |
| 6621 | * @hide |
| 6622 | */ |
| 6623 | public static final String ACCESSIBILITY_BUTTON_TARGET_COMPONENT = |
| 6624 | "accessibility_button_target_component"; |
| 6625 | |
| 6626 | /** |
| 6627 | * Setting specifying the accessibility services, accessibility shortcut targets, |
| 6628 | * or features to be toggled via the accessibility button in the navigation bar. |
| 6629 | * |
| 6630 | * <p> This is a colon-separated string list which contains the flattened |
| 6631 | * {@link ComponentName} and the class name of a system class implementing a supported |
| 6632 | * accessibility feature. |
| 6633 | * @hide |
| 6634 | */ |
| 6635 | public static final String ACCESSIBILITY_BUTTON_TARGETS = "accessibility_button_targets"; |
| 6636 | |
| 6637 | /** |
| 6638 | * The system class name of magnification controller which is a target to be toggled via |
| 6639 | * accessibility shortcut or accessibility button. |
| 6640 | * |
| 6641 | * @hide |
| 6642 | */ |
| 6643 | public static final String ACCESSIBILITY_SHORTCUT_TARGET_MAGNIFICATION_CONTROLLER = |
| 6644 | "com.android.server.accessibility.MagnificationController"; |
| 6645 | |
| 6646 | /** |
| 6647 | * If touch exploration is enabled. |
| 6648 | */ |
| 6649 | public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled"; |
| 6650 | |
| 6651 | /** |
| 6652 | * List of the enabled accessibility providers. |
| 6653 | */ |
| 6654 | public static final String ENABLED_ACCESSIBILITY_SERVICES = |
| 6655 | "enabled_accessibility_services"; |
| 6656 | |
| 6657 | /** |
| 6658 | * List of the accessibility services to which the user has granted |
| 6659 | * permission to put the device into touch exploration mode. |
| 6660 | * |
| 6661 | * @hide |
| 6662 | */ |
| 6663 | public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES = |
| 6664 | "touch_exploration_granted_accessibility_services"; |
| 6665 | |
| 6666 | /** |
| 6667 | * Whether the Global Actions Panel is enabled. |
| 6668 | * @hide |
| 6669 | */ |
| 6670 | public static final String GLOBAL_ACTIONS_PANEL_ENABLED = "global_actions_panel_enabled"; |
| 6671 | |
| 6672 | /** |
| 6673 | * Whether the Global Actions Panel can be toggled on or off in Settings. |
| 6674 | * @hide |
| 6675 | */ |
| 6676 | public static final String GLOBAL_ACTIONS_PANEL_AVAILABLE = |
| 6677 | "global_actions_panel_available"; |
| 6678 | |
| 6679 | /** |
| 6680 | * Enables debug mode for the Global Actions Panel. |
| 6681 | * @hide |
| 6682 | */ |
| 6683 | public static final String GLOBAL_ACTIONS_PANEL_DEBUG_ENABLED = |
| 6684 | "global_actions_panel_debug_enabled"; |
| 6685 | |
| 6686 | /** |
| 6687 | * Whether the hush gesture has ever been used |
| 6688 | * @hide |
| 6689 | */ |
| 6690 | @SystemApi |
| 6691 | public static final String HUSH_GESTURE_USED = "hush_gesture_used"; |
| 6692 | |
| 6693 | /** |
| 6694 | * Number of times the user has manually clicked the ringer toggle |
| 6695 | * @hide |
| 6696 | */ |
| 6697 | public static final String MANUAL_RINGER_TOGGLE_COUNT = "manual_ringer_toggle_count"; |
| 6698 | |
| 6699 | /** |
| 6700 | * Whether to play a sound for charging events. |
| 6701 | * @hide |
| 6702 | */ |
| 6703 | public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled"; |
| 6704 | |
| 6705 | /** |
| 6706 | * Whether to vibrate for charging events. |
| 6707 | * @hide |
| 6708 | */ |
| 6709 | public static final String CHARGING_VIBRATION_ENABLED = "charging_vibration_enabled"; |
| 6710 | |
| 6711 | /** |
| 6712 | * If 0, turning on dnd manually will last indefinitely. |
| 6713 | * Else if non-negative, turning on dnd manually will last for this many minutes. |
| 6714 | * Else (if negative), turning on dnd manually will surface a dialog that prompts |
| 6715 | * user to specify a duration. |
| 6716 | * @hide |
| 6717 | */ |
| 6718 | public static final String ZEN_DURATION = "zen_duration"; |
| 6719 | |
| 6720 | /** @hide */ public static final int ZEN_DURATION_PROMPT = -1; |
| 6721 | /** @hide */ public static final int ZEN_DURATION_FOREVER = 0; |
| 6722 | |
| 6723 | /** |
| 6724 | * If nonzero, will show the zen upgrade notification when the user toggles DND on/off. |
| 6725 | * @hide |
| 6726 | */ |
| 6727 | public static final String SHOW_ZEN_UPGRADE_NOTIFICATION = "show_zen_upgrade_notification"; |
| 6728 | |
| 6729 | /** |
| 6730 | * If nonzero, will show the zen update settings suggestion. |
| 6731 | * @hide |
| 6732 | */ |
| 6733 | public static final String SHOW_ZEN_SETTINGS_SUGGESTION = "show_zen_settings_suggestion"; |
| 6734 | |
| 6735 | /** |
| 6736 | * If nonzero, zen has not been updated to reflect new changes. |
| 6737 | * @hide |
| 6738 | */ |
| 6739 | public static final String ZEN_SETTINGS_UPDATED = "zen_settings_updated"; |
| 6740 | |
| 6741 | /** |
| 6742 | * If nonzero, zen setting suggestion has been viewed by user |
| 6743 | * @hide |
| 6744 | */ |
| 6745 | public static final String ZEN_SETTINGS_SUGGESTION_VIEWED = |
| 6746 | "zen_settings_suggestion_viewed"; |
| 6747 | |
| 6748 | /** |
| 6749 | * Whether the in call notification is enabled to play sound during calls. The value is |
| 6750 | * boolean (1 or 0). |
| 6751 | * @hide |
| 6752 | */ |
| 6753 | public static final String IN_CALL_NOTIFICATION_ENABLED = "in_call_notification_enabled"; |
| 6754 | |
| 6755 | /** |
| 6756 | * Uri of the slice that's presented on the keyguard. |
| 6757 | * Defaults to a slice with the date and next alarm. |
| 6758 | * |
| 6759 | * @hide |
| 6760 | */ |
| 6761 | public static final String KEYGUARD_SLICE_URI = "keyguard_slice_uri"; |
| 6762 | |
| 6763 | /** |
| 6764 | * Whether to speak passwords while in accessibility mode. |
| 6765 | * |
| 6766 | * @deprecated The speaking of passwords is controlled by individual accessibility services. |
| 6767 | * Apps should ignore this setting and provide complete information to accessibility |
| 6768 | * at all times, which was the behavior when this value was {@code true}. |
| 6769 | */ |
| 6770 | @Deprecated |
| 6771 | public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password"; |
| 6772 | |
| 6773 | /** |
| 6774 | * Whether to draw text with high contrast while in accessibility mode. |
| 6775 | * |
| 6776 | * @hide |
| 6777 | */ |
| 6778 | public static final String ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED = |
| 6779 | "high_text_contrast_enabled"; |
| 6780 | |
| 6781 | /** |
| 6782 | * Setting that specifies whether the display magnification is enabled via a system-wide |
| 6783 | * triple tap gesture. Display magnifications allows the user to zoom in the display content |
| 6784 | * and is targeted to low vision users. The current magnification scale is controlled by |
| 6785 | * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}. |
| 6786 | * |
| 6787 | * @hide |
| 6788 | */ |
| 6789 | @UnsupportedAppUsage |
| 6790 | @TestApi |
| 6791 | public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED = |
| 6792 | "accessibility_display_magnification_enabled"; |
| 6793 | |
| 6794 | /** |
| 6795 | * Setting that specifies whether the display magnification is enabled via a shortcut |
| 6796 | * affordance within the system's navigation area. Display magnifications allows the user to |
| 6797 | * zoom in the display content and is targeted to low vision users. The current |
| 6798 | * magnification scale is controlled by {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}. |
| 6799 | * |
| 6800 | * @deprecated Use {@link #ACCESSIBILITY_BUTTON_TARGETS} instead. |
| 6801 | * {@link #ACCESSIBILITY_BUTTON_TARGETS} holds the magnification system class name |
| 6802 | * when navigation bar magnification is enabled. |
| 6803 | * @hide |
| 6804 | */ |
| 6805 | @SystemApi |
| 6806 | public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED = |
| 6807 | "accessibility_display_magnification_navbar_enabled"; |
| 6808 | |
| 6809 | /** |
| 6810 | * Setting that specifies what the display magnification scale is. |
| 6811 | * Display magnifications allows the user to zoom in the display |
| 6812 | * content and is targeted to low vision users. Whether a display |
| 6813 | * magnification is performed is controlled by |
| 6814 | * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED} and |
| 6815 | * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED} |
| 6816 | * |
| 6817 | * @hide |
| 6818 | */ |
| 6819 | public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE = |
| 6820 | "accessibility_display_magnification_scale"; |
| 6821 | |
| 6822 | /** |
| 6823 | * Unused mangnification setting |
| 6824 | * |
| 6825 | * @hide |
| 6826 | * @deprecated |
| 6827 | */ |
| 6828 | @Deprecated |
| 6829 | public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE = |
| 6830 | "accessibility_display_magnification_auto_update"; |
| 6831 | |
| 6832 | /** |
| 6833 | * Setting that specifies what mode the soft keyboard is in (default or hidden). Can be |
| 6834 | * modified from an AccessibilityService using the SoftKeyboardController. |
| 6835 | * |
| 6836 | * @hide |
| 6837 | */ |
| 6838 | public static final String ACCESSIBILITY_SOFT_KEYBOARD_MODE = |
| 6839 | "accessibility_soft_keyboard_mode"; |
| 6840 | |
| 6841 | /** |
| 6842 | * Default soft keyboard behavior. |
| 6843 | * |
| 6844 | * @hide |
| 6845 | */ |
| 6846 | public static final int SHOW_MODE_AUTO = 0; |
| 6847 | |
| 6848 | /** |
| 6849 | * Soft keyboard is never shown. |
| 6850 | * |
| 6851 | * @hide |
| 6852 | */ |
| 6853 | public static final int SHOW_MODE_HIDDEN = 1; |
| 6854 | |
| 6855 | /** |
| 6856 | * Setting that specifies whether timed text (captions) should be |
| 6857 | * displayed in video content. Text display properties are controlled by |
| 6858 | * the following settings: |
| 6859 | * <ul> |
| 6860 | * <li>{@link #ACCESSIBILITY_CAPTIONING_LOCALE} |
| 6861 | * <li>{@link #ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR} |
| 6862 | * <li>{@link #ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR} |
| 6863 | * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_COLOR} |
| 6864 | * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_TYPE} |
| 6865 | * <li>{@link #ACCESSIBILITY_CAPTIONING_TYPEFACE} |
| 6866 | * <li>{@link #ACCESSIBILITY_CAPTIONING_FONT_SCALE} |
| 6867 | * </ul> |
| 6868 | * |
| 6869 | * @hide |
| 6870 | */ |
| 6871 | public static final String ACCESSIBILITY_CAPTIONING_ENABLED = |
| 6872 | "accessibility_captioning_enabled"; |
| 6873 | |
| 6874 | /** |
| 6875 | * Setting that specifies the language for captions as a locale string, |
| 6876 | * e.g. en_US. |
| 6877 | * |
| 6878 | * @see java.util.Locale#toString |
| 6879 | * @hide |
| 6880 | */ |
| 6881 | public static final String ACCESSIBILITY_CAPTIONING_LOCALE = |
| 6882 | "accessibility_captioning_locale"; |
| 6883 | |
| 6884 | /** |
| 6885 | * Integer property that specifies the preset style for captions, one |
| 6886 | * of: |
| 6887 | * <ul> |
| 6888 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESET_CUSTOM} |
| 6889 | * <li>a valid index of {@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESETS} |
| 6890 | * </ul> |
| 6891 | * |
| 6892 | * @see java.util.Locale#toString |
| 6893 | * @hide |
| 6894 | */ |
| 6895 | public static final String ACCESSIBILITY_CAPTIONING_PRESET = |
| 6896 | "accessibility_captioning_preset"; |
| 6897 | |
| 6898 | /** |
| 6899 | * Integer property that specifes the background color for captions as a |
| 6900 | * packed 32-bit color. |
| 6901 | * |
| 6902 | * @see android.graphics.Color#argb |
| 6903 | * @hide |
| 6904 | */ |
| 6905 | public static final String ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR = |
| 6906 | "accessibility_captioning_background_color"; |
| 6907 | |
| 6908 | /** |
| 6909 | * Integer property that specifes the foreground color for captions as a |
| 6910 | * packed 32-bit color. |
| 6911 | * |
| 6912 | * @see android.graphics.Color#argb |
| 6913 | * @hide |
| 6914 | */ |
| 6915 | public static final String ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR = |
| 6916 | "accessibility_captioning_foreground_color"; |
| 6917 | |
| 6918 | /** |
| 6919 | * Integer property that specifes the edge type for captions, one of: |
| 6920 | * <ul> |
| 6921 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_NONE} |
| 6922 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE} |
| 6923 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW} |
| 6924 | * </ul> |
| 6925 | * |
| 6926 | * @see #ACCESSIBILITY_CAPTIONING_EDGE_COLOR |
| 6927 | * @hide |
| 6928 | */ |
| 6929 | public static final String ACCESSIBILITY_CAPTIONING_EDGE_TYPE = |
| 6930 | "accessibility_captioning_edge_type"; |
| 6931 | |
| 6932 | /** |
| 6933 | * Integer property that specifes the edge color for captions as a |
| 6934 | * packed 32-bit color. |
| 6935 | * |
| 6936 | * @see #ACCESSIBILITY_CAPTIONING_EDGE_TYPE |
| 6937 | * @see android.graphics.Color#argb |
| 6938 | * @hide |
| 6939 | */ |
| 6940 | public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR = |
| 6941 | "accessibility_captioning_edge_color"; |
| 6942 | |
| 6943 | /** |
| 6944 | * Integer property that specifes the window color for captions as a |
| 6945 | * packed 32-bit color. |
| 6946 | * |
| 6947 | * @see android.graphics.Color#argb |
| 6948 | * @hide |
| 6949 | */ |
| 6950 | public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR = |
| 6951 | "accessibility_captioning_window_color"; |
| 6952 | |
| 6953 | /** |
| 6954 | * String property that specifies the typeface for captions, one of: |
| 6955 | * <ul> |
| 6956 | * <li>DEFAULT |
| 6957 | * <li>MONOSPACE |
| 6958 | * <li>SANS_SERIF |
| 6959 | * <li>SERIF |
| 6960 | * </ul> |
| 6961 | * |
| 6962 | * @see android.graphics.Typeface |
| 6963 | * @hide |
| 6964 | */ |
| 6965 | @UnsupportedAppUsage |
| 6966 | public static final String ACCESSIBILITY_CAPTIONING_TYPEFACE = |
| 6967 | "accessibility_captioning_typeface"; |
| 6968 | |
| 6969 | /** |
| 6970 | * Floating point property that specifies font scaling for captions. |
| 6971 | * |
| 6972 | * @hide |
| 6973 | */ |
| 6974 | public static final String ACCESSIBILITY_CAPTIONING_FONT_SCALE = |
| 6975 | "accessibility_captioning_font_scale"; |
| 6976 | |
| 6977 | /** |
| 6978 | * Setting that specifies whether display color inversion is enabled. |
| 6979 | */ |
| 6980 | public static final String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = |
| 6981 | "accessibility_display_inversion_enabled"; |
| 6982 | |
| 6983 | /** |
| 6984 | * Setting that specifies whether display color space adjustment is |
| 6985 | * enabled. |
| 6986 | * |
| 6987 | * @hide |
| 6988 | */ |
| 6989 | @UnsupportedAppUsage |
| 6990 | public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED = |
| 6991 | "accessibility_display_daltonizer_enabled"; |
| 6992 | |
| 6993 | /** |
| 6994 | * Integer property that specifies the type of color space adjustment to |
| 6995 | * perform. Valid values are defined in AccessibilityManager and Settings arrays.xml: |
| 6996 | * - AccessibilityManager.DALTONIZER_DISABLED = -1 |
| 6997 | * - AccessibilityManager.DALTONIZER_SIMULATE_MONOCHROMACY = 0 |
| 6998 | * - <item>@string/daltonizer_mode_protanomaly</item> = 11 |
| 6999 | * - AccessibilityManager.DALTONIZER_CORRECT_DEUTERANOMALY and |
| 7000 | * <item>@string/daltonizer_mode_deuteranomaly</item> = 12 |
| 7001 | * - <item>@string/daltonizer_mode_tritanomaly</item> = 13 |
| 7002 | * |
| 7003 | * @hide |
| 7004 | */ |
| 7005 | @UnsupportedAppUsage |
| 7006 | public static final String ACCESSIBILITY_DISPLAY_DALTONIZER = |
| 7007 | "accessibility_display_daltonizer"; |
| 7008 | |
| 7009 | /** |
| 7010 | * Setting that specifies whether automatic click when the mouse pointer stops moving is |
| 7011 | * enabled. |
| 7012 | * |
| 7013 | * @hide |
| 7014 | */ |
| 7015 | @UnsupportedAppUsage |
| 7016 | public static final String ACCESSIBILITY_AUTOCLICK_ENABLED = |
| 7017 | "accessibility_autoclick_enabled"; |
| 7018 | |
| 7019 | /** |
| 7020 | * Integer setting specifying amount of time in ms the mouse pointer has to stay still |
| 7021 | * before performing click when {@link #ACCESSIBILITY_AUTOCLICK_ENABLED} is set. |
| 7022 | * |
| 7023 | * @see #ACCESSIBILITY_AUTOCLICK_ENABLED |
| 7024 | * @hide |
| 7025 | */ |
| 7026 | public static final String ACCESSIBILITY_AUTOCLICK_DELAY = |
| 7027 | "accessibility_autoclick_delay"; |
| 7028 | |
| 7029 | /** |
| 7030 | * Whether or not larger size icons are used for the pointer of mouse/trackpad for |
| 7031 | * accessibility. |
| 7032 | * (0 = false, 1 = true) |
| 7033 | * @hide |
| 7034 | */ |
| 7035 | @UnsupportedAppUsage |
| 7036 | public static final String ACCESSIBILITY_LARGE_POINTER_ICON = |
| 7037 | "accessibility_large_pointer_icon"; |
| 7038 | |
| 7039 | /** |
| 7040 | * The timeout for considering a press to be a long press in milliseconds. |
| 7041 | * @hide |
| 7042 | */ |
| 7043 | @UnsupportedAppUsage |
| 7044 | public static final String LONG_PRESS_TIMEOUT = "long_press_timeout"; |
| 7045 | |
| 7046 | /** |
| 7047 | * The duration in milliseconds between the first tap's up event and the second tap's |
| 7048 | * down event for an interaction to be considered part of the same multi-press. |
| 7049 | * @hide |
| 7050 | */ |
| 7051 | public static final String MULTI_PRESS_TIMEOUT = "multi_press_timeout"; |
| 7052 | |
| 7053 | /** |
| 7054 | * Setting that specifies recommended timeout in milliseconds for controls |
| 7055 | * which don't need user's interactions. |
| 7056 | * |
| 7057 | * @hide |
| 7058 | */ |
| 7059 | public static final String ACCESSIBILITY_NON_INTERACTIVE_UI_TIMEOUT_MS = |
| 7060 | "accessibility_non_interactive_ui_timeout_ms"; |
| 7061 | |
| 7062 | /** |
| 7063 | * Setting that specifies recommended timeout in milliseconds for controls |
| 7064 | * which need user's interactions. |
| 7065 | * |
| 7066 | * @hide |
| 7067 | */ |
| 7068 | public static final String ACCESSIBILITY_INTERACTIVE_UI_TIMEOUT_MS = |
| 7069 | "accessibility_interactive_ui_timeout_ms"; |
| 7070 | |
| 7071 | /** |
| 7072 | * List of the enabled print services. |
| 7073 | * |
| 7074 | * N and beyond uses {@link #DISABLED_PRINT_SERVICES}. But this might be used in an upgrade |
| 7075 | * from pre-N. |
| 7076 | * |
| 7077 | * @hide |
| 7078 | */ |
| 7079 | @UnsupportedAppUsage |
| 7080 | public static final String ENABLED_PRINT_SERVICES = |
| 7081 | "enabled_print_services"; |
| 7082 | |
| 7083 | /** |
| 7084 | * List of the disabled print services. |
| 7085 | * |
| 7086 | * @hide |
| 7087 | */ |
| 7088 | @TestApi |
| 7089 | public static final String DISABLED_PRINT_SERVICES = |
| 7090 | "disabled_print_services"; |
| 7091 | |
| 7092 | /** |
| 7093 | * The saved value for WindowManagerService.setForcedDisplayDensity() |
| 7094 | * formatted as a single integer representing DPI. If unset, then use |
| 7095 | * the real display density. |
| 7096 | * |
| 7097 | * @hide |
| 7098 | */ |
| 7099 | public static final String DISPLAY_DENSITY_FORCED = "display_density_forced"; |
| 7100 | |
| 7101 | /** |
| 7102 | * Setting to always use the default text-to-speech settings regardless |
| 7103 | * of the application settings. |
| 7104 | * 1 = override application settings, |
| 7105 | * 0 = use application settings (if specified). |
| 7106 | * |
| 7107 | * @deprecated The value of this setting is no longer respected by |
| 7108 | * the framework text to speech APIs as of the Ice Cream Sandwich release. |
| 7109 | */ |
| 7110 | @Deprecated |
| 7111 | public static final String TTS_USE_DEFAULTS = "tts_use_defaults"; |
| 7112 | |
| 7113 | /** |
| 7114 | * Default text-to-speech engine speech rate. 100 = 1x |
| 7115 | */ |
| 7116 | public static final String TTS_DEFAULT_RATE = "tts_default_rate"; |
| 7117 | |
| 7118 | /** |
| 7119 | * Default text-to-speech engine pitch. 100 = 1x |
| 7120 | */ |
| 7121 | public static final String TTS_DEFAULT_PITCH = "tts_default_pitch"; |
| 7122 | |
| 7123 | /** |
| 7124 | * Default text-to-speech engine. |
| 7125 | */ |
| 7126 | public static final String TTS_DEFAULT_SYNTH = "tts_default_synth"; |
| 7127 | |
| 7128 | /** |
| 7129 | * Default text-to-speech language. |
| 7130 | * |
| 7131 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 7132 | * Sandwich release. Apps should never need to read this setting directly, |
| 7133 | * instead can query the TextToSpeech framework classes for the default |
| 7134 | * locale. {@link TextToSpeech#getLanguage()}. |
| 7135 | */ |
| 7136 | @Deprecated |
| 7137 | public static final String TTS_DEFAULT_LANG = "tts_default_lang"; |
| 7138 | |
| 7139 | /** |
| 7140 | * Default text-to-speech country. |
| 7141 | * |
| 7142 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 7143 | * Sandwich release. Apps should never need to read this setting directly, |
| 7144 | * instead can query the TextToSpeech framework classes for the default |
| 7145 | * locale. {@link TextToSpeech#getLanguage()}. |
| 7146 | */ |
| 7147 | @Deprecated |
| 7148 | public static final String TTS_DEFAULT_COUNTRY = "tts_default_country"; |
| 7149 | |
| 7150 | /** |
| 7151 | * Default text-to-speech locale variant. |
| 7152 | * |
| 7153 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 7154 | * Sandwich release. Apps should never need to read this setting directly, |
| 7155 | * instead can query the TextToSpeech framework classes for the |
| 7156 | * locale that is in use {@link TextToSpeech#getLanguage()}. |
| 7157 | */ |
| 7158 | @Deprecated |
| 7159 | public static final String TTS_DEFAULT_VARIANT = "tts_default_variant"; |
| 7160 | |
| 7161 | /** |
| 7162 | * Stores the default tts locales on a per engine basis. Stored as |
| 7163 | * a comma seperated list of values, each value being of the form |
| 7164 | * {@code engine_name:locale} for example, |
| 7165 | * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This |
| 7166 | * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and |
| 7167 | * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this |
| 7168 | * setting directly, and can query the TextToSpeech framework classes |
| 7169 | * for the locale that is in use. |
| 7170 | * |
| 7171 | * @hide |
| 7172 | */ |
| 7173 | public static final String TTS_DEFAULT_LOCALE = "tts_default_locale"; |
| 7174 | |
| 7175 | /** |
| 7176 | * Space delimited list of plugin packages that are enabled. |
| 7177 | */ |
| 7178 | public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins"; |
| 7179 | |
| 7180 | /** |
| 7181 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} |
| 7182 | * instead. |
| 7183 | */ |
| 7184 | @Deprecated |
| 7185 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 7186 | Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; |
| 7187 | |
| 7188 | /** |
| 7189 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} |
| 7190 | * instead. |
| 7191 | */ |
| 7192 | @Deprecated |
| 7193 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
| 7194 | Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; |
| 7195 | |
| 7196 | /** |
| 7197 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} |
| 7198 | * instead. |
| 7199 | */ |
| 7200 | @Deprecated |
| 7201 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = |
| 7202 | Global.WIFI_NUM_OPEN_NETWORKS_KEPT; |
| 7203 | |
| 7204 | /** |
| 7205 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} |
| 7206 | * instead. |
| 7207 | */ |
| 7208 | @Deprecated |
| 7209 | public static final String WIFI_ON = Global.WIFI_ON; |
| 7210 | |
| 7211 | /** |
| 7212 | * The acceptable packet loss percentage (range 0 - 100) before trying |
| 7213 | * another AP on the same network. |
| 7214 | * @deprecated This setting is not used. |
| 7215 | */ |
| 7216 | @Deprecated |
| 7217 | public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = |
| 7218 | "wifi_watchdog_acceptable_packet_loss_percentage"; |
| 7219 | |
| 7220 | /** |
| 7221 | * The number of access points required for a network in order for the |
| 7222 | * watchdog to monitor it. |
| 7223 | * @deprecated This setting is not used. |
| 7224 | */ |
| 7225 | @Deprecated |
| 7226 | public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count"; |
| 7227 | |
| 7228 | /** |
| 7229 | * The delay between background checks. |
| 7230 | * @deprecated This setting is not used. |
| 7231 | */ |
| 7232 | @Deprecated |
| 7233 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = |
| 7234 | "wifi_watchdog_background_check_delay_ms"; |
| 7235 | |
| 7236 | /** |
| 7237 | * Whether the Wi-Fi watchdog is enabled for background checking even |
| 7238 | * after it thinks the user has connected to a good access point. |
| 7239 | * @deprecated This setting is not used. |
| 7240 | */ |
| 7241 | @Deprecated |
| 7242 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = |
| 7243 | "wifi_watchdog_background_check_enabled"; |
| 7244 | |
| 7245 | /** |
| 7246 | * The timeout for a background ping |
| 7247 | * @deprecated This setting is not used. |
| 7248 | */ |
| 7249 | @Deprecated |
| 7250 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = |
| 7251 | "wifi_watchdog_background_check_timeout_ms"; |
| 7252 | |
| 7253 | /** |
| 7254 | * The number of initial pings to perform that *may* be ignored if they |
| 7255 | * fail. Again, if these fail, they will *not* be used in packet loss |
| 7256 | * calculation. For example, one network always seemed to time out for |
| 7257 | * the first couple pings, so this is set to 3 by default. |
| 7258 | * @deprecated This setting is not used. |
| 7259 | */ |
| 7260 | @Deprecated |
| 7261 | public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = |
| 7262 | "wifi_watchdog_initial_ignored_ping_count"; |
| 7263 | |
| 7264 | /** |
| 7265 | * The maximum number of access points (per network) to attempt to test. |
| 7266 | * If this number is reached, the watchdog will no longer monitor the |
| 7267 | * initial connection state for the network. This is a safeguard for |
| 7268 | * networks containing multiple APs whose DNS does not respond to pings. |
| 7269 | * @deprecated This setting is not used. |
| 7270 | */ |
| 7271 | @Deprecated |
| 7272 | public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks"; |
| 7273 | |
| 7274 | /** |
| 7275 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead |
| 7276 | */ |
| 7277 | @Deprecated |
| 7278 | public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; |
| 7279 | |
| 7280 | /** |
| 7281 | * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled. |
| 7282 | * @deprecated This setting is not used. |
| 7283 | */ |
| 7284 | @Deprecated |
| 7285 | public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list"; |
| 7286 | |
| 7287 | /** |
| 7288 | * The number of pings to test if an access point is a good connection. |
| 7289 | * @deprecated This setting is not used. |
| 7290 | */ |
| 7291 | @Deprecated |
| 7292 | public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count"; |
| 7293 | |
| 7294 | /** |
| 7295 | * The delay between pings. |
| 7296 | * @deprecated This setting is not used. |
| 7297 | */ |
| 7298 | @Deprecated |
| 7299 | public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms"; |
| 7300 | |
| 7301 | /** |
| 7302 | * The timeout per ping. |
| 7303 | * @deprecated This setting is not used. |
| 7304 | */ |
| 7305 | @Deprecated |
| 7306 | public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms"; |
| 7307 | |
| 7308 | /** |
| 7309 | * @deprecated Use |
| 7310 | * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead |
| 7311 | */ |
| 7312 | @Deprecated |
| 7313 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; |
| 7314 | |
| 7315 | /** |
| 7316 | * @deprecated Use |
| 7317 | * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead |
| 7318 | */ |
| 7319 | @Deprecated |
| 7320 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
| 7321 | Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; |
| 7322 | |
| 7323 | /** |
| 7324 | * The number of milliseconds to hold on to a PendingIntent based request. This delay gives |
| 7325 | * the receivers of the PendingIntent an opportunity to make a new network request before |
| 7326 | * the Network satisfying the request is potentially removed. |
| 7327 | * |
| 7328 | * @hide |
| 7329 | */ |
| 7330 | public static final String CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS = |
| 7331 | "connectivity_release_pending_intent_delay_ms"; |
| 7332 | |
| 7333 | /** |
| 7334 | * Whether background data usage is allowed. |
| 7335 | * |
| 7336 | * @deprecated As of {@link VERSION_CODES#ICE_CREAM_SANDWICH}, |
| 7337 | * availability of background data depends on several |
| 7338 | * combined factors. When background data is unavailable, |
| 7339 | * {@link ConnectivityManager#getActiveNetworkInfo()} will |
| 7340 | * now appear disconnected. |
| 7341 | */ |
| 7342 | @Deprecated |
| 7343 | public static final String BACKGROUND_DATA = "background_data"; |
| 7344 | |
| 7345 | /** |
| 7346 | * Origins for which browsers should allow geolocation by default. |
| 7347 | * The value is a space-separated list of origins. |
| 7348 | */ |
| 7349 | public static final String ALLOWED_GEOLOCATION_ORIGINS |
| 7350 | = "allowed_geolocation_origins"; |
| 7351 | |
| 7352 | /** |
| 7353 | * The preferred TTY mode 0 = TTy Off, CDMA default |
| 7354 | * 1 = TTY Full |
| 7355 | * 2 = TTY HCO |
| 7356 | * 3 = TTY VCO |
| 7357 | * @hide |
| 7358 | */ |
| 7359 | public static final String PREFERRED_TTY_MODE = |
| 7360 | "preferred_tty_mode"; |
| 7361 | |
| 7362 | /** |
| 7363 | * Whether the enhanced voice privacy mode is enabled. |
| 7364 | * 0 = normal voice privacy |
| 7365 | * 1 = enhanced voice privacy |
| 7366 | * @hide |
| 7367 | */ |
| 7368 | public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled"; |
| 7369 | |
| 7370 | /** |
| 7371 | * Whether the TTY mode mode is enabled. |
| 7372 | * 0 = disabled |
| 7373 | * 1 = enabled |
| 7374 | * @hide |
| 7375 | */ |
| 7376 | public static final String TTY_MODE_ENABLED = "tty_mode_enabled"; |
| 7377 | |
| 7378 | /** |
| 7379 | * User-selected RTT mode. When on, outgoing and incoming calls will be answered as RTT |
| 7380 | * calls when supported by the device and carrier. Boolean value. |
| 7381 | * 0 = OFF |
| 7382 | * 1 = ON |
| 7383 | */ |
| 7384 | public static final String RTT_CALLING_MODE = "rtt_calling_mode"; |
| 7385 | |
| 7386 | /** |
| 7387 | /** |
| 7388 | * Controls whether settings backup is enabled. |
| 7389 | * Type: int ( 0 = disabled, 1 = enabled ) |
| 7390 | * @hide |
| 7391 | */ |
| 7392 | @UnsupportedAppUsage |
| 7393 | public static final String BACKUP_ENABLED = "backup_enabled"; |
| 7394 | |
| 7395 | /** |
| 7396 | * Controls whether application data is automatically restored from backup |
| 7397 | * at install time. |
| 7398 | * Type: int ( 0 = disabled, 1 = enabled ) |
| 7399 | * @hide |
| 7400 | */ |
| 7401 | @UnsupportedAppUsage |
| 7402 | public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore"; |
| 7403 | |
| 7404 | /** |
| 7405 | * Indicates whether settings backup has been fully provisioned. |
| 7406 | * Type: int ( 0 = unprovisioned, 1 = fully provisioned ) |
| 7407 | * @hide |
| 7408 | */ |
| 7409 | @UnsupportedAppUsage |
| 7410 | public static final String BACKUP_PROVISIONED = "backup_provisioned"; |
| 7411 | |
| 7412 | /** |
| 7413 | * Component of the transport to use for backup/restore. |
| 7414 | * @hide |
| 7415 | */ |
| 7416 | @UnsupportedAppUsage |
| 7417 | public static final String BACKUP_TRANSPORT = "backup_transport"; |
| 7418 | |
| 7419 | /** |
| 7420 | * Indicates the version for which the setup wizard was last shown. The version gets |
| 7421 | * bumped for each release when there is new setup information to show. |
| 7422 | * |
| 7423 | * @hide |
| 7424 | */ |
| 7425 | @SystemApi |
| 7426 | public static final String LAST_SETUP_SHOWN = "last_setup_shown"; |
| 7427 | |
| 7428 | /** |
| 7429 | * The interval in milliseconds after which Wi-Fi is considered idle. |
| 7430 | * When idle, it is possible for the device to be switched from Wi-Fi to |
| 7431 | * the mobile data network. |
| 7432 | * @hide |
| 7433 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_IDLE_MS} |
| 7434 | * instead. |
| 7435 | */ |
| 7436 | @Deprecated |
| 7437 | public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS; |
| 7438 | |
| 7439 | /** |
| 7440 | * The global search provider chosen by the user (if multiple global |
| 7441 | * search providers are installed). This will be the provider returned |
| 7442 | * by {@link SearchManager#getGlobalSearchActivity()} if it's still |
| 7443 | * installed. This setting is stored as a flattened component name as |
| 7444 | * per {@link ComponentName#flattenToString()}. |
| 7445 | * |
| 7446 | * @hide |
| 7447 | */ |
| 7448 | public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY = |
| 7449 | "search_global_search_activity"; |
| 7450 | |
| 7451 | /** |
| 7452 | * The number of promoted sources in GlobalSearch. |
| 7453 | * @hide |
| 7454 | */ |
| 7455 | public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources"; |
| 7456 | /** |
| 7457 | * The maximum number of suggestions returned by GlobalSearch. |
| 7458 | * @hide |
| 7459 | */ |
| 7460 | public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display"; |
| 7461 | /** |
| 7462 | * The number of suggestions GlobalSearch will ask each non-web search source for. |
| 7463 | * @hide |
| 7464 | */ |
| 7465 | public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source"; |
| 7466 | /** |
| 7467 | * The number of suggestions the GlobalSearch will ask the web search source for. |
| 7468 | * @hide |
| 7469 | */ |
| 7470 | public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT = |
| 7471 | "search_web_results_override_limit"; |
| 7472 | /** |
| 7473 | * The number of milliseconds that GlobalSearch will wait for suggestions from |
| 7474 | * promoted sources before continuing with all other sources. |
| 7475 | * @hide |
| 7476 | */ |
| 7477 | public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS = |
| 7478 | "search_promoted_source_deadline_millis"; |
| 7479 | /** |
| 7480 | * The number of milliseconds before GlobalSearch aborts search suggesiton queries. |
| 7481 | * @hide |
| 7482 | */ |
| 7483 | public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis"; |
| 7484 | /** |
| 7485 | * The maximum number of milliseconds that GlobalSearch shows the previous results |
| 7486 | * after receiving a new query. |
| 7487 | * @hide |
| 7488 | */ |
| 7489 | public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis"; |
| 7490 | /** |
| 7491 | * The maximum age of log data used for shortcuts in GlobalSearch. |
| 7492 | * @hide |
| 7493 | */ |
| 7494 | public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis"; |
| 7495 | /** |
| 7496 | * The maximum age of log data used for source ranking in GlobalSearch. |
| 7497 | * @hide |
| 7498 | */ |
| 7499 | public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS = |
| 7500 | "search_max_source_event_age_millis"; |
| 7501 | /** |
| 7502 | * The minimum number of impressions needed to rank a source in GlobalSearch. |
| 7503 | * @hide |
| 7504 | */ |
| 7505 | public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING = |
| 7506 | "search_min_impressions_for_source_ranking"; |
| 7507 | /** |
| 7508 | * The minimum number of clicks needed to rank a source in GlobalSearch. |
| 7509 | * @hide |
| 7510 | */ |
| 7511 | public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING = |
| 7512 | "search_min_clicks_for_source_ranking"; |
| 7513 | /** |
| 7514 | * The maximum number of shortcuts shown by GlobalSearch. |
| 7515 | * @hide |
| 7516 | */ |
| 7517 | public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned"; |
| 7518 | /** |
| 7519 | * The size of the core thread pool for suggestion queries in GlobalSearch. |
| 7520 | * @hide |
| 7521 | */ |
| 7522 | public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE = |
| 7523 | "search_query_thread_core_pool_size"; |
| 7524 | /** |
| 7525 | * The maximum size of the thread pool for suggestion queries in GlobalSearch. |
| 7526 | * @hide |
| 7527 | */ |
| 7528 | public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE = |
| 7529 | "search_query_thread_max_pool_size"; |
| 7530 | /** |
| 7531 | * The size of the core thread pool for shortcut refreshing in GlobalSearch. |
| 7532 | * @hide |
| 7533 | */ |
| 7534 | public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE = |
| 7535 | "search_shortcut_refresh_core_pool_size"; |
| 7536 | /** |
| 7537 | * The maximum size of the thread pool for shortcut refreshing in GlobalSearch. |
| 7538 | * @hide |
| 7539 | */ |
| 7540 | public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE = |
| 7541 | "search_shortcut_refresh_max_pool_size"; |
| 7542 | /** |
| 7543 | * The maximun time that excess threads in the GlobalSeach thread pools will |
| 7544 | * wait before terminating. |
| 7545 | * @hide |
| 7546 | */ |
| 7547 | public static final String SEARCH_THREAD_KEEPALIVE_SECONDS = |
| 7548 | "search_thread_keepalive_seconds"; |
| 7549 | /** |
| 7550 | * The maximum number of concurrent suggestion queries to each source. |
| 7551 | * @hide |
| 7552 | */ |
| 7553 | public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT = |
| 7554 | "search_per_source_concurrent_query_limit"; |
| 7555 | |
| 7556 | /** |
| 7557 | * Whether or not alert sounds are played on StorageManagerService events. |
| 7558 | * (0 = false, 1 = true) |
| 7559 | * @hide |
| 7560 | */ |
| 7561 | public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd"; |
| 7562 | |
| 7563 | /** |
| 7564 | * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true) |
| 7565 | * @hide |
| 7566 | */ |
| 7567 | public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart"; |
| 7568 | |
| 7569 | /** |
| 7570 | * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true) |
| 7571 | * @hide |
| 7572 | */ |
| 7573 | public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt"; |
| 7574 | |
| 7575 | /** |
| 7576 | * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true) |
| 7577 | * @hide |
| 7578 | */ |
| 7579 | public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled"; |
| 7580 | |
| 7581 | /** |
| 7582 | * If nonzero, ANRs in invisible background processes bring up a dialog. |
| 7583 | * Otherwise, the process will be silently killed. |
| 7584 | * |
| 7585 | * Also prevents ANRs and crash dialogs from being suppressed. |
| 7586 | * @hide |
| 7587 | */ |
| 7588 | @UnsupportedAppUsage |
| 7589 | public static final String ANR_SHOW_BACKGROUND = "anr_show_background"; |
| 7590 | |
| 7591 | /** |
| 7592 | * If nonzero, crashes in foreground processes will bring up a dialog. |
| 7593 | * Otherwise, the process will be silently killed. |
| 7594 | * @hide |
| 7595 | */ |
| 7596 | public static final String SHOW_FIRST_CRASH_DIALOG_DEV_OPTION = |
| 7597 | "show_first_crash_dialog_dev_option"; |
| 7598 | |
| 7599 | /** |
| 7600 | * The {@link ComponentName} string of the service to be used as the voice recognition |
| 7601 | * service. |
| 7602 | * |
| 7603 | * @hide |
| 7604 | */ |
| 7605 | @UnsupportedAppUsage |
| 7606 | public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service"; |
| 7607 | |
| 7608 | /** |
| 7609 | * The {@link ComponentName} string of the selected spell checker service which is |
| 7610 | * one of the services managed by the text service manager. |
| 7611 | * |
| 7612 | * @hide |
| 7613 | */ |
| 7614 | @UnsupportedAppUsage |
| 7615 | public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker"; |
| 7616 | |
| 7617 | /** |
| 7618 | * {@link android.view.textservice.SpellCheckerSubtype#hashCode()} of the selected subtype |
| 7619 | * of the selected spell checker service which is one of the services managed by the text |
| 7620 | * service manager. |
| 7621 | * |
| 7622 | * @hide |
| 7623 | */ |
| 7624 | @UnsupportedAppUsage |
| 7625 | public static final String SELECTED_SPELL_CHECKER_SUBTYPE = |
| 7626 | "selected_spell_checker_subtype"; |
| 7627 | |
| 7628 | /** |
| 7629 | * Whether spell checker is enabled or not. |
| 7630 | * |
| 7631 | * @hide |
| 7632 | */ |
| 7633 | public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled"; |
| 7634 | |
| 7635 | /** |
| 7636 | * What happens when the user presses the Power button while in-call |
| 7637 | * and the screen is on.<br/> |
| 7638 | * <b>Values:</b><br/> |
| 7639 | * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/> |
| 7640 | * 2 - The Power button hangs up the current call.<br/> |
| 7641 | * |
| 7642 | * @hide |
| 7643 | */ |
| 7644 | @UnsupportedAppUsage |
| 7645 | public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior"; |
| 7646 | |
| 7647 | /** |
| 7648 | * Whether the user allows minimal post processing or not. |
| 7649 | * |
| 7650 | * <p>Values: |
| 7651 | * 0 - Not allowed. Any preferences set through the Window.setPreferMinimalPostProcessing |
| 7652 | * API will be ignored. |
| 7653 | * 1 - Allowed. Any preferences set through the Window.setPreferMinimalPostProcessing API |
| 7654 | * will be respected and the appropriate signals will be sent to display. |
| 7655 | * (Default behaviour) |
| 7656 | * |
| 7657 | * @hide |
| 7658 | */ |
| 7659 | public static final String MINIMAL_POST_PROCESSING_ALLOWED = |
| 7660 | "minimal_post_processing_allowed"; |
| 7661 | |
| 7662 | /** |
| 7663 | * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen". |
| 7664 | * @hide |
| 7665 | */ |
| 7666 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1; |
| 7667 | |
| 7668 | /** |
| 7669 | * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up". |
| 7670 | * @hide |
| 7671 | */ |
| 7672 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2; |
| 7673 | |
| 7674 | /** |
| 7675 | * INCALL_POWER_BUTTON_BEHAVIOR default value. |
| 7676 | * @hide |
| 7677 | */ |
| 7678 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT = |
| 7679 | INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF; |
| 7680 | |
| 7681 | /** |
| 7682 | * What happens when the user presses the Back button while in-call |
| 7683 | * and the screen is on.<br/> |
| 7684 | * <b>Values:</b><br/> |
| 7685 | * 0 - The Back buttons does nothing different.<br/> |
| 7686 | * 1 - The Back button hangs up the current call.<br/> |
| 7687 | * |
| 7688 | * @hide |
| 7689 | */ |
| 7690 | public static final String INCALL_BACK_BUTTON_BEHAVIOR = "incall_back_button_behavior"; |
| 7691 | |
| 7692 | /** |
| 7693 | * INCALL_BACK_BUTTON_BEHAVIOR value for no action. |
| 7694 | * @hide |
| 7695 | */ |
| 7696 | public static final int INCALL_BACK_BUTTON_BEHAVIOR_NONE = 0x0; |
| 7697 | |
| 7698 | /** |
| 7699 | * INCALL_BACK_BUTTON_BEHAVIOR value for "hang up". |
| 7700 | * @hide |
| 7701 | */ |
| 7702 | public static final int INCALL_BACK_BUTTON_BEHAVIOR_HANGUP = 0x1; |
| 7703 | |
| 7704 | /** |
| 7705 | * INCALL_POWER_BUTTON_BEHAVIOR default value. |
| 7706 | * @hide |
| 7707 | */ |
| 7708 | public static final int INCALL_BACK_BUTTON_BEHAVIOR_DEFAULT = |
| 7709 | INCALL_BACK_BUTTON_BEHAVIOR_NONE; |
| 7710 | |
| 7711 | /** |
| 7712 | * Whether the device should wake when the wake gesture sensor detects motion. |
| 7713 | * @hide |
| 7714 | */ |
| 7715 | public static final String WAKE_GESTURE_ENABLED = "wake_gesture_enabled"; |
| 7716 | |
| 7717 | /** |
| 7718 | * Whether the device should doze if configured. |
| 7719 | * @hide |
| 7720 | */ |
| 7721 | @UnsupportedAppUsage |
| 7722 | public static final String DOZE_ENABLED = "doze_enabled"; |
| 7723 | |
| 7724 | /** |
| 7725 | * Indicates whether doze should be always on. |
| 7726 | * <p> |
| 7727 | * Type: int (0 for false, 1 for true) |
| 7728 | * |
| 7729 | * @hide |
| 7730 | */ |
| 7731 | @SystemApi |
| 7732 | @TestApi |
| 7733 | public static final String DOZE_ALWAYS_ON = "doze_always_on"; |
| 7734 | |
| 7735 | /** |
| 7736 | * Whether the device should pulse on pick up gesture. |
| 7737 | * @hide |
| 7738 | */ |
| 7739 | public static final String DOZE_PICK_UP_GESTURE = "doze_pulse_on_pick_up"; |
| 7740 | |
| 7741 | /** |
| 7742 | * Whether the device should pulse on long press gesture. |
| 7743 | * @hide |
| 7744 | */ |
| 7745 | public static final String DOZE_PULSE_ON_LONG_PRESS = "doze_pulse_on_long_press"; |
| 7746 | |
| 7747 | /** |
| 7748 | * Whether the device should pulse on double tap gesture. |
| 7749 | * @hide |
| 7750 | */ |
| 7751 | public static final String DOZE_DOUBLE_TAP_GESTURE = "doze_pulse_on_double_tap"; |
| 7752 | |
| 7753 | /** |
| 7754 | * Whether the device should respond to the SLPI tap gesture. |
| 7755 | * @hide |
| 7756 | */ |
| 7757 | public static final String DOZE_TAP_SCREEN_GESTURE = "doze_tap_gesture"; |
| 7758 | |
| 7759 | /** |
| 7760 | * Gesture that wakes up the display, showing some version of the lock screen. |
| 7761 | * @hide |
| 7762 | */ |
| 7763 | public static final String DOZE_WAKE_LOCK_SCREEN_GESTURE = "doze_wake_screen_gesture"; |
| 7764 | |
| 7765 | /** |
| 7766 | * Gesture that wakes up the display, toggling between {@link Display.STATE_OFF} and |
| 7767 | * {@link Display.STATE_DOZE}. |
| 7768 | * @hide |
| 7769 | */ |
| 7770 | public static final String DOZE_WAKE_DISPLAY_GESTURE = "doze_wake_display_gesture"; |
| 7771 | |
| 7772 | /** |
| 7773 | * Whether the device should suppress the current doze configuration and disable dozing. |
| 7774 | * @hide |
| 7775 | */ |
| 7776 | public static final String SUPPRESS_DOZE = "suppress_doze"; |
| 7777 | |
| 7778 | /** |
| 7779 | * Gesture that skips media. |
| 7780 | * @hide |
| 7781 | */ |
| 7782 | public static final String SKIP_GESTURE = "skip_gesture"; |
| 7783 | |
| 7784 | /** |
| 7785 | * Count of successful gestures. |
| 7786 | * @hide |
| 7787 | */ |
| 7788 | public static final String SKIP_GESTURE_COUNT = "skip_gesture_count"; |
| 7789 | |
| 7790 | /** |
| 7791 | * Count of non-gesture interaction. |
| 7792 | * @hide |
| 7793 | */ |
| 7794 | public static final String SKIP_TOUCH_COUNT = "skip_touch_count"; |
| 7795 | |
| 7796 | /** |
| 7797 | * Direction to advance media for skip gesture |
| 7798 | * @hide |
| 7799 | */ |
| 7800 | public static final String SKIP_DIRECTION = "skip_gesture_direction"; |
| 7801 | |
| 7802 | /** |
| 7803 | * Gesture that silences sound (alarms, notification, calls). |
| 7804 | * @hide |
| 7805 | */ |
| 7806 | public static final String SILENCE_GESTURE = "silence_gesture"; |
| 7807 | |
| 7808 | /** |
| 7809 | * Count of successful silence alarms gestures. |
| 7810 | * @hide |
| 7811 | */ |
| 7812 | public static final String SILENCE_ALARMS_GESTURE_COUNT = "silence_alarms_gesture_count"; |
| 7813 | |
| 7814 | /** |
| 7815 | * Count of successful silence timer gestures. |
| 7816 | * @hide |
| 7817 | */ |
| 7818 | public static final String SILENCE_TIMER_GESTURE_COUNT = "silence_timer_gesture_count"; |
| 7819 | |
| 7820 | /** |
| 7821 | * Count of successful silence call gestures. |
| 7822 | * @hide |
| 7823 | */ |
| 7824 | public static final String SILENCE_CALL_GESTURE_COUNT = "silence_call_gesture_count"; |
| 7825 | |
| 7826 | /** |
| 7827 | * Count of non-gesture interaction. |
| 7828 | * @hide |
| 7829 | */ |
| 7830 | public static final String SILENCE_ALARMS_TOUCH_COUNT = "silence_alarms_touch_count"; |
| 7831 | |
| 7832 | /** |
| 7833 | * Count of non-gesture interaction. |
| 7834 | * @hide |
| 7835 | */ |
| 7836 | public static final String SILENCE_TIMER_TOUCH_COUNT = "silence_timer_touch_count"; |
| 7837 | |
| 7838 | /** |
| 7839 | * Count of non-gesture interaction. |
| 7840 | * @hide |
| 7841 | */ |
| 7842 | public static final String SILENCE_CALL_TOUCH_COUNT = "silence_call_touch_count"; |
| 7843 | |
| 7844 | /** |
| 7845 | * Number of successful "Motion Sense" tap gestures to pause media. |
| 7846 | * @hide |
| 7847 | */ |
| 7848 | public static final String AWARE_TAP_PAUSE_GESTURE_COUNT = "aware_tap_pause_gesture_count"; |
| 7849 | |
| 7850 | /** |
| 7851 | * Number of touch interactions to pause media when a "Motion Sense" gesture could |
| 7852 | * have been used. |
| 7853 | * @hide |
| 7854 | */ |
| 7855 | public static final String AWARE_TAP_PAUSE_TOUCH_COUNT = "aware_tap_pause_touch_count"; |
| 7856 | |
| 7857 | /** |
| 7858 | * The current night mode that has been selected by the user. Owned |
| 7859 | * and controlled by UiModeManagerService. Constants are as per |
| 7860 | * UiModeManager. |
| 7861 | * @hide |
| 7862 | */ |
| 7863 | public static final String UI_NIGHT_MODE = "ui_night_mode"; |
| 7864 | |
| 7865 | /** |
| 7866 | * The current night mode that has been overridden to turn on by the system. Owned |
| 7867 | * and controlled by UiModeManagerService. Constants are as per |
| 7868 | * UiModeManager. |
| 7869 | * @hide |
| 7870 | */ |
| 7871 | public static final String UI_NIGHT_MODE_OVERRIDE_ON = "ui_night_mode_override_on"; |
| 7872 | |
| 7873 | /** |
| 7874 | * The current night mode that has been overridden to turn off by the system. Owned |
| 7875 | * and controlled by UiModeManagerService. Constants are as per |
| 7876 | * UiModeManager. |
| 7877 | * @hide |
| 7878 | */ |
| 7879 | public static final String UI_NIGHT_MODE_OVERRIDE_OFF = "ui_night_mode_override_off"; |
| 7880 | |
| 7881 | /** |
| 7882 | * Whether screensavers are enabled. |
| 7883 | * @hide |
| 7884 | */ |
| 7885 | public static final String SCREENSAVER_ENABLED = "screensaver_enabled"; |
| 7886 | |
| 7887 | /** |
| 7888 | * The user's chosen screensaver components. |
| 7889 | * |
| 7890 | * These will be launched by the PhoneWindowManager after a timeout when not on |
| 7891 | * battery, or upon dock insertion (if SCREENSAVER_ACTIVATE_ON_DOCK is set to 1). |
| 7892 | * @hide |
| 7893 | */ |
| 7894 | public static final String SCREENSAVER_COMPONENTS = "screensaver_components"; |
| 7895 | |
| 7896 | /** |
| 7897 | * If screensavers are enabled, whether the screensaver should be automatically launched |
| 7898 | * when the device is inserted into a (desk) dock. |
| 7899 | * @hide |
| 7900 | */ |
| 7901 | public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock"; |
| 7902 | |
| 7903 | /** |
| 7904 | * If screensavers are enabled, whether the screensaver should be automatically launched |
| 7905 | * when the screen times out when not on battery. |
| 7906 | * @hide |
| 7907 | */ |
| 7908 | public static final String SCREENSAVER_ACTIVATE_ON_SLEEP = "screensaver_activate_on_sleep"; |
| 7909 | |
| 7910 | /** |
| 7911 | * If screensavers are enabled, the default screensaver component. |
| 7912 | * @hide |
| 7913 | */ |
| 7914 | public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component"; |
| 7915 | |
| 7916 | /** |
| 7917 | * The default NFC payment component |
| 7918 | * @hide |
| 7919 | */ |
| 7920 | @UnsupportedAppUsage |
| 7921 | @TestApi |
| 7922 | public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component"; |
| 7923 | |
| 7924 | /** |
| 7925 | * Whether NFC payment is handled by the foreground application or a default. |
| 7926 | * @hide |
| 7927 | */ |
| 7928 | public static final String NFC_PAYMENT_FOREGROUND = "nfc_payment_foreground"; |
| 7929 | |
| 7930 | /** |
| 7931 | * Specifies the package name currently configured to be the primary sms application |
| 7932 | * @hide |
| 7933 | */ |
| 7934 | @UnsupportedAppUsage |
| 7935 | public static final String SMS_DEFAULT_APPLICATION = "sms_default_application"; |
| 7936 | |
| 7937 | /** |
| 7938 | * Specifies the package name currently configured to be the default dialer application |
| 7939 | * @hide |
| 7940 | */ |
| 7941 | @UnsupportedAppUsage |
| 7942 | public static final String DIALER_DEFAULT_APPLICATION = "dialer_default_application"; |
| 7943 | |
| 7944 | /** |
| 7945 | * Specifies the component name currently configured to be the default call screening |
| 7946 | * application |
| 7947 | * @hide |
| 7948 | */ |
| 7949 | public static final String CALL_SCREENING_DEFAULT_COMPONENT = |
| 7950 | "call_screening_default_component"; |
| 7951 | |
| 7952 | /** |
| 7953 | * Specifies the package name currently configured to be the emergency assistance application |
| 7954 | * |
| 7955 | * @see android.telephony.TelephonyManager#ACTION_EMERGENCY_ASSISTANCE |
| 7956 | * |
| 7957 | * @hide |
| 7958 | */ |
| 7959 | public static final String EMERGENCY_ASSISTANCE_APPLICATION = "emergency_assistance_application"; |
| 7960 | |
| 7961 | /** |
| 7962 | * Specifies whether the current app context on scren (assist data) will be sent to the |
| 7963 | * assist application (active voice interaction service). |
| 7964 | * |
| 7965 | * @hide |
| 7966 | */ |
| 7967 | public static final String ASSIST_STRUCTURE_ENABLED = "assist_structure_enabled"; |
| 7968 | |
| 7969 | /** |
| 7970 | * Specifies whether a screenshot of the screen contents will be sent to the assist |
| 7971 | * application (active voice interaction service). |
| 7972 | * |
| 7973 | * @hide |
| 7974 | */ |
| 7975 | public static final String ASSIST_SCREENSHOT_ENABLED = "assist_screenshot_enabled"; |
| 7976 | |
| 7977 | /** |
| 7978 | * Specifies whether the screen will show an animation if screen contents are sent to the |
| 7979 | * assist application (active voice interaction service). |
| 7980 | * |
| 7981 | * Note that the disclosure will be forced for third-party assistants or if the device |
| 7982 | * does not support disabling it. |
| 7983 | * |
| 7984 | * @hide |
| 7985 | */ |
| 7986 | public static final String ASSIST_DISCLOSURE_ENABLED = "assist_disclosure_enabled"; |
| 7987 | |
| 7988 | /** |
| 7989 | * Control if rotation suggestions are sent to System UI when in rotation locked mode. |
| 7990 | * Done to enable screen rotation while the the screen rotation is locked. Enabling will |
| 7991 | * poll the accelerometer in rotation locked mode. |
| 7992 | * |
| 7993 | * If 0, then rotation suggestions are not sent to System UI. If 1, suggestions are sent. |
| 7994 | * |
| 7995 | * @hide |
| 7996 | */ |
| 7997 | |
| 7998 | public static final String SHOW_ROTATION_SUGGESTIONS = "show_rotation_suggestions"; |
| 7999 | |
| 8000 | /** |
| 8001 | * The disabled state of SHOW_ROTATION_SUGGESTIONS. |
| 8002 | * @hide |
| 8003 | */ |
| 8004 | public static final int SHOW_ROTATION_SUGGESTIONS_DISABLED = 0x0; |
| 8005 | |
| 8006 | /** |
| 8007 | * The enabled state of SHOW_ROTATION_SUGGESTIONS. |
| 8008 | * @hide |
| 8009 | */ |
| 8010 | public static final int SHOW_ROTATION_SUGGESTIONS_ENABLED = 0x1; |
| 8011 | |
| 8012 | /** |
| 8013 | * The default state of SHOW_ROTATION_SUGGESTIONS. |
| 8014 | * @hide |
| 8015 | */ |
| 8016 | public static final int SHOW_ROTATION_SUGGESTIONS_DEFAULT = |
| 8017 | SHOW_ROTATION_SUGGESTIONS_ENABLED; |
| 8018 | |
| 8019 | /** |
| 8020 | * The number of accepted rotation suggestions. Used to determine if the user has been |
| 8021 | * introduced to rotation suggestions. |
| 8022 | * @hide |
| 8023 | */ |
| 8024 | public static final String NUM_ROTATION_SUGGESTIONS_ACCEPTED = |
| 8025 | "num_rotation_suggestions_accepted"; |
| 8026 | |
| 8027 | /** |
| 8028 | * Read only list of the service components that the current user has explicitly allowed to |
| 8029 | * see and assist with all of the user's notifications. |
| 8030 | * |
| 8031 | * @deprecated Use |
| 8032 | * {@link NotificationManager#isNotificationAssistantAccessGranted(ComponentName)}. |
| 8033 | * @hide |
| 8034 | */ |
| 8035 | @Deprecated |
| 8036 | public static final String ENABLED_NOTIFICATION_ASSISTANT = |
| 8037 | "enabled_notification_assistant"; |
| 8038 | |
| 8039 | /** |
| 8040 | * Read only list of the service components that the current user has explicitly allowed to |
| 8041 | * see all of the user's notifications, separated by ':'. |
| 8042 | * |
| 8043 | * @hide |
| 8044 | * @deprecated Use |
| 8045 | * {@link NotificationManager#isNotificationListenerAccessGranted(ComponentName)}. |
| 8046 | */ |
| 8047 | @Deprecated |
| 8048 | @UnsupportedAppUsage |
| 8049 | public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners"; |
| 8050 | |
| 8051 | /** |
| 8052 | * Read only list of the packages that the current user has explicitly allowed to |
| 8053 | * manage do not disturb, separated by ':'. |
| 8054 | * |
| 8055 | * @deprecated Use {@link NotificationManager#isNotificationPolicyAccessGranted()}. |
| 8056 | * @hide |
| 8057 | */ |
| 8058 | @Deprecated |
| 8059 | @TestApi |
| 8060 | public static final String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES = |
| 8061 | "enabled_notification_policy_access_packages"; |
| 8062 | |
| 8063 | /** |
| 8064 | * Defines whether managed profile ringtones should be synced from it's parent profile |
| 8065 | * <p> |
| 8066 | * 0 = ringtones are not synced |
| 8067 | * 1 = ringtones are synced from the profile's parent (default) |
| 8068 | * <p> |
| 8069 | * This value is only used for managed profiles. |
| 8070 | * @hide |
| 8071 | */ |
| 8072 | @TestApi |
| 8073 | @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) |
| 8074 | public static final String SYNC_PARENT_SOUNDS = "sync_parent_sounds"; |
| 8075 | |
| 8076 | /** |
| 8077 | * @hide |
| 8078 | */ |
| 8079 | @UnsupportedAppUsage |
| 8080 | @TestApi |
| 8081 | public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations"; |
| 8082 | |
| 8083 | /** |
| 8084 | * This is the query URI for finding a print service to install. |
| 8085 | * |
| 8086 | * @hide |
| 8087 | */ |
| 8088 | public static final String PRINT_SERVICE_SEARCH_URI = "print_service_search_uri"; |
| 8089 | |
| 8090 | /** |
| 8091 | * This is the query URI for finding a NFC payment service to install. |
| 8092 | * |
| 8093 | * @hide |
| 8094 | */ |
| 8095 | public static final String PAYMENT_SERVICE_SEARCH_URI = "payment_service_search_uri"; |
| 8096 | |
| 8097 | /** |
| 8098 | * This is the query URI for finding a auto fill service to install. |
| 8099 | * |
| 8100 | * @hide |
| 8101 | */ |
| 8102 | public static final String AUTOFILL_SERVICE_SEARCH_URI = "autofill_service_search_uri"; |
| 8103 | |
| 8104 | /** |
| 8105 | * If enabled, apps should try to skip any introductory hints on first launch. This might |
| 8106 | * apply to users that are already familiar with the environment or temporary users. |
| 8107 | * <p> |
| 8108 | * Type : int (0 to show hints, 1 to skip showing hints) |
| 8109 | */ |
| 8110 | public static final String SKIP_FIRST_USE_HINTS = "skip_first_use_hints"; |
| 8111 | |
| 8112 | /** |
| 8113 | * Persisted playback time after a user confirmation of an unsafe volume level. |
| 8114 | * |
| 8115 | * @hide |
| 8116 | */ |
| 8117 | public static final String UNSAFE_VOLUME_MUSIC_ACTIVE_MS = "unsafe_volume_music_active_ms"; |
| 8118 | |
| 8119 | /** |
| 8120 | * Indicates whether notification display on the lock screen is enabled. |
| 8121 | * <p> |
| 8122 | * Type: int (0 for false, 1 for true) |
| 8123 | * |
| 8124 | * @hide |
| 8125 | */ |
| 8126 | @SystemApi |
| 8127 | @TestApi |
| 8128 | public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = |
| 8129 | "lock_screen_show_notifications"; |
| 8130 | |
| 8131 | /** |
| 8132 | * Indicates whether the lock screen should display silent notifications. |
| 8133 | * <p> |
| 8134 | * Type: int (0 for false, 1 for true) |
| 8135 | * |
| 8136 | * @hide |
| 8137 | */ |
| 8138 | public static final String LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS = |
| 8139 | "lock_screen_show_silent_notifications"; |
| 8140 | |
| 8141 | /** |
| 8142 | * Indicates whether snooze options should be shown on notifications |
| 8143 | * <p> |
| 8144 | * Type: int (0 for false, 1 for true) |
| 8145 | * |
| 8146 | * @hide |
| 8147 | */ |
| 8148 | public static final String SHOW_NOTIFICATION_SNOOZE = "show_notification_snooze"; |
| 8149 | |
| 8150 | /** |
| 8151 | * List of TV inputs that are currently hidden. This is a string |
| 8152 | * containing the IDs of all hidden TV inputs. Each ID is encoded by |
| 8153 | * {@link android.net.Uri#encode(String)} and separated by ':'. |
| 8154 | * @hide |
| 8155 | */ |
| 8156 | public static final String TV_INPUT_HIDDEN_INPUTS = "tv_input_hidden_inputs"; |
| 8157 | |
| 8158 | /** |
| 8159 | * List of custom TV input labels. This is a string containing <TV input id, custom name> |
| 8160 | * pairs. TV input id and custom name are encoded by {@link android.net.Uri#encode(String)} |
| 8161 | * and separated by ','. Each pair is separated by ':'. |
| 8162 | * @hide |
| 8163 | */ |
| 8164 | public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels"; |
| 8165 | |
| 8166 | /** |
| 8167 | * Whether TV app uses non-system inputs. |
| 8168 | * |
| 8169 | * <p> |
| 8170 | * The value is boolean (1 or 0), where 1 means non-system TV inputs are allowed, |
| 8171 | * and 0 means non-system TV inputs are not allowed. |
| 8172 | * |
| 8173 | * <p> |
| 8174 | * Devices such as sound bars may have changed the system property allow_third_party_inputs |
| 8175 | * to false so the TV Application only uses HDMI and other built in inputs. This setting |
| 8176 | * allows user to override the default and have the TV Application use third party TV inputs |
| 8177 | * available on play store. |
| 8178 | * |
| 8179 | * @hide |
| 8180 | */ |
| 8181 | public static final String TV_APP_USES_NON_SYSTEM_INPUTS = "tv_app_uses_non_system_inputs"; |
| 8182 | |
| 8183 | /** |
| 8184 | * Whether automatic routing of system audio to USB audio peripheral is disabled. |
| 8185 | * The value is boolean (1 or 0), where 1 means automatic routing is disabled, |
| 8186 | * and 0 means automatic routing is enabled. |
| 8187 | * |
| 8188 | * @hide |
| 8189 | */ |
| 8190 | public static final String USB_AUDIO_AUTOMATIC_ROUTING_DISABLED = |
| 8191 | "usb_audio_automatic_routing_disabled"; |
| 8192 | |
| 8193 | /** |
| 8194 | * The timeout in milliseconds before the device fully goes to sleep after |
| 8195 | * a period of inactivity. This value sets an upper bound on how long the device |
| 8196 | * will stay awake or dreaming without user activity. It should generally |
| 8197 | * be longer than {@link Settings.System#SCREEN_OFF_TIMEOUT} as otherwise the device |
| 8198 | * will sleep before it ever has a chance to dream. |
| 8199 | * <p> |
| 8200 | * Use -1 to disable this timeout. |
| 8201 | * </p> |
| 8202 | * |
| 8203 | * @hide |
| 8204 | */ |
| 8205 | public static final String SLEEP_TIMEOUT = "sleep_timeout"; |
| 8206 | |
| 8207 | /** |
| 8208 | * The timeout in milliseconds before the device goes to sleep due to user inattentiveness, |
| 8209 | * even if the system is holding wakelocks. It should generally be longer than {@code |
| 8210 | * config_attentiveWarningDuration}, as otherwise the device will show the attentive |
| 8211 | * warning constantly. Small timeouts are discouraged, as they will cause the device to |
| 8212 | * go to sleep quickly after waking up. |
| 8213 | * <p> |
| 8214 | * Use -1 to disable this timeout. |
| 8215 | * </p> |
| 8216 | * |
| 8217 | * @hide |
| 8218 | */ |
| 8219 | public static final String ATTENTIVE_TIMEOUT = "attentive_timeout"; |
| 8220 | |
| 8221 | /** |
| 8222 | * Controls whether double tap to wake is enabled. |
| 8223 | * @hide |
| 8224 | */ |
| 8225 | public static final String DOUBLE_TAP_TO_WAKE = "double_tap_to_wake"; |
| 8226 | |
| 8227 | /** |
| 8228 | * The current assistant component. It could be a voice interaction service, |
| 8229 | * or an activity that handles ACTION_ASSIST, or empty which means using the default |
| 8230 | * handling. |
| 8231 | * |
| 8232 | * <p>This should be set indirectly by setting the {@link |
| 8233 | * android.app.role.RoleManager#ROLE_ASSISTANT assistant role}. |
| 8234 | * |
| 8235 | * @hide |
| 8236 | */ |
| 8237 | @UnsupportedAppUsage |
| 8238 | public static final String ASSISTANT = "assistant"; |
| 8239 | |
| 8240 | /** |
| 8241 | * Whether the camera launch gesture should be disabled. |
| 8242 | * |
| 8243 | * @hide |
| 8244 | */ |
| 8245 | public static final String CAMERA_GESTURE_DISABLED = "camera_gesture_disabled"; |
| 8246 | |
| 8247 | /** |
| 8248 | * Whether the camera launch gesture to double tap the power button when the screen is off |
| 8249 | * should be disabled. |
| 8250 | * |
| 8251 | * @hide |
| 8252 | */ |
| 8253 | public static final String CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED = |
| 8254 | "camera_double_tap_power_gesture_disabled"; |
| 8255 | |
| 8256 | /** |
| 8257 | * Whether the camera double twist gesture to flip between front and back mode should be |
| 8258 | * enabled. |
| 8259 | * |
| 8260 | * @hide |
| 8261 | */ |
| 8262 | public static final String CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED = |
| 8263 | "camera_double_twist_to_flip_enabled"; |
| 8264 | |
| 8265 | /** |
| 8266 | * Whether or not the smart camera lift trigger that launches the camera when the user moves |
| 8267 | * the phone into a position for taking photos should be enabled. |
| 8268 | * |
| 8269 | * @hide |
| 8270 | */ |
| 8271 | public static final String CAMERA_LIFT_TRIGGER_ENABLED = "camera_lift_trigger_enabled"; |
| 8272 | |
| 8273 | /** |
| 8274 | * The default enable state of the camera lift trigger. |
| 8275 | * |
| 8276 | * @hide |
| 8277 | */ |
| 8278 | public static final int CAMERA_LIFT_TRIGGER_ENABLED_DEFAULT = 1; |
| 8279 | |
| 8280 | /** |
| 8281 | * Whether or not the flashlight (camera torch mode) is available required to turn |
| 8282 | * on flashlight. |
| 8283 | * |
| 8284 | * @hide |
| 8285 | */ |
| 8286 | public static final String FLASHLIGHT_AVAILABLE = "flashlight_available"; |
| 8287 | |
| 8288 | /** |
| 8289 | * Whether or not flashlight is enabled. |
| 8290 | * |
| 8291 | * @hide |
| 8292 | */ |
| 8293 | public static final String FLASHLIGHT_ENABLED = "flashlight_enabled"; |
| 8294 | |
| 8295 | /** |
| 8296 | * Whether or not face unlock is allowed on Keyguard. |
| 8297 | * @hide |
| 8298 | */ |
| 8299 | public static final String FACE_UNLOCK_KEYGUARD_ENABLED = "face_unlock_keyguard_enabled"; |
| 8300 | |
| 8301 | /** |
| 8302 | * Whether or not face unlock dismisses the keyguard. |
| 8303 | * @hide |
| 8304 | */ |
| 8305 | public static final String FACE_UNLOCK_DISMISSES_KEYGUARD = |
| 8306 | "face_unlock_dismisses_keyguard"; |
| 8307 | |
| 8308 | /** |
| 8309 | * Whether or not media is shown automatically when bypassing as a heads up. |
| 8310 | * @hide |
| 8311 | */ |
| 8312 | public static final String SHOW_MEDIA_WHEN_BYPASSING = |
| 8313 | "show_media_when_bypassing"; |
| 8314 | |
| 8315 | /** |
| 8316 | * Whether or not face unlock requires attention. This is a cached value, the source of |
| 8317 | * truth is obtained through the HAL. |
| 8318 | * @hide |
| 8319 | */ |
| 8320 | public static final String FACE_UNLOCK_ATTENTION_REQUIRED = |
| 8321 | "face_unlock_attention_required"; |
| 8322 | |
| 8323 | /** |
| 8324 | * Whether or not face unlock requires a diverse set of poses during enrollment. This is a |
| 8325 | * cached value, the source of truth is obtained through the HAL. |
| 8326 | * @hide |
| 8327 | */ |
| 8328 | public static final String FACE_UNLOCK_DIVERSITY_REQUIRED = |
| 8329 | "face_unlock_diversity_required"; |
| 8330 | |
| 8331 | |
| 8332 | /** |
| 8333 | * Whether or not face unlock is allowed for apps (through BiometricPrompt). |
| 8334 | * @hide |
| 8335 | */ |
| 8336 | public static final String FACE_UNLOCK_APP_ENABLED = "face_unlock_app_enabled"; |
| 8337 | |
| 8338 | /** |
| 8339 | * Whether or not face unlock always requires user confirmation, meaning {@link |
| 8340 | * android.hardware.biometrics.BiometricPrompt.Builder#setConfirmationRequired(boolean)} |
| 8341 | * is always 'true'. This overrides the behavior that apps choose in the |
| 8342 | * setConfirmationRequired API. |
| 8343 | * @hide |
| 8344 | */ |
| 8345 | public static final String FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION = |
| 8346 | "face_unlock_always_require_confirmation"; |
| 8347 | |
| 8348 | /** |
| 8349 | * Whether or not a user should re enroll their face. |
| 8350 | * |
| 8351 | * Face unlock re enroll. |
| 8352 | * 0 = No re enrollment. |
| 8353 | * 1 = Re enrollment is suggested. |
| 8354 | * 2 = Re enrollment is required after a set time period. |
| 8355 | * 3 = Re enrollment is required immediately. |
| 8356 | * |
| 8357 | * @hide |
| 8358 | */ |
| 8359 | public static final String FACE_UNLOCK_RE_ENROLL = "face_unlock_re_enroll"; |
| 8360 | |
| 8361 | /** |
| 8362 | * Whether or not debugging is enabled. |
| 8363 | * @hide |
| 8364 | */ |
| 8365 | public static final String BIOMETRIC_DEBUG_ENABLED = |
| 8366 | "biometric_debug_enabled"; |
| 8367 | |
| 8368 | /** |
| 8369 | * Whether the assist gesture should be enabled. |
| 8370 | * |
| 8371 | * @hide |
| 8372 | */ |
| 8373 | public static final String ASSIST_GESTURE_ENABLED = "assist_gesture_enabled"; |
| 8374 | |
| 8375 | /** |
| 8376 | * Sensitivity control for the assist gesture. |
| 8377 | * |
| 8378 | * @hide |
| 8379 | */ |
| 8380 | public static final String ASSIST_GESTURE_SENSITIVITY = "assist_gesture_sensitivity"; |
| 8381 | |
| 8382 | /** |
| 8383 | * Whether the assist gesture should silence alerts. |
| 8384 | * |
| 8385 | * @hide |
| 8386 | */ |
| 8387 | public static final String ASSIST_GESTURE_SILENCE_ALERTS_ENABLED = |
| 8388 | "assist_gesture_silence_alerts_enabled"; |
| 8389 | |
| 8390 | /** |
| 8391 | * Whether the assist gesture should wake the phone. |
| 8392 | * |
| 8393 | * @hide |
| 8394 | */ |
| 8395 | public static final String ASSIST_GESTURE_WAKE_ENABLED = |
| 8396 | "assist_gesture_wake_enabled"; |
| 8397 | |
| 8398 | /** |
| 8399 | * Indicates whether the Assist Gesture Deferred Setup has been completed. |
| 8400 | * <p> |
| 8401 | * Type: int (0 for false, 1 for true) |
| 8402 | * |
| 8403 | * @hide |
| 8404 | */ |
| 8405 | @SystemApi |
| 8406 | public static final String ASSIST_GESTURE_SETUP_COMPLETE = "assist_gesture_setup_complete"; |
| 8407 | |
| 8408 | /** |
| 8409 | * Control whether Trust Agents are in active unlock or extend unlock mode. |
| 8410 | * @hide |
| 8411 | */ |
| 8412 | public static final String TRUST_AGENTS_EXTEND_UNLOCK = "trust_agents_extend_unlock"; |
| 8413 | |
| 8414 | /** |
| 8415 | * Control whether the screen locks when trust is lost. |
| 8416 | * @hide |
| 8417 | */ |
| 8418 | public static final String LOCK_SCREEN_WHEN_TRUST_LOST = "lock_screen_when_trust_lost"; |
| 8419 | |
| 8420 | /** |
| 8421 | * Control whether Night display is currently activated. |
| 8422 | * @hide |
| 8423 | */ |
| 8424 | public static final String NIGHT_DISPLAY_ACTIVATED = "night_display_activated"; |
| 8425 | |
| 8426 | /** |
| 8427 | * Control whether Night display will automatically activate/deactivate. |
| 8428 | * @hide |
| 8429 | */ |
| 8430 | public static final String NIGHT_DISPLAY_AUTO_MODE = "night_display_auto_mode"; |
| 8431 | |
| 8432 | /** |
| 8433 | * Control the color temperature of Night Display, represented in Kelvin. |
| 8434 | * @hide |
| 8435 | */ |
| 8436 | public static final String NIGHT_DISPLAY_COLOR_TEMPERATURE = |
| 8437 | "night_display_color_temperature"; |
| 8438 | |
| 8439 | /** |
| 8440 | * Custom time when Night display is scheduled to activate. |
| 8441 | * Represented as milliseconds from midnight (e.g. 79200000 == 10pm). |
| 8442 | * @hide |
| 8443 | */ |
| 8444 | public static final String NIGHT_DISPLAY_CUSTOM_START_TIME = |
| 8445 | "night_display_custom_start_time"; |
| 8446 | |
| 8447 | /** |
| 8448 | * Custom time when Night display is scheduled to deactivate. |
| 8449 | * Represented as milliseconds from midnight (e.g. 21600000 == 6am). |
| 8450 | * @hide |
| 8451 | */ |
| 8452 | public static final String NIGHT_DISPLAY_CUSTOM_END_TIME = "night_display_custom_end_time"; |
| 8453 | |
| 8454 | /** |
| 8455 | * A String representing the LocalDateTime when Night display was last activated. Use to |
| 8456 | * decide whether to apply the current activated state after a reboot or user change. In |
| 8457 | * legacy cases, this is represented by the time in milliseconds (since epoch). |
| 8458 | * @hide |
| 8459 | */ |
| 8460 | public static final String NIGHT_DISPLAY_LAST_ACTIVATED_TIME = |
| 8461 | "night_display_last_activated_time"; |
| 8462 | |
| 8463 | /** |
| 8464 | * Control whether display white balance is currently enabled. |
| 8465 | * @hide |
| 8466 | */ |
| 8467 | public static final String DISPLAY_WHITE_BALANCE_ENABLED = "display_white_balance_enabled"; |
| 8468 | |
| 8469 | /** |
| 8470 | * Names of the service components that the current user has explicitly allowed to |
| 8471 | * be a VR mode listener, separated by ':'. |
| 8472 | * |
| 8473 | * @hide |
| 8474 | */ |
| 8475 | @UnsupportedAppUsage |
| 8476 | @TestApi |
| 8477 | public static final String ENABLED_VR_LISTENERS = "enabled_vr_listeners"; |
| 8478 | |
| 8479 | /** |
| 8480 | * Behavior of the display while in VR mode. |
| 8481 | * |
| 8482 | * One of {@link #VR_DISPLAY_MODE_LOW_PERSISTENCE} or {@link #VR_DISPLAY_MODE_OFF}. |
| 8483 | * |
| 8484 | * @hide |
| 8485 | */ |
| 8486 | public static final String VR_DISPLAY_MODE = "vr_display_mode"; |
| 8487 | |
| 8488 | /** |
| 8489 | * Lower the display persistence while the system is in VR mode. |
| 8490 | * |
| 8491 | * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE |
| 8492 | * |
| 8493 | * @hide. |
| 8494 | */ |
| 8495 | public static final int VR_DISPLAY_MODE_LOW_PERSISTENCE = 0; |
| 8496 | |
| 8497 | /** |
| 8498 | * Do not alter the display persistence while the system is in VR mode. |
| 8499 | * |
| 8500 | * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE |
| 8501 | * |
| 8502 | * @hide. |
| 8503 | */ |
| 8504 | public static final int VR_DISPLAY_MODE_OFF = 1; |
| 8505 | |
| 8506 | /** |
| 8507 | * Whether CarrierAppUtils#disableCarrierAppsUntilPrivileged has been executed at least |
| 8508 | * once. |
| 8509 | * |
| 8510 | * <p>This is used to ensure that we only take one pass which will disable apps that are not |
| 8511 | * privileged (if any). From then on, we only want to enable apps (when a matching SIM is |
| 8512 | * inserted), to avoid disabling an app that the user might actively be using. |
| 8513 | * |
| 8514 | * <p>Will be set to 1 once executed. |
| 8515 | * |
| 8516 | * @hide |
| 8517 | */ |
| 8518 | public static final String CARRIER_APPS_HANDLED = "carrier_apps_handled"; |
| 8519 | |
| 8520 | /** |
| 8521 | * Whether parent user can access remote contact in managed profile. |
| 8522 | * |
| 8523 | * @hide |
| 8524 | */ |
| 8525 | public static final String MANAGED_PROFILE_CONTACT_REMOTE_SEARCH = |
| 8526 | "managed_profile_contact_remote_search"; |
| 8527 | |
| 8528 | /** |
| 8529 | * Whether parent profile can access remote calendar data in managed profile. |
| 8530 | * |
| 8531 | * @hide |
| 8532 | */ |
| 8533 | public static final String CROSS_PROFILE_CALENDAR_ENABLED = |
| 8534 | "cross_profile_calendar_enabled"; |
| 8535 | |
| 8536 | /** |
| 8537 | * Whether or not the automatic storage manager is enabled and should run on the device. |
| 8538 | * |
| 8539 | * @hide |
| 8540 | */ |
| 8541 | public static final String AUTOMATIC_STORAGE_MANAGER_ENABLED = |
| 8542 | "automatic_storage_manager_enabled"; |
| 8543 | |
| 8544 | /** |
| 8545 | * How many days of information for the automatic storage manager to retain on the device. |
| 8546 | * |
| 8547 | * @hide |
| 8548 | */ |
| 8549 | public static final String AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN = |
| 8550 | "automatic_storage_manager_days_to_retain"; |
| 8551 | |
| 8552 | /** |
| 8553 | * Default number of days of information for the automatic storage manager to retain. |
| 8554 | * |
| 8555 | * @hide |
| 8556 | */ |
| 8557 | public static final int AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN_DEFAULT = 90; |
| 8558 | |
| 8559 | /** |
| 8560 | * How many bytes the automatic storage manager has cleared out. |
| 8561 | * |
| 8562 | * @hide |
| 8563 | */ |
| 8564 | public static final String AUTOMATIC_STORAGE_MANAGER_BYTES_CLEARED = |
| 8565 | "automatic_storage_manager_bytes_cleared"; |
| 8566 | |
| 8567 | /** |
| 8568 | * Last run time for the automatic storage manager. |
| 8569 | * |
| 8570 | * @hide |
| 8571 | */ |
| 8572 | public static final String AUTOMATIC_STORAGE_MANAGER_LAST_RUN = |
| 8573 | "automatic_storage_manager_last_run"; |
| 8574 | /** |
| 8575 | * If the automatic storage manager has been disabled by policy. Note that this doesn't |
| 8576 | * mean that the automatic storage manager is prevented from being re-enabled -- this only |
| 8577 | * means that it was turned off by policy at least once. |
| 8578 | * |
| 8579 | * @hide |
| 8580 | */ |
| 8581 | public static final String AUTOMATIC_STORAGE_MANAGER_TURNED_OFF_BY_POLICY = |
| 8582 | "automatic_storage_manager_turned_off_by_policy"; |
| 8583 | |
| 8584 | /** |
| 8585 | * Whether SystemUI navigation keys is enabled. |
| 8586 | * @hide |
| 8587 | */ |
| 8588 | public static final String SYSTEM_NAVIGATION_KEYS_ENABLED = |
| 8589 | "system_navigation_keys_enabled"; |
| 8590 | |
| 8591 | /** |
| 8592 | * Holds comma separated list of ordering of QS tiles. |
| 8593 | * |
| 8594 | * @hide |
| 8595 | */ |
| 8596 | public static final String QS_TILES = "sysui_qs_tiles"; |
| 8597 | |
| 8598 | /** |
| 8599 | * Whether this user has enabled Quick controls. |
| 8600 | * |
| 8601 | * 0 indicates disabled and 1 indicates enabled. A non existent value should be treated as |
| 8602 | * enabled. |
| 8603 | * |
| 8604 | * @hide |
| 8605 | */ |
| 8606 | public static final String CONTROLS_ENABLED = "controls_enabled"; |
| 8607 | |
| 8608 | /** |
| 8609 | * Whether power menu content (cards, passes, controls) will be shown when device is locked. |
| 8610 | * |
| 8611 | * 0 indicates hide and 1 indicates show. A non existent value will be treated as hide. |
| 8612 | * @hide |
| 8613 | */ |
| 8614 | @TestApi |
| 8615 | public static final String POWER_MENU_LOCKED_SHOW_CONTENT = |
| 8616 | "power_menu_locked_show_content"; |
| 8617 | |
| 8618 | /** |
| 8619 | * Specifies whether the web action API is enabled. |
| 8620 | * |
| 8621 | * @hide |
| 8622 | */ |
| 8623 | @SystemApi |
| 8624 | public static final String INSTANT_APPS_ENABLED = "instant_apps_enabled"; |
| 8625 | |
| 8626 | /** |
| 8627 | * Has this pairable device been paired or upgraded from a previously paired system. |
| 8628 | * @hide |
| 8629 | */ |
| 8630 | public static final String DEVICE_PAIRED = "device_paired"; |
| 8631 | |
| 8632 | /** |
| 8633 | * Specifies additional package name for broadcasting the CMAS messages. |
| 8634 | * @hide |
| 8635 | */ |
| 8636 | public static final String CMAS_ADDITIONAL_BROADCAST_PKG = "cmas_additional_broadcast_pkg"; |
| 8637 | |
| 8638 | /** |
| 8639 | * Whether the launcher should show any notification badges. |
| 8640 | * The value is boolean (1 or 0). |
| 8641 | * @hide |
| 8642 | */ |
| 8643 | @UnsupportedAppUsage |
| 8644 | @TestApi |
| 8645 | public static final String NOTIFICATION_BADGING = "notification_badging"; |
| 8646 | |
| 8647 | /** |
| 8648 | * When enabled the system will maintain a rolling history of received notifications. When |
| 8649 | * disabled the history will be disabled and deleted. |
| 8650 | * |
| 8651 | * The value 1 - enable, 0 - disable |
| 8652 | * @hide |
| 8653 | */ |
| 8654 | public static final String NOTIFICATION_HISTORY_ENABLED = "notification_history_enabled"; |
| 8655 | |
| 8656 | /** |
| 8657 | * When enabled conversations marked as favorites will be set to bubble. |
| 8658 | * |
| 8659 | * The value 1 - enable, 0 - disable |
| 8660 | * @hide |
| 8661 | */ |
| 8662 | public static final String BUBBLE_IMPORTANT_CONVERSATIONS |
| 8663 | = "bubble_important_conversations"; |
| 8664 | |
| 8665 | /** |
| 8666 | * Whether notifications are dismissed by a right-to-left swipe (instead of a left-to-right |
| 8667 | * swipe). |
| 8668 | * |
| 8669 | * @hide |
| 8670 | */ |
| 8671 | public static final String NOTIFICATION_DISMISS_RTL = "notification_dismiss_rtl"; |
| 8672 | |
| 8673 | /** |
| 8674 | * Comma separated list of QS tiles that have been auto-added already. |
| 8675 | * @hide |
| 8676 | */ |
| 8677 | public static final String QS_AUTO_ADDED_TILES = "qs_auto_tiles"; |
| 8678 | |
| 8679 | /** |
| 8680 | * Whether the Lockdown button should be shown in the power menu. |
| 8681 | * @hide |
| 8682 | */ |
| 8683 | public static final String LOCKDOWN_IN_POWER_MENU = "lockdown_in_power_menu"; |
| 8684 | |
| 8685 | /** |
| 8686 | * Backup manager behavioral parameters. |
| 8687 | * This is encoded as a key=value list, separated by commas. Ex: |
| 8688 | * |
| 8689 | * "key_value_backup_interval_milliseconds=14400000,key_value_backup_require_charging=true" |
| 8690 | * |
| 8691 | * The following keys are supported: |
| 8692 | * |
| 8693 | * <pre> |
| 8694 | * key_value_backup_interval_milliseconds (long) |
| 8695 | * key_value_backup_fuzz_milliseconds (long) |
| 8696 | * key_value_backup_require_charging (boolean) |
| 8697 | * key_value_backup_required_network_type (int) |
| 8698 | * full_backup_interval_milliseconds (long) |
| 8699 | * full_backup_require_charging (boolean) |
| 8700 | * full_backup_required_network_type (int) |
| 8701 | * backup_finished_notification_receivers (String[]) |
| 8702 | * </pre> |
| 8703 | * |
| 8704 | * backup_finished_notification_receivers uses ":" as delimeter for values. |
| 8705 | * |
| 8706 | * <p> |
| 8707 | * Type: string |
| 8708 | * @hide |
| 8709 | */ |
| 8710 | public static final String BACKUP_MANAGER_CONSTANTS = "backup_manager_constants"; |
| 8711 | |
| 8712 | |
| 8713 | /** |
| 8714 | * Local transport parameters so we can configure it for tests. |
| 8715 | * This is encoded as a key=value list, separated by commas. |
| 8716 | * |
| 8717 | * The following keys are supported: |
| 8718 | * |
| 8719 | * <pre> |
| 8720 | * fake_encryption_flag (boolean) |
| 8721 | * </pre> |
| 8722 | * |
| 8723 | * <p> |
| 8724 | * Type: string |
| 8725 | * @hide |
| 8726 | */ |
| 8727 | public static final String BACKUP_LOCAL_TRANSPORT_PARAMETERS = |
| 8728 | "backup_local_transport_parameters"; |
| 8729 | |
| 8730 | /** |
| 8731 | * Flag to set if the system should predictively attempt to re-enable Bluetooth while |
| 8732 | * the user is driving. |
| 8733 | * @hide |
| 8734 | */ |
| 8735 | public static final String BLUETOOTH_ON_WHILE_DRIVING = "bluetooth_on_while_driving"; |
| 8736 | |
| 8737 | /** |
| 8738 | * What behavior should be invoked when the volume hush gesture is triggered |
| 8739 | * One of VOLUME_HUSH_OFF, VOLUME_HUSH_VIBRATE, VOLUME_HUSH_MUTE. |
| 8740 | * |
| 8741 | * @hide |
| 8742 | */ |
| 8743 | @SystemApi |
| 8744 | public static final String VOLUME_HUSH_GESTURE = "volume_hush_gesture"; |
| 8745 | |
| 8746 | /** @hide */ |
| 8747 | @SystemApi |
| 8748 | public static final int VOLUME_HUSH_OFF = 0; |
| 8749 | /** @hide */ |
| 8750 | @SystemApi |
| 8751 | public static final int VOLUME_HUSH_VIBRATE = 1; |
| 8752 | /** @hide */ |
| 8753 | @SystemApi |
| 8754 | public static final int VOLUME_HUSH_MUTE = 2; |
| 8755 | |
| 8756 | /** |
| 8757 | * The number of times (integer) the user has manually enabled battery saver. |
| 8758 | * @hide |
| 8759 | */ |
| 8760 | public static final String LOW_POWER_MANUAL_ACTIVATION_COUNT = |
| 8761 | "low_power_manual_activation_count"; |
| 8762 | |
| 8763 | /** |
| 8764 | * Whether the "first time battery saver warning" dialog needs to be shown (0: default) |
| 8765 | * or not (1). |
| 8766 | * |
| 8767 | * @hide |
| 8768 | */ |
| 8769 | public static final String LOW_POWER_WARNING_ACKNOWLEDGED = |
| 8770 | "low_power_warning_acknowledged"; |
| 8771 | |
| 8772 | /** |
| 8773 | * 0 (default) Auto battery saver suggestion has not been suppressed. 1) it has been |
| 8774 | * suppressed. |
| 8775 | * @hide |
| 8776 | */ |
| 8777 | public static final String SUPPRESS_AUTO_BATTERY_SAVER_SUGGESTION = |
| 8778 | "suppress_auto_battery_saver_suggestion"; |
| 8779 | |
| 8780 | /** |
| 8781 | * List of packages, which data need to be unconditionally cleared before full restore. |
| 8782 | * Type: string |
| 8783 | * @hide |
| 8784 | */ |
| 8785 | public static final String PACKAGES_TO_CLEAR_DATA_BEFORE_FULL_RESTORE = |
| 8786 | "packages_to_clear_data_before_full_restore"; |
| 8787 | |
| 8788 | /** |
| 8789 | * Setting to determine whether to use the new notification priority handling features. |
| 8790 | * @hide |
| 8791 | */ |
| 8792 | public static final String NOTIFICATION_NEW_INTERRUPTION_MODEL = "new_interruption_model"; |
| 8793 | |
| 8794 | /** |
| 8795 | * How often to check for location access. |
| 8796 | * @hide |
| 8797 | */ |
| 8798 | @SystemApi |
| 8799 | @TestApi |
| 8800 | public static final String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS = |
| 8801 | "location_access_check_interval_millis"; |
| 8802 | |
| 8803 | /** |
| 8804 | * Delay between granting location access and checking it. |
| 8805 | * @hide |
| 8806 | */ |
| 8807 | @SystemApi |
| 8808 | @TestApi |
| 8809 | public static final String LOCATION_ACCESS_CHECK_DELAY_MILLIS = |
| 8810 | "location_access_check_delay_millis"; |
| 8811 | |
| 8812 | /** |
| 8813 | * @deprecated This setting does not have any effect anymore |
| 8814 | * @hide |
| 8815 | */ |
| 8816 | @SystemApi |
| 8817 | @Deprecated |
| 8818 | public static final String LOCATION_PERMISSIONS_UPGRADE_TO_Q_MODE = |
| 8819 | "location_permissions_upgrade_to_q_mode"; |
| 8820 | |
| 8821 | /** |
| 8822 | * Whether or not the system Auto Revoke feature is disabled. |
| 8823 | * @hide |
| 8824 | */ |
| 8825 | @SystemApi |
| 8826 | public static final String AUTO_REVOKE_DISABLED = "auto_revoke_disabled"; |
| 8827 | |
| 8828 | /** |
| 8829 | * Map of android.theme.customization.* categories to the enabled overlay package for that |
| 8830 | * category, formatted as a serialized {@link org.json.JSONObject}. If there is no |
| 8831 | * corresponding package included for a category, then all overlay packages in that |
| 8832 | * category must be disabled. |
| 8833 | * @hide |
| 8834 | */ |
| 8835 | @SystemApi |
| 8836 | public static final String THEME_CUSTOMIZATION_OVERLAY_PACKAGES = |
| 8837 | "theme_customization_overlay_packages"; |
| 8838 | |
| 8839 | /** |
| 8840 | * Navigation bar mode. |
| 8841 | * 0 = 3 button |
| 8842 | * 1 = 2 button |
| 8843 | * 2 = fully gestural |
| 8844 | * @hide |
| 8845 | */ |
| 8846 | public static final String NAVIGATION_MODE = |
| 8847 | "navigation_mode"; |
| 8848 | |
| 8849 | /** |
| 8850 | * Scale factor for the back gesture inset size on the left side of the screen. |
| 8851 | * @hide |
| 8852 | */ |
| 8853 | public static final String BACK_GESTURE_INSET_SCALE_LEFT = |
| 8854 | "back_gesture_inset_scale_left"; |
| 8855 | |
| 8856 | /** |
| 8857 | * Scale factor for the back gesture inset size on the right side of the screen. |
| 8858 | * @hide |
| 8859 | */ |
| 8860 | public static final String BACK_GESTURE_INSET_SCALE_RIGHT = |
| 8861 | "back_gesture_inset_scale_right"; |
| 8862 | |
| 8863 | /** |
| 8864 | * Current provider of proximity-based sharing services. |
| 8865 | * Default value in @string/config_defaultNearbySharingComponent. |
| 8866 | * No VALIDATOR as this setting will not be backed up. |
| 8867 | * @hide |
| 8868 | */ |
| 8869 | public static final String NEARBY_SHARING_COMPONENT = "nearby_sharing_component"; |
| 8870 | |
| 8871 | /** |
| 8872 | * Controls whether aware is enabled. |
| 8873 | * @hide |
| 8874 | */ |
| 8875 | public static final String AWARE_ENABLED = "aware_enabled"; |
| 8876 | |
| 8877 | /** |
| 8878 | * Controls whether aware_lock is enabled. |
| 8879 | * @hide |
| 8880 | */ |
| 8881 | public static final String AWARE_LOCK_ENABLED = "aware_lock_enabled"; |
| 8882 | |
| 8883 | /** |
| 8884 | * Controls whether tap gesture is enabled. |
| 8885 | * @hide |
| 8886 | */ |
| 8887 | public static final String TAP_GESTURE = "tap_gesture"; |
| 8888 | |
| 8889 | /** |
| 8890 | * Controls whether the people strip is enabled. |
| 8891 | * @hide |
| 8892 | */ |
| 8893 | public static final String PEOPLE_STRIP = "people_strip"; |
| 8894 | |
| 8895 | /** |
| 8896 | * Controls if window magnification is enabled. |
| 8897 | * @hide |
| 8898 | */ |
| 8899 | public static final String WINDOW_MAGNIFICATION = "window_magnification"; |
| 8900 | |
| 8901 | /** |
| 8902 | * Controls magnification mode when magnification is enabled via a system-wide |
| 8903 | * triple tap gesture or the accessibility shortcut. |
| 8904 | * |
| 8905 | * @see#ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN |
| 8906 | * @see#ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW |
| 8907 | * @hide |
| 8908 | */ |
| 8909 | public static final String ACCESSIBILITY_MAGNIFICATION_MODE = |
| 8910 | "accessibility_magnification_mode"; |
| 8911 | |
| 8912 | /** |
| 8913 | * Magnification mode value that magnifies whole display. |
| 8914 | * @hide |
| 8915 | */ |
| 8916 | public static final int ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN = 0x1; |
| 8917 | |
| 8918 | /** |
| 8919 | * Magnification mode value that magnifies magnify particular region in a window |
| 8920 | * @hide |
| 8921 | */ |
| 8922 | public static final int ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW = 0x2; |
| 8923 | |
| 8924 | /** |
| 8925 | * Keys we no longer back up under the current schema, but want to continue to |
| 8926 | * process when restoring historical backup datasets. |
| 8927 | * |
| 8928 | * All settings in {@link LEGACY_RESTORE_SETTINGS} array *must* have a non-null validator, |
| 8929 | * otherwise they won't be restored. |
| 8930 | * |
| 8931 | * @hide |
| 8932 | */ |
| 8933 | public static final String[] LEGACY_RESTORE_SETTINGS = { |
| 8934 | ENABLED_NOTIFICATION_LISTENERS, |
| 8935 | ENABLED_NOTIFICATION_ASSISTANT, |
| 8936 | ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES |
| 8937 | }; |
| 8938 | |
| 8939 | /** |
| 8940 | * These entries are considered common between the personal and the managed profile, |
| 8941 | * since the managed profile doesn't get to change them. |
| 8942 | */ |
| 8943 | private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>(); |
| 8944 | |
| 8945 | static { |
| 8946 | CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_ENABLED); |
| 8947 | CLONE_TO_MANAGED_PROFILE.add(ALLOW_MOCK_LOCATION); |
| 8948 | CLONE_TO_MANAGED_PROFILE.add(ALLOWED_GEOLOCATION_ORIGINS); |
| 8949 | CLONE_TO_MANAGED_PROFILE.add(CONTENT_CAPTURE_ENABLED); |
| 8950 | CLONE_TO_MANAGED_PROFILE.add(ENABLED_ACCESSIBILITY_SERVICES); |
| 8951 | CLONE_TO_MANAGED_PROFILE.add(LOCATION_CHANGER); |
| 8952 | CLONE_TO_MANAGED_PROFILE.add(LOCATION_MODE); |
| 8953 | CLONE_TO_MANAGED_PROFILE.add(LOCATION_PROVIDERS_ALLOWED); |
| 8954 | CLONE_TO_MANAGED_PROFILE.add(SHOW_IME_WITH_HARD_KEYBOARD); |
| 8955 | } |
| 8956 | |
| 8957 | /** @hide */ |
| 8958 | public static void getCloneToManagedProfileSettings(Set<String> outKeySet) { |
| 8959 | outKeySet.addAll(CLONE_TO_MANAGED_PROFILE); |
| 8960 | } |
| 8961 | |
| 8962 | /** |
| 8963 | * Secure settings which can be accessed by instant apps. |
| 8964 | * @hide |
| 8965 | */ |
| 8966 | public static final Set<String> INSTANT_APP_SETTINGS = new ArraySet<>(); |
| 8967 | static { |
| 8968 | INSTANT_APP_SETTINGS.add(ENABLED_ACCESSIBILITY_SERVICES); |
| 8969 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_SPEAK_PASSWORD); |
| 8970 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_DISPLAY_INVERSION_ENABLED); |
| 8971 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_ENABLED); |
| 8972 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_PRESET); |
| 8973 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_EDGE_TYPE); |
| 8974 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_EDGE_COLOR); |
| 8975 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_LOCALE); |
| 8976 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR); |
| 8977 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR); |
| 8978 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_TYPEFACE); |
| 8979 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_FONT_SCALE); |
| 8980 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_CAPTIONING_WINDOW_COLOR); |
| 8981 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED); |
| 8982 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_DISPLAY_DALTONIZER); |
| 8983 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_AUTOCLICK_DELAY); |
| 8984 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_AUTOCLICK_ENABLED); |
| 8985 | INSTANT_APP_SETTINGS.add(ACCESSIBILITY_LARGE_POINTER_ICON); |
| 8986 | |
| 8987 | INSTANT_APP_SETTINGS.add(DEFAULT_INPUT_METHOD); |
| 8988 | INSTANT_APP_SETTINGS.add(ENABLED_INPUT_METHODS); |
| 8989 | |
| 8990 | INSTANT_APP_SETTINGS.add(ANDROID_ID); |
| 8991 | |
| 8992 | INSTANT_APP_SETTINGS.add(ALLOW_MOCK_LOCATION); |
| 8993 | } |
| 8994 | |
| 8995 | /** |
| 8996 | * Helper method for determining if a location provider is enabled. |
| 8997 | * |
| 8998 | * @param cr the content resolver to use |
| 8999 | * @param provider the location provider to query |
| 9000 | * @return true if the provider is enabled |
| 9001 | * |
| 9002 | * @deprecated use {@link LocationManager#isProviderEnabled(String)} |
| 9003 | */ |
| 9004 | @Deprecated |
| 9005 | public static boolean isLocationProviderEnabled(ContentResolver cr, String provider) { |
| 9006 | String allowedProviders = Settings.Secure.getStringForUser(cr, |
| 9007 | LOCATION_PROVIDERS_ALLOWED, cr.getUserId()); |
| 9008 | return TextUtils.delimitedStringContains(allowedProviders, ',', provider); |
| 9009 | } |
| 9010 | |
| 9011 | /** |
| 9012 | * Thread-safe method for enabling or disabling a single location provider. This will have |
| 9013 | * no effect on Android Q and above. |
| 9014 | * @param cr the content resolver to use |
| 9015 | * @param provider the location provider to enable or disable |
| 9016 | * @param enabled true if the provider should be enabled |
| 9017 | * @deprecated This API is deprecated |
| 9018 | */ |
| 9019 | @Deprecated |
| 9020 | public static void setLocationProviderEnabled(ContentResolver cr, |
| 9021 | String provider, boolean enabled) { |
| 9022 | } |
| 9023 | } |
| 9024 | |
| 9025 | /** |
| 9026 | * Global system settings, containing preferences that always apply identically |
| 9027 | * to all defined users. Applications can read these but are not allowed to write; |
| 9028 | * like the "Secure" settings, these are for preferences that the user must |
| 9029 | * explicitly modify through the system UI or specialized APIs for those values. |
| 9030 | */ |
| 9031 | public static final class Global extends NameValueTable { |
| 9032 | // NOTE: If you add new settings here, be sure to add them to |
| 9033 | // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoGlobalSettingsLocked. |
| 9034 | |
| 9035 | /** |
| 9036 | * The content:// style URL for global secure settings items. Not public. |
| 9037 | */ |
| 9038 | public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global"); |
| 9039 | |
| 9040 | /** |
| 9041 | * Whether the notification bubbles are globally enabled |
| 9042 | * The value is boolean (1 or 0). |
| 9043 | * @hide |
| 9044 | */ |
| 9045 | @TestApi |
| 9046 | public static final String NOTIFICATION_BUBBLES = "notification_bubbles"; |
| 9047 | |
| 9048 | /** |
| 9049 | * Whether users are allowed to add more users or guest from lockscreen. |
| 9050 | * <p> |
| 9051 | * Type: int |
| 9052 | * @hide |
| 9053 | */ |
| 9054 | public static final String ADD_USERS_WHEN_LOCKED = "add_users_when_locked"; |
| 9055 | |
| 9056 | /** |
| 9057 | * Whether applying ramping ringer on incoming phone call ringtone. |
| 9058 | * <p>1 = apply ramping ringer |
| 9059 | * <p>0 = do not apply ramping ringer |
| 9060 | */ |
| 9061 | public static final String APPLY_RAMPING_RINGER = "apply_ramping_ringer"; |
| 9062 | |
| 9063 | /** |
| 9064 | * Setting whether the global gesture for enabling accessibility is enabled. |
| 9065 | * If this gesture is enabled the user will be able to perfrom it to enable |
| 9066 | * the accessibility state without visiting the settings app. |
| 9067 | * |
| 9068 | * @hide |
| 9069 | * No longer used. Should be removed once all dependencies have been updated. |
| 9070 | */ |
| 9071 | @UnsupportedAppUsage |
| 9072 | public static final String ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED = |
| 9073 | "enable_accessibility_global_gesture_enabled"; |
| 9074 | |
| 9075 | /** |
| 9076 | * Whether Airplane Mode is on. |
| 9077 | */ |
| 9078 | public static final String AIRPLANE_MODE_ON = "airplane_mode_on"; |
| 9079 | |
| 9080 | /** |
| 9081 | * Whether Theater Mode is on. |
| 9082 | * {@hide} |
| 9083 | */ |
| 9084 | @SystemApi |
| 9085 | public static final String THEATER_MODE_ON = "theater_mode_on"; |
| 9086 | |
| 9087 | /** |
| 9088 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio. |
| 9089 | */ |
| 9090 | public static final String RADIO_BLUETOOTH = "bluetooth"; |
| 9091 | |
| 9092 | /** |
| 9093 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio. |
| 9094 | */ |
| 9095 | public static final String RADIO_WIFI = "wifi"; |
| 9096 | |
| 9097 | /** |
| 9098 | * {@hide} |
| 9099 | */ |
| 9100 | public static final String RADIO_WIMAX = "wimax"; |
| 9101 | /** |
| 9102 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio. |
| 9103 | */ |
| 9104 | public static final String RADIO_CELL = "cell"; |
| 9105 | |
| 9106 | /** |
| 9107 | * Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio. |
| 9108 | */ |
| 9109 | public static final String RADIO_NFC = "nfc"; |
| 9110 | |
| 9111 | /** |
| 9112 | * A comma separated list of radios that need to be disabled when airplane mode |
| 9113 | * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are |
| 9114 | * included in the comma separated list. |
| 9115 | */ |
| 9116 | public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; |
| 9117 | |
| 9118 | /** |
| 9119 | * A comma separated list of radios that should to be disabled when airplane mode |
| 9120 | * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is |
| 9121 | * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi |
| 9122 | * will be turned off when entering airplane mode, but the user will be able to reenable |
| 9123 | * Wifi in the Settings app. |
| 9124 | * @hide |
| 9125 | */ |
| 9126 | @SystemApi |
| 9127 | public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios"; |
| 9128 | |
| 9129 | /** |
| 9130 | * An integer representing the Bluetooth Class of Device (CoD). |
| 9131 | * |
| 9132 | * @hide |
| 9133 | */ |
| 9134 | public static final String BLUETOOTH_CLASS_OF_DEVICE = "bluetooth_class_of_device"; |
| 9135 | |
| 9136 | /** |
| 9137 | * A Long representing a bitmap of profiles that should be disabled when bluetooth starts. |
| 9138 | * See {@link android.bluetooth.BluetoothProfile}. |
| 9139 | * {@hide} |
| 9140 | */ |
| 9141 | public static final String BLUETOOTH_DISABLED_PROFILES = "bluetooth_disabled_profiles"; |
| 9142 | |
| 9143 | /** |
| 9144 | * A semi-colon separated list of Bluetooth interoperability workarounds. |
| 9145 | * Each entry is a partial Bluetooth device address string and an integer representing |
| 9146 | * the feature to be disabled, separated by a comma. The integer must correspond |
| 9147 | * to a interoperability feature as defined in "interop.h" in /system/bt. |
| 9148 | * <p> |
| 9149 | * Example: <br/> |
| 9150 | * "00:11:22,0;01:02:03:04,2" |
| 9151 | * @hide |
| 9152 | */ |
| 9153 | public static final String BLUETOOTH_INTEROPERABILITY_LIST = "bluetooth_interoperability_list"; |
| 9154 | |
| 9155 | /** |
| 9156 | * The policy for deciding when Wi-Fi should go to sleep (which will in |
| 9157 | * turn switch to using the mobile data as an Internet connection). |
| 9158 | * <p> |
| 9159 | * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT}, |
| 9160 | * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or |
| 9161 | * {@link #WIFI_SLEEP_POLICY_NEVER}. |
| 9162 | * @deprecated This is no longer used or set by the platform. |
| 9163 | */ |
| 9164 | @Deprecated |
| 9165 | public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy"; |
| 9166 | |
| 9167 | /** |
| 9168 | * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep |
| 9169 | * policy, which is to sleep shortly after the turning off |
| 9170 | * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting. |
| 9171 | * @deprecated This is no longer used by the platform. |
| 9172 | */ |
| 9173 | @Deprecated |
| 9174 | public static final int WIFI_SLEEP_POLICY_DEFAULT = 0; |
| 9175 | |
| 9176 | /** |
| 9177 | * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when |
| 9178 | * the device is on battery, and never go to sleep when the device is |
| 9179 | * plugged in. |
| 9180 | * @deprecated This is no longer used by the platform. |
| 9181 | */ |
| 9182 | @Deprecated |
| 9183 | public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; |
| 9184 | |
| 9185 | /** |
| 9186 | * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep. |
| 9187 | * @deprecated This is no longer used by the platform. |
| 9188 | */ |
| 9189 | @Deprecated |
| 9190 | public static final int WIFI_SLEEP_POLICY_NEVER = 2; |
| 9191 | |
| 9192 | /** |
| 9193 | * Value to specify if the user prefers the date, time and time zone |
| 9194 | * to be automatically fetched from the network (NITZ). 1=yes, 0=no |
| 9195 | */ |
| 9196 | public static final String AUTO_TIME = "auto_time"; |
| 9197 | |
| 9198 | /** |
| 9199 | * Value to specify if the user prefers the time zone |
| 9200 | * to be automatically fetched from the network (NITZ). 1=yes, 0=no |
| 9201 | */ |
| 9202 | public static final String AUTO_TIME_ZONE = "auto_time_zone"; |
| 9203 | |
| 9204 | /** |
| 9205 | * URI for the car dock "in" event sound. |
| 9206 | * @hide |
| 9207 | */ |
| 9208 | public static final String CAR_DOCK_SOUND = "car_dock_sound"; |
| 9209 | |
| 9210 | /** |
| 9211 | * URI for the car dock "out" event sound. |
| 9212 | * @hide |
| 9213 | */ |
| 9214 | public static final String CAR_UNDOCK_SOUND = "car_undock_sound"; |
| 9215 | |
| 9216 | /** |
| 9217 | * URI for the desk dock "in" event sound. |
| 9218 | * @hide |
| 9219 | */ |
| 9220 | public static final String DESK_DOCK_SOUND = "desk_dock_sound"; |
| 9221 | |
| 9222 | /** |
| 9223 | * URI for the desk dock "out" event sound. |
| 9224 | * @hide |
| 9225 | */ |
| 9226 | public static final String DESK_UNDOCK_SOUND = "desk_undock_sound"; |
| 9227 | |
| 9228 | /** |
| 9229 | * Whether to play a sound for dock events. |
| 9230 | * @hide |
| 9231 | */ |
| 9232 | public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled"; |
| 9233 | |
| 9234 | /** |
| 9235 | * Whether to play a sound for dock events, only when an accessibility service is on. |
| 9236 | * @hide |
| 9237 | */ |
| 9238 | public static final String DOCK_SOUNDS_ENABLED_WHEN_ACCESSIBILITY = "dock_sounds_enabled_when_accessbility"; |
| 9239 | |
| 9240 | /** |
| 9241 | * URI for the "device locked" (keyguard shown) sound. |
| 9242 | * @hide |
| 9243 | */ |
| 9244 | public static final String LOCK_SOUND = "lock_sound"; |
| 9245 | |
| 9246 | /** |
| 9247 | * URI for the "device unlocked" sound. |
| 9248 | * @hide |
| 9249 | */ |
| 9250 | public static final String UNLOCK_SOUND = "unlock_sound"; |
| 9251 | |
| 9252 | /** |
| 9253 | * URI for the "device is trusted" sound, which is played when the device enters the trusted |
| 9254 | * state without unlocking. |
| 9255 | * @hide |
| 9256 | */ |
| 9257 | public static final String TRUSTED_SOUND = "trusted_sound"; |
| 9258 | |
| 9259 | /** |
| 9260 | * URI for the low battery sound file. |
| 9261 | * @hide |
| 9262 | */ |
| 9263 | public static final String LOW_BATTERY_SOUND = "low_battery_sound"; |
| 9264 | |
| 9265 | /** |
| 9266 | * Whether to play a sound for low-battery alerts. |
| 9267 | * @hide |
| 9268 | */ |
| 9269 | public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled"; |
| 9270 | |
| 9271 | /** |
| 9272 | * URI for the "wireless charging started" sound. |
| 9273 | * @hide |
| 9274 | */ |
| 9275 | public static final String WIRELESS_CHARGING_STARTED_SOUND = |
| 9276 | "wireless_charging_started_sound"; |
| 9277 | |
| 9278 | /** |
| 9279 | * URI for "wired charging started" sound. |
| 9280 | * @hide |
| 9281 | */ |
| 9282 | public static final String CHARGING_STARTED_SOUND = "charging_started_sound"; |
| 9283 | |
| 9284 | /** |
| 9285 | * Whether to play a sound for charging events. |
| 9286 | * @deprecated Use {@link android.provider.Settings.Secure#CHARGING_SOUNDS_ENABLED} instead |
| 9287 | * @hide |
| 9288 | */ |
| 9289 | @Deprecated |
| 9290 | public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled"; |
| 9291 | |
| 9292 | /** |
| 9293 | * Whether to vibrate for wireless charging events. |
| 9294 | * @deprecated Use {@link android.provider.Settings.Secure#CHARGING_VIBRATION_ENABLED} |
| 9295 | * @hide |
| 9296 | */ |
| 9297 | @Deprecated |
| 9298 | public static final String CHARGING_VIBRATION_ENABLED = "charging_vibration_enabled"; |
| 9299 | |
| 9300 | /** |
| 9301 | * Whether we keep the device on while the device is plugged in. |
| 9302 | * Supported values are: |
| 9303 | * <ul> |
| 9304 | * <li>{@code 0} to never stay on while plugged in</li> |
| 9305 | * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li> |
| 9306 | * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li> |
| 9307 | * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li> |
| 9308 | * </ul> |
| 9309 | * These values can be OR-ed together. |
| 9310 | */ |
| 9311 | public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; |
| 9312 | |
| 9313 | /** |
| 9314 | * When the user has enable the option to have a "bug report" command |
| 9315 | * in the power menu. |
| 9316 | * @hide |
| 9317 | */ |
| 9318 | public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; |
| 9319 | |
| 9320 | /** |
| 9321 | * The package name for the custom bugreport handler app. This app must be whitelisted. |
| 9322 | * This is currently used only by Power Menu short press. |
| 9323 | * |
| 9324 | * @hide |
| 9325 | */ |
| 9326 | public static final String CUSTOM_BUGREPORT_HANDLER_APP = "custom_bugreport_handler_app"; |
| 9327 | |
| 9328 | /** |
| 9329 | * The user id for the custom bugreport handler app. This is currently used only by Power |
| 9330 | * Menu short press. |
| 9331 | * |
| 9332 | * @hide |
| 9333 | */ |
| 9334 | public static final String CUSTOM_BUGREPORT_HANDLER_USER = "custom_bugreport_handler_user"; |
| 9335 | |
| 9336 | /** |
| 9337 | * Whether ADB over USB is enabled. |
| 9338 | */ |
| 9339 | public static final String ADB_ENABLED = "adb_enabled"; |
| 9340 | |
| 9341 | /** |
| 9342 | * Whether ADB over Wifi is enabled. |
| 9343 | * @hide |
| 9344 | */ |
| 9345 | public static final String ADB_WIFI_ENABLED = "adb_wifi_enabled"; |
| 9346 | |
| 9347 | /** |
| 9348 | * Whether Views are allowed to save their attribute data. |
| 9349 | * @hide |
| 9350 | */ |
| 9351 | public static final String DEBUG_VIEW_ATTRIBUTES = "debug_view_attributes"; |
| 9352 | |
| 9353 | /** |
| 9354 | * Which application package is allowed to save View attribute data. |
| 9355 | * @hide |
| 9356 | */ |
| 9357 | public static final String DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE = |
| 9358 | "debug_view_attributes_application_package"; |
| 9359 | |
| 9360 | /** |
| 9361 | * Whether assisted GPS should be enabled or not. |
| 9362 | * @hide |
| 9363 | */ |
| 9364 | public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled"; |
| 9365 | |
| 9366 | /** |
| 9367 | * Whether bluetooth is enabled/disabled |
| 9368 | * 0=disabled. 1=enabled. |
| 9369 | */ |
| 9370 | public static final String BLUETOOTH_ON = "bluetooth_on"; |
| 9371 | |
| 9372 | /** |
| 9373 | * CDMA Cell Broadcast SMS |
| 9374 | * 0 = CDMA Cell Broadcast SMS disabled |
| 9375 | * 1 = CDMA Cell Broadcast SMS enabled |
| 9376 | * @hide |
| 9377 | */ |
| 9378 | public static final String CDMA_CELL_BROADCAST_SMS = |
| 9379 | "cdma_cell_broadcast_sms"; |
| 9380 | |
| 9381 | /** |
| 9382 | * The CDMA roaming mode 0 = Home Networks, CDMA default |
| 9383 | * 1 = Roaming on Affiliated networks |
| 9384 | * 2 = Roaming on any networks |
| 9385 | * @hide |
| 9386 | */ |
| 9387 | public static final String CDMA_ROAMING_MODE = "roaming_settings"; |
| 9388 | |
| 9389 | /** |
| 9390 | * The CDMA subscription mode 0 = RUIM/SIM (default) |
| 9391 | * 1 = NV |
| 9392 | * @hide |
| 9393 | */ |
| 9394 | public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode"; |
| 9395 | |
| 9396 | /** |
| 9397 | * The default value for whether background data is enabled or not. |
| 9398 | * |
| 9399 | * Used by {@code NetworkPolicyManagerService}. |
| 9400 | * |
| 9401 | * @hide |
| 9402 | */ |
| 9403 | public static final String DEFAULT_RESTRICT_BACKGROUND_DATA = |
| 9404 | "default_restrict_background_data"; |
| 9405 | |
| 9406 | /** Inactivity timeout to track mobile data activity. |
| 9407 | * |
| 9408 | * If set to a positive integer, it indicates the inactivity timeout value in seconds to |
| 9409 | * infer the data activity of mobile network. After a period of no activity on mobile |
| 9410 | * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE} |
| 9411 | * intent is fired to indicate a transition of network status from "active" to "idle". Any |
| 9412 | * subsequent activity on mobile networks triggers the firing of {@code |
| 9413 | * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active". |
| 9414 | * |
| 9415 | * Network activity refers to transmitting or receiving data on the network interfaces. |
| 9416 | * |
| 9417 | * Tracking is disabled if set to zero or negative value. |
| 9418 | * |
| 9419 | * @hide |
| 9420 | */ |
| 9421 | public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile"; |
| 9422 | |
| 9423 | /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE} |
| 9424 | * but for Wifi network. |
| 9425 | * @hide |
| 9426 | */ |
| 9427 | public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi"; |
| 9428 | |
| 9429 | /** |
| 9430 | * Whether or not data roaming is enabled. (0 = false, 1 = true) |
| 9431 | */ |
| 9432 | public static final String DATA_ROAMING = "data_roaming"; |
| 9433 | |
| 9434 | /** |
| 9435 | * The value passed to a Mobile DataConnection via bringUp which defines the |
| 9436 | * number of retries to preform when setting up the initial connection. The default |
| 9437 | * value defined in DataConnectionTrackerBase#DEFAULT_MDC_INITIAL_RETRY is currently 1. |
| 9438 | * @hide |
| 9439 | */ |
| 9440 | public static final String MDC_INITIAL_MAX_RETRY = "mdc_initial_max_retry"; |
| 9441 | |
| 9442 | /** |
| 9443 | * Whether any package can be on external storage. When this is true, any |
| 9444 | * package, regardless of manifest values, is a candidate for installing |
| 9445 | * or moving onto external storage. (0 = false, 1 = true) |
| 9446 | * @hide |
| 9447 | */ |
| 9448 | public static final String FORCE_ALLOW_ON_EXTERNAL = "force_allow_on_external"; |
| 9449 | |
| 9450 | /** |
| 9451 | * The default SM-DP+ configured for this device. |
| 9452 | * |
| 9453 | * <p>An SM-DP+ is used by an LPA (see {@link android.service.euicc.EuiccService}) to |
| 9454 | * download profiles. If this value is set, the LPA will query this server for any profiles |
| 9455 | * available to this device. If any are available, they may be downloaded during device |
| 9456 | * provisioning or in settings without needing the user to enter an activation code. |
| 9457 | * |
| 9458 | * @see android.service.euicc.EuiccService |
| 9459 | * @hide |
| 9460 | */ |
| 9461 | @SystemApi |
| 9462 | public static final String DEFAULT_SM_DP_PLUS = "default_sm_dp_plus"; |
| 9463 | |
| 9464 | /** |
| 9465 | * Whether any profile has ever been downloaded onto a eUICC on the device. |
| 9466 | * |
| 9467 | * <p>Used to hide eUICC UI from users who have never made use of it and would only be |
| 9468 | * confused by seeing references to it in settings. |
| 9469 | * (0 = false, 1 = true) |
| 9470 | * @hide |
| 9471 | */ |
| 9472 | @SystemApi |
| 9473 | public static final String EUICC_PROVISIONED = "euicc_provisioned"; |
| 9474 | |
| 9475 | /** |
| 9476 | * List of ISO country codes in which eUICC UI is shown. Country codes should be separated |
| 9477 | * by comma. |
| 9478 | * |
| 9479 | * Note: if {@link #EUICC_SUPPORTED_COUNTRIES} is empty, then {@link |
| 9480 | * #EUICC_UNSUPPORTED_COUNTRIES} is used. |
| 9481 | * |
| 9482 | * <p>Used to hide eUICC UI from users who are currently in countries where no carriers |
| 9483 | * support eUICC. |
| 9484 | * |
| 9485 | * @hide |
| 9486 | */ |
| 9487 | @SystemApi |
| 9488 | public static final String EUICC_SUPPORTED_COUNTRIES = "euicc_supported_countries"; |
| 9489 | |
| 9490 | /** |
| 9491 | * List of ISO country codes in which eUICC UI is not shown. Country codes should be |
| 9492 | * separated by comma. |
| 9493 | * |
| 9494 | * Note: if {@link #EUICC_SUPPORTED_COUNTRIES} is empty, then {@link |
| 9495 | * #EUICC_UNSUPPORTED_COUNTRIES} is used. |
| 9496 | * |
| 9497 | * <p>Used to hide eUICC UI from users who are currently in countries where no carriers |
| 9498 | * support eUICC. |
| 9499 | * |
| 9500 | * @hide |
| 9501 | */ |
| 9502 | @SystemApi |
| 9503 | public static final String EUICC_UNSUPPORTED_COUNTRIES = "euicc_unsupported_countries"; |
| 9504 | |
| 9505 | /** |
| 9506 | * Whether any activity can be resized. When this is true, any |
| 9507 | * activity, regardless of manifest values, can be resized for multi-window. |
| 9508 | * (0 = false, 1 = true) |
| 9509 | * @hide |
| 9510 | */ |
| 9511 | public static final String DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES |
| 9512 | = "force_resizable_activities"; |
| 9513 | |
| 9514 | /** |
| 9515 | * Whether to enable experimental freeform support for windows. |
| 9516 | * @hide |
| 9517 | */ |
| 9518 | public static final String DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT |
| 9519 | = "enable_freeform_support"; |
| 9520 | |
| 9521 | /** |
| 9522 | * Whether to enable experimental desktop mode on secondary displays. |
| 9523 | * @hide |
| 9524 | */ |
| 9525 | public static final String DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS = |
| 9526 | "force_desktop_mode_on_external_displays"; |
| 9527 | |
| 9528 | /** |
| 9529 | * Whether to allow non-resizable apps to be freeform. |
| 9530 | * @hide |
| 9531 | */ |
| 9532 | public static final String DEVELOPMENT_ENABLE_SIZECOMPAT_FREEFORM = |
| 9533 | "enable_sizecompat_freeform"; |
| 9534 | |
| 9535 | /** |
| 9536 | * If true, shadows drawn around the window will be rendered by the system compositor. If |
| 9537 | * false, shadows will be drawn by the client by setting an elevation on the root view and |
| 9538 | * the contents will be inset by the surface insets. |
| 9539 | * (0 = false, 1 = true) |
| 9540 | * @hide |
| 9541 | */ |
| 9542 | public static final String DEVELOPMENT_RENDER_SHADOWS_IN_COMPOSITOR = |
| 9543 | "render_shadows_in_compositor"; |
| 9544 | |
| 9545 | /** |
| 9546 | * Whether user has enabled development settings. |
| 9547 | */ |
| 9548 | public static final String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled"; |
| 9549 | |
| 9550 | /** |
| 9551 | * Whether the device has been provisioned (0 = false, 1 = true). |
| 9552 | * <p>On a multiuser device with a separate system user, the screen may be locked |
| 9553 | * as soon as this is set to true and further activities cannot be launched on the |
| 9554 | * system user unless they are marked to show over keyguard. |
| 9555 | */ |
| 9556 | public static final String DEVICE_PROVISIONED = "device_provisioned"; |
| 9557 | |
| 9558 | /** |
| 9559 | * Indicates whether mobile data should be allowed while the device is being provisioned. |
| 9560 | * This allows the provisioning process to turn off mobile data before the user |
| 9561 | * has an opportunity to set things up, preventing other processes from burning |
| 9562 | * precious bytes before wifi is setup. |
| 9563 | * <p> |
| 9564 | * Type: int (0 for false, 1 for true) |
| 9565 | * |
| 9566 | * @hide |
| 9567 | */ |
| 9568 | @SystemApi |
| 9569 | public static final String DEVICE_PROVISIONING_MOBILE_DATA_ENABLED = |
| 9570 | "device_provisioning_mobile_data"; |
| 9571 | |
| 9572 | /** |
| 9573 | * The saved value for WindowManagerService.setForcedDisplaySize(). |
| 9574 | * Two integers separated by a comma. If unset, then use the real display size. |
| 9575 | * @hide |
| 9576 | */ |
| 9577 | public static final String DISPLAY_SIZE_FORCED = "display_size_forced"; |
| 9578 | |
| 9579 | /** |
| 9580 | * The saved value for WindowManagerService.setForcedDisplayScalingMode(). |
| 9581 | * 0 or unset if scaling is automatic, 1 if scaling is disabled. |
| 9582 | * @hide |
| 9583 | */ |
| 9584 | public static final String DISPLAY_SCALING_FORCE = "display_scaling_force"; |
| 9585 | |
| 9586 | /** |
| 9587 | * The maximum size, in bytes, of a download that the download manager will transfer over |
| 9588 | * a non-wifi connection. |
| 9589 | * @hide |
| 9590 | */ |
| 9591 | public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE = |
| 9592 | "download_manager_max_bytes_over_mobile"; |
| 9593 | |
| 9594 | /** |
| 9595 | * The recommended maximum size, in bytes, of a download that the download manager should |
| 9596 | * transfer over a non-wifi connection. Over this size, the use will be warned, but will |
| 9597 | * have the option to start the download over the mobile connection anyway. |
| 9598 | * @hide |
| 9599 | */ |
| 9600 | public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE = |
| 9601 | "download_manager_recommended_max_bytes_over_mobile"; |
| 9602 | |
| 9603 | /** |
| 9604 | * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead |
| 9605 | */ |
| 9606 | @Deprecated |
| 9607 | public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; |
| 9608 | |
| 9609 | /** |
| 9610 | * Whether HDMI control shall be enabled. If disabled, no CEC/MHL command will be |
| 9611 | * sent or processed. (0 = false, 1 = true) |
| 9612 | * @hide |
| 9613 | */ |
| 9614 | public static final String HDMI_CONTROL_ENABLED = "hdmi_control_enabled"; |
| 9615 | |
| 9616 | /** |
| 9617 | * Controls whether volume control commands via HDMI CEC are enabled. (0 = false, 1 = |
| 9618 | * true). |
| 9619 | * |
| 9620 | * <p>Effects on different device types: |
| 9621 | * <table> |
| 9622 | * <tr><th>HDMI CEC device type</th><th>0: disabled</th><th>1: enabled</th></tr> |
| 9623 | * <tr> |
| 9624 | * <td>TV (type: 0)</td> |
| 9625 | * <td>Per CEC specification.</td> |
| 9626 | * <td>TV changes system volume. TV no longer reacts to incoming volume changes |
| 9627 | * via {@code <User Control Pressed>}. TV no longer handles {@code <Report Audio |
| 9628 | * Status>}.</td> |
| 9629 | * </tr> |
| 9630 | * <tr> |
| 9631 | * <td>Playback device (type: 4)</td> |
| 9632 | * <td>Device sends volume commands to TV/Audio system via {@code <User Control |
| 9633 | * Pressed>}</td> |
| 9634 | * <td>Device does not send volume commands via {@code <User Control Pressed>}.</td> |
| 9635 | * </tr> |
| 9636 | * <tr> |
| 9637 | * <td>Audio device (type: 5)</td> |
| 9638 | * <td>Full "System Audio Control" capabilities.</td> |
| 9639 | * <td>Audio device no longer reacts to incoming {@code <User Control Pressed>} |
| 9640 | * volume commands. Audio device no longer reports volume changes via {@code |
| 9641 | * <Report Audio Status>}.</td> |
| 9642 | * </tr> |
| 9643 | * </table> |
| 9644 | * |
| 9645 | * <p> Due to the resulting behavior, usage on TV and Audio devices is discouraged. |
| 9646 | * |
| 9647 | * @hide |
| 9648 | * @see android.hardware.hdmi.HdmiControlManager#setHdmiCecVolumeControlEnabled(boolean) |
| 9649 | */ |
| 9650 | public static final String HDMI_CONTROL_VOLUME_CONTROL_ENABLED = |
| 9651 | "hdmi_control_volume_control_enabled"; |
| 9652 | |
| 9653 | /** |
| 9654 | * Whether HDMI System Audio Control feature is enabled. If enabled, TV will try to turn on |
| 9655 | * system audio mode if there's a connected CEC-enabled AV Receiver. Then audio stream will |
| 9656 | * be played on AVR instead of TV spaeker. If disabled, the system audio mode will never be |
| 9657 | * activated. |
| 9658 | * @hide |
| 9659 | */ |
| 9660 | public static final String HDMI_SYSTEM_AUDIO_CONTROL_ENABLED = |
| 9661 | "hdmi_system_audio_control_enabled"; |
| 9662 | |
| 9663 | /** |
| 9664 | * Whether HDMI Routing Control feature is enabled. If enabled, the switch device will |
| 9665 | * route to the correct input source on receiving Routing Control related messages. If |
| 9666 | * disabled, you can only switch the input via controls on this device. |
| 9667 | * @hide |
| 9668 | */ |
| 9669 | public static final String HDMI_CEC_SWITCH_ENABLED = |
| 9670 | "hdmi_cec_switch_enabled"; |
| 9671 | |
| 9672 | /** |
| 9673 | * Whether TV will automatically turn on upon reception of the CEC command |
| 9674 | * <Text View On> or <Image View On>. (0 = false, 1 = true) |
| 9675 | * |
| 9676 | * @hide |
| 9677 | */ |
| 9678 | public static final String HDMI_CONTROL_AUTO_WAKEUP_ENABLED = |
| 9679 | "hdmi_control_auto_wakeup_enabled"; |
| 9680 | |
| 9681 | /** |
| 9682 | * Whether TV will also turn off other CEC devices when it goes to standby mode. |
| 9683 | * (0 = false, 1 = true) |
| 9684 | * |
| 9685 | * @hide |
| 9686 | */ |
| 9687 | public static final String HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED = |
| 9688 | "hdmi_control_auto_device_off_enabled"; |
| 9689 | |
| 9690 | /** |
| 9691 | * Whether or not media is shown automatically when bypassing as a heads up. |
| 9692 | * @hide |
| 9693 | */ |
| 9694 | public static final String SHOW_MEDIA_ON_QUICK_SETTINGS = |
| 9695 | "qs_media_player"; |
| 9696 | |
| 9697 | /** |
| 9698 | * The interval in milliseconds at which location requests will be throttled when they are |
| 9699 | * coming from the background. |
| 9700 | * |
| 9701 | * @hide |
| 9702 | */ |
| 9703 | public static final String LOCATION_BACKGROUND_THROTTLE_INTERVAL_MS = |
| 9704 | "location_background_throttle_interval_ms"; |
| 9705 | |
| 9706 | /** |
| 9707 | * Most frequent location update interval in milliseconds that proximity alert is allowed |
| 9708 | * to request. |
| 9709 | * @hide |
| 9710 | */ |
| 9711 | public static final String LOCATION_BACKGROUND_THROTTLE_PROXIMITY_ALERT_INTERVAL_MS = |
| 9712 | "location_background_throttle_proximity_alert_interval_ms"; |
| 9713 | |
| 9714 | /** |
| 9715 | * Packages that are whitelisted for background throttling (throttling will not be applied). |
| 9716 | * @hide |
| 9717 | */ |
| 9718 | public static final String LOCATION_BACKGROUND_THROTTLE_PACKAGE_WHITELIST = |
| 9719 | "location_background_throttle_package_whitelist"; |
| 9720 | |
| 9721 | /** |
| 9722 | * Packages that are whitelisted for ignoring location settings (may retrieve location even |
| 9723 | * when user location settings are off), for emergency purposes. |
| 9724 | * @hide |
| 9725 | */ |
| 9726 | @TestApi |
| 9727 | public static final String LOCATION_IGNORE_SETTINGS_PACKAGE_WHITELIST = |
| 9728 | "location_ignore_settings_package_whitelist"; |
| 9729 | |
| 9730 | /** |
| 9731 | * Whether TV will switch to MHL port when a mobile device is plugged in. |
| 9732 | * (0 = false, 1 = true) |
| 9733 | * @hide |
| 9734 | */ |
| 9735 | public static final String MHL_INPUT_SWITCHING_ENABLED = "mhl_input_switching_enabled"; |
| 9736 | |
| 9737 | /** |
| 9738 | * Whether TV will charge the mobile device connected at MHL port. (0 = false, 1 = true) |
| 9739 | * @hide |
| 9740 | */ |
| 9741 | public static final String MHL_POWER_CHARGE_ENABLED = "mhl_power_charge_enabled"; |
| 9742 | |
| 9743 | /** |
| 9744 | * Whether mobile data connections are allowed by the user. See |
| 9745 | * ConnectivityManager for more info. |
| 9746 | * @hide |
| 9747 | */ |
| 9748 | @UnsupportedAppUsage |
| 9749 | public static final String MOBILE_DATA = "mobile_data"; |
| 9750 | |
| 9751 | /** |
| 9752 | * Whether the mobile data connection should remain active even when higher |
| 9753 | * priority networks like WiFi are active, to help make network switching faster. |
| 9754 | * |
| 9755 | * See ConnectivityService for more info. |
| 9756 | * |
| 9757 | * (0 = disabled, 1 = enabled) |
| 9758 | * @hide |
| 9759 | */ |
| 9760 | public static final String MOBILE_DATA_ALWAYS_ON = "mobile_data_always_on"; |
| 9761 | |
| 9762 | /** |
| 9763 | * Whether the wifi data connection should remain active even when higher |
| 9764 | * priority networks like Ethernet are active, to keep both networks. |
| 9765 | * In the case where higher priority networks are connected, wifi will be |
| 9766 | * unused unless an application explicitly requests to use it. |
| 9767 | * |
| 9768 | * See ConnectivityService for more info. |
| 9769 | * |
| 9770 | * (0 = disabled, 1 = enabled) |
| 9771 | * @hide |
| 9772 | */ |
| 9773 | public static final String WIFI_ALWAYS_REQUESTED = "wifi_always_requested"; |
| 9774 | |
| 9775 | /** |
| 9776 | * Size of the event buffer for IP connectivity metrics. |
| 9777 | * @hide |
| 9778 | */ |
| 9779 | public static final String CONNECTIVITY_METRICS_BUFFER_SIZE = |
| 9780 | "connectivity_metrics_buffer_size"; |
| 9781 | |
| 9782 | /** {@hide} */ |
| 9783 | public static final String NETSTATS_ENABLED = "netstats_enabled"; |
| 9784 | /** {@hide} */ |
| 9785 | public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval"; |
| 9786 | /** {@hide} */ |
| 9787 | @Deprecated |
| 9788 | public static final String NETSTATS_TIME_CACHE_MAX_AGE = "netstats_time_cache_max_age"; |
| 9789 | /** {@hide} */ |
| 9790 | public static final String NETSTATS_GLOBAL_ALERT_BYTES = "netstats_global_alert_bytes"; |
| 9791 | /** {@hide} */ |
| 9792 | public static final String NETSTATS_SAMPLE_ENABLED = "netstats_sample_enabled"; |
| 9793 | /** {@hide} */ |
| 9794 | public static final String NETSTATS_AUGMENT_ENABLED = "netstats_augment_enabled"; |
| 9795 | /** {@hide} */ |
| 9796 | public static final String NETSTATS_COMBINE_SUBTYPE_ENABLED = "netstats_combine_subtype_enabled"; |
| 9797 | |
| 9798 | /** {@hide} */ |
| 9799 | public static final String NETSTATS_DEV_BUCKET_DURATION = "netstats_dev_bucket_duration"; |
| 9800 | /** {@hide} */ |
| 9801 | public static final String NETSTATS_DEV_PERSIST_BYTES = "netstats_dev_persist_bytes"; |
| 9802 | /** {@hide} */ |
| 9803 | public static final String NETSTATS_DEV_ROTATE_AGE = "netstats_dev_rotate_age"; |
| 9804 | /** {@hide} */ |
| 9805 | public static final String NETSTATS_DEV_DELETE_AGE = "netstats_dev_delete_age"; |
| 9806 | |
| 9807 | /** {@hide} */ |
| 9808 | public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration"; |
| 9809 | /** {@hide} */ |
| 9810 | public static final String NETSTATS_UID_PERSIST_BYTES = "netstats_uid_persist_bytes"; |
| 9811 | /** {@hide} */ |
| 9812 | public static final String NETSTATS_UID_ROTATE_AGE = "netstats_uid_rotate_age"; |
| 9813 | /** {@hide} */ |
| 9814 | public static final String NETSTATS_UID_DELETE_AGE = "netstats_uid_delete_age"; |
| 9815 | |
| 9816 | /** {@hide} */ |
| 9817 | public static final String NETSTATS_UID_TAG_BUCKET_DURATION = "netstats_uid_tag_bucket_duration"; |
| 9818 | /** {@hide} */ |
| 9819 | public static final String NETSTATS_UID_TAG_PERSIST_BYTES = "netstats_uid_tag_persist_bytes"; |
| 9820 | /** {@hide} */ |
| 9821 | public static final String NETSTATS_UID_TAG_ROTATE_AGE = "netstats_uid_tag_rotate_age"; |
| 9822 | /** {@hide} */ |
| 9823 | public static final String NETSTATS_UID_TAG_DELETE_AGE = "netstats_uid_tag_delete_age"; |
| 9824 | |
| 9825 | /** {@hide} */ |
| 9826 | public static final String NETPOLICY_QUOTA_ENABLED = "netpolicy_quota_enabled"; |
| 9827 | /** {@hide} */ |
| 9828 | public static final String NETPOLICY_QUOTA_UNLIMITED = "netpolicy_quota_unlimited"; |
| 9829 | /** {@hide} */ |
| 9830 | public static final String NETPOLICY_QUOTA_LIMITED = "netpolicy_quota_limited"; |
| 9831 | /** {@hide} */ |
| 9832 | public static final String NETPOLICY_QUOTA_FRAC_JOBS = "netpolicy_quota_frac_jobs"; |
| 9833 | /** {@hide} */ |
| 9834 | public static final String NETPOLICY_QUOTA_FRAC_MULTIPATH = "netpolicy_quota_frac_multipath"; |
| 9835 | |
| 9836 | /** {@hide} */ |
| 9837 | public static final String NETPOLICY_OVERRIDE_ENABLED = "netpolicy_override_enabled"; |
| 9838 | |
| 9839 | /** |
| 9840 | * User preference for which network(s) should be used. Only the |
| 9841 | * connectivity service should touch this. |
| 9842 | */ |
| 9843 | public static final String NETWORK_PREFERENCE = "network_preference"; |
| 9844 | |
| 9845 | /** |
| 9846 | * Which package name to use for network scoring. If null, or if the package is not a valid |
| 9847 | * scorer app, external network scores will neither be requested nor accepted. |
| 9848 | * @hide |
| 9849 | */ |
| 9850 | @UnsupportedAppUsage |
| 9851 | public static final String NETWORK_SCORER_APP = "network_scorer_app"; |
| 9852 | |
| 9853 | /** |
| 9854 | * Whether night display forced auto mode is available. |
| 9855 | * 0 = unavailable, 1 = available. |
| 9856 | * @hide |
| 9857 | */ |
| 9858 | public static final String NIGHT_DISPLAY_FORCED_AUTO_MODE_AVAILABLE = |
| 9859 | "night_display_forced_auto_mode_available"; |
| 9860 | |
| 9861 | /** |
| 9862 | * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment |
| 9863 | * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been |
| 9864 | * exceeded. |
| 9865 | * @hide |
| 9866 | */ |
| 9867 | public static final String NITZ_UPDATE_DIFF = "nitz_update_diff"; |
| 9868 | |
| 9869 | /** |
| 9870 | * The length of time in milli-seconds that automatic small adjustments to |
| 9871 | * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded. |
| 9872 | * @hide |
| 9873 | */ |
| 9874 | public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing"; |
| 9875 | |
| 9876 | /** Preferred NTP server. {@hide} */ |
| 9877 | public static final String NTP_SERVER = "ntp_server"; |
| 9878 | /** Timeout in milliseconds to wait for NTP server. {@hide} */ |
| 9879 | public static final String NTP_TIMEOUT = "ntp_timeout"; |
| 9880 | |
| 9881 | /** {@hide} */ |
| 9882 | public static final String STORAGE_BENCHMARK_INTERVAL = "storage_benchmark_interval"; |
| 9883 | |
| 9884 | /** |
| 9885 | * Whether or not Settings should enable psd API. |
| 9886 | * {@hide} |
| 9887 | */ |
| 9888 | public static final String SETTINGS_USE_PSD_API = "settings_use_psd_api"; |
| 9889 | |
| 9890 | /** |
| 9891 | * Whether or not Settings should enable external provider API. |
| 9892 | * {@hide} |
| 9893 | */ |
| 9894 | public static final String SETTINGS_USE_EXTERNAL_PROVIDER_API = |
| 9895 | "settings_use_external_provider_api"; |
| 9896 | |
| 9897 | /** |
| 9898 | * Sample validity in seconds to configure for the system DNS resolver. |
| 9899 | * {@hide} |
| 9900 | */ |
| 9901 | public static final String DNS_RESOLVER_SAMPLE_VALIDITY_SECONDS = |
| 9902 | "dns_resolver_sample_validity_seconds"; |
| 9903 | |
| 9904 | /** |
| 9905 | * Success threshold in percent for use with the system DNS resolver. |
| 9906 | * {@hide} |
| 9907 | */ |
| 9908 | public static final String DNS_RESOLVER_SUCCESS_THRESHOLD_PERCENT = |
| 9909 | "dns_resolver_success_threshold_percent"; |
| 9910 | |
| 9911 | /** |
| 9912 | * Minimum number of samples needed for statistics to be considered meaningful in the |
| 9913 | * system DNS resolver. |
| 9914 | * {@hide} |
| 9915 | */ |
| 9916 | public static final String DNS_RESOLVER_MIN_SAMPLES = "dns_resolver_min_samples"; |
| 9917 | |
| 9918 | /** |
| 9919 | * Maximum number taken into account for statistics purposes in the system DNS resolver. |
| 9920 | * {@hide} |
| 9921 | */ |
| 9922 | public static final String DNS_RESOLVER_MAX_SAMPLES = "dns_resolver_max_samples"; |
| 9923 | |
| 9924 | /** |
| 9925 | * Whether to disable the automatic scheduling of system updates. |
| 9926 | * 1 = system updates won't be automatically scheduled (will always |
| 9927 | * present notification instead). |
| 9928 | * 0 = system updates will be automatically scheduled. (default) |
| 9929 | * @hide |
| 9930 | */ |
| 9931 | @SystemApi |
| 9932 | public static final String OTA_DISABLE_AUTOMATIC_UPDATE = "ota_disable_automatic_update"; |
| 9933 | |
| 9934 | /** Timeout for package verification. |
| 9935 | * @hide */ |
| 9936 | public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout"; |
| 9937 | |
| 9938 | /** Default response code for package verification. |
| 9939 | * @hide */ |
| 9940 | public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response"; |
| 9941 | |
| 9942 | /** |
| 9943 | * Show package verification setting in the Settings app. |
| 9944 | * 1 = show (default) |
| 9945 | * 0 = hide |
| 9946 | * @hide |
| 9947 | */ |
| 9948 | public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible"; |
| 9949 | |
| 9950 | /** |
| 9951 | * Run package verification on apps installed through ADB/ADT/USB |
| 9952 | * 1 = perform package verification on ADB installs (default) |
| 9953 | * 0 = bypass package verification on ADB installs |
| 9954 | * @hide |
| 9955 | */ |
| 9956 | public static final String PACKAGE_VERIFIER_INCLUDE_ADB = "verifier_verify_adb_installs"; |
| 9957 | |
| 9958 | /** |
| 9959 | * Run integrity checks for integrity rule providers. |
| 9960 | * 0 = bypass integrity verification on installs from rule providers (default) |
| 9961 | * 1 = perform integrity verification on installs from rule providers |
| 9962 | * @hide |
| 9963 | */ |
| 9964 | public static final String INTEGRITY_CHECK_INCLUDES_RULE_PROVIDER = |
| 9965 | "verify_integrity_for_rule_provider"; |
| 9966 | |
| 9967 | /** |
| 9968 | * Time since last fstrim (milliseconds) after which we force one to happen |
| 9969 | * during device startup. If unset, the default is 3 days. |
| 9970 | * @hide |
| 9971 | */ |
| 9972 | public static final String FSTRIM_MANDATORY_INTERVAL = "fstrim_mandatory_interval"; |
| 9973 | |
| 9974 | /** |
| 9975 | * The interval in milliseconds at which to check packet counts on the |
| 9976 | * mobile data interface when screen is on, to detect possible data |
| 9977 | * connection problems. |
| 9978 | * @hide |
| 9979 | */ |
| 9980 | public static final String PDP_WATCHDOG_POLL_INTERVAL_MS = |
| 9981 | "pdp_watchdog_poll_interval_ms"; |
| 9982 | |
| 9983 | /** |
| 9984 | * The interval in milliseconds at which to check packet counts on the |
| 9985 | * mobile data interface when screen is off, to detect possible data |
| 9986 | * connection problems. |
| 9987 | * @hide |
| 9988 | */ |
| 9989 | public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS = |
| 9990 | "pdp_watchdog_long_poll_interval_ms"; |
| 9991 | |
| 9992 | /** |
| 9993 | * The interval in milliseconds at which to check packet counts on the |
| 9994 | * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} |
| 9995 | * outgoing packets has been reached without incoming packets. |
| 9996 | * @hide |
| 9997 | */ |
| 9998 | public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS = |
| 9999 | "pdp_watchdog_error_poll_interval_ms"; |
| 10000 | |
| 10001 | /** |
| 10002 | * The number of outgoing packets sent without seeing an incoming packet |
| 10003 | * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT} |
| 10004 | * device is logged to the event log |
| 10005 | * @hide |
| 10006 | */ |
| 10007 | public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT = |
| 10008 | "pdp_watchdog_trigger_packet_count"; |
| 10009 | |
| 10010 | /** |
| 10011 | * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS}) |
| 10012 | * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before |
| 10013 | * attempting data connection recovery. |
| 10014 | * @hide |
| 10015 | */ |
| 10016 | public static final String PDP_WATCHDOG_ERROR_POLL_COUNT = |
| 10017 | "pdp_watchdog_error_poll_count"; |
| 10018 | |
| 10019 | /** |
| 10020 | * The number of failed PDP reset attempts before moving to something more |
| 10021 | * drastic: re-registering to the network. |
| 10022 | * @hide |
| 10023 | */ |
| 10024 | public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT = |
| 10025 | "pdp_watchdog_max_pdp_reset_fail_count"; |
| 10026 | |
| 10027 | /** |
| 10028 | * URL to open browser on to allow user to manage a prepay account |
| 10029 | * @hide |
| 10030 | */ |
| 10031 | public static final String SETUP_PREPAID_DATA_SERVICE_URL = |
| 10032 | "setup_prepaid_data_service_url"; |
| 10033 | |
| 10034 | /** |
| 10035 | * URL to attempt a GET on to see if this is a prepay device |
| 10036 | * @hide |
| 10037 | */ |
| 10038 | public static final String SETUP_PREPAID_DETECTION_TARGET_URL = |
| 10039 | "setup_prepaid_detection_target_url"; |
| 10040 | |
| 10041 | /** |
| 10042 | * Host to check for a redirect to after an attempt to GET |
| 10043 | * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there, |
| 10044 | * this is a prepaid device with zero balance.) |
| 10045 | * @hide |
| 10046 | */ |
| 10047 | public static final String SETUP_PREPAID_DETECTION_REDIR_HOST = |
| 10048 | "setup_prepaid_detection_redir_host"; |
| 10049 | |
| 10050 | /** |
| 10051 | * The interval in milliseconds at which to check the number of SMS sent out without asking |
| 10052 | * for use permit, to limit the un-authorized SMS usage. |
| 10053 | * |
| 10054 | * @hide |
| 10055 | */ |
| 10056 | public static final String SMS_OUTGOING_CHECK_INTERVAL_MS = |
| 10057 | "sms_outgoing_check_interval_ms"; |
| 10058 | |
| 10059 | /** |
| 10060 | * The number of outgoing SMS sent without asking for user permit (of {@link |
| 10061 | * #SMS_OUTGOING_CHECK_INTERVAL_MS} |
| 10062 | * |
| 10063 | * @hide |
| 10064 | */ |
| 10065 | public static final String SMS_OUTGOING_CHECK_MAX_COUNT = |
| 10066 | "sms_outgoing_check_max_count"; |
| 10067 | |
| 10068 | /** |
| 10069 | * Used to disable SMS short code confirmation - defaults to true. |
| 10070 | * True indcates we will do the check, etc. Set to false to disable. |
| 10071 | * @see com.android.internal.telephony.SmsUsageMonitor |
| 10072 | * @hide |
| 10073 | */ |
| 10074 | public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation"; |
| 10075 | |
| 10076 | /** |
| 10077 | * Used to select which country we use to determine premium sms codes. |
| 10078 | * One of com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_SIM, |
| 10079 | * com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_NETWORK, |
| 10080 | * or com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_BOTH. |
| 10081 | * @hide |
| 10082 | */ |
| 10083 | public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule"; |
| 10084 | |
| 10085 | /** |
| 10086 | * Used to select TCP's default initial receiver window size in segments - defaults to a |
| 10087 | * build config value. |
| 10088 | * @hide |
| 10089 | */ |
| 10090 | public static final String TCP_DEFAULT_INIT_RWND = "tcp_default_init_rwnd"; |
| 10091 | |
| 10092 | /** |
| 10093 | * Used to disable Tethering on a device - defaults to true. |
| 10094 | * @hide |
| 10095 | */ |
| 10096 | @SystemApi |
| 10097 | public static final String TETHER_SUPPORTED = "tether_supported"; |
| 10098 | |
| 10099 | /** |
| 10100 | * Used to require DUN APN on the device or not - defaults to a build config value |
| 10101 | * which defaults to false. |
| 10102 | * @hide |
| 10103 | */ |
| 10104 | public static final String TETHER_DUN_REQUIRED = "tether_dun_required"; |
| 10105 | |
| 10106 | /** |
| 10107 | * Used to hold a gservices-provisioned apn value for DUN. If set, or the |
| 10108 | * corresponding build config values are set it will override the APN DB |
| 10109 | * values. |
| 10110 | * Consists of a comma separated list of strings: |
| 10111 | * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type" |
| 10112 | * note that empty fields can be omitted: "name,apn,,,,,,,,,310,260,,DUN" |
| 10113 | * @hide |
| 10114 | */ |
| 10115 | public static final String TETHER_DUN_APN = "tether_dun_apn"; |
| 10116 | |
| 10117 | /** |
| 10118 | * Used to disable trying to talk to any available tethering offload HAL. |
| 10119 | * |
| 10120 | * Integer values are interpreted as boolean, and the absence of an explicit setting |
| 10121 | * is interpreted as |false|. |
| 10122 | * @hide |
| 10123 | */ |
| 10124 | @SystemApi |
| 10125 | @TestApi |
| 10126 | public static final String TETHER_OFFLOAD_DISABLED = "tether_offload_disabled"; |
| 10127 | |
| 10128 | /** |
| 10129 | * Use the old dnsmasq DHCP server for tethering instead of the framework implementation. |
| 10130 | * |
| 10131 | * Integer values are interpreted as boolean, and the absence of an explicit setting |
| 10132 | * is interpreted as |false|. |
| 10133 | * @hide |
| 10134 | */ |
| 10135 | public static final String TETHER_ENABLE_LEGACY_DHCP_SERVER = |
| 10136 | "tether_enable_legacy_dhcp_server"; |
| 10137 | |
| 10138 | /** |
| 10139 | * List of certificate (hex string representation of the application's certificate - SHA-1 |
| 10140 | * or SHA-256) and carrier app package pairs which are whitelisted to prompt the user for |
| 10141 | * install when a sim card with matching UICC carrier privilege rules is inserted. The |
| 10142 | * certificate is used as a key, so the certificate encoding here must be the same as the |
| 10143 | * certificate encoding used on the SIM. |
| 10144 | * |
| 10145 | * The value is "cert1:package1;cert2:package2;..." |
| 10146 | * @hide |
| 10147 | */ |
| 10148 | @SystemApi |
| 10149 | public static final String CARRIER_APP_WHITELIST = "carrier_app_whitelist"; |
| 10150 | |
| 10151 | /** |
| 10152 | * Map of package name to application names. The application names cannot and will not be |
| 10153 | * localized. App names may not contain colons or semicolons. |
| 10154 | * |
| 10155 | * The value is "packageName1:appName1;packageName2:appName2;..." |
| 10156 | * @hide |
| 10157 | */ |
| 10158 | @SystemApi |
| 10159 | public static final String CARRIER_APP_NAMES = "carrier_app_names"; |
| 10160 | |
| 10161 | /** |
| 10162 | * USB Mass Storage Enabled |
| 10163 | */ |
| 10164 | public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled"; |
| 10165 | |
| 10166 | /** |
| 10167 | * If this setting is set (to anything), then all references |
| 10168 | * to Gmail on the device must change to Google Mail. |
| 10169 | */ |
| 10170 | public static final String USE_GOOGLE_MAIL = "use_google_mail"; |
| 10171 | |
| 10172 | /** |
| 10173 | * Whether or not switching/creating users is enabled by user. |
| 10174 | * @hide |
| 10175 | */ |
| 10176 | public static final String USER_SWITCHER_ENABLED = "user_switcher_enabled"; |
| 10177 | |
| 10178 | /** |
| 10179 | * Webview Data reduction proxy key. |
| 10180 | * @hide |
| 10181 | */ |
| 10182 | public static final String WEBVIEW_DATA_REDUCTION_PROXY_KEY = |
| 10183 | "webview_data_reduction_proxy_key"; |
| 10184 | |
| 10185 | /** |
| 10186 | * Whether or not the WebView fallback mechanism should be enabled. |
| 10187 | * 0=disabled, 1=enabled. |
| 10188 | * @hide |
| 10189 | */ |
| 10190 | public static final String WEBVIEW_FALLBACK_LOGIC_ENABLED = |
| 10191 | "webview_fallback_logic_enabled"; |
| 10192 | |
| 10193 | /** |
| 10194 | * Name of the package used as WebView provider (if unset the provider is instead determined |
| 10195 | * by the system). |
| 10196 | * @hide |
| 10197 | */ |
| 10198 | @UnsupportedAppUsage |
| 10199 | public static final String WEBVIEW_PROVIDER = "webview_provider"; |
| 10200 | |
| 10201 | /** |
| 10202 | * Developer setting to enable WebView multiprocess rendering. |
| 10203 | * @hide |
| 10204 | */ |
| 10205 | @SystemApi |
| 10206 | public static final String WEBVIEW_MULTIPROCESS = "webview_multiprocess"; |
| 10207 | |
| 10208 | /** |
| 10209 | * The maximum number of notifications shown in 24 hours when switching networks. |
| 10210 | * @hide |
| 10211 | */ |
| 10212 | public static final String NETWORK_SWITCH_NOTIFICATION_DAILY_LIMIT = |
| 10213 | "network_switch_notification_daily_limit"; |
| 10214 | |
| 10215 | /** |
| 10216 | * The minimum time in milliseconds between notifications when switching networks. |
| 10217 | * @hide |
| 10218 | */ |
| 10219 | public static final String NETWORK_SWITCH_NOTIFICATION_RATE_LIMIT_MILLIS = |
| 10220 | "network_switch_notification_rate_limit_millis"; |
| 10221 | |
| 10222 | /** |
| 10223 | * Whether to automatically switch away from wifi networks that lose Internet access. |
| 10224 | * Only meaningful if config_networkAvoidBadWifi is set to 0, otherwise the system always |
| 10225 | * avoids such networks. Valid values are: |
| 10226 | * |
| 10227 | * 0: Don't avoid bad wifi, don't prompt the user. Get stuck on bad wifi like it's 2013. |
| 10228 | * null: Ask the user whether to switch away from bad wifi. |
| 10229 | * 1: Avoid bad wifi. |
| 10230 | * |
| 10231 | * @hide |
| 10232 | */ |
| 10233 | public static final String NETWORK_AVOID_BAD_WIFI = "network_avoid_bad_wifi"; |
| 10234 | |
| 10235 | /** |
| 10236 | * User setting for ConnectivityManager.getMeteredMultipathPreference(). This value may be |
| 10237 | * overridden by the system based on device or application state. If null, the value |
| 10238 | * specified by config_networkMeteredMultipathPreference is used. |
| 10239 | * |
| 10240 | * @hide |
| 10241 | */ |
| 10242 | public static final String NETWORK_METERED_MULTIPATH_PREFERENCE = |
| 10243 | "network_metered_multipath_preference"; |
| 10244 | |
| 10245 | /** |
| 10246 | * Default daily multipath budget used by ConnectivityManager.getMultipathPreference() |
| 10247 | * on metered networks. This default quota is only used if quota could not be determined |
| 10248 | * from data plan or data limit/warning set by the user. |
| 10249 | * @hide |
| 10250 | */ |
| 10251 | public static final String NETWORK_DEFAULT_DAILY_MULTIPATH_QUOTA_BYTES = |
| 10252 | "network_default_daily_multipath_quota_bytes"; |
| 10253 | |
| 10254 | /** |
| 10255 | * Network watchlist last report time. |
| 10256 | * @hide |
| 10257 | */ |
| 10258 | public static final String NETWORK_WATCHLIST_LAST_REPORT_TIME = |
| 10259 | "network_watchlist_last_report_time"; |
| 10260 | |
| 10261 | /** |
| 10262 | * The thresholds of the wifi throughput badging (SD, HD etc.) as a comma-delimited list of |
| 10263 | * colon-delimited key-value pairs. The key is the badging enum value defined in |
| 10264 | * android.net.ScoredNetwork and the value is the minimum sustained network throughput in |
| 10265 | * kbps required for the badge. For example: "10:3000,20:5000,30:25000" |
| 10266 | * |
| 10267 | * @hide |
| 10268 | */ |
| 10269 | @SystemApi |
| 10270 | public static final String WIFI_BADGING_THRESHOLDS = "wifi_badging_thresholds"; |
| 10271 | |
| 10272 | /** |
| 10273 | * Whether Wifi display is enabled/disabled |
| 10274 | * 0=disabled. 1=enabled. |
| 10275 | * @hide |
| 10276 | */ |
| 10277 | public static final String WIFI_DISPLAY_ON = "wifi_display_on"; |
| 10278 | |
| 10279 | /** |
| 10280 | * Whether Wifi display certification mode is enabled/disabled |
| 10281 | * 0=disabled. 1=enabled. |
| 10282 | * @hide |
| 10283 | */ |
| 10284 | public static final String WIFI_DISPLAY_CERTIFICATION_ON = |
| 10285 | "wifi_display_certification_on"; |
| 10286 | |
| 10287 | /** |
| 10288 | * WPS Configuration method used by Wifi display, this setting only |
| 10289 | * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled). |
| 10290 | * |
| 10291 | * Possible values are: |
| 10292 | * |
| 10293 | * WpsInfo.INVALID: use default WPS method chosen by framework |
| 10294 | * WpsInfo.PBC : use Push button |
| 10295 | * WpsInfo.KEYPAD : use Keypad |
| 10296 | * WpsInfo.DISPLAY: use Display |
| 10297 | * @hide |
| 10298 | */ |
| 10299 | public static final String WIFI_DISPLAY_WPS_CONFIG = |
| 10300 | "wifi_display_wps_config"; |
| 10301 | |
| 10302 | /** |
| 10303 | * Whether to notify the user of open networks. |
| 10304 | * <p> |
| 10305 | * If not connected and the scan results have an open network, we will |
| 10306 | * put this notification up. If we attempt to connect to a network or |
| 10307 | * the open network(s) disappear, we remove the notification. When we |
| 10308 | * show the notification, we will not show it again for |
| 10309 | * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time. |
| 10310 | * |
| 10311 | * @deprecated This feature is no longer controlled by this setting in |
| 10312 | * {@link android.os.Build.VERSION_CODES#O}. |
| 10313 | */ |
| 10314 | @Deprecated |
| 10315 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 10316 | "wifi_networks_available_notification_on"; |
| 10317 | |
| 10318 | /** |
| 10319 | * {@hide} |
| 10320 | */ |
| 10321 | public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 10322 | "wimax_networks_available_notification_on"; |
| 10323 | |
| 10324 | /** |
| 10325 | * Delay (in seconds) before repeating the Wi-Fi networks available notification. |
| 10326 | * Connecting to a network will reset the timer. |
| 10327 | * @deprecated This is no longer used or set by the platform. |
| 10328 | */ |
| 10329 | @Deprecated |
| 10330 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
| 10331 | "wifi_networks_available_repeat_delay"; |
| 10332 | |
| 10333 | /** |
| 10334 | * 802.11 country code in ISO 3166 format |
| 10335 | * @hide |
| 10336 | */ |
| 10337 | public static final String WIFI_COUNTRY_CODE = "wifi_country_code"; |
| 10338 | |
| 10339 | /** |
| 10340 | * The interval in milliseconds to issue wake up scans when wifi needs |
| 10341 | * to connect. This is necessary to connect to an access point when |
| 10342 | * device is on the move and the screen is off. |
| 10343 | * @hide |
| 10344 | */ |
| 10345 | public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS = |
| 10346 | "wifi_framework_scan_interval_ms"; |
| 10347 | |
| 10348 | /** |
| 10349 | * The interval in milliseconds after which Wi-Fi is considered idle. |
| 10350 | * When idle, it is possible for the device to be switched from Wi-Fi to |
| 10351 | * the mobile data network. |
| 10352 | * @hide |
| 10353 | */ |
| 10354 | public static final String WIFI_IDLE_MS = "wifi_idle_ms"; |
| 10355 | |
| 10356 | /** |
| 10357 | * When the number of open networks exceeds this number, the |
| 10358 | * least-recently-used excess networks will be removed. |
| 10359 | * @deprecated This is no longer used or set by the platform. |
| 10360 | */ |
| 10361 | @Deprecated |
| 10362 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept"; |
| 10363 | |
| 10364 | /** |
| 10365 | * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this. |
| 10366 | */ |
| 10367 | public static final String WIFI_ON = "wifi_on"; |
| 10368 | |
| 10369 | /** |
| 10370 | * Setting to allow scans to be enabled even wifi is turned off for connectivity. |
| 10371 | * @hide |
| 10372 | * @deprecated To be removed. Use {@link WifiManager#setScanAlwaysAvailable(boolean)} for |
| 10373 | * setting the value and {@link WifiManager#isScanAlwaysAvailable()} for query. |
| 10374 | */ |
| 10375 | public static final String WIFI_SCAN_ALWAYS_AVAILABLE = |
| 10376 | "wifi_scan_always_enabled"; |
| 10377 | |
| 10378 | /** |
| 10379 | * Indicate whether factory reset request is pending. |
| 10380 | * |
| 10381 | * Type: int (0 for false, 1 for true) |
| 10382 | * @hide |
| 10383 | * @deprecated To be removed. |
| 10384 | */ |
| 10385 | public static final String WIFI_P2P_PENDING_FACTORY_RESET = |
| 10386 | "wifi_p2p_pending_factory_reset"; |
| 10387 | |
| 10388 | /** |
| 10389 | * Whether soft AP will shut down after a timeout period when no devices are connected. |
| 10390 | * |
| 10391 | * Type: int (0 for false, 1 for true) |
| 10392 | * @hide |
| 10393 | * @deprecated To be removed. Use {@link SoftApConfiguration.Builder# |
| 10394 | * setAutoShutdownEnabled(boolean)} for setting the value and {@link SoftApConfiguration# |
| 10395 | * isAutoShutdownEnabled()} for query. |
| 10396 | */ |
| 10397 | public static final String SOFT_AP_TIMEOUT_ENABLED = "soft_ap_timeout_enabled"; |
| 10398 | |
| 10399 | /** |
| 10400 | * Value to specify if Wi-Fi Wakeup feature is enabled. |
| 10401 | * |
| 10402 | * Type: int (0 for false, 1 for true) |
| 10403 | * @hide |
| 10404 | * @deprecated Use {@link WifiManager#setAutoWakeupEnabled(boolean)} for setting the value |
| 10405 | * and {@link WifiManager#isAutoWakeupEnabled()} for query. |
| 10406 | */ |
| 10407 | @Deprecated |
| 10408 | @SystemApi |
| 10409 | public static final String WIFI_WAKEUP_ENABLED = "wifi_wakeup_enabled"; |
| 10410 | |
| 10411 | /** |
| 10412 | * Value to specify if wifi settings migration is complete or not. |
| 10413 | * Note: This should only be used from within {@link android.net.wifi.WifiMigration} class. |
| 10414 | * |
| 10415 | * Type: int (0 for false, 1 for true) |
| 10416 | * @hide |
| 10417 | */ |
| 10418 | public static final String WIFI_MIGRATION_COMPLETED = "wifi_migration_completed"; |
| 10419 | |
| 10420 | /** |
| 10421 | * Value to specify whether network quality scores and badging should be shown in the UI. |
| 10422 | * |
| 10423 | * Type: int (0 for false, 1 for true) |
| 10424 | * @hide |
| 10425 | */ |
| 10426 | public static final String NETWORK_SCORING_UI_ENABLED = "network_scoring_ui_enabled"; |
| 10427 | |
| 10428 | /** |
| 10429 | * Value to specify how long in milliseconds to retain seen score cache curves to be used |
| 10430 | * when generating SSID only bases score curves. |
| 10431 | * |
| 10432 | * Type: long |
| 10433 | * @hide |
| 10434 | */ |
| 10435 | public static final String SPEED_LABEL_CACHE_EVICTION_AGE_MILLIS = |
| 10436 | "speed_label_cache_eviction_age_millis"; |
| 10437 | |
| 10438 | /** |
| 10439 | * Value to specify if network recommendations from |
| 10440 | * {@link com.android.server.NetworkScoreService} are enabled. |
| 10441 | * |
| 10442 | * Type: int |
| 10443 | * Valid values: |
| 10444 | * -1 = Forced off |
| 10445 | * 0 = Disabled |
| 10446 | * 1 = Enabled |
| 10447 | * |
| 10448 | * Most readers of this setting should simply check if value == 1 to determined the |
| 10449 | * enabled state. |
| 10450 | * @hide |
| 10451 | * @deprecated To be removed. |
| 10452 | */ |
| 10453 | public static final String NETWORK_RECOMMENDATIONS_ENABLED = |
| 10454 | "network_recommendations_enabled"; |
| 10455 | |
| 10456 | /** |
| 10457 | * Which package name to use for network recommendations. If null, network recommendations |
| 10458 | * will neither be requested nor accepted. |
| 10459 | * |
| 10460 | * Use {@link NetworkScoreManager#getActiveScorerPackage()} to read this value and |
| 10461 | * {@link NetworkScoreManager#setActiveScorer(String)} to write it. |
| 10462 | * |
| 10463 | * Type: string - package name |
| 10464 | * @hide |
| 10465 | */ |
| 10466 | public static final String NETWORK_RECOMMENDATIONS_PACKAGE = |
| 10467 | "network_recommendations_package"; |
| 10468 | |
| 10469 | /** |
| 10470 | * The package name of the application that connect and secures high quality open wifi |
| 10471 | * networks automatically. |
| 10472 | * |
| 10473 | * Type: string package name or null if the feature is either not provided or disabled. |
| 10474 | * @hide |
| 10475 | */ |
| 10476 | @TestApi |
| 10477 | public static final String USE_OPEN_WIFI_PACKAGE = "use_open_wifi_package"; |
| 10478 | |
| 10479 | /** |
| 10480 | * The expiration time in milliseconds for the {@link android.net.WifiKey} request cache in |
| 10481 | * {@link com.android.server.wifi.RecommendedNetworkEvaluator}. |
| 10482 | * |
| 10483 | * Type: long |
| 10484 | * @hide |
| 10485 | */ |
| 10486 | public static final String RECOMMENDED_NETWORK_EVALUATOR_CACHE_EXPIRY_MS = |
| 10487 | "recommended_network_evaluator_cache_expiry_ms"; |
| 10488 | |
| 10489 | /** |
| 10490 | * Whether wifi scan throttle is enabled or not. |
| 10491 | * |
| 10492 | * Type: int (0 for false, 1 for true) |
| 10493 | * @hide |
| 10494 | * @deprecated Use {@link WifiManager#setScanThrottleEnabled(boolean)} for setting the value |
| 10495 | * and {@link WifiManager#isScanThrottleEnabled()} for query. |
| 10496 | */ |
| 10497 | public static final String WIFI_SCAN_THROTTLE_ENABLED = "wifi_scan_throttle_enabled"; |
| 10498 | |
| 10499 | /** |
| 10500 | * Settings to allow BLE scans to be enabled even when Bluetooth is turned off for |
| 10501 | * connectivity. |
| 10502 | * @hide |
| 10503 | */ |
| 10504 | public static final String BLE_SCAN_ALWAYS_AVAILABLE = "ble_scan_always_enabled"; |
| 10505 | |
| 10506 | /** |
| 10507 | * The length in milliseconds of a BLE scan window in a low-power scan mode. |
| 10508 | * @hide |
| 10509 | */ |
| 10510 | public static final String BLE_SCAN_LOW_POWER_WINDOW_MS = "ble_scan_low_power_window_ms"; |
| 10511 | |
| 10512 | /** |
| 10513 | * The length in milliseconds of a BLE scan window in a balanced scan mode. |
| 10514 | * @hide |
| 10515 | */ |
| 10516 | public static final String BLE_SCAN_BALANCED_WINDOW_MS = "ble_scan_balanced_window_ms"; |
| 10517 | |
| 10518 | /** |
| 10519 | * The length in milliseconds of a BLE scan window in a low-latency scan mode. |
| 10520 | * @hide |
| 10521 | */ |
| 10522 | public static final String BLE_SCAN_LOW_LATENCY_WINDOW_MS = |
| 10523 | "ble_scan_low_latency_window_ms"; |
| 10524 | |
| 10525 | /** |
| 10526 | * The length in milliseconds of a BLE scan interval in a low-power scan mode. |
| 10527 | * @hide |
| 10528 | */ |
| 10529 | public static final String BLE_SCAN_LOW_POWER_INTERVAL_MS = |
| 10530 | "ble_scan_low_power_interval_ms"; |
| 10531 | |
| 10532 | /** |
| 10533 | * The length in milliseconds of a BLE scan interval in a balanced scan mode. |
| 10534 | * @hide |
| 10535 | */ |
| 10536 | public static final String BLE_SCAN_BALANCED_INTERVAL_MS = |
| 10537 | "ble_scan_balanced_interval_ms"; |
| 10538 | |
| 10539 | /** |
| 10540 | * The length in milliseconds of a BLE scan interval in a low-latency scan mode. |
| 10541 | * @hide |
| 10542 | */ |
| 10543 | public static final String BLE_SCAN_LOW_LATENCY_INTERVAL_MS = |
| 10544 | "ble_scan_low_latency_interval_ms"; |
| 10545 | |
| 10546 | /** |
| 10547 | * The mode that BLE scanning clients will be moved to when in the background. |
| 10548 | * @hide |
| 10549 | */ |
| 10550 | public static final String BLE_SCAN_BACKGROUND_MODE = "ble_scan_background_mode"; |
| 10551 | |
| 10552 | /** |
| 10553 | * The interval in milliseconds to scan as used by the wifi supplicant |
| 10554 | * @hide |
| 10555 | */ |
| 10556 | public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS = |
| 10557 | "wifi_supplicant_scan_interval_ms"; |
| 10558 | |
| 10559 | /** |
| 10560 | * whether frameworks handles wifi auto-join |
| 10561 | * @hide |
| 10562 | */ |
| 10563 | public static final String WIFI_ENHANCED_AUTO_JOIN = |
| 10564 | "wifi_enhanced_auto_join"; |
| 10565 | |
| 10566 | /** |
| 10567 | * whether settings show RSSI |
| 10568 | * @hide |
| 10569 | */ |
| 10570 | public static final String WIFI_NETWORK_SHOW_RSSI = |
| 10571 | "wifi_network_show_rssi"; |
| 10572 | |
| 10573 | /** |
| 10574 | * The interval in milliseconds to scan at supplicant when p2p is connected |
| 10575 | * @hide |
| 10576 | */ |
| 10577 | public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS = |
| 10578 | "wifi_scan_interval_p2p_connected_ms"; |
| 10579 | |
| 10580 | /** |
| 10581 | * Whether the Wi-Fi watchdog is enabled. |
| 10582 | */ |
| 10583 | public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; |
| 10584 | |
| 10585 | /** |
| 10586 | * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and |
| 10587 | * the setting needs to be set to 0 to disable it. |
| 10588 | * @hide |
| 10589 | */ |
| 10590 | @UnsupportedAppUsage |
| 10591 | public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED = |
| 10592 | "wifi_watchdog_poor_network_test_enabled"; |
| 10593 | |
| 10594 | /** |
| 10595 | * Setting to enable verbose logging in Wi-Fi; disabled by default, and setting to 1 |
| 10596 | * will enable it. In the future, additional values may be supported. |
| 10597 | * @hide |
| 10598 | * @deprecated Use {@link WifiManager#setVerboseLoggingEnabled(boolean)} for setting the |
| 10599 | * value and {@link WifiManager#isVerboseLoggingEnabled()} for query. |
| 10600 | */ |
| 10601 | public static final String WIFI_VERBOSE_LOGGING_ENABLED = |
| 10602 | "wifi_verbose_logging_enabled"; |
| 10603 | |
| 10604 | /** |
| 10605 | * Setting to enable connected MAC randomization in Wi-Fi; disabled by default, and |
| 10606 | * setting to 1 will enable it. In the future, additional values may be supported. |
| 10607 | * @deprecated MAC randomization is now a per-network setting |
| 10608 | * @hide |
| 10609 | */ |
| 10610 | @Deprecated |
| 10611 | public static final String WIFI_CONNECTED_MAC_RANDOMIZATION_ENABLED = |
| 10612 | "wifi_connected_mac_randomization_enabled"; |
| 10613 | |
| 10614 | /** |
| 10615 | * Parameters to adjust the performance of framework wifi scoring methods. |
| 10616 | * <p> |
| 10617 | * Encoded as a comma-separated key=value list, for example: |
| 10618 | * "rssi5=-80:-77:-70:-57,rssi2=-83:-80:-73:-60,horizon=15" |
| 10619 | * This is intended for experimenting with new parameter values, |
| 10620 | * and is normally unset or empty. The example does not include all |
| 10621 | * parameters that may be honored. |
| 10622 | * Default values are provided by code or device configurations. |
| 10623 | * Errors in the parameters will cause the entire setting to be ignored. |
| 10624 | * @hide |
| 10625 | * @deprecated This is no longer used or set by the platform. |
| 10626 | */ |
| 10627 | public static final String WIFI_SCORE_PARAMS = |
| 10628 | "wifi_score_params"; |
| 10629 | |
| 10630 | /** |
| 10631 | * The maximum number of times we will retry a connection to an access |
| 10632 | * point for which we have failed in acquiring an IP address from DHCP. |
| 10633 | * A value of N means that we will make N+1 connection attempts in all. |
| 10634 | */ |
| 10635 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; |
| 10636 | |
| 10637 | /** |
| 10638 | * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile |
| 10639 | * data connectivity to be established after a disconnect from Wi-Fi. |
| 10640 | */ |
| 10641 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
| 10642 | "wifi_mobile_data_transition_wakelock_timeout_ms"; |
| 10643 | |
| 10644 | /** |
| 10645 | * This setting controls whether WiFi configurations created by a Device Owner app |
| 10646 | * should be locked down (that is, be editable or removable only by the Device Owner App, |
| 10647 | * not even by Settings app). |
| 10648 | * This setting takes integer values. Non-zero values mean DO created configurations |
| 10649 | * are locked down. Value of zero means they are not. Default value in the absence of |
| 10650 | * actual value to this setting is 0. |
| 10651 | */ |
| 10652 | public static final String WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN = |
| 10653 | "wifi_device_owner_configs_lockdown"; |
| 10654 | |
| 10655 | /** |
| 10656 | * The operational wifi frequency band |
| 10657 | * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO}, |
| 10658 | * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or |
| 10659 | * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ} |
| 10660 | * |
| 10661 | * @hide |
| 10662 | */ |
| 10663 | public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band"; |
| 10664 | |
| 10665 | /** |
| 10666 | * The Wi-Fi peer-to-peer device name |
| 10667 | * @hide |
| 10668 | * @deprecated Use {@link WifiP2pManager#setDeviceName(WifiP2pManager.Channel, String, |
| 10669 | * WifiP2pManager.ActionListener)} for setting the value and |
| 10670 | * {@link android.net.wifi.p2p.WifiP2pDevice#deviceName} for query. |
| 10671 | */ |
| 10672 | public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name"; |
| 10673 | |
| 10674 | /** |
| 10675 | * Timeout for ephemeral networks when all known BSSIDs go out of range. We will disconnect |
| 10676 | * from an ephemeral network if there is no BSSID for that network with a non-null score that |
| 10677 | * has been seen in this time period. |
| 10678 | * |
| 10679 | * If this is less than or equal to zero, we use a more conservative behavior and only check |
| 10680 | * for a non-null score from the currently connected or target BSSID. |
| 10681 | * @hide |
| 10682 | */ |
| 10683 | public static final String WIFI_EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS = |
| 10684 | "wifi_ephemeral_out_of_range_timeout_ms"; |
| 10685 | |
| 10686 | /** |
| 10687 | * The number of milliseconds to delay when checking for data stalls during |
| 10688 | * non-aggressive detection. (screen is turned off.) |
| 10689 | * @hide |
| 10690 | */ |
| 10691 | public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS = |
| 10692 | "data_stall_alarm_non_aggressive_delay_in_ms"; |
| 10693 | |
| 10694 | /** |
| 10695 | * The number of milliseconds to delay when checking for data stalls during |
| 10696 | * aggressive detection. (screen on or suspected data stall) |
| 10697 | * @hide |
| 10698 | */ |
| 10699 | public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS = |
| 10700 | "data_stall_alarm_aggressive_delay_in_ms"; |
| 10701 | |
| 10702 | /** |
| 10703 | * The number of milliseconds to allow the provisioning apn to remain active |
| 10704 | * @hide |
| 10705 | */ |
| 10706 | public static final String PROVISIONING_APN_ALARM_DELAY_IN_MS = |
| 10707 | "provisioning_apn_alarm_delay_in_ms"; |
| 10708 | |
| 10709 | /** |
| 10710 | * The interval in milliseconds at which to check gprs registration |
| 10711 | * after the first registration mismatch of gprs and voice service, |
| 10712 | * to detect possible data network registration problems. |
| 10713 | * |
| 10714 | * @hide |
| 10715 | */ |
| 10716 | public static final String GPRS_REGISTER_CHECK_PERIOD_MS = |
| 10717 | "gprs_register_check_period_ms"; |
| 10718 | |
| 10719 | /** |
| 10720 | * Nonzero causes Log.wtf() to crash. |
| 10721 | * @hide |
| 10722 | */ |
| 10723 | public static final String WTF_IS_FATAL = "wtf_is_fatal"; |
| 10724 | |
| 10725 | /** |
| 10726 | * Ringer mode. This is used internally, changing this value will not |
| 10727 | * change the ringer mode. See AudioManager. |
| 10728 | */ |
| 10729 | public static final String MODE_RINGER = "mode_ringer"; |
| 10730 | |
| 10731 | /** |
| 10732 | * Specifies whether Enhanced Connectivity is enabled or not. This setting allows the |
| 10733 | * Connectivity Thermal Power Manager to actively help the device to save power in 5G |
| 10734 | * scenarios |
| 10735 | * Type: int 1 is enabled, 0 is disabled |
| 10736 | * |
| 10737 | * @hide |
| 10738 | */ |
| 10739 | public static final String ENHANCED_CONNECTIVITY_ENABLED = |
| 10740 | "enhanced_connectivity_enable"; |
| 10741 | |
| 10742 | /** |
| 10743 | * Overlay display devices setting. |
| 10744 | * The associated value is a specially formatted string that describes the |
| 10745 | * size and density of simulated secondary display devices. |
| 10746 | * <p> |
| 10747 | * Format: |
| 10748 | * <pre> |
| 10749 | * [display1];[display2];... |
| 10750 | * </pre> |
| 10751 | * with each display specified as: |
| 10752 | * <pre> |
| 10753 | * [mode1]|[mode2]|...,[flag1],[flag2],... |
| 10754 | * </pre> |
| 10755 | * with each mode specified as: |
| 10756 | * <pre> |
| 10757 | * [width]x[height]/[densityDpi] |
| 10758 | * </pre> |
| 10759 | * Supported flags: |
| 10760 | * <ul> |
| 10761 | * <li><pre>secure</pre>: creates a secure display</li> |
| 10762 | * <li><pre>own_content_only</pre>: only shows this display's own content</li> |
| 10763 | * <li><pre>should_show_system_decorations</pre>: supports system decorations</li> |
| 10764 | * </ul> |
| 10765 | * </p><p> |
| 10766 | * Example: |
| 10767 | * <ul> |
| 10768 | * <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li> |
| 10769 | * <li><code>1920x1080/320,secure;1280x720/213</code>: make two overlays, the first at |
| 10770 | * 1080p and secure; the second at 720p.</li> |
| 10771 | * <li><code>1920x1080/320|3840x2160/640</code>: make one overlay that is 1920x1080 at |
| 10772 | * 213dpi by default, but can also be upscaled to 3840x2160 at 640dpi by the system if the |
| 10773 | * display device allows.</li> |
| 10774 | * <li>If the value is empty, then no overlay display devices are created.</li> |
| 10775 | * </ul></p> |
| 10776 | * |
| 10777 | * @hide |
| 10778 | */ |
| 10779 | @UnsupportedAppUsage |
| 10780 | @TestApi |
| 10781 | public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices"; |
| 10782 | |
| 10783 | /** |
| 10784 | * Threshold values for the duration and level of a discharge cycle, |
| 10785 | * under which we log discharge cycle info. |
| 10786 | * |
| 10787 | * @hide |
| 10788 | */ |
| 10789 | public static final String |
| 10790 | BATTERY_DISCHARGE_DURATION_THRESHOLD = "battery_discharge_duration_threshold"; |
| 10791 | |
| 10792 | /** @hide */ |
| 10793 | public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold"; |
| 10794 | |
| 10795 | /** |
| 10796 | * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR |
| 10797 | * intents on application crashes and ANRs. If this is disabled, the |
| 10798 | * crash/ANR dialog will never display the "Report" button. |
| 10799 | * <p> |
| 10800 | * Type: int (0 = disallow, 1 = allow) |
| 10801 | * |
| 10802 | * @hide |
| 10803 | */ |
| 10804 | public static final String SEND_ACTION_APP_ERROR = "send_action_app_error"; |
| 10805 | |
| 10806 | /** |
| 10807 | * Maximum age of entries kept by {@link DropBoxManager}. |
| 10808 | * |
| 10809 | * @hide |
| 10810 | */ |
| 10811 | public static final String DROPBOX_AGE_SECONDS = "dropbox_age_seconds"; |
| 10812 | |
| 10813 | /** |
| 10814 | * Maximum number of entry files which {@link DropBoxManager} will keep |
| 10815 | * around. |
| 10816 | * |
| 10817 | * @hide |
| 10818 | */ |
| 10819 | public static final String DROPBOX_MAX_FILES = "dropbox_max_files"; |
| 10820 | |
| 10821 | /** |
| 10822 | * Maximum amount of disk space used by {@link DropBoxManager} no matter |
| 10823 | * what. |
| 10824 | * |
| 10825 | * @hide |
| 10826 | */ |
| 10827 | public static final String DROPBOX_QUOTA_KB = "dropbox_quota_kb"; |
| 10828 | |
| 10829 | /** |
| 10830 | * Percent of free disk (excluding reserve) which {@link DropBoxManager} |
| 10831 | * will use. |
| 10832 | * |
| 10833 | * @hide |
| 10834 | */ |
| 10835 | public static final String DROPBOX_QUOTA_PERCENT = "dropbox_quota_percent"; |
| 10836 | |
| 10837 | /** |
| 10838 | * Percent of total disk which {@link DropBoxManager} will never dip |
| 10839 | * into. |
| 10840 | * |
| 10841 | * @hide |
| 10842 | */ |
| 10843 | public static final String DROPBOX_RESERVE_PERCENT = "dropbox_reserve_percent"; |
| 10844 | |
| 10845 | /** |
| 10846 | * Prefix for per-tag dropbox disable/enable settings. |
| 10847 | * |
| 10848 | * @hide |
| 10849 | */ |
| 10850 | public static final String DROPBOX_TAG_PREFIX = "dropbox:"; |
| 10851 | |
| 10852 | /** |
| 10853 | * Lines of logcat to include with system crash/ANR/etc. reports, as a |
| 10854 | * prefix of the dropbox tag of the report type. For example, |
| 10855 | * "logcat_for_system_server_anr" controls the lines of logcat captured |
| 10856 | * with system server ANR reports. 0 to disable. |
| 10857 | * |
| 10858 | * @hide |
| 10859 | */ |
| 10860 | public static final String ERROR_LOGCAT_PREFIX = "logcat_for_"; |
| 10861 | |
| 10862 | /** |
| 10863 | * Maximum number of bytes of a system crash/ANR/etc. report that |
| 10864 | * ActivityManagerService should send to DropBox, as a prefix of the |
| 10865 | * dropbox tag of the report type. For example, |
| 10866 | * "max_error_bytes_for_system_server_anr" controls the maximum |
| 10867 | * number of bytes captured with system server ANR reports. |
| 10868 | * <p> |
| 10869 | * Type: int (max size in bytes) |
| 10870 | * |
| 10871 | * @hide |
| 10872 | */ |
| 10873 | public static final String MAX_ERROR_BYTES_PREFIX = "max_error_bytes_for_"; |
| 10874 | |
| 10875 | /** |
| 10876 | * The interval in minutes after which the amount of free storage left |
| 10877 | * on the device is logged to the event log |
| 10878 | * |
| 10879 | * @hide |
| 10880 | */ |
| 10881 | public static final String SYS_FREE_STORAGE_LOG_INTERVAL = "sys_free_storage_log_interval"; |
| 10882 | |
| 10883 | /** |
| 10884 | * Threshold for the amount of change in disk free space required to |
| 10885 | * report the amount of free space. Used to prevent spamming the logs |
| 10886 | * when the disk free space isn't changing frequently. |
| 10887 | * |
| 10888 | * @hide |
| 10889 | */ |
| 10890 | public static final String |
| 10891 | DISK_FREE_CHANGE_REPORTING_THRESHOLD = "disk_free_change_reporting_threshold"; |
| 10892 | |
| 10893 | /** |
| 10894 | * Minimum percentage of free storage on the device that is used to |
| 10895 | * determine if the device is running low on storage. The default is 10. |
| 10896 | * <p> |
| 10897 | * Say this value is set to 10, the device is considered running low on |
| 10898 | * storage if 90% or more of the device storage is filled up. |
| 10899 | * |
| 10900 | * @hide |
| 10901 | */ |
| 10902 | public static final String |
| 10903 | SYS_STORAGE_THRESHOLD_PERCENTAGE = "sys_storage_threshold_percentage"; |
| 10904 | |
| 10905 | /** |
| 10906 | * Maximum byte size of the low storage threshold. This is to ensure |
| 10907 | * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in an |
| 10908 | * overly large threshold for large storage devices. Currently this must |
| 10909 | * be less than 2GB. This default is 500MB. |
| 10910 | * |
| 10911 | * @hide |
| 10912 | */ |
| 10913 | public static final String |
| 10914 | SYS_STORAGE_THRESHOLD_MAX_BYTES = "sys_storage_threshold_max_bytes"; |
| 10915 | |
| 10916 | /** |
| 10917 | * Minimum bytes of free storage on the device before the data partition |
| 10918 | * is considered full. By default, 1 MB is reserved to avoid system-wide |
| 10919 | * SQLite disk full exceptions. |
| 10920 | * |
| 10921 | * @hide |
| 10922 | */ |
| 10923 | public static final String |
| 10924 | SYS_STORAGE_FULL_THRESHOLD_BYTES = "sys_storage_full_threshold_bytes"; |
| 10925 | |
| 10926 | /** |
| 10927 | * Minimum percentage of storage on the device that is reserved for |
| 10928 | * cached data. |
| 10929 | * |
| 10930 | * @hide |
| 10931 | */ |
| 10932 | public static final String |
| 10933 | SYS_STORAGE_CACHE_PERCENTAGE = "sys_storage_cache_percentage"; |
| 10934 | |
| 10935 | /** |
| 10936 | * Maximum bytes of storage on the device that is reserved for cached |
| 10937 | * data. |
| 10938 | * |
| 10939 | * @hide |
| 10940 | */ |
| 10941 | public static final String |
| 10942 | SYS_STORAGE_CACHE_MAX_BYTES = "sys_storage_cache_max_bytes"; |
| 10943 | |
| 10944 | /** |
| 10945 | * The maximum reconnect delay for short network outages or when the |
| 10946 | * network is suspended due to phone use. |
| 10947 | * |
| 10948 | * @hide |
| 10949 | */ |
| 10950 | public static final String |
| 10951 | SYNC_MAX_RETRY_DELAY_IN_SECONDS = "sync_max_retry_delay_in_seconds"; |
| 10952 | |
| 10953 | /** |
| 10954 | * The number of milliseconds to delay before sending out |
| 10955 | * {@link ConnectivityManager#CONNECTIVITY_ACTION} broadcasts. Ignored. |
| 10956 | * |
| 10957 | * @hide |
| 10958 | */ |
| 10959 | public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay"; |
| 10960 | |
| 10961 | |
| 10962 | /** |
| 10963 | * Network sampling interval, in seconds. We'll generate link information |
| 10964 | * about bytes/packets sent and error rates based on data sampled in this interval |
| 10965 | * |
| 10966 | * @hide |
| 10967 | */ |
| 10968 | |
| 10969 | public static final String CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS = |
| 10970 | "connectivity_sampling_interval_in_seconds"; |
| 10971 | |
| 10972 | /** |
| 10973 | * The series of successively longer delays used in retrying to download PAC file. |
| 10974 | * Last delay is used between successful PAC downloads. |
| 10975 | * |
| 10976 | * @hide |
| 10977 | */ |
| 10978 | public static final String PAC_CHANGE_DELAY = "pac_change_delay"; |
| 10979 | |
| 10980 | /** |
| 10981 | * Don't attempt to detect captive portals. |
| 10982 | * |
| 10983 | * @hide |
| 10984 | */ |
| 10985 | public static final int CAPTIVE_PORTAL_MODE_IGNORE = 0; |
| 10986 | |
| 10987 | /** |
| 10988 | * When detecting a captive portal, display a notification that |
| 10989 | * prompts the user to sign in. |
| 10990 | * |
| 10991 | * @hide |
| 10992 | */ |
| 10993 | public static final int CAPTIVE_PORTAL_MODE_PROMPT = 1; |
| 10994 | |
| 10995 | /** |
| 10996 | * When detecting a captive portal, immediately disconnect from the |
| 10997 | * network and do not reconnect to that network in the future. |
| 10998 | * |
| 10999 | * @hide |
| 11000 | */ |
| 11001 | public static final int CAPTIVE_PORTAL_MODE_AVOID = 2; |
| 11002 | |
| 11003 | /** |
| 11004 | * What to do when connecting a network that presents a captive portal. |
| 11005 | * Must be one of the CAPTIVE_PORTAL_MODE_* constants above. |
| 11006 | * |
| 11007 | * The default for this setting is CAPTIVE_PORTAL_MODE_PROMPT. |
| 11008 | * @hide |
| 11009 | */ |
| 11010 | public static final String CAPTIVE_PORTAL_MODE = "captive_portal_mode"; |
| 11011 | |
| 11012 | /** |
| 11013 | * Setting to turn off captive portal detection. Feature is enabled by |
| 11014 | * default and the setting needs to be set to 0 to disable it. |
| 11015 | * |
| 11016 | * @deprecated use CAPTIVE_PORTAL_MODE_IGNORE to disable captive portal detection |
| 11017 | * @hide |
| 11018 | */ |
| 11019 | @Deprecated |
| 11020 | public static final String |
| 11021 | CAPTIVE_PORTAL_DETECTION_ENABLED = "captive_portal_detection_enabled"; |
| 11022 | |
| 11023 | /** |
| 11024 | * The server used for captive portal detection upon a new conection. A |
| 11025 | * 204 response code from the server is used for validation. |
| 11026 | * TODO: remove this deprecated symbol. |
| 11027 | * |
| 11028 | * @hide |
| 11029 | */ |
| 11030 | public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server"; |
| 11031 | |
| 11032 | /** |
| 11033 | * The URL used for HTTPS captive portal detection upon a new connection. |
| 11034 | * A 204 response code from the server is used for validation. |
| 11035 | * |
| 11036 | * @hide |
| 11037 | */ |
| 11038 | public static final String CAPTIVE_PORTAL_HTTPS_URL = "captive_portal_https_url"; |
| 11039 | |
| 11040 | /** |
| 11041 | * The URL used for HTTP captive portal detection upon a new connection. |
| 11042 | * A 204 response code from the server is used for validation. |
| 11043 | * |
| 11044 | * @hide |
| 11045 | */ |
| 11046 | public static final String CAPTIVE_PORTAL_HTTP_URL = "captive_portal_http_url"; |
| 11047 | |
| 11048 | /** |
| 11049 | * The URL used for fallback HTTP captive portal detection when previous HTTP |
| 11050 | * and HTTPS captive portal detection attemps did not return a conclusive answer. |
| 11051 | * |
| 11052 | * @hide |
| 11053 | */ |
| 11054 | public static final String CAPTIVE_PORTAL_FALLBACK_URL = "captive_portal_fallback_url"; |
| 11055 | |
| 11056 | /** |
| 11057 | * A comma separated list of URLs used for captive portal detection in addition to the |
| 11058 | * fallback HTTP url associated with the CAPTIVE_PORTAL_FALLBACK_URL settings. |
| 11059 | * |
| 11060 | * @hide |
| 11061 | */ |
| 11062 | public static final String CAPTIVE_PORTAL_OTHER_FALLBACK_URLS = |
| 11063 | "captive_portal_other_fallback_urls"; |
| 11064 | |
| 11065 | /** |
| 11066 | * A list of captive portal detection specifications used in addition to the fallback URLs. |
| 11067 | * Each spec has the format url@@/@@statusCodeRegex@@/@@contentRegex. Specs are separated |
| 11068 | * by "@@,@@". |
| 11069 | * @hide |
| 11070 | */ |
| 11071 | public static final String CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS = |
| 11072 | "captive_portal_fallback_probe_specs"; |
| 11073 | |
| 11074 | /** |
| 11075 | * Whether to use HTTPS for network validation. This is enabled by default and the setting |
| 11076 | * needs to be set to 0 to disable it. This setting is a misnomer because captive portals |
| 11077 | * don't actually use HTTPS, but it's consistent with the other settings. |
| 11078 | * |
| 11079 | * @hide |
| 11080 | */ |
| 11081 | public static final String CAPTIVE_PORTAL_USE_HTTPS = "captive_portal_use_https"; |
| 11082 | |
| 11083 | /** |
| 11084 | * Which User-Agent string to use in the header of the captive portal detection probes. |
| 11085 | * The User-Agent field is unset when this setting has no value (HttpUrlConnection default). |
| 11086 | * |
| 11087 | * @hide |
| 11088 | */ |
| 11089 | public static final String CAPTIVE_PORTAL_USER_AGENT = "captive_portal_user_agent"; |
| 11090 | |
| 11091 | /** |
| 11092 | * Whether to try cellular data recovery when a bad network is reported. |
| 11093 | * |
| 11094 | * @hide |
| 11095 | */ |
| 11096 | public static final String DATA_STALL_RECOVERY_ON_BAD_NETWORK = |
| 11097 | "data_stall_recovery_on_bad_network"; |
| 11098 | |
| 11099 | /** |
| 11100 | * Minumim duration in millisecodns between cellular data recovery attempts |
| 11101 | * |
| 11102 | * @hide |
| 11103 | */ |
| 11104 | public static final String MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS = |
| 11105 | "min_duration_between_recovery_steps"; |
| 11106 | /** |
| 11107 | * Whether network service discovery is enabled. |
| 11108 | * |
| 11109 | * @hide |
| 11110 | */ |
| 11111 | public static final String NSD_ON = "nsd_on"; |
| 11112 | |
| 11113 | /** |
| 11114 | * Let user pick default install location. |
| 11115 | * |
| 11116 | * @hide |
| 11117 | */ |
| 11118 | public static final String SET_INSTALL_LOCATION = "set_install_location"; |
| 11119 | |
| 11120 | /** |
| 11121 | * Default install location value. |
| 11122 | * 0 = auto, let system decide |
| 11123 | * 1 = internal |
| 11124 | * 2 = sdcard |
| 11125 | * @hide |
| 11126 | */ |
| 11127 | public static final String DEFAULT_INSTALL_LOCATION = "default_install_location"; |
| 11128 | |
| 11129 | /** |
| 11130 | * ms during which to consume extra events related to Inet connection |
| 11131 | * condition after a transtion to fully-connected |
| 11132 | * |
| 11133 | * @hide |
| 11134 | */ |
| 11135 | public static final String |
| 11136 | INET_CONDITION_DEBOUNCE_UP_DELAY = "inet_condition_debounce_up_delay"; |
| 11137 | |
| 11138 | /** |
| 11139 | * ms during which to consume extra events related to Inet connection |
| 11140 | * condtion after a transtion to partly-connected |
| 11141 | * |
| 11142 | * @hide |
| 11143 | */ |
| 11144 | public static final String |
| 11145 | INET_CONDITION_DEBOUNCE_DOWN_DELAY = "inet_condition_debounce_down_delay"; |
| 11146 | |
| 11147 | /** {@hide} */ |
| 11148 | public static final String |
| 11149 | READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default"; |
| 11150 | |
| 11151 | /** |
| 11152 | * Host name and port for global http proxy. Uses ':' seperator for |
| 11153 | * between host and port. |
| 11154 | */ |
| 11155 | public static final String HTTP_PROXY = "http_proxy"; |
| 11156 | |
| 11157 | /** |
| 11158 | * Host name for global http proxy. Set via ConnectivityManager. |
| 11159 | * |
| 11160 | * @hide |
| 11161 | */ |
| 11162 | public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host"; |
| 11163 | |
| 11164 | /** |
| 11165 | * Integer host port for global http proxy. Set via ConnectivityManager. |
| 11166 | * |
| 11167 | * @hide |
| 11168 | */ |
| 11169 | public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port"; |
| 11170 | |
| 11171 | /** |
| 11172 | * Exclusion list for global proxy. This string contains a list of |
| 11173 | * comma-separated domains where the global proxy does not apply. |
| 11174 | * Domains should be listed in a comma- separated list. Example of |
| 11175 | * acceptable formats: ".domain1.com,my.domain2.com" Use |
| 11176 | * ConnectivityManager to set/get. |
| 11177 | * |
| 11178 | * @hide |
| 11179 | */ |
| 11180 | public static final String |
| 11181 | GLOBAL_HTTP_PROXY_EXCLUSION_LIST = "global_http_proxy_exclusion_list"; |
| 11182 | |
| 11183 | /** |
| 11184 | * The location PAC File for the proxy. |
| 11185 | * @hide |
| 11186 | */ |
| 11187 | public static final String |
| 11188 | GLOBAL_HTTP_PROXY_PAC = "global_proxy_pac_url"; |
| 11189 | |
| 11190 | /** |
| 11191 | * Enables the UI setting to allow the user to specify the global HTTP |
| 11192 | * proxy and associated exclusion list. |
| 11193 | * |
| 11194 | * @hide |
| 11195 | */ |
| 11196 | public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy"; |
| 11197 | |
| 11198 | /** |
| 11199 | * Setting for default DNS in case nobody suggests one |
| 11200 | * |
| 11201 | * @hide |
| 11202 | */ |
| 11203 | public static final String DEFAULT_DNS_SERVER = "default_dns_server"; |
| 11204 | |
| 11205 | /** |
| 11206 | * The requested Private DNS mode (string), and an accompanying specifier (string). |
| 11207 | * |
| 11208 | * Currently, the specifier holds the chosen provider name when the mode requests |
| 11209 | * a specific provider. It may be used to store the provider name even when the |
| 11210 | * mode changes so that temporarily disabling and re-enabling the specific |
| 11211 | * provider mode does not necessitate retyping the provider hostname. |
| 11212 | * |
| 11213 | * @hide |
| 11214 | */ |
| 11215 | public static final String PRIVATE_DNS_MODE = "private_dns_mode"; |
| 11216 | |
| 11217 | /** |
| 11218 | * @hide |
| 11219 | */ |
| 11220 | public static final String PRIVATE_DNS_SPECIFIER = "private_dns_specifier"; |
| 11221 | |
| 11222 | /** |
| 11223 | * Forced override of the default mode (hardcoded as "automatic", nee "opportunistic"). |
| 11224 | * This allows changing the default mode without effectively disabling other modes, |
| 11225 | * all of which require explicit user action to enable/configure. See also b/79719289. |
| 11226 | * |
| 11227 | * Value is a string, suitable for assignment to PRIVATE_DNS_MODE above. |
| 11228 | * |
| 11229 | * {@hide} |
| 11230 | */ |
| 11231 | public static final String PRIVATE_DNS_DEFAULT_MODE = "private_dns_default_mode"; |
| 11232 | |
| 11233 | |
| 11234 | /** {@hide} */ |
| 11235 | public static final String |
| 11236 | BLUETOOTH_BTSNOOP_DEFAULT_MODE = "bluetooth_btsnoop_default_mode"; |
| 11237 | /** {@hide} */ |
| 11238 | public static final String |
| 11239 | BLUETOOTH_HEADSET_PRIORITY_PREFIX = "bluetooth_headset_priority_"; |
| 11240 | /** {@hide} */ |
| 11241 | public static final String |
| 11242 | BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX = "bluetooth_a2dp_sink_priority_"; |
| 11243 | /** {@hide} */ |
| 11244 | public static final String |
| 11245 | BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX = "bluetooth_a2dp_src_priority_"; |
| 11246 | /** {@hide} */ |
| 11247 | public static final String BLUETOOTH_A2DP_SUPPORTS_OPTIONAL_CODECS_PREFIX = |
| 11248 | "bluetooth_a2dp_supports_optional_codecs_"; |
| 11249 | /** {@hide} */ |
| 11250 | public static final String BLUETOOTH_A2DP_OPTIONAL_CODECS_ENABLED_PREFIX = |
| 11251 | "bluetooth_a2dp_optional_codecs_enabled_"; |
| 11252 | /** {@hide} */ |
| 11253 | public static final String |
| 11254 | BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX = "bluetooth_input_device_priority_"; |
| 11255 | /** {@hide} */ |
| 11256 | public static final String |
| 11257 | BLUETOOTH_MAP_PRIORITY_PREFIX = "bluetooth_map_priority_"; |
| 11258 | /** {@hide} */ |
| 11259 | public static final String |
| 11260 | BLUETOOTH_MAP_CLIENT_PRIORITY_PREFIX = "bluetooth_map_client_priority_"; |
| 11261 | /** {@hide} */ |
| 11262 | public static final String |
| 11263 | BLUETOOTH_PBAP_CLIENT_PRIORITY_PREFIX = "bluetooth_pbap_client_priority_"; |
| 11264 | /** {@hide} */ |
| 11265 | public static final String |
| 11266 | BLUETOOTH_SAP_PRIORITY_PREFIX = "bluetooth_sap_priority_"; |
| 11267 | /** {@hide} */ |
| 11268 | public static final String |
| 11269 | BLUETOOTH_PAN_PRIORITY_PREFIX = "bluetooth_pan_priority_"; |
| 11270 | /** {@hide} */ |
| 11271 | public static final String |
| 11272 | BLUETOOTH_HEARING_AID_PRIORITY_PREFIX = "bluetooth_hearing_aid_priority_"; |
| 11273 | |
| 11274 | /** |
| 11275 | * Enable/disable radio bug detection |
| 11276 | * |
| 11277 | * {@hide} |
| 11278 | */ |
| 11279 | public static final String |
| 11280 | ENABLE_RADIO_BUG_DETECTION = "enable_radio_bug_detection"; |
| 11281 | |
| 11282 | /** |
| 11283 | * Count threshold of RIL wakelock timeout for radio bug detection |
| 11284 | * |
| 11285 | * {@hide} |
| 11286 | */ |
| 11287 | public static final String |
| 11288 | RADIO_BUG_WAKELOCK_TIMEOUT_COUNT_THRESHOLD = |
| 11289 | "radio_bug_wakelock_timeout_count_threshold"; |
| 11290 | |
| 11291 | /** |
| 11292 | * Count threshold of RIL system error for radio bug detection |
| 11293 | * |
| 11294 | * {@hide} |
| 11295 | */ |
| 11296 | public static final String |
| 11297 | RADIO_BUG_SYSTEM_ERROR_COUNT_THRESHOLD = |
| 11298 | "radio_bug_system_error_count_threshold"; |
| 11299 | |
| 11300 | /** |
| 11301 | * Activity manager specific settings. |
| 11302 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11303 | * |
| 11304 | * "gc_timeout=5000,max_cached_processes=24" |
| 11305 | * |
| 11306 | * The following keys are supported: |
| 11307 | * |
| 11308 | * <pre> |
| 11309 | * max_cached_processes (int) |
| 11310 | * background_settle_time (long) |
| 11311 | * fgservice_min_shown_time (long) |
| 11312 | * fgservice_min_report_time (long) |
| 11313 | * fgservice_screen_on_before_time (long) |
| 11314 | * fgservice_screen_on_after_time (long) |
| 11315 | * content_provider_retain_time (long) |
| 11316 | * gc_timeout (long) |
| 11317 | * gc_min_interval (long) |
| 11318 | * full_pss_min_interval (long) |
| 11319 | * full_pss_lowered_interval (long) |
| 11320 | * power_check_interval (long) |
| 11321 | * power_check_max_cpu_1 (int) |
| 11322 | * power_check_max_cpu_2 (int) |
| 11323 | * power_check_max_cpu_3 (int) |
| 11324 | * power_check_max_cpu_4 (int) |
| 11325 | * service_usage_interaction_time (long) |
| 11326 | * usage_stats_interaction_interval (long) |
| 11327 | * service_restart_duration (long) |
| 11328 | * service_reset_run_duration (long) |
| 11329 | * service_restart_duration_factor (int) |
| 11330 | * service_min_restart_time_between (long) |
| 11331 | * service_max_inactivity (long) |
| 11332 | * service_bg_start_timeout (long) |
| 11333 | * service_bg_activity_start_timeout (long) |
| 11334 | * process_start_async (boolean) |
| 11335 | * </pre> |
| 11336 | * |
| 11337 | * <p> |
| 11338 | * Type: string |
| 11339 | * @hide |
| 11340 | * @see com.android.server.am.ActivityManagerConstants |
| 11341 | */ |
| 11342 | public static final String ACTIVITY_MANAGER_CONSTANTS = "activity_manager_constants"; |
| 11343 | |
| 11344 | /** |
| 11345 | * Feature flag to enable or disable the activity starts logging feature. |
| 11346 | * Type: int (0 for false, 1 for true) |
| 11347 | * Default: 1 |
| 11348 | * @hide |
| 11349 | */ |
| 11350 | public static final String ACTIVITY_STARTS_LOGGING_ENABLED |
| 11351 | = "activity_starts_logging_enabled"; |
| 11352 | |
| 11353 | /** |
| 11354 | * Feature flag to enable or disable the foreground service starts logging feature. |
| 11355 | * Type: int (0 for false, 1 for true) |
| 11356 | * Default: 1 |
| 11357 | * @hide |
| 11358 | */ |
| 11359 | public static final String FOREGROUND_SERVICE_STARTS_LOGGING_ENABLED = |
| 11360 | "foreground_service_starts_logging_enabled"; |
| 11361 | |
| 11362 | /** |
| 11363 | * @hide |
| 11364 | * @see com.android.server.appbinding.AppBindingConstants |
| 11365 | */ |
| 11366 | public static final String APP_BINDING_CONSTANTS = "app_binding_constants"; |
| 11367 | |
| 11368 | /** |
| 11369 | * App ops specific settings. |
| 11370 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11371 | * |
| 11372 | * "state_settle_time=10000" |
| 11373 | * |
| 11374 | * The following keys are supported: |
| 11375 | * |
| 11376 | * <pre> |
| 11377 | * top_state_settle_time (long) |
| 11378 | * fg_service_state_settle_time (long) |
| 11379 | * bg_state_settle_time (long) |
| 11380 | * </pre> |
| 11381 | * |
| 11382 | * <p> |
| 11383 | * Type: string |
| 11384 | * @hide |
| 11385 | * @see com.android.server.AppOpsService.Constants |
| 11386 | */ |
| 11387 | @TestApi |
| 11388 | public static final String APP_OPS_CONSTANTS = "app_ops_constants"; |
| 11389 | |
| 11390 | /** |
| 11391 | * Device Idle (Doze) specific settings. |
| 11392 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11393 | * |
| 11394 | * "inactive_to=60000,sensing_to=400000" |
| 11395 | * |
| 11396 | * The following keys are supported: |
| 11397 | * |
| 11398 | * <pre> |
| 11399 | * inactive_to (long) |
| 11400 | * sensing_to (long) |
| 11401 | * motion_inactive_to (long) |
| 11402 | * idle_after_inactive_to (long) |
| 11403 | * idle_pending_to (long) |
| 11404 | * max_idle_pending_to (long) |
| 11405 | * idle_pending_factor (float) |
| 11406 | * quick_doze_delay_to (long) |
| 11407 | * idle_to (long) |
| 11408 | * max_idle_to (long) |
| 11409 | * idle_factor (float) |
| 11410 | * min_time_to_alarm (long) |
| 11411 | * max_temp_app_whitelist_duration (long) |
| 11412 | * notification_whitelist_duration (long) |
| 11413 | * </pre> |
| 11414 | * |
| 11415 | * <p> |
| 11416 | * Type: string |
| 11417 | * @hide |
| 11418 | * @see com.android.server.DeviceIdleController.Constants |
| 11419 | */ |
| 11420 | public static final String DEVICE_IDLE_CONSTANTS = "device_idle_constants"; |
| 11421 | |
| 11422 | /** |
| 11423 | * Battery Saver specific settings |
| 11424 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11425 | * |
| 11426 | * "vibration_disabled=true,adjust_brightness_factor=0.5" |
| 11427 | * |
| 11428 | * The following keys are supported: |
| 11429 | * |
| 11430 | * <pre> |
| 11431 | * advertise_is_enabled (boolean) |
| 11432 | * datasaver_disabled (boolean) |
| 11433 | * enable_night_mode (boolean) |
| 11434 | * launch_boost_disabled (boolean) |
| 11435 | * vibration_disabled (boolean) |
| 11436 | * animation_disabled (boolean) |
| 11437 | * soundtrigger_disabled (boolean) |
| 11438 | * fullbackup_deferred (boolean) |
| 11439 | * keyvaluebackup_deferred (boolean) |
| 11440 | * firewall_disabled (boolean) |
| 11441 | * gps_mode (int) |
| 11442 | * adjust_brightness_disabled (boolean) |
| 11443 | * adjust_brightness_factor (float) |
| 11444 | * force_all_apps_standby (boolean) |
| 11445 | * force_background_check (boolean) |
| 11446 | * optional_sensors_disabled (boolean) |
| 11447 | * aod_disabled (boolean) |
| 11448 | * quick_doze_enabled (boolean) |
| 11449 | * </pre> |
| 11450 | * @hide |
| 11451 | * @see com.android.server.power.batterysaver.BatterySaverPolicy |
| 11452 | */ |
| 11453 | @UnsupportedAppUsage |
| 11454 | @TestApi |
| 11455 | public static final String BATTERY_SAVER_CONSTANTS = "battery_saver_constants"; |
| 11456 | |
| 11457 | /** |
| 11458 | * Battery Saver device specific settings |
| 11459 | * This is encoded as a key=value list, separated by commas. |
| 11460 | * |
| 11461 | * The following keys are supported: |
| 11462 | * |
| 11463 | * <pre> |
| 11464 | * cpufreq-i (list of "core-number:frequency" pairs concatenated with /) |
| 11465 | * cpufreq-n (list of "core-number:frequency" pairs concatenated with /) |
| 11466 | * </pre> |
| 11467 | * |
| 11468 | * See {@link com.android.server.power.batterysaver.BatterySaverPolicy} for the details. |
| 11469 | * |
| 11470 | * @hide |
| 11471 | */ |
| 11472 | public static final String BATTERY_SAVER_DEVICE_SPECIFIC_CONSTANTS = |
| 11473 | "battery_saver_device_specific_constants"; |
| 11474 | |
| 11475 | /** |
| 11476 | * Settings for adaptive Battery Saver mode. Uses the same flags as |
| 11477 | * {@link #BATTERY_SAVER_CONSTANTS}. |
| 11478 | * |
| 11479 | * @hide |
| 11480 | */ |
| 11481 | public static final String BATTERY_SAVER_ADAPTIVE_CONSTANTS = |
| 11482 | "battery_saver_adaptive_constants"; |
| 11483 | |
| 11484 | /** |
| 11485 | * Device specific settings for adaptive Battery Saver mode. Uses the same flags as |
| 11486 | * {@link #BATTERY_SAVER_DEVICE_SPECIFIC_CONSTANTS}. |
| 11487 | * |
| 11488 | * @hide |
| 11489 | */ |
| 11490 | public static final String BATTERY_SAVER_ADAPTIVE_DEVICE_SPECIFIC_CONSTANTS = |
| 11491 | "battery_saver_adaptive_device_specific_constants"; |
| 11492 | |
| 11493 | /** |
| 11494 | * Battery tip specific settings |
| 11495 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11496 | * |
| 11497 | * "battery_tip_enabled=true,summary_enabled=true,high_usage_enabled=true," |
| 11498 | * "high_usage_app_count=3,reduced_battery_enabled=false,reduced_battery_percent=50," |
| 11499 | * "high_usage_battery_draining=25,high_usage_period_ms=3000" |
| 11500 | * |
| 11501 | * The following keys are supported: |
| 11502 | * |
| 11503 | * <pre> |
| 11504 | * battery_tip_enabled (boolean) |
| 11505 | * summary_enabled (boolean) |
| 11506 | * battery_saver_tip_enabled (boolean) |
| 11507 | * high_usage_enabled (boolean) |
| 11508 | * high_usage_app_count (int) |
| 11509 | * high_usage_period_ms (long) |
| 11510 | * high_usage_battery_draining (int) |
| 11511 | * app_restriction_enabled (boolean) |
| 11512 | * reduced_battery_enabled (boolean) |
| 11513 | * reduced_battery_percent (int) |
| 11514 | * low_battery_enabled (boolean) |
| 11515 | * low_battery_hour (int) |
| 11516 | * </pre> |
| 11517 | * @hide |
| 11518 | */ |
| 11519 | public static final String BATTERY_TIP_CONSTANTS = "battery_tip_constants"; |
| 11520 | |
| 11521 | /** |
| 11522 | * Battery anomaly detection specific settings |
| 11523 | * This is encoded as a key=value list, separated by commas. |
| 11524 | * wakeup_blacklisted_tags is a string, encoded as a set of tags, encoded via |
| 11525 | * {@link Uri#encode(String)}, separated by colons. Ex: |
| 11526 | * |
| 11527 | * "anomaly_detection_enabled=true,wakelock_threshold=2000,wakeup_alarm_enabled=true," |
| 11528 | * "wakeup_alarm_threshold=10,wakeup_blacklisted_tags=tag1:tag2:with%2Ccomma:with%3Acolon" |
| 11529 | * |
| 11530 | * The following keys are supported: |
| 11531 | * |
| 11532 | * <pre> |
| 11533 | * anomaly_detection_enabled (boolean) |
| 11534 | * wakelock_enabled (boolean) |
| 11535 | * wakelock_threshold (long) |
| 11536 | * wakeup_alarm_enabled (boolean) |
| 11537 | * wakeup_alarm_threshold (long) |
| 11538 | * wakeup_blacklisted_tags (string) |
| 11539 | * bluetooth_scan_enabled (boolean) |
| 11540 | * bluetooth_scan_threshold (long) |
| 11541 | * </pre> |
| 11542 | * @hide |
| 11543 | */ |
| 11544 | public static final String ANOMALY_DETECTION_CONSTANTS = "anomaly_detection_constants"; |
| 11545 | |
| 11546 | /** |
| 11547 | * An integer to show the version of the anomaly config. Ex: 1, which means |
| 11548 | * current version is 1. |
| 11549 | * @hide |
| 11550 | */ |
| 11551 | public static final String ANOMALY_CONFIG_VERSION = "anomaly_config_version"; |
| 11552 | |
| 11553 | /** |
| 11554 | * A base64-encoded string represents anomaly stats config, used for |
| 11555 | * {@link android.app.StatsManager}. |
| 11556 | * @hide |
| 11557 | */ |
| 11558 | public static final String ANOMALY_CONFIG = "anomaly_config"; |
| 11559 | |
| 11560 | /** |
| 11561 | * Always on display(AOD) specific settings |
| 11562 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11563 | * |
| 11564 | * "prox_screen_off_delay=10000,screen_brightness_array=0:1:2:3:4" |
| 11565 | * |
| 11566 | * The following keys are supported: |
| 11567 | * |
| 11568 | * <pre> |
| 11569 | * screen_brightness_array (int[]) |
| 11570 | * dimming_scrim_array (int[]) |
| 11571 | * prox_screen_off_delay (long) |
| 11572 | * prox_cooldown_trigger (long) |
| 11573 | * prox_cooldown_period (long) |
| 11574 | * </pre> |
| 11575 | * @hide |
| 11576 | */ |
| 11577 | public static final String ALWAYS_ON_DISPLAY_CONSTANTS = "always_on_display_constants"; |
| 11578 | |
| 11579 | /** |
| 11580 | * System VDSO global setting. This links to the "sys.vdso" system property. |
| 11581 | * The following values are supported: |
| 11582 | * false -> both 32 and 64 bit vdso disabled |
| 11583 | * 32 -> 32 bit vdso enabled |
| 11584 | * 64 -> 64 bit vdso enabled |
| 11585 | * Any other value defaults to both 32 bit and 64 bit true. |
| 11586 | * @hide |
| 11587 | */ |
| 11588 | public static final String SYS_VDSO = "sys_vdso"; |
| 11589 | |
| 11590 | /** |
| 11591 | * UidCpuPower global setting. This links the sys.uidcpupower system property. |
| 11592 | * The following values are supported: |
| 11593 | * 0 -> /proc/uid_cpupower/* are disabled |
| 11594 | * 1 -> /proc/uid_cpupower/* are enabled |
| 11595 | * Any other value defaults to enabled. |
| 11596 | * @hide |
| 11597 | */ |
| 11598 | public static final String SYS_UIDCPUPOWER = "sys_uidcpupower"; |
| 11599 | |
| 11600 | /** |
| 11601 | * traced global setting. This controls weather the deamons: traced and |
| 11602 | * traced_probes run. This links the sys.traced system property. |
| 11603 | * The following values are supported: |
| 11604 | * 0 -> traced and traced_probes are disabled |
| 11605 | * 1 -> traced and traced_probes are enabled |
| 11606 | * Any other value defaults to disabled. |
| 11607 | * @hide |
| 11608 | */ |
| 11609 | public static final String SYS_TRACED = "sys_traced"; |
| 11610 | |
| 11611 | /** |
| 11612 | * An integer to reduce the FPS by this factor. Only for experiments. Need to reboot the |
| 11613 | * device for this setting to take full effect. |
| 11614 | * |
| 11615 | * @hide |
| 11616 | */ |
| 11617 | public static final String FPS_DEVISOR = "fps_divisor"; |
| 11618 | |
| 11619 | /** |
| 11620 | * Flag to enable or disable display panel low power mode (lpm) |
| 11621 | * false -> Display panel power saving mode is disabled. |
| 11622 | * true -> Display panel power saving mode is enabled. |
| 11623 | * |
| 11624 | * @hide |
| 11625 | */ |
| 11626 | public static final String DISPLAY_PANEL_LPM = "display_panel_lpm"; |
| 11627 | |
| 11628 | /** |
| 11629 | * App time limit usage source setting. |
| 11630 | * This controls which app in a task will be considered the source of usage when |
| 11631 | * calculating app usage time limits. |
| 11632 | * |
| 11633 | * 1 -> task root app |
| 11634 | * 2 -> current app |
| 11635 | * Any other value defaults to task root app. |
| 11636 | * |
| 11637 | * Need to reboot the device for this setting to take effect. |
| 11638 | * @hide |
| 11639 | */ |
| 11640 | public static final String APP_TIME_LIMIT_USAGE_SOURCE = "app_time_limit_usage_source"; |
| 11641 | |
| 11642 | /** |
| 11643 | * App standby (app idle) specific settings. |
| 11644 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11645 | * <p> |
| 11646 | * "idle_duration=5000,prediction_timeout=4500,screen_thresholds=0/0/60000/120000" |
| 11647 | * <p> |
| 11648 | * All durations are in millis. |
| 11649 | * Array values are separated by forward slashes |
| 11650 | * The following keys are supported: |
| 11651 | * |
| 11652 | * <pre> |
| 11653 | * screen_thresholds (long[4]) |
| 11654 | * elapsed_thresholds (long[4]) |
| 11655 | * strong_usage_duration (long) |
| 11656 | * notification_seen_duration (long) |
| 11657 | * system_update_usage_duration (long) |
| 11658 | * prediction_timeout (long) |
| 11659 | * sync_adapter_duration (long) |
| 11660 | * exempted_sync_duration (long) |
| 11661 | * system_interaction_duration (long) |
| 11662 | * initial_foreground_service_start_duration (long) |
| 11663 | * cross_profile_apps_share_standby_buckets (boolean) |
| 11664 | * </pre> |
| 11665 | * |
| 11666 | * <p> |
| 11667 | * Type: string |
| 11668 | * @hide |
| 11669 | * @see com.android.server.usage.AppStandbyController |
| 11670 | */ |
| 11671 | public static final String APP_IDLE_CONSTANTS = "app_idle_constants"; |
| 11672 | |
| 11673 | /** |
| 11674 | * Enable ART bytecode verification verifications for debuggable apps. |
| 11675 | * 0 = disable, 1 = enable. |
| 11676 | * @hide |
| 11677 | */ |
| 11678 | public static final String ART_VERIFIER_VERIFY_DEBUGGABLE = |
| 11679 | "art_verifier_verify_debuggable"; |
| 11680 | |
| 11681 | /** |
| 11682 | * Power manager specific settings. |
| 11683 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11684 | * |
| 11685 | * "no_cached_wake_locks=1" |
| 11686 | * |
| 11687 | * The following keys are supported: |
| 11688 | * |
| 11689 | * <pre> |
| 11690 | * no_cached_wake_locks (boolean) |
| 11691 | * </pre> |
| 11692 | * |
| 11693 | * <p> |
| 11694 | * Type: string |
| 11695 | * @hide |
| 11696 | * @see com.android.server.power.PowerManagerConstants |
| 11697 | */ |
| 11698 | public static final String POWER_MANAGER_CONSTANTS = "power_manager_constants"; |
| 11699 | |
| 11700 | /** |
| 11701 | * Alarm manager specific settings. |
| 11702 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11703 | * |
| 11704 | * "min_futurity=5000,allow_while_idle_short_time=4500" |
| 11705 | * |
| 11706 | * The following keys are supported: |
| 11707 | * |
| 11708 | * <pre> |
| 11709 | * min_futurity (long) |
| 11710 | * min_interval (long) |
| 11711 | * allow_while_idle_short_time (long) |
| 11712 | * allow_while_idle_long_time (long) |
| 11713 | * allow_while_idle_whitelist_duration (long) |
| 11714 | * </pre> |
| 11715 | * |
| 11716 | * <p> |
| 11717 | * Type: string |
| 11718 | * @hide |
| 11719 | * @see com.android.server.AlarmManagerService.Constants |
| 11720 | */ |
| 11721 | public static final String ALARM_MANAGER_CONSTANTS = "alarm_manager_constants"; |
| 11722 | |
| 11723 | /** |
| 11724 | * Job scheduler specific settings. |
| 11725 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11726 | * |
| 11727 | * "min_ready_jobs_count=2,moderate_use_factor=.5" |
| 11728 | * |
| 11729 | * The following keys are supported: |
| 11730 | * |
| 11731 | * <pre> |
| 11732 | * min_idle_count (int) |
| 11733 | * min_charging_count (int) |
| 11734 | * min_connectivity_count (int) |
| 11735 | * min_content_count (int) |
| 11736 | * min_ready_jobs_count (int) |
| 11737 | * heavy_use_factor (float) |
| 11738 | * moderate_use_factor (float) |
| 11739 | * fg_job_count (int) |
| 11740 | * bg_normal_job_count (int) |
| 11741 | * bg_moderate_job_count (int) |
| 11742 | * bg_low_job_count (int) |
| 11743 | * bg_critical_job_count (int) |
| 11744 | * </pre> |
| 11745 | * |
| 11746 | * <p> |
| 11747 | * Type: string |
| 11748 | * @hide |
| 11749 | * @see com.android.server.job.JobSchedulerService.Constants |
| 11750 | */ |
| 11751 | public static final String JOB_SCHEDULER_CONSTANTS = "job_scheduler_constants"; |
| 11752 | |
| 11753 | /** |
| 11754 | * Job scheduler QuotaController specific settings. |
| 11755 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11756 | * |
| 11757 | * "max_job_count_working=5,max_job_count_rare=2" |
| 11758 | * |
| 11759 | * <p> |
| 11760 | * Type: string |
| 11761 | * |
| 11762 | * @hide |
| 11763 | * @see com.android.server.job.JobSchedulerService.Constants |
| 11764 | */ |
| 11765 | public static final String JOB_SCHEDULER_QUOTA_CONTROLLER_CONSTANTS = |
| 11766 | "job_scheduler_quota_controller_constants"; |
| 11767 | |
| 11768 | /** |
| 11769 | * Job scheduler TimeController specific settings. |
| 11770 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11771 | * |
| 11772 | * "skip_not_ready_jobs=true5,other_key=2" |
| 11773 | * |
| 11774 | * <p> |
| 11775 | * Type: string |
| 11776 | * |
| 11777 | * @hide |
| 11778 | * @see com.android.server.job.JobSchedulerService.Constants |
| 11779 | */ |
| 11780 | public static final String JOB_SCHEDULER_TIME_CONTROLLER_CONSTANTS = |
| 11781 | "job_scheduler_time_controller_constants"; |
| 11782 | |
| 11783 | /** |
| 11784 | * ShortcutManager specific settings. |
| 11785 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11786 | * |
| 11787 | * "reset_interval_sec=86400,max_updates_per_interval=1" |
| 11788 | * |
| 11789 | * The following keys are supported: |
| 11790 | * |
| 11791 | * <pre> |
| 11792 | * reset_interval_sec (long) |
| 11793 | * max_updates_per_interval (int) |
| 11794 | * max_icon_dimension_dp (int, DP) |
| 11795 | * max_icon_dimension_dp_lowram (int, DP) |
| 11796 | * max_shortcuts (int) |
| 11797 | * icon_quality (int, 0-100) |
| 11798 | * icon_format (String) |
| 11799 | * </pre> |
| 11800 | * |
| 11801 | * <p> |
| 11802 | * Type: string |
| 11803 | * @hide |
| 11804 | * @see com.android.server.pm.ShortcutService.ConfigConstants |
| 11805 | */ |
| 11806 | public static final String SHORTCUT_MANAGER_CONSTANTS = "shortcut_manager_constants"; |
| 11807 | |
| 11808 | /** |
| 11809 | * DevicePolicyManager specific settings. |
| 11810 | * This is encoded as a key=value list, separated by commas. Ex: |
| 11811 | * |
| 11812 | * <pre> |
| 11813 | * das_died_service_reconnect_backoff_sec (long) |
| 11814 | * das_died_service_reconnect_backoff_increase (float) |
| 11815 | * das_died_service_reconnect_max_backoff_sec (long) |
| 11816 | * </pre> |
| 11817 | * |
| 11818 | * <p> |
| 11819 | * Type: string |
| 11820 | * @hide |
| 11821 | * see also com.android.server.devicepolicy.DevicePolicyConstants |
| 11822 | */ |
| 11823 | public static final String DEVICE_POLICY_CONSTANTS = "device_policy_constants"; |
| 11824 | |
| 11825 | /** |
| 11826 | * TextClassifier specific settings. |
| 11827 | * This is encoded as a key=value list, separated by commas. String[] types like |
| 11828 | * entity_list_default use ":" as delimiter for values. Ex: |
| 11829 | * |
| 11830 | * <pre> |
| 11831 | * classify_text_max_range_length (int) |
| 11832 | * detect_language_from_text_enabled (boolean) |
| 11833 | * entity_list_default (String[]) |
| 11834 | * entity_list_editable (String[]) |
| 11835 | * entity_list_not_editable (String[]) |
| 11836 | * generate_links_log_sample_rate (int) |
| 11837 | * generate_links_max_text_length (int) |
| 11838 | * in_app_conversation_action_types_default (String[]) |
| 11839 | * lang_id_context_settings (float[]) |
| 11840 | * lang_id_threshold_override (float) |
| 11841 | * local_textclassifier_enabled (boolean) |
| 11842 | * model_dark_launch_enabled (boolean) |
| 11843 | * notification_conversation_action_types_default (String[]) |
| 11844 | * smart_linkify_enabled (boolean) |
| 11845 | * smart_select_animation_enabled (boolean) |
| 11846 | * smart_selection_enabled (boolean) |
| 11847 | * smart_text_share_enabled (boolean) |
| 11848 | * suggest_selection_max_range_length (int) |
| 11849 | * system_textclassifier_enabled (boolean) |
| 11850 | * template_intent_factory_enabled (boolean) |
| 11851 | * translate_in_classification_enabled (boolean) |
| 11852 | * </pre> |
| 11853 | * |
| 11854 | * <p> |
| 11855 | * Type: string |
| 11856 | * @hide |
| 11857 | * see also android.view.textclassifier.TextClassificationConstants |
| 11858 | */ |
| 11859 | public static final String TEXT_CLASSIFIER_CONSTANTS = "text_classifier_constants"; |
| 11860 | |
| 11861 | /** |
| 11862 | * BatteryStats specific settings. |
| 11863 | * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true" |
| 11864 | * |
| 11865 | * The following keys are supported: |
| 11866 | * <pre> |
| 11867 | * track_cpu_times_by_proc_state (boolean) |
| 11868 | * track_cpu_active_cluster_time (boolean) |
| 11869 | * read_binary_cpu_time (boolean) |
| 11870 | * proc_state_cpu_times_read_delay_ms (long) |
| 11871 | * external_stats_collection_rate_limit_ms (long) |
| 11872 | * battery_level_collection_delay_ms (long) |
| 11873 | * max_history_files (int) |
| 11874 | * max_history_buffer_kb (int) |
| 11875 | * battery_charged_delay_ms (int) |
| 11876 | * </pre> |
| 11877 | * |
| 11878 | * <p> |
| 11879 | * Type: string |
| 11880 | * @hide |
| 11881 | * see also com.android.internal.os.BatteryStatsImpl.Constants |
| 11882 | */ |
| 11883 | public static final String BATTERY_STATS_CONSTANTS = "battery_stats_constants"; |
| 11884 | |
| 11885 | /** |
| 11886 | * SyncManager specific settings. |
| 11887 | * |
| 11888 | * <p> |
| 11889 | * Type: string |
| 11890 | * @hide |
| 11891 | * @see com.android.server.content.SyncManagerConstants |
| 11892 | */ |
| 11893 | public static final String SYNC_MANAGER_CONSTANTS = "sync_manager_constants"; |
| 11894 | |
| 11895 | /** |
| 11896 | * Broadcast dispatch tuning parameters specific to foreground broadcasts. |
| 11897 | * |
| 11898 | * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true" |
| 11899 | * |
| 11900 | * The following keys are supported: |
| 11901 | * <pre> |
| 11902 | * bcast_timeout (long) |
| 11903 | * bcast_slow_time (long) |
| 11904 | * bcast_deferral (long) |
| 11905 | * bcast_deferral_decay_factor (float) |
| 11906 | * bcast_deferral_floor (long) |
| 11907 | * bcast_allow_bg_activity_start_timeout (long) |
| 11908 | * </pre> |
| 11909 | * |
| 11910 | * @hide |
| 11911 | */ |
| 11912 | public static final String BROADCAST_FG_CONSTANTS = "bcast_fg_constants"; |
| 11913 | |
| 11914 | /** |
| 11915 | * Broadcast dispatch tuning parameters specific to background broadcasts. |
| 11916 | * |
| 11917 | * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true". |
| 11918 | * See {@link #BROADCAST_FG_CONSTANTS} for the list of supported keys. |
| 11919 | * |
| 11920 | * @hide |
| 11921 | */ |
| 11922 | public static final String BROADCAST_BG_CONSTANTS = "bcast_bg_constants"; |
| 11923 | |
| 11924 | /** |
| 11925 | * Broadcast dispatch tuning parameters specific to specific "offline" broadcasts. |
| 11926 | * |
| 11927 | * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true". |
| 11928 | * See {@link #BROADCAST_FG_CONSTANTS} for the list of supported keys. |
| 11929 | * |
| 11930 | * @hide |
| 11931 | */ |
| 11932 | public static final String BROADCAST_OFFLOAD_CONSTANTS = "bcast_offload_constants"; |
| 11933 | |
| 11934 | /** |
| 11935 | * Whether or not App Standby feature is enabled by system. This controls throttling of apps |
| 11936 | * based on usage patterns and predictions. Platform will turn on this feature if both this |
| 11937 | * flag and {@link #ADAPTIVE_BATTERY_MANAGEMENT_ENABLED} is on. |
| 11938 | * Type: int (0 for false, 1 for true) |
| 11939 | * Default: 1 |
| 11940 | * @hide |
| 11941 | * @see #ADAPTIVE_BATTERY_MANAGEMENT_ENABLED |
| 11942 | */ |
| 11943 | @SystemApi |
| 11944 | public static final String APP_STANDBY_ENABLED = "app_standby_enabled"; |
| 11945 | |
| 11946 | /** |
| 11947 | * Whether or not adaptive battery feature is enabled by user. Platform will turn on this |
| 11948 | * feature if both this flag and {@link #APP_STANDBY_ENABLED} is on. |
| 11949 | * Type: int (0 for false, 1 for true) |
| 11950 | * Default: 1 |
| 11951 | * @hide |
| 11952 | * @see #APP_STANDBY_ENABLED |
| 11953 | */ |
| 11954 | public static final String ADAPTIVE_BATTERY_MANAGEMENT_ENABLED = |
| 11955 | "adaptive_battery_management_enabled"; |
| 11956 | |
| 11957 | /** |
| 11958 | * Whether or not app auto restriction is enabled. When it is enabled, settings app will |
| 11959 | * auto restrict the app if it has bad behavior(e.g. hold wakelock for long time). |
| 11960 | * |
| 11961 | * Type: boolean (0 for false, 1 for true) |
| 11962 | * Default: 1 |
| 11963 | * |
| 11964 | * @hide |
| 11965 | */ |
| 11966 | public static final String APP_AUTO_RESTRICTION_ENABLED = |
| 11967 | "app_auto_restriction_enabled"; |
| 11968 | |
| 11969 | /** |
| 11970 | * Feature flag to enable or disable the Forced App Standby feature. |
| 11971 | * Type: int (0 for false, 1 for true) |
| 11972 | * Default: 1 |
| 11973 | * @hide |
| 11974 | */ |
| 11975 | public static final String FORCED_APP_STANDBY_ENABLED = "forced_app_standby_enabled"; |
| 11976 | |
| 11977 | /** |
| 11978 | * Whether or not to enable Forced App Standby on small battery devices. |
| 11979 | * Type: int (0 for false, 1 for true) |
| 11980 | * Default: 0 |
| 11981 | * @hide |
| 11982 | */ |
| 11983 | public static final String FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED |
| 11984 | = "forced_app_standby_for_small_battery_enabled"; |
| 11985 | |
| 11986 | /** |
| 11987 | * Whether or not to enable the User Absent, Radios Off feature on small battery devices. |
| 11988 | * Type: int (0 for false, 1 for true) |
| 11989 | * Default: 0 |
| 11990 | * @hide |
| 11991 | */ |
| 11992 | public static final String USER_ABSENT_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED |
| 11993 | = "user_absent_radios_off_for_small_battery_enabled"; |
| 11994 | |
| 11995 | /** |
| 11996 | * Whether or not to enable the User Absent, Touch Off feature on small battery devices. |
| 11997 | * Type: int (0 for false, 1 for true) |
| 11998 | * Default: 0 |
| 11999 | * @hide |
| 12000 | */ |
| 12001 | public static final String USER_ABSENT_TOUCH_OFF_FOR_SMALL_BATTERY_ENABLED |
| 12002 | = "user_absent_touch_off_for_small_battery_enabled"; |
| 12003 | |
| 12004 | /** |
| 12005 | * Whether or not to turn on Wifi when proxy is disconnected. |
| 12006 | * Type: int (0 for false, 1 for true) |
| 12007 | * Default: 1 |
| 12008 | * @hide |
| 12009 | */ |
| 12010 | public static final String WIFI_ON_WHEN_PROXY_DISCONNECTED |
| 12011 | = "wifi_on_when_proxy_disconnected"; |
| 12012 | |
| 12013 | /** |
| 12014 | * Time Only Mode specific settings. |
| 12015 | * This is encoded as a key=value list, separated by commas. Ex: "foo=1,bar=true" |
| 12016 | * |
| 12017 | * The following keys are supported: |
| 12018 | * |
| 12019 | * <pre> |
| 12020 | * enabled (boolean) |
| 12021 | * disable_home (boolean) |
| 12022 | * disable_tilt_to_wake (boolean) |
| 12023 | * disable_touch_to_wake (boolean) |
| 12024 | * </pre> |
| 12025 | * Type: string |
| 12026 | * @hide |
| 12027 | */ |
| 12028 | public static final String TIME_ONLY_MODE_CONSTANTS |
| 12029 | = "time_only_mode_constants"; |
| 12030 | |
| 12031 | /** |
| 12032 | * Whether of not to send keycode sleep for ungaze when Home is the foreground activity on |
| 12033 | * watch type devices. |
| 12034 | * Type: int (0 for false, 1 for true) |
| 12035 | * Default: 0 |
| 12036 | * @hide |
| 12037 | */ |
| 12038 | public static final String UNGAZE_SLEEP_ENABLED = "ungaze_sleep_enabled"; |
| 12039 | |
| 12040 | /** |
| 12041 | * Whether or not Network Watchlist feature is enabled. |
| 12042 | * Type: int (0 for false, 1 for true) |
| 12043 | * Default: 0 |
| 12044 | * @hide |
| 12045 | */ |
| 12046 | public static final String NETWORK_WATCHLIST_ENABLED = "network_watchlist_enabled"; |
| 12047 | |
| 12048 | /** |
| 12049 | * Whether or not show hidden launcher icon apps feature is enabled. |
| 12050 | * Type: int (0 for false, 1 for true) |
| 12051 | * Default: 1 |
| 12052 | * @hide |
| 12053 | */ |
| 12054 | public static final String SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED = |
| 12055 | "show_hidden_icon_apps_enabled"; |
| 12056 | |
| 12057 | /** |
| 12058 | * Whether or not show new app installed notification is enabled. |
| 12059 | * Type: int (0 for false, 1 for true) |
| 12060 | * Default: 0 |
| 12061 | * @hide |
| 12062 | */ |
| 12063 | public static final String SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED = |
| 12064 | "show_new_app_installed_notification_enabled"; |
| 12065 | |
| 12066 | /** |
| 12067 | * Flag to keep background restricted profiles running after exiting. If disabled, |
| 12068 | * the restricted profile can be put into stopped state as soon as the user leaves it. |
| 12069 | * Type: int (0 for false, 1 for true) |
| 12070 | * |
| 12071 | * Overridden by the system based on device information. If null, the value specified |
| 12072 | * by {@code config_keepRestrictedProfilesInBackground} is used. |
| 12073 | * |
| 12074 | * @hide |
| 12075 | */ |
| 12076 | public static final String KEEP_PROFILE_IN_BACKGROUND = "keep_profile_in_background"; |
| 12077 | |
| 12078 | /** |
| 12079 | * The default time in ms within which a subsequent connection from an always allowed system |
| 12080 | * is allowed to reconnect without user interaction. |
| 12081 | * |
| 12082 | * @hide |
| 12083 | */ |
| 12084 | public static final long DEFAULT_ADB_ALLOWED_CONNECTION_TIME = 604800000; |
| 12085 | |
| 12086 | /** |
| 12087 | * When the user first connects their device to a system a prompt is displayed to allow |
| 12088 | * the adb connection with an option to 'Always allow' connections from this system. If the |
| 12089 | * user selects this always allow option then the connection time is stored for the system. |
| 12090 | * This setting is the time in ms within which a subsequent connection from an always |
| 12091 | * allowed system is allowed to reconnect without user interaction. |
| 12092 | * |
| 12093 | * Type: long |
| 12094 | * |
| 12095 | * @hide |
| 12096 | */ |
| 12097 | public static final String ADB_ALLOWED_CONNECTION_TIME = |
| 12098 | "adb_allowed_connection_time"; |
| 12099 | |
| 12100 | /** |
| 12101 | * Scaling factor for normal window animations. Setting to 0 will |
| 12102 | * disable window animations. |
| 12103 | */ |
| 12104 | public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale"; |
| 12105 | |
| 12106 | /** |
| 12107 | * Scaling factor for activity transition animations. Setting to 0 will |
| 12108 | * disable window animations. |
| 12109 | */ |
| 12110 | public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; |
| 12111 | |
| 12112 | /** |
| 12113 | * Scaling factor for Animator-based animations. This affects both the |
| 12114 | * start delay and duration of all such animations. Setting to 0 will |
| 12115 | * cause animations to end immediately. The default value is 1. |
| 12116 | */ |
| 12117 | public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; |
| 12118 | |
| 12119 | /** |
| 12120 | * Scaling factor for normal window animations. Setting to 0 will |
| 12121 | * disable window animations. |
| 12122 | * |
| 12123 | * @hide |
| 12124 | */ |
| 12125 | public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations"; |
| 12126 | |
| 12127 | /** |
| 12128 | * If 0, the compatibility mode is off for all applications. |
| 12129 | * If 1, older applications run under compatibility mode. |
| 12130 | * TODO: remove this settings before code freeze (bug/1907571) |
| 12131 | * @hide |
| 12132 | */ |
| 12133 | public static final String COMPATIBILITY_MODE = "compatibility_mode"; |
| 12134 | |
| 12135 | /** |
| 12136 | * CDMA only settings |
| 12137 | * Emergency Tone 0 = Off |
| 12138 | * 1 = Alert |
| 12139 | * 2 = Vibrate |
| 12140 | * @hide |
| 12141 | */ |
| 12142 | public static final String EMERGENCY_TONE = "emergency_tone"; |
| 12143 | |
| 12144 | /** |
| 12145 | * CDMA only settings |
| 12146 | * Whether the auto retry is enabled. The value is |
| 12147 | * boolean (1 or 0). |
| 12148 | * @hide |
| 12149 | */ |
| 12150 | public static final String CALL_AUTO_RETRY = "call_auto_retry"; |
| 12151 | |
| 12152 | /** |
| 12153 | * A setting that can be read whether the emergency affordance is currently needed. |
| 12154 | * The value is a boolean (1 or 0). |
| 12155 | * @hide |
| 12156 | */ |
| 12157 | public static final String EMERGENCY_AFFORDANCE_NEEDED = "emergency_affordance_needed"; |
| 12158 | |
| 12159 | /** |
| 12160 | * Whether to enable automatic system server heap dumps. This only works on userdebug or |
| 12161 | * eng builds, not on user builds. This is set by the user and overrides the config value. |
| 12162 | * 1 means enable, 0 means disable. |
| 12163 | * |
| 12164 | * @hide |
| 12165 | */ |
| 12166 | public static final String ENABLE_AUTOMATIC_SYSTEM_SERVER_HEAP_DUMPS = |
| 12167 | "enable_automatic_system_server_heap_dumps"; |
| 12168 | |
| 12169 | /** |
| 12170 | * See RIL_PreferredNetworkType in ril.h |
| 12171 | * @hide |
| 12172 | */ |
| 12173 | @UnsupportedAppUsage |
| 12174 | public static final String PREFERRED_NETWORK_MODE = |
| 12175 | "preferred_network_mode"; |
| 12176 | |
| 12177 | /** |
| 12178 | * Name of an application package to be debugged. |
| 12179 | */ |
| 12180 | public static final String DEBUG_APP = "debug_app"; |
| 12181 | |
| 12182 | /** |
| 12183 | * If 1, when launching DEBUG_APP it will wait for the debugger before |
| 12184 | * starting user code. If 0, it will run normally. |
| 12185 | */ |
| 12186 | public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger"; |
| 12187 | |
| 12188 | /** |
| 12189 | * Allow GPU debug layers? |
| 12190 | * 0 = no |
| 12191 | * 1 = yes |
| 12192 | * @hide |
| 12193 | */ |
| 12194 | public static final String ENABLE_GPU_DEBUG_LAYERS = "enable_gpu_debug_layers"; |
| 12195 | |
| 12196 | /** |
| 12197 | * App allowed to load GPU debug layers |
| 12198 | * @hide |
| 12199 | */ |
| 12200 | public static final String GPU_DEBUG_APP = "gpu_debug_app"; |
| 12201 | |
| 12202 | /** |
| 12203 | * Package containing ANGLE libraries other than system, which are only available |
| 12204 | * to dumpable apps that opt-in. |
| 12205 | * @hide |
| 12206 | */ |
| 12207 | public static final String GLOBAL_SETTINGS_ANGLE_DEBUG_PACKAGE = |
| 12208 | "angle_debug_package"; |
| 12209 | |
| 12210 | /** |
| 12211 | * Force all PKGs to use ANGLE, regardless of any other settings |
| 12212 | * The value is a boolean (1 or 0). |
| 12213 | * @hide |
| 12214 | */ |
| 12215 | public static final String GLOBAL_SETTINGS_ANGLE_GL_DRIVER_ALL_ANGLE = |
| 12216 | "angle_gl_driver_all_angle"; |
| 12217 | |
| 12218 | /** |
| 12219 | * List of PKGs that have an OpenGL driver selected |
| 12220 | * @hide |
| 12221 | */ |
| 12222 | public static final String GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_PKGS = |
| 12223 | "angle_gl_driver_selection_pkgs"; |
| 12224 | |
| 12225 | /** |
| 12226 | * List of selected OpenGL drivers, corresponding to the PKGs in GLOBAL_SETTINGS_DRIVER_PKGS |
| 12227 | * @hide |
| 12228 | */ |
| 12229 | public static final String GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_VALUES = |
| 12230 | "angle_gl_driver_selection_values"; |
| 12231 | |
| 12232 | /** |
| 12233 | * List of package names that should check ANGLE rules |
| 12234 | * @hide |
| 12235 | */ |
| 12236 | public static final String GLOBAL_SETTINGS_ANGLE_WHITELIST = |
| 12237 | "angle_whitelist"; |
| 12238 | |
| 12239 | /** |
| 12240 | * Show the "ANGLE In Use" dialog box to the user when ANGLE is the OpenGL driver. |
| 12241 | * The value is a boolean (1 or 0). |
| 12242 | * @hide |
| 12243 | */ |
| 12244 | public static final String GLOBAL_SETTINGS_SHOW_ANGLE_IN_USE_DIALOG_BOX = |
| 12245 | "show_angle_in_use_dialog_box"; |
| 12246 | |
| 12247 | /** |
| 12248 | * Game Driver global preference for all Apps. |
| 12249 | * 0 = Default |
| 12250 | * 1 = All Apps use Game Driver |
| 12251 | * 2 = All Apps use system graphics driver |
| 12252 | * @hide |
| 12253 | */ |
| 12254 | public static final String GAME_DRIVER_ALL_APPS = "game_driver_all_apps"; |
| 12255 | |
| 12256 | /** |
| 12257 | * List of Apps selected to use Game Driver. |
| 12258 | * i.e. <pkg1>,<pkg2>,...,<pkgN> |
| 12259 | * @hide |
| 12260 | */ |
| 12261 | public static final String GAME_DRIVER_OPT_IN_APPS = "game_driver_opt_in_apps"; |
| 12262 | |
| 12263 | /** |
| 12264 | * List of Apps selected to use prerelease Game Driver. |
| 12265 | * i.e. <pkg1>,<pkg2>,...,<pkgN> |
| 12266 | * @hide |
| 12267 | */ |
| 12268 | public static final String GAME_DRIVER_PRERELEASE_OPT_IN_APPS = |
| 12269 | "game_driver_prerelease_opt_in_apps"; |
| 12270 | |
| 12271 | /** |
| 12272 | * List of Apps selected not to use Game Driver. |
| 12273 | * i.e. <pkg1>,<pkg2>,...,<pkgN> |
| 12274 | * @hide |
| 12275 | */ |
| 12276 | public static final String GAME_DRIVER_OPT_OUT_APPS = "game_driver_opt_out_apps"; |
| 12277 | |
| 12278 | /** |
| 12279 | * Apps on the blacklist that are forbidden to use Game Driver. |
| 12280 | * @hide |
| 12281 | */ |
| 12282 | public static final String GAME_DRIVER_BLACKLIST = "game_driver_blacklist"; |
| 12283 | |
| 12284 | /** |
| 12285 | * List of blacklists, each blacklist is a blacklist for a specific version of Game Driver. |
| 12286 | * @hide |
| 12287 | */ |
| 12288 | public static final String GAME_DRIVER_BLACKLISTS = "game_driver_blacklists"; |
| 12289 | |
| 12290 | /** |
| 12291 | * Apps on the whitelist that are allowed to use Game Driver. |
| 12292 | * The string is a list of application package names, seperated by comma. |
| 12293 | * i.e. <apk1>,<apk2>,...,<apkN> |
| 12294 | * @hide |
| 12295 | */ |
| 12296 | public static final String GAME_DRIVER_WHITELIST = "game_driver_whitelist"; |
| 12297 | |
| 12298 | /** |
| 12299 | * List of libraries in sphal accessible by Game Driver |
| 12300 | * The string is a list of library names, separated by colon. |
| 12301 | * i.e. <lib1>:<lib2>:...:<libN> |
| 12302 | * @hide |
| 12303 | */ |
| 12304 | public static final String GAME_DRIVER_SPHAL_LIBRARIES = "game_driver_sphal_libraries"; |
| 12305 | |
| 12306 | /** |
| 12307 | * Ordered GPU debug layer list for Vulkan |
| 12308 | * i.e. <layer1>:<layer2>:...:<layerN> |
| 12309 | * @hide |
| 12310 | */ |
| 12311 | public static final String GPU_DEBUG_LAYERS = "gpu_debug_layers"; |
| 12312 | |
| 12313 | /** |
| 12314 | * Ordered GPU debug layer list for GLES |
| 12315 | * i.e. <layer1>:<layer2>:...:<layerN> |
| 12316 | * @hide |
| 12317 | */ |
| 12318 | public static final String GPU_DEBUG_LAYERS_GLES = "gpu_debug_layers_gles"; |
| 12319 | |
| 12320 | /** |
| 12321 | * Addition app for GPU layer discovery |
| 12322 | * @hide |
| 12323 | */ |
| 12324 | public static final String GPU_DEBUG_LAYER_APP = "gpu_debug_layer_app"; |
| 12325 | |
| 12326 | /** |
| 12327 | * Control whether the process CPU usage meter should be shown. |
| 12328 | * |
| 12329 | * @deprecated This functionality is no longer available as of |
| 12330 | * {@link android.os.Build.VERSION_CODES#N_MR1}. |
| 12331 | */ |
| 12332 | @Deprecated |
| 12333 | public static final String SHOW_PROCESSES = "show_processes"; |
| 12334 | |
| 12335 | /** |
| 12336 | * If 1 low power mode (aka battery saver) is enabled. |
| 12337 | * @hide |
| 12338 | */ |
| 12339 | @TestApi |
| 12340 | public static final String LOW_POWER_MODE = "low_power"; |
| 12341 | |
| 12342 | /** |
| 12343 | * If 1, battery saver ({@link #LOW_POWER_MODE}) will be re-activated after the device |
| 12344 | * is unplugged from a charger or rebooted. |
| 12345 | * @hide |
| 12346 | */ |
| 12347 | @TestApi |
| 12348 | public static final String LOW_POWER_MODE_STICKY = "low_power_sticky"; |
| 12349 | |
| 12350 | /** |
| 12351 | * When a device is unplugged from a changer (or is rebooted), do not re-activate battery |
| 12352 | * saver even if {@link #LOW_POWER_MODE_STICKY} is 1, if the battery level is equal to or |
| 12353 | * above this threshold. |
| 12354 | * |
| 12355 | * @hide |
| 12356 | */ |
| 12357 | public static final String LOW_POWER_MODE_STICKY_AUTO_DISABLE_LEVEL = |
| 12358 | "low_power_sticky_auto_disable_level"; |
| 12359 | |
| 12360 | /** |
| 12361 | * Whether sticky battery saver should be deactivated once the battery level has reached the |
| 12362 | * threshold specified by {@link #LOW_POWER_MODE_STICKY_AUTO_DISABLE_LEVEL}. |
| 12363 | * |
| 12364 | * @hide |
| 12365 | */ |
| 12366 | public static final String LOW_POWER_MODE_STICKY_AUTO_DISABLE_ENABLED = |
| 12367 | "low_power_sticky_auto_disable_enabled"; |
| 12368 | |
| 12369 | /** |
| 12370 | * Battery level [1-100] at which low power mode automatically turns on. |
| 12371 | * If 0, it will not automatically turn on. For Q and newer, it will only automatically |
| 12372 | * turn on if the value is greater than 0 and the {@link #AUTOMATIC_POWER_SAVE_MODE} |
| 12373 | * setting is also set to |
| 12374 | * {@link android.os.PowerManager.AutoPowerSaveMode#POWER_SAVE_MODE_TRIGGER_PERCENTAGE}. |
| 12375 | * @see #AUTOMATIC_POWER_SAVE_MODE |
| 12376 | * @see android.os.PowerManager#getPowerSaveModeTrigger() |
| 12377 | * @hide |
| 12378 | */ |
| 12379 | public static final String LOW_POWER_MODE_TRIGGER_LEVEL = "low_power_trigger_level"; |
| 12380 | |
| 12381 | /** |
| 12382 | * Whether battery saver is currently set to trigger based on percentage, dynamic power |
| 12383 | * savings trigger, or none. See {@link AutoPowerSaveModeTriggers} for |
| 12384 | * accepted values. |
| 12385 | * |
| 12386 | * @hide |
| 12387 | */ |
| 12388 | @TestApi |
| 12389 | public static final String AUTOMATIC_POWER_SAVE_MODE = "automatic_power_save_mode"; |
| 12390 | |
| 12391 | /** |
| 12392 | * The setting that backs the disable threshold for the setPowerSavingsWarning api in |
| 12393 | * PowerManager |
| 12394 | * |
| 12395 | * @see android.os.PowerManager#setDynamicPowerSaveHint(boolean, int) |
| 12396 | * @hide |
| 12397 | */ |
| 12398 | @TestApi |
| 12399 | public static final String DYNAMIC_POWER_SAVINGS_DISABLE_THRESHOLD = |
| 12400 | "dynamic_power_savings_disable_threshold"; |
| 12401 | |
| 12402 | /** |
| 12403 | * The setting which backs the setDynamicPowerSaveHint api in PowerManager. |
| 12404 | * |
| 12405 | * @see android.os.PowerManager#setDynamicPowerSaveHint(boolean, int) |
| 12406 | * @hide |
| 12407 | */ |
| 12408 | @TestApi |
| 12409 | public static final String DYNAMIC_POWER_SAVINGS_ENABLED = "dynamic_power_savings_enabled"; |
| 12410 | |
| 12411 | /** |
| 12412 | * A long value indicating how much longer the system battery is estimated to last in |
| 12413 | * millis. See {@link #BATTERY_ESTIMATES_LAST_UPDATE_TIME} for the last time this value |
| 12414 | * was updated. |
| 12415 | * |
| 12416 | * @hide |
| 12417 | */ |
| 12418 | public static final String TIME_REMAINING_ESTIMATE_MILLIS = |
| 12419 | "time_remaining_estimate_millis"; |
| 12420 | |
| 12421 | /** |
| 12422 | * A boolean indicating whether {@link #TIME_REMAINING_ESTIMATE_MILLIS} is based customized |
| 12423 | * to the devices usage or using global models. See |
| 12424 | * {@link #BATTERY_ESTIMATES_LAST_UPDATE_TIME} for the last time this value was updated. |
| 12425 | * |
| 12426 | * @hide |
| 12427 | */ |
| 12428 | public static final String TIME_REMAINING_ESTIMATE_BASED_ON_USAGE = |
| 12429 | "time_remaining_estimate_based_on_usage"; |
| 12430 | |
| 12431 | /** |
| 12432 | * A long value indicating how long the system battery takes to deplete from 100% to 0% on |
| 12433 | * average based on historical drain rates. See {@link #BATTERY_ESTIMATES_LAST_UPDATE_TIME} |
| 12434 | * for the last time this value was updated. |
| 12435 | * |
| 12436 | * @hide |
| 12437 | */ |
| 12438 | public static final String AVERAGE_TIME_TO_DISCHARGE = "average_time_to_discharge"; |
| 12439 | |
| 12440 | /** |
| 12441 | * A long indicating the epoch time in milliseconds when |
| 12442 | * {@link #TIME_REMAINING_ESTIMATE_MILLIS}, {@link #TIME_REMAINING_ESTIMATE_BASED_ON_USAGE}, |
| 12443 | * and {@link #AVERAGE_TIME_TO_DISCHARGE} were last updated. |
| 12444 | * |
| 12445 | * @hide |
| 12446 | */ |
| 12447 | public static final String BATTERY_ESTIMATES_LAST_UPDATE_TIME = |
| 12448 | "battery_estimates_last_update_time"; |
| 12449 | |
| 12450 | /** |
| 12451 | * The max value for {@link #LOW_POWER_MODE_TRIGGER_LEVEL}. If this setting is not set |
| 12452 | * or the value is 0, the default max will be used. |
| 12453 | * |
| 12454 | * @hide |
| 12455 | */ |
| 12456 | public static final String LOW_POWER_MODE_TRIGGER_LEVEL_MAX = "low_power_trigger_level_max"; |
| 12457 | |
| 12458 | /** |
| 12459 | * See com.android.settingslib.fuelgauge.BatterySaverUtils. |
| 12460 | * @hide |
| 12461 | */ |
| 12462 | public static final String LOW_POWER_MODE_SUGGESTION_PARAMS = |
| 12463 | "low_power_mode_suggestion_params"; |
| 12464 | |
| 12465 | /** |
| 12466 | * If not 0, the activity manager will aggressively finish activities and |
| 12467 | * processes as soon as they are no longer needed. If 0, the normal |
| 12468 | * extended lifetime is used. |
| 12469 | */ |
| 12470 | public static final String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; |
| 12471 | |
| 12472 | /** |
| 12473 | * If nonzero, all system error dialogs will be hidden. For example, the |
| 12474 | * crash and ANR dialogs will not be shown, and the system will just proceed |
| 12475 | * as if they had been accepted by the user. |
| 12476 | * @hide |
| 12477 | */ |
| 12478 | @TestApi |
| 12479 | public static final String HIDE_ERROR_DIALOGS = "hide_error_dialogs"; |
| 12480 | |
| 12481 | /** |
| 12482 | * Use Dock audio output for media: |
| 12483 | * 0 = disabled |
| 12484 | * 1 = enabled |
| 12485 | * @hide |
| 12486 | */ |
| 12487 | public static final String DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled"; |
| 12488 | |
| 12489 | /** |
| 12490 | * The surround sound formats AC3, DTS or IEC61937 are |
| 12491 | * available for use if they are detected. |
| 12492 | * This is the default mode. |
| 12493 | * |
| 12494 | * Note that AUTO is equivalent to ALWAYS for Android TVs and other |
| 12495 | * devices that have an S/PDIF output. This is because S/PDIF |
| 12496 | * is unidirectional and the TV cannot know if a decoder is |
| 12497 | * connected. So it assumes they are always available. |
| 12498 | * @hide |
| 12499 | */ |
| 12500 | public static final int ENCODED_SURROUND_OUTPUT_AUTO = 0; |
| 12501 | |
| 12502 | /** |
| 12503 | * AC3, DTS or IEC61937 are NEVER available, even if they |
| 12504 | * are detected by the hardware. Those formats will not be |
| 12505 | * reported. |
| 12506 | * |
| 12507 | * An example use case would be an AVR reports that it is capable of |
| 12508 | * surround sound decoding but is broken. If NEVER is chosen |
| 12509 | * then apps must use PCM output instead of encoded output. |
| 12510 | * @hide |
| 12511 | */ |
| 12512 | public static final int ENCODED_SURROUND_OUTPUT_NEVER = 1; |
| 12513 | |
| 12514 | /** |
| 12515 | * AC3, DTS or IEC61937 are ALWAYS available, even if they |
| 12516 | * are not detected by the hardware. Those formats will be |
| 12517 | * reported as part of the HDMI output capability. Applications |
| 12518 | * are then free to use either PCM or encoded output. |
| 12519 | * |
| 12520 | * An example use case would be a when TV was connected over |
| 12521 | * TOS-link to an AVR. But the TV could not see it because TOS-link |
| 12522 | * is unidirectional. |
| 12523 | * @hide |
| 12524 | */ |
| 12525 | public static final int ENCODED_SURROUND_OUTPUT_ALWAYS = 2; |
| 12526 | |
| 12527 | /** |
| 12528 | * Surround sound formats are available according to the choice |
| 12529 | * of user, even if they are not detected by the hardware. Those |
| 12530 | * formats will be reported as part of the HDMI output capability. |
| 12531 | * Applications are then free to use either PCM or encoded output. |
| 12532 | * |
| 12533 | * An example use case would be an AVR that doesn't report a surround |
| 12534 | * format while the user knows the AVR does support it. |
| 12535 | * @hide |
| 12536 | */ |
| 12537 | public static final int ENCODED_SURROUND_OUTPUT_MANUAL = 3; |
| 12538 | |
| 12539 | /** |
| 12540 | * Set to ENCODED_SURROUND_OUTPUT_AUTO, |
| 12541 | * ENCODED_SURROUND_OUTPUT_NEVER, |
| 12542 | * ENCODED_SURROUND_OUTPUT_ALWAYS or |
| 12543 | * ENCODED_SURROUND_OUTPUT_MANUAL |
| 12544 | * @hide |
| 12545 | */ |
| 12546 | public static final String ENCODED_SURROUND_OUTPUT = "encoded_surround_output"; |
| 12547 | |
| 12548 | /** |
| 12549 | * Surround sounds formats that are enabled when ENCODED_SURROUND_OUTPUT is set to |
| 12550 | * ENCODED_SURROUND_OUTPUT_MANUAL. Encoded as comma separated list. Allowed values |
| 12551 | * are the format constants defined in AudioFormat.java. Ex: |
| 12552 | * |
| 12553 | * "5,6" |
| 12554 | * |
| 12555 | * @hide |
| 12556 | */ |
| 12557 | public static final String ENCODED_SURROUND_OUTPUT_ENABLED_FORMATS = |
| 12558 | "encoded_surround_output_enabled_formats"; |
| 12559 | |
| 12560 | /** |
| 12561 | * Persisted safe headphone volume management state by AudioService |
| 12562 | * @hide |
| 12563 | */ |
| 12564 | public static final String AUDIO_SAFE_VOLUME_STATE = "audio_safe_volume_state"; |
| 12565 | |
| 12566 | /** |
| 12567 | * URL for tzinfo (time zone) updates |
| 12568 | * @hide |
| 12569 | */ |
| 12570 | public static final String TZINFO_UPDATE_CONTENT_URL = "tzinfo_content_url"; |
| 12571 | |
| 12572 | /** |
| 12573 | * URL for tzinfo (time zone) update metadata |
| 12574 | * @hide |
| 12575 | */ |
| 12576 | public static final String TZINFO_UPDATE_METADATA_URL = "tzinfo_metadata_url"; |
| 12577 | |
| 12578 | /** |
| 12579 | * URL for selinux (mandatory access control) updates |
| 12580 | * @hide |
| 12581 | */ |
| 12582 | public static final String SELINUX_UPDATE_CONTENT_URL = "selinux_content_url"; |
| 12583 | |
| 12584 | /** |
| 12585 | * URL for selinux (mandatory access control) update metadata |
| 12586 | * @hide |
| 12587 | */ |
| 12588 | public static final String SELINUX_UPDATE_METADATA_URL = "selinux_metadata_url"; |
| 12589 | |
| 12590 | /** |
| 12591 | * URL for sms short code updates |
| 12592 | * @hide |
| 12593 | */ |
| 12594 | public static final String SMS_SHORT_CODES_UPDATE_CONTENT_URL = |
| 12595 | "sms_short_codes_content_url"; |
| 12596 | |
| 12597 | /** |
| 12598 | * URL for sms short code update metadata |
| 12599 | * @hide |
| 12600 | */ |
| 12601 | public static final String SMS_SHORT_CODES_UPDATE_METADATA_URL = |
| 12602 | "sms_short_codes_metadata_url"; |
| 12603 | |
| 12604 | /** |
| 12605 | * URL for apn_db updates |
| 12606 | * @hide |
| 12607 | */ |
| 12608 | public static final String APN_DB_UPDATE_CONTENT_URL = "apn_db_content_url"; |
| 12609 | |
| 12610 | /** |
| 12611 | * URL for apn_db update metadata |
| 12612 | * @hide |
| 12613 | */ |
| 12614 | public static final String APN_DB_UPDATE_METADATA_URL = "apn_db_metadata_url"; |
| 12615 | |
| 12616 | /** |
| 12617 | * URL for cert pinlist updates |
| 12618 | * @hide |
| 12619 | */ |
| 12620 | public static final String CERT_PIN_UPDATE_CONTENT_URL = "cert_pin_content_url"; |
| 12621 | |
| 12622 | /** |
| 12623 | * URL for cert pinlist updates |
| 12624 | * @hide |
| 12625 | */ |
| 12626 | public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url"; |
| 12627 | |
| 12628 | /** |
| 12629 | * URL for intent firewall updates |
| 12630 | * @hide |
| 12631 | */ |
| 12632 | public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL = |
| 12633 | "intent_firewall_content_url"; |
| 12634 | |
| 12635 | /** |
| 12636 | * URL for intent firewall update metadata |
| 12637 | * @hide |
| 12638 | */ |
| 12639 | public static final String INTENT_FIREWALL_UPDATE_METADATA_URL = |
| 12640 | "intent_firewall_metadata_url"; |
| 12641 | |
| 12642 | /** |
| 12643 | * URL for lang id model updates |
| 12644 | * @hide |
| 12645 | */ |
| 12646 | public static final String LANG_ID_UPDATE_CONTENT_URL = "lang_id_content_url"; |
| 12647 | |
| 12648 | /** |
| 12649 | * URL for lang id model update metadata |
| 12650 | * @hide |
| 12651 | */ |
| 12652 | public static final String LANG_ID_UPDATE_METADATA_URL = "lang_id_metadata_url"; |
| 12653 | |
| 12654 | /** |
| 12655 | * URL for smart selection model updates |
| 12656 | * @hide |
| 12657 | */ |
| 12658 | public static final String SMART_SELECTION_UPDATE_CONTENT_URL = |
| 12659 | "smart_selection_content_url"; |
| 12660 | |
| 12661 | /** |
| 12662 | * URL for smart selection model update metadata |
| 12663 | * @hide |
| 12664 | */ |
| 12665 | public static final String SMART_SELECTION_UPDATE_METADATA_URL = |
| 12666 | "smart_selection_metadata_url"; |
| 12667 | |
| 12668 | /** |
| 12669 | * URL for conversation actions model updates |
| 12670 | * @hide |
| 12671 | */ |
| 12672 | public static final String CONVERSATION_ACTIONS_UPDATE_CONTENT_URL = |
| 12673 | "conversation_actions_content_url"; |
| 12674 | |
| 12675 | /** |
| 12676 | * URL for conversation actions model update metadata |
| 12677 | * @hide |
| 12678 | */ |
| 12679 | public static final String CONVERSATION_ACTIONS_UPDATE_METADATA_URL = |
| 12680 | "conversation_actions_metadata_url"; |
| 12681 | |
| 12682 | /** |
| 12683 | * SELinux enforcement status. If 0, permissive; if 1, enforcing. |
| 12684 | * @hide |
| 12685 | */ |
| 12686 | public static final String SELINUX_STATUS = "selinux_status"; |
| 12687 | |
| 12688 | /** |
| 12689 | * Developer setting to force RTL layout. |
| 12690 | * @hide |
| 12691 | */ |
| 12692 | public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl"; |
| 12693 | |
| 12694 | /** |
| 12695 | * Milliseconds after screen-off after which low battery sounds will be silenced. |
| 12696 | * |
| 12697 | * If zero, battery sounds will always play. |
| 12698 | * Defaults to @integer/def_low_battery_sound_timeout in SettingsProvider. |
| 12699 | * |
| 12700 | * @hide |
| 12701 | */ |
| 12702 | public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout"; |
| 12703 | |
| 12704 | /** |
| 12705 | * Milliseconds to wait before bouncing Wi-Fi after settings is restored. Note that after |
| 12706 | * the caller is done with this, they should call {@link ContentResolver#delete} to |
| 12707 | * clean up any value that they may have written. |
| 12708 | * |
| 12709 | * @hide |
| 12710 | */ |
| 12711 | public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms"; |
| 12712 | |
| 12713 | /** |
| 12714 | * Defines global runtime overrides to window policy. |
| 12715 | * |
| 12716 | * See {@link com.android.server.wm.PolicyControl} for value format. |
| 12717 | * |
| 12718 | * @hide |
| 12719 | */ |
| 12720 | public static final String POLICY_CONTROL = "policy_control"; |
| 12721 | |
| 12722 | /** |
| 12723 | * {@link android.view.DisplayCutout DisplayCutout} emulation mode. |
| 12724 | * |
| 12725 | * @hide |
| 12726 | */ |
| 12727 | public static final String EMULATE_DISPLAY_CUTOUT = "emulate_display_cutout"; |
| 12728 | |
| 12729 | /** @hide */ public static final int EMULATE_DISPLAY_CUTOUT_OFF = 0; |
| 12730 | /** @hide */ public static final int EMULATE_DISPLAY_CUTOUT_ON = 1; |
| 12731 | |
| 12732 | /** |
| 12733 | * A colon separated list of keys for Settings Slices. |
| 12734 | * |
| 12735 | * @hide |
| 12736 | */ |
| 12737 | public static final String BLOCKED_SLICES = "blocked_slices"; |
| 12738 | |
| 12739 | /** |
| 12740 | * Defines global zen mode. ZEN_MODE_OFF, ZEN_MODE_IMPORTANT_INTERRUPTIONS, |
| 12741 | * or ZEN_MODE_NO_INTERRUPTIONS. |
| 12742 | * |
| 12743 | * @hide |
| 12744 | */ |
| 12745 | @UnsupportedAppUsage |
| 12746 | public static final String ZEN_MODE = "zen_mode"; |
| 12747 | |
| 12748 | /** @hide */ |
| 12749 | @UnsupportedAppUsage |
| 12750 | public static final int ZEN_MODE_OFF = 0; |
| 12751 | /** @hide */ |
| 12752 | @UnsupportedAppUsage |
| 12753 | public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; |
| 12754 | /** @hide */ |
| 12755 | @UnsupportedAppUsage |
| 12756 | public static final int ZEN_MODE_NO_INTERRUPTIONS = 2; |
| 12757 | /** @hide */ |
| 12758 | @UnsupportedAppUsage |
| 12759 | public static final int ZEN_MODE_ALARMS = 3; |
| 12760 | |
| 12761 | /** @hide */ public static String zenModeToString(int mode) { |
| 12762 | if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS"; |
| 12763 | if (mode == ZEN_MODE_ALARMS) return "ZEN_MODE_ALARMS"; |
| 12764 | if (mode == ZEN_MODE_NO_INTERRUPTIONS) return "ZEN_MODE_NO_INTERRUPTIONS"; |
| 12765 | return "ZEN_MODE_OFF"; |
| 12766 | } |
| 12767 | |
| 12768 | /** @hide */ public static boolean isValidZenMode(int value) { |
| 12769 | switch (value) { |
| 12770 | case Global.ZEN_MODE_OFF: |
| 12771 | case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS: |
| 12772 | case Global.ZEN_MODE_ALARMS: |
| 12773 | case Global.ZEN_MODE_NO_INTERRUPTIONS: |
| 12774 | return true; |
| 12775 | default: |
| 12776 | return false; |
| 12777 | } |
| 12778 | } |
| 12779 | |
| 12780 | /** |
| 12781 | * Value of the ringer before entering zen mode. |
| 12782 | * |
| 12783 | * @hide |
| 12784 | */ |
| 12785 | public static final String ZEN_MODE_RINGER_LEVEL = "zen_mode_ringer_level"; |
| 12786 | |
| 12787 | /** |
| 12788 | * Opaque value, changes when persisted zen mode configuration changes. |
| 12789 | * |
| 12790 | * @hide |
| 12791 | */ |
| 12792 | @UnsupportedAppUsage |
| 12793 | public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag"; |
| 12794 | |
| 12795 | /** |
| 12796 | * @deprecated Use {@link android.provider.Settings.Secure#ZEN_DURATION} instead |
| 12797 | * @hide |
| 12798 | */ |
| 12799 | @Deprecated |
| 12800 | public static final String ZEN_DURATION = "zen_duration"; |
| 12801 | |
| 12802 | /** |
| 12803 | * @deprecated Use {@link android.provider.Settings.Secure#ZEN_DURATION_PROMPT} instead |
| 12804 | * @hide |
| 12805 | */ |
| 12806 | @Deprecated |
| 12807 | public static final int ZEN_DURATION_PROMPT = -1; |
| 12808 | |
| 12809 | /** |
| 12810 | * @deprecated Use {@link android.provider.Settings.Secure#ZEN_DURATION_FOREVER} instead |
| 12811 | * @hide |
| 12812 | */ |
| 12813 | @Deprecated |
| 12814 | public static final int ZEN_DURATION_FOREVER = 0; |
| 12815 | |
| 12816 | /** |
| 12817 | * Defines global heads up toggle. One of HEADS_UP_OFF, HEADS_UP_ON. |
| 12818 | * |
| 12819 | * @hide |
| 12820 | */ |
| 12821 | @UnsupportedAppUsage |
| 12822 | public static final String HEADS_UP_NOTIFICATIONS_ENABLED = |
| 12823 | "heads_up_notifications_enabled"; |
| 12824 | |
| 12825 | /** @hide */ |
| 12826 | @UnsupportedAppUsage |
| 12827 | public static final int HEADS_UP_OFF = 0; |
| 12828 | /** @hide */ |
| 12829 | @UnsupportedAppUsage |
| 12830 | public static final int HEADS_UP_ON = 1; |
| 12831 | |
| 12832 | /** |
| 12833 | * The name of the device |
| 12834 | */ |
| 12835 | public static final String DEVICE_NAME = "device_name"; |
| 12836 | |
| 12837 | /** |
| 12838 | * Whether the NetworkScoringService has been first initialized. |
| 12839 | * <p> |
| 12840 | * Type: int (0 for false, 1 for true) |
| 12841 | * @hide |
| 12842 | */ |
| 12843 | public static final String NETWORK_SCORING_PROVISIONED = "network_scoring_provisioned"; |
| 12844 | |
| 12845 | /** |
| 12846 | * Indicates whether the user wants to be prompted for password to decrypt the device on |
| 12847 | * boot. This only matters if the storage is encrypted. |
| 12848 | * <p> |
| 12849 | * Type: int (0 for false, 1 for true) |
| 12850 | * |
| 12851 | * @hide |
| 12852 | */ |
| 12853 | @SystemApi |
| 12854 | public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt"; |
| 12855 | |
| 12856 | /** |
| 12857 | * Whether the Volte is enabled. If this setting is not set then we use the Carrier Config |
| 12858 | * value |
| 12859 | * {@link android.telephony.CarrierConfigManager#KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL}. |
| 12860 | * <p> |
| 12861 | * Type: int (0 for false, 1 for true) |
| 12862 | * @hide |
| 12863 | * @deprecated Use |
| 12864 | * {@link android.provider.Telephony.SimInfo#COLUMN_ENHANCED_4G_MODE_ENABLED} instead. |
| 12865 | */ |
| 12866 | @Deprecated |
| 12867 | public static final String ENHANCED_4G_MODE_ENABLED = |
| 12868 | Telephony.SimInfo.COLUMN_ENHANCED_4G_MODE_ENABLED; |
| 12869 | |
| 12870 | /** |
| 12871 | * Whether VT (Video Telephony over IMS) is enabled |
| 12872 | * <p> |
| 12873 | * Type: int (0 for false, 1 for true) |
| 12874 | * |
| 12875 | * @hide |
| 12876 | * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_VT_IMS_ENABLED} instead. |
| 12877 | */ |
| 12878 | @Deprecated |
| 12879 | public static final String VT_IMS_ENABLED = Telephony.SimInfo.COLUMN_VT_IMS_ENABLED; |
| 12880 | |
| 12881 | /** |
| 12882 | * Whether WFC is enabled |
| 12883 | * <p> |
| 12884 | * Type: int (0 for false, 1 for true) |
| 12885 | * |
| 12886 | * @hide |
| 12887 | * @deprecated Use |
| 12888 | * {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_ENABLED} instead. |
| 12889 | */ |
| 12890 | @Deprecated |
| 12891 | public static final String WFC_IMS_ENABLED = Telephony.SimInfo.COLUMN_WFC_IMS_ENABLED; |
| 12892 | |
| 12893 | /** |
| 12894 | * WFC mode on home/non-roaming network. |
| 12895 | * <p> |
| 12896 | * Type: int - 2=Wi-Fi preferred, 1=Cellular preferred, 0=Wi-Fi only |
| 12897 | * |
| 12898 | * @hide |
| 12899 | * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_MODE} instead. |
| 12900 | */ |
| 12901 | @Deprecated |
| 12902 | public static final String WFC_IMS_MODE = Telephony.SimInfo.COLUMN_WFC_IMS_MODE; |
| 12903 | |
| 12904 | /** |
| 12905 | * WFC mode on roaming network. |
| 12906 | * <p> |
| 12907 | * Type: int - see {@link #WFC_IMS_MODE} for values |
| 12908 | * |
| 12909 | * @hide |
| 12910 | * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_ROAMING_MODE} |
| 12911 | * instead. |
| 12912 | */ |
| 12913 | @Deprecated |
| 12914 | public static final String WFC_IMS_ROAMING_MODE = |
| 12915 | Telephony.SimInfo.COLUMN_WFC_IMS_ROAMING_MODE; |
| 12916 | |
| 12917 | /** |
| 12918 | * Whether WFC roaming is enabled |
| 12919 | * <p> |
| 12920 | * Type: int (0 for false, 1 for true) |
| 12921 | * |
| 12922 | * @hide |
| 12923 | * @deprecated Use {@link android.provider.Telephony.SimInfo#COLUMN_WFC_IMS_ROAMING_ENABLED} |
| 12924 | * instead |
| 12925 | */ |
| 12926 | @Deprecated |
| 12927 | public static final String WFC_IMS_ROAMING_ENABLED = |
| 12928 | Telephony.SimInfo.COLUMN_WFC_IMS_ROAMING_ENABLED; |
| 12929 | |
| 12930 | /** |
| 12931 | * Whether user can enable/disable LTE as a preferred network. A carrier might control |
| 12932 | * this via gservices, OMA-DM, carrier app, etc. |
| 12933 | * <p> |
| 12934 | * Type: int (0 for false, 1 for true) |
| 12935 | * @hide |
| 12936 | */ |
| 12937 | public static final String LTE_SERVICE_FORCED = "lte_service_forced"; |
| 12938 | |
| 12939 | |
| 12940 | /** |
| 12941 | * Specifies the behaviour the lid triggers when closed |
| 12942 | * <p> |
| 12943 | * See WindowManagerPolicy.WindowManagerFuncs |
| 12944 | * @hide |
| 12945 | */ |
| 12946 | public static final String LID_BEHAVIOR = "lid_behavior"; |
| 12947 | |
| 12948 | /** |
| 12949 | * Ephemeral app cookie max size in bytes. |
| 12950 | * <p> |
| 12951 | * Type: int |
| 12952 | * @hide |
| 12953 | */ |
| 12954 | public static final String EPHEMERAL_COOKIE_MAX_SIZE_BYTES = |
| 12955 | "ephemeral_cookie_max_size_bytes"; |
| 12956 | |
| 12957 | /** |
| 12958 | * Toggle to enable/disable the entire ephemeral feature. By default, ephemeral is |
| 12959 | * enabled. Set to zero to disable. |
| 12960 | * <p> |
| 12961 | * Type: int (0 for false, 1 for true) |
| 12962 | * |
| 12963 | * @hide |
| 12964 | */ |
| 12965 | public static final String ENABLE_EPHEMERAL_FEATURE = "enable_ephemeral_feature"; |
| 12966 | |
| 12967 | /** |
| 12968 | * Toggle to enable/disable dexopt for instant applications. The default is for dexopt |
| 12969 | * to be disabled. |
| 12970 | * <p> |
| 12971 | * Type: int (0 to disable, 1 to enable) |
| 12972 | * |
| 12973 | * @hide |
| 12974 | */ |
| 12975 | public static final String INSTANT_APP_DEXOPT_ENABLED = "instant_app_dexopt_enabled"; |
| 12976 | |
| 12977 | /** |
| 12978 | * The min period for caching installed instant apps in milliseconds. |
| 12979 | * <p> |
| 12980 | * Type: long |
| 12981 | * @hide |
| 12982 | */ |
| 12983 | public static final String INSTALLED_INSTANT_APP_MIN_CACHE_PERIOD = |
| 12984 | "installed_instant_app_min_cache_period"; |
| 12985 | |
| 12986 | /** |
| 12987 | * The max period for caching installed instant apps in milliseconds. |
| 12988 | * <p> |
| 12989 | * Type: long |
| 12990 | * @hide |
| 12991 | */ |
| 12992 | public static final String INSTALLED_INSTANT_APP_MAX_CACHE_PERIOD = |
| 12993 | "installed_instant_app_max_cache_period"; |
| 12994 | |
| 12995 | /** |
| 12996 | * The min period for caching uninstalled instant apps in milliseconds. |
| 12997 | * <p> |
| 12998 | * Type: long |
| 12999 | * @hide |
| 13000 | */ |
| 13001 | public static final String UNINSTALLED_INSTANT_APP_MIN_CACHE_PERIOD = |
| 13002 | "uninstalled_instant_app_min_cache_period"; |
| 13003 | |
| 13004 | /** |
| 13005 | * The max period for caching uninstalled instant apps in milliseconds. |
| 13006 | * <p> |
| 13007 | * Type: long |
| 13008 | * @hide |
| 13009 | */ |
| 13010 | public static final String UNINSTALLED_INSTANT_APP_MAX_CACHE_PERIOD = |
| 13011 | "uninstalled_instant_app_max_cache_period"; |
| 13012 | |
| 13013 | /** |
| 13014 | * The min period for caching unused static shared libs in milliseconds. |
| 13015 | * <p> |
| 13016 | * Type: long |
| 13017 | * @hide |
| 13018 | */ |
| 13019 | public static final String UNUSED_STATIC_SHARED_LIB_MIN_CACHE_PERIOD = |
| 13020 | "unused_static_shared_lib_min_cache_period"; |
| 13021 | |
| 13022 | /** |
| 13023 | * Allows switching users when system user is locked. |
| 13024 | * <p> |
| 13025 | * Type: int |
| 13026 | * @hide |
| 13027 | */ |
| 13028 | public static final String ALLOW_USER_SWITCHING_WHEN_SYSTEM_USER_LOCKED = |
| 13029 | "allow_user_switching_when_system_user_locked"; |
| 13030 | |
| 13031 | /** |
| 13032 | * Boot count since the device starts running API level 24. |
| 13033 | * <p> |
| 13034 | * Type: int |
| 13035 | */ |
| 13036 | public static final String BOOT_COUNT = "boot_count"; |
| 13037 | |
| 13038 | /** |
| 13039 | * Whether the safe boot is disallowed. |
| 13040 | * |
| 13041 | * <p>This setting should have the identical value as the corresponding user restriction. |
| 13042 | * The purpose of the setting is to make the restriction available in early boot stages |
| 13043 | * before the user restrictions are loaded. |
| 13044 | * @hide |
| 13045 | */ |
| 13046 | public static final String SAFE_BOOT_DISALLOWED = "safe_boot_disallowed"; |
| 13047 | |
| 13048 | /** |
| 13049 | * Indicates whether this device is currently in retail demo mode. If true, the device |
| 13050 | * usage is severely limited. |
| 13051 | * <p> |
| 13052 | * Type: int (0 for false, 1 for true) |
| 13053 | * |
| 13054 | * @hide |
| 13055 | */ |
| 13056 | @SystemApi |
| 13057 | public static final String DEVICE_DEMO_MODE = "device_demo_mode"; |
| 13058 | |
| 13059 | /** |
| 13060 | * Indicates the maximum time that an app is blocked for the network rules to get updated. |
| 13061 | * |
| 13062 | * Type: long |
| 13063 | * |
| 13064 | * @hide |
| 13065 | */ |
| 13066 | public static final String NETWORK_ACCESS_TIMEOUT_MS = "network_access_timeout_ms"; |
| 13067 | |
| 13068 | /** |
| 13069 | * The reason for the settings database being downgraded. This is only for |
| 13070 | * troubleshooting purposes and its value should not be interpreted in any way. |
| 13071 | * |
| 13072 | * Type: string |
| 13073 | * |
| 13074 | * @hide |
| 13075 | */ |
| 13076 | public static final String DATABASE_DOWNGRADE_REASON = "database_downgrade_reason"; |
| 13077 | |
| 13078 | /** |
| 13079 | * The build id of when the settings database was first created (or re-created due it |
| 13080 | * being missing). |
| 13081 | * |
| 13082 | * Type: string |
| 13083 | * |
| 13084 | * @hide |
| 13085 | */ |
| 13086 | public static final String DATABASE_CREATION_BUILDID = "database_creation_buildid"; |
| 13087 | |
| 13088 | /** |
| 13089 | * Flag to toggle journal mode WAL on or off for the contacts database. WAL is enabled by |
| 13090 | * default. Set to 0 to disable. |
| 13091 | * |
| 13092 | * @hide |
| 13093 | */ |
| 13094 | public static final String CONTACTS_DATABASE_WAL_ENABLED = "contacts_database_wal_enabled"; |
| 13095 | |
| 13096 | /** |
| 13097 | * Flag to enable the link to location permissions in location setting. Set to 0 to disable. |
| 13098 | * |
| 13099 | * @hide |
| 13100 | */ |
| 13101 | public static final String LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED = |
| 13102 | "location_settings_link_to_permissions_enabled"; |
| 13103 | |
| 13104 | /** |
| 13105 | * Flag to set the waiting time for removing invisible euicc profiles inside System > |
| 13106 | * Settings. |
| 13107 | * Type: long |
| 13108 | * |
| 13109 | * @hide |
| 13110 | */ |
| 13111 | public static final String EUICC_REMOVING_INVISIBLE_PROFILES_TIMEOUT_MILLIS = |
| 13112 | "euicc_removing_invisible_profiles_timeout_millis"; |
| 13113 | |
| 13114 | /** |
| 13115 | * Flag to set the waiting time for euicc factory reset inside System > Settings |
| 13116 | * Type: long |
| 13117 | * |
| 13118 | * @hide |
| 13119 | */ |
| 13120 | public static final String EUICC_FACTORY_RESET_TIMEOUT_MILLIS = |
| 13121 | "euicc_factory_reset_timeout_millis"; |
| 13122 | |
| 13123 | /** |
| 13124 | * Flag to set the timeout for when to refresh the storage settings cached data. |
| 13125 | * Type: long |
| 13126 | * |
| 13127 | * @hide |
| 13128 | */ |
| 13129 | public static final String STORAGE_SETTINGS_CLOBBER_THRESHOLD = |
| 13130 | "storage_settings_clobber_threshold"; |
| 13131 | |
| 13132 | /** |
| 13133 | * If set to 1, {@link Secure#LOCATION_MODE} will be set to {@link Secure#LOCATION_MODE_OFF} |
| 13134 | * temporarily for all users. |
| 13135 | * |
| 13136 | * @hide |
| 13137 | */ |
| 13138 | @TestApi |
| 13139 | public static final String LOCATION_GLOBAL_KILL_SWITCH = |
| 13140 | "location_global_kill_switch"; |
| 13141 | |
| 13142 | /** |
| 13143 | * If set to 1, SettingsProvider's restoreAnyVersion="true" attribute will be ignored |
| 13144 | * and restoring to lower version of platform API will be skipped. |
| 13145 | * |
| 13146 | * @hide |
| 13147 | */ |
| 13148 | public static final String OVERRIDE_SETTINGS_PROVIDER_RESTORE_ANY_VERSION = |
| 13149 | "override_settings_provider_restore_any_version"; |
| 13150 | /** |
| 13151 | * Flag to toggle whether system services report attribution chains when they attribute |
| 13152 | * battery use via a {@code WorkSource}. |
| 13153 | * |
| 13154 | * Type: int (0 to disable, 1 to enable) |
| 13155 | * |
| 13156 | * @hide |
| 13157 | */ |
| 13158 | public static final String CHAINED_BATTERY_ATTRIBUTION_ENABLED = |
| 13159 | "chained_battery_attribution_enabled"; |
| 13160 | |
| 13161 | /** |
| 13162 | * Toggle to enable/disable the incremental ADB installation by default. |
| 13163 | * If not set, default adb installations are incremental; set to zero to use full ones. |
| 13164 | * Note: only ADB uses it, no usages in the Framework code. |
| 13165 | * <p> |
| 13166 | * Type: int (0 to disable, 1 to enable) |
| 13167 | * |
| 13168 | * @hide |
| 13169 | */ |
| 13170 | public static final String ENABLE_ADB_INCREMENTAL_INSTALL_DEFAULT = |
| 13171 | "enable_adb_incremental_install_default"; |
| 13172 | |
| 13173 | /** |
| 13174 | * The packages whitelisted to be run in autofill compatibility mode. The list |
| 13175 | * of packages is {@code ":"} colon delimited, and each entry has the name of the |
| 13176 | * package and an optional list of url bar resource ids (the list is delimited by |
| 13177 | * brackets&mdash{@code [} and {@code ]}&mdash and is also comma delimited). |
| 13178 | * |
| 13179 | * <p>For example, a list with 3 packages {@code p1}, {@code p2}, and {@code p3}, where |
| 13180 | * package {@code p1} have one id ({@code url_bar}, {@code p2} has none, and {@code p3 } |
| 13181 | * have 2 ids {@code url_foo} and {@code url_bas}) would be |
| 13182 | * {@code p1[url_bar]:p2:p3[url_foo,url_bas]} |
| 13183 | * |
| 13184 | * @hide |
| 13185 | */ |
| 13186 | @SystemApi |
| 13187 | @TestApi |
| 13188 | public static final String AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES = |
| 13189 | "autofill_compat_mode_allowed_packages"; |
| 13190 | |
| 13191 | /** |
| 13192 | * Level of autofill logging. |
| 13193 | * |
| 13194 | * <p>Valid values are |
| 13195 | * {@link android.view.autofill.AutofillManager#NO_LOGGING}, |
| 13196 | * {@link android.view.autofill.AutofillManager#FLAG_ADD_CLIENT_DEBUG}, or |
| 13197 | * {@link android.view.autofill.AutofillManager#FLAG_ADD_CLIENT_VERBOSE}. |
| 13198 | * |
| 13199 | * @hide |
| 13200 | */ |
| 13201 | public static final String AUTOFILL_LOGGING_LEVEL = "autofill_logging_level"; |
| 13202 | |
| 13203 | /** |
| 13204 | * Maximum number of partitions that can be allowed in an autofill session. |
| 13205 | * |
| 13206 | * @hide |
| 13207 | */ |
| 13208 | public static final String AUTOFILL_MAX_PARTITIONS_SIZE = "autofill_max_partitions_size"; |
| 13209 | |
| 13210 | /** |
| 13211 | * Maximum number of visible datasets in the Autofill dataset picker UI, or {@code 0} to use |
| 13212 | * the default value from resources. |
| 13213 | * |
| 13214 | * @hide |
| 13215 | */ |
| 13216 | public static final String AUTOFILL_MAX_VISIBLE_DATASETS = "autofill_max_visible_datasets"; |
| 13217 | |
| 13218 | /** |
| 13219 | * Exemptions to the hidden API blacklist. |
| 13220 | * |
| 13221 | * @hide |
| 13222 | */ |
| 13223 | @TestApi |
| 13224 | public static final String HIDDEN_API_BLACKLIST_EXEMPTIONS = |
| 13225 | "hidden_api_blacklist_exemptions"; |
| 13226 | |
| 13227 | /** |
| 13228 | * Hidden API enforcement policy for apps. |
| 13229 | * |
| 13230 | * Values correspond to @{@link |
| 13231 | * android.content.pm.ApplicationInfo.HiddenApiEnforcementPolicy} |
| 13232 | * |
| 13233 | * @hide |
| 13234 | */ |
| 13235 | public static final String HIDDEN_API_POLICY = "hidden_api_policy"; |
| 13236 | |
| 13237 | /** |
| 13238 | * Current version of signed configuration applied. |
| 13239 | * |
| 13240 | * @hide |
| 13241 | */ |
| 13242 | public static final String SIGNED_CONFIG_VERSION = "signed_config_version"; |
| 13243 | |
| 13244 | /** |
| 13245 | * Timeout for a single {@link android.media.soundtrigger.SoundTriggerDetectionService} |
| 13246 | * operation (in ms). |
| 13247 | * |
| 13248 | * @hide |
| 13249 | */ |
| 13250 | public static final String SOUND_TRIGGER_DETECTION_SERVICE_OP_TIMEOUT = |
| 13251 | "sound_trigger_detection_service_op_timeout"; |
| 13252 | |
| 13253 | /** |
| 13254 | * Maximum number of {@link android.media.soundtrigger.SoundTriggerDetectionService} |
| 13255 | * operations per day. |
| 13256 | * |
| 13257 | * @hide |
| 13258 | */ |
| 13259 | public static final String MAX_SOUND_TRIGGER_DETECTION_SERVICE_OPS_PER_DAY = |
| 13260 | "max_sound_trigger_detection_service_ops_per_day"; |
| 13261 | |
| 13262 | /** {@hide} */ |
| 13263 | public static final String ISOLATED_STORAGE_LOCAL = "isolated_storage_local"; |
| 13264 | /** {@hide} */ |
| 13265 | public static final String ISOLATED_STORAGE_REMOTE = "isolated_storage_remote"; |
| 13266 | |
| 13267 | /** |
| 13268 | * Indicates whether aware is available in the current location. |
| 13269 | * @hide |
| 13270 | */ |
| 13271 | public static final String AWARE_ALLOWED = "aware_allowed"; |
| 13272 | |
| 13273 | /** |
| 13274 | * Overrides internal R.integer.config_longPressOnPowerBehavior. |
| 13275 | * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. |
| 13276 | * Used by PhoneWindowManager. |
| 13277 | * @hide |
| 13278 | */ |
| 13279 | public static final String POWER_BUTTON_LONG_PRESS = |
| 13280 | "power_button_long_press"; |
| 13281 | |
| 13282 | /** |
| 13283 | * Overrides internal R.integer.config_veryLongPressOnPowerBehavior. |
| 13284 | * Allowable values detailed in frameworks/base/core/res/res/values/config.xml. |
| 13285 | * Used by PhoneWindowManager. |
| 13286 | * @hide |
| 13287 | */ |
| 13288 | public static final String POWER_BUTTON_VERY_LONG_PRESS = |
| 13289 | "power_button_very_long_press"; |
| 13290 | |
| 13291 | /** |
| 13292 | * Global settings that shouldn't be persisted. |
| 13293 | * |
| 13294 | * @hide |
| 13295 | */ |
| 13296 | public static final String[] TRANSIENT_SETTINGS = { |
| 13297 | LOCATION_GLOBAL_KILL_SWITCH, |
| 13298 | }; |
| 13299 | |
| 13300 | /** |
| 13301 | * Keys we no longer back up under the current schema, but want to continue to |
| 13302 | * process when restoring historical backup datasets. |
| 13303 | * |
| 13304 | * All settings in {@link LEGACY_RESTORE_SETTINGS} array *must* have a non-null validator, |
| 13305 | * otherwise they won't be restored. |
| 13306 | * |
| 13307 | * @hide |
| 13308 | */ |
| 13309 | public static final String[] LEGACY_RESTORE_SETTINGS = { |
| 13310 | }; |
| 13311 | |
| 13312 | @UnsupportedAppUsage |
| 13313 | private static final ContentProviderHolder sProviderHolder = |
| 13314 | new ContentProviderHolder(CONTENT_URI); |
| 13315 | |
| 13316 | // Populated lazily, guarded by class object: |
| 13317 | @UnsupportedAppUsage |
| 13318 | private static final NameValueCache sNameValueCache = new NameValueCache( |
| 13319 | CONTENT_URI, |
| 13320 | CALL_METHOD_GET_GLOBAL, |
| 13321 | CALL_METHOD_PUT_GLOBAL, |
| 13322 | sProviderHolder); |
| 13323 | |
| 13324 | // Certain settings have been moved from global to the per-user secure namespace |
| 13325 | @UnsupportedAppUsage |
| 13326 | private static final HashSet<String> MOVED_TO_SECURE; |
| 13327 | static { |
| 13328 | MOVED_TO_SECURE = new HashSet<>(8); |
| 13329 | MOVED_TO_SECURE.add(Global.INSTALL_NON_MARKET_APPS); |
| 13330 | MOVED_TO_SECURE.add(Global.ZEN_DURATION); |
| 13331 | MOVED_TO_SECURE.add(Global.SHOW_ZEN_UPGRADE_NOTIFICATION); |
| 13332 | MOVED_TO_SECURE.add(Global.SHOW_ZEN_SETTINGS_SUGGESTION); |
| 13333 | MOVED_TO_SECURE.add(Global.ZEN_SETTINGS_UPDATED); |
| 13334 | MOVED_TO_SECURE.add(Global.ZEN_SETTINGS_SUGGESTION_VIEWED); |
| 13335 | MOVED_TO_SECURE.add(Global.CHARGING_SOUNDS_ENABLED); |
| 13336 | MOVED_TO_SECURE.add(Global.CHARGING_VIBRATION_ENABLED); |
| 13337 | |
| 13338 | } |
| 13339 | |
| 13340 | /** @hide */ |
| 13341 | public static void getMovedToSecureSettings(Set<String> outKeySet) { |
| 13342 | outKeySet.addAll(MOVED_TO_SECURE); |
| 13343 | } |
| 13344 | |
| 13345 | /** @hide */ |
| 13346 | public static void clearProviderForTest() { |
| 13347 | sProviderHolder.clearProviderForTest(); |
| 13348 | sNameValueCache.clearGenerationTrackerForTest(); |
| 13349 | } |
| 13350 | |
| 13351 | /** |
| 13352 | * Look up a name in the database. |
| 13353 | * @param resolver to access the database with |
| 13354 | * @param name to look up in the table |
| 13355 | * @return the corresponding value, or null if not present |
| 13356 | */ |
| 13357 | public static String getString(ContentResolver resolver, String name) { |
| 13358 | return getStringForUser(resolver, name, resolver.getUserId()); |
| 13359 | } |
| 13360 | |
| 13361 | /** @hide */ |
| 13362 | @UnsupportedAppUsage |
| 13363 | public static String getStringForUser(ContentResolver resolver, String name, |
| 13364 | int userHandle) { |
| 13365 | if (MOVED_TO_SECURE.contains(name)) { |
| 13366 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" |
| 13367 | + " to android.provider.Settings.Secure, returning read-only value."); |
| 13368 | return Secure.getStringForUser(resolver, name, userHandle); |
| 13369 | } |
| 13370 | return sNameValueCache.getStringForUser(resolver, name, userHandle); |
| 13371 | } |
| 13372 | |
| 13373 | /** |
| 13374 | * Store a name/value pair into the database. |
| 13375 | * @param resolver to access the database with |
| 13376 | * @param name to store |
| 13377 | * @param value to associate with the name |
| 13378 | * @return true if the value was set, false on database errors |
| 13379 | */ |
| 13380 | public static boolean putString(ContentResolver resolver, |
| 13381 | String name, String value) { |
| 13382 | return putStringForUser(resolver, name, value, null, false, resolver.getUserId(), |
| 13383 | DEFAULT_OVERRIDEABLE_BY_RESTORE); |
| 13384 | } |
| 13385 | |
| 13386 | /** |
| 13387 | * Store a name/value pair into the database. |
| 13388 | * |
| 13389 | * @param resolver to access the database with |
| 13390 | * @param name to store |
| 13391 | * @param value to associate with the name |
| 13392 | * @param tag to associated with the setting. |
| 13393 | * @param makeDefault whether to make the value the default one. |
| 13394 | * @param overrideableByRestore whether restore can override this value |
| 13395 | * @return true if the value was set, false on database errors |
| 13396 | * |
| 13397 | * @hide |
| 13398 | */ |
| 13399 | @RequiresPermission(Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) |
| 13400 | public static boolean putString(@NonNull ContentResolver resolver, |
| 13401 | @NonNull String name, @Nullable String value, @Nullable String tag, |
| 13402 | boolean makeDefault, boolean overrideableByRestore) { |
| 13403 | return putStringForUser(resolver, name, value, tag, makeDefault, |
| 13404 | resolver.getUserId(), overrideableByRestore); |
| 13405 | } |
| 13406 | |
| 13407 | /** |
| 13408 | * Store a name/value pair into the database. |
| 13409 | * <p> |
| 13410 | * The method takes an optional tag to associate with the setting |
| 13411 | * which can be used to clear only settings made by your package and |
| 13412 | * associated with this tag by passing the tag to {@link |
| 13413 | * #resetToDefaults(ContentResolver, String)}. Anyone can override |
| 13414 | * the current tag. Also if another package changes the setting |
| 13415 | * then the tag will be set to the one specified in the set call |
| 13416 | * which can be null. Also any of the settings setters that do not |
| 13417 | * take a tag as an argument effectively clears the tag. |
| 13418 | * </p><p> |
| 13419 | * For example, if you set settings A and B with tags T1 and T2 and |
| 13420 | * another app changes setting A (potentially to the same value), it |
| 13421 | * can assign to it a tag T3 (note that now the package that changed |
| 13422 | * the setting is not yours). Now if you reset your changes for T1 and |
| 13423 | * T2 only setting B will be reset and A not (as it was changed by |
| 13424 | * another package) but since A did not change you are in the desired |
| 13425 | * initial state. Now if the other app changes the value of A (assuming |
| 13426 | * you registered an observer in the beginning) you would detect that |
| 13427 | * the setting was changed by another app and handle this appropriately |
| 13428 | * (ignore, set back to some value, etc). |
| 13429 | * </p><p> |
| 13430 | * Also the method takes an argument whether to make the value the |
| 13431 | * default for this setting. If the system already specified a default |
| 13432 | * value, then the one passed in here will <strong>not</strong> |
| 13433 | * be set as the default. |
| 13434 | * </p> |
| 13435 | * |
| 13436 | * @param resolver to access the database with. |
| 13437 | * @param name to store. |
| 13438 | * @param value to associate with the name. |
| 13439 | * @param tag to associated with the setting. |
| 13440 | * @param makeDefault whether to make the value the default one. |
| 13441 | * @return true if the value was set, false on database errors. |
| 13442 | * |
| 13443 | * @see #resetToDefaults(ContentResolver, String) |
| 13444 | * |
| 13445 | * @hide |
| 13446 | */ |
| 13447 | @SystemApi |
| 13448 | @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) |
| 13449 | public static boolean putString(@NonNull ContentResolver resolver, |
| 13450 | @NonNull String name, @Nullable String value, @Nullable String tag, |
| 13451 | boolean makeDefault) { |
| 13452 | return putStringForUser(resolver, name, value, tag, makeDefault, |
| 13453 | resolver.getUserId(), DEFAULT_OVERRIDEABLE_BY_RESTORE); |
| 13454 | } |
| 13455 | |
| 13456 | /** |
| 13457 | * Reset the settings to their defaults. This would reset <strong>only</strong> |
| 13458 | * settings set by the caller's package. Think of it of a way to undo your own |
| 13459 | * changes to the secure settings. Passing in the optional tag will reset only |
| 13460 | * settings changed by your package and associated with this tag. |
| 13461 | * |
| 13462 | * @param resolver Handle to the content resolver. |
| 13463 | * @param tag Optional tag which should be associated with the settings to reset. |
| 13464 | * |
| 13465 | * @see #putString(ContentResolver, String, String, String, boolean) |
| 13466 | * |
| 13467 | * @hide |
| 13468 | */ |
| 13469 | @SystemApi |
| 13470 | @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS) |
| 13471 | public static void resetToDefaults(@NonNull ContentResolver resolver, |
| 13472 | @Nullable String tag) { |
| 13473 | resetToDefaultsAsUser(resolver, tag, RESET_MODE_PACKAGE_DEFAULTS, |
| 13474 | resolver.getUserId()); |
| 13475 | } |
| 13476 | |
| 13477 | /** |
| 13478 | * Reset the settings to their defaults for a given user with a specific mode. The |
| 13479 | * optional tag argument is valid only for {@link #RESET_MODE_PACKAGE_DEFAULTS} |
| 13480 | * allowing resetting the settings made by a package and associated with the tag. |
| 13481 | * |
| 13482 | * @param resolver Handle to the content resolver. |
| 13483 | * @param tag Optional tag which should be associated with the settings to reset. |
| 13484 | * @param mode The reset mode. |
| 13485 | * @param userHandle The user for which to reset to defaults. |
| 13486 | * |
| 13487 | * @see #RESET_MODE_PACKAGE_DEFAULTS |
| 13488 | * @see #RESET_MODE_UNTRUSTED_DEFAULTS |
| 13489 | * @see #RESET_MODE_UNTRUSTED_CHANGES |
| 13490 | * @see #RESET_MODE_TRUSTED_DEFAULTS |
| 13491 | * |
| 13492 | * @hide |
| 13493 | */ |
| 13494 | public static void resetToDefaultsAsUser(@NonNull ContentResolver resolver, |
| 13495 | @Nullable String tag, @ResetMode int mode, @IntRange(from = 0) int userHandle) { |
| 13496 | try { |
| 13497 | Bundle arg = new Bundle(); |
| 13498 | arg.putInt(CALL_METHOD_USER_KEY, userHandle); |
| 13499 | if (tag != null) { |
| 13500 | arg.putString(CALL_METHOD_TAG_KEY, tag); |
| 13501 | } |
| 13502 | arg.putInt(CALL_METHOD_RESET_MODE_KEY, mode); |
| 13503 | IContentProvider cp = sProviderHolder.getProvider(resolver); |
| 13504 | cp.call(resolver.getPackageName(), resolver.getAttributionTag(), |
| 13505 | sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_GLOBAL, null, arg); |
| 13506 | } catch (RemoteException e) { |
| 13507 | Log.w(TAG, "Can't reset do defaults for " + CONTENT_URI, e); |
| 13508 | } |
| 13509 | } |
| 13510 | |
| 13511 | /** @hide */ |
| 13512 | @UnsupportedAppUsage |
| 13513 | public static boolean putStringForUser(ContentResolver resolver, |
| 13514 | String name, String value, int userHandle) { |
| 13515 | return putStringForUser(resolver, name, value, null, false, userHandle, |
| 13516 | DEFAULT_OVERRIDEABLE_BY_RESTORE); |
| 13517 | } |
| 13518 | |
| 13519 | /** @hide */ |
| 13520 | public static boolean putStringForUser(@NonNull ContentResolver resolver, |
| 13521 | @NonNull String name, @Nullable String value, @Nullable String tag, |
| 13522 | boolean makeDefault, @UserIdInt int userHandle, boolean overrideableByRestore) { |
| 13523 | if (LOCAL_LOGV) { |
| 13524 | Log.v(TAG, "Global.putString(name=" + name + ", value=" + value |
| 13525 | + " for " + userHandle); |
| 13526 | } |
| 13527 | // Global and Secure have the same access policy so we can forward writes |
| 13528 | if (MOVED_TO_SECURE.contains(name)) { |
| 13529 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" |
| 13530 | + " to android.provider.Settings.Secure, value is unchanged."); |
| 13531 | return Secure.putStringForUser(resolver, name, value, tag, |
| 13532 | makeDefault, userHandle, overrideableByRestore); |
| 13533 | } |
| 13534 | return sNameValueCache.putStringForUser(resolver, name, value, tag, |
| 13535 | makeDefault, userHandle, overrideableByRestore); |
| 13536 | } |
| 13537 | |
| 13538 | /** |
| 13539 | * Construct the content URI for a particular name/value pair, |
| 13540 | * useful for monitoring changes with a ContentObserver. |
| 13541 | * @param name to look up in the table |
| 13542 | * @return the corresponding content URI, or null if not present |
| 13543 | */ |
| 13544 | public static Uri getUriFor(String name) { |
| 13545 | return getUriFor(CONTENT_URI, name); |
| 13546 | } |
| 13547 | |
| 13548 | /** |
| 13549 | * Convenience function for retrieving a single secure settings value |
| 13550 | * as an integer. Note that internally setting values are always |
| 13551 | * stored as strings; this function converts the string to an integer |
| 13552 | * for you. The default value will be returned if the setting is |
| 13553 | * not defined or not an integer. |
| 13554 | * |
| 13555 | * @param cr The ContentResolver to access. |
| 13556 | * @param name The name of the setting to retrieve. |
| 13557 | * @param def Value to return if the setting is not defined. |
| 13558 | * |
| 13559 | * @return The setting's current value, or 'def' if it is not defined |
| 13560 | * or not a valid integer. |
| 13561 | */ |
| 13562 | public static int getInt(ContentResolver cr, String name, int def) { |
| 13563 | String v = getString(cr, name); |
| 13564 | try { |
| 13565 | return v != null ? Integer.parseInt(v) : def; |
| 13566 | } catch (NumberFormatException e) { |
| 13567 | return def; |
| 13568 | } |
| 13569 | } |
| 13570 | |
| 13571 | /** |
| 13572 | * Convenience function for retrieving a single secure settings value |
| 13573 | * as an integer. Note that internally setting values are always |
| 13574 | * stored as strings; this function converts the string to an integer |
| 13575 | * for you. |
| 13576 | * <p> |
| 13577 | * This version does not take a default value. If the setting has not |
| 13578 | * been set, or the string value is not a number, |
| 13579 | * it throws {@link SettingNotFoundException}. |
| 13580 | * |
| 13581 | * @param cr The ContentResolver to access. |
| 13582 | * @param name The name of the setting to retrieve. |
| 13583 | * |
| 13584 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 13585 | * name can't be found or the setting value is not an integer. |
| 13586 | * |
| 13587 | * @return The setting's current value. |
| 13588 | */ |
| 13589 | public static int getInt(ContentResolver cr, String name) |
| 13590 | throws SettingNotFoundException { |
| 13591 | String v = getString(cr, name); |
| 13592 | try { |
| 13593 | return Integer.parseInt(v); |
| 13594 | } catch (NumberFormatException e) { |
| 13595 | throw new SettingNotFoundException(name); |
| 13596 | } |
| 13597 | } |
| 13598 | |
| 13599 | /** |
| 13600 | * Convenience function for updating a single settings value as an |
| 13601 | * integer. This will either create a new entry in the table if the |
| 13602 | * given name does not exist, or modify the value of the existing row |
| 13603 | * with that name. Note that internally setting values are always |
| 13604 | * stored as strings, so this function converts the given value to a |
| 13605 | * string before storing it. |
| 13606 | * |
| 13607 | * @param cr The ContentResolver to access. |
| 13608 | * @param name The name of the setting to modify. |
| 13609 | * @param value The new value for the setting. |
| 13610 | * @return true if the value was set, false on database errors |
| 13611 | */ |
| 13612 | public static boolean putInt(ContentResolver cr, String name, int value) { |
| 13613 | return putString(cr, name, Integer.toString(value)); |
| 13614 | } |
| 13615 | |
| 13616 | /** |
| 13617 | * Convenience function for retrieving a single secure settings value |
| 13618 | * as a {@code long}. Note that internally setting values are always |
| 13619 | * stored as strings; this function converts the string to a {@code long} |
| 13620 | * for you. The default value will be returned if the setting is |
| 13621 | * not defined or not a {@code long}. |
| 13622 | * |
| 13623 | * @param cr The ContentResolver to access. |
| 13624 | * @param name The name of the setting to retrieve. |
| 13625 | * @param def Value to return if the setting is not defined. |
| 13626 | * |
| 13627 | * @return The setting's current value, or 'def' if it is not defined |
| 13628 | * or not a valid {@code long}. |
| 13629 | */ |
| 13630 | public static long getLong(ContentResolver cr, String name, long def) { |
| 13631 | String valString = getString(cr, name); |
| 13632 | long value; |
| 13633 | try { |
| 13634 | value = valString != null ? Long.parseLong(valString) : def; |
| 13635 | } catch (NumberFormatException e) { |
| 13636 | value = def; |
| 13637 | } |
| 13638 | return value; |
| 13639 | } |
| 13640 | |
| 13641 | /** |
| 13642 | * Convenience function for retrieving a single secure settings value |
| 13643 | * as a {@code long}. Note that internally setting values are always |
| 13644 | * stored as strings; this function converts the string to a {@code long} |
| 13645 | * for you. |
| 13646 | * <p> |
| 13647 | * This version does not take a default value. If the setting has not |
| 13648 | * been set, or the string value is not a number, |
| 13649 | * it throws {@link SettingNotFoundException}. |
| 13650 | * |
| 13651 | * @param cr The ContentResolver to access. |
| 13652 | * @param name The name of the setting to retrieve. |
| 13653 | * |
| 13654 | * @return The setting's current value. |
| 13655 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 13656 | * name can't be found or the setting value is not an integer. |
| 13657 | */ |
| 13658 | public static long getLong(ContentResolver cr, String name) |
| 13659 | throws SettingNotFoundException { |
| 13660 | String valString = getString(cr, name); |
| 13661 | try { |
| 13662 | return Long.parseLong(valString); |
| 13663 | } catch (NumberFormatException e) { |
| 13664 | throw new SettingNotFoundException(name); |
| 13665 | } |
| 13666 | } |
| 13667 | |
| 13668 | /** |
| 13669 | * Convenience function for updating a secure settings value as a long |
| 13670 | * integer. This will either create a new entry in the table if the |
| 13671 | * given name does not exist, or modify the value of the existing row |
| 13672 | * with that name. Note that internally setting values are always |
| 13673 | * stored as strings, so this function converts the given value to a |
| 13674 | * string before storing it. |
| 13675 | * |
| 13676 | * @param cr The ContentResolver to access. |
| 13677 | * @param name The name of the setting to modify. |
| 13678 | * @param value The new value for the setting. |
| 13679 | * @return true if the value was set, false on database errors |
| 13680 | */ |
| 13681 | public static boolean putLong(ContentResolver cr, String name, long value) { |
| 13682 | return putString(cr, name, Long.toString(value)); |
| 13683 | } |
| 13684 | |
| 13685 | /** |
| 13686 | * Convenience function for retrieving a single secure settings value |
| 13687 | * as a floating point number. Note that internally setting values are |
| 13688 | * always stored as strings; this function converts the string to an |
| 13689 | * float for you. The default value will be returned if the setting |
| 13690 | * is not defined or not a valid float. |
| 13691 | * |
| 13692 | * @param cr The ContentResolver to access. |
| 13693 | * @param name The name of the setting to retrieve. |
| 13694 | * @param def Value to return if the setting is not defined. |
| 13695 | * |
| 13696 | * @return The setting's current value, or 'def' if it is not defined |
| 13697 | * or not a valid float. |
| 13698 | */ |
| 13699 | public static float getFloat(ContentResolver cr, String name, float def) { |
| 13700 | String v = getString(cr, name); |
| 13701 | try { |
| 13702 | return v != null ? Float.parseFloat(v) : def; |
| 13703 | } catch (NumberFormatException e) { |
| 13704 | return def; |
| 13705 | } |
| 13706 | } |
| 13707 | |
| 13708 | /** |
| 13709 | * Convenience function for retrieving a single secure settings value |
| 13710 | * as a float. Note that internally setting values are always |
| 13711 | * stored as strings; this function converts the string to a float |
| 13712 | * for you. |
| 13713 | * <p> |
| 13714 | * This version does not take a default value. If the setting has not |
| 13715 | * been set, or the string value is not a number, |
| 13716 | * it throws {@link SettingNotFoundException}. |
| 13717 | * |
| 13718 | * @param cr The ContentResolver to access. |
| 13719 | * @param name The name of the setting to retrieve. |
| 13720 | * |
| 13721 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 13722 | * name can't be found or the setting value is not a float. |
| 13723 | * |
| 13724 | * @return The setting's current value. |
| 13725 | */ |
| 13726 | public static float getFloat(ContentResolver cr, String name) |
| 13727 | throws SettingNotFoundException { |
| 13728 | String v = getString(cr, name); |
| 13729 | if (v == null) { |
| 13730 | throw new SettingNotFoundException(name); |
| 13731 | } |
| 13732 | try { |
| 13733 | return Float.parseFloat(v); |
| 13734 | } catch (NumberFormatException e) { |
| 13735 | throw new SettingNotFoundException(name); |
| 13736 | } |
| 13737 | } |
| 13738 | |
| 13739 | /** |
| 13740 | * Convenience function for updating a single settings value as a |
| 13741 | * floating point number. This will either create a new entry in the |
| 13742 | * table if the given name does not exist, or modify the value of the |
| 13743 | * existing row with that name. Note that internally setting values |
| 13744 | * are always stored as strings, so this function converts the given |
| 13745 | * value to a string before storing it. |
| 13746 | * |
| 13747 | * @param cr The ContentResolver to access. |
| 13748 | * @param name The name of the setting to modify. |
| 13749 | * @param value The new value for the setting. |
| 13750 | * @return true if the value was set, false on database errors |
| 13751 | */ |
| 13752 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
| 13753 | return putString(cr, name, Float.toString(value)); |
| 13754 | } |
| 13755 | |
| 13756 | /** |
| 13757 | * Subscription Id to be used for voice call on a multi sim device. |
| 13758 | * @hide |
| 13759 | */ |
| 13760 | public static final String MULTI_SIM_VOICE_CALL_SUBSCRIPTION = "multi_sim_voice_call"; |
| 13761 | |
| 13762 | /** |
| 13763 | * Used to provide option to user to select subscription during dial. |
| 13764 | * The supported values are 0 = disable or 1 = enable prompt. |
| 13765 | * @hide |
| 13766 | */ |
| 13767 | @UnsupportedAppUsage |
| 13768 | public static final String MULTI_SIM_VOICE_PROMPT = "multi_sim_voice_prompt"; |
| 13769 | |
| 13770 | /** |
| 13771 | * Subscription Id to be used for data call on a multi sim device. |
| 13772 | * @hide |
| 13773 | */ |
| 13774 | public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call"; |
| 13775 | |
| 13776 | /** |
| 13777 | * Subscription Id to be used for SMS on a multi sim device. |
| 13778 | * @hide |
| 13779 | */ |
| 13780 | public static final String MULTI_SIM_SMS_SUBSCRIPTION = "multi_sim_sms"; |
| 13781 | |
| 13782 | /** |
| 13783 | * Used to provide option to user to select subscription during send SMS. |
| 13784 | * The value 1 - enable, 0 - disable |
| 13785 | * @hide |
| 13786 | */ |
| 13787 | public static final String MULTI_SIM_SMS_PROMPT = "multi_sim_sms_prompt"; |
| 13788 | |
| 13789 | /** User preferred subscriptions setting. |
| 13790 | * This holds the details of the user selected subscription from the card and |
| 13791 | * the activation status. Each settings string have the comma separated values |
| 13792 | * iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index |
| 13793 | * @hide |
| 13794 | */ |
| 13795 | @UnsupportedAppUsage |
| 13796 | public static final String[] MULTI_SIM_USER_PREFERRED_SUBS = {"user_preferred_sub1", |
| 13797 | "user_preferred_sub2","user_preferred_sub3"}; |
| 13798 | |
| 13799 | /** |
| 13800 | * Which subscription is enabled for a physical slot. |
| 13801 | * @hide |
| 13802 | */ |
| 13803 | public static final String ENABLED_SUBSCRIPTION_FOR_SLOT = "enabled_subscription_for_slot"; |
| 13804 | |
| 13805 | /** |
| 13806 | * Whether corresponding logical modem is enabled for a physical slot. |
| 13807 | * The value 1 - enable, 0 - disable |
| 13808 | * @hide |
| 13809 | */ |
| 13810 | public static final String MODEM_STACK_ENABLED_FOR_SLOT = "modem_stack_enabled_for_slot"; |
| 13811 | |
| 13812 | /** |
| 13813 | * Whether to enable new contacts aggregator or not. |
| 13814 | * The value 1 - enable, 0 - disable |
| 13815 | * @hide |
| 13816 | */ |
| 13817 | public static final String NEW_CONTACT_AGGREGATOR = "new_contact_aggregator"; |
| 13818 | |
| 13819 | /** |
| 13820 | * Whether to enable contacts metadata syncing or not |
| 13821 | * The value 1 - enable, 0 - disable |
| 13822 | * |
| 13823 | * @removed |
| 13824 | */ |
| 13825 | @Deprecated |
| 13826 | public static final String CONTACT_METADATA_SYNC = "contact_metadata_sync"; |
| 13827 | |
| 13828 | /** |
| 13829 | * Whether to enable contacts metadata syncing or not |
| 13830 | * The value 1 - enable, 0 - disable |
| 13831 | */ |
| 13832 | public static final String CONTACT_METADATA_SYNC_ENABLED = "contact_metadata_sync_enabled"; |
| 13833 | |
| 13834 | /** |
| 13835 | * Whether to enable cellular on boot. |
| 13836 | * The value 1 - enable, 0 - disable |
| 13837 | * @hide |
| 13838 | */ |
| 13839 | public static final String ENABLE_CELLULAR_ON_BOOT = "enable_cellular_on_boot"; |
| 13840 | |
| 13841 | /** |
| 13842 | * The maximum allowed notification enqueue rate in Hertz. |
| 13843 | * |
| 13844 | * Should be a float, and includes updates only. |
| 13845 | * @hide |
| 13846 | */ |
| 13847 | public static final String MAX_NOTIFICATION_ENQUEUE_RATE = "max_notification_enqueue_rate"; |
| 13848 | |
| 13849 | /** |
| 13850 | * Displays toasts when an app posts a notification that does not specify a valid channel. |
| 13851 | * |
| 13852 | * The value 1 - enable, 0 - disable |
| 13853 | * @hide |
| 13854 | */ |
| 13855 | public static final String SHOW_NOTIFICATION_CHANNEL_WARNINGS = |
| 13856 | "show_notification_channel_warnings"; |
| 13857 | |
| 13858 | /** |
| 13859 | * When enabled, requires all notifications in the conversation section to be backed |
| 13860 | * by a long-lived sharing shortcut |
| 13861 | * |
| 13862 | * The value 1 - require a shortcut, 0 - do not require a shortcut |
| 13863 | * @hide |
| 13864 | */ |
| 13865 | public static final String REQUIRE_SHORTCUTS_FOR_CONVERSATIONS = |
| 13866 | "require_shortcuts_for_conversations"; |
| 13867 | |
| 13868 | /** |
| 13869 | * Whether cell is enabled/disabled |
| 13870 | * @hide |
| 13871 | */ |
| 13872 | public static final String CELL_ON = "cell_on"; |
| 13873 | |
| 13874 | /** |
| 13875 | * Global settings which can be accessed by instant apps. |
| 13876 | * @hide |
| 13877 | */ |
| 13878 | public static final Set<String> INSTANT_APP_SETTINGS = new ArraySet<>(); |
| 13879 | static { |
| 13880 | INSTANT_APP_SETTINGS.add(WAIT_FOR_DEBUGGER); |
| 13881 | INSTANT_APP_SETTINGS.add(DEVICE_PROVISIONED); |
| 13882 | INSTANT_APP_SETTINGS.add(DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES); |
| 13883 | INSTANT_APP_SETTINGS.add(DEVELOPMENT_FORCE_RTL); |
| 13884 | INSTANT_APP_SETTINGS.add(EPHEMERAL_COOKIE_MAX_SIZE_BYTES); |
| 13885 | INSTANT_APP_SETTINGS.add(AIRPLANE_MODE_ON); |
| 13886 | INSTANT_APP_SETTINGS.add(WINDOW_ANIMATION_SCALE); |
| 13887 | INSTANT_APP_SETTINGS.add(TRANSITION_ANIMATION_SCALE); |
| 13888 | INSTANT_APP_SETTINGS.add(ANIMATOR_DURATION_SCALE); |
| 13889 | INSTANT_APP_SETTINGS.add(DEBUG_VIEW_ATTRIBUTES); |
| 13890 | INSTANT_APP_SETTINGS.add(DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE); |
| 13891 | INSTANT_APP_SETTINGS.add(WTF_IS_FATAL); |
| 13892 | INSTANT_APP_SETTINGS.add(SEND_ACTION_APP_ERROR); |
| 13893 | INSTANT_APP_SETTINGS.add(ZEN_MODE); |
| 13894 | } |
| 13895 | |
| 13896 | /** |
| 13897 | * Whether to show the high temperature warning notification. |
| 13898 | * @hide |
| 13899 | */ |
| 13900 | public static final String SHOW_TEMPERATURE_WARNING = "show_temperature_warning"; |
| 13901 | |
| 13902 | /** |
| 13903 | * Whether to show the usb high temperature alarm notification. |
| 13904 | * @hide |
| 13905 | */ |
| 13906 | public static final String SHOW_USB_TEMPERATURE_ALARM = "show_usb_temperature_alarm"; |
| 13907 | |
| 13908 | /** |
| 13909 | * Temperature at which the high temperature warning notification should be shown. |
| 13910 | * @hide |
| 13911 | */ |
| 13912 | public static final String WARNING_TEMPERATURE = "warning_temperature"; |
| 13913 | |
| 13914 | /** |
| 13915 | * Whether the diskstats logging task is enabled/disabled. |
| 13916 | * @hide |
| 13917 | */ |
| 13918 | public static final String ENABLE_DISKSTATS_LOGGING = "enable_diskstats_logging"; |
| 13919 | |
| 13920 | /** |
| 13921 | * Whether the cache quota calculation task is enabled/disabled. |
| 13922 | * @hide |
| 13923 | */ |
| 13924 | public static final String ENABLE_CACHE_QUOTA_CALCULATION = |
| 13925 | "enable_cache_quota_calculation"; |
| 13926 | |
| 13927 | /** |
| 13928 | * Whether the Deletion Helper no threshold toggle is available. |
| 13929 | * @hide |
| 13930 | */ |
| 13931 | public static final String ENABLE_DELETION_HELPER_NO_THRESHOLD_TOGGLE = |
| 13932 | "enable_deletion_helper_no_threshold_toggle"; |
| 13933 | |
| 13934 | /** |
| 13935 | * The list of snooze options for notifications |
| 13936 | * This is encoded as a key=value list, separated by commas. Ex: |
| 13937 | * |
| 13938 | * "default=60,options_array=15:30:60:120" |
| 13939 | * |
| 13940 | * The following keys are supported: |
| 13941 | * |
| 13942 | * <pre> |
| 13943 | * default (int) |
| 13944 | * options_array (int[]) |
| 13945 | * </pre> |
| 13946 | * |
| 13947 | * All delays in integer minutes. Array order is respected. |
| 13948 | * Options will be used in order up to the maximum allowed by the UI. |
| 13949 | * @hide |
| 13950 | */ |
| 13951 | public static final String NOTIFICATION_SNOOZE_OPTIONS = |
| 13952 | "notification_snooze_options"; |
| 13953 | |
| 13954 | /** |
| 13955 | * Settings key for the ratio of notification dismissals to notification views - one of the |
| 13956 | * criteria for showing the notification blocking helper. |
| 13957 | * |
| 13958 | * <p>The value is a float ranging from 0.0 to 1.0 (the closer to 0.0, the more intrusive |
| 13959 | * the blocking helper will be). |
| 13960 | * |
| 13961 | * @hide |
| 13962 | */ |
| 13963 | public static final String BLOCKING_HELPER_DISMISS_TO_VIEW_RATIO_LIMIT = |
| 13964 | "blocking_helper_dismiss_to_view_ratio"; |
| 13965 | |
| 13966 | /** |
| 13967 | * Settings key for the longest streak of dismissals - one of the criteria for showing the |
| 13968 | * notification blocking helper. |
| 13969 | * |
| 13970 | * <p>The value is an integer greater than 0. |
| 13971 | * |
| 13972 | * @hide |
| 13973 | */ |
| 13974 | public static final String BLOCKING_HELPER_STREAK_LIMIT = "blocking_helper_streak_limit"; |
| 13975 | |
| 13976 | /** |
| 13977 | * Configuration flags for SQLite Compatibility WAL. Encoded as a key-value list, separated |
| 13978 | * by commas. E.g.: compatibility_wal_supported=true, wal_syncmode=OFF |
| 13979 | * |
| 13980 | * Supported keys:<br/> |
| 13981 | * <li> |
| 13982 | * <ul> {@code legacy_compatibility_wal_enabled} : A {code boolean} flag that determines |
| 13983 | * whether or not "compatibility WAL" mode is enabled by default. This is a legacy flag |
| 13984 | * and is honoured on Android Q and higher. This flag will be removed in a future release. |
| 13985 | * </ul> |
| 13986 | * <ul> {@code wal_syncmode} : A {@code String} representing the synchronization mode to use |
| 13987 | * when WAL is enabled, either via {@code legacy_compatibility_wal_enabled} or using the |
| 13988 | * obsolete {@code compatibility_wal_supported} flag. |
| 13989 | * </ul> |
| 13990 | * <ul> {@code truncate_size} : A {@code int} flag that specifies the truncate size of the |
| 13991 | * WAL journal. |
| 13992 | * </ul> |
| 13993 | * <ul> {@code compatibility_wal_supported} : A {code boolean} flag that specifies whether |
| 13994 | * the legacy "compatibility WAL" mode is enabled by default. This flag is obsolete and is |
| 13995 | * only supported on Android Pie. |
| 13996 | * </ul> |
| 13997 | * </li> |
| 13998 | * |
| 13999 | * @hide |
| 14000 | */ |
| 14001 | public static final String SQLITE_COMPATIBILITY_WAL_FLAGS = |
| 14002 | "sqlite_compatibility_wal_flags"; |
| 14003 | |
| 14004 | /** |
| 14005 | * Enable GNSS Raw Measurements Full Tracking? |
| 14006 | * 0 = no |
| 14007 | * 1 = yes |
| 14008 | * @hide |
| 14009 | */ |
| 14010 | public static final String ENABLE_GNSS_RAW_MEAS_FULL_TRACKING = |
| 14011 | "enable_gnss_raw_meas_full_tracking"; |
| 14012 | |
| 14013 | /** |
| 14014 | * Whether the notification should be ongoing (persistent) when a carrier app install is |
| 14015 | * required. |
| 14016 | * |
| 14017 | * The value is a boolean (1 or 0). |
| 14018 | * @hide |
| 14019 | */ |
| 14020 | @SystemApi |
| 14021 | public static final String INSTALL_CARRIER_APP_NOTIFICATION_PERSISTENT = |
| 14022 | "install_carrier_app_notification_persistent"; |
| 14023 | |
| 14024 | /** |
| 14025 | * The amount of time (ms) to hide the install carrier app notification after the user has |
| 14026 | * ignored it. After this time passes, the notification will be shown again |
| 14027 | * |
| 14028 | * The value is a long |
| 14029 | * @hide |
| 14030 | */ |
| 14031 | @SystemApi |
| 14032 | public static final String INSTALL_CARRIER_APP_NOTIFICATION_SLEEP_MILLIS = |
| 14033 | "install_carrier_app_notification_sleep_millis"; |
| 14034 | |
| 14035 | /** |
| 14036 | * Whether we've enabled zram on this device. Takes effect on |
| 14037 | * reboot. The value "1" enables zram; "0" disables it, and |
| 14038 | * everything else is unspecified. |
| 14039 | * @hide |
| 14040 | */ |
| 14041 | public static final String ZRAM_ENABLED = |
| 14042 | "zram_enabled"; |
| 14043 | |
| 14044 | /** |
| 14045 | * Configuration flags for smart replies in notifications. |
| 14046 | * This is encoded as a key=value list, separated by commas. Ex: |
| 14047 | * |
| 14048 | * "enabled=1,max_squeeze_remeasure_count=3" |
| 14049 | * |
| 14050 | * The following keys are supported: |
| 14051 | * |
| 14052 | * <pre> |
| 14053 | * enabled (boolean) |
| 14054 | * requires_targeting_p (boolean) |
| 14055 | * max_squeeze_remeasure_attempts (int) |
| 14056 | * edit_choices_before_sending (boolean) |
| 14057 | * show_in_heads_up (boolean) |
| 14058 | * min_num_system_generated_replies (int) |
| 14059 | * max_num_actions (int) |
| 14060 | * </pre> |
| 14061 | * @see com.android.systemui.statusbar.policy.SmartReplyConstants |
| 14062 | * @hide |
| 14063 | */ |
| 14064 | public static final String SMART_REPLIES_IN_NOTIFICATIONS_FLAGS = |
| 14065 | "smart_replies_in_notifications_flags"; |
| 14066 | |
| 14067 | /** |
| 14068 | * Configuration flags for the automatic generation of smart replies and smart actions in |
| 14069 | * notifications. This is encoded as a key=value list, separated by commas. Ex: |
| 14070 | * "generate_replies=false,generate_actions=true". |
| 14071 | * |
| 14072 | * The following keys are supported: |
| 14073 | * |
| 14074 | * <pre> |
| 14075 | * generate_replies (boolean) |
| 14076 | * generate_actions (boolean) |
| 14077 | * </pre> |
| 14078 | * @hide |
| 14079 | */ |
| 14080 | public static final String SMART_SUGGESTIONS_IN_NOTIFICATIONS_FLAGS = |
| 14081 | "smart_suggestions_in_notifications_flags"; |
| 14082 | |
| 14083 | /** |
| 14084 | * If nonzero, crashes in foreground processes will bring up a dialog. |
| 14085 | * Otherwise, the process will be silently killed. |
| 14086 | * @hide |
| 14087 | */ |
| 14088 | public static final String SHOW_FIRST_CRASH_DIALOG = "show_first_crash_dialog"; |
| 14089 | |
| 14090 | /** |
| 14091 | * If nonzero, crash dialogs will show an option to restart the app. |
| 14092 | * @hide |
| 14093 | */ |
| 14094 | public static final String SHOW_RESTART_IN_CRASH_DIALOG = "show_restart_in_crash_dialog"; |
| 14095 | |
| 14096 | /** |
| 14097 | * If nonzero, crash dialogs will show an option to mute all future crash dialogs for |
| 14098 | * this app. |
| 14099 | * @hide |
| 14100 | */ |
| 14101 | public static final String SHOW_MUTE_IN_CRASH_DIALOG = "show_mute_in_crash_dialog"; |
| 14102 | |
| 14103 | |
| 14104 | /** |
| 14105 | * If nonzero, will show the zen upgrade notification when the user toggles DND on/off. |
| 14106 | * @hide |
| 14107 | * @deprecated - Use {@link android.provider.Settings.Secure#SHOW_ZEN_UPGRADE_NOTIFICATION} |
| 14108 | */ |
| 14109 | @Deprecated |
| 14110 | public static final String SHOW_ZEN_UPGRADE_NOTIFICATION = "show_zen_upgrade_notification"; |
| 14111 | |
| 14112 | /** |
| 14113 | * If nonzero, will show the zen update settings suggestion. |
| 14114 | * @hide |
| 14115 | * @deprecated - Use {@link android.provider.Settings.Secure#SHOW_ZEN_SETTINGS_SUGGESTION} |
| 14116 | */ |
| 14117 | @Deprecated |
| 14118 | public static final String SHOW_ZEN_SETTINGS_SUGGESTION = "show_zen_settings_suggestion"; |
| 14119 | |
| 14120 | /** |
| 14121 | * If nonzero, zen has not been updated to reflect new changes. |
| 14122 | * @deprecated - Use {@link android.provider.Settings.Secure#ZEN_SETTINGS_UPDATED} |
| 14123 | * @hide |
| 14124 | */ |
| 14125 | @Deprecated |
| 14126 | public static final String ZEN_SETTINGS_UPDATED = "zen_settings_updated"; |
| 14127 | |
| 14128 | /** |
| 14129 | * If nonzero, zen setting suggestion has been viewed by user |
| 14130 | * @hide |
| 14131 | * @deprecated - Use {@link android.provider.Settings.Secure#ZEN_SETTINGS_SUGGESTION_VIEWED} |
| 14132 | */ |
| 14133 | @Deprecated |
| 14134 | public static final String ZEN_SETTINGS_SUGGESTION_VIEWED = |
| 14135 | "zen_settings_suggestion_viewed"; |
| 14136 | |
| 14137 | /** |
| 14138 | * Backup and restore agent timeout parameters. |
| 14139 | * These parameters are represented by a comma-delimited key-value list. |
| 14140 | * |
| 14141 | * The following strings are supported as keys: |
| 14142 | * <pre> |
| 14143 | * kv_backup_agent_timeout_millis (long) |
| 14144 | * full_backup_agent_timeout_millis (long) |
| 14145 | * shared_backup_agent_timeout_millis (long) |
| 14146 | * restore_agent_timeout_millis (long) |
| 14147 | * restore_agent_finished_timeout_millis (long) |
| 14148 | * </pre> |
| 14149 | * |
| 14150 | * They map to milliseconds represented as longs. |
| 14151 | * |
| 14152 | * Ex: "kv_backup_agent_timeout_millis=30000,full_backup_agent_timeout_millis=300000" |
| 14153 | * |
| 14154 | * @hide |
| 14155 | */ |
| 14156 | public static final String BACKUP_AGENT_TIMEOUT_PARAMETERS = |
| 14157 | "backup_agent_timeout_parameters"; |
| 14158 | |
| 14159 | /** |
| 14160 | * Blacklist of GNSS satellites. |
| 14161 | * |
| 14162 | * This is a list of integers separated by commas to represent pairs of (constellation, |
| 14163 | * svid). Thus, the number of integers should be even. |
| 14164 | * |
| 14165 | * E.g.: "3,0,5,24" denotes (constellation=3, svid=0) and (constellation=5, svid=24) are |
| 14166 | * blacklisted. Note that svid=0 denotes all svids in the |
| 14167 | * constellation are blacklisted. |
| 14168 | * |
| 14169 | * @hide |
| 14170 | */ |
| 14171 | public static final String GNSS_SATELLITE_BLACKLIST = "gnss_satellite_blacklist"; |
| 14172 | |
| 14173 | /** |
| 14174 | * Duration of updates in millisecond for GNSS location request from HAL to framework. |
| 14175 | * |
| 14176 | * If zero, the GNSS location request feature is disabled. |
| 14177 | * |
| 14178 | * The value is a non-negative long. |
| 14179 | * |
| 14180 | * @hide |
| 14181 | */ |
| 14182 | public static final String GNSS_HAL_LOCATION_REQUEST_DURATION_MILLIS = |
| 14183 | "gnss_hal_location_request_duration_millis"; |
| 14184 | |
| 14185 | /** |
| 14186 | * Binder call stats settings. |
| 14187 | * |
| 14188 | * The following strings are supported as keys: |
| 14189 | * <pre> |
| 14190 | * enabled (boolean) |
| 14191 | * detailed_tracking (boolean) |
| 14192 | * upload_data (boolean) |
| 14193 | * sampling_interval (int) |
| 14194 | * </pre> |
| 14195 | * |
| 14196 | * @hide |
| 14197 | */ |
| 14198 | public static final String BINDER_CALLS_STATS = "binder_calls_stats"; |
| 14199 | |
| 14200 | /** |
| 14201 | * Looper stats settings. |
| 14202 | * |
| 14203 | * The following strings are supported as keys: |
| 14204 | * <pre> |
| 14205 | * enabled (boolean) |
| 14206 | * sampling_interval (int) |
| 14207 | * </pre> |
| 14208 | * |
| 14209 | * @hide |
| 14210 | */ |
| 14211 | public static final String LOOPER_STATS = "looper_stats"; |
| 14212 | |
| 14213 | /** |
| 14214 | * Settings for collecting statistics on CPU usage per thread |
| 14215 | * |
| 14216 | * The following strings are supported as keys: |
| 14217 | * <pre> |
| 14218 | * num_buckets (int) |
| 14219 | * collected_uids (string) |
| 14220 | * minimum_total_cpu_usage_millis (int) |
| 14221 | * </pre> |
| 14222 | * |
| 14223 | * @hide |
| 14224 | */ |
| 14225 | public static final String KERNEL_CPU_THREAD_READER = "kernel_cpu_thread_reader"; |
| 14226 | |
| 14227 | /** |
| 14228 | * Persistent user id that is last logged in to. |
| 14229 | * |
| 14230 | * They map to user ids, for example, 10, 11, 12. |
| 14231 | * |
| 14232 | * @hide |
| 14233 | */ |
| 14234 | public static final String LAST_ACTIVE_USER_ID = "last_active_persistent_user_id"; |
| 14235 | |
| 14236 | /** |
| 14237 | * Whether we've enabled native flags health check on this device. Takes effect on |
| 14238 | * reboot. The value "1" enables native flags health check; otherwise it's disabled. |
| 14239 | * @hide |
| 14240 | */ |
| 14241 | public static final String NATIVE_FLAGS_HEALTH_CHECK_ENABLED = |
| 14242 | "native_flags_health_check_enabled"; |
| 14243 | |
| 14244 | /** |
| 14245 | * Parameter for {@link #APPOP_HISTORY_PARAMETERS} that controls the mode |
| 14246 | * in which the historical registry operates. |
| 14247 | * |
| 14248 | * @hide |
| 14249 | */ |
| 14250 | public static final String APPOP_HISTORY_MODE = "mode"; |
| 14251 | |
| 14252 | /** |
| 14253 | * Parameter for {@link #APPOP_HISTORY_PARAMETERS} that controls how long |
| 14254 | * is the interval between snapshots in the base case i.e. the most recent |
| 14255 | * part of the history. |
| 14256 | * |
| 14257 | * @hide |
| 14258 | */ |
| 14259 | public static final String APPOP_HISTORY_BASE_INTERVAL_MILLIS = "baseIntervalMillis"; |
| 14260 | |
| 14261 | /** |
| 14262 | * Parameter for {@link #APPOP_HISTORY_PARAMETERS} that controls the base |
| 14263 | * for the logarithmic step when building app op history. |
| 14264 | * |
| 14265 | * @hide |
| 14266 | */ |
| 14267 | public static final String APPOP_HISTORY_INTERVAL_MULTIPLIER = "intervalMultiplier"; |
| 14268 | |
| 14269 | /** |
| 14270 | * Appop history parameters. These parameters are represented by |
| 14271 | * a comma-delimited key-value list. |
| 14272 | * |
| 14273 | * The following strings are supported as keys: |
| 14274 | * <pre> |
| 14275 | * mode (int) |
| 14276 | * baseIntervalMillis (long) |
| 14277 | * intervalMultiplier (int) |
| 14278 | * </pre> |
| 14279 | * |
| 14280 | * Ex: "mode=HISTORICAL_MODE_ENABLED_ACTIVE,baseIntervalMillis=1000,intervalMultiplier=10" |
| 14281 | * |
| 14282 | * @see #APPOP_HISTORY_MODE |
| 14283 | * @see #APPOP_HISTORY_BASE_INTERVAL_MILLIS |
| 14284 | * @see #APPOP_HISTORY_INTERVAL_MULTIPLIER |
| 14285 | * |
| 14286 | * @hide |
| 14287 | */ |
| 14288 | public static final String APPOP_HISTORY_PARAMETERS = |
| 14289 | "appop_history_parameters"; |
| 14290 | |
| 14291 | /** |
| 14292 | * Auto revoke parameters. These parameters are represented by |
| 14293 | * a comma-delimited key-value list. |
| 14294 | * |
| 14295 | * <pre> |
| 14296 | * enabledForPreRApps (bolean) |
| 14297 | * unusedThresholdMs (long) |
| 14298 | * checkFrequencyMs (long) |
| 14299 | * </pre> |
| 14300 | * |
| 14301 | * Ex: "enabledForPreRApps=false,unusedThresholdMs=7776000000,checkFrequencyMs=1296000000" |
| 14302 | * |
| 14303 | * @hide |
| 14304 | */ |
| 14305 | public static final String AUTO_REVOKE_PARAMETERS = |
| 14306 | "auto_revoke_parameters"; |
| 14307 | |
| 14308 | /** |
| 14309 | * Delay for sending ACTION_CHARGING after device is plugged in. |
| 14310 | * This is used as an override for constants defined in BatteryStatsImpl for |
| 14311 | * ease of experimentation. |
| 14312 | * |
| 14313 | * @see com.android.internal.os.BatteryStatsImpl.Constants.KEY_BATTERY_CHARGED_DELAY_MS |
| 14314 | * @hide |
| 14315 | */ |
| 14316 | public static final String BATTERY_CHARGING_STATE_UPDATE_DELAY = |
| 14317 | "battery_charging_state_update_delay"; |
| 14318 | |
| 14319 | /** |
| 14320 | * A serialized string of params that will be loaded into a text classifier action model. |
| 14321 | * |
| 14322 | * @hide |
| 14323 | */ |
| 14324 | public static final String TEXT_CLASSIFIER_ACTION_MODEL_PARAMS = |
| 14325 | "text_classifier_action_model_params"; |
| 14326 | |
| 14327 | /** |
| 14328 | * The amount of time to suppress "power-off" from the power button after the device has |
| 14329 | * woken due to a gesture (lifting the phone). Since users have learned to hit the power |
| 14330 | * button immediately when lifting their device, it can cause the device to turn off if a |
| 14331 | * gesture has just woken the device. This value tells us the milliseconds to wait after |
| 14332 | * a gesture before "power-off" via power-button is functional again. A value of 0 is no |
| 14333 | * delay, and reverts to the old behavior. |
| 14334 | * |
| 14335 | * @hide |
| 14336 | */ |
| 14337 | public static final String POWER_BUTTON_SUPPRESSION_DELAY_AFTER_GESTURE_WAKE = |
| 14338 | "power_button_suppression_delay_after_gesture_wake"; |
| 14339 | |
| 14340 | /** |
| 14341 | * The usage amount of advanced battery. The value is 0~100. |
| 14342 | * |
| 14343 | * @hide |
| 14344 | */ |
| 14345 | public static final String ADVANCED_BATTERY_USAGE_AMOUNT = "advanced_battery_usage_amount"; |
| 14346 | } |
| 14347 | |
| 14348 | /** |
| 14349 | * Configuration system settings, containing settings which are applied identically for all |
| 14350 | * defined users. Only Android can read these and only a specific configuration service can |
| 14351 | * write these. |
| 14352 | * |
| 14353 | * @hide |
| 14354 | */ |
| 14355 | public static final class Config extends NameValueTable { |
| 14356 | private static final ContentProviderHolder sProviderHolder = |
| 14357 | new ContentProviderHolder(DeviceConfig.CONTENT_URI); |
| 14358 | |
| 14359 | // Populated lazily, guarded by class object: |
| 14360 | private static final NameValueCache sNameValueCache = new NameValueCache( |
| 14361 | DeviceConfig.CONTENT_URI, |
| 14362 | CALL_METHOD_GET_CONFIG, |
| 14363 | CALL_METHOD_PUT_CONFIG, |
| 14364 | CALL_METHOD_LIST_CONFIG, |
| 14365 | CALL_METHOD_SET_ALL_CONFIG, |
| 14366 | sProviderHolder); |
| 14367 | |
| 14368 | /** |
| 14369 | * Look up a name in the database. |
| 14370 | * @param resolver to access the database with |
| 14371 | * @param name to look up in the table |
| 14372 | * @return the corresponding value, or null if not present |
| 14373 | * |
| 14374 | * @hide |
| 14375 | */ |
| 14376 | @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) |
| 14377 | static String getString(ContentResolver resolver, String name) { |
| 14378 | return sNameValueCache.getStringForUser(resolver, name, resolver.getUserId()); |
| 14379 | } |
| 14380 | |
| 14381 | /** |
| 14382 | * Look up a list of names in the database, within the specified namespace. |
| 14383 | * |
| 14384 | * @param resolver to access the database with |
| 14385 | * @param namespace to which the names belong |
| 14386 | * @param names to look up in the table |
| 14387 | * @return a non null, but possibly empty, map from name to value for any of the names that |
| 14388 | * were found during lookup. |
| 14389 | * |
| 14390 | * @hide |
| 14391 | */ |
| 14392 | @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) |
| 14393 | public static Map<String, String> getStrings(@NonNull ContentResolver resolver, |
| 14394 | @NonNull String namespace, @NonNull List<String> names) { |
| 14395 | List<String> compositeNames = new ArrayList<>(names.size()); |
| 14396 | for (String name : names) { |
| 14397 | compositeNames.add(createCompositeName(namespace, name)); |
| 14398 | } |
| 14399 | |
| 14400 | String prefix = createPrefix(namespace); |
| 14401 | ArrayMap<String, String> rawKeyValues = sNameValueCache.getStringsForPrefix( |
| 14402 | resolver, prefix, compositeNames); |
| 14403 | int size = rawKeyValues.size(); |
| 14404 | int substringLength = prefix.length(); |
| 14405 | ArrayMap<String, String> keyValues = new ArrayMap<>(size); |
| 14406 | for (int i = 0; i < size; ++i) { |
| 14407 | keyValues.put(rawKeyValues.keyAt(i).substring(substringLength), |
| 14408 | rawKeyValues.valueAt(i)); |
| 14409 | } |
| 14410 | return keyValues; |
| 14411 | } |
| 14412 | |
| 14413 | /** |
| 14414 | * Store a name/value pair into the database within the specified namespace. |
| 14415 | * <p> |
| 14416 | * Also the method takes an argument whether to make the value the default for this setting. |
| 14417 | * If the system already specified a default value, then the one passed in here will |
| 14418 | * <strong>not</strong> be set as the default. |
| 14419 | * </p> |
| 14420 | * |
| 14421 | * @param resolver to access the database with. |
| 14422 | * @param namespace to store the name/value pair in. |
| 14423 | * @param name to store. |
| 14424 | * @param value to associate with the name. |
| 14425 | * @param makeDefault whether to make the value the default one. |
| 14426 | * @return true if the value was set, false on database errors. |
| 14427 | * |
| 14428 | * @see #resetToDefaults(ContentResolver, int, String) |
| 14429 | * |
| 14430 | * @hide |
| 14431 | */ |
| 14432 | @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) |
| 14433 | static boolean putString(@NonNull ContentResolver resolver, @NonNull String namespace, |
| 14434 | @NonNull String name, @Nullable String value, boolean makeDefault) { |
| 14435 | return sNameValueCache.putStringForUser(resolver, createCompositeName(namespace, name), |
| 14436 | value, null, makeDefault, resolver.getUserId(), |
| 14437 | DEFAULT_OVERRIDEABLE_BY_RESTORE); |
| 14438 | } |
| 14439 | |
| 14440 | /** |
| 14441 | * Clear all name/value pairs for the provided namespace and save new name/value pairs in |
| 14442 | * their place. |
| 14443 | * |
| 14444 | * @param resolver to access the database with. |
| 14445 | * @param namespace to which the names should be set. |
| 14446 | * @param keyValues map of key names (without the prefix) to values. |
| 14447 | * @return |
| 14448 | * |
| 14449 | * @hide |
| 14450 | */ |
| 14451 | @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) |
| 14452 | public static boolean setStrings(@NonNull ContentResolver resolver, |
| 14453 | @NonNull String namespace, @NonNull Map<String, String> keyValues) |
| 14454 | throws DeviceConfig.BadConfigException { |
| 14455 | HashMap<String, String> compositeKeyValueMap = new HashMap<>(keyValues.keySet().size()); |
| 14456 | for (Map.Entry<String, String> entry : keyValues.entrySet()) { |
| 14457 | compositeKeyValueMap.put( |
| 14458 | createCompositeName(namespace, entry.getKey()), entry.getValue()); |
| 14459 | } |
| 14460 | // If can't set given configuration that means it's bad |
| 14461 | if (!sNameValueCache.setStringsForPrefix(resolver, createPrefix(namespace), |
| 14462 | compositeKeyValueMap)) { |
| 14463 | throw new DeviceConfig.BadConfigException(); |
| 14464 | } |
| 14465 | return true; |
| 14466 | } |
| 14467 | |
| 14468 | /** |
| 14469 | * Reset the values to their defaults. |
| 14470 | * <p> |
| 14471 | * The method accepts an optional prefix parameter. If provided, only pairs with a name that |
| 14472 | * starts with the exact prefix will be reset. Otherwise all will be reset. |
| 14473 | * |
| 14474 | * @param resolver Handle to the content resolver. |
| 14475 | * @param resetMode The reset mode to use. |
| 14476 | * @param namespace Optionally, to limit which which namespace is reset. |
| 14477 | * |
| 14478 | * @see #putString(ContentResolver, String, String, String, boolean) |
| 14479 | * |
| 14480 | * @hide |
| 14481 | */ |
| 14482 | @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) |
| 14483 | static void resetToDefaults(@NonNull ContentResolver resolver, @ResetMode int resetMode, |
| 14484 | @Nullable String namespace) { |
| 14485 | try { |
| 14486 | Bundle arg = new Bundle(); |
| 14487 | arg.putInt(CALL_METHOD_USER_KEY, resolver.getUserId()); |
| 14488 | arg.putInt(CALL_METHOD_RESET_MODE_KEY, resetMode); |
| 14489 | if (namespace != null) { |
| 14490 | arg.putString(Settings.CALL_METHOD_PREFIX_KEY, createPrefix(namespace)); |
| 14491 | } |
| 14492 | IContentProvider cp = sProviderHolder.getProvider(resolver); |
| 14493 | cp.call(resolver.getPackageName(), resolver.getAttributionTag(), |
| 14494 | sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_CONFIG, null, arg); |
| 14495 | } catch (RemoteException e) { |
| 14496 | Log.w(TAG, "Can't reset to defaults for " + DeviceConfig.CONTENT_URI, e); |
| 14497 | } |
| 14498 | } |
| 14499 | |
| 14500 | /** |
| 14501 | * Register callback for monitoring Config table. |
| 14502 | * |
| 14503 | * @param resolver Handle to the content resolver. |
| 14504 | * @param callback callback to register |
| 14505 | * |
| 14506 | * @hide |
| 14507 | */ |
| 14508 | @RequiresPermission(Manifest.permission.MONITOR_DEVICE_CONFIG_ACCESS) |
| 14509 | public static void registerMonitorCallback(@NonNull ContentResolver resolver, |
| 14510 | @NonNull RemoteCallback callback) { |
| 14511 | registerMonitorCallbackAsUser(resolver, resolver.getUserId(), callback); |
| 14512 | } |
| 14513 | |
| 14514 | private static void registerMonitorCallbackAsUser( |
| 14515 | @NonNull ContentResolver resolver, @UserIdInt int userHandle, |
| 14516 | @NonNull RemoteCallback callback) { |
| 14517 | try { |
| 14518 | Bundle arg = new Bundle(); |
| 14519 | arg.putInt(CALL_METHOD_USER_KEY, userHandle); |
| 14520 | arg.putParcelable(CALL_METHOD_MONITOR_CALLBACK_KEY, callback); |
| 14521 | IContentProvider cp = sProviderHolder.getProvider(resolver); |
| 14522 | cp.call(resolver.getPackageName(), resolver.getAttributionTag(), |
| 14523 | sProviderHolder.mUri.getAuthority(), |
| 14524 | CALL_METHOD_REGISTER_MONITOR_CALLBACK_CONFIG, null, arg); |
| 14525 | } catch (RemoteException e) { |
| 14526 | Log.w(TAG, "Can't register config monitor callback", e); |
| 14527 | } |
| 14528 | } |
| 14529 | |
| 14530 | /** @hide */ |
| 14531 | public static void clearProviderForTest() { |
| 14532 | sProviderHolder.clearProviderForTest(); |
| 14533 | sNameValueCache.clearGenerationTrackerForTest(); |
| 14534 | } |
| 14535 | |
| 14536 | private static String createCompositeName(@NonNull String namespace, @NonNull String name) { |
| 14537 | Preconditions.checkNotNull(namespace); |
| 14538 | Preconditions.checkNotNull(name); |
| 14539 | return createPrefix(namespace) + name; |
| 14540 | } |
| 14541 | |
| 14542 | private static String createPrefix(@NonNull String namespace) { |
| 14543 | Preconditions.checkNotNull(namespace); |
| 14544 | return namespace + "/"; |
| 14545 | } |
| 14546 | } |
| 14547 | |
| 14548 | /** |
| 14549 | * User-defined bookmarks and shortcuts. The target of each bookmark is an |
| 14550 | * Intent URL, allowing it to be either a web page or a particular |
| 14551 | * application activity. |
| 14552 | * |
| 14553 | * @hide |
| 14554 | */ |
| 14555 | public static final class Bookmarks implements BaseColumns |
| 14556 | { |
| 14557 | private static final String TAG = "Bookmarks"; |
| 14558 | |
| 14559 | /** |
| 14560 | * The content:// style URL for this table |
| 14561 | */ |
| 14562 | @UnsupportedAppUsage |
| 14563 | public static final Uri CONTENT_URI = |
| 14564 | Uri.parse("content://" + AUTHORITY + "/bookmarks"); |
| 14565 | |
| 14566 | /** |
| 14567 | * The row ID. |
| 14568 | * <p>Type: INTEGER</p> |
| 14569 | */ |
| 14570 | public static final String ID = "_id"; |
| 14571 | |
| 14572 | /** |
| 14573 | * Descriptive name of the bookmark that can be displayed to the user. |
| 14574 | * If this is empty, the title should be resolved at display time (use |
| 14575 | * {@link #getTitle(Context, Cursor)} any time you want to display the |
| 14576 | * title of a bookmark.) |
| 14577 | * <P> |
| 14578 | * Type: TEXT |
| 14579 | * </P> |
| 14580 | */ |
| 14581 | public static final String TITLE = "title"; |
| 14582 | |
| 14583 | /** |
| 14584 | * Arbitrary string (displayed to the user) that allows bookmarks to be |
| 14585 | * organized into categories. There are some special names for |
| 14586 | * standard folders, which all start with '@'. The label displayed for |
| 14587 | * the folder changes with the locale (via {@link #getLabelForFolder}) but |
| 14588 | * the folder name does not change so you can consistently query for |
| 14589 | * the folder regardless of the current locale. |
| 14590 | * |
| 14591 | * <P>Type: TEXT</P> |
| 14592 | * |
| 14593 | */ |
| 14594 | public static final String FOLDER = "folder"; |
| 14595 | |
| 14596 | /** |
| 14597 | * The Intent URL of the bookmark, describing what it points to. This |
| 14598 | * value is given to {@link android.content.Intent#getIntent} to create |
| 14599 | * an Intent that can be launched. |
| 14600 | * <P>Type: TEXT</P> |
| 14601 | */ |
| 14602 | public static final String INTENT = "intent"; |
| 14603 | |
| 14604 | /** |
| 14605 | * Optional shortcut character associated with this bookmark. |
| 14606 | * <P>Type: INTEGER</P> |
| 14607 | */ |
| 14608 | public static final String SHORTCUT = "shortcut"; |
| 14609 | |
| 14610 | /** |
| 14611 | * The order in which the bookmark should be displayed |
| 14612 | * <P>Type: INTEGER</P> |
| 14613 | */ |
| 14614 | public static final String ORDERING = "ordering"; |
| 14615 | |
| 14616 | private static final String[] sIntentProjection = { INTENT }; |
| 14617 | private static final String[] sShortcutProjection = { ID, SHORTCUT }; |
| 14618 | private static final String sShortcutSelection = SHORTCUT + "=?"; |
| 14619 | |
| 14620 | /** |
| 14621 | * Convenience function to retrieve the bookmarked Intent for a |
| 14622 | * particular shortcut key. |
| 14623 | * |
| 14624 | * @param cr The ContentResolver to query. |
| 14625 | * @param shortcut The shortcut key. |
| 14626 | * |
| 14627 | * @return Intent The bookmarked URL, or null if there is no bookmark |
| 14628 | * matching the given shortcut. |
| 14629 | */ |
| 14630 | public static Intent getIntentForShortcut(ContentResolver cr, char shortcut) |
| 14631 | { |
| 14632 | Intent intent = null; |
| 14633 | |
| 14634 | Cursor c = cr.query(CONTENT_URI, |
| 14635 | sIntentProjection, sShortcutSelection, |
| 14636 | new String[] { String.valueOf((int) shortcut) }, ORDERING); |
| 14637 | // Keep trying until we find a valid shortcut |
| 14638 | try { |
| 14639 | while (intent == null && c.moveToNext()) { |
| 14640 | try { |
| 14641 | String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT)); |
| 14642 | intent = Intent.parseUri(intentURI, 0); |
| 14643 | } catch (java.net.URISyntaxException e) { |
| 14644 | // The stored URL is bad... ignore it. |
| 14645 | } catch (IllegalArgumentException e) { |
| 14646 | // Column not found |
| 14647 | Log.w(TAG, "Intent column not found", e); |
| 14648 | } |
| 14649 | } |
| 14650 | } finally { |
| 14651 | if (c != null) c.close(); |
| 14652 | } |
| 14653 | |
| 14654 | return intent; |
| 14655 | } |
| 14656 | |
| 14657 | /** |
| 14658 | * Add a new bookmark to the system. |
| 14659 | * |
| 14660 | * @param cr The ContentResolver to query. |
| 14661 | * @param intent The desired target of the bookmark. |
| 14662 | * @param title Bookmark title that is shown to the user; null if none |
| 14663 | * or it should be resolved to the intent's title. |
| 14664 | * @param folder Folder in which to place the bookmark; null if none. |
| 14665 | * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If |
| 14666 | * this is non-zero and there is an existing bookmark entry |
| 14667 | * with this same shortcut, then that existing shortcut is |
| 14668 | * cleared (the bookmark is not removed). |
| 14669 | * @return The unique content URL for the new bookmark entry. |
| 14670 | */ |
| 14671 | @UnsupportedAppUsage |
| 14672 | public static Uri add(ContentResolver cr, |
| 14673 | Intent intent, |
| 14674 | String title, |
| 14675 | String folder, |
| 14676 | char shortcut, |
| 14677 | int ordering) |
| 14678 | { |
| 14679 | // If a shortcut is supplied, and it is already defined for |
| 14680 | // another bookmark, then remove the old definition. |
| 14681 | if (shortcut != 0) { |
| 14682 | cr.delete(CONTENT_URI, sShortcutSelection, |
| 14683 | new String[] { String.valueOf((int) shortcut) }); |
| 14684 | } |
| 14685 | |
| 14686 | ContentValues values = new ContentValues(); |
| 14687 | if (title != null) values.put(TITLE, title); |
| 14688 | if (folder != null) values.put(FOLDER, folder); |
| 14689 | values.put(INTENT, intent.toUri(0)); |
| 14690 | if (shortcut != 0) values.put(SHORTCUT, (int) shortcut); |
| 14691 | values.put(ORDERING, ordering); |
| 14692 | return cr.insert(CONTENT_URI, values); |
| 14693 | } |
| 14694 | |
| 14695 | /** |
| 14696 | * Return the folder name as it should be displayed to the user. This |
| 14697 | * takes care of localizing special folders. |
| 14698 | * |
| 14699 | * @param r Resources object for current locale; only need access to |
| 14700 | * system resources. |
| 14701 | * @param folder The value found in the {@link #FOLDER} column. |
| 14702 | * |
| 14703 | * @return CharSequence The label for this folder that should be shown |
| 14704 | * to the user. |
| 14705 | */ |
| 14706 | public static CharSequence getLabelForFolder(Resources r, String folder) { |
| 14707 | return folder; |
| 14708 | } |
| 14709 | |
| 14710 | /** |
| 14711 | * Return the title as it should be displayed to the user. This takes |
| 14712 | * care of localizing bookmarks that point to activities. |
| 14713 | * |
| 14714 | * @param context A context. |
| 14715 | * @param cursor A cursor pointing to the row whose title should be |
| 14716 | * returned. The cursor must contain at least the {@link #TITLE} |
| 14717 | * and {@link #INTENT} columns. |
| 14718 | * @return A title that is localized and can be displayed to the user, |
| 14719 | * or the empty string if one could not be found. |
| 14720 | */ |
| 14721 | public static CharSequence getTitle(Context context, Cursor cursor) { |
| 14722 | int titleColumn = cursor.getColumnIndex(TITLE); |
| 14723 | int intentColumn = cursor.getColumnIndex(INTENT); |
| 14724 | if (titleColumn == -1 || intentColumn == -1) { |
| 14725 | throw new IllegalArgumentException( |
| 14726 | "The cursor must contain the TITLE and INTENT columns."); |
| 14727 | } |
| 14728 | |
| 14729 | String title = cursor.getString(titleColumn); |
| 14730 | if (!TextUtils.isEmpty(title)) { |
| 14731 | return title; |
| 14732 | } |
| 14733 | |
| 14734 | String intentUri = cursor.getString(intentColumn); |
| 14735 | if (TextUtils.isEmpty(intentUri)) { |
| 14736 | return ""; |
| 14737 | } |
| 14738 | |
| 14739 | Intent intent; |
| 14740 | try { |
| 14741 | intent = Intent.parseUri(intentUri, 0); |
| 14742 | } catch (URISyntaxException e) { |
| 14743 | return ""; |
| 14744 | } |
| 14745 | |
| 14746 | PackageManager packageManager = context.getPackageManager(); |
| 14747 | ResolveInfo info = packageManager.resolveActivity(intent, 0); |
| 14748 | return info != null ? info.loadLabel(packageManager) : ""; |
| 14749 | } |
| 14750 | } |
| 14751 | |
| 14752 | /** |
| 14753 | * <p> |
| 14754 | * A Settings panel is floating UI that contains a fixed subset of settings to address a |
| 14755 | * particular user problem. For example, the |
| 14756 | * {@link #ACTION_INTERNET_CONNECTIVITY Internet Panel} surfaces settings related to |
| 14757 | * connecting to the internet. |
| 14758 | * <p> |
| 14759 | * Settings panels appear above the calling app to address the problem without |
| 14760 | * the user needing to open Settings and thus leave their current screen. |
| 14761 | */ |
| 14762 | public static final class Panel { |
| 14763 | private Panel() { |
| 14764 | } |
| 14765 | |
| 14766 | /** |
| 14767 | * Activity Action: Show a settings dialog containing settings to enable internet |
| 14768 | * connection. |
| 14769 | * <p> |
| 14770 | * Input: Nothing. |
| 14771 | * <p> |
| 14772 | * Output: Nothing. |
| 14773 | */ |
| 14774 | @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 14775 | public static final String ACTION_INTERNET_CONNECTIVITY = |
| 14776 | "android.settings.panel.action.INTERNET_CONNECTIVITY"; |
| 14777 | |
| 14778 | /** |
| 14779 | * Activity Action: Show a settings dialog containing NFC-related settings. |
| 14780 | * <p> |
| 14781 | * Input: Nothing. |
| 14782 | * <p> |
| 14783 | * Output: Nothing. |
| 14784 | */ |
| 14785 | @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 14786 | public static final String ACTION_NFC = |
| 14787 | "android.settings.panel.action.NFC"; |
| 14788 | |
| 14789 | /** |
| 14790 | * Activity Action: Show a settings dialog containing controls for Wifi. |
| 14791 | * <p> |
| 14792 | * Input: Nothing. |
| 14793 | * <p> |
| 14794 | * Output: Nothing. |
| 14795 | */ |
| 14796 | @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 14797 | public static final String ACTION_WIFI = |
| 14798 | "android.settings.panel.action.WIFI"; |
| 14799 | |
| 14800 | /** |
| 14801 | * Activity Action: Show a settings dialog containing all volume streams. |
| 14802 | * <p> |
| 14803 | * Input: Nothing. |
| 14804 | * <p> |
| 14805 | * Output: Nothing. |
| 14806 | */ |
| 14807 | @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 14808 | public static final String ACTION_VOLUME = |
| 14809 | "android.settings.panel.action.VOLUME"; |
| 14810 | } |
| 14811 | |
| 14812 | /** |
| 14813 | * Activity Action: Show setting page to process the addition of Wi-Fi networks to the user's |
| 14814 | * saved network list. The app should send a new intent with an extra that holds a maximum |
| 14815 | * of five {@link android.net.wifi.WifiNetworkSuggestion} that specify credentials for the |
| 14816 | * networks to be added to the user's database. The Intent should be sent via the |
| 14817 | * {@link android.app.Activity#startActivityForResult(Intent, int)} API. |
| 14818 | * <p> |
| 14819 | * Note: The app sending the Intent to add the credentials doesn't get any ownership over the |
| 14820 | * newly added network(s). For the Wi-Fi stack, these networks will look like the user |
| 14821 | * manually added them from the Settings UI. |
| 14822 | * <p> |
| 14823 | * Input: The app should put parcelable array list of |
| 14824 | * {@link android.net.wifi.WifiNetworkSuggestion} into the {@link #EXTRA_WIFI_NETWORK_LIST} |
| 14825 | * extra. |
| 14826 | * <p> |
| 14827 | * Output: After {@link android.app.Activity#startActivityForResult(Intent, int)}, the |
| 14828 | * callback {@link android.app.Activity#onActivityResult(int, int, Intent)} will have a |
| 14829 | * result code {@link android.app.Activity#RESULT_OK} to indicate user pressed the save |
| 14830 | * button to save the networks or {@link android.app.Activity#RESULT_CANCELED} to indicate |
| 14831 | * that the user rejected the request. Additionally, an integer array list, stored in |
| 14832 | * {@link #EXTRA_WIFI_NETWORK_RESULT_LIST}, will indicate the process result of each network. |
| 14833 | */ |
| 14834 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 14835 | public static final String ACTION_WIFI_ADD_NETWORKS = |
| 14836 | "android.settings.WIFI_ADD_NETWORKS"; |
| 14837 | |
| 14838 | /** |
| 14839 | * A bundle extra of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that indicates the list |
| 14840 | * of the {@link android.net.wifi.WifiNetworkSuggestion} elements. The maximum count of the |
| 14841 | * {@link android.net.wifi.WifiNetworkSuggestion} elements in the list will be five. |
| 14842 | * <p> |
| 14843 | * For example: |
| 14844 | * To provide credentials for one open and one WPA2 networks: |
| 14845 | * |
| 14846 | * <pre>{@code |
| 14847 | * final WifiNetworkSuggestion suggestion1 = |
| 14848 | * new WifiNetworkSuggestion.Builder() |
| 14849 | * .setSsid("test111111") |
| 14850 | * .build(); |
| 14851 | * final WifiNetworkSuggestion suggestion2 = |
| 14852 | * new WifiNetworkSuggestion.Builder() |
| 14853 | * .setSsid("test222222") |
| 14854 | * .setWpa2Passphrase("test123456") |
| 14855 | * .build(); |
| 14856 | * final List<WifiNetworkSuggestion> suggestionsList = new ArrayList<>; |
| 14857 | * suggestionsList.add(suggestion1); |
| 14858 | * suggestionsList.add(suggestion2); |
| 14859 | * Bundle bundle = new Bundle(); |
| 14860 | * bundle.putParcelableArrayList(Settings.EXTRA_WIFI_NETWORK_LIST,(ArrayList<? extends |
| 14861 | * Parcelable>) suggestionsList); |
| 14862 | * final Intent intent = new Intent(Settings.ACTION_WIFI_ADD_NETWORKS); |
| 14863 | * intent.putExtras(bundle); |
| 14864 | * startActivityForResult(intent, 0); |
| 14865 | * }</pre> |
| 14866 | */ |
| 14867 | public static final String EXTRA_WIFI_NETWORK_LIST = |
| 14868 | "android.provider.extra.WIFI_NETWORK_LIST"; |
| 14869 | |
| 14870 | /** |
| 14871 | * A bundle extra of the result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that |
| 14872 | * indicates the action result of the saved {@link android.net.wifi.WifiNetworkSuggestion}. |
| 14873 | * Its value is a list of integers, and all the elements will be 1:1 mapping to the elements |
| 14874 | * in {@link #EXTRA_WIFI_NETWORK_LIST}, if user press cancel to cancel the add networks |
| 14875 | * request, then its value will be null. |
| 14876 | * <p> |
| 14877 | * Note: The integer value will be one of the {@link #ADD_WIFI_RESULT_SUCCESS}, |
| 14878 | * {@link #ADD_WIFI_RESULT_ADD_OR_UPDATE_FAILED}, or {@link #ADD_WIFI_RESULT_ALREADY_EXISTS}}. |
| 14879 | */ |
| 14880 | public static final String EXTRA_WIFI_NETWORK_RESULT_LIST = |
| 14881 | "android.provider.extra.WIFI_NETWORK_RESULT_LIST"; |
| 14882 | |
| 14883 | /** @hide */ |
| 14884 | @Retention(RetentionPolicy.SOURCE) |
| 14885 | @IntDef(prefix = {"ADD_WIFI_RESULT_"}, value = { |
| 14886 | ADD_WIFI_RESULT_SUCCESS, |
| 14887 | ADD_WIFI_RESULT_ADD_OR_UPDATE_FAILED, |
| 14888 | ADD_WIFI_RESULT_ALREADY_EXISTS |
| 14889 | }) |
| 14890 | public @interface AddWifiResult { |
| 14891 | } |
| 14892 | |
| 14893 | /** |
| 14894 | * A result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that saving or updating the |
| 14895 | * corresponding Wi-Fi network was successful. |
| 14896 | */ |
| 14897 | public static final int ADD_WIFI_RESULT_SUCCESS = 0; |
| 14898 | |
| 14899 | /** |
| 14900 | * A result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that saving the corresponding |
| 14901 | * Wi-Fi network failed. |
| 14902 | */ |
| 14903 | public static final int ADD_WIFI_RESULT_ADD_OR_UPDATE_FAILED = 1; |
| 14904 | |
| 14905 | /** |
| 14906 | * A result of {@link #ACTION_WIFI_ADD_NETWORKS} intent action that indicates the Wi-Fi network |
| 14907 | * already exists. |
| 14908 | */ |
| 14909 | public static final int ADD_WIFI_RESULT_ALREADY_EXISTS = 2; |
| 14910 | |
| 14911 | /** |
| 14912 | * Activity Action: Allows user to select current bug report handler. |
| 14913 | * <p> |
| 14914 | * Input: Nothing. |
| 14915 | * <p> |
| 14916 | * Output: Nothing. |
| 14917 | * |
| 14918 | * @hide |
| 14919 | */ |
| 14920 | @SystemApi |
| 14921 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 14922 | public static final String ACTION_BUGREPORT_HANDLER_SETTINGS = |
| 14923 | "android.settings.BUGREPORT_HANDLER_SETTINGS"; |
| 14924 | |
| 14925 | private static final String[] PM_WRITE_SETTINGS = { |
| 14926 | android.Manifest.permission.WRITE_SETTINGS |
| 14927 | }; |
| 14928 | private static final String[] PM_CHANGE_NETWORK_STATE = { |
| 14929 | android.Manifest.permission.CHANGE_NETWORK_STATE, |
| 14930 | android.Manifest.permission.WRITE_SETTINGS |
| 14931 | }; |
| 14932 | private static final String[] PM_SYSTEM_ALERT_WINDOW = { |
| 14933 | android.Manifest.permission.SYSTEM_ALERT_WINDOW |
| 14934 | }; |
| 14935 | |
| 14936 | /** |
| 14937 | * Activity Action: Show screen for controlling which apps have access to manage external |
| 14938 | * storage. |
| 14939 | * <p> |
| 14940 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 14941 | * <p> |
| 14942 | * If you want to control a specific app's access to manage external storage, use |
| 14943 | * {@link #ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION} instead. |
| 14944 | * <p> |
| 14945 | * Output: Nothing. |
| 14946 | * @see #ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION |
| 14947 | */ |
| 14948 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 14949 | public static final String ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION = |
| 14950 | "android.settings.MANAGE_ALL_FILES_ACCESS_PERMISSION"; |
| 14951 | |
| 14952 | /** |
| 14953 | * Activity Action: Show screen for controlling if the app specified in the data URI of the |
| 14954 | * intent can manage external storage. |
| 14955 | * <p> |
| 14956 | * Launching the corresponding activity requires the permission |
| 14957 | * {@link Manifest.permission#MANAGE_EXTERNAL_STORAGE}. |
| 14958 | * <p> |
| 14959 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 14960 | * <p> |
| 14961 | * Input: The Intent's data URI MUST specify the application package name whose ability of |
| 14962 | * managing external storage you want to control. |
| 14963 | * For example "package:com.my.app". |
| 14964 | * <p> |
| 14965 | * Output: Nothing. |
| 14966 | * @see #ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION |
| 14967 | */ |
| 14968 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 14969 | public static final String ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION = |
| 14970 | "android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION"; |
| 14971 | |
| 14972 | /** |
| 14973 | * Performs a strict and comprehensive check of whether a calling package is allowed to |
| 14974 | * write/modify system settings, as the condition differs for pre-M, M+, and |
| 14975 | * privileged/preinstalled apps. If the provided uid does not match the |
| 14976 | * callingPackage, a negative result will be returned. |
| 14977 | * @hide |
| 14978 | */ |
| 14979 | @UnsupportedAppUsage |
| 14980 | public static boolean isCallingPackageAllowedToWriteSettings(Context context, int uid, |
| 14981 | String callingPackage, boolean throwException) { |
| 14982 | return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, |
| 14983 | callingPackage, throwException, AppOpsManager.OP_WRITE_SETTINGS, |
| 14984 | PM_WRITE_SETTINGS, false); |
| 14985 | } |
| 14986 | |
| 14987 | /** |
| 14988 | * Performs a strict and comprehensive check of whether a calling package is allowed to |
| 14989 | * write/modify system settings, as the condition differs for pre-M, M+, and |
| 14990 | * privileged/preinstalled apps. If the provided uid does not match the |
| 14991 | * callingPackage, a negative result will be returned. The caller is expected to have |
| 14992 | * the WRITE_SETTINGS permission declared. |
| 14993 | * |
| 14994 | * Note: if the check is successful, the operation of this app will be updated to the |
| 14995 | * current time. |
| 14996 | * @hide |
| 14997 | */ |
| 14998 | @SystemApi |
| 14999 | public static boolean checkAndNoteWriteSettingsOperation(@NonNull Context context, int uid, |
| 15000 | @NonNull String callingPackage, boolean throwException) { |
| 15001 | return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, |
| 15002 | callingPackage, throwException, AppOpsManager.OP_WRITE_SETTINGS, |
| 15003 | PM_WRITE_SETTINGS, true); |
| 15004 | } |
| 15005 | |
| 15006 | /** |
| 15007 | * Performs a strict and comprehensive check of whether a calling package is allowed to |
| 15008 | * change the state of network, as the condition differs for pre-M, M+, and |
| 15009 | * privileged/preinstalled apps. The caller is expected to have either the |
| 15010 | * CHANGE_NETWORK_STATE or the WRITE_SETTINGS permission declared. Either of these |
| 15011 | * permissions allow changing network state; WRITE_SETTINGS is a runtime permission and |
| 15012 | * can be revoked, but (except in M, excluding M MRs), CHANGE_NETWORK_STATE is a normal |
| 15013 | * permission and cannot be revoked. See http://b/23597341 |
| 15014 | * |
| 15015 | * Note: if the check succeeds because the application holds WRITE_SETTINGS, the operation |
| 15016 | * of this app will be updated to the current time. |
| 15017 | * @hide |
| 15018 | */ |
| 15019 | public static boolean checkAndNoteChangeNetworkStateOperation(Context context, int uid, |
| 15020 | String callingPackage, boolean throwException) { |
| 15021 | if (context.checkCallingOrSelfPermission(android.Manifest.permission.CHANGE_NETWORK_STATE) |
| 15022 | == PackageManager.PERMISSION_GRANTED) { |
| 15023 | return true; |
| 15024 | } |
| 15025 | return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, |
| 15026 | callingPackage, throwException, AppOpsManager.OP_WRITE_SETTINGS, |
| 15027 | PM_CHANGE_NETWORK_STATE, true); |
| 15028 | } |
| 15029 | |
| 15030 | /** |
| 15031 | * Performs a strict and comprehensive check of whether a calling package is allowed to |
| 15032 | * draw on top of other apps, as the conditions differs for pre-M, M+, and |
| 15033 | * privileged/preinstalled apps. If the provided uid does not match the callingPackage, |
| 15034 | * a negative result will be returned. |
| 15035 | * @hide |
| 15036 | */ |
| 15037 | @UnsupportedAppUsage |
| 15038 | public static boolean isCallingPackageAllowedToDrawOverlays(Context context, int uid, |
| 15039 | String callingPackage, boolean throwException) { |
| 15040 | return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, |
| 15041 | callingPackage, throwException, AppOpsManager.OP_SYSTEM_ALERT_WINDOW, |
| 15042 | PM_SYSTEM_ALERT_WINDOW, false); |
| 15043 | } |
| 15044 | |
| 15045 | /** |
| 15046 | * Performs a strict and comprehensive check of whether a calling package is allowed to |
| 15047 | * draw on top of other apps, as the conditions differs for pre-M, M+, and |
| 15048 | * privileged/preinstalled apps. If the provided uid does not match the callingPackage, |
| 15049 | * a negative result will be returned. |
| 15050 | * |
| 15051 | * Note: if the check is successful, the operation of this app will be updated to the |
| 15052 | * current time. |
| 15053 | * @hide |
| 15054 | */ |
| 15055 | public static boolean checkAndNoteDrawOverlaysOperation(Context context, int uid, String |
| 15056 | callingPackage, boolean throwException) { |
| 15057 | return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, |
| 15058 | callingPackage, throwException, AppOpsManager.OP_SYSTEM_ALERT_WINDOW, |
| 15059 | PM_SYSTEM_ALERT_WINDOW, true); |
| 15060 | } |
| 15061 | |
| 15062 | /** |
| 15063 | * Helper method to perform a general and comprehensive check of whether an operation that is |
| 15064 | * protected by appops can be performed by a caller or not. e.g. OP_SYSTEM_ALERT_WINDOW and |
| 15065 | * OP_WRITE_SETTINGS |
| 15066 | * @hide |
| 15067 | */ |
| 15068 | @UnsupportedAppUsage |
| 15069 | public static boolean isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context, |
| 15070 | int uid, String callingPackage, boolean throwException, int appOpsOpCode, String[] |
| 15071 | permissions, boolean makeNote) { |
| 15072 | if (callingPackage == null) { |
| 15073 | return false; |
| 15074 | } |
| 15075 | |
| 15076 | AppOpsManager appOpsMgr = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE); |
| 15077 | int mode = AppOpsManager.MODE_DEFAULT; |
| 15078 | if (makeNote) { |
| 15079 | mode = appOpsMgr.noteOpNoThrow(appOpsOpCode, uid, callingPackage); |
| 15080 | } else { |
| 15081 | mode = appOpsMgr.checkOpNoThrow(appOpsOpCode, uid, callingPackage); |
| 15082 | } |
| 15083 | |
| 15084 | switch (mode) { |
| 15085 | case AppOpsManager.MODE_ALLOWED: |
| 15086 | return true; |
| 15087 | |
| 15088 | case AppOpsManager.MODE_DEFAULT: |
| 15089 | // this is the default operating mode after an app's installation |
| 15090 | // In this case we will check all associated static permission to see |
| 15091 | // if it is granted during install time. |
| 15092 | for (String permission : permissions) { |
| 15093 | if (context.checkCallingOrSelfPermission(permission) == PackageManager |
| 15094 | .PERMISSION_GRANTED) { |
| 15095 | // if either of the permissions are granted, we will allow it |
| 15096 | return true; |
| 15097 | } |
| 15098 | } |
| 15099 | |
| 15100 | default: |
| 15101 | // this is for all other cases trickled down here... |
| 15102 | if (!throwException) { |
| 15103 | return false; |
| 15104 | } |
| 15105 | } |
| 15106 | |
| 15107 | // prepare string to throw SecurityException |
| 15108 | StringBuilder exceptionMessage = new StringBuilder(); |
| 15109 | exceptionMessage.append(callingPackage); |
| 15110 | exceptionMessage.append(" was not granted "); |
| 15111 | if (permissions.length > 1) { |
| 15112 | exceptionMessage.append(" either of these permissions: "); |
| 15113 | } else { |
| 15114 | exceptionMessage.append(" this permission: "); |
| 15115 | } |
| 15116 | for (int i = 0; i < permissions.length; i++) { |
| 15117 | exceptionMessage.append(permissions[i]); |
| 15118 | exceptionMessage.append((i == permissions.length - 1) ? "." : ", "); |
| 15119 | } |
| 15120 | |
| 15121 | throw new SecurityException(exceptionMessage.toString()); |
| 15122 | } |
| 15123 | |
| 15124 | /** |
| 15125 | * Retrieves a correponding package name for a given uid. It will query all |
| 15126 | * packages that are associated with the given uid, but it will return only |
| 15127 | * the zeroth result. |
| 15128 | * Note: If package could not be found, a null is returned. |
| 15129 | * @hide |
| 15130 | */ |
| 15131 | public static String getPackageNameForUid(Context context, int uid) { |
| 15132 | String[] packages = context.getPackageManager().getPackagesForUid(uid); |
| 15133 | if (packages == null) { |
| 15134 | return null; |
| 15135 | } |
| 15136 | return packages[0]; |
| 15137 | } |
| 15138 | } |