The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2006 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.provider; |
| 18 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 19 | import android.annotation.SdkConstant; |
| 20 | import android.annotation.SdkConstant.SdkConstantType; |
Bryce Lee | cdfebd6 | 2015-02-02 08:19:11 -0800 | [diff] [blame] | 21 | import android.annotation.SystemApi; |
Jeff Sharkey | a73b8fd | 2016-01-06 17:02:08 -0700 | [diff] [blame] | 22 | import android.annotation.TestApi; |
Adrian Roos | 7811d9f | 2015-07-27 15:10:13 -0700 | [diff] [blame] | 23 | import android.app.ActivityThread; |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 24 | import android.app.AppOpsManager; |
Adrian Roos | 7811d9f | 2015-07-27 15:10:13 -0700 | [diff] [blame] | 25 | import android.app.Application; |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 26 | import android.app.SearchManager; |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 27 | import android.app.WallpaperManager; |
Mike LeBeau | 5d34e9b | 2010-02-10 19:34:56 -0800 | [diff] [blame] | 28 | import android.content.ComponentName; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 29 | import android.content.ContentResolver; |
| 30 | import android.content.ContentValues; |
| 31 | import android.content.Context; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 32 | import android.content.IContentProvider; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 33 | import android.content.Intent; |
Dianne Hackborn | b8b11a0 | 2010-03-10 15:53:11 -0800 | [diff] [blame] | 34 | import android.content.pm.ActivityInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 35 | import android.content.pm.PackageManager; |
| 36 | import android.content.pm.ResolveInfo; |
| 37 | import android.content.res.Configuration; |
| 38 | import android.content.res.Resources; |
| 39 | import android.database.Cursor; |
| 40 | import android.database.SQLException; |
David Christie | 3f7b652 | 2013-08-06 19:19:08 -0700 | [diff] [blame] | 41 | import android.location.LocationManager; |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 42 | import android.net.ConnectivityManager; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 43 | import android.net.Uri; |
Irfan Sheriff | 36f7413 | 2010-11-04 16:57:37 -0700 | [diff] [blame] | 44 | import android.net.wifi.WifiManager; |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 45 | import android.os.BatteryManager; |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 46 | import android.os.Binder; |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 47 | import android.os.Bundle; |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 48 | import android.os.DropBoxManager; |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 49 | import android.os.IBinder; |
Amith Yamasani | 7ab8c4a | 2012-04-06 09:27:12 -0700 | [diff] [blame] | 50 | import android.os.Process; |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 51 | import android.os.RemoteException; |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 52 | import android.os.ServiceManager; |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 53 | import android.os.SystemProperties; |
Dianne Hackborn | f02b60a | 2012-08-16 10:48:27 -0700 | [diff] [blame] | 54 | import android.os.UserHandle; |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 55 | import android.os.Build.VERSION_CODES; |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 56 | import android.speech.tts.TextToSpeech; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 57 | import android.text.TextUtils; |
| 58 | import android.util.AndroidException; |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 59 | import android.util.ArrayMap; |
| 60 | import android.util.ArraySet; |
Seigo Nonaka | bd5cbdd | 2016-01-25 19:40:28 +0900 | [diff] [blame] | 61 | import android.util.LocaleList; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 62 | import android.util.Log; |
| 63 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 64 | import com.android.internal.util.ArrayUtils; |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 65 | import com.android.internal.widget.ILockSettings; |
| 66 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 67 | import java.net.URISyntaxException; |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 68 | import java.text.SimpleDateFormat; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 69 | import java.util.HashMap; |
| 70 | import java.util.HashSet; |
Elliott Hughes | cb64d43 | 2013-08-02 10:00:44 -0700 | [diff] [blame] | 71 | import java.util.Locale; |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 72 | import java.util.Map; |
| 73 | import java.util.Set; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 74 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 75 | /** |
| 76 | * The Settings provider contains global system-level device preferences. |
| 77 | */ |
| 78 | public final class Settings { |
| 79 | |
| 80 | // Intent actions for Settings |
| 81 | |
| 82 | /** |
| 83 | * Activity Action: Show system settings. |
| 84 | * <p> |
| 85 | * Input: Nothing. |
| 86 | * <p> |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 87 | * Output: Nothing. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 88 | */ |
| 89 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 90 | public static final String ACTION_SETTINGS = "android.settings.SETTINGS"; |
| 91 | |
| 92 | /** |
| 93 | * Activity Action: Show settings to allow configuration of APNs. |
| 94 | * <p> |
| 95 | * Input: Nothing. |
| 96 | * <p> |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 97 | * Output: Nothing. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 98 | */ |
| 99 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 100 | public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS"; |
| 101 | |
| 102 | /** |
| 103 | * Activity Action: Show settings to allow configuration of current location |
| 104 | * sources. |
| 105 | * <p> |
| 106 | * In some cases, a matching Activity may not exist, so ensure you |
| 107 | * safeguard against this. |
| 108 | * <p> |
| 109 | * Input: Nothing. |
| 110 | * <p> |
| 111 | * Output: Nothing. |
| 112 | */ |
| 113 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 114 | public static final String ACTION_LOCATION_SOURCE_SETTINGS = |
| 115 | "android.settings.LOCATION_SOURCE_SETTINGS"; |
| 116 | |
| 117 | /** |
Jason Monk | 76c67aa | 2016-02-19 14:49:42 -0500 | [diff] [blame] | 118 | * Activity Action: Show settings to allow configuration of users. |
| 119 | * <p> |
| 120 | * In some cases, a matching Activity may not exist, so ensure you |
| 121 | * safeguard against this. |
| 122 | * <p> |
| 123 | * Input: Nothing. |
| 124 | * <p> |
| 125 | * Output: Nothing. |
| 126 | * @hide |
| 127 | */ |
| 128 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 129 | public static final String ACTION_USER_SETTINGS = |
| 130 | "android.settings.USER_SETTINGS"; |
| 131 | |
| 132 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 133 | * Activity Action: Show settings to allow configuration of wireless controls |
| 134 | * such as Wi-Fi, Bluetooth and Mobile networks. |
| 135 | * <p> |
| 136 | * In some cases, a matching Activity may not exist, so ensure you |
| 137 | * safeguard against this. |
| 138 | * <p> |
| 139 | * Input: Nothing. |
| 140 | * <p> |
| 141 | * Output: Nothing. |
| 142 | */ |
| 143 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 144 | public static final String ACTION_WIRELESS_SETTINGS = |
| 145 | "android.settings.WIRELESS_SETTINGS"; |
| 146 | |
| 147 | /** |
Jeremy Klein | 15f3d21 | 2016-01-24 17:01:09 -0800 | [diff] [blame] | 148 | * Activity Action: Show tether provisioning activity. |
| 149 | * |
| 150 | * <p> |
| 151 | * In some cases, a matching Activity may not exist, so ensure you |
| 152 | * safeguard against this. |
| 153 | * <p> |
| 154 | * Input: {@link ConnectivityManager.EXTRA_TETHER_TYPE} should be included to specify which type |
| 155 | * of tethering should be checked. {@link ConnectivityManager.EXTRA_PROVISION_CALLBACK} should |
| 156 | * contain a {@link ResultReceiver} which will be called back with a tether result code. |
| 157 | * <p> |
| 158 | * Output: The result of the provisioning check. |
| 159 | * {@link ConnectivityManager.TETHER_ERROR_NO_ERROR} if successful, |
| 160 | * {@link ConnectivityManager.TETHER_ERROR_PROVISION_FAILED} for failure. |
| 161 | * |
| 162 | * @hide |
| 163 | */ |
| 164 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 165 | public static final String ACTION_TETHER_PROVISIONING = |
| 166 | "android.settings.TETHER_PROVISIONING_UI"; |
| 167 | |
| 168 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 169 | * Activity Action: Show settings to allow entering/exiting airplane mode. |
| 170 | * <p> |
| 171 | * In some cases, a matching Activity may not exist, so ensure you |
| 172 | * safeguard against this. |
| 173 | * <p> |
| 174 | * Input: Nothing. |
| 175 | * <p> |
| 176 | * Output: Nothing. |
| 177 | */ |
| 178 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 179 | public static final String ACTION_AIRPLANE_MODE_SETTINGS = |
| 180 | "android.settings.AIRPLANE_MODE_SETTINGS"; |
| 181 | |
| 182 | /** |
Barnaby James | b3006d3 | 2015-04-02 17:49:54 -0700 | [diff] [blame] | 183 | * Activity Action: Modify Airplane mode settings using a voice command. |
Barnaby James | 48f3552 | 2014-07-16 14:27:39 -0700 | [diff] [blame] | 184 | * <p> |
| 185 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 186 | * <p> |
| 187 | * This intent MUST be started using |
| 188 | * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity |
| 189 | * startVoiceActivity}. |
| 190 | * <p> |
Barnaby James | b3006d3 | 2015-04-02 17:49:54 -0700 | [diff] [blame] | 191 | * Note: The activity implementing this intent MUST verify that |
Barnaby James | 48f3552 | 2014-07-16 14:27:39 -0700 | [diff] [blame] | 192 | * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before |
| 193 | * modifying the setting. |
| 194 | * <p> |
Barnaby James | b3006d3 | 2015-04-02 17:49:54 -0700 | [diff] [blame] | 195 | * Input: To tell which state airplane mode should be set to, add the |
| 196 | * {@link #EXTRA_AIRPLANE_MODE_ENABLED} extra to this Intent with the state specified. |
| 197 | * If the extra is not included, no changes will be made. |
Barnaby James | 48f3552 | 2014-07-16 14:27:39 -0700 | [diff] [blame] | 198 | * <p> |
| 199 | * Output: Nothing. |
| 200 | */ |
| 201 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 202 | public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE = |
| 203 | "android.settings.VOICE_CONTROL_AIRPLANE_MODE"; |
| 204 | |
| 205 | /** |
Dianne Hackborn | dd9b82c | 2009-09-03 00:18:47 -0700 | [diff] [blame] | 206 | * Activity Action: Show settings for accessibility modules. |
| 207 | * <p> |
| 208 | * In some cases, a matching Activity may not exist, so ensure you |
| 209 | * safeguard against this. |
| 210 | * <p> |
| 211 | * Input: Nothing. |
| 212 | * <p> |
| 213 | * Output: Nothing. |
| 214 | */ |
| 215 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 216 | public static final String ACTION_ACCESSIBILITY_SETTINGS = |
| 217 | "android.settings.ACCESSIBILITY_SETTINGS"; |
| 218 | |
| 219 | /** |
Dianne Hackborn | a3fb40d | 2014-08-12 15:06:50 -0700 | [diff] [blame] | 220 | * Activity Action: Show settings to control access to usage information. |
| 221 | * <p> |
| 222 | * In some cases, a matching Activity may not exist, so ensure you |
| 223 | * safeguard against this. |
| 224 | * <p> |
| 225 | * Input: Nothing. |
| 226 | * <p> |
| 227 | * Output: Nothing. |
| 228 | */ |
| 229 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 230 | public static final String ACTION_USAGE_ACCESS_SETTINGS = |
| 231 | "android.settings.USAGE_ACCESS_SETTINGS"; |
| 232 | |
| 233 | /** |
Jason Monk | 6f90978 | 2015-04-17 14:30:25 -0400 | [diff] [blame] | 234 | * Activity Category: Show application settings related to usage access. |
| 235 | * <p> |
| 236 | * An activity that provides a user interface for adjusting usage access related |
| 237 | * preferences for its containing application. Optional but recommended for apps that |
| 238 | * use {@link android.Manifest.permission#PACKAGE_USAGE_STATS}. |
| 239 | * <p> |
| 240 | * The activity may define meta-data to describe what usage access is |
| 241 | * used for within their app with {@link #METADATA_USAGE_ACCESS_REASON}, which |
| 242 | * will be displayed in Settings. |
| 243 | * <p> |
| 244 | * Input: Nothing. |
| 245 | * <p> |
| 246 | * Output: Nothing. |
| 247 | */ |
| 248 | @SdkConstant(SdkConstantType.INTENT_CATEGORY) |
| 249 | public static final String INTENT_CATEGORY_USAGE_ACCESS_CONFIG = |
| 250 | "android.intent.category.USAGE_ACCESS_CONFIG"; |
| 251 | |
| 252 | /** |
| 253 | * Metadata key: Reason for needing usage access. |
| 254 | * <p> |
| 255 | * A key for metadata attached to an activity that receives action |
| 256 | * {@link #INTENT_CATEGORY_USAGE_ACCESS_CONFIG}, shown to the |
| 257 | * user as description of how the app uses usage access. |
| 258 | * <p> |
| 259 | */ |
| 260 | public static final String METADATA_USAGE_ACCESS_REASON = |
| 261 | "android.settings.metadata.USAGE_ACCESS_REASON"; |
| 262 | |
| 263 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 264 | * Activity Action: Show settings to allow configuration of security and |
| 265 | * location privacy. |
| 266 | * <p> |
| 267 | * In some cases, a matching Activity may not exist, so ensure you |
| 268 | * safeguard against this. |
| 269 | * <p> |
| 270 | * Input: Nothing. |
| 271 | * <p> |
| 272 | * Output: Nothing. |
| 273 | */ |
| 274 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 275 | public static final String ACTION_SECURITY_SETTINGS = |
| 276 | "android.settings.SECURITY_SETTINGS"; |
| 277 | |
| 278 | /** |
Maggie Benthall | 0469f41 | 2013-09-05 15:30:26 -0400 | [diff] [blame] | 279 | * Activity Action: Show trusted credentials settings, opening to the user tab, |
| 280 | * to allow management of installed credentials. |
| 281 | * <p> |
| 282 | * In some cases, a matching Activity may not exist, so ensure you |
| 283 | * safeguard against this. |
| 284 | * <p> |
| 285 | * Input: Nothing. |
| 286 | * <p> |
| 287 | * Output: Nothing. |
| 288 | * @hide |
| 289 | */ |
| 290 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 291 | public static final String ACTION_TRUSTED_CREDENTIALS_USER = |
| 292 | "com.android.settings.TRUSTED_CREDENTIALS_USER"; |
| 293 | |
| 294 | /** |
| 295 | * Activity Action: Show dialog explaining that an installed CA cert may enable |
| 296 | * monitoring of encrypted network traffic. |
| 297 | * <p> |
| 298 | * In some cases, a matching Activity may not exist, so ensure you |
Victor Chang | 355d476 | 2016-04-07 21:23:15 +0100 | [diff] [blame] | 299 | * safeguard against this. Add {@link #EXTRA_NUMBER_OF_CERTIFICATES} extra to indicate the |
| 300 | * number of certificates. |
Maggie Benthall | 0469f41 | 2013-09-05 15:30:26 -0400 | [diff] [blame] | 301 | * <p> |
| 302 | * Input: Nothing. |
| 303 | * <p> |
| 304 | * Output: Nothing. |
| 305 | * @hide |
| 306 | */ |
| 307 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 308 | public static final String ACTION_MONITORING_CERT_INFO = |
| 309 | "com.android.settings.MONITORING_CERT_INFO"; |
| 310 | |
| 311 | /** |
Amith Yamasani | c15255a | 2009-09-23 15:33:19 -0700 | [diff] [blame] | 312 | * Activity Action: Show settings to allow configuration of privacy options. |
| 313 | * <p> |
| 314 | * In some cases, a matching Activity may not exist, so ensure you |
| 315 | * safeguard against this. |
| 316 | * <p> |
| 317 | * Input: Nothing. |
| 318 | * <p> |
| 319 | * Output: Nothing. |
| 320 | */ |
| 321 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 322 | public static final String ACTION_PRIVACY_SETTINGS = |
| 323 | "android.settings.PRIVACY_SETTINGS"; |
| 324 | |
| 325 | /** |
Robin Lee | a249aee | 2016-02-03 13:42:56 +0000 | [diff] [blame] | 326 | * Activity Action: Show settings to allow configuration of VPN. |
| 327 | * <p> |
| 328 | * In some cases, a matching Activity may not exist, so ensure you |
| 329 | * safeguard against this. |
| 330 | * <p> |
| 331 | * Input: Nothing. |
| 332 | * <p> |
| 333 | * Output: Nothing. |
| 334 | */ |
| 335 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 336 | public static final String ACTION_VPN_SETTINGS = |
| 337 | "android.settings.VPN_SETTINGS"; |
| 338 | |
| 339 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 340 | * Activity Action: Show settings to allow configuration of Wi-Fi. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 341 | * <p> |
| 342 | * In some cases, a matching Activity may not exist, so ensure you |
| 343 | * safeguard against this. |
| 344 | * <p> |
| 345 | * Input: Nothing. |
| 346 | * <p> |
| 347 | * Output: Nothing. |
| 348 | |
| 349 | */ |
| 350 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 351 | public static final String ACTION_WIFI_SETTINGS = |
| 352 | "android.settings.WIFI_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 353 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 354 | /** |
| 355 | * Activity Action: Show settings to allow configuration of a static IP |
| 356 | * address for Wi-Fi. |
| 357 | * <p> |
| 358 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 359 | * against this. |
| 360 | * <p> |
| 361 | * Input: Nothing. |
| 362 | * <p> |
| 363 | * Output: Nothing. |
| 364 | */ |
| 365 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 366 | public static final String ACTION_WIFI_IP_SETTINGS = |
| 367 | "android.settings.WIFI_IP_SETTINGS"; |
| 368 | |
| 369 | /** |
| 370 | * Activity Action: Show settings to allow configuration of Bluetooth. |
| 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_BLUETOOTH_SETTINGS = |
| 381 | "android.settings.BLUETOOTH_SETTINGS"; |
| 382 | |
| 383 | /** |
Jeff Brown | c05c1ae | 2015-05-05 13:46:30 -0700 | [diff] [blame] | 384 | * Activity Action: Show settings to allow configuration of cast endpoints. |
Jeff Brown | 1a937b0 | 2014-07-01 22:13:04 -0700 | [diff] [blame] | 385 | * <p> |
| 386 | * In some cases, a matching Activity may not exist, so ensure you |
| 387 | * safeguard against this. |
| 388 | * <p> |
| 389 | * Input: Nothing. |
| 390 | * <p> |
| 391 | * Output: Nothing. |
| 392 | */ |
| 393 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 394 | public static final String ACTION_CAST_SETTINGS = |
| 395 | "android.settings.CAST_SETTINGS"; |
| 396 | |
| 397 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 398 | * Activity Action: Show settings to allow configuration of date and time. |
| 399 | * <p> |
| 400 | * In some cases, a matching Activity may not exist, so ensure you |
| 401 | * safeguard against this. |
| 402 | * <p> |
| 403 | * Input: Nothing. |
| 404 | * <p> |
| 405 | * Output: Nothing. |
| 406 | */ |
| 407 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 408 | public static final String ACTION_DATE_SETTINGS = |
| 409 | "android.settings.DATE_SETTINGS"; |
| 410 | |
| 411 | /** |
| 412 | * Activity Action: Show settings to allow configuration of sound and volume. |
| 413 | * <p> |
| 414 | * In some cases, a matching Activity may not exist, so ensure you |
| 415 | * safeguard against this. |
| 416 | * <p> |
| 417 | * Input: Nothing. |
| 418 | * <p> |
| 419 | * Output: Nothing. |
| 420 | */ |
| 421 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 422 | public static final String ACTION_SOUND_SETTINGS = |
| 423 | "android.settings.SOUND_SETTINGS"; |
| 424 | |
| 425 | /** |
| 426 | * Activity Action: Show settings to allow configuration of display. |
| 427 | * <p> |
| 428 | * In some cases, a matching Activity may not exist, so ensure you |
| 429 | * safeguard against this. |
| 430 | * <p> |
| 431 | * Input: Nothing. |
| 432 | * <p> |
| 433 | * Output: Nothing. |
| 434 | */ |
| 435 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 436 | public static final String ACTION_DISPLAY_SETTINGS = |
| 437 | "android.settings.DISPLAY_SETTINGS"; |
| 438 | |
| 439 | /** |
| 440 | * Activity Action: Show settings to allow configuration of locale. |
| 441 | * <p> |
| 442 | * In some cases, a matching Activity may not exist, so ensure you |
| 443 | * safeguard against this. |
| 444 | * <p> |
| 445 | * Input: Nothing. |
| 446 | * <p> |
| 447 | * Output: Nothing. |
| 448 | */ |
| 449 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 450 | public static final String ACTION_LOCALE_SETTINGS = |
| 451 | "android.settings.LOCALE_SETTINGS"; |
| 452 | |
| 453 | /** |
| 454 | * Activity Action: Show settings to configure input methods, in particular |
| 455 | * allowing the user to enable input methods. |
| 456 | * <p> |
| 457 | * In some cases, a matching Activity may not exist, so ensure you |
| 458 | * safeguard against this. |
| 459 | * <p> |
| 460 | * Input: Nothing. |
| 461 | * <p> |
| 462 | * Output: Nothing. |
| 463 | */ |
| 464 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
Dianne Hackborn | a3fb40d | 2014-08-12 15:06:50 -0700 | [diff] [blame] | 465 | public static final String ACTION_VOICE_INPUT_SETTINGS = |
| 466 | "android.settings.VOICE_INPUT_SETTINGS"; |
| 467 | |
| 468 | /** |
| 469 | * Activity Action: Show settings to configure input methods, in particular |
| 470 | * allowing the user to enable input methods. |
| 471 | * <p> |
| 472 | * In some cases, a matching Activity may not exist, so ensure you |
| 473 | * safeguard against this. |
| 474 | * <p> |
| 475 | * Input: Nothing. |
| 476 | * <p> |
| 477 | * Output: Nothing. |
| 478 | */ |
| 479 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 480 | public static final String ACTION_INPUT_METHOD_SETTINGS = |
| 481 | "android.settings.INPUT_METHOD_SETTINGS"; |
| 482 | |
| 483 | /** |
Tadashi G. Takaoka | f49688f | 2011-01-20 17:56:13 +0900 | [diff] [blame] | 484 | * Activity Action: Show settings to enable/disable input method subtypes. |
satok | 86417ea | 2010-10-27 14:11:03 +0900 | [diff] [blame] | 485 | * <p> |
| 486 | * In some cases, a matching Activity may not exist, so ensure you |
| 487 | * safeguard against this. |
| 488 | * <p> |
Tadashi G. Takaoka | 2548020 | 2011-01-20 23:13:02 +0900 | [diff] [blame] | 489 | * To tell which input method's subtypes are displayed in the settings, add |
| 490 | * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id. |
| 491 | * If there is no extra in this Intent, subtypes from all installed input methods |
| 492 | * will be displayed in the settings. |
| 493 | * |
| 494 | * @see android.view.inputmethod.InputMethodInfo#getId |
| 495 | * <p> |
satok | 86417ea | 2010-10-27 14:11:03 +0900 | [diff] [blame] | 496 | * Input: Nothing. |
| 497 | * <p> |
| 498 | * Output: Nothing. |
| 499 | */ |
| 500 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
Tadashi G. Takaoka | f49688f | 2011-01-20 17:56:13 +0900 | [diff] [blame] | 501 | public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS = |
| 502 | "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS"; |
satok | 86417ea | 2010-10-27 14:11:03 +0900 | [diff] [blame] | 503 | |
| 504 | /** |
satok | 7cfc0ed | 2011-06-20 21:29:36 +0900 | [diff] [blame] | 505 | * Activity Action: Show a dialog to select input method. |
| 506 | * <p> |
| 507 | * In some cases, a matching Activity may not exist, so ensure you |
| 508 | * safeguard against this. |
| 509 | * <p> |
| 510 | * Input: Nothing. |
| 511 | * <p> |
| 512 | * Output: Nothing. |
| 513 | * @hide |
| 514 | */ |
| 515 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 516 | public static final String ACTION_SHOW_INPUT_METHOD_PICKER = |
| 517 | "android.settings.SHOW_INPUT_METHOD_PICKER"; |
| 518 | |
| 519 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 520 | * Activity Action: Show settings to manage the user input dictionary. |
| 521 | * <p> |
Chet Haase | e8222dd | 2013-09-05 07:44:18 -0700 | [diff] [blame] | 522 | * Starting with {@link android.os.Build.VERSION_CODES#KITKAT}, |
Satoshi Kataoka | 2aa2bc5 | 2013-07-30 14:25:11 +0900 | [diff] [blame] | 523 | * it is guaranteed there will always be an appropriate implementation for this Intent action. |
| 524 | * In prior releases of the platform this was optional, so ensure you safeguard against it. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 525 | * <p> |
| 526 | * Input: Nothing. |
| 527 | * <p> |
| 528 | * Output: Nothing. |
| 529 | */ |
| 530 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 531 | public static final String ACTION_USER_DICTIONARY_SETTINGS = |
| 532 | "android.settings.USER_DICTIONARY_SETTINGS"; |
| 533 | |
| 534 | /** |
Abodunrinwa Toki | 0717714 | 2016-03-22 16:25:48 +0000 | [diff] [blame] | 535 | * Activity Action: Show settings to configure the hardware keyboard. |
Yohei Yukawa | d8701bf | 2016-01-27 16:15:01 -0800 | [diff] [blame] | 536 | * <p> |
| 537 | * In some cases, a matching Activity may not exist, so ensure you |
| 538 | * safeguard against this. |
| 539 | * <p> |
Yohei Yukawa | d8701bf | 2016-01-27 16:15:01 -0800 | [diff] [blame] | 540 | * Input: Nothing. |
| 541 | * <p> |
| 542 | * Output: Nothing. |
| 543 | */ |
| 544 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
Abodunrinwa Toki | 0717714 | 2016-03-22 16:25:48 +0000 | [diff] [blame] | 545 | public static final String ACTION_HARD_KEYBOARD_SETTINGS = |
| 546 | "android.settings.HARD_KEYBOARD_SETTINGS"; |
Yohei Yukawa | d8701bf | 2016-01-27 16:15:01 -0800 | [diff] [blame] | 547 | |
| 548 | /** |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 549 | * Activity Action: Adds a word to the user dictionary. |
| 550 | * <p> |
| 551 | * In some cases, a matching Activity may not exist, so ensure you |
| 552 | * safeguard against this. |
| 553 | * <p> |
| 554 | * Input: An extra with key <code>word</code> that contains the word |
| 555 | * that should be added to the dictionary. |
| 556 | * <p> |
| 557 | * Output: Nothing. |
| 558 | * |
| 559 | * @hide |
| 560 | */ |
| 561 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 562 | public static final String ACTION_USER_DICTIONARY_INSERT = |
| 563 | "com.android.settings.USER_DICTIONARY_INSERT"; |
| 564 | |
| 565 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 566 | * Activity Action: Show settings to allow configuration of application-related settings. |
| 567 | * <p> |
| 568 | * In some cases, a matching Activity may not exist, so ensure you |
| 569 | * safeguard against this. |
| 570 | * <p> |
| 571 | * Input: Nothing. |
| 572 | * <p> |
| 573 | * Output: Nothing. |
| 574 | */ |
| 575 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 576 | public static final String ACTION_APPLICATION_SETTINGS = |
| 577 | "android.settings.APPLICATION_SETTINGS"; |
| 578 | |
| 579 | /** |
| 580 | * Activity Action: Show settings to allow configuration of application |
Dianne Hackborn | 8d866e5 | 2012-10-10 18:39:45 -0700 | [diff] [blame] | 581 | * development-related settings. As of |
| 582 | * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is |
| 583 | * a required part of the platform. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 584 | * <p> |
| 585 | * Input: Nothing. |
| 586 | * <p> |
| 587 | * Output: Nothing. |
| 588 | */ |
| 589 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 590 | public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS = |
| 591 | "android.settings.APPLICATION_DEVELOPMENT_SETTINGS"; |
| 592 | |
| 593 | /** |
| 594 | * Activity Action: Show settings to allow configuration of quick launch shortcuts. |
| 595 | * <p> |
| 596 | * In some cases, a matching Activity may not exist, so ensure you |
| 597 | * safeguard against this. |
| 598 | * <p> |
| 599 | * Input: Nothing. |
| 600 | * <p> |
| 601 | * Output: Nothing. |
| 602 | */ |
| 603 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 604 | public static final String ACTION_QUICK_LAUNCH_SETTINGS = |
| 605 | "android.settings.QUICK_LAUNCH_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 606 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 607 | /** |
| 608 | * Activity Action: Show settings to manage installed applications. |
| 609 | * <p> |
| 610 | * In some cases, a matching Activity may not exist, so ensure you |
| 611 | * safeguard against this. |
| 612 | * <p> |
| 613 | * Input: Nothing. |
| 614 | * <p> |
| 615 | * Output: Nothing. |
| 616 | */ |
| 617 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 618 | public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS = |
| 619 | "android.settings.MANAGE_APPLICATIONS_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 620 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 621 | /** |
Winson Chung | 44e8ff9 | 2010-09-27 14:36:52 -0700 | [diff] [blame] | 622 | * Activity Action: Show settings to manage all applications. |
| 623 | * <p> |
| 624 | * In some cases, a matching Activity may not exist, so ensure you |
| 625 | * safeguard against this. |
| 626 | * <p> |
| 627 | * Input: Nothing. |
| 628 | * <p> |
| 629 | * Output: Nothing. |
| 630 | */ |
| 631 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 632 | public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS = |
| 633 | "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS"; |
| 634 | |
| 635 | /** |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 636 | * Activity Action: Show screen for controlling which apps can draw on top of other apps. |
Billy Lau | cbe540f | 2015-06-25 01:51:44 +0100 | [diff] [blame] | 637 | * <p> |
| 638 | * In some cases, a matching Activity may not exist, so ensure you |
| 639 | * safeguard against this. |
| 640 | * <p> |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 641 | * Input: Optionally, the Intent's data URI can specify the application package name to |
| 642 | * directly invoke the management GUI specific to the package name. For example |
| 643 | * "package:com.my.app". |
Billy Lau | cbe540f | 2015-06-25 01:51:44 +0100 | [diff] [blame] | 644 | * <p> |
| 645 | * Output: Nothing. |
| 646 | */ |
| 647 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 648 | public static final String ACTION_MANAGE_OVERLAY_PERMISSION = |
Billy Lau | 22b3f4c | 2015-07-08 00:31:01 +0100 | [diff] [blame] | 649 | "android.settings.action.MANAGE_OVERLAY_PERMISSION"; |
| 650 | |
| 651 | /** |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 652 | * Activity Action: Show screen for controlling which apps are allowed to write/modify |
| 653 | * system settings. |
Billy Lau | 22b3f4c | 2015-07-08 00:31:01 +0100 | [diff] [blame] | 654 | * <p> |
| 655 | * In some cases, a matching Activity may not exist, so ensure you |
| 656 | * safeguard against this. |
| 657 | * <p> |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 658 | * Input: Optionally, the Intent's data URI can specify the application package name to |
| 659 | * directly invoke the management GUI specific to the package name. For example |
| 660 | * "package:com.my.app". |
Billy Lau | 22b3f4c | 2015-07-08 00:31:01 +0100 | [diff] [blame] | 661 | * <p> |
| 662 | * Output: Nothing. |
| 663 | */ |
| 664 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 665 | public static final String ACTION_MANAGE_WRITE_SETTINGS = |
| 666 | "android.settings.action.MANAGE_WRITE_SETTINGS"; |
Billy Lau | cbe540f | 2015-06-25 01:51:44 +0100 | [diff] [blame] | 667 | |
| 668 | /** |
Dianne Hackborn | b7bb3b3 | 2010-06-06 22:47:50 -0700 | [diff] [blame] | 669 | * Activity Action: Show screen of details about a particular application. |
| 670 | * <p> |
| 671 | * In some cases, a matching Activity may not exist, so ensure you |
| 672 | * safeguard against this. |
| 673 | * <p> |
| 674 | * Input: The Intent's data URI specifies the application package name |
| 675 | * to be shown, with the "package" scheme. That is "package:com.my.app". |
| 676 | * <p> |
| 677 | * Output: Nothing. |
| 678 | */ |
| 679 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 680 | public static final String ACTION_APPLICATION_DETAILS_SETTINGS = |
| 681 | "android.settings.APPLICATION_DETAILS_SETTINGS"; |
| 682 | |
| 683 | /** |
Jason Monk | 287b889 | 2015-06-10 10:39:23 -0400 | [diff] [blame] | 684 | * Activity Action: Show screen for controlling which apps can ignore battery optimizations. |
| 685 | * <p> |
Dianne Hackborn | c7b57b1 | 2015-08-10 14:52:52 -0700 | [diff] [blame] | 686 | * Input: Nothing. |
| 687 | * <p> |
| 688 | * Output: Nothing. |
| 689 | * <p> |
| 690 | * You can use {@link android.os.PowerManager#isIgnoringBatteryOptimizations |
| 691 | * PowerManager.isIgnoringBatteryOptimizations()} to determine if an application is |
| 692 | * already ignoring optimizations. You can use |
| 693 | * {@link #ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS} to ask the user to put you |
| 694 | * on this list. |
| 695 | */ |
| 696 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 697 | public static final String ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS = |
| 698 | "android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS"; |
| 699 | |
| 700 | /** |
Felipe Leme | 5f5d707 | 2016-01-27 10:41:22 -0800 | [diff] [blame] | 701 | * Activity Action: Ask the user to allow an app to ignore battery optimizations (that is, |
Dianne Hackborn | c7b57b1 | 2015-08-10 14:52:52 -0700 | [diff] [blame] | 702 | * put them on the whitelist of apps shown by |
| 703 | * {@link #ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS}). For an app to use this, it also |
| 704 | * must hold the {@link android.Manifest.permission#REQUEST_IGNORE_BATTERY_OPTIMIZATIONS} |
| 705 | * permission. |
| 706 | * <p><b>Note:</b> most applications should <em>not</em> use this; there are many facilities |
| 707 | * provided by the platform for applications to operate correctly in the various power |
Felipe Leme | 5f5d707 | 2016-01-27 10:41:22 -0800 | [diff] [blame] | 708 | * saving modes. This is only for unusual applications that need to deeply control their own |
Dianne Hackborn | c7b57b1 | 2015-08-10 14:52:52 -0700 | [diff] [blame] | 709 | * execution, at the potential expense of the user's battery life. Note that these applications |
Kweku Adams | eb80f7c | 2016-01-12 11:46:52 -0800 | [diff] [blame] | 710 | * greatly run the risk of showing to the user as high power consumers on their device.</p> |
Dianne Hackborn | c7b57b1 | 2015-08-10 14:52:52 -0700 | [diff] [blame] | 711 | * <p> |
| 712 | * Input: The Intent's data URI must specify the application package name |
Jason Monk | 287b889 | 2015-06-10 10:39:23 -0400 | [diff] [blame] | 713 | * to be shown, with the "package" scheme. That is "package:com.my.app". |
| 714 | * <p> |
| 715 | * Output: Nothing. |
Dianne Hackborn | 1958e5e | 2015-06-12 18:11:41 -0700 | [diff] [blame] | 716 | * <p> |
| 717 | * You can use {@link android.os.PowerManager#isIgnoringBatteryOptimizations |
| 718 | * PowerManager.isIgnoringBatteryOptimizations()} to determine if an application is |
| 719 | * already ignoring optimizations. |
Jason Monk | 287b889 | 2015-06-10 10:39:23 -0400 | [diff] [blame] | 720 | */ |
| 721 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
Dianne Hackborn | c7b57b1 | 2015-08-10 14:52:52 -0700 | [diff] [blame] | 722 | public static final String ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = |
| 723 | "android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"; |
Jason Monk | 287b889 | 2015-06-10 10:39:23 -0400 | [diff] [blame] | 724 | |
| 725 | /** |
Felipe Leme | 5f5d707 | 2016-01-27 10:41:22 -0800 | [diff] [blame] | 726 | * Activity Action: Show screen for controlling which apps can ignore background data |
| 727 | * restrictions. |
| 728 | * <p> |
| 729 | * Input: if the Intent's data URI is set with an application name (using the "package" schema, |
| 730 | * like "package:com.my.app"), then when the screen is displayed it will focus on such app. If |
| 731 | * the data is not set, it will just open the screen. |
| 732 | * <p> |
| 733 | * Output: Nothing. |
| 734 | * <p> |
| 735 | * Applications can also use {@link android.net.ConnectivityManager#getRestrictBackgroundStatus |
| 736 | * ConnectivityManager#getRestrictBackgroundStatus()} to determine the status of the background |
| 737 | * data restrictions for them. |
| 738 | */ |
| 739 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 740 | public static final String ACTION_IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS = |
| 741 | "android.settings.IGNORE_BACKGROUND_DATA_RESTRICTIONS_SETTINGS"; |
| 742 | |
| 743 | /** |
Dianne Hackborn | 35654b6 | 2013-01-14 17:38:02 -0800 | [diff] [blame] | 744 | * @hide |
| 745 | * Activity Action: Show the "app ops" settings screen. |
| 746 | * <p> |
| 747 | * Input: Nothing. |
| 748 | * <p> |
| 749 | * Output: Nothing. |
| 750 | */ |
| 751 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 752 | public static final String ACTION_APP_OPS_SETTINGS = |
| 753 | "android.settings.APP_OPS_SETTINGS"; |
| 754 | |
| 755 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 756 | * Activity Action: Show settings for system update functionality. |
| 757 | * <p> |
| 758 | * In some cases, a matching Activity may not exist, so ensure you |
| 759 | * safeguard against this. |
| 760 | * <p> |
| 761 | * Input: Nothing. |
| 762 | * <p> |
| 763 | * Output: Nothing. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 764 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 765 | * @hide |
| 766 | */ |
| 767 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 768 | public static final String ACTION_SYSTEM_UPDATE_SETTINGS = |
| 769 | "android.settings.SYSTEM_UPDATE_SETTINGS"; |
| 770 | |
| 771 | /** |
| 772 | * Activity Action: Show settings to allow configuration of sync settings. |
| 773 | * <p> |
| 774 | * In some cases, a matching Activity may not exist, so ensure you |
| 775 | * safeguard against this. |
| 776 | * <p> |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 777 | * The account types available to add via the add account button may be restricted by adding an |
| 778 | * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's |
| 779 | * authorities. Only account types which can sync with that content provider will be offered to |
| 780 | * the user. |
| 781 | * <p> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 782 | * Input: Nothing. |
| 783 | * <p> |
| 784 | * Output: Nothing. |
| 785 | */ |
| 786 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 787 | public static final String ACTION_SYNC_SETTINGS = |
| 788 | "android.settings.SYNC_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 789 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 790 | /** |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 791 | * Activity Action: Show add account screen for creating a new account. |
| 792 | * <p> |
| 793 | * In some cases, a matching Activity may not exist, so ensure you |
| 794 | * safeguard against this. |
| 795 | * <p> |
| 796 | * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES} |
| 797 | * extra to the Intent with one or more syncable content provider's authorities. Only account |
| 798 | * types which can sync with that content provider will be offered to the user. |
| 799 | * <p> |
Alon Albert | 50359c2 | 2013-02-26 14:47:48 -0800 | [diff] [blame] | 800 | * Account types can also be filtered by adding an {@link #EXTRA_ACCOUNT_TYPES} extra to the |
| 801 | * Intent with one or more account types. |
| 802 | * <p> |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 803 | * Input: Nothing. |
| 804 | * <p> |
| 805 | * Output: Nothing. |
| 806 | */ |
| 807 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 808 | public static final String ACTION_ADD_ACCOUNT = |
| 809 | "android.settings.ADD_ACCOUNT_SETTINGS"; |
| 810 | |
| 811 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 812 | * Activity Action: Show settings for selecting the network operator. |
| 813 | * <p> |
| 814 | * In some cases, a matching Activity may not exist, so ensure you |
| 815 | * safeguard against this. |
| 816 | * <p> |
| 817 | * Input: Nothing. |
| 818 | * <p> |
| 819 | * Output: Nothing. |
| 820 | */ |
| 821 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 822 | public static final String ACTION_NETWORK_OPERATOR_SETTINGS = |
| 823 | "android.settings.NETWORK_OPERATOR_SETTINGS"; |
| 824 | |
| 825 | /** |
| 826 | * Activity Action: Show settings for selection of 2G/3G. |
| 827 | * <p> |
| 828 | * In some cases, a matching Activity may not exist, so ensure you |
| 829 | * safeguard against this. |
| 830 | * <p> |
| 831 | * Input: Nothing. |
| 832 | * <p> |
| 833 | * Output: Nothing. |
| 834 | */ |
| 835 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 836 | public static final String ACTION_DATA_ROAMING_SETTINGS = |
| 837 | "android.settings.DATA_ROAMING_SETTINGS"; |
| 838 | |
| 839 | /** |
| 840 | * Activity Action: Show settings for internal storage. |
| 841 | * <p> |
| 842 | * In some cases, a matching Activity may not exist, so ensure you |
| 843 | * safeguard against this. |
| 844 | * <p> |
| 845 | * Input: Nothing. |
| 846 | * <p> |
| 847 | * Output: Nothing. |
| 848 | */ |
| 849 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 850 | public static final String ACTION_INTERNAL_STORAGE_SETTINGS = |
| 851 | "android.settings.INTERNAL_STORAGE_SETTINGS"; |
| 852 | /** |
| 853 | * Activity Action: Show settings for memory card storage. |
| 854 | * <p> |
| 855 | * In some cases, a matching Activity may not exist, so ensure you |
| 856 | * safeguard against this. |
| 857 | * <p> |
| 858 | * Input: Nothing. |
| 859 | * <p> |
| 860 | * Output: Nothing. |
| 861 | */ |
| 862 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 863 | public static final String ACTION_MEMORY_CARD_SETTINGS = |
| 864 | "android.settings.MEMORY_CARD_SETTINGS"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 865 | |
Justin Mattson | ef34035 | 2010-01-13 21:05:46 -0800 | [diff] [blame] | 866 | /** |
| 867 | * Activity Action: Show settings for global search. |
| 868 | * <p> |
| 869 | * In some cases, a matching Activity may not exist, so ensure you |
| 870 | * safeguard against this. |
| 871 | * <p> |
| 872 | * Input: Nothing. |
| 873 | * <p> |
| 874 | * Output: Nothing |
| 875 | */ |
| 876 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 877 | public static final String ACTION_SEARCH_SETTINGS = |
| 878 | "android.search.action.SEARCH_SETTINGS"; |
| 879 | |
Daniel Sandler | 9d8b876 | 2010-01-22 20:50:15 -0500 | [diff] [blame] | 880 | /** |
| 881 | * Activity Action: Show general device information settings (serial |
| 882 | * number, software version, phone number, etc.). |
| 883 | * <p> |
| 884 | * In some cases, a matching Activity may not exist, so ensure you |
| 885 | * safeguard against this. |
| 886 | * <p> |
| 887 | * Input: Nothing. |
| 888 | * <p> |
| 889 | * Output: Nothing |
| 890 | */ |
| 891 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 892 | public static final String ACTION_DEVICE_INFO_SETTINGS = |
| 893 | "android.settings.DEVICE_INFO_SETTINGS"; |
| 894 | |
Martijn Coenen | 9b3c83f | 2011-07-28 11:21:39 -0500 | [diff] [blame] | 895 | /** |
Nick Pelly | cccf01d | 2011-10-31 14:49:40 -0700 | [diff] [blame] | 896 | * Activity Action: Show NFC settings. |
| 897 | * <p> |
| 898 | * This shows UI that allows NFC to be turned on or off. |
Martijn Coenen | 9b3c83f | 2011-07-28 11:21:39 -0500 | [diff] [blame] | 899 | * <p> |
| 900 | * In some cases, a matching Activity may not exist, so ensure you |
| 901 | * safeguard against this. |
| 902 | * <p> |
| 903 | * Input: Nothing. |
| 904 | * <p> |
| 905 | * Output: Nothing |
Nick Pelly | cccf01d | 2011-10-31 14:49:40 -0700 | [diff] [blame] | 906 | * @see android.nfc.NfcAdapter#isEnabled() |
| 907 | */ |
| 908 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 909 | public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS"; |
| 910 | |
| 911 | /** |
| 912 | * Activity Action: Show NFC Sharing settings. |
| 913 | * <p> |
| 914 | * This shows UI that allows NDEF Push (Android Beam) to be turned on or |
| 915 | * off. |
| 916 | * <p> |
| 917 | * In some cases, a matching Activity may not exist, so ensure you |
| 918 | * safeguard against this. |
| 919 | * <p> |
| 920 | * Input: Nothing. |
| 921 | * <p> |
| 922 | * Output: Nothing |
| 923 | * @see android.nfc.NfcAdapter#isNdefPushEnabled() |
Martijn Coenen | 9b3c83f | 2011-07-28 11:21:39 -0500 | [diff] [blame] | 924 | */ |
| 925 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 926 | public static final String ACTION_NFCSHARING_SETTINGS = |
| 927 | "android.settings.NFCSHARING_SETTINGS"; |
| 928 | |
Daniel Sandler | c08cd02 | 2012-11-27 22:47:37 -0500 | [diff] [blame] | 929 | /** |
Martijn Coenen | 62c196a | 2013-08-09 13:43:34 -0700 | [diff] [blame] | 930 | * Activity Action: Show NFC Tap & Pay settings |
| 931 | * <p> |
| 932 | * This shows UI that allows the user to configure Tap&Pay |
| 933 | * settings. |
| 934 | * <p> |
| 935 | * In some cases, a matching Activity may not exist, so ensure you |
| 936 | * safeguard against this. |
| 937 | * <p> |
| 938 | * Input: Nothing. |
| 939 | * <p> |
| 940 | * Output: Nothing |
| 941 | */ |
| 942 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 943 | public static final String ACTION_NFC_PAYMENT_SETTINGS = |
| 944 | "android.settings.NFC_PAYMENT_SETTINGS"; |
| 945 | |
| 946 | /** |
Daniel Sandler | c08cd02 | 2012-11-27 22:47:37 -0500 | [diff] [blame] | 947 | * Activity Action: Show Daydream settings. |
| 948 | * <p> |
| 949 | * In some cases, a matching Activity may not exist, so ensure you |
| 950 | * safeguard against this. |
| 951 | * <p> |
| 952 | * Input: Nothing. |
| 953 | * <p> |
| 954 | * Output: Nothing. |
| 955 | * @see android.service.dreams.DreamService |
Daniel Sandler | c08cd02 | 2012-11-27 22:47:37 -0500 | [diff] [blame] | 956 | */ |
| 957 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 958 | public static final String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS"; |
| 959 | |
Daniel Sandler | 5feceeb | 2013-03-22 18:29:23 -0700 | [diff] [blame] | 960 | /** |
| 961 | * Activity Action: Show Notification listener settings. |
| 962 | * <p> |
| 963 | * In some cases, a matching Activity may not exist, so ensure you |
| 964 | * safeguard against this. |
| 965 | * <p> |
| 966 | * Input: Nothing. |
| 967 | * <p> |
| 968 | * Output: Nothing. |
| 969 | * @see android.service.notification.NotificationListenerService |
Daniel Sandler | 5feceeb | 2013-03-22 18:29:23 -0700 | [diff] [blame] | 970 | */ |
| 971 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 972 | public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS |
Chris Wren | 8326a8a | 2014-10-22 14:13:32 -0400 | [diff] [blame] | 973 | = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"; |
Daniel Sandler | 5feceeb | 2013-03-22 18:29:23 -0700 | [diff] [blame] | 974 | |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 975 | /** |
John Spurlock | 8077493 | 2015-05-07 17:38:50 -0400 | [diff] [blame] | 976 | * Activity Action: Show Do Not Disturb access settings. |
| 977 | * <p> |
John Spurlock | 7c74f78 | 2015-06-04 13:01:42 -0400 | [diff] [blame] | 978 | * Users can grant and deny access to Do Not Disturb configuration from here. |
| 979 | * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more |
| 980 | * details. |
John Spurlock | 8077493 | 2015-05-07 17:38:50 -0400 | [diff] [blame] | 981 | * <p> |
| 982 | * Input: Nothing. |
| 983 | * <p> |
| 984 | * Output: Nothing. |
| 985 | */ |
| 986 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
John Spurlock | 7c74f78 | 2015-06-04 13:01:42 -0400 | [diff] [blame] | 987 | public static final String ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS |
| 988 | = "android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS"; |
John Spurlock | 8077493 | 2015-05-07 17:38:50 -0400 | [diff] [blame] | 989 | |
| 990 | /** |
John Spurlock | 7340fc8 | 2014-04-24 18:50:12 -0400 | [diff] [blame] | 991 | * @hide |
| 992 | */ |
| 993 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 994 | public static final String ACTION_CONDITION_PROVIDER_SETTINGS |
| 995 | = "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS"; |
| 996 | |
| 997 | /** |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 998 | * Activity Action: Show settings for video captioning. |
| 999 | * <p> |
| 1000 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 1001 | * against this. |
| 1002 | * <p> |
| 1003 | * Input: Nothing. |
| 1004 | * <p> |
| 1005 | * Output: Nothing. |
| 1006 | */ |
| 1007 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1008 | public static final String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS"; |
| 1009 | |
Svetoslav | 773f54d | 2013-09-03 14:01:43 -0700 | [diff] [blame] | 1010 | /** |
| 1011 | * Activity Action: Show the top level print settings. |
| 1012 | * <p> |
| 1013 | * In some cases, a matching Activity may not exist, so ensure you |
| 1014 | * safeguard against this. |
| 1015 | * <p> |
| 1016 | * Input: Nothing. |
| 1017 | * <p> |
| 1018 | * Output: Nothing. |
| 1019 | */ |
| 1020 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1021 | public static final String ACTION_PRINT_SETTINGS = |
| 1022 | "android.settings.ACTION_PRINT_SETTINGS"; |
| 1023 | |
John Spurlock | de54700 | 2014-02-28 17:50:39 -0500 | [diff] [blame] | 1024 | /** |
| 1025 | * Activity Action: Show Zen Mode configuration settings. |
| 1026 | * |
| 1027 | * @hide |
| 1028 | */ |
| 1029 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1030 | public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS"; |
| 1031 | |
Santos Cordon | a4c7524 | 2014-07-09 12:07:51 -0700 | [diff] [blame] | 1032 | /** |
John Spurlock | fc746f8 | 2015-04-03 13:47:14 -0400 | [diff] [blame] | 1033 | * Activity Action: Show Zen Mode priority configuration settings. |
| 1034 | * |
| 1035 | * @hide |
| 1036 | */ |
| 1037 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1038 | public static final String ACTION_ZEN_MODE_PRIORITY_SETTINGS |
| 1039 | = "android.settings.ZEN_MODE_PRIORITY_SETTINGS"; |
| 1040 | |
| 1041 | /** |
John Spurlock | 7af1018 | 2015-04-03 15:10:31 -0400 | [diff] [blame] | 1042 | * Activity Action: Show Zen Mode automation configuration settings. |
| 1043 | * |
| 1044 | * @hide |
| 1045 | */ |
| 1046 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1047 | public static final String ACTION_ZEN_MODE_AUTOMATION_SETTINGS |
| 1048 | = "android.settings.ZEN_MODE_AUTOMATION_SETTINGS"; |
| 1049 | |
| 1050 | /** |
Barnaby James | b3006d3 | 2015-04-02 17:49:54 -0700 | [diff] [blame] | 1051 | * Activity Action: Modify do not disturb mode settings. |
| 1052 | * <p> |
| 1053 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 1054 | * <p> |
| 1055 | * This intent MUST be started using |
| 1056 | * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity |
| 1057 | * startVoiceActivity}. |
| 1058 | * <p> |
| 1059 | * Note: The Activity implementing this intent MUST verify that |
| 1060 | * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction}. |
| 1061 | * returns true before modifying the setting. |
| 1062 | * <p> |
| 1063 | * Input: The optional {@link #EXTRA_DO_NOT_DISTURB_MODE_MINUTES} extra can be used to indicate |
| 1064 | * how long the user wishes to avoid interruptions for. The optional |
| 1065 | * {@link #EXTRA_DO_NOT_DISTURB_MODE_ENABLED} extra can be to indicate if the user is |
| 1066 | * enabling or disabling do not disturb mode. If either extra is not included, the |
| 1067 | * user maybe asked to provide the value. |
| 1068 | * <p> |
| 1069 | * Output: Nothing. |
| 1070 | */ |
| 1071 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1072 | public static final String ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE = |
| 1073 | "android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE"; |
| 1074 | |
| 1075 | /** |
John Spurlock | b2278d6 | 2015-04-07 12:47:12 -0400 | [diff] [blame] | 1076 | * Activity Action: Show Zen Mode schedule rule configuration settings. |
| 1077 | * |
| 1078 | * @hide |
| 1079 | */ |
| 1080 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1081 | public static final String ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS |
| 1082 | = "android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS"; |
| 1083 | |
| 1084 | /** |
John Spurlock | d60258f | 2015-04-30 09:30:52 -0400 | [diff] [blame] | 1085 | * Activity Action: Show Zen Mode event rule configuration settings. |
| 1086 | * |
| 1087 | * @hide |
| 1088 | */ |
| 1089 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1090 | public static final String ACTION_ZEN_MODE_EVENT_RULE_SETTINGS |
| 1091 | = "android.settings.ZEN_MODE_EVENT_RULE_SETTINGS"; |
| 1092 | |
| 1093 | /** |
John Spurlock | 39581cc | 2015-04-10 11:59:01 -0400 | [diff] [blame] | 1094 | * Activity Action: Show Zen Mode external rule configuration settings. |
| 1095 | * |
| 1096 | * @hide |
| 1097 | */ |
| 1098 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1099 | public static final String ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS |
| 1100 | = "android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS"; |
| 1101 | |
| 1102 | /** |
Santos Cordon | a4c7524 | 2014-07-09 12:07:51 -0700 | [diff] [blame] | 1103 | * Activity Action: Show the regulatory information screen for the device. |
| 1104 | * <p> |
| 1105 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 1106 | * against this. |
| 1107 | * <p> |
| 1108 | * Input: Nothing. |
| 1109 | * <p> |
| 1110 | * Output: Nothing. |
| 1111 | */ |
Jeff Sharkey | dd77fda | 2014-04-16 17:23:08 -0700 | [diff] [blame] | 1112 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1113 | public static final String |
| 1114 | ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO"; |
| 1115 | |
Jerome Poichet | 7974cb3 | 2014-05-14 12:04:43 -0700 | [diff] [blame] | 1116 | /** |
| 1117 | * Activity Action: Show Device Name Settings. |
| 1118 | * <p> |
| 1119 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
Tim Kilbourn | 87cd0dc | 2014-04-14 15:37:51 -0700 | [diff] [blame] | 1120 | * against this. |
Jerome Poichet | 7974cb3 | 2014-05-14 12:04:43 -0700 | [diff] [blame] | 1121 | * |
| 1122 | * @hide |
| 1123 | */ |
| 1124 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1125 | public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME"; |
| 1126 | |
Tim Kilbourn | 87cd0dc | 2014-04-14 15:37:51 -0700 | [diff] [blame] | 1127 | /** |
| 1128 | * Activity Action: Show pairing settings. |
| 1129 | * <p> |
| 1130 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 1131 | * against this. |
| 1132 | * |
| 1133 | * @hide |
| 1134 | */ |
| 1135 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1136 | public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS"; |
| 1137 | |
John Spurlock | f8f524c | 2014-06-10 14:47:29 -0400 | [diff] [blame] | 1138 | /** |
| 1139 | * Activity Action: Show battery saver settings. |
John Spurlock | 7346666 | 2014-10-30 13:42:05 -0400 | [diff] [blame] | 1140 | * <p> |
| 1141 | * In some cases, a matching Activity may not exist, so ensure you safeguard |
| 1142 | * against this. |
John Spurlock | f8f524c | 2014-06-10 14:47:29 -0400 | [diff] [blame] | 1143 | */ |
| 1144 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1145 | public static final String ACTION_BATTERY_SAVER_SETTINGS |
| 1146 | = "android.settings.BATTERY_SAVER_SETTINGS"; |
| 1147 | |
Amith Yamasani | eb7b94a | 2014-07-14 18:02:08 -0700 | [diff] [blame] | 1148 | /** |
Barnaby James | b3006d3 | 2015-04-02 17:49:54 -0700 | [diff] [blame] | 1149 | * Activity Action: Modify Battery Saver mode setting using a voice command. |
| 1150 | * <p> |
| 1151 | * In some cases, a matching Activity may not exist, so ensure you safeguard against this. |
| 1152 | * <p> |
| 1153 | * This intent MUST be started using |
| 1154 | * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity |
| 1155 | * startVoiceActivity}. |
| 1156 | * <p> |
| 1157 | * Note: The activity implementing this intent MUST verify that |
| 1158 | * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before |
| 1159 | * modifying the setting. |
| 1160 | * <p> |
| 1161 | * Input: To tell which state batter saver mode should be set to, add the |
| 1162 | * {@link #EXTRA_BATTERY_SAVER_MODE_ENABLED} extra to this Intent with the state specified. |
| 1163 | * If the extra is not included, no changes will be made. |
| 1164 | * <p> |
| 1165 | * Output: Nothing. |
| 1166 | */ |
| 1167 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1168 | public static final String ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE = |
| 1169 | "android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE"; |
| 1170 | |
| 1171 | /** |
Amith Yamasani | eb7b94a | 2014-07-14 18:02:08 -0700 | [diff] [blame] | 1172 | * Activity Action: Show Home selection settings. If there are multiple activities |
| 1173 | * that can satisfy the {@link Intent#CATEGORY_HOME} intent, this screen allows you |
| 1174 | * to pick your preferred activity. |
| 1175 | */ |
| 1176 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1177 | public static final String ACTION_HOME_SETTINGS |
| 1178 | = "android.settings.HOME_SETTINGS"; |
| 1179 | |
Julia Reynolds | 7eba593 | 2015-12-11 16:40:39 -0500 | [diff] [blame] | 1180 | |
| 1181 | |
| 1182 | /** |
| 1183 | * Activity Action: Show Default apps settings. |
| 1184 | * <p> |
| 1185 | * In some cases, a matching Activity may not exist, so ensure you |
| 1186 | * safeguard against this. |
| 1187 | * <p> |
| 1188 | * Input: Nothing. |
| 1189 | * <p> |
| 1190 | * Output: Nothing. |
| 1191 | */ |
| 1192 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1193 | public static final String ACTION_MANAGE_DEFAULT_APPS_SETTINGS |
| 1194 | = "android.settings.MANAGE_DEFAULT_APPS_SETTINGS"; |
| 1195 | |
John Spurlock | 2b0e09c | 2014-07-27 13:27:47 -0400 | [diff] [blame] | 1196 | /** |
| 1197 | * Activity Action: Show notification settings. |
| 1198 | * |
| 1199 | * @hide |
| 1200 | */ |
| 1201 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1202 | public static final String ACTION_NOTIFICATION_SETTINGS |
| 1203 | = "android.settings.NOTIFICATION_SETTINGS"; |
| 1204 | |
| 1205 | /** |
| 1206 | * Activity Action: Show notification settings for a single app. |
| 1207 | * |
| 1208 | * @hide |
| 1209 | */ |
| 1210 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1211 | public static final String ACTION_APP_NOTIFICATION_SETTINGS |
| 1212 | = "android.settings.APP_NOTIFICATION_SETTINGS"; |
| 1213 | |
Chris Wren | cd8f4f7 | 2014-08-27 18:48:13 -0400 | [diff] [blame] | 1214 | /** |
| 1215 | * Activity Action: Show notification redaction settings. |
| 1216 | * |
| 1217 | * @hide |
| 1218 | */ |
| 1219 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1220 | public static final String ACTION_APP_NOTIFICATION_REDACTION |
| 1221 | = "android.settings.ACTION_APP_NOTIFICATION_REDACTION"; |
| 1222 | |
John Spurlock | 2b0e09c | 2014-07-27 13:27:47 -0400 | [diff] [blame] | 1223 | /** @hide */ public static final String EXTRA_APP_UID = "app_uid"; |
| 1224 | /** @hide */ public static final String EXTRA_APP_PACKAGE = "app_package"; |
| 1225 | |
Sudheer Shanka | 410e6bd | 2015-12-31 15:29:50 +0000 | [diff] [blame] | 1226 | /** |
| 1227 | * Activity Action: Show a dialog with disabled by policy message. |
| 1228 | * <p> If an user action is disabled by policy, this dialog can be triggered to let |
| 1229 | * the user know about this. |
| 1230 | * <p> |
| 1231 | * Input: Nothing. |
| 1232 | * <p> |
| 1233 | * Output: Nothing. |
Sudheer Shanka | aebd5dd | 2016-02-18 12:37:14 +0000 | [diff] [blame] | 1234 | * |
| 1235 | * @hide |
Sudheer Shanka | 410e6bd | 2015-12-31 15:29:50 +0000 | [diff] [blame] | 1236 | */ |
| 1237 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1238 | public static final String ACTION_SHOW_ADMIN_SUPPORT_DETAILS |
| 1239 | = "android.settings.SHOW_ADMIN_SUPPORT_DETAILS"; |
| 1240 | |
Michal Karpinski | ba24409 | 2016-02-25 17:28:24 +0000 | [diff] [blame] | 1241 | /** |
| 1242 | * Activity Action: Show a dialog for remote bugreport flow. |
| 1243 | * <p> |
| 1244 | * Input: Nothing. |
| 1245 | * <p> |
| 1246 | * Output: Nothing. |
| 1247 | * |
| 1248 | * @hide |
| 1249 | */ |
| 1250 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1251 | public static final String ACTION_SHOW_REMOTE_BUGREPORT_DIALOG |
| 1252 | = "android.settings.SHOW_REMOTE_BUGREPORT_DIALOG"; |
| 1253 | |
Ruben Brunk | e24b9a6 | 2016-02-16 21:38:24 -0800 | [diff] [blame] | 1254 | /** |
| 1255 | * Activity Action: Show VR listener settings. |
| 1256 | * <p> |
| 1257 | * Input: Nothing. |
| 1258 | * <p> |
| 1259 | * Output: Nothing. |
| 1260 | * |
| 1261 | * @see android.service.vr.VrListenerService |
| 1262 | */ |
| 1263 | @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) |
| 1264 | public static final String ACTION_VR_LISTENER_SETTINGS |
| 1265 | = "android.settings.VR_LISTENER_SETTINGS"; |
| 1266 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1267 | // End of Intent actions for Settings |
| 1268 | |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 1269 | /** |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1270 | * @hide - Private call() method on SettingsProvider to read from 'system' table. |
| 1271 | */ |
| 1272 | public static final String CALL_METHOD_GET_SYSTEM = "GET_system"; |
| 1273 | |
| 1274 | /** |
| 1275 | * @hide - Private call() method on SettingsProvider to read from 'secure' table. |
| 1276 | */ |
| 1277 | public static final String CALL_METHOD_GET_SECURE = "GET_secure"; |
| 1278 | |
| 1279 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1280 | * @hide - Private call() method on SettingsProvider to read from 'global' table. |
| 1281 | */ |
| 1282 | public static final String CALL_METHOD_GET_GLOBAL = "GET_global"; |
| 1283 | |
| 1284 | /** |
| 1285 | * @hide - User handle argument extra to the fast-path call()-based requests |
| 1286 | */ |
| 1287 | public static final String CALL_METHOD_USER_KEY = "_user"; |
| 1288 | |
| 1289 | /** @hide - Private call() method to write to 'system' table */ |
| 1290 | public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system"; |
| 1291 | |
| 1292 | /** @hide - Private call() method to write to 'secure' table */ |
| 1293 | public static final String CALL_METHOD_PUT_SECURE = "PUT_secure"; |
| 1294 | |
| 1295 | /** @hide - Private call() method to write to 'global' table */ |
| 1296 | public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global"; |
| 1297 | |
| 1298 | /** |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 1299 | * Activity Extra: Limit available options in launched activity based on the given authority. |
| 1300 | * <p> |
| 1301 | * This can be passed as an extra field in an Activity Intent with one or more syncable content |
| 1302 | * provider's authorities as a String[]. This field is used by some intents to alter the |
| 1303 | * behavior of the called activity. |
| 1304 | * <p> |
| 1305 | * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based |
| 1306 | * on the authority given. |
| 1307 | */ |
Alon Albert | 50359c2 | 2013-02-26 14:47:48 -0800 | [diff] [blame] | 1308 | public static final String EXTRA_AUTHORITIES = "authorities"; |
| 1309 | |
Alon Albert | d35bf1f | 2013-04-18 14:26:51 -0700 | [diff] [blame] | 1310 | /** |
| 1311 | * Activity Extra: Limit available options in launched activity based on the given account |
| 1312 | * types. |
| 1313 | * <p> |
| 1314 | * This can be passed as an extra field in an Activity Intent with one or more account types |
| 1315 | * as a String[]. This field is used by some intents to alter the behavior of the called |
| 1316 | * activity. |
| 1317 | * <p> |
| 1318 | * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types to the specified |
| 1319 | * list. |
| 1320 | */ |
Alon Albert | 50359c2 | 2013-02-26 14:47:48 -0800 | [diff] [blame] | 1321 | public static final String EXTRA_ACCOUNT_TYPES = "account_types"; |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 1322 | |
Tadashi G. Takaoka | 2548020 | 2011-01-20 23:13:02 +0900 | [diff] [blame] | 1323 | public static final String EXTRA_INPUT_METHOD_ID = "input_method_id"; |
| 1324 | |
Barnaby James | 48f3552 | 2014-07-16 14:27:39 -0700 | [diff] [blame] | 1325 | /** |
Michael Wright | c93fbd1 | 2014-09-22 20:07:59 -0700 | [diff] [blame] | 1326 | * Activity Extra: The device identifier to act upon. |
| 1327 | * <p> |
| 1328 | * This can be passed as an extra field in an Activity Intent with a single |
| 1329 | * InputDeviceIdentifier. This field is used by some activities to jump straight into the |
| 1330 | * settings for the given device. |
| 1331 | * <p> |
Dianne Hackborn | ad6a99b | 2014-11-18 10:11:10 -0800 | [diff] [blame] | 1332 | * Example: The {@link #ACTION_INPUT_METHOD_SETTINGS} intent opens the keyboard layout |
| 1333 | * dialog for the given device. |
Michael Wright | c93fbd1 | 2014-09-22 20:07:59 -0700 | [diff] [blame] | 1334 | * @hide |
| 1335 | */ |
| 1336 | public static final String EXTRA_INPUT_DEVICE_IDENTIFIER = "input_device_identifier"; |
| 1337 | |
| 1338 | /** |
Barnaby James | 48f3552 | 2014-07-16 14:27:39 -0700 | [diff] [blame] | 1339 | * Activity Extra: Enable or disable Airplane Mode. |
| 1340 | * <p> |
| 1341 | * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE} |
Barnaby James | b3006d3 | 2015-04-02 17:49:54 -0700 | [diff] [blame] | 1342 | * intent as a boolean to indicate if it should be enabled. |
Barnaby James | 48f3552 | 2014-07-16 14:27:39 -0700 | [diff] [blame] | 1343 | */ |
| 1344 | public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled"; |
| 1345 | |
Barnaby James | b3006d3 | 2015-04-02 17:49:54 -0700 | [diff] [blame] | 1346 | /** |
| 1347 | * Activity Extra: Enable or disable Battery saver mode. |
| 1348 | * <p> |
| 1349 | * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE} |
| 1350 | * intent as a boolean to indicate if it should be enabled. |
| 1351 | */ |
| 1352 | public static final String EXTRA_BATTERY_SAVER_MODE_ENABLED = |
| 1353 | "android.settings.extra.battery_saver_mode_enabled"; |
| 1354 | |
| 1355 | /** |
| 1356 | * Activity Extra: Enable or disable Do Not Disturb mode. |
| 1357 | * <p> |
| 1358 | * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE} |
| 1359 | * intent as a boolean to indicate if it should be enabled. |
| 1360 | */ |
| 1361 | public static final String EXTRA_DO_NOT_DISTURB_MODE_ENABLED = |
| 1362 | "android.settings.extra.do_not_disturb_mode_enabled"; |
| 1363 | |
| 1364 | /** |
| 1365 | * Activity Extra: How many minutes to enable do not disturb mode for. |
| 1366 | * <p> |
| 1367 | * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE} |
| 1368 | * intent to indicate how long do not disturb mode should be enabled for. |
| 1369 | */ |
| 1370 | public static final String EXTRA_DO_NOT_DISTURB_MODE_MINUTES = |
| 1371 | "android.settings.extra.do_not_disturb_mode_minutes"; |
| 1372 | |
Victor Chang | 355d476 | 2016-04-07 21:23:15 +0100 | [diff] [blame] | 1373 | /** |
| 1374 | * Activity Extra: Number of certificates |
| 1375 | * <p> |
| 1376 | * This can be passed as an extra field to the {@link #ACTION_MONITORING_CERT_INFO} |
| 1377 | * intent to indicate the number of certificates |
| 1378 | * @hide |
| 1379 | */ |
| 1380 | public static final String EXTRA_NUMBER_OF_CERTIFICATES = |
| 1381 | "android.settings.extra.number_of_certificates"; |
| 1382 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1383 | private static final String JID_RESOURCE_PREFIX = "android"; |
| 1384 | |
| 1385 | public static final String AUTHORITY = "settings"; |
| 1386 | |
| 1387 | private static final String TAG = "Settings"; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1388 | private static final boolean LOCAL_LOGV = false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1389 | |
David Christie | 3f7b652 | 2013-08-06 19:19:08 -0700 | [diff] [blame] | 1390 | // Lock ensures that when enabling/disabling the master location switch, we don't end up |
| 1391 | // with a partial enable/disable state in multi-threaded situations. |
| 1392 | private static final Object mLocationSettingsLock = new Object(); |
| 1393 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1394 | public static class SettingNotFoundException extends AndroidException { |
| 1395 | public SettingNotFoundException(String msg) { |
| 1396 | super(msg); |
| 1397 | } |
| 1398 | } |
| 1399 | |
| 1400 | /** |
| 1401 | * Common base for tables of name/value settings. |
| 1402 | */ |
| 1403 | public static class NameValueTable implements BaseColumns { |
| 1404 | public static final String NAME = "name"; |
| 1405 | public static final String VALUE = "value"; |
| 1406 | |
| 1407 | protected static boolean putString(ContentResolver resolver, Uri uri, |
| 1408 | String name, String value) { |
| 1409 | // The database will take care of replacing duplicates. |
| 1410 | try { |
| 1411 | ContentValues values = new ContentValues(); |
| 1412 | values.put(NAME, name); |
| 1413 | values.put(VALUE, value); |
| 1414 | resolver.insert(uri, values); |
| 1415 | return true; |
| 1416 | } catch (SQLException e) { |
Dianne Hackborn | a33e3f7 | 2009-09-29 17:28:24 -0700 | [diff] [blame] | 1417 | Log.w(TAG, "Can't set key " + name + " in " + uri, e); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1418 | return false; |
| 1419 | } |
| 1420 | } |
| 1421 | |
| 1422 | public static Uri getUriFor(Uri uri, String name) { |
| 1423 | return Uri.withAppendedPath(uri, name); |
| 1424 | } |
| 1425 | } |
| 1426 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1427 | // Thread-safe. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1428 | private static class NameValueCache { |
| 1429 | private final String mVersionSystemProperty; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1430 | private final Uri mUri; |
| 1431 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1432 | private static final String[] SELECT_VALUE = |
| 1433 | new String[] { Settings.NameValueTable.VALUE }; |
| 1434 | private static final String NAME_EQ_PLACEHOLDER = "name=?"; |
| 1435 | |
| 1436 | // Must synchronize on 'this' to access mValues and mValuesVersion. |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1437 | private final HashMap<String, String> mValues = new HashMap<String, String>(); |
| 1438 | private long mValuesVersion = 0; |
| 1439 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1440 | // Initially null; set lazily and held forever. Synchronized on 'this'. |
| 1441 | private IContentProvider mContentProvider = null; |
| 1442 | |
| 1443 | // The method we'll call (or null, to not use) on the provider |
| 1444 | // for the fast path of retrieving settings. |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1445 | private final String mCallGetCommand; |
| 1446 | private final String mCallSetCommand; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1447 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1448 | public NameValueCache(String versionSystemProperty, Uri uri, |
| 1449 | String getCommand, String setCommand) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1450 | mVersionSystemProperty = versionSystemProperty; |
| 1451 | mUri = uri; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1452 | mCallGetCommand = getCommand; |
| 1453 | mCallSetCommand = setCommand; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1454 | } |
| 1455 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1456 | private IContentProvider lazyGetProvider(ContentResolver cr) { |
| 1457 | IContentProvider cp = null; |
| 1458 | synchronized (this) { |
| 1459 | cp = mContentProvider; |
| 1460 | if (cp == null) { |
| 1461 | cp = mContentProvider = cr.acquireProvider(mUri.getAuthority()); |
| 1462 | } |
| 1463 | } |
| 1464 | return cp; |
| 1465 | } |
| 1466 | |
| 1467 | public boolean putStringForUser(ContentResolver cr, String name, String value, |
| 1468 | final int userHandle) { |
| 1469 | try { |
| 1470 | Bundle arg = new Bundle(); |
| 1471 | arg.putString(Settings.NameValueTable.VALUE, value); |
Christopher Tate | d5fe147 | 2012-09-10 15:48:38 -0700 | [diff] [blame] | 1472 | arg.putInt(CALL_METHOD_USER_KEY, userHandle); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1473 | IContentProvider cp = lazyGetProvider(cr); |
Dianne Hackborn | 35654b6 | 2013-01-14 17:38:02 -0800 | [diff] [blame] | 1474 | cp.call(cr.getPackageName(), mCallSetCommand, name, arg); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1475 | } catch (RemoteException e) { |
| 1476 | Log.w(TAG, "Can't set key " + name + " in " + mUri, e); |
| 1477 | return false; |
| 1478 | } |
| 1479 | return true; |
| 1480 | } |
| 1481 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1482 | public String getStringForUser(ContentResolver cr, String name, final int userHandle) { |
Christopher Tate | 78d2a66 | 2012-09-13 16:19:44 -0700 | [diff] [blame] | 1483 | final boolean isSelf = (userHandle == UserHandle.myUserId()); |
| 1484 | if (isSelf) { |
| 1485 | long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0); |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1486 | |
Christopher Tate | 78d2a66 | 2012-09-13 16:19:44 -0700 | [diff] [blame] | 1487 | // Our own user's settings data uses a client-side cache |
| 1488 | synchronized (this) { |
| 1489 | if (mValuesVersion != newValuesVersion) { |
| 1490 | if (LOCAL_LOGV || false) { |
| 1491 | Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current " |
| 1492 | + newValuesVersion + " != cached " + mValuesVersion); |
| 1493 | } |
| 1494 | |
| 1495 | mValues.clear(); |
| 1496 | mValuesVersion = newValuesVersion; |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1497 | } |
| 1498 | |
Christopher Tate | 78d2a66 | 2012-09-13 16:19:44 -0700 | [diff] [blame] | 1499 | if (mValues.containsKey(name)) { |
| 1500 | return mValues.get(name); // Could be null, that's OK -- negative caching |
| 1501 | } |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1502 | } |
Christopher Tate | 78d2a66 | 2012-09-13 16:19:44 -0700 | [diff] [blame] | 1503 | } else { |
| 1504 | if (LOCAL_LOGV) Log.v(TAG, "get setting for user " + userHandle |
| 1505 | + " by user " + UserHandle.myUserId() + " so skipping cache"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1506 | } |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1507 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1508 | IContentProvider cp = lazyGetProvider(cr); |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1509 | |
| 1510 | // Try the fast path first, not using query(). If this |
| 1511 | // fails (alternate Settings provider that doesn't support |
| 1512 | // this interface?) then we fall back to the query/table |
| 1513 | // interface. |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1514 | if (mCallGetCommand != null) { |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1515 | try { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1516 | Bundle args = null; |
Christopher Tate | 5e08af0 | 2012-09-21 17:17:22 -0700 | [diff] [blame] | 1517 | if (!isSelf) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1518 | args = new Bundle(); |
| 1519 | args.putInt(CALL_METHOD_USER_KEY, userHandle); |
| 1520 | } |
Dianne Hackborn | 35654b6 | 2013-01-14 17:38:02 -0800 | [diff] [blame] | 1521 | Bundle b = cp.call(cr.getPackageName(), mCallGetCommand, name, args); |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1522 | if (b != null) { |
| 1523 | String value = b.getPairValue(); |
Christopher Tate | 78d2a66 | 2012-09-13 16:19:44 -0700 | [diff] [blame] | 1524 | // Don't update our cache for reads of other users' data |
| 1525 | if (isSelf) { |
| 1526 | synchronized (this) { |
| 1527 | mValues.put(name, value); |
| 1528 | } |
| 1529 | } else { |
| 1530 | if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle |
| 1531 | + " by " + UserHandle.myUserId() |
| 1532 | + " so not updating cache"); |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1533 | } |
| 1534 | return value; |
| 1535 | } |
| 1536 | // If the response Bundle is null, we fall through |
| 1537 | // to the query interface below. |
| 1538 | } catch (RemoteException e) { |
| 1539 | // Not supported by the remote side? Fall through |
| 1540 | // to query(). |
| 1541 | } |
| 1542 | } |
| 1543 | |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1544 | Cursor c = null; |
| 1545 | try { |
Dianne Hackborn | 35654b6 | 2013-01-14 17:38:02 -0800 | [diff] [blame] | 1546 | c = cp.query(cr.getPackageName(), mUri, SELECT_VALUE, NAME_EQ_PLACEHOLDER, |
Jeff Brown | 75ea64f | 2012-01-25 19:37:13 -0800 | [diff] [blame] | 1547 | new String[]{name}, null, null); |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1548 | if (c == null) { |
| 1549 | Log.w(TAG, "Can't get key " + name + " from " + mUri); |
| 1550 | return null; |
| 1551 | } |
| 1552 | |
| 1553 | String value = c.moveToNext() ? c.getString(0) : null; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1554 | synchronized (this) { |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1555 | mValues.put(name, value); |
| 1556 | } |
| 1557 | if (LOCAL_LOGV) { |
| 1558 | Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " + |
| 1559 | name + " = " + (value == null ? "(null)" : value)); |
| 1560 | } |
| 1561 | return value; |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 1562 | } catch (RemoteException e) { |
Dan Egnor | 799f721 | 2009-11-24 16:24:44 -0800 | [diff] [blame] | 1563 | Log.w(TAG, "Can't get key " + name + " from " + mUri, e); |
| 1564 | return null; // Return null, but don't cache it. |
| 1565 | } finally { |
| 1566 | if (c != null) c.close(); |
| 1567 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1568 | } |
| 1569 | } |
| 1570 | |
| 1571 | /** |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 1572 | * Checks if the specified context can draw on top of other apps. As of API |
| 1573 | * level 23, an app cannot draw on top of other apps unless it declares the |
| 1574 | * {@link android.Manifest.permission#SYSTEM_ALERT_WINDOW} permission in its |
| 1575 | * manifest, <em>and</em> the user specifically grants the app this |
| 1576 | * capability. To prompt the user to grant this approval, the app must send an |
| 1577 | * intent with the action |
| 1578 | * {@link android.provider.Settings#ACTION_MANAGE_OVERLAY_PERMISSION}, which |
| 1579 | * causes the system to display a permission management screen. |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 1580 | * |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 1581 | * @param context App context. |
| 1582 | * @return true if the specified context can draw on top of other apps, false otherwise |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 1583 | */ |
| 1584 | public static boolean canDrawOverlays(Context context) { |
Svet Ganov | 94ba4017 | 2016-04-03 22:04:22 -0700 | [diff] [blame] | 1585 | return Settings.isCallingPackageAllowedToDrawOverlays(context, Process.myUid(), |
| 1586 | context.getOpPackageName(), false); |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 1587 | } |
| 1588 | |
| 1589 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1590 | * System settings, containing miscellaneous system preferences. This |
| 1591 | * table holds simple name/value pairs. There are convenience |
| 1592 | * functions for accessing individual settings entries. |
| 1593 | */ |
| 1594 | public static final class System extends NameValueTable { |
| 1595 | public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version"; |
| 1596 | |
Alan Viverette | 04fd67c | 2016-04-12 10:54:04 -0400 | [diff] [blame] | 1597 | private static final float DEFAULT_FONT_SCALE = 1.0f; |
| 1598 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 1599 | /** @hide */ |
| 1600 | public static interface Validator { |
| 1601 | public boolean validate(String value); |
| 1602 | } |
| 1603 | |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 1604 | /** |
| 1605 | * The content:// style URL for this table |
| 1606 | */ |
| 1607 | public static final Uri CONTENT_URI = |
| 1608 | Uri.parse("content://" + AUTHORITY + "/system"); |
| 1609 | |
| 1610 | private static final NameValueCache sNameValueCache = new NameValueCache( |
| 1611 | SYS_PROP_SETTING_VERSION, |
| 1612 | CONTENT_URI, |
| 1613 | CALL_METHOD_GET_SYSTEM, |
| 1614 | CALL_METHOD_PUT_SYSTEM); |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 1615 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1616 | private static final HashSet<String> MOVED_TO_SECURE; |
| 1617 | static { |
| 1618 | MOVED_TO_SECURE = new HashSet<String>(30); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1619 | MOVED_TO_SECURE.add(Secure.ANDROID_ID); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1620 | MOVED_TO_SECURE.add(Secure.HTTP_PROXY); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1621 | MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED); |
Danielle Millett | 925a7d8 | 2012-03-19 18:02:20 -0400 | [diff] [blame] | 1622 | MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS); |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 1623 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED); |
| 1624 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE); |
| 1625 | MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1626 | MOVED_TO_SECURE.add(Secure.LOGGING_ID); |
| 1627 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED); |
| 1628 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE); |
| 1629 | MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL); |
| 1630 | MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1631 | MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL); |
| 1632 | MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); |
| 1633 | MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); |
| 1634 | MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT); |
| 1635 | MOVED_TO_SECURE.add(Secure.WIFI_ON); |
| 1636 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE); |
| 1637 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT); |
| 1638 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS); |
| 1639 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED); |
| 1640 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS); |
| 1641 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT); |
| 1642 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS); |
| 1643 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON); |
| 1644 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT); |
| 1645 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS); |
| 1646 | MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS); |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 1647 | |
| 1648 | // At one time in System, then Global, but now back in Secure |
| 1649 | MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1650 | } |
| 1651 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1652 | private static final HashSet<String> MOVED_TO_GLOBAL; |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1653 | private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1654 | static { |
| 1655 | MOVED_TO_GLOBAL = new HashSet<String>(); |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1656 | MOVED_TO_SECURE_THEN_GLOBAL = new HashSet<String>(); |
| 1657 | |
Christopher Tate | 9219874 | 2012-09-07 12:00:13 -0700 | [diff] [blame] | 1658 | // these were originally in system but migrated to secure in the past, |
| 1659 | // so are duplicated in the Secure.* namespace |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1660 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.ADB_ENABLED); |
| 1661 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.BLUETOOTH_ON); |
| 1662 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DATA_ROAMING); |
| 1663 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DEVICE_PROVISIONED); |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1664 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED); |
| 1665 | MOVED_TO_SECURE_THEN_GLOBAL.add(Global.HTTP_PROXY); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1666 | |
Christopher Tate | 9219874 | 2012-09-07 12:00:13 -0700 | [diff] [blame] | 1667 | // these are moving directly from system to global |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1668 | MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON); |
| 1669 | MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS); |
| 1670 | MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS); |
| 1671 | MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME); |
| 1672 | MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE); |
| 1673 | MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND); |
| 1674 | MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND); |
| 1675 | MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND); |
| 1676 | MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND); |
| 1677 | MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED); |
| 1678 | MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND); |
| 1679 | MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND); |
| 1680 | MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND); |
| 1681 | MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED); |
| 1682 | MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN); |
| 1683 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY); |
Eric Laurent | bc0fab1f | 2012-09-19 11:24:41 -0700 | [diff] [blame] | 1684 | MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER); |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 1685 | MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE); |
| 1686 | MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE); |
| 1687 | MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE); |
| 1688 | MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS); |
| 1689 | MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE); |
| 1690 | MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE); |
| 1691 | MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY); |
| 1692 | MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP); |
| 1693 | MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER); |
| 1694 | MOVED_TO_GLOBAL.add(Settings.Global.SHOW_PROCESSES); |
| 1695 | MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES); |
Geremy Condra | a073511 | 2013-03-26 21:49:26 -0700 | [diff] [blame] | 1696 | MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_CONTENT_URL); |
| 1697 | MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_METADATA_URL); |
| 1698 | MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_CONTENT_URL); |
| 1699 | MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_METADATA_URL); |
| 1700 | MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL); |
| 1701 | MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL); |
| 1702 | MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_CONTENT_URL); |
| 1703 | MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1704 | } |
| 1705 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 1706 | private static final Validator sBooleanValidator = |
| 1707 | new DiscreteValueValidator(new String[] {"0", "1"}); |
| 1708 | |
| 1709 | private static final Validator sNonNegativeIntegerValidator = new Validator() { |
| 1710 | @Override |
| 1711 | public boolean validate(String value) { |
| 1712 | try { |
| 1713 | return Integer.parseInt(value) >= 0; |
| 1714 | } catch (NumberFormatException e) { |
| 1715 | return false; |
| 1716 | } |
| 1717 | } |
| 1718 | }; |
| 1719 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 1720 | private static final Validator sUriValidator = new Validator() { |
| 1721 | @Override |
| 1722 | public boolean validate(String value) { |
| 1723 | try { |
| 1724 | Uri.decode(value); |
| 1725 | return true; |
| 1726 | } catch (IllegalArgumentException e) { |
| 1727 | return false; |
| 1728 | } |
| 1729 | } |
| 1730 | }; |
| 1731 | |
| 1732 | private static final Validator sLenientIpAddressValidator = new Validator() { |
| 1733 | private static final int MAX_IPV6_LENGTH = 45; |
| 1734 | |
| 1735 | @Override |
| 1736 | public boolean validate(String value) { |
| 1737 | return value.length() <= MAX_IPV6_LENGTH; |
| 1738 | } |
| 1739 | }; |
| 1740 | |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1741 | /** @hide */ |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 1742 | public static void getMovedToGlobalSettings(Set<String> outKeySet) { |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1743 | outKeySet.addAll(MOVED_TO_GLOBAL); |
| 1744 | outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL); |
| 1745 | } |
| 1746 | |
| 1747 | /** @hide */ |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 1748 | public static void getMovedToSecureSettings(Set<String> outKeySet) { |
| 1749 | outKeySet.addAll(MOVED_TO_SECURE); |
| 1750 | } |
| 1751 | |
| 1752 | /** @hide */ |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1753 | public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) { |
| 1754 | outKeySet.addAll(MOVED_TO_GLOBAL); |
| 1755 | } |
| 1756 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1757 | /** |
| 1758 | * Look up a name in the database. |
| 1759 | * @param resolver to access the database with |
| 1760 | * @param name to look up in the table |
| 1761 | * @return the corresponding value, or null if not present |
| 1762 | */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 1763 | public static String getString(ContentResolver resolver, String name) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1764 | return getStringForUser(resolver, name, UserHandle.myUserId()); |
| 1765 | } |
| 1766 | |
| 1767 | /** @hide */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 1768 | public static String getStringForUser(ContentResolver resolver, String name, |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1769 | int userHandle) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1770 | if (MOVED_TO_SECURE.contains(name)) { |
| 1771 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1772 | + " to android.provider.Settings.Secure, returning read-only value."); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1773 | return Secure.getStringForUser(resolver, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1774 | } |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1775 | if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1776 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1777 | + " to android.provider.Settings.Global, returning read-only value."); |
| 1778 | return Global.getStringForUser(resolver, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1779 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1780 | return sNameValueCache.getStringForUser(resolver, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1781 | } |
| 1782 | |
| 1783 | /** |
| 1784 | * Store a name/value pair into the database. |
| 1785 | * @param resolver to access the database with |
| 1786 | * @param name to store |
| 1787 | * @param value to associate with the name |
| 1788 | * @return true if the value was set, false on database errors |
| 1789 | */ |
| 1790 | public static boolean putString(ContentResolver resolver, String name, String value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1791 | return putStringForUser(resolver, name, value, UserHandle.myUserId()); |
| 1792 | } |
| 1793 | |
| 1794 | /** @hide */ |
| 1795 | public static boolean putStringForUser(ContentResolver resolver, String name, String value, |
| 1796 | int userHandle) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1797 | if (MOVED_TO_SECURE.contains(name)) { |
| 1798 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1799 | + " to android.provider.Settings.Secure, value is unchanged."); |
| 1800 | return false; |
| 1801 | } |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1802 | if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1803 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1804 | + " to android.provider.Settings.Global, value is unchanged."); |
| 1805 | return false; |
| 1806 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1807 | return sNameValueCache.putStringForUser(resolver, name, value, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1808 | } |
| 1809 | |
| 1810 | /** |
| 1811 | * Construct the content URI for a particular name/value pair, |
| 1812 | * useful for monitoring changes with a ContentObserver. |
| 1813 | * @param name to look up in the table |
| 1814 | * @return the corresponding content URI, or null if not present |
| 1815 | */ |
| 1816 | public static Uri getUriFor(String name) { |
| 1817 | if (MOVED_TO_SECURE.contains(name)) { |
| 1818 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1819 | + " to android.provider.Settings.Secure, returning Secure URI."); |
| 1820 | return Secure.getUriFor(Secure.CONTENT_URI, name); |
| 1821 | } |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 1822 | if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1823 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 1824 | + " to android.provider.Settings.Global, returning read-only global URI."); |
| 1825 | return Global.getUriFor(Global.CONTENT_URI, name); |
| 1826 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1827 | return getUriFor(CONTENT_URI, name); |
| 1828 | } |
| 1829 | |
| 1830 | /** |
| 1831 | * Convenience function for retrieving a single system settings value |
| 1832 | * as an integer. Note that internally setting values are always |
| 1833 | * stored as strings; this function converts the string to an integer |
| 1834 | * for you. The default value will be returned if the setting is |
| 1835 | * not defined or not an integer. |
| 1836 | * |
| 1837 | * @param cr The ContentResolver to access. |
| 1838 | * @param name The name of the setting to retrieve. |
| 1839 | * @param def Value to return if the setting is not defined. |
| 1840 | * |
| 1841 | * @return The setting's current value, or 'def' if it is not defined |
| 1842 | * or not a valid integer. |
| 1843 | */ |
| 1844 | public static int getInt(ContentResolver cr, String name, int def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1845 | return getIntForUser(cr, name, def, UserHandle.myUserId()); |
| 1846 | } |
| 1847 | |
| 1848 | /** @hide */ |
| 1849 | public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { |
| 1850 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1851 | try { |
| 1852 | return v != null ? Integer.parseInt(v) : def; |
| 1853 | } catch (NumberFormatException e) { |
| 1854 | return def; |
| 1855 | } |
| 1856 | } |
| 1857 | |
| 1858 | /** |
| 1859 | * Convenience function for retrieving a single system settings value |
| 1860 | * as an integer. Note that internally setting values are always |
| 1861 | * stored as strings; this function converts the string to an integer |
| 1862 | * for you. |
| 1863 | * <p> |
| 1864 | * This version does not take a default value. If the setting has not |
| 1865 | * been set, or the string value is not a number, |
| 1866 | * it throws {@link SettingNotFoundException}. |
| 1867 | * |
| 1868 | * @param cr The ContentResolver to access. |
| 1869 | * @param name The name of the setting to retrieve. |
| 1870 | * |
| 1871 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 1872 | * name can't be found or the setting value is not an integer. |
| 1873 | * |
| 1874 | * @return The setting's current value. |
| 1875 | */ |
| 1876 | public static int getInt(ContentResolver cr, String name) |
| 1877 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1878 | return getIntForUser(cr, name, UserHandle.myUserId()); |
| 1879 | } |
| 1880 | |
| 1881 | /** @hide */ |
| 1882 | public static int getIntForUser(ContentResolver cr, String name, int userHandle) |
| 1883 | throws SettingNotFoundException { |
| 1884 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1885 | try { |
| 1886 | return Integer.parseInt(v); |
| 1887 | } catch (NumberFormatException e) { |
| 1888 | throw new SettingNotFoundException(name); |
| 1889 | } |
| 1890 | } |
| 1891 | |
| 1892 | /** |
| 1893 | * Convenience function for updating a single settings value as an |
| 1894 | * integer. This will either create a new entry in the table if the |
| 1895 | * given name does not exist, or modify the value of the existing row |
| 1896 | * with that name. Note that internally setting values are always |
| 1897 | * stored as strings, so this function converts the given value to a |
| 1898 | * string before storing it. |
| 1899 | * |
| 1900 | * @param cr The ContentResolver to access. |
| 1901 | * @param name The name of the setting to modify. |
| 1902 | * @param value The new value for the setting. |
| 1903 | * @return true if the value was set, false on database errors |
| 1904 | */ |
| 1905 | public static boolean putInt(ContentResolver cr, String name, int value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1906 | return putIntForUser(cr, name, value, UserHandle.myUserId()); |
| 1907 | } |
| 1908 | |
| 1909 | /** @hide */ |
| 1910 | public static boolean putIntForUser(ContentResolver cr, String name, int value, |
| 1911 | int userHandle) { |
| 1912 | return putStringForUser(cr, name, Integer.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1913 | } |
| 1914 | |
| 1915 | /** |
| 1916 | * Convenience function for retrieving a single system settings value |
| 1917 | * as a {@code long}. Note that internally setting values are always |
| 1918 | * stored as strings; this function converts the string to a {@code long} |
| 1919 | * for you. The default value will be returned if the setting is |
| 1920 | * not defined or not a {@code long}. |
| 1921 | * |
| 1922 | * @param cr The ContentResolver to access. |
| 1923 | * @param name The name of the setting to retrieve. |
| 1924 | * @param def Value to return if the setting is not defined. |
| 1925 | * |
| 1926 | * @return The setting's current value, or 'def' if it is not defined |
| 1927 | * or not a valid {@code long}. |
| 1928 | */ |
| 1929 | public static long getLong(ContentResolver cr, String name, long def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1930 | return getLongForUser(cr, name, def, UserHandle.myUserId()); |
| 1931 | } |
| 1932 | |
| 1933 | /** @hide */ |
| 1934 | public static long getLongForUser(ContentResolver cr, String name, long def, |
| 1935 | int userHandle) { |
| 1936 | String valString = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1937 | long value; |
| 1938 | try { |
| 1939 | value = valString != null ? Long.parseLong(valString) : def; |
| 1940 | } catch (NumberFormatException e) { |
| 1941 | value = def; |
| 1942 | } |
| 1943 | return value; |
| 1944 | } |
| 1945 | |
| 1946 | /** |
| 1947 | * Convenience function for retrieving a single system settings value |
| 1948 | * as a {@code long}. Note that internally setting values are always |
| 1949 | * stored as strings; this function converts the string to a {@code long} |
| 1950 | * for you. |
| 1951 | * <p> |
| 1952 | * This version does not take a default value. If the setting has not |
| 1953 | * been set, or the string value is not a number, |
| 1954 | * it throws {@link SettingNotFoundException}. |
| 1955 | * |
| 1956 | * @param cr The ContentResolver to access. |
| 1957 | * @param name The name of the setting to retrieve. |
| 1958 | * |
| 1959 | * @return The setting's current value. |
| 1960 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 1961 | * name can't be found or the setting value is not an integer. |
| 1962 | */ |
| 1963 | public static long getLong(ContentResolver cr, String name) |
| 1964 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1965 | return getLongForUser(cr, name, UserHandle.myUserId()); |
| 1966 | } |
| 1967 | |
| 1968 | /** @hide */ |
| 1969 | public static long getLongForUser(ContentResolver cr, String name, int userHandle) |
| 1970 | throws SettingNotFoundException { |
| 1971 | String valString = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1972 | try { |
| 1973 | return Long.parseLong(valString); |
| 1974 | } catch (NumberFormatException e) { |
| 1975 | throw new SettingNotFoundException(name); |
| 1976 | } |
| 1977 | } |
| 1978 | |
| 1979 | /** |
| 1980 | * Convenience function for updating a single settings value as a long |
| 1981 | * integer. This will either create a new entry in the table if the |
| 1982 | * given name does not exist, or modify the value of the existing row |
| 1983 | * with that name. Note that internally setting values are always |
| 1984 | * stored as strings, so this function converts the given value to a |
| 1985 | * string before storing it. |
| 1986 | * |
| 1987 | * @param cr The ContentResolver to access. |
| 1988 | * @param name The name of the setting to modify. |
| 1989 | * @param value The new value for the setting. |
| 1990 | * @return true if the value was set, false on database errors |
| 1991 | */ |
| 1992 | public static boolean putLong(ContentResolver cr, String name, long value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 1993 | return putLongForUser(cr, name, value, UserHandle.myUserId()); |
| 1994 | } |
| 1995 | |
| 1996 | /** @hide */ |
| 1997 | public static boolean putLongForUser(ContentResolver cr, String name, long value, |
| 1998 | int userHandle) { |
| 1999 | return putStringForUser(cr, name, Long.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2000 | } |
| 2001 | |
| 2002 | /** |
| 2003 | * Convenience function for retrieving a single system settings value |
| 2004 | * as a floating point number. Note that internally setting values are |
| 2005 | * always stored as strings; this function converts the string to an |
| 2006 | * float for you. The default value will be returned if the setting |
| 2007 | * is not defined or not a valid float. |
| 2008 | * |
| 2009 | * @param cr The ContentResolver to access. |
| 2010 | * @param name The name of the setting to retrieve. |
| 2011 | * @param def Value to return if the setting is not defined. |
| 2012 | * |
| 2013 | * @return The setting's current value, or 'def' if it is not defined |
| 2014 | * or not a valid float. |
| 2015 | */ |
| 2016 | public static float getFloat(ContentResolver cr, String name, float def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2017 | return getFloatForUser(cr, name, def, UserHandle.myUserId()); |
| 2018 | } |
| 2019 | |
| 2020 | /** @hide */ |
| 2021 | public static float getFloatForUser(ContentResolver cr, String name, float def, |
| 2022 | int userHandle) { |
| 2023 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2024 | try { |
| 2025 | return v != null ? Float.parseFloat(v) : def; |
| 2026 | } catch (NumberFormatException e) { |
| 2027 | return def; |
| 2028 | } |
| 2029 | } |
| 2030 | |
| 2031 | /** |
| 2032 | * Convenience function for retrieving a single system settings value |
| 2033 | * as a float. Note that internally setting values are always |
| 2034 | * stored as strings; this function converts the string to a float |
| 2035 | * for you. |
| 2036 | * <p> |
| 2037 | * This version does not take a default value. If the setting has not |
| 2038 | * been set, or the string value is not a number, |
| 2039 | * it throws {@link SettingNotFoundException}. |
| 2040 | * |
| 2041 | * @param cr The ContentResolver to access. |
| 2042 | * @param name The name of the setting to retrieve. |
| 2043 | * |
| 2044 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 2045 | * name can't be found or the setting value is not a float. |
| 2046 | * |
| 2047 | * @return The setting's current value. |
| 2048 | */ |
| 2049 | public static float getFloat(ContentResolver cr, String name) |
| 2050 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2051 | return getFloatForUser(cr, name, UserHandle.myUserId()); |
| 2052 | } |
| 2053 | |
| 2054 | /** @hide */ |
| 2055 | public static float getFloatForUser(ContentResolver cr, String name, int userHandle) |
| 2056 | throws SettingNotFoundException { |
| 2057 | String v = getStringForUser(cr, name, userHandle); |
Brian Muramatsu | e1d4698 | 2010-12-06 17:34:20 -0800 | [diff] [blame] | 2058 | if (v == null) { |
| 2059 | throw new SettingNotFoundException(name); |
| 2060 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2061 | try { |
| 2062 | return Float.parseFloat(v); |
| 2063 | } catch (NumberFormatException e) { |
| 2064 | throw new SettingNotFoundException(name); |
| 2065 | } |
| 2066 | } |
| 2067 | |
| 2068 | /** |
| 2069 | * Convenience function for updating a single settings value as a |
| 2070 | * floating point number. This will either create a new entry in the |
| 2071 | * table if the given name does not exist, or modify the value of the |
| 2072 | * existing row with that name. Note that internally setting values |
| 2073 | * are always stored as strings, so this function converts the given |
| 2074 | * value to a string before storing it. |
| 2075 | * |
| 2076 | * @param cr The ContentResolver to access. |
| 2077 | * @param name The name of the setting to modify. |
| 2078 | * @param value The new value for the setting. |
| 2079 | * @return true if the value was set, false on database errors |
| 2080 | */ |
| 2081 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2082 | return putFloatForUser(cr, name, value, UserHandle.myUserId()); |
| 2083 | } |
| 2084 | |
| 2085 | /** @hide */ |
| 2086 | public static boolean putFloatForUser(ContentResolver cr, String name, float value, |
| 2087 | int userHandle) { |
| 2088 | return putStringForUser(cr, name, Float.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2089 | } |
| 2090 | |
| 2091 | /** |
| 2092 | * Convenience function to read all of the current |
| 2093 | * configuration-related settings into a |
| 2094 | * {@link Configuration} object. |
| 2095 | * |
| 2096 | * @param cr The ContentResolver to access. |
| 2097 | * @param outConfig Where to place the configuration settings. |
| 2098 | */ |
| 2099 | public static void getConfiguration(ContentResolver cr, Configuration outConfig) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2100 | getConfigurationForUser(cr, outConfig, UserHandle.myUserId()); |
| 2101 | } |
| 2102 | |
| 2103 | /** @hide */ |
| 2104 | public static void getConfigurationForUser(ContentResolver cr, Configuration outConfig, |
| 2105 | int userHandle) { |
| 2106 | outConfig.fontScale = Settings.System.getFloatForUser( |
Alan Viverette | 04fd67c | 2016-04-12 10:54:04 -0400 | [diff] [blame] | 2107 | cr, FONT_SCALE, DEFAULT_FONT_SCALE, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2108 | if (outConfig.fontScale < 0) { |
Alan Viverette | 04fd67c | 2016-04-12 10:54:04 -0400 | [diff] [blame] | 2109 | outConfig.fontScale = DEFAULT_FONT_SCALE; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2110 | } |
Seigo Nonaka | bd5cbdd | 2016-01-25 19:40:28 +0900 | [diff] [blame] | 2111 | outConfig.setLocales(LocaleList.forLanguageTags( |
| 2112 | Settings.System.getStringForUser(cr, SYSTEM_LOCALES, userHandle))); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2113 | } |
| 2114 | |
| 2115 | /** |
Dianne Hackborn | 31ca854 | 2011-07-19 14:58:28 -0700 | [diff] [blame] | 2116 | * @hide Erase the fields in the Configuration that should be applied |
| 2117 | * by the settings. |
| 2118 | */ |
| 2119 | public static void clearConfiguration(Configuration inoutConfig) { |
| 2120 | inoutConfig.fontScale = 0; |
Seigo Nonaka | d403151 | 2016-03-17 21:18:53 +0900 | [diff] [blame] | 2121 | if (!inoutConfig.userSetLocale && !inoutConfig.getLocales().isEmpty()) { |
Seigo Nonaka | bd5cbdd | 2016-01-25 19:40:28 +0900 | [diff] [blame] | 2122 | inoutConfig.setLocales(LocaleList.getEmptyLocaleList()); |
| 2123 | } |
Dianne Hackborn | 31ca854 | 2011-07-19 14:58:28 -0700 | [diff] [blame] | 2124 | } |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 2125 | |
Dianne Hackborn | 31ca854 | 2011-07-19 14:58:28 -0700 | [diff] [blame] | 2126 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2127 | * Convenience function to write a batch of configuration-related |
| 2128 | * settings from a {@link Configuration} object. |
| 2129 | * |
| 2130 | * @param cr The ContentResolver to access. |
| 2131 | * @param config The settings to write. |
| 2132 | * @return true if the values were set, false on database errors |
| 2133 | */ |
| 2134 | public static boolean putConfiguration(ContentResolver cr, Configuration config) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2135 | return putConfigurationForUser(cr, config, UserHandle.myUserId()); |
| 2136 | } |
| 2137 | |
| 2138 | /** @hide */ |
| 2139 | public static boolean putConfigurationForUser(ContentResolver cr, Configuration config, |
| 2140 | int userHandle) { |
Seigo Nonaka | bd5cbdd | 2016-01-25 19:40:28 +0900 | [diff] [blame] | 2141 | return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle) && |
| 2142 | Settings.System.putStringForUser( |
| 2143 | cr, SYSTEM_LOCALES, config.getLocales().toLanguageTags(), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2144 | } |
| 2145 | |
Dianne Hackborn | b8b11a0 | 2010-03-10 15:53:11 -0800 | [diff] [blame] | 2146 | /** @hide */ |
| 2147 | public static boolean hasInterestingConfigurationChanges(int changes) { |
Seigo Nonaka | bd5cbdd | 2016-01-25 19:40:28 +0900 | [diff] [blame] | 2148 | return (changes & ActivityInfo.CONFIG_FONT_SCALE) != 0 || |
| 2149 | (changes & ActivityInfo.CONFIG_LOCALE) != 0; |
Dianne Hackborn | b8b11a0 | 2010-03-10 15:53:11 -0800 | [diff] [blame] | 2150 | } |
Jaikumar Ganesh | 545e670 | 2010-06-04 10:23:03 -0700 | [diff] [blame] | 2151 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2152 | /** @deprecated - Do not use */ |
| 2153 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2154 | public static boolean getShowGTalkServiceStatus(ContentResolver cr) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2155 | return getShowGTalkServiceStatusForUser(cr, UserHandle.myUserId()); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2156 | } |
| 2157 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2158 | /** |
| 2159 | * @hide |
| 2160 | * @deprecated - Do not use |
| 2161 | */ |
| 2162 | public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr, |
| 2163 | int userHandle) { |
| 2164 | return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0; |
| 2165 | } |
| 2166 | |
| 2167 | /** @deprecated - Do not use */ |
| 2168 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2169 | public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) { |
Christopher Tate | c8c0838 | 2012-09-19 17:18:18 -0700 | [diff] [blame] | 2170 | setShowGTalkServiceStatusForUser(cr, flag, UserHandle.myUserId()); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2171 | } |
| 2172 | |
| 2173 | /** |
| 2174 | * @hide |
| 2175 | * @deprecated - Do not use |
| 2176 | */ |
| 2177 | @Deprecated |
| 2178 | public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag, |
| 2179 | int userHandle) { |
| 2180 | putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2181 | } |
| 2182 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2183 | private static final class DiscreteValueValidator implements Validator { |
| 2184 | private final String[] mValues; |
| 2185 | |
| 2186 | public DiscreteValueValidator(String[] values) { |
| 2187 | mValues = values; |
| 2188 | } |
| 2189 | |
Svetoslav | 1b71ea9 | 2015-02-17 18:20:29 -0800 | [diff] [blame] | 2190 | @Override |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2191 | public boolean validate(String value) { |
| 2192 | return ArrayUtils.contains(mValues, value); |
| 2193 | } |
| 2194 | } |
| 2195 | |
| 2196 | private static final class InclusiveIntegerRangeValidator implements Validator { |
| 2197 | private final int mMin; |
| 2198 | private final int mMax; |
| 2199 | |
| 2200 | public InclusiveIntegerRangeValidator(int min, int max) { |
| 2201 | mMin = min; |
| 2202 | mMax = max; |
| 2203 | } |
| 2204 | |
Svetoslav | 1b71ea9 | 2015-02-17 18:20:29 -0800 | [diff] [blame] | 2205 | @Override |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2206 | public boolean validate(String value) { |
| 2207 | try { |
| 2208 | final int intValue = Integer.parseInt(value); |
| 2209 | return intValue >= mMin && intValue <= mMax; |
| 2210 | } catch (NumberFormatException e) { |
| 2211 | return false; |
| 2212 | } |
| 2213 | } |
| 2214 | } |
| 2215 | |
| 2216 | private static final class InclusiveFloatRangeValidator implements Validator { |
| 2217 | private final float mMin; |
| 2218 | private final float mMax; |
| 2219 | |
| 2220 | public InclusiveFloatRangeValidator(float min, float max) { |
| 2221 | mMin = min; |
| 2222 | mMax = max; |
| 2223 | } |
| 2224 | |
Svetoslav | 1b71ea9 | 2015-02-17 18:20:29 -0800 | [diff] [blame] | 2225 | @Override |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2226 | public boolean validate(String value) { |
| 2227 | try { |
| 2228 | final float floatValue = Float.parseFloat(value); |
| 2229 | return floatValue >= mMin && floatValue <= mMax; |
| 2230 | } catch (NumberFormatException e) { |
| 2231 | return false; |
| 2232 | } |
| 2233 | } |
| 2234 | } |
| 2235 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2236 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2237 | * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2238 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2239 | @Deprecated |
| 2240 | public static final String STAY_ON_WHILE_PLUGGED_IN = Global.STAY_ON_WHILE_PLUGGED_IN; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2241 | |
| 2242 | /** |
| 2243 | * What happens when the user presses the end call button if they're not |
| 2244 | * on a call.<br/> |
| 2245 | * <b>Values:</b><br/> |
| 2246 | * 0 - The end button does nothing.<br/> |
| 2247 | * 1 - The end button goes to the home screen.<br/> |
| 2248 | * 2 - The end button puts the device to sleep and locks the keyguard.<br/> |
| 2249 | * 3 - The end button goes to the home screen. If the user is already on the |
| 2250 | * home screen, it puts the device to sleep. |
| 2251 | */ |
| 2252 | public static final String END_BUTTON_BEHAVIOR = "end_button_behavior"; |
| 2253 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2254 | private static final Validator END_BUTTON_BEHAVIOR_VALIDATOR = |
| 2255 | new InclusiveIntegerRangeValidator(0, 3); |
| 2256 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2257 | /** |
David Brown | 458e806 | 2010-03-08 21:52:11 -0800 | [diff] [blame] | 2258 | * END_BUTTON_BEHAVIOR value for "go home". |
| 2259 | * @hide |
| 2260 | */ |
| 2261 | public static final int END_BUTTON_BEHAVIOR_HOME = 0x1; |
| 2262 | |
| 2263 | /** |
| 2264 | * END_BUTTON_BEHAVIOR value for "go to sleep". |
| 2265 | * @hide |
| 2266 | */ |
| 2267 | public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2; |
| 2268 | |
| 2269 | /** |
| 2270 | * END_BUTTON_BEHAVIOR default value. |
| 2271 | * @hide |
| 2272 | */ |
| 2273 | public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP; |
| 2274 | |
| 2275 | /** |
Joe Onorato | 9cdffa1 | 2011-04-06 18:27:27 -0700 | [diff] [blame] | 2276 | * Is advanced settings mode turned on. 0 == no, 1 == yes |
| 2277 | * @hide |
| 2278 | */ |
| 2279 | public static final String ADVANCED_SETTINGS = "advanced_settings"; |
| 2280 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2281 | private static final Validator ADVANCED_SETTINGS_VALIDATOR = sBooleanValidator; |
| 2282 | |
Joe Onorato | 9cdffa1 | 2011-04-06 18:27:27 -0700 | [diff] [blame] | 2283 | /** |
| 2284 | * ADVANCED_SETTINGS default value. |
| 2285 | * @hide |
| 2286 | */ |
| 2287 | public static final int ADVANCED_SETTINGS_DEFAULT = 0; |
| 2288 | |
| 2289 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2290 | * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2291 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2292 | @Deprecated |
| 2293 | public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2294 | |
| 2295 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2296 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2297 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2298 | @Deprecated |
| 2299 | public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2300 | |
| 2301 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2302 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2303 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2304 | @Deprecated |
| 2305 | public static final String RADIO_WIFI = Global.RADIO_WIFI; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2306 | |
Robert Greenwalt | 8588e47 | 2011-11-08 10:12:25 -0800 | [diff] [blame] | 2307 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2308 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead |
Robert Greenwalt | 8588e47 | 2011-11-08 10:12:25 -0800 | [diff] [blame] | 2309 | * {@hide} |
| 2310 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2311 | @Deprecated |
| 2312 | public static final String RADIO_WIMAX = Global.RADIO_WIMAX; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2313 | |
| 2314 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2315 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead |
Nick Pelly | 8d32a01 | 2011-08-09 07:03:49 -0700 | [diff] [blame] | 2316 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2317 | @Deprecated |
| 2318 | public static final String RADIO_CELL = Global.RADIO_CELL; |
Nick Pelly | 8d32a01 | 2011-08-09 07:03:49 -0700 | [diff] [blame] | 2319 | |
| 2320 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2321 | * @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2322 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2323 | @Deprecated |
| 2324 | public static final String RADIO_NFC = Global.RADIO_NFC; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2325 | |
| 2326 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2327 | * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead |
| 2328 | */ |
| 2329 | @Deprecated |
| 2330 | public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS; |
| 2331 | |
| 2332 | /** |
| 2333 | * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead |
Mike Lockwood | bd5ddf0 | 2009-07-29 21:37:14 -0700 | [diff] [blame] | 2334 | * |
| 2335 | * {@hide} |
| 2336 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2337 | @Deprecated |
| 2338 | public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = |
| 2339 | Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS; |
Mike Lockwood | bd5ddf0 | 2009-07-29 21:37:14 -0700 | [diff] [blame] | 2340 | |
| 2341 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2342 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2343 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2344 | @Deprecated |
| 2345 | public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2346 | |
| 2347 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2348 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2349 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2350 | @Deprecated |
| 2351 | public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2352 | |
| 2353 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2354 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2355 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2356 | @Deprecated |
| 2357 | public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = |
| 2358 | Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2359 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2360 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2361 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2362 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2363 | @Deprecated |
| 2364 | public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2365 | |
Eric Laurent | bc0fab1f | 2012-09-19 11:24:41 -0700 | [diff] [blame] | 2366 | /** |
| 2367 | * @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead |
| 2368 | */ |
| 2369 | @Deprecated |
| 2370 | public static final String MODE_RINGER = Global.MODE_RINGER; |
| 2371 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2372 | /** |
| 2373 | * Whether to use static IP and other static network attributes. |
| 2374 | * <p> |
| 2375 | * Set to 1 for true and 0 for false. |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2376 | * |
| 2377 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2378 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2379 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2380 | public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip"; |
| 2381 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2382 | private static final Validator WIFI_USE_STATIC_IP_VALIDATOR = sBooleanValidator; |
| 2383 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2384 | /** |
| 2385 | * The static IP address. |
| 2386 | * <p> |
| 2387 | * Example: "192.168.1.51" |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2388 | * |
| 2389 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2390 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2391 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2392 | public static final String WIFI_STATIC_IP = "wifi_static_ip"; |
| 2393 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2394 | private static final Validator WIFI_STATIC_IP_VALIDATOR = sLenientIpAddressValidator; |
| 2395 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2396 | /** |
| 2397 | * If using static IP, the gateway's IP address. |
| 2398 | * <p> |
| 2399 | * Example: "192.168.1.1" |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2400 | * |
| 2401 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2402 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2403 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2404 | public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway"; |
| 2405 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2406 | private static final Validator WIFI_STATIC_GATEWAY_VALIDATOR = sLenientIpAddressValidator; |
| 2407 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2408 | /** |
| 2409 | * If using static IP, the net mask. |
| 2410 | * <p> |
| 2411 | * Example: "255.255.255.0" |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2412 | * |
| 2413 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2414 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2415 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2416 | public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask"; |
| 2417 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2418 | private static final Validator WIFI_STATIC_NETMASK_VALIDATOR = sLenientIpAddressValidator; |
| 2419 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2420 | /** |
| 2421 | * If using static IP, the primary DNS's IP address. |
| 2422 | * <p> |
| 2423 | * Example: "192.168.1.1" |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2424 | * |
| 2425 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2426 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2427 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2428 | public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1"; |
| 2429 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2430 | private static final Validator WIFI_STATIC_DNS1_VALIDATOR = sLenientIpAddressValidator; |
| 2431 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2432 | /** |
| 2433 | * If using static IP, the secondary DNS's IP address. |
| 2434 | * <p> |
| 2435 | * Example: "192.168.1.2" |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2436 | * |
| 2437 | * @deprecated Use {@link WifiManager} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2438 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 2439 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2440 | public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2"; |
| 2441 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2442 | private static final Validator WIFI_STATIC_DNS2_VALIDATOR = sLenientIpAddressValidator; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2443 | |
| 2444 | /** |
| 2445 | * Determines whether remote devices may discover and/or connect to |
| 2446 | * this device. |
| 2447 | * <P>Type: INT</P> |
| 2448 | * 2 -- discoverable and connectable |
| 2449 | * 1 -- connectable but not discoverable |
| 2450 | * 0 -- neither connectable nor discoverable |
| 2451 | */ |
| 2452 | public static final String BLUETOOTH_DISCOVERABILITY = |
| 2453 | "bluetooth_discoverability"; |
| 2454 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2455 | private static final Validator BLUETOOTH_DISCOVERABILITY_VALIDATOR = |
| 2456 | new InclusiveIntegerRangeValidator(0, 2); |
| 2457 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2458 | /** |
| 2459 | * Bluetooth discoverability timeout. If this value is nonzero, then |
| 2460 | * Bluetooth becomes discoverable for a certain number of seconds, |
| 2461 | * after which is becomes simply connectable. The value is in seconds. |
| 2462 | */ |
| 2463 | public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT = |
| 2464 | "bluetooth_discoverability_timeout"; |
| 2465 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2466 | private static final Validator BLUETOOTH_DISCOVERABILITY_TIMEOUT_VALIDATOR = |
| 2467 | sNonNegativeIntegerValidator; |
| 2468 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2469 | /** |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 2470 | * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED} |
| 2471 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2472 | */ |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 2473 | @Deprecated |
| 2474 | public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2475 | |
| 2476 | /** |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 2477 | * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE} |
| 2478 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2479 | */ |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 2480 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2481 | public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; |
| 2482 | |
| 2483 | /** |
Jaikumar Ganesh | 545e670 | 2010-06-04 10:23:03 -0700 | [diff] [blame] | 2484 | * @deprecated Use |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 2485 | * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED} |
| 2486 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2487 | */ |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 2488 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2489 | public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = |
| 2490 | "lock_pattern_tactile_feedback_enabled"; |
| 2491 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2492 | /** |
| 2493 | * A formatted string of the next alarm that is set, or the empty string |
| 2494 | * if there is no alarm set. |
Adrian Roos | c42a1e1 | 2014-07-07 23:35:53 +0200 | [diff] [blame] | 2495 | * |
| 2496 | * @deprecated Use {@link android.app.AlarmManager#getNextAlarmClock()}. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2497 | */ |
Adrian Roos | c42a1e1 | 2014-07-07 23:35:53 +0200 | [diff] [blame] | 2498 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2499 | public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted"; |
| 2500 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2501 | private static final Validator NEXT_ALARM_FORMATTED_VALIDATOR = new Validator() { |
| 2502 | private static final int MAX_LENGTH = 1000; |
Svetoslav | 1b71ea9 | 2015-02-17 18:20:29 -0800 | [diff] [blame] | 2503 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2504 | @Override |
| 2505 | public boolean validate(String value) { |
| 2506 | // TODO: No idea what the correct format is. |
Svetoslav | 64d6e9c | 2015-02-12 11:30:36 -0800 | [diff] [blame] | 2507 | return value == null || value.length() < MAX_LENGTH; |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2508 | } |
| 2509 | }; |
| 2510 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2511 | /** |
| 2512 | * Scaling factor for fonts, float. |
| 2513 | */ |
| 2514 | public static final String FONT_SCALE = "font_scale"; |
| 2515 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2516 | private static final Validator FONT_SCALE_VALIDATOR = new Validator() { |
| 2517 | @Override |
| 2518 | public boolean validate(String value) { |
| 2519 | try { |
| 2520 | return Float.parseFloat(value) >= 0; |
| 2521 | } catch (NumberFormatException e) { |
| 2522 | return false; |
| 2523 | } |
| 2524 | } |
| 2525 | }; |
| 2526 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2527 | /** |
Seigo Nonaka | bd5cbdd | 2016-01-25 19:40:28 +0900 | [diff] [blame] | 2528 | * The serialized system locale value. |
| 2529 | * |
| 2530 | * Do not use this value directory. |
| 2531 | * To get system locale, use {@link android.util.LocaleList#getDefault} instead. |
| 2532 | * To update system locale, use {@link com.android.internal.app.LocalePicker#updateLocales} |
| 2533 | * instead. |
| 2534 | * @hide |
| 2535 | */ |
| 2536 | public static final String SYSTEM_LOCALES = "system_locales"; |
| 2537 | |
| 2538 | |
| 2539 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2540 | * Name of an application package to be debugged. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2541 | * |
| 2542 | * @deprecated Use {@link Global#DEBUG_APP} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2543 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2544 | @Deprecated |
| 2545 | public static final String DEBUG_APP = Global.DEBUG_APP; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2546 | |
| 2547 | /** |
| 2548 | * If 1, when launching DEBUG_APP it will wait for the debugger before |
| 2549 | * starting user code. If 0, it will run normally. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2550 | * |
| 2551 | * @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2552 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2553 | @Deprecated |
| 2554 | public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2555 | |
| 2556 | /** |
| 2557 | * Whether or not to dim the screen. 0=no 1=yes |
Jeff Brown | 9630704 | 2012-07-27 15:51:34 -0700 | [diff] [blame] | 2558 | * @deprecated This setting is no longer used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2559 | */ |
Jeff Brown | 9630704 | 2012-07-27 15:51:34 -0700 | [diff] [blame] | 2560 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2561 | public static final String DIM_SCREEN = "dim_screen"; |
| 2562 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2563 | private static final Validator DIM_SCREEN_VALIDATOR = sBooleanValidator; |
| 2564 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2565 | /** |
Jeff Brown | 05af6ad | 2014-09-30 20:54:30 -0700 | [diff] [blame] | 2566 | * The amount of time in milliseconds before the device goes to sleep or begins |
| 2567 | * to dream after a period of inactivity. This value is also known as the |
| 2568 | * user activity timeout period since the screen isn't necessarily turned off |
| 2569 | * when it expires. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2570 | */ |
| 2571 | public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout"; |
| 2572 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2573 | private static final Validator SCREEN_OFF_TIMEOUT_VALIDATOR = sNonNegativeIntegerValidator; |
| 2574 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2575 | /** |
| 2576 | * The screen backlight brightness between 0 and 255. |
| 2577 | */ |
| 2578 | public static final String SCREEN_BRIGHTNESS = "screen_brightness"; |
| 2579 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2580 | private static final Validator SCREEN_BRIGHTNESS_VALIDATOR = |
| 2581 | new InclusiveIntegerRangeValidator(0, 255); |
| 2582 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2583 | /** |
Dan Murphy | 951764b | 2009-08-27 14:59:03 -0500 | [diff] [blame] | 2584 | * Control whether to enable automatic brightness mode. |
Dan Murphy | 951764b | 2009-08-27 14:59:03 -0500 | [diff] [blame] | 2585 | */ |
| 2586 | public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode"; |
| 2587 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2588 | private static final Validator SCREEN_BRIGHTNESS_MODE_VALIDATOR = sBooleanValidator; |
| 2589 | |
Dan Murphy | 951764b | 2009-08-27 14:59:03 -0500 | [diff] [blame] | 2590 | /** |
Dianne Hackborn | d9ea468 | 2012-01-20 18:36:40 -0800 | [diff] [blame] | 2591 | * Adjustment to auto-brightness to make it generally more (>0.0 <1.0) |
| 2592 | * or less (<0.0 >-1.0) bright. |
Dianne Hackborn | 518a3d8 | 2012-05-09 16:30:49 -0700 | [diff] [blame] | 2593 | * @hide |
Dianne Hackborn | d9ea468 | 2012-01-20 18:36:40 -0800 | [diff] [blame] | 2594 | */ |
| 2595 | public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj"; |
| 2596 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2597 | private static final Validator SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR = |
| 2598 | new InclusiveFloatRangeValidator(-1, 1); |
| 2599 | |
Dianne Hackborn | d9ea468 | 2012-01-20 18:36:40 -0800 | [diff] [blame] | 2600 | /** |
Mike Lockwood | dc3494e | 2009-10-14 21:17:09 -0700 | [diff] [blame] | 2601 | * SCREEN_BRIGHTNESS_MODE value for manual mode. |
Mike Lockwood | dc3494e | 2009-10-14 21:17:09 -0700 | [diff] [blame] | 2602 | */ |
| 2603 | public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0; |
| 2604 | |
| 2605 | /** |
Scott Main | 52bfc24 | 2012-02-09 10:09:14 -0800 | [diff] [blame] | 2606 | * SCREEN_BRIGHTNESS_MODE value for automatic mode. |
Mike Lockwood | dc3494e | 2009-10-14 21:17:09 -0700 | [diff] [blame] | 2607 | */ |
| 2608 | public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; |
| 2609 | |
| 2610 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2611 | * Control whether the process CPU usage meter should be shown. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2612 | * |
| 2613 | * @deprecated Use {@link Global#SHOW_PROCESSES} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2614 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2615 | @Deprecated |
| 2616 | public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2617 | |
| 2618 | /** |
| 2619 | * If 1, the activity manager will aggressively finish activities and |
| 2620 | * processes as soon as they are no longer needed. If 0, the normal |
| 2621 | * extended lifetime is used. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2622 | * |
| 2623 | * @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2624 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2625 | @Deprecated |
| 2626 | public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2627 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2628 | /** |
| 2629 | * Determines which streams are affected by ringer mode changes. The |
| 2630 | * stream type's bit should be set to 1 if it should be muted when going |
| 2631 | * into an inaudible ringer mode. |
| 2632 | */ |
| 2633 | public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected"; |
| 2634 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2635 | private static final Validator MODE_RINGER_STREAMS_AFFECTED_VALIDATOR = |
| 2636 | sNonNegativeIntegerValidator; |
| 2637 | |
| 2638 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2639 | * Determines which streams are affected by mute. The |
| 2640 | * stream type's bit should be set to 1 if it should be muted when a mute request |
| 2641 | * is received. |
| 2642 | */ |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2643 | public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected"; |
| 2644 | |
| 2645 | private static final Validator MUTE_STREAMS_AFFECTED_VALIDATOR = |
| 2646 | sNonNegativeIntegerValidator; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2647 | |
| 2648 | /** |
| 2649 | * Whether vibrate is on for different events. This is used internally, |
| 2650 | * changing this value will not change the vibrate. See AudioManager. |
| 2651 | */ |
| 2652 | public static final String VIBRATE_ON = "vibrate_on"; |
| 2653 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2654 | private static final Validator VIBRATE_ON_VALIDATOR = sBooleanValidator; |
| 2655 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2656 | /** |
Jeff Brown | 7f6c231 | 2012-04-13 20:38:38 -0700 | [diff] [blame] | 2657 | * If 1, redirects the system vibrator to all currently attached input devices |
| 2658 | * that support vibration. If there are no such input devices, then the system |
| 2659 | * vibrator is used instead. |
| 2660 | * If 0, does not register the system vibrator. |
| 2661 | * |
| 2662 | * This setting is mainly intended to provide a compatibility mechanism for |
| 2663 | * applications that only know about the system vibrator and do not use the |
| 2664 | * input device vibrator API. |
| 2665 | * |
| 2666 | * @hide |
| 2667 | */ |
| 2668 | public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices"; |
| 2669 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2670 | private static final Validator VIBRATE_INPUT_DEVICES_VALIDATOR = sBooleanValidator; |
| 2671 | |
Jeff Brown | 7f6c231 | 2012-04-13 20:38:38 -0700 | [diff] [blame] | 2672 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2673 | * Ringer volume. This is used internally, changing this value will not |
| 2674 | * change the volume. See AudioManager. |
Svetoslav | dbbeeb3 | 2015-02-18 19:16:25 -0800 | [diff] [blame] | 2675 | * |
| 2676 | * @removed Not used by anything since API 2. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2677 | */ |
| 2678 | public static final String VOLUME_RING = "volume_ring"; |
| 2679 | |
| 2680 | /** |
| 2681 | * System/notifications volume. This is used internally, changing this |
| 2682 | * value will not change the volume. See AudioManager. |
Svetoslav | dbbeeb3 | 2015-02-18 19:16:25 -0800 | [diff] [blame] | 2683 | * |
| 2684 | * @removed Not used by anything since API 2. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2685 | */ |
| 2686 | public static final String VOLUME_SYSTEM = "volume_system"; |
| 2687 | |
| 2688 | /** |
| 2689 | * Voice call volume. This is used internally, changing this value will |
| 2690 | * not change the volume. See AudioManager. |
Svetoslav | dbbeeb3 | 2015-02-18 19:16:25 -0800 | [diff] [blame] | 2691 | * |
| 2692 | * @removed Not used by anything since API 2. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2693 | */ |
| 2694 | public static final String VOLUME_VOICE = "volume_voice"; |
| 2695 | |
| 2696 | /** |
| 2697 | * Music/media/gaming volume. This is used internally, changing this |
| 2698 | * value will not change the volume. See AudioManager. |
Svetoslav | dbbeeb3 | 2015-02-18 19:16:25 -0800 | [diff] [blame] | 2699 | * |
| 2700 | * @removed Not used by anything since API 2. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2701 | */ |
| 2702 | public static final String VOLUME_MUSIC = "volume_music"; |
| 2703 | |
| 2704 | /** |
| 2705 | * Alarm volume. This is used internally, changing this |
| 2706 | * value will not change the volume. See AudioManager. |
Svetoslav | dbbeeb3 | 2015-02-18 19:16:25 -0800 | [diff] [blame] | 2707 | * |
| 2708 | * @removed Not used by anything since API 2. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2709 | */ |
| 2710 | public static final String VOLUME_ALARM = "volume_alarm"; |
| 2711 | |
| 2712 | /** |
| 2713 | * Notification volume. This is used internally, changing this |
| 2714 | * value will not change the volume. See AudioManager. |
Svetoslav | dbbeeb3 | 2015-02-18 19:16:25 -0800 | [diff] [blame] | 2715 | * |
| 2716 | * @removed Not used by anything since API 2. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2717 | */ |
| 2718 | public static final String VOLUME_NOTIFICATION = "volume_notification"; |
| 2719 | |
| 2720 | /** |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 2721 | * Bluetooth Headset volume. This is used internally, changing this value will |
| 2722 | * not change the volume. See AudioManager. |
Svetoslav | dbbeeb3 | 2015-02-18 19:16:25 -0800 | [diff] [blame] | 2723 | * |
| 2724 | * @removed Not used by anything since API 2. |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 2725 | */ |
| 2726 | public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco"; |
| 2727 | |
| 2728 | /** |
Mike Lockwood | 8517e46 | 2011-10-25 14:47:19 -0400 | [diff] [blame] | 2729 | * Master volume (float in the range 0.0f to 1.0f). |
Svetoslav | dbbeeb3 | 2015-02-18 19:16:25 -0800 | [diff] [blame] | 2730 | * |
Mike Lockwood | 8517e46 | 2011-10-25 14:47:19 -0400 | [diff] [blame] | 2731 | * @hide |
| 2732 | */ |
| 2733 | public static final String VOLUME_MASTER = "volume_master"; |
| 2734 | |
| 2735 | /** |
Andy Hung | f04b84d | 2015-12-18 17:33:27 -0800 | [diff] [blame] | 2736 | * Master mono (int 1 = mono, 0 = normal). |
| 2737 | * |
| 2738 | * @hide |
| 2739 | */ |
| 2740 | public static final String MASTER_MONO = "master_mono"; |
| 2741 | |
| 2742 | private static final Validator MASTER_MONO_VALIDATOR = sBooleanValidator; |
| 2743 | |
| 2744 | /** |
Justin Koh | 57978ed | 2012-04-03 17:37:58 -0700 | [diff] [blame] | 2745 | * Whether the notifications should use the ring volume (value of 1) or |
| 2746 | * a separate notification volume (value of 0). In most cases, users |
| 2747 | * will have this enabled so the notification and ringer volumes will be |
| 2748 | * the same. However, power users can disable this and use the separate |
| 2749 | * notification volume control. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2750 | * <p> |
Justin Koh | 57978ed | 2012-04-03 17:37:58 -0700 | [diff] [blame] | 2751 | * Note: This is a one-off setting that will be removed in the future |
| 2752 | * when there is profile support. For this reason, it is kept hidden |
| 2753 | * from the public APIs. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2754 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2755 | * @hide |
Amith Yamasani | 42722bf | 2011-07-22 10:34:27 -0700 | [diff] [blame] | 2756 | * @deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2757 | */ |
Gilles Debunne | e90bed1 | 2011-08-30 14:28:27 -0700 | [diff] [blame] | 2758 | @Deprecated |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2759 | public static final String NOTIFICATIONS_USE_RING_VOLUME = |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2760 | "notifications_use_ring_volume"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2761 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2762 | private static final Validator NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR = sBooleanValidator; |
| 2763 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2764 | /** |
Daniel Sandler | 6329bf7 | 2010-02-26 15:17:44 -0500 | [diff] [blame] | 2765 | * Whether silent mode should allow vibration feedback. This is used |
| 2766 | * internally in AudioService and the Sound settings activity to |
| 2767 | * coordinate decoupling of vibrate and silent modes. This setting |
| 2768 | * will likely be removed in a future release with support for |
| 2769 | * audio/vibe feedback profiles. |
| 2770 | * |
Eric Laurent | bffc3d1 | 2012-05-07 17:43:49 -0700 | [diff] [blame] | 2771 | * Not used anymore. On devices with vibrator, the user explicitly selects |
| 2772 | * silent or vibrate mode. |
| 2773 | * Kept for use by legacy database upgrade code in DatabaseHelper. |
Daniel Sandler | 6329bf7 | 2010-02-26 15:17:44 -0500 | [diff] [blame] | 2774 | * @hide |
| 2775 | */ |
| 2776 | public static final String VIBRATE_IN_SILENT = "vibrate_in_silent"; |
| 2777 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2778 | private static final Validator VIBRATE_IN_SILENT_VALIDATOR = sBooleanValidator; |
| 2779 | |
Daniel Sandler | 6329bf7 | 2010-02-26 15:17:44 -0500 | [diff] [blame] | 2780 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2781 | * The mapping of stream type (integer) to its setting. |
Svetoslav | dbbeeb3 | 2015-02-18 19:16:25 -0800 | [diff] [blame] | 2782 | * |
| 2783 | * @removed Not used by anything since API 2. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2784 | */ |
| 2785 | public static final String[] VOLUME_SETTINGS = { |
| 2786 | VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC, |
Eric Laurent | 484d288 | 2009-12-08 09:05:45 -0800 | [diff] [blame] | 2787 | VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2788 | }; |
| 2789 | |
| 2790 | /** |
| 2791 | * Appended to various volume related settings to record the previous |
| 2792 | * values before they the settings were affected by a silent/vibrate |
| 2793 | * ringer mode change. |
Svetoslav | dbbeeb3 | 2015-02-18 19:16:25 -0800 | [diff] [blame] | 2794 | * |
| 2795 | * @removed Not used by anything since API 2. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2796 | */ |
| 2797 | public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible"; |
| 2798 | |
| 2799 | /** |
| 2800 | * Persistent store for the system-wide default ringtone URI. |
| 2801 | * <p> |
| 2802 | * If you need to play the default ringtone at any given time, it is recommended |
| 2803 | * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve |
| 2804 | * to the set default ringtone at the time of playing. |
| 2805 | * |
| 2806 | * @see #DEFAULT_RINGTONE_URI |
| 2807 | */ |
| 2808 | public static final String RINGTONE = "ringtone"; |
| 2809 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2810 | private static final Validator RINGTONE_VALIDATOR = sUriValidator; |
| 2811 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2812 | /** |
| 2813 | * A {@link Uri} that will point to the current default ringtone at any |
| 2814 | * given time. |
| 2815 | * <p> |
| 2816 | * If the current default ringtone is in the DRM provider and the caller |
| 2817 | * does not have permission, the exception will be a |
| 2818 | * FileNotFoundException. |
| 2819 | */ |
| 2820 | public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE); |
| 2821 | |
Jeff Sharkey | 413573a | 2016-02-22 17:52:45 -0700 | [diff] [blame] | 2822 | /** {@hide} */ |
| 2823 | public static final String RINGTONE_CACHE = "ringtone_cache"; |
| 2824 | /** {@hide} */ |
| 2825 | public static final Uri RINGTONE_CACHE_URI = getUriFor(RINGTONE_CACHE); |
| 2826 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2827 | /** |
| 2828 | * Persistent store for the system-wide default notification sound. |
| 2829 | * |
| 2830 | * @see #RINGTONE |
| 2831 | * @see #DEFAULT_NOTIFICATION_URI |
| 2832 | */ |
| 2833 | public static final String NOTIFICATION_SOUND = "notification_sound"; |
| 2834 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2835 | private static final Validator NOTIFICATION_SOUND_VALIDATOR = sUriValidator; |
| 2836 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2837 | /** |
| 2838 | * A {@link Uri} that will point to the current default notification |
| 2839 | * sound at any given time. |
| 2840 | * |
| 2841 | * @see #DEFAULT_RINGTONE_URI |
| 2842 | */ |
| 2843 | public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND); |
| 2844 | |
Jeff Sharkey | 413573a | 2016-02-22 17:52:45 -0700 | [diff] [blame] | 2845 | /** {@hide} */ |
| 2846 | public static final String NOTIFICATION_SOUND_CACHE = "notification_sound_cache"; |
| 2847 | /** {@hide} */ |
| 2848 | public static final Uri NOTIFICATION_SOUND_CACHE_URI = getUriFor(NOTIFICATION_SOUND_CACHE); |
| 2849 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2850 | /** |
Patrick Scott | 3156bb00 | 2009-04-13 09:57:38 -0700 | [diff] [blame] | 2851 | * Persistent store for the system-wide default alarm alert. |
| 2852 | * |
| 2853 | * @see #RINGTONE |
| 2854 | * @see #DEFAULT_ALARM_ALERT_URI |
| 2855 | */ |
| 2856 | public static final String ALARM_ALERT = "alarm_alert"; |
| 2857 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2858 | private static final Validator ALARM_ALERT_VALIDATOR = sUriValidator; |
| 2859 | |
Patrick Scott | 3156bb00 | 2009-04-13 09:57:38 -0700 | [diff] [blame] | 2860 | /** |
| 2861 | * A {@link Uri} that will point to the current default alarm alert at |
| 2862 | * any given time. |
| 2863 | * |
| 2864 | * @see #DEFAULT_ALARM_ALERT_URI |
| 2865 | */ |
| 2866 | public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT); |
| 2867 | |
Jeff Sharkey | 413573a | 2016-02-22 17:52:45 -0700 | [diff] [blame] | 2868 | /** {@hide} */ |
| 2869 | public static final String ALARM_ALERT_CACHE = "alarm_alert_cache"; |
| 2870 | /** {@hide} */ |
| 2871 | public static final Uri ALARM_ALERT_CACHE_URI = getUriFor(ALARM_ALERT_CACHE); |
| 2872 | |
Patrick Scott | 3156bb00 | 2009-04-13 09:57:38 -0700 | [diff] [blame] | 2873 | /** |
Jean-Michel Trivi | d589fea | 2011-04-15 11:28:10 -0700 | [diff] [blame] | 2874 | * Persistent store for the system default media button event receiver. |
| 2875 | * |
| 2876 | * @hide |
| 2877 | */ |
| 2878 | public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver"; |
| 2879 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2880 | private static final Validator MEDIA_BUTTON_RECEIVER_VALIDATOR = new Validator() { |
| 2881 | @Override |
| 2882 | public boolean validate(String value) { |
| 2883 | try { |
| 2884 | ComponentName.unflattenFromString(value); |
| 2885 | return true; |
| 2886 | } catch (NullPointerException e) { |
| 2887 | return false; |
| 2888 | } |
| 2889 | } |
| 2890 | }; |
| 2891 | |
Jean-Michel Trivi | d589fea | 2011-04-15 11:28:10 -0700 | [diff] [blame] | 2892 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2893 | * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off |
| 2894 | */ |
| 2895 | public static final String TEXT_AUTO_REPLACE = "auto_replace"; |
| 2896 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2897 | private static final Validator TEXT_AUTO_REPLACE_VALIDATOR = sBooleanValidator; |
| 2898 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2899 | /** |
| 2900 | * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off |
| 2901 | */ |
| 2902 | public static final String TEXT_AUTO_CAPS = "auto_caps"; |
| 2903 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2904 | private static final Validator TEXT_AUTO_CAPS_VALIDATOR = sBooleanValidator; |
| 2905 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2906 | /** |
| 2907 | * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This |
| 2908 | * feature converts two spaces to a "." and space. |
| 2909 | */ |
| 2910 | public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 2911 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2912 | private static final Validator TEXT_AUTO_PUNCTUATE_VALIDATOR = sBooleanValidator; |
| 2913 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2914 | /** |
| 2915 | * Setting to showing password characters in text editors. 1 = On, 0 = Off |
| 2916 | */ |
| 2917 | public static final String TEXT_SHOW_PASSWORD = "show_password"; |
| 2918 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2919 | private static final Validator TEXT_SHOW_PASSWORD_VALIDATOR = sBooleanValidator; |
| 2920 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2921 | public static final String SHOW_GTALK_SERVICE_STATUS = |
| 2922 | "SHOW_GTALK_SERVICE_STATUS"; |
| 2923 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2924 | private static final Validator SHOW_GTALK_SERVICE_STATUS_VALIDATOR = sBooleanValidator; |
| 2925 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2926 | /** |
| 2927 | * Name of activity to use for wallpaper on the home screen. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2928 | * |
| 2929 | * @deprecated Use {@link WallpaperManager} instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2930 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 2931 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2932 | public static final String WALLPAPER_ACTIVITY = "wallpaper_activity"; |
| 2933 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2934 | private static final Validator WALLPAPER_ACTIVITY_VALIDATOR = new Validator() { |
| 2935 | private static final int MAX_LENGTH = 1000; |
| 2936 | |
| 2937 | @Override |
| 2938 | public boolean validate(String value) { |
| 2939 | if (value != null && value.length() > MAX_LENGTH) { |
| 2940 | return false; |
| 2941 | } |
| 2942 | return ComponentName.unflattenFromString(value) != null; |
| 2943 | } |
| 2944 | }; |
| 2945 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2946 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2947 | * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME} |
| 2948 | * instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2949 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2950 | @Deprecated |
| 2951 | public static final String AUTO_TIME = Global.AUTO_TIME; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2952 | |
| 2953 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2954 | * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE} |
| 2955 | * instead |
Amith Yamasani | ad450be | 2010-09-16 16:47:00 -0700 | [diff] [blame] | 2956 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 2957 | @Deprecated |
| 2958 | public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE; |
Amith Yamasani | ad450be | 2010-09-16 16:47:00 -0700 | [diff] [blame] | 2959 | |
| 2960 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2961 | * Display times as 12 or 24 hours |
| 2962 | * 12 |
| 2963 | * 24 |
| 2964 | */ |
| 2965 | public static final String TIME_12_24 = "time_12_24"; |
| 2966 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2967 | /** @hide */ |
| 2968 | public static final Validator TIME_12_24_VALIDATOR = |
| 2969 | new DiscreteValueValidator(new String[] {"12", "24"}); |
| 2970 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2971 | /** |
| 2972 | * Date format string |
| 2973 | * mm/dd/yyyy |
| 2974 | * dd/mm/yyyy |
| 2975 | * yyyy/mm/dd |
| 2976 | */ |
| 2977 | public static final String DATE_FORMAT = "date_format"; |
| 2978 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 2979 | /** @hide */ |
| 2980 | public static final Validator DATE_FORMAT_VALIDATOR = new Validator() { |
| 2981 | @Override |
| 2982 | public boolean validate(String value) { |
| 2983 | try { |
| 2984 | new SimpleDateFormat(value); |
| 2985 | return true; |
| 2986 | } catch (IllegalArgumentException e) { |
| 2987 | return false; |
| 2988 | } |
| 2989 | } |
| 2990 | }; |
| 2991 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2992 | /** |
| 2993 | * Whether the setup wizard has been run before (on first boot), or if |
| 2994 | * it still needs to be run. |
| 2995 | * |
| 2996 | * nonzero = it has been run in the past |
| 2997 | * 0 = it has not been run in the past |
| 2998 | */ |
| 2999 | public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run"; |
| 3000 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3001 | /** @hide */ |
| 3002 | public static final Validator SETUP_WIZARD_HAS_RUN_VALIDATOR = sBooleanValidator; |
| 3003 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3004 | /** |
| 3005 | * Scaling factor for normal window animations. Setting to 0 will disable window |
| 3006 | * animations. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 3007 | * |
| 3008 | * @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3009 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 3010 | @Deprecated |
| 3011 | public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3012 | |
| 3013 | /** |
| 3014 | * Scaling factor for activity transition animations. Setting to 0 will disable window |
| 3015 | * animations. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 3016 | * |
| 3017 | * @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3018 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 3019 | @Deprecated |
| 3020 | public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3021 | |
| 3022 | /** |
Chet Haase | c38fa1f | 2012-02-01 16:37:46 -0800 | [diff] [blame] | 3023 | * Scaling factor for Animator-based animations. This affects both the start delay and |
| 3024 | * duration of all such animations. Setting to 0 will cause animations to end immediately. |
| 3025 | * The default value is 1. |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 3026 | * |
| 3027 | * @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead |
Chet Haase | c38fa1f | 2012-02-01 16:37:46 -0800 | [diff] [blame] | 3028 | */ |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 3029 | @Deprecated |
| 3030 | public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3031 | |
| 3032 | /** |
| 3033 | * Control whether the accelerometer will be used to change screen |
| 3034 | * orientation. If 0, it will not be used unless explicitly requested |
| 3035 | * by the application; if 1, it will be used by default unless explicitly |
| 3036 | * disabled by the application. |
| 3037 | */ |
| 3038 | public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation"; |
| 3039 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3040 | /** @hide */ |
| 3041 | public static final Validator ACCELEROMETER_ROTATION_VALIDATOR = sBooleanValidator; |
| 3042 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3043 | /** |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 3044 | * Default screen rotation when no other policy applies. |
| 3045 | * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a |
| 3046 | * preference, this rotation value will be used. Must be one of the |
Brian Muramatsu | e1d4698 | 2010-12-06 17:34:20 -0800 | [diff] [blame] | 3047 | * {@link android.view.Surface#ROTATION_0 Surface rotation constants}. |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 3048 | * |
Dianne Hackborn | 16ec080 | 2014-08-15 18:32:33 -0700 | [diff] [blame] | 3049 | * @see android.view.Display#getRotation |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 3050 | */ |
| 3051 | public static final String USER_ROTATION = "user_rotation"; |
| 3052 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3053 | /** @hide */ |
| 3054 | public static final Validator USER_ROTATION_VALIDATOR = |
| 3055 | new InclusiveIntegerRangeValidator(0, 3); |
| 3056 | |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 3057 | /** |
Jeff Brown | 207673cd | 2012-06-05 17:47:11 -0700 | [diff] [blame] | 3058 | * Control whether the rotation lock toggle in the System UI should be hidden. |
| 3059 | * Typically this is done for accessibility purposes to make it harder for |
| 3060 | * the user to accidentally toggle the rotation lock while the display rotation |
| 3061 | * has been locked for accessibility. |
| 3062 | * |
| 3063 | * If 0, then rotation lock toggle is not hidden for accessibility (although it may be |
| 3064 | * unavailable for other reasons). If 1, then the rotation lock toggle is hidden. |
| 3065 | * |
| 3066 | * @hide |
| 3067 | */ |
| 3068 | public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY = |
| 3069 | "hide_rotation_lock_toggle_for_accessibility"; |
| 3070 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3071 | /** @hide */ |
| 3072 | public static final Validator HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY_VALIDATOR = |
| 3073 | sBooleanValidator; |
| 3074 | |
Jeff Brown | 207673cd | 2012-06-05 17:47:11 -0700 | [diff] [blame] | 3075 | /** |
Daisuke Miyakawa | 3c60eeb | 2012-05-08 12:08:25 -0700 | [diff] [blame] | 3076 | * Whether the phone vibrates when it is ringing due to an incoming call. This will |
| 3077 | * be used by Phone and Setting apps; it shouldn't affect other apps. |
| 3078 | * The value is boolean (1 or 0). |
| 3079 | * |
| 3080 | * Note: this is not same as "vibrate on ring", which had been available until ICS. |
| 3081 | * It was about AudioManager's setting and thus affected all the applications which |
| 3082 | * relied on the setting, while this is purely about the vibration setting for incoming |
| 3083 | * calls. |
Daisuke Miyakawa | 3c60eeb | 2012-05-08 12:08:25 -0700 | [diff] [blame] | 3084 | */ |
| 3085 | public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing"; |
| 3086 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3087 | /** @hide */ |
| 3088 | public static final Validator VIBRATE_WHEN_RINGING_VALIDATOR = sBooleanValidator; |
| 3089 | |
Daisuke Miyakawa | 3c60eeb | 2012-05-08 12:08:25 -0700 | [diff] [blame] | 3090 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3091 | * Whether the audible DTMF tones are played by the dialer when dialing. The value is |
| 3092 | * boolean (1 or 0). |
| 3093 | */ |
| 3094 | public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone"; |
| 3095 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3096 | /** @hide */ |
| 3097 | public static final Validator DTMF_TONE_WHEN_DIALING_VALIDATOR = sBooleanValidator; |
| 3098 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3099 | /** |
David Krause | d0f6715 | 2009-06-13 18:01:13 -0500 | [diff] [blame] | 3100 | * CDMA only settings |
| 3101 | * DTMF tone type played by the dialer when dialing. |
| 3102 | * 0 = Normal |
| 3103 | * 1 = Long |
David Krause | d0f6715 | 2009-06-13 18:01:13 -0500 | [diff] [blame] | 3104 | */ |
| 3105 | public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; |
| 3106 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3107 | /** @hide */ |
| 3108 | public static final Validator DTMF_TONE_TYPE_WHEN_DIALING_VALIDATOR = sBooleanValidator; |
| 3109 | |
David Krause | d0f6715 | 2009-06-13 18:01:13 -0500 | [diff] [blame] | 3110 | /** |
David Krause | d0f6715 | 2009-06-13 18:01:13 -0500 | [diff] [blame] | 3111 | * Whether the hearing aid is enabled. The value is |
| 3112 | * boolean (1 or 0). |
| 3113 | * @hide |
| 3114 | */ |
| 3115 | public static final String HEARING_AID = "hearing_aid"; |
| 3116 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3117 | /** @hide */ |
| 3118 | public static final Validator HEARING_AID_VALIDATOR = sBooleanValidator; |
| 3119 | |
David Krause | d0f6715 | 2009-06-13 18:01:13 -0500 | [diff] [blame] | 3120 | /** |
| 3121 | * CDMA only settings |
| 3122 | * TTY Mode |
| 3123 | * 0 = OFF |
| 3124 | * 1 = FULL |
| 3125 | * 2 = VCO |
| 3126 | * 3 = HCO |
| 3127 | * @hide |
| 3128 | */ |
| 3129 | public static final String TTY_MODE = "tty_mode"; |
| 3130 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3131 | /** @hide */ |
| 3132 | public static final Validator TTY_MODE_VALIDATOR = new InclusiveIntegerRangeValidator(0, 3); |
| 3133 | |
David Krause | d0f6715 | 2009-06-13 18:01:13 -0500 | [diff] [blame] | 3134 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3135 | * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is |
| 3136 | * boolean (1 or 0). |
| 3137 | */ |
| 3138 | public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3139 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3140 | /** @hide */ |
| 3141 | public static final Validator SOUND_EFFECTS_ENABLED_VALIDATOR = sBooleanValidator; |
| 3142 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3143 | /** |
| 3144 | * Whether the haptic feedback (long presses, ...) are enabled. The value is |
| 3145 | * boolean (1 or 0). |
| 3146 | */ |
| 3147 | public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled"; |
Sanjay Jeyakumar | 21bf241 | 2009-07-09 13:31:48 -0700 | [diff] [blame] | 3148 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3149 | /** @hide */ |
| 3150 | public static final Validator HAPTIC_FEEDBACK_ENABLED_VALIDATOR = sBooleanValidator; |
| 3151 | |
Mike LeBeau | 48603e7 | 2009-06-05 00:27:00 +0100 | [diff] [blame] | 3152 | /** |
Bjorn Bringert | 24abb66 | 2010-09-21 12:21:18 +0100 | [diff] [blame] | 3153 | * @deprecated Each application that shows web suggestions should have its own |
| 3154 | * setting for this. |
Mike LeBeau | 48603e7 | 2009-06-05 00:27:00 +0100 | [diff] [blame] | 3155 | */ |
Bjorn Bringert | 24abb66 | 2010-09-21 12:21:18 +0100 | [diff] [blame] | 3156 | @Deprecated |
Mike LeBeau | 48603e7 | 2009-06-05 00:27:00 +0100 | [diff] [blame] | 3157 | public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3158 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3159 | /** @hide */ |
| 3160 | public static final Validator SHOW_WEB_SUGGESTIONS_VALIDATOR = sBooleanValidator; |
| 3161 | |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 3162 | /** |
Amith Yamasani | ae3ed70 | 2009-12-01 19:02:05 -0800 | [diff] [blame] | 3163 | * Whether the notification LED should repeatedly flash when a notification is |
| 3164 | * pending. The value is boolean (1 or 0). |
| 3165 | * @hide |
| 3166 | */ |
| 3167 | public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse"; |
| 3168 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3169 | /** @hide */ |
| 3170 | public static final Validator NOTIFICATION_LIGHT_PULSE_VALIDATOR = sBooleanValidator; |
| 3171 | |
Amith Yamasani | ae3ed70 | 2009-12-01 19:02:05 -0800 | [diff] [blame] | 3172 | /** |
Dianne Hackborn | 90d2db3 | 2010-02-11 22:19:06 -0800 | [diff] [blame] | 3173 | * Show pointer location on screen? |
| 3174 | * 0 = no |
| 3175 | * 1 = yes |
| 3176 | * @hide |
| 3177 | */ |
| 3178 | public static final String POINTER_LOCATION = "pointer_location"; |
| 3179 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3180 | /** @hide */ |
| 3181 | public static final Validator POINTER_LOCATION_VALIDATOR = sBooleanValidator; |
| 3182 | |
Dianne Hackborn | 90d2db3 | 2010-02-11 22:19:06 -0800 | [diff] [blame] | 3183 | /** |
Jeff Brown | daf4a12 | 2011-08-26 17:14:14 -0700 | [diff] [blame] | 3184 | * Show touch positions on screen? |
| 3185 | * 0 = no |
| 3186 | * 1 = yes |
| 3187 | * @hide |
| 3188 | */ |
| 3189 | public static final String SHOW_TOUCHES = "show_touches"; |
| 3190 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3191 | /** @hide */ |
| 3192 | public static final Validator SHOW_TOUCHES_VALIDATOR = sBooleanValidator; |
| 3193 | |
Jeff Brown | daf4a12 | 2011-08-26 17:14:14 -0700 | [diff] [blame] | 3194 | /** |
Dianne Hackborn | 16ec080 | 2014-08-15 18:32:33 -0700 | [diff] [blame] | 3195 | * Log raw orientation data from |
Jorim Jaggi | b10e33f | 2015-02-04 21:57:40 +0100 | [diff] [blame] | 3196 | * {@link com.android.server.policy.WindowOrientationListener} for use with the |
Jeff Brown | 4519f07 | 2011-01-23 13:16:01 -0800 | [diff] [blame] | 3197 | * orientationplot.py tool. |
| 3198 | * 0 = no |
| 3199 | * 1 = yes |
| 3200 | * @hide |
| 3201 | */ |
| 3202 | public static final String WINDOW_ORIENTATION_LISTENER_LOG = |
| 3203 | "window_orientation_listener_log"; |
| 3204 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3205 | /** @hide */ |
| 3206 | public static final Validator WINDOW_ORIENTATION_LISTENER_LOG_VALIDATOR = sBooleanValidator; |
| 3207 | |
Jeff Brown | 4519f07 | 2011-01-23 13:16:01 -0800 | [diff] [blame] | 3208 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3209 | * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED} |
| 3210 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3211 | * @hide |
| 3212 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3213 | @Deprecated |
| 3214 | public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3215 | |
| 3216 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3217 | * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED} |
| 3218 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3219 | * @hide |
| 3220 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3221 | @Deprecated |
| 3222 | public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3223 | |
| 3224 | /** |
| 3225 | * Whether to play sounds when the keyguard is shown and dismissed. |
| 3226 | * @hide |
| 3227 | */ |
| 3228 | public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled"; |
| 3229 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3230 | /** @hide */ |
| 3231 | public static final Validator LOCKSCREEN_SOUNDS_ENABLED_VALIDATOR = sBooleanValidator; |
| 3232 | |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3233 | /** |
Mike Lockwood | 7bef739 | 2011-10-20 16:51:53 -0400 | [diff] [blame] | 3234 | * Whether the lockscreen should be completely disabled. |
| 3235 | * @hide |
| 3236 | */ |
| 3237 | public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled"; |
| 3238 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3239 | /** @hide */ |
| 3240 | public static final Validator LOCKSCREEN_DISABLED_VALIDATOR = sBooleanValidator; |
| 3241 | |
Mike Lockwood | 7bef739 | 2011-10-20 16:51:53 -0400 | [diff] [blame] | 3242 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3243 | * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND} |
| 3244 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3245 | * @hide |
| 3246 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3247 | @Deprecated |
| 3248 | public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3249 | |
| 3250 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3251 | * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND} |
| 3252 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3253 | * @hide |
| 3254 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3255 | @Deprecated |
| 3256 | public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3257 | |
| 3258 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3259 | * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND} |
| 3260 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3261 | * @hide |
| 3262 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3263 | @Deprecated |
| 3264 | public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3265 | |
| 3266 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3267 | * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND} |
| 3268 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3269 | * @hide |
| 3270 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3271 | @Deprecated |
| 3272 | public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3273 | |
| 3274 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3275 | * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND} |
| 3276 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3277 | * @hide |
| 3278 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3279 | @Deprecated |
| 3280 | public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3281 | |
| 3282 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3283 | * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND} |
| 3284 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3285 | * @hide |
| 3286 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3287 | @Deprecated |
| 3288 | public static final String LOCK_SOUND = Global.LOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3289 | |
| 3290 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3291 | * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND} |
| 3292 | * instead |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3293 | * @hide |
| 3294 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3295 | @Deprecated |
| 3296 | public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND; |
Daniel Sandler | 0e9d2af | 2010-01-25 11:33:03 -0500 | [diff] [blame] | 3297 | |
| 3298 | /** |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 3299 | * Receive incoming SIP calls? |
| 3300 | * 0 = no |
| 3301 | * 1 = yes |
| 3302 | * @hide |
| 3303 | */ |
| 3304 | public static final String SIP_RECEIVE_CALLS = "sip_receive_calls"; |
| 3305 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3306 | /** @hide */ |
| 3307 | public static final Validator SIP_RECEIVE_CALLS_VALIDATOR = sBooleanValidator; |
| 3308 | |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 3309 | /** |
| 3310 | * Call Preference String. |
| 3311 | * "SIP_ALWAYS" : Always use SIP with network access |
| 3312 | * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 3313 | * @hide |
| 3314 | */ |
| 3315 | public static final String SIP_CALL_OPTIONS = "sip_call_options"; |
| 3316 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3317 | /** @hide */ |
| 3318 | public static final Validator SIP_CALL_OPTIONS_VALIDATOR = new DiscreteValueValidator( |
| 3319 | new String[] {"SIP_ALWAYS", "SIP_ADDRESS_ONLY"}); |
| 3320 | |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 3321 | /** |
| 3322 | * One of the sip call options: Always use SIP with network access. |
| 3323 | * @hide |
| 3324 | */ |
| 3325 | public static final String SIP_ALWAYS = "SIP_ALWAYS"; |
| 3326 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3327 | /** @hide */ |
| 3328 | public static final Validator SIP_ALWAYS_VALIDATOR = sBooleanValidator; |
| 3329 | |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 3330 | /** |
| 3331 | * One of the sip call options: Only if destination is a SIP address. |
| 3332 | * @hide |
| 3333 | */ |
| 3334 | public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY"; |
| 3335 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3336 | /** @hide */ |
| 3337 | public static final Validator SIP_ADDRESS_ONLY_VALIDATOR = sBooleanValidator; |
| 3338 | |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 3339 | /** |
Tyler Gunn | 2c830a2 | 2014-09-02 08:39:35 -0700 | [diff] [blame] | 3340 | * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that |
| 3341 | * the user should be prompted each time a call is made whether it should be placed using |
| 3342 | * SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with |
| 3343 | * SIP_ADDRESS_ONLY. |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 3344 | * @hide |
| 3345 | */ |
Tyler Gunn | 2c830a2 | 2014-09-02 08:39:35 -0700 | [diff] [blame] | 3346 | @Deprecated |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 3347 | public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME"; |
| 3348 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3349 | /** @hide */ |
| 3350 | public static final Validator SIP_ASK_ME_EACH_TIME_VALIDATOR = sBooleanValidator; |
| 3351 | |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 3352 | /** |
Jeff Brown | 1a84fd1 | 2011-06-02 01:26:32 -0700 | [diff] [blame] | 3353 | * Pointer speed setting. |
| 3354 | * This is an integer value in a range between -7 and +7, so there are 15 possible values. |
| 3355 | * -7 = slowest |
| 3356 | * 0 = default speed |
| 3357 | * +7 = fastest |
| 3358 | * @hide |
| 3359 | */ |
| 3360 | public static final String POINTER_SPEED = "pointer_speed"; |
| 3361 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3362 | /** @hide */ |
| 3363 | public static final Validator POINTER_SPEED_VALIDATOR = |
| 3364 | new InclusiveFloatRangeValidator(-7, 7); |
| 3365 | |
Jeff Brown | 1a84fd1 | 2011-06-02 01:26:32 -0700 | [diff] [blame] | 3366 | /** |
Jason Monk | 56e09b4 | 2014-07-18 10:29:14 -0400 | [diff] [blame] | 3367 | * Whether lock-to-app will be triggered by long-press on recents. |
| 3368 | * @hide |
| 3369 | */ |
| 3370 | public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled"; |
| 3371 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3372 | /** @hide */ |
| 3373 | public static final Validator LOCK_TO_APP_ENABLED_VALIDATOR = sBooleanValidator; |
| 3374 | |
Jason Monk | 56e09b4 | 2014-07-18 10:29:14 -0400 | [diff] [blame] | 3375 | /** |
Daniel Sandler | 2fdb68b | 2013-10-03 00:12:11 -0400 | [diff] [blame] | 3376 | * I am the lolrus. |
| 3377 | * <p> |
| 3378 | * Nonzero values indicate that the user has a bukkit. |
| 3379 | * Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>. |
| 3380 | * @hide |
| 3381 | */ |
| 3382 | public static final String EGG_MODE = "egg_mode"; |
| 3383 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3384 | /** @hide */ |
Svet Ganov | b1918a0 | 2015-05-15 09:32:55 -0700 | [diff] [blame] | 3385 | public static final Validator EGG_MODE_VALIDATOR = new Validator() { |
| 3386 | @Override |
| 3387 | public boolean validate(String value) { |
| 3388 | try { |
| 3389 | return Long.parseLong(value) >= 0; |
| 3390 | } catch (NumberFormatException e) { |
| 3391 | return false; |
| 3392 | } |
| 3393 | } |
| 3394 | }; |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3395 | |
| 3396 | /** |
| 3397 | * IMPORTANT: If you add a new public settings you also have to add it to |
| 3398 | * PUBLIC_SETTINGS below. If the new setting is hidden you have to add |
| 3399 | * it to PRIVATE_SETTINGS below. Also add a validator that can validate |
| 3400 | * the setting value. See an example above. |
| 3401 | */ |
| 3402 | |
Daniel Sandler | 2fdb68b | 2013-10-03 00:12:11 -0400 | [diff] [blame] | 3403 | /** |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 3404 | * Settings to backup. This is here so that it's in the same place as the settings |
| 3405 | * keys and easy to update. |
Svetoslav Ganov | a571a58 | 2011-09-20 18:32:20 -0700 | [diff] [blame] | 3406 | * |
| 3407 | * NOTE: Settings are backed up and restored in the order they appear |
| 3408 | * in this array. If you have one setting depending on another, |
| 3409 | * make sure that they are ordered appropriately. |
| 3410 | * |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 3411 | * @hide |
| 3412 | */ |
| 3413 | public static final String[] SETTINGS_TO_BACKUP = { |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 3414 | STAY_ON_WHILE_PLUGGED_IN, // moved to global |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 3415 | WIFI_USE_STATIC_IP, |
| 3416 | WIFI_STATIC_IP, |
| 3417 | WIFI_STATIC_GATEWAY, |
| 3418 | WIFI_STATIC_NETMASK, |
| 3419 | WIFI_STATIC_DNS1, |
| 3420 | WIFI_STATIC_DNS2, |
| 3421 | BLUETOOTH_DISCOVERABILITY, |
| 3422 | BLUETOOTH_DISCOVERABILITY_TIMEOUT, |
Casey Burkhardt | 86b867f | 2015-12-29 18:03:36 -0800 | [diff] [blame] | 3423 | FONT_SCALE, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 3424 | DIM_SCREEN, |
| 3425 | SCREEN_OFF_TIMEOUT, |
| 3426 | SCREEN_BRIGHTNESS, |
Christopher Tate | 362aca6 | 2009-09-25 15:58:03 -0700 | [diff] [blame] | 3427 | SCREEN_BRIGHTNESS_MODE, |
Dianne Hackborn | d9ea468 | 2012-01-20 18:36:40 -0800 | [diff] [blame] | 3428 | SCREEN_AUTO_BRIGHTNESS_ADJ, |
Jeff Brown | 7f6c231 | 2012-04-13 20:38:38 -0700 | [diff] [blame] | 3429 | VIBRATE_INPUT_DEVICES, |
Amith Yamasani | 8823c0a8 | 2009-07-07 14:30:17 -0700 | [diff] [blame] | 3430 | MODE_RINGER_STREAMS_AFFECTED, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 3431 | TEXT_AUTO_REPLACE, |
| 3432 | TEXT_AUTO_CAPS, |
| 3433 | TEXT_AUTO_PUNCTUATE, |
| 3434 | TEXT_SHOW_PASSWORD, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 3435 | AUTO_TIME, // moved to global |
| 3436 | AUTO_TIME_ZONE, // moved to global |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 3437 | TIME_12_24, |
| 3438 | DATE_FORMAT, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 3439 | DTMF_TONE_WHEN_DIALING, |
| 3440 | DTMF_TONE_TYPE_WHEN_DIALING, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 3441 | HEARING_AID, |
| 3442 | TTY_MODE, |
| 3443 | SOUND_EFFECTS_ENABLED, |
| 3444 | HAPTIC_FEEDBACK_ENABLED, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 3445 | POWER_SOUNDS_ENABLED, // moved to global |
| 3446 | DOCK_SOUNDS_ENABLED, // moved to global |
Christopher Tate | 14c2d79 | 2010-02-25 16:49:44 -0800 | [diff] [blame] | 3447 | LOCKSCREEN_SOUNDS_ENABLED, |
Amith Yamasani | ae3ed70 | 2009-12-01 19:02:05 -0800 | [diff] [blame] | 3448 | SHOW_WEB_SUGGESTIONS, |
Chung-yih Wang | 042e9bd | 2010-08-31 17:43:39 +0800 | [diff] [blame] | 3449 | SIP_CALL_OPTIONS, |
Nick Pelly | 038cabe | 2010-09-23 16:12:11 -0700 | [diff] [blame] | 3450 | SIP_RECEIVE_CALLS, |
Jeff Brown | 1a84fd1 | 2011-06-02 01:26:32 -0700 | [diff] [blame] | 3451 | POINTER_SPEED, |
Amith Yamasani | 622bf222 | 2013-09-06 13:54:28 -0700 | [diff] [blame] | 3452 | VIBRATE_WHEN_RINGING, |
| 3453 | RINGTONE, |
Jason Monk | 94cfd9d | 2014-10-31 13:18:21 -0400 | [diff] [blame] | 3454 | LOCK_TO_APP_ENABLED, |
Anna Galusza | fa7786c | 2015-12-22 10:53:44 -0800 | [diff] [blame] | 3455 | NOTIFICATION_SOUND, |
| 3456 | ACCELEROMETER_ROTATION |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 3457 | }; |
| 3458 | |
Sailesh Nepal | 1bd7876 | 2014-02-11 22:32:21 -0800 | [diff] [blame] | 3459 | /** |
Amith Yamasani | b0ff322 | 2015-03-04 09:56:14 -0800 | [diff] [blame] | 3460 | * These are all public system settings |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3461 | * |
Amith Yamasani | 4f7e2e3 | 2014-08-14 18:49:48 -0700 | [diff] [blame] | 3462 | * @hide |
| 3463 | */ |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3464 | public static final Set<String> PUBLIC_SETTINGS = new ArraySet<>(); |
| 3465 | static { |
| 3466 | PUBLIC_SETTINGS.add(END_BUTTON_BEHAVIOR); |
| 3467 | PUBLIC_SETTINGS.add(WIFI_USE_STATIC_IP); |
| 3468 | PUBLIC_SETTINGS.add(WIFI_STATIC_IP); |
| 3469 | PUBLIC_SETTINGS.add(WIFI_STATIC_GATEWAY); |
| 3470 | PUBLIC_SETTINGS.add(WIFI_STATIC_NETMASK); |
| 3471 | PUBLIC_SETTINGS.add(WIFI_STATIC_DNS1); |
| 3472 | PUBLIC_SETTINGS.add(WIFI_STATIC_DNS2); |
| 3473 | PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY); |
| 3474 | PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY_TIMEOUT); |
| 3475 | PUBLIC_SETTINGS.add(NEXT_ALARM_FORMATTED); |
| 3476 | PUBLIC_SETTINGS.add(FONT_SCALE); |
| 3477 | PUBLIC_SETTINGS.add(DIM_SCREEN); |
| 3478 | PUBLIC_SETTINGS.add(SCREEN_OFF_TIMEOUT); |
| 3479 | PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS); |
| 3480 | PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_MODE); |
| 3481 | PUBLIC_SETTINGS.add(MODE_RINGER_STREAMS_AFFECTED); |
| 3482 | PUBLIC_SETTINGS.add(MUTE_STREAMS_AFFECTED); |
| 3483 | PUBLIC_SETTINGS.add(VIBRATE_ON); |
| 3484 | PUBLIC_SETTINGS.add(VOLUME_RING); |
| 3485 | PUBLIC_SETTINGS.add(VOLUME_SYSTEM); |
| 3486 | PUBLIC_SETTINGS.add(VOLUME_VOICE); |
| 3487 | PUBLIC_SETTINGS.add(VOLUME_MUSIC); |
| 3488 | PUBLIC_SETTINGS.add(VOLUME_ALARM); |
| 3489 | PUBLIC_SETTINGS.add(VOLUME_NOTIFICATION); |
| 3490 | PUBLIC_SETTINGS.add(VOLUME_BLUETOOTH_SCO); |
| 3491 | PUBLIC_SETTINGS.add(RINGTONE); |
| 3492 | PUBLIC_SETTINGS.add(NOTIFICATION_SOUND); |
| 3493 | PUBLIC_SETTINGS.add(ALARM_ALERT); |
| 3494 | PUBLIC_SETTINGS.add(TEXT_AUTO_REPLACE); |
| 3495 | PUBLIC_SETTINGS.add(TEXT_AUTO_CAPS); |
| 3496 | PUBLIC_SETTINGS.add(TEXT_AUTO_PUNCTUATE); |
| 3497 | PUBLIC_SETTINGS.add(TEXT_SHOW_PASSWORD); |
| 3498 | PUBLIC_SETTINGS.add(SHOW_GTALK_SERVICE_STATUS); |
| 3499 | PUBLIC_SETTINGS.add(WALLPAPER_ACTIVITY); |
| 3500 | PUBLIC_SETTINGS.add(TIME_12_24); |
| 3501 | PUBLIC_SETTINGS.add(DATE_FORMAT); |
| 3502 | PUBLIC_SETTINGS.add(SETUP_WIZARD_HAS_RUN); |
| 3503 | PUBLIC_SETTINGS.add(ACCELEROMETER_ROTATION); |
| 3504 | PUBLIC_SETTINGS.add(USER_ROTATION); |
| 3505 | PUBLIC_SETTINGS.add(DTMF_TONE_WHEN_DIALING); |
| 3506 | PUBLIC_SETTINGS.add(SOUND_EFFECTS_ENABLED); |
| 3507 | PUBLIC_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED); |
| 3508 | PUBLIC_SETTINGS.add(SHOW_WEB_SUGGESTIONS); |
Svetoslav Ganov | d263163 | 2015-12-09 16:29:22 -0800 | [diff] [blame] | 3509 | PUBLIC_SETTINGS.add(VIBRATE_WHEN_RINGING); |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3510 | } |
| 3511 | |
| 3512 | /** |
| 3513 | * These are all hidden system settings. |
| 3514 | * |
| 3515 | * @hide |
| 3516 | */ |
| 3517 | public static final Set<String> PRIVATE_SETTINGS = new ArraySet<>(); |
| 3518 | static { |
| 3519 | PRIVATE_SETTINGS.add(WIFI_USE_STATIC_IP); |
| 3520 | PRIVATE_SETTINGS.add(END_BUTTON_BEHAVIOR); |
| 3521 | PRIVATE_SETTINGS.add(ADVANCED_SETTINGS); |
| 3522 | PRIVATE_SETTINGS.add(SCREEN_AUTO_BRIGHTNESS_ADJ); |
| 3523 | PRIVATE_SETTINGS.add(VIBRATE_INPUT_DEVICES); |
| 3524 | PRIVATE_SETTINGS.add(VOLUME_MASTER); |
Andy Hung | f04b84d | 2015-12-18 17:33:27 -0800 | [diff] [blame] | 3525 | PRIVATE_SETTINGS.add(MASTER_MONO); |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3526 | PRIVATE_SETTINGS.add(NOTIFICATIONS_USE_RING_VOLUME); |
| 3527 | PRIVATE_SETTINGS.add(VIBRATE_IN_SILENT); |
| 3528 | PRIVATE_SETTINGS.add(MEDIA_BUTTON_RECEIVER); |
| 3529 | PRIVATE_SETTINGS.add(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY); |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3530 | PRIVATE_SETTINGS.add(DTMF_TONE_TYPE_WHEN_DIALING); |
| 3531 | PRIVATE_SETTINGS.add(HEARING_AID); |
| 3532 | PRIVATE_SETTINGS.add(TTY_MODE); |
| 3533 | PRIVATE_SETTINGS.add(NOTIFICATION_LIGHT_PULSE); |
| 3534 | PRIVATE_SETTINGS.add(POINTER_LOCATION); |
| 3535 | PRIVATE_SETTINGS.add(SHOW_TOUCHES); |
| 3536 | PRIVATE_SETTINGS.add(WINDOW_ORIENTATION_LISTENER_LOG); |
| 3537 | PRIVATE_SETTINGS.add(POWER_SOUNDS_ENABLED); |
| 3538 | PRIVATE_SETTINGS.add(DOCK_SOUNDS_ENABLED); |
| 3539 | PRIVATE_SETTINGS.add(LOCKSCREEN_SOUNDS_ENABLED); |
| 3540 | PRIVATE_SETTINGS.add(LOCKSCREEN_DISABLED); |
| 3541 | PRIVATE_SETTINGS.add(LOW_BATTERY_SOUND); |
| 3542 | PRIVATE_SETTINGS.add(DESK_DOCK_SOUND); |
| 3543 | PRIVATE_SETTINGS.add(DESK_UNDOCK_SOUND); |
| 3544 | PRIVATE_SETTINGS.add(CAR_DOCK_SOUND); |
| 3545 | PRIVATE_SETTINGS.add(CAR_UNDOCK_SOUND); |
| 3546 | PRIVATE_SETTINGS.add(LOCK_SOUND); |
| 3547 | PRIVATE_SETTINGS.add(UNLOCK_SOUND); |
| 3548 | PRIVATE_SETTINGS.add(SIP_RECEIVE_CALLS); |
| 3549 | PRIVATE_SETTINGS.add(SIP_CALL_OPTIONS); |
| 3550 | PRIVATE_SETTINGS.add(SIP_ALWAYS); |
| 3551 | PRIVATE_SETTINGS.add(SIP_ADDRESS_ONLY); |
| 3552 | PRIVATE_SETTINGS.add(SIP_ASK_ME_EACH_TIME); |
| 3553 | PRIVATE_SETTINGS.add(POINTER_SPEED); |
| 3554 | PRIVATE_SETTINGS.add(LOCK_TO_APP_ENABLED); |
| 3555 | PRIVATE_SETTINGS.add(EGG_MODE); |
| 3556 | } |
| 3557 | |
| 3558 | /** |
Amith Yamasani | b0ff322 | 2015-03-04 09:56:14 -0800 | [diff] [blame] | 3559 | * These are all public system settings |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3560 | * |
| 3561 | * @hide |
| 3562 | */ |
| 3563 | public static final Map<String, Validator> VALIDATORS = new ArrayMap<>(); |
| 3564 | static { |
| 3565 | VALIDATORS.put(END_BUTTON_BEHAVIOR,END_BUTTON_BEHAVIOR_VALIDATOR); |
| 3566 | VALIDATORS.put(WIFI_USE_STATIC_IP, WIFI_USE_STATIC_IP_VALIDATOR); |
| 3567 | VALIDATORS.put(BLUETOOTH_DISCOVERABILITY, BLUETOOTH_DISCOVERABILITY_VALIDATOR); |
| 3568 | VALIDATORS.put(BLUETOOTH_DISCOVERABILITY_TIMEOUT, |
| 3569 | BLUETOOTH_DISCOVERABILITY_TIMEOUT_VALIDATOR); |
| 3570 | VALIDATORS.put(NEXT_ALARM_FORMATTED, NEXT_ALARM_FORMATTED_VALIDATOR); |
| 3571 | VALIDATORS.put(FONT_SCALE, FONT_SCALE_VALIDATOR); |
| 3572 | VALIDATORS.put(DIM_SCREEN, DIM_SCREEN_VALIDATOR); |
| 3573 | VALIDATORS.put(SCREEN_OFF_TIMEOUT, SCREEN_OFF_TIMEOUT_VALIDATOR); |
| 3574 | VALIDATORS.put(SCREEN_BRIGHTNESS, SCREEN_BRIGHTNESS_VALIDATOR); |
| 3575 | VALIDATORS.put(SCREEN_BRIGHTNESS_MODE, SCREEN_BRIGHTNESS_MODE_VALIDATOR); |
| 3576 | VALIDATORS.put(MODE_RINGER_STREAMS_AFFECTED, MODE_RINGER_STREAMS_AFFECTED_VALIDATOR); |
| 3577 | VALIDATORS.put(MUTE_STREAMS_AFFECTED, MUTE_STREAMS_AFFECTED_VALIDATOR); |
| 3578 | VALIDATORS.put(VIBRATE_ON, VIBRATE_ON_VALIDATOR); |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3579 | VALIDATORS.put(RINGTONE, RINGTONE_VALIDATOR); |
| 3580 | VALIDATORS.put(NOTIFICATION_SOUND, NOTIFICATION_SOUND_VALIDATOR); |
| 3581 | VALIDATORS.put(ALARM_ALERT, ALARM_ALERT_VALIDATOR); |
| 3582 | VALIDATORS.put(TEXT_AUTO_REPLACE, TEXT_AUTO_REPLACE_VALIDATOR); |
| 3583 | VALIDATORS.put(TEXT_AUTO_CAPS, TEXT_AUTO_CAPS_VALIDATOR); |
| 3584 | VALIDATORS.put(TEXT_AUTO_PUNCTUATE, TEXT_AUTO_PUNCTUATE_VALIDATOR); |
| 3585 | VALIDATORS.put(TEXT_SHOW_PASSWORD, TEXT_SHOW_PASSWORD_VALIDATOR); |
| 3586 | VALIDATORS.put(SHOW_GTALK_SERVICE_STATUS, SHOW_GTALK_SERVICE_STATUS_VALIDATOR); |
| 3587 | VALIDATORS.put(WALLPAPER_ACTIVITY, WALLPAPER_ACTIVITY_VALIDATOR); |
| 3588 | VALIDATORS.put(TIME_12_24, TIME_12_24_VALIDATOR); |
| 3589 | VALIDATORS.put(DATE_FORMAT, DATE_FORMAT_VALIDATOR); |
| 3590 | VALIDATORS.put(SETUP_WIZARD_HAS_RUN, SETUP_WIZARD_HAS_RUN_VALIDATOR); |
| 3591 | VALIDATORS.put(ACCELEROMETER_ROTATION, ACCELEROMETER_ROTATION_VALIDATOR); |
| 3592 | VALIDATORS.put(USER_ROTATION, USER_ROTATION_VALIDATOR); |
| 3593 | VALIDATORS.put(DTMF_TONE_WHEN_DIALING, DTMF_TONE_WHEN_DIALING_VALIDATOR); |
| 3594 | VALIDATORS.put(SOUND_EFFECTS_ENABLED, SOUND_EFFECTS_ENABLED_VALIDATOR); |
| 3595 | VALIDATORS.put(HAPTIC_FEEDBACK_ENABLED, HAPTIC_FEEDBACK_ENABLED_VALIDATOR); |
| 3596 | VALIDATORS.put(SHOW_WEB_SUGGESTIONS, SHOW_WEB_SUGGESTIONS_VALIDATOR); |
| 3597 | VALIDATORS.put(WIFI_USE_STATIC_IP, WIFI_USE_STATIC_IP_VALIDATOR); |
| 3598 | VALIDATORS.put(END_BUTTON_BEHAVIOR, END_BUTTON_BEHAVIOR_VALIDATOR); |
| 3599 | VALIDATORS.put(ADVANCED_SETTINGS, ADVANCED_SETTINGS_VALIDATOR); |
| 3600 | VALIDATORS.put(SCREEN_AUTO_BRIGHTNESS_ADJ, SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR); |
| 3601 | VALIDATORS.put(VIBRATE_INPUT_DEVICES, VIBRATE_INPUT_DEVICES_VALIDATOR); |
Andy Hung | f04b84d | 2015-12-18 17:33:27 -0800 | [diff] [blame] | 3602 | VALIDATORS.put(MASTER_MONO, MASTER_MONO_VALIDATOR); |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 3603 | VALIDATORS.put(NOTIFICATIONS_USE_RING_VOLUME, NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR); |
| 3604 | VALIDATORS.put(VIBRATE_IN_SILENT, VIBRATE_IN_SILENT_VALIDATOR); |
| 3605 | VALIDATORS.put(MEDIA_BUTTON_RECEIVER, MEDIA_BUTTON_RECEIVER_VALIDATOR); |
| 3606 | VALIDATORS.put(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, |
| 3607 | HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY_VALIDATOR); |
| 3608 | VALIDATORS.put(VIBRATE_WHEN_RINGING, VIBRATE_WHEN_RINGING_VALIDATOR); |
| 3609 | VALIDATORS.put(DTMF_TONE_TYPE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING_VALIDATOR); |
| 3610 | VALIDATORS.put(HEARING_AID, HEARING_AID_VALIDATOR); |
| 3611 | VALIDATORS.put(TTY_MODE, TTY_MODE_VALIDATOR); |
| 3612 | VALIDATORS.put(NOTIFICATION_LIGHT_PULSE, NOTIFICATION_LIGHT_PULSE_VALIDATOR); |
| 3613 | VALIDATORS.put(POINTER_LOCATION, POINTER_LOCATION_VALIDATOR); |
| 3614 | VALIDATORS.put(SHOW_TOUCHES, SHOW_TOUCHES_VALIDATOR); |
| 3615 | VALIDATORS.put(WINDOW_ORIENTATION_LISTENER_LOG, |
| 3616 | WINDOW_ORIENTATION_LISTENER_LOG_VALIDATOR); |
| 3617 | VALIDATORS.put(LOCKSCREEN_SOUNDS_ENABLED, LOCKSCREEN_SOUNDS_ENABLED_VALIDATOR); |
| 3618 | VALIDATORS.put(LOCKSCREEN_DISABLED, LOCKSCREEN_DISABLED_VALIDATOR); |
| 3619 | VALIDATORS.put(SIP_RECEIVE_CALLS, SIP_RECEIVE_CALLS_VALIDATOR); |
| 3620 | VALIDATORS.put(SIP_CALL_OPTIONS, SIP_CALL_OPTIONS_VALIDATOR); |
| 3621 | VALIDATORS.put(SIP_ALWAYS, SIP_ALWAYS_VALIDATOR); |
| 3622 | VALIDATORS.put(SIP_ADDRESS_ONLY, SIP_ADDRESS_ONLY_VALIDATOR); |
| 3623 | VALIDATORS.put(SIP_ASK_ME_EACH_TIME, SIP_ASK_ME_EACH_TIME_VALIDATOR); |
| 3624 | VALIDATORS.put(POINTER_SPEED, POINTER_SPEED_VALIDATOR); |
| 3625 | VALIDATORS.put(LOCK_TO_APP_ENABLED, LOCK_TO_APP_ENABLED_VALIDATOR); |
| 3626 | VALIDATORS.put(EGG_MODE, EGG_MODE_VALIDATOR); |
| 3627 | VALIDATORS.put(WIFI_STATIC_IP, WIFI_STATIC_IP_VALIDATOR); |
| 3628 | VALIDATORS.put(WIFI_STATIC_GATEWAY, WIFI_STATIC_GATEWAY_VALIDATOR); |
| 3629 | VALIDATORS.put(WIFI_STATIC_NETMASK, WIFI_STATIC_NETMASK_VALIDATOR); |
| 3630 | VALIDATORS.put(WIFI_STATIC_DNS1, WIFI_STATIC_DNS1_VALIDATOR); |
| 3631 | VALIDATORS.put(WIFI_STATIC_DNS2, WIFI_STATIC_DNS2_VALIDATOR); |
| 3632 | } |
| 3633 | |
| 3634 | /** |
| 3635 | * These entries are considered common between the personal and the managed profile, |
| 3636 | * since the managed profile doesn't get to change them. |
| 3637 | */ |
| 3638 | private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>(); |
| 3639 | static { |
| 3640 | CLONE_TO_MANAGED_PROFILE.add(DATE_FORMAT); |
| 3641 | CLONE_TO_MANAGED_PROFILE.add(HAPTIC_FEEDBACK_ENABLED); |
| 3642 | CLONE_TO_MANAGED_PROFILE.add(SOUND_EFFECTS_ENABLED); |
| 3643 | CLONE_TO_MANAGED_PROFILE.add(TEXT_SHOW_PASSWORD); |
| 3644 | CLONE_TO_MANAGED_PROFILE.add(TIME_12_24); |
| 3645 | } |
| 3646 | |
| 3647 | /** @hide */ |
| 3648 | public static void getCloneToManagedProfileSettings(Set<String> outKeySet) { |
| 3649 | outKeySet.addAll(CLONE_TO_MANAGED_PROFILE); |
| 3650 | } |
Amith Yamasani | 4f7e2e3 | 2014-08-14 18:49:48 -0700 | [diff] [blame] | 3651 | |
| 3652 | /** |
Sailesh Nepal | 1bd7876 | 2014-02-11 22:32:21 -0800 | [diff] [blame] | 3653 | * When to use Wi-Fi calling |
| 3654 | * |
| 3655 | * @see android.telephony.TelephonyManager.WifiCallingChoices |
| 3656 | * @hide |
| 3657 | */ |
| 3658 | public static final String WHEN_TO_MAKE_WIFI_CALLS = "when_to_make_wifi_calls"; |
| 3659 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3660 | // Settings moved to Settings.Secure |
| 3661 | |
| 3662 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3663 | * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3664 | * instead |
| 3665 | */ |
| 3666 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3667 | public static final String ADB_ENABLED = Global.ADB_ENABLED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3668 | |
| 3669 | /** |
| 3670 | * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead |
| 3671 | */ |
| 3672 | @Deprecated |
| 3673 | public static final String ANDROID_ID = Secure.ANDROID_ID; |
| 3674 | |
| 3675 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3676 | * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3677 | */ |
| 3678 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3679 | public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3680 | |
| 3681 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3682 | * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3683 | */ |
| 3684 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3685 | public static final String DATA_ROAMING = Global.DATA_ROAMING; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3686 | |
| 3687 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3688 | * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3689 | */ |
| 3690 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3691 | public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3692 | |
| 3693 | /** |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 3694 | * @deprecated Use {@link android.provider.Settings.Global#HTTP_PROXY} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3695 | */ |
| 3696 | @Deprecated |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 3697 | public static final String HTTP_PROXY = Global.HTTP_PROXY; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3698 | |
| 3699 | /** |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 3700 | * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3701 | */ |
| 3702 | @Deprecated |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 3703 | public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3704 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3705 | /** |
| 3706 | * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED} |
| 3707 | * instead |
| 3708 | */ |
| 3709 | @Deprecated |
| 3710 | public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED; |
| 3711 | |
| 3712 | /** |
| 3713 | * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead |
| 3714 | */ |
| 3715 | @Deprecated |
| 3716 | public static final String LOGGING_ID = Secure.LOGGING_ID; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3717 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3718 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3719 | * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3720 | */ |
| 3721 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3722 | public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3723 | |
| 3724 | /** |
| 3725 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED} |
| 3726 | * instead |
| 3727 | */ |
| 3728 | @Deprecated |
| 3729 | public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED; |
| 3730 | |
| 3731 | /** |
| 3732 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE} |
| 3733 | * instead |
| 3734 | */ |
| 3735 | @Deprecated |
| 3736 | public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE; |
| 3737 | |
| 3738 | /** |
| 3739 | * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL} |
| 3740 | * instead |
| 3741 | */ |
| 3742 | @Deprecated |
| 3743 | public static final String PARENTAL_CONTROL_REDIRECT_URL = |
| 3744 | Secure.PARENTAL_CONTROL_REDIRECT_URL; |
| 3745 | |
| 3746 | /** |
| 3747 | * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead |
| 3748 | */ |
| 3749 | @Deprecated |
| 3750 | public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME; |
| 3751 | |
| 3752 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3753 | * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3754 | */ |
| 3755 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3756 | public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3757 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3758 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3759 | * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3760 | */ |
| 3761 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3762 | public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3763 | |
Dianne Hackborn | 4a51c20 | 2009-08-21 15:14:02 -0700 | [diff] [blame] | 3764 | /** |
| 3765 | * @deprecated Use |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3766 | * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead |
Dianne Hackborn | 4a51c20 | 2009-08-21 15:14:02 -0700 | [diff] [blame] | 3767 | */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3768 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3769 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3770 | |
Dianne Hackborn | 4a51c20 | 2009-08-21 15:14:02 -0700 | [diff] [blame] | 3771 | /** |
| 3772 | * @deprecated Use |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3773 | * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead |
Dianne Hackborn | 4a51c20 | 2009-08-21 15:14:02 -0700 | [diff] [blame] | 3774 | */ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3775 | @Deprecated |
| 3776 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3777 | Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3778 | |
| 3779 | /** |
| 3780 | * @deprecated Use |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3781 | * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3782 | */ |
| 3783 | @Deprecated |
| 3784 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3785 | Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3786 | |
| 3787 | /** |
| 3788 | * @deprecated Use |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3789 | * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3790 | */ |
| 3791 | @Deprecated |
| 3792 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3793 | Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3794 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3795 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3796 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3797 | * instead |
| 3798 | */ |
| 3799 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3800 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = Global.WIFI_NUM_OPEN_NETWORKS_KEPT; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3801 | |
| 3802 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3803 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3804 | */ |
| 3805 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3806 | public static final String WIFI_ON = Global.WIFI_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3807 | |
| 3808 | /** |
| 3809 | * @deprecated Use |
| 3810 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE} |
| 3811 | * instead |
| 3812 | */ |
| 3813 | @Deprecated |
| 3814 | public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = |
| 3815 | Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE; |
| 3816 | |
| 3817 | /** |
| 3818 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead |
| 3819 | */ |
| 3820 | @Deprecated |
| 3821 | public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT; |
| 3822 | |
| 3823 | /** |
| 3824 | * @deprecated Use |
| 3825 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead |
| 3826 | */ |
| 3827 | @Deprecated |
| 3828 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = |
| 3829 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 3830 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3831 | /** |
| 3832 | * @deprecated Use |
| 3833 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead |
| 3834 | */ |
| 3835 | @Deprecated |
| 3836 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = |
| 3837 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED; |
| 3838 | |
| 3839 | /** |
| 3840 | * @deprecated Use |
| 3841 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS} |
| 3842 | * instead |
| 3843 | */ |
| 3844 | @Deprecated |
| 3845 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = |
| 3846 | Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS; |
| 3847 | |
| 3848 | /** |
| 3849 | * @deprecated Use |
| 3850 | * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead |
| 3851 | */ |
| 3852 | @Deprecated |
| 3853 | public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = |
| 3854 | Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT; |
| 3855 | |
| 3856 | /** |
| 3857 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS} |
| 3858 | * instead |
| 3859 | */ |
| 3860 | @Deprecated |
| 3861 | public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS; |
| 3862 | |
| 3863 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3864 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3865 | */ |
| 3866 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3867 | public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3868 | |
| 3869 | /** |
| 3870 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead |
| 3871 | */ |
| 3872 | @Deprecated |
| 3873 | public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT; |
| 3874 | |
| 3875 | /** |
| 3876 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS} |
| 3877 | * instead |
| 3878 | */ |
| 3879 | @Deprecated |
| 3880 | public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS; |
| 3881 | |
| 3882 | /** |
| 3883 | * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS} |
| 3884 | * instead |
| 3885 | */ |
| 3886 | @Deprecated |
| 3887 | public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = |
| 3888 | Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS; |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 3889 | |
| 3890 | /** |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 3891 | * Checks if the specified app can modify system settings. As of API |
| 3892 | * level 23, an app cannot modify system settings unless it declares the |
| 3893 | * {@link android.Manifest.permission#WRITE_SETTINGS} |
| 3894 | * permission in its manifest, <em>and</em> the user specifically grants |
| 3895 | * the app this capability. To prompt the user to grant this approval, |
| 3896 | * the app must send an intent with the action {@link |
| 3897 | * android.provider.Settings#ACTION_MANAGE_WRITE_SETTINGS}, which causes |
| 3898 | * the system to display a permission management screen. |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 3899 | * |
Trevor Johns | 682c24e | 2016-04-12 10:13:47 -0700 | [diff] [blame] | 3900 | * @param context App context. |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 3901 | * @return true if the calling app can write to system settings, false otherwise |
| 3902 | */ |
| 3903 | public static boolean canWrite(Context context) { |
Svet Ganov | 94ba4017 | 2016-04-03 22:04:22 -0700 | [diff] [blame] | 3904 | return isCallingPackageAllowedToWriteSettings(context, Process.myUid(), |
| 3905 | context.getOpPackageName(), false); |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 3906 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3907 | } |
| 3908 | |
| 3909 | /** |
| 3910 | * Secure system settings, containing system preferences that applications |
| 3911 | * can read but are not allowed to write. These are for preferences that |
| 3912 | * the user must explicitly modify through the system UI or specialized |
| 3913 | * APIs for those values, not modified directly by applications. |
| 3914 | */ |
| 3915 | public static final class Secure extends NameValueTable { |
| 3916 | public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version"; |
| 3917 | |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 3918 | /** |
| 3919 | * The content:// style URL for this table |
| 3920 | */ |
| 3921 | public static final Uri CONTENT_URI = |
| 3922 | Uri.parse("content://" + AUTHORITY + "/secure"); |
| 3923 | |
Brad Fitzpatrick | 1877d01 | 2010-03-04 17:48:13 -0800 | [diff] [blame] | 3924 | // Populated lazily, guarded by class object: |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 3925 | private static final NameValueCache sNameValueCache = new NameValueCache( |
| 3926 | SYS_PROP_SETTING_VERSION, |
| 3927 | CONTENT_URI, |
| 3928 | CALL_METHOD_GET_SECURE, |
| 3929 | CALL_METHOD_PUT_SECURE); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 3930 | |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 3931 | private static ILockSettings sLockSettings = null; |
| 3932 | |
Amith Yamasani | 7ab8c4a | 2012-04-06 09:27:12 -0700 | [diff] [blame] | 3933 | private static boolean sIsSystemProcess; |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 3934 | private static final HashSet<String> MOVED_TO_LOCK_SETTINGS; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3935 | private static final HashSet<String> MOVED_TO_GLOBAL; |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 3936 | static { |
| 3937 | MOVED_TO_LOCK_SETTINGS = new HashSet<String>(3); |
| 3938 | MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED); |
| 3939 | MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE); |
| 3940 | MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3941 | |
| 3942 | MOVED_TO_GLOBAL = new HashSet<String>(); |
| 3943 | MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED); |
| 3944 | MOVED_TO_GLOBAL.add(Settings.Global.ASSISTED_GPS_ENABLED); |
| 3945 | MOVED_TO_GLOBAL.add(Settings.Global.BLUETOOTH_ON); |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 3946 | MOVED_TO_GLOBAL.add(Settings.Global.BUGREPORT_IN_POWER_MENU); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3947 | MOVED_TO_GLOBAL.add(Settings.Global.CDMA_CELL_BROADCAST_SMS); |
| 3948 | MOVED_TO_GLOBAL.add(Settings.Global.CDMA_ROAMING_MODE); |
| 3949 | MOVED_TO_GLOBAL.add(Settings.Global.CDMA_SUBSCRIPTION_MODE); |
| 3950 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE); |
| 3951 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI); |
| 3952 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_ROAMING); |
| 3953 | MOVED_TO_GLOBAL.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED); |
| 3954 | MOVED_TO_GLOBAL.add(Settings.Global.DEVICE_PROVISIONED); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3955 | MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_SIZE_FORCED); |
| 3956 | MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE); |
| 3957 | MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3958 | MOVED_TO_GLOBAL.add(Settings.Global.MOBILE_DATA); |
| 3959 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION); |
| 3960 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_DELETE_AGE); |
| 3961 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES); |
| 3962 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE); |
| 3963 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_ENABLED); |
| 3964 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES); |
| 3965 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_POLL_INTERVAL); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3966 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_SAMPLE_ENABLED); |
| 3967 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE); |
| 3968 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION); |
| 3969 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_DELETE_AGE); |
| 3970 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES); |
| 3971 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_ROTATE_AGE); |
| 3972 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION); |
| 3973 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE); |
| 3974 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES); |
| 3975 | MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE); |
| 3976 | MOVED_TO_GLOBAL.add(Settings.Global.NETWORK_PREFERENCE); |
| 3977 | MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_DIFF); |
| 3978 | MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING); |
| 3979 | MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER); |
| 3980 | MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT); |
| 3981 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT); |
| 3982 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS); |
| 3983 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT); |
| 3984 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS); |
| 3985 | MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT); |
| 3986 | MOVED_TO_GLOBAL.add(Settings.Global.SAMPLING_PROFILER_MS); |
| 3987 | MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL); |
| 3988 | MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST); |
| 3989 | MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL); |
| 3990 | MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_APN); |
| 3991 | MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_REQUIRED); |
| 3992 | MOVED_TO_GLOBAL.add(Settings.Global.TETHER_SUPPORTED); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3993 | MOVED_TO_GLOBAL.add(Settings.Global.USB_MASS_STORAGE_ENABLED); |
| 3994 | MOVED_TO_GLOBAL.add(Settings.Global.USE_GOOGLE_MAIL); |
Robert Greenwalt | 3ea0c99 | 2013-10-03 21:13:49 +0000 | [diff] [blame] | 3995 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_COUNTRY_CODE); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 3996 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS); |
| 3997 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FREQUENCY_BAND); |
| 3998 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_IDLE_MS); |
| 3999 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT); |
| 4000 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS); |
| 4001 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); |
| 4002 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); |
| 4003 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT); |
| 4004 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON); |
| 4005 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME); |
| 4006 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SAVED_STATE); |
| 4007 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS); |
| 4008 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED); |
Nathan Harold | 29589fc | 2016-03-30 21:53:48 -0700 | [diff] [blame] | 4009 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED); |
vandwalle | 7c3606c | 2014-03-31 19:12:07 -0700 | [diff] [blame] | 4010 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ENHANCED_AUTO_JOIN); |
| 4011 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORK_SHOW_RSSI); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4012 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_ON); |
| 4013 | MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4014 | MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON); |
Christopher Tate | c868b64 | 2012-09-12 17:41:04 -0700 | [diff] [blame] | 4015 | MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_ENABLE); |
| 4016 | MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT); |
| 4017 | MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE); |
| 4018 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS); |
| 4019 | MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS); |
| 4020 | MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4021 | MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL); |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 4022 | MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD); |
| 4023 | MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_THRESHOLD); |
| 4024 | MOVED_TO_GLOBAL.add(Settings.Global.SEND_ACTION_APP_ERROR); |
| 4025 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_AGE_SECONDS); |
| 4026 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_MAX_FILES); |
| 4027 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_KB); |
| 4028 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_PERCENT); |
| 4029 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_RESERVE_PERCENT); |
| 4030 | MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_TAG_PREFIX); |
| 4031 | MOVED_TO_GLOBAL.add(Settings.Global.ERROR_LOGCAT_PREFIX); |
| 4032 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL); |
| 4033 | MOVED_TO_GLOBAL.add(Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD); |
| 4034 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE); |
| 4035 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES); |
| 4036 | MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES); |
| 4037 | MOVED_TO_GLOBAL.add(Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS); |
| 4038 | MOVED_TO_GLOBAL.add(Settings.Global.CONNECTIVITY_CHANGE_DELAY); |
| 4039 | MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED); |
| 4040 | MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_SERVER); |
| 4041 | MOVED_TO_GLOBAL.add(Settings.Global.NSD_ON); |
| 4042 | MOVED_TO_GLOBAL.add(Settings.Global.SET_INSTALL_LOCATION); |
| 4043 | MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_INSTALL_LOCATION); |
| 4044 | MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY); |
| 4045 | MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY); |
| 4046 | MOVED_TO_GLOBAL.add(Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT); |
| 4047 | MOVED_TO_GLOBAL.add(Settings.Global.HTTP_PROXY); |
| 4048 | MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_HOST); |
| 4049 | MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_PORT); |
| 4050 | MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST); |
| 4051 | MOVED_TO_GLOBAL.add(Settings.Global.SET_GLOBAL_HTTP_PROXY); |
| 4052 | MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER); |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 4053 | MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE); |
Hui Shu | 2267177 | 2014-10-01 21:41:07 +0000 | [diff] [blame] | 4054 | MOVED_TO_GLOBAL.add(Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4055 | } |
| 4056 | |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 4057 | /** @hide */ |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 4058 | public static void getMovedToGlobalSettings(Set<String> outKeySet) { |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 4059 | outKeySet.addAll(MOVED_TO_GLOBAL); |
| 4060 | } |
| 4061 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4062 | /** |
| 4063 | * Look up a name in the database. |
| 4064 | * @param resolver to access the database with |
| 4065 | * @param name to look up in the table |
| 4066 | * @return the corresponding value, or null if not present |
| 4067 | */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 4068 | public static String getString(ContentResolver resolver, String name) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4069 | return getStringForUser(resolver, name, UserHandle.myUserId()); |
| 4070 | } |
| 4071 | |
| 4072 | /** @hide */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 4073 | public static String getStringForUser(ContentResolver resolver, String name, |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4074 | int userHandle) { |
| 4075 | if (MOVED_TO_GLOBAL.contains(name)) { |
| 4076 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" |
| 4077 | + " to android.provider.Settings.Global."); |
| 4078 | return Global.getStringForUser(resolver, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4079 | } |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 4080 | |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 4081 | if (MOVED_TO_LOCK_SETTINGS.contains(name)) { |
| 4082 | synchronized (Secure.class) { |
| 4083 | if (sLockSettings == null) { |
| 4084 | sLockSettings = ILockSettings.Stub.asInterface( |
| 4085 | (IBinder) ServiceManager.getService("lock_settings")); |
| 4086 | sIsSystemProcess = Process.myUid() == Process.SYSTEM_UID; |
| 4087 | } |
| 4088 | } |
| 4089 | if (sLockSettings != null && !sIsSystemProcess) { |
Adrian Roos | 7811d9f | 2015-07-27 15:10:13 -0700 | [diff] [blame] | 4090 | // No context; use the ActivityThread's context as an approximation for |
| 4091 | // determining the target API level. |
| 4092 | Application application = ActivityThread.currentApplication(); |
| 4093 | |
| 4094 | boolean isPreMnc = application != null |
| 4095 | && application.getApplicationInfo() != null |
| 4096 | && application.getApplicationInfo().targetSdkVersion |
| 4097 | <= VERSION_CODES.LOLLIPOP_MR1; |
| 4098 | if (isPreMnc) { |
| 4099 | try { |
| 4100 | return sLockSettings.getString(name, "0", userHandle); |
| 4101 | } catch (RemoteException re) { |
| 4102 | // Fall through |
| 4103 | } |
| 4104 | } else { |
| 4105 | throw new SecurityException("Settings.Secure." + name |
| 4106 | + " is deprecated and no longer accessible." |
| 4107 | + " See API documentation for potential replacements."); |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 4108 | } |
Amith Yamasani | 52c489c | 2012-03-28 11:42:42 -0700 | [diff] [blame] | 4109 | } |
| 4110 | } |
| 4111 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4112 | return sNameValueCache.getStringForUser(resolver, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4113 | } |
| 4114 | |
| 4115 | /** |
| 4116 | * Store a name/value pair into the database. |
| 4117 | * @param resolver to access the database with |
| 4118 | * @param name to store |
| 4119 | * @param value to associate with the name |
| 4120 | * @return true if the value was set, false on database errors |
| 4121 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4122 | public static boolean putString(ContentResolver resolver, String name, String value) { |
| 4123 | return putStringForUser(resolver, name, value, UserHandle.myUserId()); |
| 4124 | } |
| 4125 | |
| 4126 | /** @hide */ |
| 4127 | public static boolean putStringForUser(ContentResolver resolver, String name, String value, |
| 4128 | int userHandle) { |
Julia Reynolds | 82735bc | 2014-09-04 16:43:30 -0400 | [diff] [blame] | 4129 | if (LOCATION_MODE.equals(name)) { |
| 4130 | // HACK ALERT: temporary hack to work around b/10491283. |
| 4131 | // TODO: once b/10491283 fixed, remove this hack |
| 4132 | return setLocationModeForUser(resolver, Integer.parseInt(value), userHandle); |
| 4133 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4134 | if (MOVED_TO_GLOBAL.contains(name)) { |
| 4135 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" |
| 4136 | + " to android.provider.Settings.Global"); |
| 4137 | return Global.putStringForUser(resolver, name, value, userHandle); |
| 4138 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4139 | return sNameValueCache.putStringForUser(resolver, name, value, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4140 | } |
| 4141 | |
| 4142 | /** |
| 4143 | * Construct the content URI for a particular name/value pair, |
| 4144 | * useful for monitoring changes with a ContentObserver. |
| 4145 | * @param name to look up in the table |
| 4146 | * @return the corresponding content URI, or null if not present |
| 4147 | */ |
| 4148 | public static Uri getUriFor(String name) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4149 | if (MOVED_TO_GLOBAL.contains(name)) { |
| 4150 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure" |
| 4151 | + " to android.provider.Settings.Global, returning global URI."); |
| 4152 | return Global.getUriFor(Global.CONTENT_URI, name); |
| 4153 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4154 | return getUriFor(CONTENT_URI, name); |
| 4155 | } |
| 4156 | |
| 4157 | /** |
| 4158 | * Convenience function for retrieving a single secure settings value |
| 4159 | * as an integer. Note that internally setting values are always |
| 4160 | * stored as strings; this function converts the string to an integer |
| 4161 | * for you. The default value will be returned if the setting is |
| 4162 | * not defined or not an integer. |
| 4163 | * |
| 4164 | * @param cr The ContentResolver to access. |
| 4165 | * @param name The name of the setting to retrieve. |
| 4166 | * @param def Value to return if the setting is not defined. |
| 4167 | * |
| 4168 | * @return The setting's current value, or 'def' if it is not defined |
| 4169 | * or not a valid integer. |
| 4170 | */ |
| 4171 | public static int getInt(ContentResolver cr, String name, int def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4172 | return getIntForUser(cr, name, def, UserHandle.myUserId()); |
| 4173 | } |
| 4174 | |
| 4175 | /** @hide */ |
| 4176 | public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) { |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 4177 | if (LOCATION_MODE.equals(name)) { |
| 4178 | // HACK ALERT: temporary hack to work around b/10491283. |
| 4179 | // TODO: once b/10491283 fixed, remove this hack |
| 4180 | return getLocationModeForUser(cr, userHandle); |
| 4181 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4182 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4183 | try { |
| 4184 | return v != null ? Integer.parseInt(v) : def; |
| 4185 | } catch (NumberFormatException e) { |
| 4186 | return def; |
| 4187 | } |
| 4188 | } |
| 4189 | |
| 4190 | /** |
| 4191 | * Convenience function for retrieving a single secure settings value |
| 4192 | * as an integer. Note that internally setting values are always |
| 4193 | * stored as strings; this function converts the string to an integer |
| 4194 | * for you. |
| 4195 | * <p> |
| 4196 | * This version does not take a default value. If the setting has not |
| 4197 | * been set, or the string value is not a number, |
| 4198 | * it throws {@link SettingNotFoundException}. |
| 4199 | * |
| 4200 | * @param cr The ContentResolver to access. |
| 4201 | * @param name The name of the setting to retrieve. |
| 4202 | * |
| 4203 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 4204 | * name can't be found or the setting value is not an integer. |
| 4205 | * |
| 4206 | * @return The setting's current value. |
| 4207 | */ |
| 4208 | public static int getInt(ContentResolver cr, String name) |
| 4209 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4210 | return getIntForUser(cr, name, UserHandle.myUserId()); |
| 4211 | } |
| 4212 | |
| 4213 | /** @hide */ |
| 4214 | public static int getIntForUser(ContentResolver cr, String name, int userHandle) |
| 4215 | throws SettingNotFoundException { |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 4216 | if (LOCATION_MODE.equals(name)) { |
| 4217 | // HACK ALERT: temporary hack to work around b/10491283. |
| 4218 | // TODO: once b/10491283 fixed, remove this hack |
| 4219 | return getLocationModeForUser(cr, userHandle); |
| 4220 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4221 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4222 | try { |
| 4223 | return Integer.parseInt(v); |
| 4224 | } catch (NumberFormatException e) { |
| 4225 | throw new SettingNotFoundException(name); |
| 4226 | } |
| 4227 | } |
| 4228 | |
| 4229 | /** |
| 4230 | * Convenience function for updating a single settings value as an |
| 4231 | * integer. This will either create a new entry in the table if the |
| 4232 | * given name does not exist, or modify the value of the existing row |
| 4233 | * with that name. Note that internally setting values are always |
| 4234 | * stored as strings, so this function converts the given value to a |
| 4235 | * string before storing it. |
| 4236 | * |
| 4237 | * @param cr The ContentResolver to access. |
| 4238 | * @param name The name of the setting to modify. |
| 4239 | * @param value The new value for the setting. |
| 4240 | * @return true if the value was set, false on database errors |
| 4241 | */ |
| 4242 | public static boolean putInt(ContentResolver cr, String name, int value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4243 | return putIntForUser(cr, name, value, UserHandle.myUserId()); |
| 4244 | } |
| 4245 | |
| 4246 | /** @hide */ |
| 4247 | public static boolean putIntForUser(ContentResolver cr, String name, int value, |
| 4248 | int userHandle) { |
| 4249 | return putStringForUser(cr, name, Integer.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4250 | } |
| 4251 | |
| 4252 | /** |
| 4253 | * Convenience function for retrieving a single secure settings value |
| 4254 | * as a {@code long}. Note that internally setting values are always |
| 4255 | * stored as strings; this function converts the string to a {@code long} |
| 4256 | * for you. The default value will be returned if the setting is |
| 4257 | * not defined or not a {@code long}. |
| 4258 | * |
| 4259 | * @param cr The ContentResolver to access. |
| 4260 | * @param name The name of the setting to retrieve. |
| 4261 | * @param def Value to return if the setting is not defined. |
| 4262 | * |
| 4263 | * @return The setting's current value, or 'def' if it is not defined |
| 4264 | * or not a valid {@code long}. |
| 4265 | */ |
| 4266 | public static long getLong(ContentResolver cr, String name, long def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4267 | return getLongForUser(cr, name, def, UserHandle.myUserId()); |
| 4268 | } |
| 4269 | |
| 4270 | /** @hide */ |
| 4271 | public static long getLongForUser(ContentResolver cr, String name, long def, |
| 4272 | int userHandle) { |
| 4273 | String valString = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4274 | long value; |
| 4275 | try { |
| 4276 | value = valString != null ? Long.parseLong(valString) : def; |
| 4277 | } catch (NumberFormatException e) { |
| 4278 | value = def; |
| 4279 | } |
| 4280 | return value; |
| 4281 | } |
| 4282 | |
| 4283 | /** |
| 4284 | * Convenience function for retrieving a single secure settings value |
| 4285 | * as a {@code long}. Note that internally setting values are always |
| 4286 | * stored as strings; this function converts the string to a {@code long} |
| 4287 | * for you. |
| 4288 | * <p> |
| 4289 | * This version does not take a default value. If the setting has not |
| 4290 | * been set, or the string value is not a number, |
| 4291 | * it throws {@link SettingNotFoundException}. |
| 4292 | * |
| 4293 | * @param cr The ContentResolver to access. |
| 4294 | * @param name The name of the setting to retrieve. |
| 4295 | * |
| 4296 | * @return The setting's current value. |
| 4297 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 4298 | * name can't be found or the setting value is not an integer. |
| 4299 | */ |
| 4300 | public static long getLong(ContentResolver cr, String name) |
| 4301 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4302 | return getLongForUser(cr, name, UserHandle.myUserId()); |
| 4303 | } |
| 4304 | |
| 4305 | /** @hide */ |
| 4306 | public static long getLongForUser(ContentResolver cr, String name, int userHandle) |
| 4307 | throws SettingNotFoundException { |
| 4308 | String valString = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4309 | try { |
| 4310 | return Long.parseLong(valString); |
| 4311 | } catch (NumberFormatException e) { |
| 4312 | throw new SettingNotFoundException(name); |
| 4313 | } |
| 4314 | } |
| 4315 | |
| 4316 | /** |
| 4317 | * Convenience function for updating a secure settings value as a long |
| 4318 | * integer. This will either create a new entry in the table if the |
| 4319 | * given name does not exist, or modify the value of the existing row |
| 4320 | * with that name. Note that internally setting values are always |
| 4321 | * stored as strings, so this function converts the given value to a |
| 4322 | * string before storing it. |
| 4323 | * |
| 4324 | * @param cr The ContentResolver to access. |
| 4325 | * @param name The name of the setting to modify. |
| 4326 | * @param value The new value for the setting. |
| 4327 | * @return true if the value was set, false on database errors |
| 4328 | */ |
| 4329 | public static boolean putLong(ContentResolver cr, String name, long value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4330 | return putLongForUser(cr, name, value, UserHandle.myUserId()); |
| 4331 | } |
| 4332 | |
| 4333 | /** @hide */ |
| 4334 | public static boolean putLongForUser(ContentResolver cr, String name, long value, |
| 4335 | int userHandle) { |
| 4336 | return putStringForUser(cr, name, Long.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4337 | } |
| 4338 | |
| 4339 | /** |
| 4340 | * Convenience function for retrieving a single secure settings value |
| 4341 | * as a floating point number. Note that internally setting values are |
| 4342 | * always stored as strings; this function converts the string to an |
| 4343 | * float for you. The default value will be returned if the setting |
| 4344 | * is not defined or not a valid float. |
| 4345 | * |
| 4346 | * @param cr The ContentResolver to access. |
| 4347 | * @param name The name of the setting to retrieve. |
| 4348 | * @param def Value to return if the setting is not defined. |
| 4349 | * |
| 4350 | * @return The setting's current value, or 'def' if it is not defined |
| 4351 | * or not a valid float. |
| 4352 | */ |
| 4353 | public static float getFloat(ContentResolver cr, String name, float def) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4354 | return getFloatForUser(cr, name, def, UserHandle.myUserId()); |
| 4355 | } |
| 4356 | |
| 4357 | /** @hide */ |
| 4358 | public static float getFloatForUser(ContentResolver cr, String name, float def, |
| 4359 | int userHandle) { |
| 4360 | String v = getStringForUser(cr, name, userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4361 | try { |
| 4362 | return v != null ? Float.parseFloat(v) : def; |
| 4363 | } catch (NumberFormatException e) { |
| 4364 | return def; |
| 4365 | } |
| 4366 | } |
| 4367 | |
| 4368 | /** |
| 4369 | * Convenience function for retrieving a single secure settings value |
| 4370 | * as a float. Note that internally setting values are always |
| 4371 | * stored as strings; this function converts the string to a float |
| 4372 | * for you. |
| 4373 | * <p> |
| 4374 | * This version does not take a default value. If the setting has not |
| 4375 | * been set, or the string value is not a number, |
| 4376 | * it throws {@link SettingNotFoundException}. |
| 4377 | * |
| 4378 | * @param cr The ContentResolver to access. |
| 4379 | * @param name The name of the setting to retrieve. |
| 4380 | * |
| 4381 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 4382 | * name can't be found or the setting value is not a float. |
| 4383 | * |
| 4384 | * @return The setting's current value. |
| 4385 | */ |
| 4386 | public static float getFloat(ContentResolver cr, String name) |
| 4387 | throws SettingNotFoundException { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4388 | return getFloatForUser(cr, name, UserHandle.myUserId()); |
| 4389 | } |
| 4390 | |
| 4391 | /** @hide */ |
| 4392 | public static float getFloatForUser(ContentResolver cr, String name, int userHandle) |
| 4393 | throws SettingNotFoundException { |
| 4394 | String v = getStringForUser(cr, name, userHandle); |
Brian Muramatsu | e1d4698 | 2010-12-06 17:34:20 -0800 | [diff] [blame] | 4395 | if (v == null) { |
| 4396 | throw new SettingNotFoundException(name); |
| 4397 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4398 | try { |
| 4399 | return Float.parseFloat(v); |
| 4400 | } catch (NumberFormatException e) { |
| 4401 | throw new SettingNotFoundException(name); |
| 4402 | } |
| 4403 | } |
| 4404 | |
| 4405 | /** |
| 4406 | * Convenience function for updating a single settings value as a |
| 4407 | * floating point number. This will either create a new entry in the |
| 4408 | * table if the given name does not exist, or modify the value of the |
| 4409 | * existing row with that name. Note that internally setting values |
| 4410 | * are always stored as strings, so this function converts the given |
| 4411 | * value to a string before storing it. |
| 4412 | * |
| 4413 | * @param cr The ContentResolver to access. |
| 4414 | * @param name The name of the setting to modify. |
| 4415 | * @param value The new value for the setting. |
| 4416 | * @return true if the value was set, false on database errors |
| 4417 | */ |
| 4418 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4419 | return putFloatForUser(cr, name, value, UserHandle.myUserId()); |
| 4420 | } |
| 4421 | |
| 4422 | /** @hide */ |
| 4423 | public static boolean putFloatForUser(ContentResolver cr, String name, float value, |
| 4424 | int userHandle) { |
| 4425 | return putStringForUser(cr, name, Float.toString(value), userHandle); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4426 | } |
| 4427 | |
| 4428 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4429 | * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED} |
| 4430 | * instead |
Dianne Hackborn | 895f99e | 2012-02-02 11:49:12 -0800 | [diff] [blame] | 4431 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4432 | @Deprecated |
| 4433 | public static final String DEVELOPMENT_SETTINGS_ENABLED = |
| 4434 | Global.DEVELOPMENT_SETTINGS_ENABLED; |
Dianne Hackborn | 895f99e | 2012-02-02 11:49:12 -0800 | [diff] [blame] | 4435 | |
| 4436 | /** |
Dianne Hackborn | 5773bfdb | 2012-07-13 13:24:15 -0700 | [diff] [blame] | 4437 | * When the user has enable the option to have a "bug report" command |
| 4438 | * in the power menu. |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 4439 | * @deprecated Use {@link android.provider.Settings.Global#BUGREPORT_IN_POWER_MENU} instead |
Dianne Hackborn | 5773bfdb | 2012-07-13 13:24:15 -0700 | [diff] [blame] | 4440 | * @hide |
| 4441 | */ |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 4442 | @Deprecated |
Dianne Hackborn | 5773bfdb | 2012-07-13 13:24:15 -0700 | [diff] [blame] | 4443 | public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; |
| 4444 | |
| 4445 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4446 | * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4447 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4448 | @Deprecated |
| 4449 | public static final String ADB_ENABLED = Global.ADB_ENABLED; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4450 | |
| 4451 | /** |
| 4452 | * Setting to allow mock locations and location provider status to be injected into the |
| 4453 | * LocationManager service for testing purposes during application development. These |
| 4454 | * locations and status values override actual location and status information generated |
| 4455 | * by network, gps, or other location providers. |
Svet Ganov | f7e9cf4 | 2015-05-13 10:40:31 -0700 | [diff] [blame] | 4456 | * |
| 4457 | * @deprecated This settings is not used anymore. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4458 | */ |
Svet Ganov | f7e9cf4 | 2015-05-13 10:40:31 -0700 | [diff] [blame] | 4459 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4460 | public static final String ALLOW_MOCK_LOCATION = "mock_location"; |
| 4461 | |
| 4462 | /** |
Doug Zongker | d8893db | 2010-01-26 12:29:44 -0800 | [diff] [blame] | 4463 | * A 64-bit number (as a hex string) that is randomly |
Scott Main | 4489533 | 2013-11-12 09:23:13 -0800 | [diff] [blame] | 4464 | * generated when the user first sets up the device and should remain |
| 4465 | * constant for the lifetime of the user's device. The value may |
| 4466 | * change if a factory reset is performed on the device. |
| 4467 | * <p class="note"><strong>Note:</strong> When a device has <a |
| 4468 | * href="{@docRoot}about/versions/android-4.2.html#MultipleUsers">multiple users</a> |
| 4469 | * (available on certain devices running Android 4.2 or higher), each user appears as a |
| 4470 | * completely separate device, so the {@code ANDROID_ID} value is unique to each |
| 4471 | * user.</p> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4472 | */ |
| 4473 | public static final String ANDROID_ID = "android_id"; |
| 4474 | |
| 4475 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4476 | * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4477 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4478 | @Deprecated |
| 4479 | public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4480 | |
| 4481 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4482 | * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4483 | */ |
Jeff Sharkey | bdfce2e | 2012-09-26 15:54:06 -0700 | [diff] [blame] | 4484 | @Deprecated |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4485 | public static final String DATA_ROAMING = Global.DATA_ROAMING; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4486 | |
| 4487 | /** |
| 4488 | * Setting to record the input method used by default, holding the ID |
| 4489 | * of the desired method. |
| 4490 | */ |
| 4491 | public static final String DEFAULT_INPUT_METHOD = "default_input_method"; |
| 4492 | |
| 4493 | /** |
satok | ab751aa | 2010-09-14 19:17:36 +0900 | [diff] [blame] | 4494 | * Setting to record the input method subtype used by default, holding the ID |
| 4495 | * of the desired method. |
| 4496 | */ |
| 4497 | public static final String SELECTED_INPUT_METHOD_SUBTYPE = |
| 4498 | "selected_input_method_subtype"; |
| 4499 | |
| 4500 | /** |
satok | 723a27e | 2010-11-11 14:58:11 +0900 | [diff] [blame] | 4501 | * Setting to record the history of input method subtype, holding the pair of ID of IME |
| 4502 | * and its last used subtype. |
| 4503 | * @hide |
| 4504 | */ |
| 4505 | public static final String INPUT_METHODS_SUBTYPE_HISTORY = |
| 4506 | "input_methods_subtype_history"; |
| 4507 | |
| 4508 | /** |
satok | 5c58dfc | 2010-12-14 21:54:47 +0900 | [diff] [blame] | 4509 | * Setting to record the visibility of input method selector |
| 4510 | */ |
| 4511 | public static final String INPUT_METHOD_SELECTOR_VISIBILITY = |
| 4512 | "input_method_selector_visibility"; |
| 4513 | |
| 4514 | /** |
Dianne Hackborn | 91097de | 2014-04-04 18:02:06 -0700 | [diff] [blame] | 4515 | * The currently selected voice interaction service flattened ComponentName. |
| 4516 | * @hide |
| 4517 | */ |
Jeff Sharkey | a73b8fd | 2016-01-06 17:02:08 -0700 | [diff] [blame] | 4518 | @TestApi |
Dianne Hackborn | 91097de | 2014-04-04 18:02:06 -0700 | [diff] [blame] | 4519 | public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service"; |
| 4520 | |
| 4521 | /** |
Zhihai Xu | af5971e | 2013-06-10 20:28:31 -0700 | [diff] [blame] | 4522 | * bluetooth HCI snoop log configuration |
| 4523 | * @hide |
| 4524 | */ |
| 4525 | public static final String BLUETOOTH_HCI_LOG = |
| 4526 | "bluetooth_hci_log"; |
| 4527 | |
| 4528 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4529 | * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4530 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4531 | @Deprecated |
| 4532 | public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4533 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4534 | /** |
Russell Brenner | de6ae44 | 2012-09-26 20:53:10 -0700 | [diff] [blame] | 4535 | * Whether the current user has been set up via setup wizard (0 = false, 1 = true) |
| 4536 | * @hide |
| 4537 | */ |
| 4538 | public static final String USER_SETUP_COMPLETE = "user_setup_complete"; |
| 4539 | |
| 4540 | /** |
Ido Ofir | d193c67 | 2016-03-01 13:27:54 -0800 | [diff] [blame] | 4541 | * Prefix for category name that marks whether a suggested action from that category was |
| 4542 | * completed. |
| 4543 | * @hide |
| 4544 | */ |
| 4545 | public static final String COMPLETED_CATEGORY_PREFIX = "suggested.completed_category."; |
| 4546 | |
| 4547 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4548 | * List of input methods that are currently enabled. This is a string |
| 4549 | * containing the IDs of all enabled input methods, each ID separated |
| 4550 | * by ':'. |
| 4551 | */ |
| 4552 | public static final String ENABLED_INPUT_METHODS = "enabled_input_methods"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4553 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4554 | /** |
Amith Yamasani | e861ec1 | 2010-03-24 21:39:27 -0700 | [diff] [blame] | 4555 | * List of system input methods that are currently disabled. This is a string |
| 4556 | * containing the IDs of all disabled input methods, each ID separated |
| 4557 | * by ':'. |
| 4558 | * @hide |
| 4559 | */ |
| 4560 | public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods"; |
| 4561 | |
| 4562 | /** |
Michael Wright | 7b5a96b | 2014-08-09 19:28:42 -0700 | [diff] [blame] | 4563 | * Whether to show the IME when a hard keyboard is connected. This is a boolean that |
| 4564 | * determines if the IME should be shown when a hard keyboard is attached. |
| 4565 | * @hide |
| 4566 | */ |
| 4567 | public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard"; |
| 4568 | |
| 4569 | /** |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 4570 | * Host name and port for global http proxy. Uses ':' seperator for |
| 4571 | * between host and port. |
| 4572 | * |
| 4573 | * @deprecated Use {@link Global#HTTP_PROXY} |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4574 | */ |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 4575 | @Deprecated |
| 4576 | public static final String HTTP_PROXY = Global.HTTP_PROXY; |
Robert Greenwalt | e90aa5e | 2010-09-01 11:34:05 -0700 | [diff] [blame] | 4577 | |
| 4578 | /** |
Robin Lee | 244ce8e | 2016-01-05 18:03:46 +0000 | [diff] [blame] | 4579 | * Package designated as always-on VPN provider. |
| 4580 | * |
| 4581 | * @hide |
| 4582 | */ |
| 4583 | public static final String ALWAYS_ON_VPN_APP = "always_on_vpn_app"; |
| 4584 | |
| 4585 | /** |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 4586 | * Whether applications can be installed for this user via the system's |
| 4587 | * {@link Intent#ACTION_INSTALL_PACKAGE} mechanism. |
| 4588 | * |
| 4589 | * <p>1 = permit app installation via the system package installer intent |
| 4590 | * <p>0 = do not allow use of the package installer |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4591 | */ |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 4592 | public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4593 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4594 | /** |
Tom O'Neill | 923c0dc | 2014-03-03 11:07:55 -0800 | [diff] [blame] | 4595 | * Comma-separated list of location providers that activities may access. Do not rely on |
| 4596 | * this value being present in settings.db or on ContentObserver notifications on the |
| 4597 | * corresponding Uri. |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4598 | * |
Tom O'Neill | 923c0dc | 2014-03-03 11:07:55 -0800 | [diff] [blame] | 4599 | * @deprecated use {@link #LOCATION_MODE} and |
| 4600 | * {@link LocationManager#MODE_CHANGED_ACTION} (or |
| 4601 | * {@link LocationManager#PROVIDERS_CHANGED_ACTION}) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4602 | */ |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4603 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4604 | public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4605 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4606 | /** |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 4607 | * The degree of location access enabled by the user. |
Tom O'Neill | 923c0dc | 2014-03-03 11:07:55 -0800 | [diff] [blame] | 4608 | * <p> |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 4609 | * When used with {@link #putInt(ContentResolver, String, int)}, must be one of {@link |
| 4610 | * #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, {@link |
| 4611 | * #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. When used with {@link |
| 4612 | * #getInt(ContentResolver, String)}, the caller must gracefully handle additional location |
| 4613 | * modes that might be added in the future. |
Tom O'Neill | 923c0dc | 2014-03-03 11:07:55 -0800 | [diff] [blame] | 4614 | * <p> |
| 4615 | * Note: do not rely on this value being present in settings.db or on ContentObserver |
| 4616 | * notifications for the corresponding Uri. Use {@link LocationManager#MODE_CHANGED_ACTION} |
| 4617 | * to receive changes in this value. |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4618 | */ |
| 4619 | public static final String LOCATION_MODE = "location_mode"; |
Lifu Tang | d1fa1d6 | 2015-11-25 21:42:44 -0800 | [diff] [blame] | 4620 | /** |
| 4621 | * Stores the previous location mode when {@link #LOCATION_MODE} is set to |
| 4622 | * {@link #LOCATION_MODE_OFF} |
| 4623 | * @hide |
| 4624 | */ |
| 4625 | public static final String LOCATION_PREVIOUS_MODE = "location_previous_mode"; |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 4626 | |
| 4627 | /** |
Lifu Tang | d1fa1d6 | 2015-11-25 21:42:44 -0800 | [diff] [blame] | 4628 | * Sets all location providers to the previous states before location was turned off. |
| 4629 | * @hide |
| 4630 | */ |
| 4631 | public static final int LOCATION_MODE_PREVIOUS = -1; |
| 4632 | /** |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 4633 | * Location access disabled. |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4634 | */ |
| 4635 | public static final int LOCATION_MODE_OFF = 0; |
| 4636 | /** |
| 4637 | * Network Location Provider disabled, but GPS and other sensors enabled. |
| 4638 | */ |
| 4639 | public static final int LOCATION_MODE_SENSORS_ONLY = 1; |
| 4640 | /** |
Tom O'Neill | d575943 | 2013-09-11 11:03:03 -0700 | [diff] [blame] | 4641 | * Reduced power usage, such as limiting the number of GPS updates per hour. Requests |
| 4642 | * with {@link android.location.Criteria#POWER_HIGH} may be downgraded to |
| 4643 | * {@link android.location.Criteria#POWER_MEDIUM}. |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 4644 | */ |
| 4645 | public static final int LOCATION_MODE_BATTERY_SAVING = 2; |
| 4646 | /** |
| 4647 | * Best-effort location computation allowed. |
| 4648 | */ |
| 4649 | public static final int LOCATION_MODE_HIGH_ACCURACY = 3; |
| 4650 | |
| 4651 | /** |
Danielle Millett | 925a7d8 | 2012-03-19 18:02:20 -0400 | [diff] [blame] | 4652 | * A flag containing settings used for biometric weak |
| 4653 | * @hide |
| 4654 | */ |
Adrian Roos | 230635e | 2015-01-07 20:50:29 +0100 | [diff] [blame] | 4655 | @Deprecated |
Danielle Millett | 925a7d8 | 2012-03-19 18:02:20 -0400 | [diff] [blame] | 4656 | public static final String LOCK_BIOMETRIC_WEAK_FLAGS = |
| 4657 | "lock_biometric_weak_flags"; |
| 4658 | |
| 4659 | /** |
Jason Monk | 94cfd9d | 2014-10-31 13:18:21 -0400 | [diff] [blame] | 4660 | * Whether lock-to-app will lock the keyguard when exiting. |
| 4661 | * @hide |
| 4662 | */ |
| 4663 | public static final String LOCK_TO_APP_EXIT_LOCKED = "lock_to_app_exit_locked"; |
| 4664 | |
| 4665 | /** |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 4666 | * Whether autolock is enabled (0 = false, 1 = true) |
Adrian Roos | 9dd16eb | 2015-01-08 16:20:49 +0100 | [diff] [blame] | 4667 | * |
| 4668 | * @deprecated Use {@link android.app.KeyguardManager} to determine the state and security |
Adrian Roos | 7811d9f | 2015-07-27 15:10:13 -0700 | [diff] [blame] | 4669 | * level of the keyguard. Accessing this setting from an app that is targeting |
Deepanshu Gupta | e836a22 | 2015-07-31 12:11:07 -0700 | [diff] [blame] | 4670 | * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 4671 | */ |
Adrian Roos | 9dd16eb | 2015-01-08 16:20:49 +0100 | [diff] [blame] | 4672 | @Deprecated |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 4673 | public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; |
| 4674 | |
| 4675 | /** |
| 4676 | * Whether lock pattern is visible as user enters (0 = false, 1 = true) |
Adrian Roos | 7811d9f | 2015-07-27 15:10:13 -0700 | [diff] [blame] | 4677 | * |
| 4678 | * @deprecated Accessing this setting from an app that is targeting |
Deepanshu Gupta | e836a22 | 2015-07-31 12:11:07 -0700 | [diff] [blame] | 4679 | * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 4680 | */ |
Adrian Roos | 7811d9f | 2015-07-27 15:10:13 -0700 | [diff] [blame] | 4681 | @Deprecated |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 4682 | public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; |
| 4683 | |
| 4684 | /** |
Jeff Sharkey | 5ed9d68 | 2012-10-10 14:28:27 -0700 | [diff] [blame] | 4685 | * Whether lock pattern will vibrate as user enters (0 = false, 1 = |
| 4686 | * true) |
| 4687 | * |
| 4688 | * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the |
| 4689 | * lockscreen uses |
| 4690 | * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}. |
Adrian Roos | 7811d9f | 2015-07-27 15:10:13 -0700 | [diff] [blame] | 4691 | * Accessing this setting from an app that is targeting |
Deepanshu Gupta | e836a22 | 2015-07-31 12:11:07 -0700 | [diff] [blame] | 4692 | * {@link VERSION_CODES#M} or later throws a {@code SecurityException}. |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 4693 | */ |
Jeff Sharkey | 5ed9d68 | 2012-10-10 14:28:27 -0700 | [diff] [blame] | 4694 | @Deprecated |
| 4695 | public static final String |
| 4696 | LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; |
Amith Yamasani | 156c435 | 2010-03-05 17:10:03 -0800 | [diff] [blame] | 4697 | |
| 4698 | /** |
Jim Miller | bc4603b | 2010-08-30 21:21:34 -0700 | [diff] [blame] | 4699 | * This preference allows the device to be locked given time after screen goes off, |
| 4700 | * subject to current DeviceAdmin policy limits. |
| 4701 | * @hide |
| 4702 | */ |
| 4703 | public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout"; |
| 4704 | |
| 4705 | |
| 4706 | /** |
John Spurlock | 5f050e5 | 2012-10-27 10:44:19 -0400 | [diff] [blame] | 4707 | * This preference contains the string that shows for owner info on LockScreen. |
Jim Miller | 253a5ef | 2010-10-13 20:57:29 -0700 | [diff] [blame] | 4708 | * @hide |
Jim Miller | 187ec58 | 2013-04-15 18:27:54 -0700 | [diff] [blame] | 4709 | * @deprecated |
Jim Miller | 253a5ef | 2010-10-13 20:57:29 -0700 | [diff] [blame] | 4710 | */ |
| 4711 | public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info"; |
| 4712 | |
| 4713 | /** |
John Spurlock | 5f050e5 | 2012-10-27 10:44:19 -0400 | [diff] [blame] | 4714 | * Ids of the user-selected appwidgets on the lockscreen (comma-delimited). |
Jim Miller | f229e4d | 2012-09-12 20:32:50 -0700 | [diff] [blame] | 4715 | * @hide |
| 4716 | */ |
Adrian Roos | 230635e | 2015-01-07 20:50:29 +0100 | [diff] [blame] | 4717 | @Deprecated |
Michael Jurka | aa2859a | 2012-10-24 12:46:49 -0700 | [diff] [blame] | 4718 | public static final String LOCK_SCREEN_APPWIDGET_IDS = |
| 4719 | "lock_screen_appwidget_ids"; |
Jim Miller | f229e4d | 2012-09-12 20:32:50 -0700 | [diff] [blame] | 4720 | |
| 4721 | /** |
Jim Miller | 5111726 | 2012-11-04 17:58:09 -0800 | [diff] [blame] | 4722 | * Id of the appwidget shown on the lock screen when appwidgets are disabled. |
| 4723 | * @hide |
| 4724 | */ |
Adrian Roos | 230635e | 2015-01-07 20:50:29 +0100 | [diff] [blame] | 4725 | @Deprecated |
Jim Miller | 5111726 | 2012-11-04 17:58:09 -0800 | [diff] [blame] | 4726 | public static final String LOCK_SCREEN_FALLBACK_APPWIDGET_ID = |
| 4727 | "lock_screen_fallback_appwidget_id"; |
| 4728 | |
| 4729 | /** |
John Spurlock | 5f050e5 | 2012-10-27 10:44:19 -0400 | [diff] [blame] | 4730 | * Index of the lockscreen appwidget to restore, -1 if none. |
| 4731 | * @hide |
| 4732 | */ |
Adrian Roos | 230635e | 2015-01-07 20:50:29 +0100 | [diff] [blame] | 4733 | @Deprecated |
John Spurlock | 5f050e5 | 2012-10-27 10:44:19 -0400 | [diff] [blame] | 4734 | public static final String LOCK_SCREEN_STICKY_APPWIDGET = |
| 4735 | "lock_screen_sticky_appwidget"; |
| 4736 | |
| 4737 | /** |
| 4738 | * This preference enables showing the owner info on LockScreen. |
Jim Miller | 253a5ef | 2010-10-13 20:57:29 -0700 | [diff] [blame] | 4739 | * @hide |
Jim Miller | 187ec58 | 2013-04-15 18:27:54 -0700 | [diff] [blame] | 4740 | * @deprecated |
Jim Miller | 253a5ef | 2010-10-13 20:57:29 -0700 | [diff] [blame] | 4741 | */ |
| 4742 | public static final String LOCK_SCREEN_OWNER_INFO_ENABLED = |
| 4743 | "lock_screen_owner_info_enabled"; |
| 4744 | |
| 4745 | /** |
Dan Sandler | 5d7c3cc | 2014-02-18 17:35:15 -0500 | [diff] [blame] | 4746 | * When set by a user, allows notifications to be shown atop a securely locked screen |
| 4747 | * in their full "private" form (same as when the device is unlocked). |
Dan Sandler | fd16d56 | 2014-02-13 18:43:31 -0800 | [diff] [blame] | 4748 | * @hide |
| 4749 | */ |
| 4750 | public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = |
| 4751 | "lock_screen_allow_private_notifications"; |
| 4752 | |
| 4753 | /** |
Adrian Roos | 3aec638 | 2016-02-05 14:19:01 -0800 | [diff] [blame] | 4754 | * When set by a user, allows notification remote input atop a securely locked screen |
| 4755 | * without having to unlock |
| 4756 | * @hide |
| 4757 | */ |
| 4758 | public static final String LOCK_SCREEN_ALLOW_REMOTE_INPUT = |
| 4759 | "lock_screen_allow_remote_input"; |
| 4760 | |
| 4761 | /** |
Chris Wren | cd8f4f7 | 2014-08-27 18:48:13 -0400 | [diff] [blame] | 4762 | * Set by the system to track if the user needs to see the call to action for |
| 4763 | * the lockscreen notification policy. |
| 4764 | * @hide |
| 4765 | */ |
| 4766 | public static final String SHOW_NOTE_ABOUT_NOTIFICATION_HIDING = |
| 4767 | "show_note_about_notification_hiding"; |
| 4768 | |
| 4769 | /** |
Adrian Roos | 3870d45 | 2014-09-05 18:22:28 +0200 | [diff] [blame] | 4770 | * Set to 1 by the system after trust agents have been initialized. |
| 4771 | * @hide |
| 4772 | */ |
| 4773 | public static final String TRUST_AGENTS_INITIALIZED = |
| 4774 | "trust_agents_initialized"; |
| 4775 | |
| 4776 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4777 | * The Logging ID (a unique 64-bit value) as a hex string. |
| 4778 | * Used as a pseudonymous identifier for logging. |
| 4779 | * @deprecated This identifier is poorly initialized and has |
| 4780 | * many collisions. It should not be used. |
| 4781 | */ |
| 4782 | @Deprecated |
| 4783 | public static final String LOGGING_ID = "logging_id"; |
| 4784 | |
| 4785 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4786 | * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4787 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4788 | @Deprecated |
| 4789 | public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4790 | |
| 4791 | /** |
Dan Egnor | 1c9131c | 2010-02-13 10:38:55 -0800 | [diff] [blame] | 4792 | * No longer supported. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4793 | */ |
| 4794 | public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4795 | |
| 4796 | /** |
Dan Egnor | 1c9131c | 2010-02-13 10:38:55 -0800 | [diff] [blame] | 4797 | * No longer supported. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4798 | */ |
| 4799 | public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4800 | |
| 4801 | /** |
Dan Egnor | 1c9131c | 2010-02-13 10:38:55 -0800 | [diff] [blame] | 4802 | * No longer supported. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4803 | */ |
| 4804 | public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4805 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4806 | /** |
| 4807 | * Settings classname to launch when Settings is clicked from All |
| 4808 | * Applications. Needed because of user testing between the old |
| 4809 | * and new Settings apps. |
| 4810 | */ |
| 4811 | // TODO: 881807 |
| 4812 | public static final String SETTINGS_CLASSNAME = "settings_classname"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4813 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4814 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4815 | * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4816 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4817 | @Deprecated |
| 4818 | public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4819 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4820 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4821 | * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4822 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 4823 | @Deprecated |
| 4824 | public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 4825 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 4826 | /** |
svetoslavganov | 75986cf | 2009-05-14 22:28:01 -0700 | [diff] [blame] | 4827 | * If accessibility is enabled. |
| 4828 | */ |
| 4829 | public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled"; |
| 4830 | |
| 4831 | /** |
Svetoslav Ganov | 00aabf7 | 2011-07-21 11:35:03 -0700 | [diff] [blame] | 4832 | * If touch exploration is enabled. |
Svetoslav Ganov | 35bfede | 2011-07-14 17:57:06 -0700 | [diff] [blame] | 4833 | */ |
Svetoslav Ganov | 00aabf7 | 2011-07-21 11:35:03 -0700 | [diff] [blame] | 4834 | public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled"; |
Svetoslav Ganov | 35bfede | 2011-07-14 17:57:06 -0700 | [diff] [blame] | 4835 | |
| 4836 | /** |
svetoslavganov | 75986cf | 2009-05-14 22:28:01 -0700 | [diff] [blame] | 4837 | * List of the enabled accessibility providers. |
| 4838 | */ |
| 4839 | public static final String ENABLED_ACCESSIBILITY_SERVICES = |
| 4840 | "enabled_accessibility_services"; |
| 4841 | |
| 4842 | /** |
Svetoslav Ganov | 7befb7d | 2012-09-27 16:49:23 -0700 | [diff] [blame] | 4843 | * List of the accessibility services to which the user has granted |
Svetoslav Ganov | 9a4c5cd | 2012-05-30 14:06:32 -0700 | [diff] [blame] | 4844 | * permission to put the device into touch exploration mode. |
| 4845 | * |
| 4846 | * @hide |
| 4847 | */ |
| 4848 | public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES = |
| 4849 | "touch_exploration_granted_accessibility_services"; |
| 4850 | |
| 4851 | /** |
Svetoslav Ganov | 55f937a | 2011-12-05 11:42:07 -0800 | [diff] [blame] | 4852 | * Whether to speak passwords while in accessibility mode. |
| 4853 | */ |
| 4854 | public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password"; |
| 4855 | |
| 4856 | /** |
Chris Craik | cce47eb | 2014-07-16 15:12:15 -0700 | [diff] [blame] | 4857 | * Whether to draw text with high contrast while in accessibility mode. |
| 4858 | * |
| 4859 | * @hide |
| 4860 | */ |
| 4861 | public static final String ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED = |
| 4862 | "high_text_contrast_enabled"; |
| 4863 | |
| 4864 | /** |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 4865 | * If injection of accessibility enhancing JavaScript screen-reader |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 4866 | * is enabled. |
| 4867 | * <p> |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 4868 | * Note: The JavaScript based screen-reader is served by the |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 4869 | * Google infrastructure and enable users with disabilities to |
Svetoslav Ganov | 7befb7d | 2012-09-27 16:49:23 -0700 | [diff] [blame] | 4870 | * efficiently navigate in and explore web content. |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 4871 | * </p> |
| 4872 | * <p> |
| 4873 | * This property represents a boolean value. |
| 4874 | * </p> |
| 4875 | * @hide |
| 4876 | */ |
| 4877 | public static final String ACCESSIBILITY_SCRIPT_INJECTION = |
| 4878 | "accessibility_script_injection"; |
| 4879 | |
| 4880 | /** |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 4881 | * The URL for the injected JavaScript based screen-reader used |
Svetoslav Ganov | 7befb7d | 2012-09-27 16:49:23 -0700 | [diff] [blame] | 4882 | * for providing accessibility of content in WebView. |
Svetoslav Ganov | 3ca5a74 | 2011-12-06 15:24:37 -0800 | [diff] [blame] | 4883 | * <p> |
| 4884 | * Note: The JavaScript based screen-reader is served by the |
| 4885 | * Google infrastructure and enable users with disabilities to |
| 4886 | * efficiently navigate in and explore web content. |
| 4887 | * </p> |
| 4888 | * <p> |
| 4889 | * This property represents a string value. |
| 4890 | * </p> |
| 4891 | * @hide |
| 4892 | */ |
| 4893 | public static final String ACCESSIBILITY_SCREEN_READER_URL = |
| 4894 | "accessibility_script_injection_url"; |
| 4895 | |
| 4896 | /** |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 4897 | * Key bindings for navigation in built-in accessibility support for web content. |
| 4898 | * <p> |
| 4899 | * Note: These key bindings are for the built-in accessibility navigation for |
| 4900 | * web content which is used as a fall back solution if JavaScript in a WebView |
| 4901 | * is not enabled or the user has not opted-in script injection from Google. |
| 4902 | * </p> |
| 4903 | * <p> |
| 4904 | * The bindings are separated by semi-colon. A binding is a mapping from |
| 4905 | * a key to a sequence of actions (for more details look at |
| 4906 | * android.webkit.AccessibilityInjector). A key is represented as the hexademical |
| 4907 | * string representation of an integer obtained from a meta state (optional) shifted |
| 4908 | * sixteen times left and bitwise ored with a key code. An action is represented |
| 4909 | * as a hexademical string representation of an integer where the first two digits |
| 4910 | * are navigation action index, the second, the third, and the fourth digit pairs |
| 4911 | * represent the action arguments. The separate actions in a binding are colon |
| 4912 | * separated. The key and the action sequence it maps to are separated by equals. |
| 4913 | * </p> |
| 4914 | * <p> |
| 4915 | * For example, the binding below maps the DPAD right button to traverse the |
| 4916 | * current navigation axis once without firing an accessibility event and to |
| 4917 | * perform the same traversal again but to fire an event: |
| 4918 | * <code> |
| 4919 | * 0x16=0x01000100:0x01000101; |
| 4920 | * </code> |
| 4921 | * </p> |
| 4922 | * <p> |
| 4923 | * The goal of this binding is to enable dynamic rebinding of keys to |
| 4924 | * navigation actions for web content without requiring a framework change. |
| 4925 | * </p> |
| 4926 | * <p> |
| 4927 | * This property represents a string value. |
| 4928 | * </p> |
| 4929 | * @hide |
| 4930 | */ |
| 4931 | public static final String ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS = |
| 4932 | "accessibility_web_content_key_bindings"; |
| 4933 | |
| 4934 | /** |
Svetoslav Ganov | 1cf70bb | 2012-08-06 10:53:34 -0700 | [diff] [blame] | 4935 | * Setting that specifies whether the display magnification is enabled. |
| 4936 | * Display magnifications allows the user to zoom in the display content |
| 4937 | * and is targeted to low vision users. The current magnification scale |
| 4938 | * is controlled by {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}. |
| 4939 | * |
| 4940 | * @hide |
| 4941 | */ |
| 4942 | public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED = |
| 4943 | "accessibility_display_magnification_enabled"; |
| 4944 | |
| 4945 | /** |
| 4946 | * Setting that specifies what the display magnification scale is. |
| 4947 | * Display magnifications allows the user to zoom in the display |
| 4948 | * content and is targeted to low vision users. Whether a display |
| 4949 | * magnification is performed is controlled by |
| 4950 | * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED} |
| 4951 | * |
| 4952 | * @hide |
| 4953 | */ |
| 4954 | public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE = |
| 4955 | "accessibility_display_magnification_scale"; |
| 4956 | |
| 4957 | /** |
| 4958 | * Setting that specifies whether the display magnification should be |
| 4959 | * automatically updated. If this fearture is enabled the system will |
| 4960 | * exit magnification mode or pan the viewport when a context change |
| 4961 | * occurs. For example, on staring a new activity or rotating the screen, |
| 4962 | * the system may zoom out so the user can see the new context he is in. |
| 4963 | * Another example is on showing a window that is not visible in the |
| 4964 | * magnified viewport the system may pan the viewport to make the window |
| 4965 | * the has popped up so the user knows that the context has changed. |
| 4966 | * Whether a screen magnification is performed is controlled by |
| 4967 | * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED} |
| 4968 | * |
| 4969 | * @hide |
| 4970 | */ |
| 4971 | public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE = |
| 4972 | "accessibility_display_magnification_auto_update"; |
| 4973 | |
| 4974 | /** |
Anna Galusza | 9b27811 | 2016-01-04 11:37:37 -0800 | [diff] [blame] | 4975 | * Setting that specifies what mode the soft keyboard is in (default or hidden). Can be |
| 4976 | * modified from an AccessibilityService using the SoftKeyboardController. |
| 4977 | * |
| 4978 | * @hide |
| 4979 | */ |
| 4980 | public static final String ACCESSIBILITY_SOFT_KEYBOARD_MODE = |
| 4981 | "accessibility_soft_keyboard_mode"; |
| 4982 | |
| 4983 | /** |
| 4984 | * Default soft keyboard behavior. |
| 4985 | * |
| 4986 | * @hide |
| 4987 | */ |
| 4988 | public static final int SHOW_MODE_AUTO = 0; |
| 4989 | |
| 4990 | /** |
| 4991 | * Soft keyboard is never shown. |
| 4992 | * |
| 4993 | * @hide |
| 4994 | */ |
| 4995 | public static final int SHOW_MODE_HIDDEN = 1; |
| 4996 | |
| 4997 | /** |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 4998 | * Setting that specifies whether timed text (captions) should be |
| 4999 | * displayed in video content. Text display properties are controlled by |
| 5000 | * the following settings: |
| 5001 | * <ul> |
| 5002 | * <li>{@link #ACCESSIBILITY_CAPTIONING_LOCALE} |
| 5003 | * <li>{@link #ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR} |
| 5004 | * <li>{@link #ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR} |
| 5005 | * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_COLOR} |
| 5006 | * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_TYPE} |
| 5007 | * <li>{@link #ACCESSIBILITY_CAPTIONING_TYPEFACE} |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 5008 | * <li>{@link #ACCESSIBILITY_CAPTIONING_FONT_SCALE} |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 5009 | * </ul> |
| 5010 | * |
| 5011 | * @hide |
| 5012 | */ |
| 5013 | public static final String ACCESSIBILITY_CAPTIONING_ENABLED = |
| 5014 | "accessibility_captioning_enabled"; |
| 5015 | |
| 5016 | /** |
| 5017 | * Setting that specifies the language for captions as a locale string, |
| 5018 | * e.g. en_US. |
| 5019 | * |
| 5020 | * @see java.util.Locale#toString |
| 5021 | * @hide |
| 5022 | */ |
| 5023 | public static final String ACCESSIBILITY_CAPTIONING_LOCALE = |
| 5024 | "accessibility_captioning_locale"; |
| 5025 | |
| 5026 | /** |
Alan Viverette | 43a1e3d | 2013-08-02 16:45:03 -0700 | [diff] [blame] | 5027 | * Integer property that specifies the preset style for captions, one |
| 5028 | * of: |
| 5029 | * <ul> |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 5030 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESET_CUSTOM} |
| 5031 | * <li>a valid index of {@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESETS} |
Alan Viverette | 43a1e3d | 2013-08-02 16:45:03 -0700 | [diff] [blame] | 5032 | * </ul> |
| 5033 | * |
| 5034 | * @see java.util.Locale#toString |
| 5035 | * @hide |
| 5036 | */ |
| 5037 | public static final String ACCESSIBILITY_CAPTIONING_PRESET = |
| 5038 | "accessibility_captioning_preset"; |
| 5039 | |
| 5040 | /** |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 5041 | * Integer property that specifes the background color for captions as a |
| 5042 | * packed 32-bit color. |
| 5043 | * |
| 5044 | * @see android.graphics.Color#argb |
| 5045 | * @hide |
| 5046 | */ |
| 5047 | public static final String ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR = |
| 5048 | "accessibility_captioning_background_color"; |
| 5049 | |
| 5050 | /** |
| 5051 | * Integer property that specifes the foreground color for captions as a |
| 5052 | * packed 32-bit color. |
| 5053 | * |
| 5054 | * @see android.graphics.Color#argb |
| 5055 | * @hide |
| 5056 | */ |
| 5057 | public static final String ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR = |
| 5058 | "accessibility_captioning_foreground_color"; |
| 5059 | |
| 5060 | /** |
| 5061 | * Integer property that specifes the edge type for captions, one of: |
| 5062 | * <ul> |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 5063 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_NONE} |
| 5064 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE} |
| 5065 | * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW} |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 5066 | * </ul> |
| 5067 | * |
| 5068 | * @see #ACCESSIBILITY_CAPTIONING_EDGE_COLOR |
| 5069 | * @hide |
| 5070 | */ |
| 5071 | public static final String ACCESSIBILITY_CAPTIONING_EDGE_TYPE = |
| 5072 | "accessibility_captioning_edge_type"; |
| 5073 | |
| 5074 | /** |
| 5075 | * Integer property that specifes the edge color for captions as a |
| 5076 | * packed 32-bit color. |
| 5077 | * |
| 5078 | * @see #ACCESSIBILITY_CAPTIONING_EDGE_TYPE |
| 5079 | * @see android.graphics.Color#argb |
| 5080 | * @hide |
| 5081 | */ |
| 5082 | public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR = |
| 5083 | "accessibility_captioning_edge_color"; |
| 5084 | |
| 5085 | /** |
Alan Viverette | 55d7062 | 2013-12-11 15:22:14 -0800 | [diff] [blame] | 5086 | * Integer property that specifes the window color for captions as a |
| 5087 | * packed 32-bit color. |
| 5088 | * |
| 5089 | * @see android.graphics.Color#argb |
| 5090 | * @hide |
| 5091 | */ |
| 5092 | public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR = |
| 5093 | "accessibility_captioning_window_color"; |
| 5094 | |
| 5095 | /** |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 5096 | * String property that specifies the typeface for captions, one of: |
| 5097 | * <ul> |
| 5098 | * <li>DEFAULT |
| 5099 | * <li>MONOSPACE |
| 5100 | * <li>SANS_SERIF |
| 5101 | * <li>SERIF |
| 5102 | * </ul> |
| 5103 | * |
| 5104 | * @see android.graphics.Typeface |
| 5105 | * @hide |
| 5106 | */ |
| 5107 | public static final String ACCESSIBILITY_CAPTIONING_TYPEFACE = |
| 5108 | "accessibility_captioning_typeface"; |
| 5109 | |
| 5110 | /** |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 5111 | * Floating point property that specifies font scaling for captions. |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 5112 | * |
| 5113 | * @hide |
| 5114 | */ |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 5115 | public static final String ACCESSIBILITY_CAPTIONING_FONT_SCALE = |
| 5116 | "accessibility_captioning_font_scale"; |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 5117 | |
| 5118 | /** |
Alan Viverette | 410d4e3 | 2013-09-30 15:37:38 -0700 | [diff] [blame] | 5119 | * Setting that specifies whether display color inversion is enabled. |
Alan Viverette | 410d4e3 | 2013-09-30 15:37:38 -0700 | [diff] [blame] | 5120 | */ |
| 5121 | public static final String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED = |
| 5122 | "accessibility_display_inversion_enabled"; |
| 5123 | |
| 5124 | /** |
Alan Viverette | 410d4e3 | 2013-09-30 15:37:38 -0700 | [diff] [blame] | 5125 | * Setting that specifies whether display color space adjustment is |
| 5126 | * enabled. |
| 5127 | * |
| 5128 | * @hide |
| 5129 | */ |
| 5130 | public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED = |
| 5131 | "accessibility_display_daltonizer_enabled"; |
| 5132 | |
| 5133 | /** |
| 5134 | * Integer property that specifies the type of color space adjustment to |
| 5135 | * perform. Valid values are defined in AccessibilityManager. |
| 5136 | * |
| 5137 | * @hide |
| 5138 | */ |
| 5139 | public static final String ACCESSIBILITY_DISPLAY_DALTONIZER = |
| 5140 | "accessibility_display_daltonizer"; |
| 5141 | |
| 5142 | /** |
Jason Monk | 08e7fa9 | 2015-12-07 20:05:08 -0500 | [diff] [blame] | 5143 | * Float list that specifies the color matrix to apply to |
| 5144 | * the display. Valid values are defined in AccessibilityManager. |
| 5145 | * |
| 5146 | * @hide |
| 5147 | */ |
| 5148 | public static final String ACCESSIBILITY_DISPLAY_COLOR_MATRIX = |
| 5149 | "accessibility_display_color_matrix"; |
| 5150 | |
| 5151 | /** |
Toni Barzic | 386f834 | 2015-09-09 12:30:41 -0700 | [diff] [blame] | 5152 | * Setting that specifies whether automatic click when the mouse pointer stops moving is |
| 5153 | * enabled. |
| 5154 | * |
| 5155 | * @hide |
| 5156 | */ |
| 5157 | public static final String ACCESSIBILITY_AUTOCLICK_ENABLED = |
| 5158 | "accessibility_autoclick_enabled"; |
| 5159 | |
| 5160 | /** |
| 5161 | * Integer setting specifying amount of time in ms the mouse pointer has to stay still |
| 5162 | * before performing click when {@link #ACCESSIBILITY_AUTOCLICK_ENABLED} is set. |
| 5163 | * |
| 5164 | * @see #ACCESSIBILITY_AUTOCLICK_ENABLED |
| 5165 | * @hide |
| 5166 | */ |
| 5167 | public static final String ACCESSIBILITY_AUTOCLICK_DELAY = |
| 5168 | "accessibility_autoclick_delay"; |
| 5169 | |
| 5170 | /** |
Jun Mukai | 19a5601 | 2015-11-24 11:25:52 -0800 | [diff] [blame] | 5171 | * Whether or not larger size icons are used for the pointer of mouse/trackpad for |
| 5172 | * accessibility. |
| 5173 | * (0 = false, 1 = true) |
| 5174 | * @hide |
| 5175 | */ |
| 5176 | public static final String ACCESSIBILITY_LARGE_POINTER_ICON = |
| 5177 | "accessibility_large_pointer_icon"; |
| 5178 | |
| 5179 | /** |
Toni Barzic | 386f834 | 2015-09-09 12:30:41 -0700 | [diff] [blame] | 5180 | * The timeout for considering a press to be a long press in milliseconds. |
Svetoslav Ganov | 54d068e | 2011-03-02 12:58:40 -0800 | [diff] [blame] | 5181 | * @hide |
| 5182 | */ |
| 5183 | public static final String LONG_PRESS_TIMEOUT = "long_press_timeout"; |
| 5184 | |
| 5185 | /** |
Svetoslav Ganov | 6bd20bc | 2013-09-02 15:24:45 -0700 | [diff] [blame] | 5186 | * List of the enabled print services. |
Philip P. Moltmann | 8141bdf | 2015-12-21 17:03:05 -0800 | [diff] [blame] | 5187 | * |
| 5188 | * N and beyond uses {@link #DISABLED_PRINT_SERVICES}. But this might be used in an upgrade |
| 5189 | * from pre-N. |
| 5190 | * |
Svetoslav Ganov | 4b9a4d1 | 2013-06-11 15:20:06 -0700 | [diff] [blame] | 5191 | * @hide |
| 5192 | */ |
| 5193 | public static final String ENABLED_PRINT_SERVICES = |
| 5194 | "enabled_print_services"; |
| 5195 | |
| 5196 | /** |
Philip P. Moltmann | 8141bdf | 2015-12-21 17:03:05 -0800 | [diff] [blame] | 5197 | * List of the disabled print services. |
| 5198 | * |
Svetoslav Ganov | 6bd20bc | 2013-09-02 15:24:45 -0700 | [diff] [blame] | 5199 | * @hide |
| 5200 | */ |
Philip P. Moltmann | 8141bdf | 2015-12-21 17:03:05 -0800 | [diff] [blame] | 5201 | public static final String DISABLED_PRINT_SERVICES = |
| 5202 | "disabled_print_services"; |
Svetoslav Ganov | 6bd20bc | 2013-09-02 15:24:45 -0700 | [diff] [blame] | 5203 | |
| 5204 | /** |
Alan Viverette | 5e8d837 | 2016-02-03 15:38:59 -0500 | [diff] [blame] | 5205 | * The saved value for WindowManagerService.setForcedDisplayDensity() |
| 5206 | * formatted as a single integer representing DPI. If unset, then use |
| 5207 | * the real display density. |
| 5208 | * |
| 5209 | * @hide |
| 5210 | */ |
| 5211 | public static final String DISPLAY_DENSITY_FORCED = "display_density_forced"; |
| 5212 | |
| 5213 | /** |
Jean-Michel Trivi | f62ba45 | 2009-06-04 14:55:24 -0700 | [diff] [blame] | 5214 | * Setting to always use the default text-to-speech settings regardless |
| 5215 | * of the application settings. |
| 5216 | * 1 = override application settings, |
| 5217 | * 0 = use application settings (if specified). |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 5218 | * |
| 5219 | * @deprecated The value of this setting is no longer respected by |
| 5220 | * the framework text to speech APIs as of the Ice Cream Sandwich release. |
Jean-Michel Trivi | f62ba45 | 2009-06-04 14:55:24 -0700 | [diff] [blame] | 5221 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 5222 | @Deprecated |
Jean-Michel Trivi | f62ba45 | 2009-06-04 14:55:24 -0700 | [diff] [blame] | 5223 | public static final String TTS_USE_DEFAULTS = "tts_use_defaults"; |
| 5224 | |
| 5225 | /** |
| 5226 | * Default text-to-speech engine speech rate. 100 = 1x |
| 5227 | */ |
| 5228 | public static final String TTS_DEFAULT_RATE = "tts_default_rate"; |
| 5229 | |
| 5230 | /** |
| 5231 | * Default text-to-speech engine pitch. 100 = 1x |
| 5232 | */ |
| 5233 | public static final String TTS_DEFAULT_PITCH = "tts_default_pitch"; |
| 5234 | |
| 5235 | /** |
| 5236 | * Default text-to-speech engine. |
| 5237 | */ |
| 5238 | public static final String TTS_DEFAULT_SYNTH = "tts_default_synth"; |
| 5239 | |
| 5240 | /** |
Jean-Michel Trivi | f478267 | 2009-06-09 16:22:48 -0700 | [diff] [blame] | 5241 | * Default text-to-speech language. |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 5242 | * |
| 5243 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 5244 | * Sandwich release. Apps should never need to read this setting directly, |
| 5245 | * instead can query the TextToSpeech framework classes for the default |
| 5246 | * locale. {@link TextToSpeech#getLanguage()}. |
Jean-Michel Trivi | f478267 | 2009-06-09 16:22:48 -0700 | [diff] [blame] | 5247 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 5248 | @Deprecated |
Jean-Michel Trivi | f478267 | 2009-06-09 16:22:48 -0700 | [diff] [blame] | 5249 | public static final String TTS_DEFAULT_LANG = "tts_default_lang"; |
| 5250 | |
| 5251 | /** |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 5252 | * Default text-to-speech country. |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 5253 | * |
| 5254 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 5255 | * Sandwich release. Apps should never need to read this setting directly, |
| 5256 | * instead can query the TextToSpeech framework classes for the default |
| 5257 | * locale. {@link TextToSpeech#getLanguage()}. |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 5258 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 5259 | @Deprecated |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 5260 | public static final String TTS_DEFAULT_COUNTRY = "tts_default_country"; |
| 5261 | |
| 5262 | /** |
| 5263 | * Default text-to-speech locale variant. |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 5264 | * |
| 5265 | * @deprecated this setting is no longer in use, as of the Ice Cream |
| 5266 | * Sandwich release. Apps should never need to read this setting directly, |
| 5267 | * instead can query the TextToSpeech framework classes for the |
| 5268 | * locale that is in use {@link TextToSpeech#getLanguage()}. |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 5269 | */ |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 5270 | @Deprecated |
Jean-Michel Trivi | a6fcc95 | 2009-06-19 14:06:01 -0700 | [diff] [blame] | 5271 | public static final String TTS_DEFAULT_VARIANT = "tts_default_variant"; |
| 5272 | |
| 5273 | /** |
Narayan Kamath | e5b8c4d | 2011-08-22 15:37:47 +0100 | [diff] [blame] | 5274 | * Stores the default tts locales on a per engine basis. Stored as |
| 5275 | * a comma seperated list of values, each value being of the form |
| 5276 | * {@code engine_name:locale} for example, |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 5277 | * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This |
| 5278 | * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and |
| 5279 | * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this |
| 5280 | * setting directly, and can query the TextToSpeech framework classes |
| 5281 | * for the locale that is in use. |
Narayan Kamath | e5b8c4d | 2011-08-22 15:37:47 +0100 | [diff] [blame] | 5282 | * |
| 5283 | * @hide |
| 5284 | */ |
| 5285 | public static final String TTS_DEFAULT_LOCALE = "tts_default_locale"; |
| 5286 | |
| 5287 | /** |
Charles Chen | ceffa15 | 2010-03-16 21:18:10 -0700 | [diff] [blame] | 5288 | * Space delimited list of plugin packages that are enabled. |
| 5289 | */ |
| 5290 | public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins"; |
| 5291 | |
| 5292 | /** |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5293 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} |
| 5294 | * instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5295 | */ |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5296 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5297 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5298 | Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5299 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5300 | /** |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5301 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} |
| 5302 | * instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5303 | */ |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5304 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5305 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5306 | Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5307 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5308 | /** |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5309 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} |
| 5310 | * instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5311 | */ |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5312 | @Deprecated |
| 5313 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = |
| 5314 | Global.WIFI_NUM_OPEN_NETWORKS_KEPT; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5315 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5316 | /** |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5317 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} |
| 5318 | * instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5319 | */ |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5320 | @Deprecated |
| 5321 | public static final String WIFI_ON = Global.WIFI_ON; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5322 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5323 | /** |
| 5324 | * The acceptable packet loss percentage (range 0 - 100) before trying |
| 5325 | * another AP on the same network. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5326 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5327 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5328 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5329 | public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE = |
| 5330 | "wifi_watchdog_acceptable_packet_loss_percentage"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5331 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5332 | /** |
| 5333 | * The number of access points required for a network in order for the |
| 5334 | * watchdog to monitor it. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5335 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5336 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5337 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5338 | public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5339 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5340 | /** |
| 5341 | * The delay between background checks. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5342 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5343 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5344 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5345 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS = |
| 5346 | "wifi_watchdog_background_check_delay_ms"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5347 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5348 | /** |
| 5349 | * Whether the Wi-Fi watchdog is enabled for background checking even |
| 5350 | * after it thinks the user has connected to a good access point. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5351 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5352 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5353 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5354 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED = |
| 5355 | "wifi_watchdog_background_check_enabled"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5356 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5357 | /** |
| 5358 | * The timeout for a background ping |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5359 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5360 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5361 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5362 | public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = |
| 5363 | "wifi_watchdog_background_check_timeout_ms"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5364 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5365 | /** |
| 5366 | * The number of initial pings to perform that *may* be ignored if they |
| 5367 | * fail. Again, if these fail, they will *not* be used in packet loss |
| 5368 | * calculation. For example, one network always seemed to time out for |
| 5369 | * the first couple pings, so this is set to 3 by default. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5370 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5371 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5372 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5373 | public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = |
| 5374 | "wifi_watchdog_initial_ignored_ping_count"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5375 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5376 | /** |
| 5377 | * The maximum number of access points (per network) to attempt to test. |
| 5378 | * If this number is reached, the watchdog will no longer monitor the |
| 5379 | * initial connection state for the network. This is a safeguard for |
| 5380 | * networks containing multiple APs whose DNS does not respond to pings. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5381 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5382 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5383 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5384 | public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5385 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5386 | /** |
Jeff Sharkey | bdfce2e | 2012-09-26 15:54:06 -0700 | [diff] [blame] | 5387 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5388 | */ |
Jeff Sharkey | bdfce2e | 2012-09-26 15:54:06 -0700 | [diff] [blame] | 5389 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5390 | public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; |
| 5391 | |
| 5392 | /** |
| 5393 | * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5394 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5395 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5396 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5397 | public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list"; |
| 5398 | |
| 5399 | /** |
| 5400 | * The number of pings to test if an access point is a good connection. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5401 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5402 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5403 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5404 | public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5405 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5406 | /** |
| 5407 | * The delay between pings. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5408 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5409 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5410 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5411 | public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5412 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5413 | /** |
| 5414 | * The timeout per ping. |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5415 | * @deprecated This setting is not used. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5416 | */ |
Isaac Levy | d7b3e6a | 2011-07-20 18:15:30 -0700 | [diff] [blame] | 5417 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5418 | public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms"; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5419 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5420 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5421 | * @deprecated Use |
| 5422 | * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5423 | */ |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 5424 | @Deprecated |
| 5425 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 5426 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5427 | /** |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5428 | * @deprecated Use |
| 5429 | * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5430 | */ |
Jeff Sharkey | bdfce2e | 2012-09-26 15:54:06 -0700 | [diff] [blame] | 5431 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5432 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5433 | Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5434 | |
| 5435 | /** |
Jeremy Joslin | 7929484 | 2014-12-03 17:15:28 -0800 | [diff] [blame] | 5436 | * The number of milliseconds to hold on to a PendingIntent based request. This delay gives |
| 5437 | * the receivers of the PendingIntent an opportunity to make a new network request before |
| 5438 | * the Network satisfying the request is potentially removed. |
| 5439 | * |
| 5440 | * @hide |
| 5441 | */ |
| 5442 | public static final String CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS = |
| 5443 | "connectivity_release_pending_intent_delay_ms"; |
| 5444 | |
| 5445 | /** |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 5446 | * Whether background data usage is allowed. |
| 5447 | * |
| 5448 | * @deprecated As of {@link VERSION_CODES#ICE_CREAM_SANDWICH}, |
| 5449 | * availability of background data depends on several |
| 5450 | * combined factors. When background data is unavailable, |
| 5451 | * {@link ConnectivityManager#getActiveNetworkInfo()} will |
| 5452 | * now appear disconnected. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5453 | */ |
Jeff Sharkey | 3a844fc | 2011-08-16 14:37:57 -0700 | [diff] [blame] | 5454 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 5455 | public static final String BACKGROUND_DATA = "background_data"; |
Wink Saville | 04e71b3 | 2009-04-02 11:00:54 -0700 | [diff] [blame] | 5456 | |
| 5457 | /** |
Bjorn Bringert | 98bfa39 | 2010-03-24 10:59:48 +0000 | [diff] [blame] | 5458 | * Origins for which browsers should allow geolocation by default. |
| 5459 | * The value is a space-separated list of origins. |
| 5460 | */ |
| 5461 | public static final String ALLOWED_GEOLOCATION_ORIGINS |
| 5462 | = "allowed_geolocation_origins"; |
| 5463 | |
| 5464 | /** |
Wink Saville | e9b06d7 | 2009-05-18 21:47:50 -0700 | [diff] [blame] | 5465 | * The preferred TTY mode 0 = TTy Off, CDMA default |
| 5466 | * 1 = TTY Full |
| 5467 | * 2 = TTY HCO |
| 5468 | * 3 = TTY VCO |
| 5469 | * @hide |
| 5470 | */ |
| 5471 | public static final String PREFERRED_TTY_MODE = |
| 5472 | "preferred_tty_mode"; |
| 5473 | |
Wink Saville | 04e71b3 | 2009-04-02 11:00:54 -0700 | [diff] [blame] | 5474 | /** |
Wink Saville | 04e71b3 | 2009-04-02 11:00:54 -0700 | [diff] [blame] | 5475 | * Whether the enhanced voice privacy mode is enabled. |
| 5476 | * 0 = normal voice privacy |
| 5477 | * 1 = enhanced voice privacy |
| 5478 | * @hide |
| 5479 | */ |
| 5480 | public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled"; |
| 5481 | |
| 5482 | /** |
| 5483 | * Whether the TTY mode mode is enabled. |
| 5484 | * 0 = disabled |
| 5485 | * 1 = enabled |
| 5486 | * @hide |
| 5487 | */ |
| 5488 | public static final String TTY_MODE_ENABLED = "tty_mode_enabled"; |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 5489 | |
| 5490 | /** |
Christopher Tate | 8031a3d | 2009-07-06 16:36:05 -0700 | [diff] [blame] | 5491 | * Controls whether settings backup is enabled. |
Dianne Hackborn | cf09829 | 2009-07-01 19:55:20 -0700 | [diff] [blame] | 5492 | * Type: int ( 0 = disabled, 1 = enabled ) |
| 5493 | * @hide |
| 5494 | */ |
| 5495 | public static final String BACKUP_ENABLED = "backup_enabled"; |
| 5496 | |
| 5497 | /** |
Christopher Tate | cce9da5 | 2010-02-03 15:11:15 -0800 | [diff] [blame] | 5498 | * Controls whether application data is automatically restored from backup |
| 5499 | * at install time. |
| 5500 | * Type: int ( 0 = disabled, 1 = enabled ) |
| 5501 | * @hide |
| 5502 | */ |
| 5503 | public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore"; |
| 5504 | |
| 5505 | /** |
Christopher Tate | 8031a3d | 2009-07-06 16:36:05 -0700 | [diff] [blame] | 5506 | * Indicates whether settings backup has been fully provisioned. |
| 5507 | * Type: int ( 0 = unprovisioned, 1 = fully provisioned ) |
| 5508 | * @hide |
| 5509 | */ |
| 5510 | public static final String BACKUP_PROVISIONED = "backup_provisioned"; |
| 5511 | |
| 5512 | /** |
Dianne Hackborn | cf09829 | 2009-07-01 19:55:20 -0700 | [diff] [blame] | 5513 | * Component of the transport to use for backup/restore. |
| 5514 | * @hide |
| 5515 | */ |
| 5516 | public static final String BACKUP_TRANSPORT = "backup_transport"; |
Sanjay Jeyakumar | 21bf241 | 2009-07-09 13:31:48 -0700 | [diff] [blame] | 5517 | |
Dianne Hackborn | d7cd29d | 2009-07-01 11:22:45 -0700 | [diff] [blame] | 5518 | /** |
| 5519 | * Version for which the setup wizard was last shown. Bumped for |
| 5520 | * each release when there is new setup information to show. |
| 5521 | * @hide |
| 5522 | */ |
| 5523 | public static final String LAST_SETUP_SHOWN = "last_setup_shown"; |
Dianne Hackborn | cf09829 | 2009-07-01 19:55:20 -0700 | [diff] [blame] | 5524 | |
| 5525 | /** |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 5526 | * The interval in milliseconds after which Wi-Fi is considered idle. |
| 5527 | * When idle, it is possible for the device to be switched from Wi-Fi to |
| 5528 | * the mobile data network. |
| 5529 | * @hide |
Jeff Brown | bf6f6f9 | 2012-09-25 15:03:20 -0700 | [diff] [blame] | 5530 | * @deprecated Use {@link android.provider.Settings.Global#WIFI_IDLE_MS} |
| 5531 | * instead. |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 5532 | */ |
Christopher Tate | 6f5a9a9 | 2012-09-14 17:24:28 -0700 | [diff] [blame] | 5533 | @Deprecated |
| 5534 | public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS; |
Doug Zongker | 43866e0 | 2010-01-07 12:09:54 -0800 | [diff] [blame] | 5535 | |
| 5536 | /** |
Narayan Kamath | ee69ff4 | 2011-06-28 12:07:18 +0100 | [diff] [blame] | 5537 | * The global search provider chosen by the user (if multiple global |
| 5538 | * search providers are installed). This will be the provider returned |
| 5539 | * by {@link SearchManager#getGlobalSearchActivity()} if it's still |
| 5540 | * installed. This setting is stored as a flattened component name as |
| 5541 | * per {@link ComponentName#flattenToString()}. |
| 5542 | * |
| 5543 | * @hide |
| 5544 | */ |
| 5545 | public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY = |
| 5546 | "search_global_search_activity"; |
| 5547 | |
| 5548 | /** |
Doug Zongker | aed8f8e | 2010-01-07 18:07:50 -0800 | [diff] [blame] | 5549 | * The number of promoted sources in GlobalSearch. |
| 5550 | * @hide |
| 5551 | */ |
| 5552 | public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources"; |
| 5553 | /** |
| 5554 | * The maximum number of suggestions returned by GlobalSearch. |
| 5555 | * @hide |
| 5556 | */ |
| 5557 | public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display"; |
| 5558 | /** |
| 5559 | * The number of suggestions GlobalSearch will ask each non-web search source for. |
| 5560 | * @hide |
| 5561 | */ |
| 5562 | public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source"; |
| 5563 | /** |
| 5564 | * The number of suggestions the GlobalSearch will ask the web search source for. |
| 5565 | * @hide |
| 5566 | */ |
| 5567 | public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT = |
| 5568 | "search_web_results_override_limit"; |
| 5569 | /** |
| 5570 | * The number of milliseconds that GlobalSearch will wait for suggestions from |
| 5571 | * promoted sources before continuing with all other sources. |
| 5572 | * @hide |
| 5573 | */ |
| 5574 | public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS = |
| 5575 | "search_promoted_source_deadline_millis"; |
| 5576 | /** |
| 5577 | * The number of milliseconds before GlobalSearch aborts search suggesiton queries. |
| 5578 | * @hide |
| 5579 | */ |
| 5580 | public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis"; |
| 5581 | /** |
| 5582 | * The maximum number of milliseconds that GlobalSearch shows the previous results |
| 5583 | * after receiving a new query. |
| 5584 | * @hide |
| 5585 | */ |
| 5586 | public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis"; |
| 5587 | /** |
| 5588 | * The maximum age of log data used for shortcuts in GlobalSearch. |
| 5589 | * @hide |
| 5590 | */ |
| 5591 | public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis"; |
| 5592 | /** |
| 5593 | * The maximum age of log data used for source ranking in GlobalSearch. |
| 5594 | * @hide |
| 5595 | */ |
| 5596 | public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS = |
| 5597 | "search_max_source_event_age_millis"; |
| 5598 | /** |
| 5599 | * The minimum number of impressions needed to rank a source in GlobalSearch. |
| 5600 | * @hide |
| 5601 | */ |
| 5602 | public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING = |
| 5603 | "search_min_impressions_for_source_ranking"; |
| 5604 | /** |
| 5605 | * The minimum number of clicks needed to rank a source in GlobalSearch. |
| 5606 | * @hide |
| 5607 | */ |
| 5608 | public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING = |
| 5609 | "search_min_clicks_for_source_ranking"; |
| 5610 | /** |
| 5611 | * The maximum number of shortcuts shown by GlobalSearch. |
| 5612 | * @hide |
| 5613 | */ |
| 5614 | public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned"; |
| 5615 | /** |
| 5616 | * The size of the core thread pool for suggestion queries in GlobalSearch. |
| 5617 | * @hide |
| 5618 | */ |
| 5619 | public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE = |
| 5620 | "search_query_thread_core_pool_size"; |
| 5621 | /** |
| 5622 | * The maximum size of the thread pool for suggestion queries in GlobalSearch. |
| 5623 | * @hide |
| 5624 | */ |
| 5625 | public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE = |
| 5626 | "search_query_thread_max_pool_size"; |
| 5627 | /** |
| 5628 | * The size of the core thread pool for shortcut refreshing in GlobalSearch. |
| 5629 | * @hide |
| 5630 | */ |
| 5631 | public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE = |
| 5632 | "search_shortcut_refresh_core_pool_size"; |
| 5633 | /** |
| 5634 | * The maximum size of the thread pool for shortcut refreshing in GlobalSearch. |
| 5635 | * @hide |
| 5636 | */ |
| 5637 | public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE = |
| 5638 | "search_shortcut_refresh_max_pool_size"; |
| 5639 | /** |
| 5640 | * The maximun time that excess threads in the GlobalSeach thread pools will |
| 5641 | * wait before terminating. |
| 5642 | * @hide |
| 5643 | */ |
| 5644 | public static final String SEARCH_THREAD_KEEPALIVE_SECONDS = |
| 5645 | "search_thread_keepalive_seconds"; |
| 5646 | /** |
| 5647 | * The maximum number of concurrent suggestion queries to each source. |
| 5648 | * @hide |
| 5649 | */ |
| 5650 | public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT = |
| 5651 | "search_per_source_concurrent_query_limit"; |
| 5652 | |
San Mehat | 87734d3 | 2010-01-08 12:53:06 -0800 | [diff] [blame] | 5653 | /** |
| 5654 | * Whether or not alert sounds are played on MountService events. (0 = false, 1 = true) |
| 5655 | * @hide |
| 5656 | */ |
| 5657 | public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd"; |
| 5658 | |
| 5659 | /** |
| 5660 | * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true) |
| 5661 | * @hide |
| 5662 | */ |
| 5663 | public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart"; |
| 5664 | |
| 5665 | /** |
| 5666 | * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true) |
| 5667 | * @hide |
| 5668 | */ |
| 5669 | public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt"; |
| 5670 | |
| 5671 | /** |
| 5672 | * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true) |
| 5673 | * @hide |
| 5674 | */ |
| 5675 | public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled"; |
Doug Zongker | aed8f8e | 2010-01-07 18:07:50 -0800 | [diff] [blame] | 5676 | |
Dan Egnor | 42471dd | 2010-01-07 17:25:22 -0800 | [diff] [blame] | 5677 | /** |
| 5678 | * If nonzero, ANRs in invisible background processes bring up a dialog. |
| 5679 | * Otherwise, the process will be silently killed. |
| 5680 | * @hide |
| 5681 | */ |
| 5682 | public static final String ANR_SHOW_BACKGROUND = "anr_show_background"; |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 5683 | |
Mike LeBeau | 5d34e9b | 2010-02-10 19:34:56 -0800 | [diff] [blame] | 5684 | /** |
| 5685 | * The {@link ComponentName} string of the service to be used as the voice recognition |
| 5686 | * service. |
Erik | eebc8e2 | 2010-02-18 13:27:19 -0800 | [diff] [blame] | 5687 | * |
Mike LeBeau | 5d34e9b | 2010-02-10 19:34:56 -0800 | [diff] [blame] | 5688 | * @hide |
| 5689 | */ |
| 5690 | public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service"; |
Dan Egnor | 42471dd | 2010-01-07 17:25:22 -0800 | [diff] [blame] | 5691 | |
William Luh | 623a428 | 2013-06-24 12:14:18 -0700 | [diff] [blame] | 5692 | /** |
| 5693 | * Stores whether an user has consented to have apps verified through PAM. |
| 5694 | * The value is boolean (1 or 0). |
| 5695 | * |
| 5696 | * @hide |
| 5697 | */ |
| 5698 | public static final String PACKAGE_VERIFIER_USER_CONSENT = |
| 5699 | "package_verifier_user_consent"; |
satok | 988323c | 2011-06-22 16:38:13 +0900 | [diff] [blame] | 5700 | |
| 5701 | /** |
satok | ada8c4e | 2011-08-23 14:56:56 +0900 | [diff] [blame] | 5702 | * The {@link ComponentName} string of the selected spell checker service which is |
| 5703 | * one of the services managed by the text service manager. |
| 5704 | * |
| 5705 | * @hide |
| 5706 | */ |
| 5707 | public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker"; |
| 5708 | |
| 5709 | /** |
| 5710 | * The {@link ComponentName} string of the selected subtype of the selected spell checker |
satok | 988323c | 2011-06-22 16:38:13 +0900 | [diff] [blame] | 5711 | * service which is one of the services managed by the text service manager. |
| 5712 | * |
| 5713 | * @hide |
| 5714 | */ |
satok | ada8c4e | 2011-08-23 14:56:56 +0900 | [diff] [blame] | 5715 | public static final String SELECTED_SPELL_CHECKER_SUBTYPE = |
| 5716 | "selected_spell_checker_subtype"; |
satok | 988323c | 2011-06-22 16:38:13 +0900 | [diff] [blame] | 5717 | |
Doug Zongker | aed8f8e | 2010-01-07 18:07:50 -0800 | [diff] [blame] | 5718 | /** |
satok | a33c4fc | 2011-08-25 16:50:11 +0900 | [diff] [blame] | 5719 | * The {@link ComponentName} string whether spell checker is enabled or not. |
| 5720 | * |
| 5721 | * @hide |
| 5722 | */ |
| 5723 | public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled"; |
| 5724 | |
| 5725 | /** |
David Brown | 458e806 | 2010-03-08 21:52:11 -0800 | [diff] [blame] | 5726 | * What happens when the user presses the Power button while in-call |
| 5727 | * and the screen is on.<br/> |
| 5728 | * <b>Values:</b><br/> |
| 5729 | * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/> |
| 5730 | * 2 - The Power button hangs up the current call.<br/> |
| 5731 | * |
| 5732 | * @hide |
| 5733 | */ |
| 5734 | public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior"; |
| 5735 | |
| 5736 | /** |
| 5737 | * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen". |
| 5738 | * @hide |
| 5739 | */ |
| 5740 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1; |
| 5741 | |
| 5742 | /** |
| 5743 | * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up". |
| 5744 | * @hide |
| 5745 | */ |
| 5746 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2; |
| 5747 | |
| 5748 | /** |
| 5749 | * INCALL_POWER_BUTTON_BEHAVIOR default value. |
| 5750 | * @hide |
| 5751 | */ |
| 5752 | public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT = |
| 5753 | INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF; |
| 5754 | |
| 5755 | /** |
Jeff Brown | a20dda4 | 2014-05-27 20:57:24 -0700 | [diff] [blame] | 5756 | * Whether the device should wake when the wake gesture sensor detects motion. |
| 5757 | * @hide |
| 5758 | */ |
| 5759 | public static final String WAKE_GESTURE_ENABLED = "wake_gesture_enabled"; |
| 5760 | |
| 5761 | /** |
John Spurlock | a4215ce | 2014-08-04 14:50:38 -0400 | [diff] [blame] | 5762 | * Whether the device should doze if configured. |
| 5763 | * @hide |
| 5764 | */ |
| 5765 | public static final String DOZE_ENABLED = "doze_enabled"; |
| 5766 | |
| 5767 | /** |
Dianne Hackborn | 2ccda4d | 2010-03-22 21:49:15 -0700 | [diff] [blame] | 5768 | * The current night mode that has been selected by the user. Owned |
| 5769 | * and controlled by UiModeManagerService. Constants are as per |
| 5770 | * UiModeManager. |
| 5771 | * @hide |
| 5772 | */ |
| 5773 | public static final String UI_NIGHT_MODE = "ui_night_mode"; |
Suchi Amalapurapu | 40e4725 | 2010-04-07 16:15:50 -0700 | [diff] [blame] | 5774 | |
| 5775 | /** |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 5776 | * Whether screensavers are enabled. |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 5777 | * @hide |
| 5778 | */ |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 5779 | public static final String SCREENSAVER_ENABLED = "screensaver_enabled"; |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 5780 | |
| 5781 | /** |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 5782 | * The user's chosen screensaver components. |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 5783 | * |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 5784 | * These will be launched by the PhoneWindowManager after a timeout when not on |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 5785 | * battery, or upon dock insertion (if SCREENSAVER_ACTIVATE_ON_DOCK is set to 1). |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 5786 | * @hide |
| 5787 | */ |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 5788 | public static final String SCREENSAVER_COMPONENTS = "screensaver_components"; |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 5789 | |
| 5790 | /** |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 5791 | * If screensavers are enabled, whether the screensaver should be automatically launched |
| 5792 | * when the device is inserted into a (desk) dock. |
Daniel Sandler | 2d54536 | 2011-11-17 10:38:37 -0800 | [diff] [blame] | 5793 | * @hide |
| 5794 | */ |
| 5795 | public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock"; |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 5796 | |
John Spurlock | 1a868b7 | 2012-08-22 09:56:51 -0400 | [diff] [blame] | 5797 | /** |
| 5798 | * If screensavers are enabled, whether the screensaver should be automatically launched |
| 5799 | * when the screen times out when not on battery. |
| 5800 | * @hide |
| 5801 | */ |
| 5802 | public static final String SCREENSAVER_ACTIVATE_ON_SLEEP = "screensaver_activate_on_sleep"; |
| 5803 | |
| 5804 | /** |
| 5805 | * If screensavers are enabled, the default screensaver component. |
| 5806 | * @hide |
| 5807 | */ |
| 5808 | public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component"; |
| 5809 | |
Daniel Sandler | 0601eb7 | 2011-04-13 01:01:32 -0400 | [diff] [blame] | 5810 | /** |
Martijn Coenen | a739788 | 2013-07-30 20:07:47 -0700 | [diff] [blame] | 5811 | * The default NFC payment component |
| 5812 | * @hide |
| 5813 | */ |
| 5814 | public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component"; |
| 5815 | |
| 5816 | /** |
Martijn Coenen | 2f6f3a01 | 2014-04-25 17:00:21 -0700 | [diff] [blame] | 5817 | * Whether NFC payment is handled by the foreground application or a default. |
| 5818 | * @hide |
| 5819 | */ |
| 5820 | public static final String NFC_PAYMENT_FOREGROUND = "nfc_payment_foreground"; |
| 5821 | |
| 5822 | /** |
David Braun | f5d8319 | 2013-09-16 13:43:51 -0700 | [diff] [blame] | 5823 | * Specifies the package name currently configured to be the primary sms application |
| 5824 | * @hide |
| 5825 | */ |
| 5826 | public static final String SMS_DEFAULT_APPLICATION = "sms_default_application"; |
| 5827 | |
| 5828 | /** |
Yorke Lee | 014de02 | 2015-04-21 17:15:47 -0700 | [diff] [blame] | 5829 | * Specifies the package name currently configured to be the default dialer application |
| 5830 | * @hide |
| 5831 | */ |
| 5832 | public static final String DIALER_DEFAULT_APPLICATION = "dialer_default_application"; |
| 5833 | |
| 5834 | /** |
Adrian Roos | 943eb86 | 2015-03-26 12:31:16 -0700 | [diff] [blame] | 5835 | * Specifies the package name currently configured to be the emergency assistance application |
| 5836 | * |
| 5837 | * @see android.telephony.TelephonyManager#ACTION_EMERGENCY_ASSISTANCE |
| 5838 | * |
| 5839 | * @hide |
| 5840 | */ |
| 5841 | public static final String EMERGENCY_ASSISTANCE_APPLICATION = "emergency_assistance_application"; |
| 5842 | |
| 5843 | /** |
Jorim Jaggi | 9d91083 | 2015-05-18 17:35:26 -0700 | [diff] [blame] | 5844 | * Specifies whether the current app context on scren (assist data) will be sent to the |
| 5845 | * assist application (active voice interaction service). |
| 5846 | * |
| 5847 | * @hide |
| 5848 | */ |
| 5849 | public static final String ASSIST_STRUCTURE_ENABLED = "assist_structure_enabled"; |
| 5850 | |
| 5851 | /** |
Jorim Jaggi | a133f0b | 2015-06-26 16:40:00 -0700 | [diff] [blame] | 5852 | * Specifies whether a screenshot of the screen contents will be sent to the assist |
| 5853 | * application (active voice interaction service). |
| 5854 | * |
| 5855 | * @hide |
| 5856 | */ |
| 5857 | public static final String ASSIST_SCREENSHOT_ENABLED = "assist_screenshot_enabled"; |
| 5858 | |
| 5859 | /** |
John Spurlock | 7c74f78 | 2015-06-04 13:01:42 -0400 | [diff] [blame] | 5860 | * Names of the service components that the current user has explicitly allowed to |
Chris Wren | 8326a8a | 2014-10-22 14:13:32 -0400 | [diff] [blame] | 5861 | * see all of the user's notifications, separated by ':'. |
Daniel Sandler | 4b749ef | 2013-03-18 21:53:04 -0400 | [diff] [blame] | 5862 | * |
| 5863 | * @hide |
| 5864 | */ |
| 5865 | public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners"; |
| 5866 | |
John Spurlock | 7340fc8 | 2014-04-24 18:50:12 -0400 | [diff] [blame] | 5867 | /** |
John Spurlock | 7c74f78 | 2015-06-04 13:01:42 -0400 | [diff] [blame] | 5868 | * Names of the packages that the current user has explicitly allowed to |
| 5869 | * manage notification policy configuration, separated by ':'. |
John Spurlock | 7c74f78 | 2015-06-04 13:01:42 -0400 | [diff] [blame] | 5870 | */ |
| 5871 | public static final String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES = |
| 5872 | "enabled_notification_policy_access_packages"; |
| 5873 | |
John Spurlock | 5c45412 | 2013-06-17 07:35:46 -0400 | [diff] [blame] | 5874 | /** @hide */ |
| 5875 | public static final String BAR_SERVICE_COMPONENT = "bar_service_component"; |
| 5876 | |
John Spurlock | d67ec25 | 2013-09-05 11:31:54 -0400 | [diff] [blame] | 5877 | /** @hide */ |
John Spurlock | cdb57ae | 2015-02-11 19:04:11 -0500 | [diff] [blame] | 5878 | public static final String VOLUME_CONTROLLER_SERVICE_COMPONENT |
| 5879 | = "volume_controller_service_component"; |
| 5880 | |
| 5881 | /** @hide */ |
John Spurlock | f1a3664 | 2013-10-12 17:50:42 -0400 | [diff] [blame] | 5882 | public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations"; |
John Spurlock | d67ec25 | 2013-09-05 11:31:54 -0400 | [diff] [blame] | 5883 | |
Yorke Lee | 647f8f3 | 2013-05-07 10:49:44 -0700 | [diff] [blame] | 5884 | /** |
Svetoslav | f43e851 | 2013-09-30 17:33:05 -0700 | [diff] [blame] | 5885 | * This is the query URI for finding a print service to install. |
| 5886 | * |
| 5887 | * @hide |
| 5888 | */ |
| 5889 | public static final String PRINT_SERVICE_SEARCH_URI = "print_service_search_uri"; |
| 5890 | |
| 5891 | /** |
| 5892 | * This is the query URI for finding a NFC payment service to install. |
| 5893 | * |
| 5894 | * @hide |
| 5895 | */ |
| 5896 | public static final String PAYMENT_SERVICE_SEARCH_URI = "payment_service_search_uri"; |
| 5897 | |
| 5898 | /** |
Amith Yamasani | 1e9c218 | 2014-06-11 17:25:51 -0700 | [diff] [blame] | 5899 | * If enabled, apps should try to skip any introductory hints on first launch. This might |
Amith Yamasani | 0c41639 | 2014-06-13 15:54:39 -0700 | [diff] [blame] | 5900 | * apply to users that are already familiar with the environment or temporary users. |
Amith Yamasani | 1e9c218 | 2014-06-11 17:25:51 -0700 | [diff] [blame] | 5901 | * <p> |
| 5902 | * Type : int (0 to show hints, 1 to skip showing hints) |
Amith Yamasani | 1e9c218 | 2014-06-11 17:25:51 -0700 | [diff] [blame] | 5903 | */ |
| 5904 | public static final String SKIP_FIRST_USE_HINTS = "skip_first_use_hints"; |
| 5905 | |
| 5906 | /** |
John Spurlock | aa5ee4d | 2014-07-25 13:05:12 -0400 | [diff] [blame] | 5907 | * Persisted playback time after a user confirmation of an unsafe volume level. |
| 5908 | * |
| 5909 | * @hide |
| 5910 | */ |
| 5911 | public static final String UNSAFE_VOLUME_MUSIC_ACTIVE_MS = "unsafe_volume_music_active_ms"; |
| 5912 | |
| 5913 | /** |
Dan Sandler | 52e5701e | 2014-07-22 23:14:54 -0400 | [diff] [blame] | 5914 | * This preference enables notification display on the lockscreen. |
| 5915 | * @hide |
| 5916 | */ |
| 5917 | public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = |
| 5918 | "lock_screen_show_notifications"; |
| 5919 | |
| 5920 | /** |
Dongwon Kang | 4d933a0 | 2014-08-07 22:51:47 -0700 | [diff] [blame] | 5921 | * List of TV inputs that are currently hidden. This is a string |
Jaewan Kim | f0e530e | 2014-08-22 00:43:31 +0900 | [diff] [blame] | 5922 | * containing the IDs of all hidden TV inputs. Each ID is encoded by |
| 5923 | * {@link android.net.Uri#encode(String)} and separated by ':'. |
Dongwon Kang | 4d933a0 | 2014-08-07 22:51:47 -0700 | [diff] [blame] | 5924 | * @hide |
| 5925 | */ |
| 5926 | public static final String TV_INPUT_HIDDEN_INPUTS = "tv_input_hidden_inputs"; |
| 5927 | |
| 5928 | /** |
| 5929 | * List of custom TV input labels. This is a string containing <TV input id, custom name> |
Jaewan Kim | f0e530e | 2014-08-22 00:43:31 +0900 | [diff] [blame] | 5930 | * pairs. TV input id and custom name are encoded by {@link android.net.Uri#encode(String)} |
| 5931 | * and separated by ','. Each pair is separated by ':'. |
Dongwon Kang | 4d933a0 | 2014-08-07 22:51:47 -0700 | [diff] [blame] | 5932 | * @hide |
| 5933 | */ |
| 5934 | public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels"; |
| 5935 | |
| 5936 | /** |
Glenn Kasten | 34cc4db | 2014-08-13 10:56:38 -0700 | [diff] [blame] | 5937 | * Whether automatic routing of system audio to USB audio peripheral is disabled. |
| 5938 | * The value is boolean (1 or 0), where 1 means automatic routing is disabled, |
| 5939 | * and 0 means automatic routing is enabled. |
| 5940 | * |
| 5941 | * @hide |
| 5942 | */ |
| 5943 | public static final String USB_AUDIO_AUTOMATIC_ROUTING_DISABLED = |
| 5944 | "usb_audio_automatic_routing_disabled"; |
| 5945 | |
| 5946 | /** |
Jeff Brown | 05af6ad | 2014-09-30 20:54:30 -0700 | [diff] [blame] | 5947 | * The timeout in milliseconds before the device fully goes to sleep after |
| 5948 | * a period of inactivity. This value sets an upper bound on how long the device |
| 5949 | * will stay awake or dreaming without user activity. It should generally |
Dianne Hackborn | ad6a99b | 2014-11-18 10:11:10 -0800 | [diff] [blame] | 5950 | * be longer than {@link Settings.System#SCREEN_OFF_TIMEOUT} as otherwise the device |
Jeff Brown | 05af6ad | 2014-09-30 20:54:30 -0700 | [diff] [blame] | 5951 | * will sleep before it ever has a chance to dream. |
| 5952 | * <p> |
| 5953 | * Use -1 to disable this timeout. |
| 5954 | * </p> |
| 5955 | * |
| 5956 | * @hide |
| 5957 | */ |
| 5958 | public static final String SLEEP_TIMEOUT = "sleep_timeout"; |
| 5959 | |
| 5960 | /** |
Jason Monk | 27bbb2d | 2015-03-31 16:46:39 -0400 | [diff] [blame] | 5961 | * Controls whether double tap to wake is enabled. |
| 5962 | * @hide |
| 5963 | */ |
| 5964 | public static final String DOUBLE_TAP_TO_WAKE = "double_tap_to_wake"; |
| 5965 | |
| 5966 | /** |
Xiyuan Xia | e6de8b9 | 2015-06-06 22:18:05 -0700 | [diff] [blame] | 5967 | * The current assistant component. It could be a voice interaction service, |
| 5968 | * or an activity that handles ACTION_ASSIST, or empty which means using the default |
| 5969 | * handling. |
| 5970 | * |
| 5971 | * @hide |
| 5972 | */ |
| 5973 | public static final String ASSISTANT = "assistant"; |
| 5974 | |
| 5975 | /** |
Jason Monk | 5a5e7d6 | 2015-08-04 11:20:25 -0400 | [diff] [blame] | 5976 | * Whether the camera launch gesture should be disabled. |
| 5977 | * |
| 5978 | * @hide |
| 5979 | */ |
| 5980 | public static final String CAMERA_GESTURE_DISABLED = "camera_gesture_disabled"; |
| 5981 | |
| 5982 | /** |
Adrian Roos | 5941c98 | 2015-09-03 15:59:49 -0700 | [diff] [blame] | 5983 | * Whether the camera launch gesture to double tap the power button when the screen is off |
| 5984 | * should be disabled. |
| 5985 | * |
| 5986 | * @hide |
| 5987 | */ |
| 5988 | public static final String CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED = |
| 5989 | "camera_double_tap_power_gesture_disabled"; |
| 5990 | |
| 5991 | /** |
Jason Monk | 5dbd4aa | 2016-02-07 13:13:39 -0500 | [diff] [blame] | 5992 | |
| 5993 | /** |
| 5994 | * Behavior of twilight on the device. |
| 5995 | * One of {@link #TWILIGHT_MODE_LOCKED_OFF}, {@link #TWILIGHT_MODE_LOCKED_ON} |
| 5996 | * or {@link #TWILIGHT_MODE_AUTO}. |
| 5997 | * @hide |
| 5998 | */ |
| 5999 | public static final String TWILIGHT_MODE = "twilight_mode"; |
| 6000 | |
| 6001 | /** |
| 6002 | * Twilight mode always off. |
| 6003 | * @hide |
| 6004 | */ |
| 6005 | public static final int TWILIGHT_MODE_LOCKED_OFF = 0; |
| 6006 | |
| 6007 | /** |
| 6008 | * Twilight mode always on. |
| 6009 | * @hide |
| 6010 | */ |
| 6011 | public static final int TWILIGHT_MODE_LOCKED_ON = 1; |
| 6012 | |
| 6013 | /** |
| 6014 | * Twilight mode auto. |
| 6015 | * @hide |
| 6016 | */ |
| 6017 | public static final int TWILIGHT_MODE_AUTO = 2; |
| 6018 | |
| 6019 | /** |
| 6020 | * Twilight mode auto, temporarily overriden to on. |
| 6021 | * @hide |
| 6022 | */ |
| 6023 | public static final int TWILIGHT_MODE_AUTO_OVERRIDE_OFF = 3; |
| 6024 | |
| 6025 | /** |
| 6026 | * Twilight mode auto, temporarily overriden to off. |
| 6027 | * @hide |
| 6028 | */ |
| 6029 | public static final int TWILIGHT_MODE_AUTO_OVERRIDE_ON = 4; |
| 6030 | |
| 6031 | /** |
| 6032 | * Whether brightness should automatically adjust based on twilight state. |
| 6033 | * @hide |
| 6034 | */ |
| 6035 | public static final String BRIGHTNESS_USE_TWILIGHT = "brightness_use_twilight"; |
| 6036 | |
| 6037 | /** |
Ruben Brunk | e24b9a6 | 2016-02-16 21:38:24 -0800 | [diff] [blame] | 6038 | * Names of the service components that the current user has explicitly allowed to |
| 6039 | * be a VR mode listener, separated by ':'. |
| 6040 | * |
| 6041 | * @hide |
| 6042 | */ |
| 6043 | public static final String ENABLED_VR_LISTENERS = "enabled_vr_listeners"; |
| 6044 | |
| 6045 | /** |
Ruben Brunk | 49506e0 | 2016-04-18 18:10:47 -0700 | [diff] [blame] | 6046 | * Behavior of the display while in VR mode. |
| 6047 | * |
| 6048 | * One of {@link #VR_DISPLAY_MODE_LOW_PERSISTENCE} or {@link #VR_DISPLAY_MODE_OFF}. |
| 6049 | * |
| 6050 | * @hide |
| 6051 | */ |
| 6052 | public static final String VR_DISPLAY_MODE = "vr_display_mode"; |
| 6053 | |
| 6054 | /** |
| 6055 | * Lower the display persistence while the system is in VR mode. |
| 6056 | * |
| 6057 | * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE |
| 6058 | * |
| 6059 | * @hide. |
| 6060 | */ |
| 6061 | public static final int VR_DISPLAY_MODE_LOW_PERSISTENCE = 0; |
| 6062 | |
| 6063 | /** |
| 6064 | * Do not alter the display persistence while the system is in VR mode. |
| 6065 | * |
| 6066 | * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE |
| 6067 | * |
| 6068 | * @hide. |
| 6069 | */ |
| 6070 | public static final int VR_DISPLAY_MODE_OFF = 1; |
| 6071 | |
| 6072 | /** |
Svetoslav Ganov | a571a58 | 2011-09-20 18:32:20 -0700 | [diff] [blame] | 6073 | * This are the settings to be backed up. |
| 6074 | * |
| 6075 | * NOTE: Settings are backed up and restored in the order they appear |
| 6076 | * in this array. If you have one setting depending on another, |
| 6077 | * make sure that they are ordered appropriately. |
| 6078 | * |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 6079 | * @hide |
| 6080 | */ |
| 6081 | public static final String[] SETTINGS_TO_BACKUP = { |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 6082 | BUGREPORT_IN_POWER_MENU, // moved to global |
Amith Yamasani | 8823c0a8 | 2009-07-07 14:30:17 -0700 | [diff] [blame] | 6083 | ALLOW_MOCK_LOCATION, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 6084 | PARENTAL_CONTROL_ENABLED, |
| 6085 | PARENTAL_CONTROL_REDIRECT_URL, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 6086 | USB_MASS_STORAGE_ENABLED, // moved to global |
Anna Galusza | fa7786c | 2015-12-22 10:53:44 -0800 | [diff] [blame] | 6087 | ACCESSIBILITY_DISPLAY_INVERSION_ENABLED, |
| 6088 | ACCESSIBILITY_DISPLAY_DALTONIZER, |
| 6089 | ACCESSIBILITY_DISPLAY_COLOR_MATRIX, |
| 6090 | ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, |
Svetoslav Ganov | 1cf70bb | 2012-08-06 10:53:34 -0700 | [diff] [blame] | 6091 | ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, |
| 6092 | ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE, |
| 6093 | ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE, |
Svetoslav Ganov | 585f13f8d | 2010-08-10 07:59:15 -0700 | [diff] [blame] | 6094 | ACCESSIBILITY_SCRIPT_INJECTION, |
Anna Galusza | fa7786c | 2015-12-22 10:53:44 -0800 | [diff] [blame] | 6095 | ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS, |
Christopher Tate | 14c2d79 | 2010-02-25 16:49:44 -0800 | [diff] [blame] | 6096 | BACKUP_AUTO_RESTORE, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 6097 | ENABLED_ACCESSIBILITY_SERVICES, |
Christopher Tate | 6597e34 | 2015-02-17 12:15:25 -0800 | [diff] [blame] | 6098 | ENABLED_NOTIFICATION_LISTENERS, |
Ruben Brunk | e24b9a6 | 2016-02-16 21:38:24 -0800 | [diff] [blame] | 6099 | ENABLED_VR_LISTENERS, |
Christopher Tate | 7b9a28c | 2015-03-18 13:06:16 -0700 | [diff] [blame] | 6100 | ENABLED_INPUT_METHODS, |
Svetoslav Ganov | 9a4c5cd | 2012-05-30 14:06:32 -0700 | [diff] [blame] | 6101 | TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES, |
Svetoslav Ganov | a28a16d | 2011-07-28 11:24:21 -0700 | [diff] [blame] | 6102 | TOUCH_EXPLORATION_ENABLED, |
Svetoslav Ganov | a571a58 | 2011-09-20 18:32:20 -0700 | [diff] [blame] | 6103 | ACCESSIBILITY_ENABLED, |
Svetoslav Ganov | 55f937a | 2011-12-05 11:42:07 -0800 | [diff] [blame] | 6104 | ACCESSIBILITY_SPEAK_PASSWORD, |
Chris Craik | cce47eb | 2014-07-16 15:12:15 -0700 | [diff] [blame] | 6105 | ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED, |
Anna Galusza | fa7786c | 2015-12-22 10:53:44 -0800 | [diff] [blame] | 6106 | ACCESSIBILITY_CAPTIONING_PRESET, |
Alan Viverette | ef79380 | 2013-07-23 14:15:28 -0700 | [diff] [blame] | 6107 | ACCESSIBILITY_CAPTIONING_ENABLED, |
| 6108 | ACCESSIBILITY_CAPTIONING_LOCALE, |
| 6109 | ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR, |
| 6110 | ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR, |
| 6111 | ACCESSIBILITY_CAPTIONING_EDGE_TYPE, |
| 6112 | ACCESSIBILITY_CAPTIONING_EDGE_COLOR, |
| 6113 | ACCESSIBILITY_CAPTIONING_TYPEFACE, |
Alan Viverette | 69ce69b | 2013-08-29 12:23:48 -0700 | [diff] [blame] | 6114 | ACCESSIBILITY_CAPTIONING_FONT_SCALE, |
Anna Galusza | fa7786c | 2015-12-22 10:53:44 -0800 | [diff] [blame] | 6115 | ACCESSIBILITY_CAPTIONING_WINDOW_COLOR, |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 6116 | TTS_USE_DEFAULTS, |
| 6117 | TTS_DEFAULT_RATE, |
| 6118 | TTS_DEFAULT_PITCH, |
| 6119 | TTS_DEFAULT_SYNTH, |
| 6120 | TTS_DEFAULT_LANG, |
| 6121 | TTS_DEFAULT_COUNTRY, |
Charles Chen | ceffa15 | 2010-03-16 21:18:10 -0700 | [diff] [blame] | 6122 | TTS_ENABLED_PLUGINS, |
Narayan Kamath | 6d63296 | 2011-08-24 11:51:37 +0100 | [diff] [blame] | 6123 | TTS_DEFAULT_LOCALE, |
Anna Galusza | fa7786c | 2015-12-22 10:53:44 -0800 | [diff] [blame] | 6124 | SHOW_IME_WITH_HARD_KEYBOARD, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 6125 | WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, // moved to global |
| 6126 | WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, // moved to global |
| 6127 | WIFI_NUM_OPEN_NETWORKS_KEPT, // moved to global |
Christopher Tate | 06cbadd | 2015-03-16 18:29:42 -0700 | [diff] [blame] | 6128 | SELECTED_SPELL_CHECKER, |
| 6129 | SELECTED_SPELL_CHECKER_SUBTYPE, |
| 6130 | SPELL_CHECKER_ENABLED, |
San Mehat | 87734d3 | 2010-01-08 12:53:06 -0800 | [diff] [blame] | 6131 | MOUNT_PLAY_NOTIFICATION_SND, |
| 6132 | MOUNT_UMS_AUTOSTART, |
| 6133 | MOUNT_UMS_PROMPT, |
Dianne Hackborn | 2ccda4d | 2010-03-22 21:49:15 -0700 | [diff] [blame] | 6134 | MOUNT_UMS_NOTIFY_ENABLED, |
Jason Monk | 27bbb2d | 2015-03-31 16:46:39 -0400 | [diff] [blame] | 6135 | SLEEP_TIMEOUT, |
| 6136 | DOUBLE_TAP_TO_WAKE, |
Anna Galusza | fa7786c | 2015-12-22 10:53:44 -0800 | [diff] [blame] | 6137 | WAKE_GESTURE_ENABLED, |
| 6138 | LONG_PRESS_TIMEOUT, |
Jason Monk | 5a5e7d6 | 2015-08-04 11:20:25 -0400 | [diff] [blame] | 6139 | CAMERA_GESTURE_DISABLED, |
Toni Barzic | 386f834 | 2015-09-09 12:30:41 -0700 | [diff] [blame] | 6140 | ACCESSIBILITY_AUTOCLICK_ENABLED, |
Anna Galusza | fa7786c | 2015-12-22 10:53:44 -0800 | [diff] [blame] | 6141 | ACCESSIBILITY_AUTOCLICK_DELAY, |
| 6142 | ACCESSIBILITY_LARGE_POINTER_ICON, |
| 6143 | PREFERRED_TTY_MODE, |
| 6144 | ENHANCED_VOICE_PRIVACY_ENABLED, |
| 6145 | TTY_MODE_ENABLED, |
| 6146 | INCALL_POWER_BUTTON_BEHAVIOR |
-b master | 501eec9 | 2009-07-06 13:53:11 -0700 | [diff] [blame] | 6147 | }; |
| 6148 | |
| 6149 | /** |
Amith Yamasani | 4f7e2e3 | 2014-08-14 18:49:48 -0700 | [diff] [blame] | 6150 | * These entries are considered common between the personal and the managed profile, |
| 6151 | * since the managed profile doesn't get to change them. |
Amith Yamasani | 4f7e2e3 | 2014-08-14 18:49:48 -0700 | [diff] [blame] | 6152 | */ |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 6153 | private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>(); |
Amith Yamasani | b0ff322 | 2015-03-04 09:56:14 -0800 | [diff] [blame] | 6154 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 6155 | static { |
| 6156 | CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_ENABLED); |
| 6157 | CLONE_TO_MANAGED_PROFILE.add(ALLOW_MOCK_LOCATION); |
| 6158 | CLONE_TO_MANAGED_PROFILE.add(ALLOWED_GEOLOCATION_ORIGINS); |
| 6159 | CLONE_TO_MANAGED_PROFILE.add(DEFAULT_INPUT_METHOD); |
| 6160 | CLONE_TO_MANAGED_PROFILE.add(ENABLED_ACCESSIBILITY_SERVICES); |
| 6161 | CLONE_TO_MANAGED_PROFILE.add(ENABLED_INPUT_METHODS); |
| 6162 | CLONE_TO_MANAGED_PROFILE.add(LOCATION_MODE); |
Lifu Tang | d1fa1d6 | 2015-11-25 21:42:44 -0800 | [diff] [blame] | 6163 | CLONE_TO_MANAGED_PROFILE.add(LOCATION_PREVIOUS_MODE); |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 6164 | CLONE_TO_MANAGED_PROFILE.add(LOCATION_PROVIDERS_ALLOWED); |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 6165 | CLONE_TO_MANAGED_PROFILE.add(SELECTED_INPUT_METHOD_SUBTYPE); |
| 6166 | CLONE_TO_MANAGED_PROFILE.add(SELECTED_SPELL_CHECKER); |
| 6167 | CLONE_TO_MANAGED_PROFILE.add(SELECTED_SPELL_CHECKER_SUBTYPE); |
| 6168 | } |
| 6169 | |
| 6170 | /** @hide */ |
| 6171 | public static void getCloneToManagedProfileSettings(Set<String> outKeySet) { |
| 6172 | outKeySet.addAll(CLONE_TO_MANAGED_PROFILE); |
| 6173 | } |
Amith Yamasani | 4f7e2e3 | 2014-08-14 18:49:48 -0700 | [diff] [blame] | 6174 | |
| 6175 | /** |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 6176 | * Helper method for determining if a location provider is enabled. |
Tom O'Neill | d575943 | 2013-09-11 11:03:03 -0700 | [diff] [blame] | 6177 | * |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 6178 | * @param cr the content resolver to use |
| 6179 | * @param provider the location provider to query |
| 6180 | * @return true if the provider is enabled |
Tom O'Neill | d575943 | 2013-09-11 11:03:03 -0700 | [diff] [blame] | 6181 | * |
| 6182 | * @deprecated use {@link #LOCATION_MODE} or |
| 6183 | * {@link LocationManager#isProviderEnabled(String)} |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 6184 | */ |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6185 | @Deprecated |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 6186 | public static final boolean isLocationProviderEnabled(ContentResolver cr, String provider) { |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 6187 | return isLocationProviderEnabledForUser(cr, provider, UserHandle.myUserId()); |
| 6188 | } |
| 6189 | |
| 6190 | /** |
| 6191 | * Helper method for determining if a location provider is enabled. |
| 6192 | * @param cr the content resolver to use |
| 6193 | * @param provider the location provider to query |
| 6194 | * @param userId the userId to query |
| 6195 | * @return true if the provider is enabled |
Tom O'Neill | d575943 | 2013-09-11 11:03:03 -0700 | [diff] [blame] | 6196 | * @deprecated use {@link #LOCATION_MODE} or |
| 6197 | * {@link LocationManager#isProviderEnabled(String)} |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 6198 | * @hide |
| 6199 | */ |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6200 | @Deprecated |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 6201 | public static final boolean isLocationProviderEnabledForUser(ContentResolver cr, String provider, int userId) { |
| 6202 | String allowedProviders = Settings.Secure.getStringForUser(cr, |
| 6203 | LOCATION_PROVIDERS_ALLOWED, userId); |
Brad Fitzpatrick | 11fe181 | 2010-09-10 16:07:52 -0700 | [diff] [blame] | 6204 | return TextUtils.delimitedStringContains(allowedProviders, ',', provider); |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 6205 | } |
| 6206 | |
| 6207 | /** |
| 6208 | * Thread-safe method for enabling or disabling a single location provider. |
| 6209 | * @param cr the content resolver to use |
| 6210 | * @param provider the location provider to enable or disable |
| 6211 | * @param enabled true if the provider should be enabled |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 6212 | * @deprecated use {@link #putInt(ContentResolver, String, int)} and {@link #LOCATION_MODE} |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 6213 | */ |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6214 | @Deprecated |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 6215 | public static final void setLocationProviderEnabled(ContentResolver cr, |
| 6216 | String provider, boolean enabled) { |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 6217 | setLocationProviderEnabledForUser(cr, provider, enabled, UserHandle.myUserId()); |
| 6218 | } |
| 6219 | |
| 6220 | /** |
| 6221 | * Thread-safe method for enabling or disabling a single location provider. |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 6222 | * |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 6223 | * @param cr the content resolver to use |
| 6224 | * @param provider the location provider to enable or disable |
| 6225 | * @param enabled true if the provider should be enabled |
| 6226 | * @param userId the userId for which to enable/disable providers |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 6227 | * @return true if the value was set, false on database errors |
| 6228 | * @deprecated use {@link #putIntForUser(ContentResolver, String, int, int)} and |
| 6229 | * {@link #LOCATION_MODE} |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 6230 | * @hide |
| 6231 | */ |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6232 | @Deprecated |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 6233 | public static final boolean setLocationProviderEnabledForUser(ContentResolver cr, |
Victoria Lease | b711d57 | 2012-10-02 13:14:11 -0700 | [diff] [blame] | 6234 | String provider, boolean enabled, int userId) { |
David Christie | 3f7b652 | 2013-08-06 19:19:08 -0700 | [diff] [blame] | 6235 | synchronized (mLocationSettingsLock) { |
| 6236 | // to ensure thread safety, we write the provider name with a '+' or '-' |
| 6237 | // and let the SettingsProvider handle it rather than reading and modifying |
| 6238 | // the list of enabled providers. |
| 6239 | if (enabled) { |
| 6240 | provider = "+" + provider; |
| 6241 | } else { |
| 6242 | provider = "-" + provider; |
| 6243 | } |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 6244 | return putStringForUser(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider, |
David Christie | 3f7b652 | 2013-08-06 19:19:08 -0700 | [diff] [blame] | 6245 | userId); |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 6246 | } |
Mike Lockwood | bd2a712 | 2009-04-02 23:41:33 -0700 | [diff] [blame] | 6247 | } |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6248 | |
| 6249 | /** |
Lifu Tang | d1fa1d6 | 2015-11-25 21:42:44 -0800 | [diff] [blame] | 6250 | * Saves the current location mode into {@link #LOCATION_PREVIOUS_MODE}. |
| 6251 | */ |
| 6252 | private static final boolean saveLocationModeForUser(ContentResolver cr, int userId) { |
| 6253 | final int mode = getLocationModeForUser(cr, userId); |
| 6254 | return putIntForUser(cr, Settings.Secure.LOCATION_PREVIOUS_MODE, mode, userId); |
| 6255 | } |
| 6256 | |
| 6257 | /** |
| 6258 | * Restores the current location mode from {@link #LOCATION_PREVIOUS_MODE}. |
| 6259 | */ |
| 6260 | private static final boolean restoreLocationModeForUser(ContentResolver cr, int userId) { |
| 6261 | int mode = getIntForUser(cr, Settings.Secure.LOCATION_PREVIOUS_MODE, |
| 6262 | LOCATION_MODE_HIGH_ACCURACY, userId); |
| 6263 | // Make sure that the previous mode is never "off". Otherwise the user won't be able to |
| 6264 | // turn on location any longer. |
| 6265 | if (mode == LOCATION_MODE_OFF) { |
| 6266 | mode = LOCATION_MODE_HIGH_ACCURACY; |
| 6267 | } |
| 6268 | return setLocationModeForUser(cr, mode, userId); |
| 6269 | } |
| 6270 | |
| 6271 | /** |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6272 | * Thread-safe method for setting the location mode to one of |
| 6273 | * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, |
| 6274 | * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. |
| 6275 | * |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6276 | * @param cr the content resolver to use |
| 6277 | * @param mode such as {@link #LOCATION_MODE_HIGH_ACCURACY} |
| 6278 | * @param userId the userId for which to change mode |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 6279 | * @return true if the value was set, false on database errors |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6280 | * |
| 6281 | * @throws IllegalArgumentException if mode is not one of the supported values |
| 6282 | */ |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 6283 | private static final boolean setLocationModeForUser(ContentResolver cr, int mode, |
| 6284 | int userId) { |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6285 | synchronized (mLocationSettingsLock) { |
| 6286 | boolean gps = false; |
| 6287 | boolean network = false; |
| 6288 | switch (mode) { |
Lifu Tang | d1fa1d6 | 2015-11-25 21:42:44 -0800 | [diff] [blame] | 6289 | case LOCATION_MODE_PREVIOUS: |
| 6290 | // Retrieve the actual mode and set to that mode. |
| 6291 | return restoreLocationModeForUser(cr, userId); |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6292 | case LOCATION_MODE_OFF: |
Lifu Tang | d1fa1d6 | 2015-11-25 21:42:44 -0800 | [diff] [blame] | 6293 | saveLocationModeForUser(cr, userId); |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6294 | break; |
| 6295 | case LOCATION_MODE_SENSORS_ONLY: |
| 6296 | gps = true; |
| 6297 | break; |
| 6298 | case LOCATION_MODE_BATTERY_SAVING: |
| 6299 | network = true; |
| 6300 | break; |
| 6301 | case LOCATION_MODE_HIGH_ACCURACY: |
| 6302 | gps = true; |
| 6303 | network = true; |
| 6304 | break; |
| 6305 | default: |
| 6306 | throw new IllegalArgumentException("Invalid location mode: " + mode); |
| 6307 | } |
Tom O'Neill | 7731a99 | 2014-10-09 11:30:49 -0700 | [diff] [blame] | 6308 | // Note it's important that we set the NLP mode first. The Google implementation |
| 6309 | // of NLP clears its NLP consent setting any time it receives a |
| 6310 | // LocationManager.PROVIDERS_CHANGED_ACTION broadcast and NLP is disabled. Also, |
| 6311 | // it shows an NLP consent dialog any time it receives the broadcast, NLP is |
| 6312 | // enabled, and the NLP consent is not set. If 1) we were to enable GPS first, |
| 6313 | // 2) a setup wizard has its own NLP consent UI that sets the NLP consent setting, |
| 6314 | // and 3) the receiver happened to complete before we enabled NLP, then the Google |
| 6315 | // NLP would detect the attempt to enable NLP and show a redundant NLP consent |
| 6316 | // dialog. Then the people who wrote the setup wizard would be sad. |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 6317 | boolean nlpSuccess = Settings.Secure.setLocationProviderEnabledForUser( |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6318 | cr, LocationManager.NETWORK_PROVIDER, network, userId); |
Tom O'Neill | 7731a99 | 2014-10-09 11:30:49 -0700 | [diff] [blame] | 6319 | boolean gpsSuccess = Settings.Secure.setLocationProviderEnabledForUser( |
| 6320 | cr, LocationManager.GPS_PROVIDER, gps, userId); |
Tom O'Neill | a324ac7 | 2013-08-26 14:40:23 -0700 | [diff] [blame] | 6321 | return gpsSuccess && nlpSuccess; |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6322 | } |
| 6323 | } |
| 6324 | |
| 6325 | /** |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6326 | * Thread-safe method for reading the location mode, returns one of |
| 6327 | * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, |
| 6328 | * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. |
| 6329 | * |
| 6330 | * @param cr the content resolver to use |
| 6331 | * @param userId the userId for which to read the mode |
| 6332 | * @return the location mode |
| 6333 | */ |
Tom O'Neill | 7f6f457 | 2013-08-27 10:53:15 -0700 | [diff] [blame] | 6334 | private static final int getLocationModeForUser(ContentResolver cr, int userId) { |
Tom O'Neill | 1f48b78 | 2013-08-19 18:14:56 -0700 | [diff] [blame] | 6335 | synchronized (mLocationSettingsLock) { |
| 6336 | boolean gpsEnabled = Settings.Secure.isLocationProviderEnabledForUser( |
| 6337 | cr, LocationManager.GPS_PROVIDER, userId); |
| 6338 | boolean networkEnabled = Settings.Secure.isLocationProviderEnabledForUser( |
| 6339 | cr, LocationManager.NETWORK_PROVIDER, userId); |
| 6340 | if (gpsEnabled && networkEnabled) { |
| 6341 | return LOCATION_MODE_HIGH_ACCURACY; |
| 6342 | } else if (gpsEnabled) { |
| 6343 | return LOCATION_MODE_SENSORS_ONLY; |
| 6344 | } else if (networkEnabled) { |
| 6345 | return LOCATION_MODE_BATTERY_SAVING; |
| 6346 | } else { |
| 6347 | return LOCATION_MODE_OFF; |
| 6348 | } |
| 6349 | } |
| 6350 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6351 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 6352 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 6353 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6354 | * Global system settings, containing preferences that always apply identically |
| 6355 | * to all defined users. Applications can read these but are not allowed to write; |
| 6356 | * like the "Secure" settings, these are for preferences that the user must |
| 6357 | * explicitly modify through the system UI or specialized APIs for those values. |
| 6358 | */ |
| 6359 | public static final class Global extends NameValueTable { |
| 6360 | public static final String SYS_PROP_SETTING_VERSION = "sys.settings_global_version"; |
| 6361 | |
| 6362 | /** |
| 6363 | * The content:// style URL for global secure settings items. Not public. |
| 6364 | */ |
| 6365 | public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global"); |
| 6366 | |
| 6367 | /** |
Amith Yamasani | 23a0f05 | 2014-07-25 12:26:53 -0700 | [diff] [blame] | 6368 | * Whether users are allowed to add more users or guest from lockscreen. |
| 6369 | * <p> |
| 6370 | * Type: int |
| 6371 | * @hide |
| 6372 | */ |
| 6373 | public static final String ADD_USERS_WHEN_LOCKED = "add_users_when_locked"; |
| 6374 | |
| 6375 | /** |
Svetoslav Ganov | 7befb7d | 2012-09-27 16:49:23 -0700 | [diff] [blame] | 6376 | * Setting whether the global gesture for enabling accessibility is enabled. |
| 6377 | * If this gesture is enabled the user will be able to perfrom it to enable |
| 6378 | * the accessibility state without visiting the settings app. |
| 6379 | * @hide |
| 6380 | */ |
| 6381 | public static final String ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED = |
| 6382 | "enable_accessibility_global_gesture_enabled"; |
| 6383 | |
| 6384 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6385 | * Whether Airplane Mode is on. |
| 6386 | */ |
| 6387 | public static final String AIRPLANE_MODE_ON = "airplane_mode_on"; |
| 6388 | |
| 6389 | /** |
Bryce Lee | 584a445 | 2014-10-21 15:55:55 -0700 | [diff] [blame] | 6390 | * Whether Theater Mode is on. |
| 6391 | * {@hide} |
| 6392 | */ |
Bryce Lee | cdfebd6 | 2015-02-02 08:19:11 -0800 | [diff] [blame] | 6393 | @SystemApi |
Bryce Lee | 584a445 | 2014-10-21 15:55:55 -0700 | [diff] [blame] | 6394 | public static final String THEATER_MODE_ON = "theater_mode_on"; |
| 6395 | |
| 6396 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6397 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio. |
| 6398 | */ |
| 6399 | public static final String RADIO_BLUETOOTH = "bluetooth"; |
| 6400 | |
| 6401 | /** |
| 6402 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio. |
| 6403 | */ |
| 6404 | public static final String RADIO_WIFI = "wifi"; |
| 6405 | |
| 6406 | /** |
| 6407 | * {@hide} |
| 6408 | */ |
| 6409 | public static final String RADIO_WIMAX = "wimax"; |
| 6410 | /** |
| 6411 | * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio. |
| 6412 | */ |
| 6413 | public static final String RADIO_CELL = "cell"; |
| 6414 | |
| 6415 | /** |
| 6416 | * Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio. |
| 6417 | */ |
| 6418 | public static final String RADIO_NFC = "nfc"; |
| 6419 | |
| 6420 | /** |
| 6421 | * A comma separated list of radios that need to be disabled when airplane mode |
| 6422 | * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are |
| 6423 | * included in the comma separated list. |
| 6424 | */ |
| 6425 | public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; |
| 6426 | |
| 6427 | /** |
| 6428 | * A comma separated list of radios that should to be disabled when airplane mode |
| 6429 | * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is |
| 6430 | * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi |
| 6431 | * will be turned off when entering airplane mode, but the user will be able to reenable |
| 6432 | * Wifi in the Settings app. |
| 6433 | * |
| 6434 | * {@hide} |
| 6435 | */ |
| 6436 | public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios"; |
| 6437 | |
| 6438 | /** |
Bryce Lee | ec85f34 | 2015-12-16 13:32:28 -0800 | [diff] [blame] | 6439 | * A Long representing a bitmap of profiles that should be disabled when bluetooth starts. |
| 6440 | * See {@link android.bluetooth.BluetoothProfile}. |
| 6441 | * {@hide} |
| 6442 | */ |
| 6443 | public static final String BLUETOOTH_DISABLED_PROFILES = "bluetooth_disabled_profiles"; |
| 6444 | |
| 6445 | /** |
Andre Eisenbach | 82a94d9 | 2016-01-14 14:20:34 -0800 | [diff] [blame] | 6446 | * A semi-colon separated list of Bluetooth interoperability workarounds. |
| 6447 | * Each entry is a partial Bluetooth device address string and an integer representing |
| 6448 | * the feature to be disabled, separated by a comma. The integer must correspond |
| 6449 | * to a interoperability feature as defined in "interop.h" in /system/bt. |
| 6450 | * <p> |
| 6451 | * Example: <br/> |
| 6452 | * "00:11:22,0;01:02:03:04,2" |
| 6453 | * @hide |
| 6454 | */ |
| 6455 | public static final String BLUETOOTH_INTEROPERABILITY_LIST = "bluetooth_interoperability_list"; |
| 6456 | |
| 6457 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6458 | * The policy for deciding when Wi-Fi should go to sleep (which will in |
| 6459 | * turn switch to using the mobile data as an Internet connection). |
| 6460 | * <p> |
| 6461 | * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT}, |
| 6462 | * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or |
| 6463 | * {@link #WIFI_SLEEP_POLICY_NEVER}. |
| 6464 | */ |
| 6465 | public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy"; |
| 6466 | |
| 6467 | /** |
| 6468 | * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep |
| 6469 | * policy, which is to sleep shortly after the turning off |
| 6470 | * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting. |
| 6471 | */ |
| 6472 | public static final int WIFI_SLEEP_POLICY_DEFAULT = 0; |
| 6473 | |
| 6474 | /** |
| 6475 | * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when |
| 6476 | * the device is on battery, and never go to sleep when the device is |
| 6477 | * plugged in. |
| 6478 | */ |
| 6479 | public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; |
| 6480 | |
| 6481 | /** |
| 6482 | * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep. |
| 6483 | */ |
| 6484 | public static final int WIFI_SLEEP_POLICY_NEVER = 2; |
| 6485 | |
| 6486 | /** |
| 6487 | * Value to specify if the user prefers the date, time and time zone |
| 6488 | * to be automatically fetched from the network (NITZ). 1=yes, 0=no |
| 6489 | */ |
| 6490 | public static final String AUTO_TIME = "auto_time"; |
| 6491 | |
| 6492 | /** |
| 6493 | * Value to specify if the user prefers the time zone |
| 6494 | * to be automatically fetched from the network (NITZ). 1=yes, 0=no |
| 6495 | */ |
| 6496 | public static final String AUTO_TIME_ZONE = "auto_time_zone"; |
| 6497 | |
| 6498 | /** |
| 6499 | * URI for the car dock "in" event sound. |
| 6500 | * @hide |
| 6501 | */ |
| 6502 | public static final String CAR_DOCK_SOUND = "car_dock_sound"; |
| 6503 | |
| 6504 | /** |
| 6505 | * URI for the car dock "out" event sound. |
| 6506 | * @hide |
| 6507 | */ |
| 6508 | public static final String CAR_UNDOCK_SOUND = "car_undock_sound"; |
| 6509 | |
| 6510 | /** |
| 6511 | * URI for the desk dock "in" event sound. |
| 6512 | * @hide |
| 6513 | */ |
| 6514 | public static final String DESK_DOCK_SOUND = "desk_dock_sound"; |
| 6515 | |
| 6516 | /** |
| 6517 | * URI for the desk dock "out" event sound. |
| 6518 | * @hide |
| 6519 | */ |
| 6520 | public static final String DESK_UNDOCK_SOUND = "desk_undock_sound"; |
| 6521 | |
| 6522 | /** |
| 6523 | * Whether to play a sound for dock events. |
| 6524 | * @hide |
| 6525 | */ |
| 6526 | public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled"; |
| 6527 | |
| 6528 | /** |
| 6529 | * URI for the "device locked" (keyguard shown) sound. |
| 6530 | * @hide |
| 6531 | */ |
| 6532 | public static final String LOCK_SOUND = "lock_sound"; |
| 6533 | |
| 6534 | /** |
| 6535 | * URI for the "device unlocked" sound. |
| 6536 | * @hide |
| 6537 | */ |
| 6538 | public static final String UNLOCK_SOUND = "unlock_sound"; |
| 6539 | |
| 6540 | /** |
Adrian Roos | 49e057d | 2014-08-13 17:14:51 +0200 | [diff] [blame] | 6541 | * URI for the "device is trusted" sound, which is played when the device enters the trusted |
| 6542 | * state without unlocking. |
| 6543 | * @hide |
| 6544 | */ |
| 6545 | public static final String TRUSTED_SOUND = "trusted_sound"; |
| 6546 | |
| 6547 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6548 | * URI for the low battery sound file. |
| 6549 | * @hide |
| 6550 | */ |
| 6551 | public static final String LOW_BATTERY_SOUND = "low_battery_sound"; |
| 6552 | |
| 6553 | /** |
| 6554 | * Whether to play a sound for low-battery alerts. |
| 6555 | * @hide |
| 6556 | */ |
| 6557 | public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled"; |
| 6558 | |
| 6559 | /** |
Jeff Brown | 84e2756 | 2012-12-07 13:56:34 -0800 | [diff] [blame] | 6560 | * URI for the "wireless charging started" sound. |
| 6561 | * @hide |
| 6562 | */ |
| 6563 | public static final String WIRELESS_CHARGING_STARTED_SOUND = |
| 6564 | "wireless_charging_started_sound"; |
| 6565 | |
| 6566 | /** |
John Spurlock | 51a871d | 2015-05-06 17:41:30 -0400 | [diff] [blame] | 6567 | * Whether to play a sound for charging events. |
| 6568 | * @hide |
| 6569 | */ |
| 6570 | public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled"; |
| 6571 | |
| 6572 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6573 | * Whether we keep the device on while the device is plugged in. |
| 6574 | * Supported values are: |
| 6575 | * <ul> |
| 6576 | * <li>{@code 0} to never stay on while plugged in</li> |
| 6577 | * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li> |
| 6578 | * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li> |
| 6579 | * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li> |
| 6580 | * </ul> |
| 6581 | * These values can be OR-ed together. |
| 6582 | */ |
| 6583 | public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; |
| 6584 | |
| 6585 | /** |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 6586 | * When the user has enable the option to have a "bug report" command |
| 6587 | * in the power menu. |
| 6588 | * @hide |
| 6589 | */ |
| 6590 | public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu"; |
| 6591 | |
| 6592 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6593 | * Whether ADB is enabled. |
| 6594 | */ |
| 6595 | public static final String ADB_ENABLED = "adb_enabled"; |
| 6596 | |
| 6597 | /** |
Jon Miranda | 836c0a8 | 2014-08-11 12:32:26 -0700 | [diff] [blame] | 6598 | * Whether Views are allowed to save their attribute data. |
| 6599 | * @hide |
| 6600 | */ |
| 6601 | public static final String DEBUG_VIEW_ATTRIBUTES = "debug_view_attributes"; |
| 6602 | |
| 6603 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6604 | * Whether assisted GPS should be enabled or not. |
| 6605 | * @hide |
| 6606 | */ |
| 6607 | public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled"; |
| 6608 | |
| 6609 | /** |
| 6610 | * Whether bluetooth is enabled/disabled |
| 6611 | * 0=disabled. 1=enabled. |
| 6612 | */ |
| 6613 | public static final String BLUETOOTH_ON = "bluetooth_on"; |
| 6614 | |
| 6615 | /** |
| 6616 | * CDMA Cell Broadcast SMS |
| 6617 | * 0 = CDMA Cell Broadcast SMS disabled |
| 6618 | * 1 = CDMA Cell Broadcast SMS enabled |
| 6619 | * @hide |
| 6620 | */ |
| 6621 | public static final String CDMA_CELL_BROADCAST_SMS = |
| 6622 | "cdma_cell_broadcast_sms"; |
| 6623 | |
| 6624 | /** |
| 6625 | * The CDMA roaming mode 0 = Home Networks, CDMA default |
| 6626 | * 1 = Roaming on Affiliated networks |
| 6627 | * 2 = Roaming on any networks |
| 6628 | * @hide |
| 6629 | */ |
| 6630 | public static final String CDMA_ROAMING_MODE = "roaming_settings"; |
| 6631 | |
| 6632 | /** |
| 6633 | * The CDMA subscription mode 0 = RUIM/SIM (default) |
| 6634 | * 1 = NV |
| 6635 | * @hide |
| 6636 | */ |
| 6637 | public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode"; |
| 6638 | |
| 6639 | /** Inactivity timeout to track mobile data activity. |
| 6640 | * |
| 6641 | * If set to a positive integer, it indicates the inactivity timeout value in seconds to |
| 6642 | * infer the data activity of mobile network. After a period of no activity on mobile |
| 6643 | * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE} |
| 6644 | * intent is fired to indicate a transition of network status from "active" to "idle". Any |
| 6645 | * subsequent activity on mobile networks triggers the firing of {@code |
| 6646 | * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active". |
| 6647 | * |
| 6648 | * Network activity refers to transmitting or receiving data on the network interfaces. |
| 6649 | * |
| 6650 | * Tracking is disabled if set to zero or negative value. |
| 6651 | * |
| 6652 | * @hide |
| 6653 | */ |
| 6654 | public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile"; |
| 6655 | |
| 6656 | /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE} |
| 6657 | * but for Wifi network. |
| 6658 | * @hide |
| 6659 | */ |
| 6660 | public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi"; |
| 6661 | |
| 6662 | /** |
| 6663 | * Whether or not data roaming is enabled. (0 = false, 1 = true) |
| 6664 | */ |
| 6665 | public static final String DATA_ROAMING = "data_roaming"; |
| 6666 | |
| 6667 | /** |
Wink Saville | 75c1e69 | 2013-03-20 17:06:50 -0700 | [diff] [blame] | 6668 | * The value passed to a Mobile DataConnection via bringUp which defines the |
| 6669 | * number of retries to preform when setting up the initial connection. The default |
| 6670 | * value defined in DataConnectionTrackerBase#DEFAULT_MDC_INITIAL_RETRY is currently 1. |
| 6671 | * @hide |
| 6672 | */ |
| 6673 | public static final String MDC_INITIAL_MAX_RETRY = "mdc_initial_max_retry"; |
| 6674 | |
| 6675 | /** |
Todd Kennedy | f39ca8f | 2015-08-07 14:15:07 -0700 | [diff] [blame] | 6676 | * Whether any package can be on external storage. When this is true, any |
| 6677 | * package, regardless of manifest values, is a candidate for installing |
| 6678 | * or moving onto external storage. (0 = false, 1 = true) |
| 6679 | * @hide |
| 6680 | */ |
| 6681 | public static final String FORCE_ALLOW_ON_EXTERNAL = "force_allow_on_external"; |
| 6682 | |
Jorim Jaggi | 8ccdf3a | 2015-10-22 12:50:31 +0200 | [diff] [blame] | 6683 | /** |
| 6684 | * Whether any activity can be resized. When this is true, any |
| 6685 | * activity, regardless of manifest values, can be resized for multi-window. |
| 6686 | * (0 = false, 1 = true) |
| 6687 | * @hide |
| 6688 | */ |
| 6689 | public static final String DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES |
| 6690 | = "force_resizable_activities"; |
| 6691 | |
Jorim Jaggi | 6f2efd3 | 2015-12-23 12:04:39 +0100 | [diff] [blame] | 6692 | /** |
| 6693 | * Whether to enable experimental freeform support for windows. |
| 6694 | * @hide |
| 6695 | */ |
| 6696 | public static final String DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT |
| 6697 | = "enable_freeform_support"; |
| 6698 | |
Todd Kennedy | f39ca8f | 2015-08-07 14:15:07 -0700 | [diff] [blame] | 6699 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6700 | * Whether user has enabled development settings. |
| 6701 | */ |
| 6702 | public static final String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled"; |
| 6703 | |
| 6704 | /** |
Amith Yamasani | cb15d66 | 2015-11-10 11:11:15 -0800 | [diff] [blame] | 6705 | * Whether the device has been provisioned (0 = false, 1 = true). |
| 6706 | * <p>On a multiuser device with a separate system user, the screen may be locked |
| 6707 | * as soon as this is set to true and further activities cannot be launched on the |
| 6708 | * system user unless they are marked to show over keyguard. |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6709 | */ |
| 6710 | public static final String DEVICE_PROVISIONED = "device_provisioned"; |
| 6711 | |
| 6712 | /** |
Robert Greenwalt | beb482c | 2016-03-28 15:40:56 -0700 | [diff] [blame] | 6713 | * Whether mobile data should be allowed while the device is being provisioned. |
| 6714 | * This allows the provisioning process to turn off mobile data before the user |
| 6715 | * has an opportunity to set things up, preventing other processes from burning |
| 6716 | * precious bytes before wifi is setup. |
| 6717 | * (0 = false, 1 = true) |
| 6718 | * @hide |
| 6719 | */ |
| 6720 | public static final String DEVICE_PROVISIONING_MOBILE_DATA_ENABLED = |
| 6721 | "device_provisioning_mobile_data"; |
| 6722 | |
| 6723 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6724 | * The saved value for WindowManagerService.setForcedDisplaySize(). |
| 6725 | * Two integers separated by a comma. If unset, then use the real display size. |
| 6726 | * @hide |
| 6727 | */ |
| 6728 | public static final String DISPLAY_SIZE_FORCED = "display_size_forced"; |
| 6729 | |
| 6730 | /** |
Jeff Brown | d46747a | 2015-04-15 19:02:36 -0700 | [diff] [blame] | 6731 | * The saved value for WindowManagerService.setForcedDisplayScalingMode(). |
| 6732 | * 0 or unset if scaling is automatic, 1 if scaling is disabled. |
| 6733 | * @hide |
| 6734 | */ |
| 6735 | public static final String DISPLAY_SCALING_FORCE = "display_scaling_force"; |
| 6736 | |
| 6737 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6738 | * The maximum size, in bytes, of a download that the download manager will transfer over |
| 6739 | * a non-wifi connection. |
| 6740 | * @hide |
| 6741 | */ |
| 6742 | public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE = |
| 6743 | "download_manager_max_bytes_over_mobile"; |
| 6744 | |
| 6745 | /** |
| 6746 | * The recommended maximum size, in bytes, of a download that the download manager should |
| 6747 | * transfer over a non-wifi connection. Over this size, the use will be warned, but will |
| 6748 | * have the option to start the download over the mobile connection anyway. |
| 6749 | * @hide |
| 6750 | */ |
| 6751 | public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE = |
| 6752 | "download_manager_recommended_max_bytes_over_mobile"; |
| 6753 | |
| 6754 | /** |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 6755 | * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6756 | */ |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 6757 | @Deprecated |
| 6758 | public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6759 | |
| 6760 | /** |
Jinsuk Kim | b3d9177 | 2014-07-10 12:48:54 +0900 | [diff] [blame] | 6761 | * Whether HDMI control shall be enabled. If disabled, no CEC/MHL command will be |
| 6762 | * sent or processed. (0 = false, 1 = true) |
| 6763 | * @hide |
| 6764 | */ |
| 6765 | public static final String HDMI_CONTROL_ENABLED = "hdmi_control_enabled"; |
| 6766 | |
| 6767 | /** |
| 6768 | * Whether HDMI system audio is enabled. If enabled, TV internal speaker is muted, |
| 6769 | * and the output is redirected to AV Receiver connected via |
| 6770 | * {@Global#HDMI_SYSTEM_AUDIO_OUTPUT}. |
| 6771 | * @hide |
| 6772 | */ |
| 6773 | public static final String HDMI_SYSTEM_AUDIO_ENABLED = "hdmi_system_audio_enabled"; |
| 6774 | |
| 6775 | /** |
Jinsuk Kim | b3d9177 | 2014-07-10 12:48:54 +0900 | [diff] [blame] | 6776 | * Whether TV will automatically turn on upon reception of the CEC command |
| 6777 | * <Text View On> or <Image View On>. (0 = false, 1 = true) |
| 6778 | * @hide |
| 6779 | */ |
| 6780 | public static final String HDMI_CONTROL_AUTO_WAKEUP_ENABLED = |
| 6781 | "hdmi_control_auto_wakeup_enabled"; |
| 6782 | |
| 6783 | /** |
| 6784 | * Whether TV will also turn off other CEC devices when it goes to standby mode. |
| 6785 | * (0 = false, 1 = true) |
| 6786 | * @hide |
| 6787 | */ |
| 6788 | public static final String HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED = |
| 6789 | "hdmi_control_auto_device_off_enabled"; |
| 6790 | |
| 6791 | /** |
Lorenzo Colitti | 06d7e53 | 2015-03-16 23:46:24 +0900 | [diff] [blame] | 6792 | * Whether to use the DHCP client from Lollipop and earlier instead of the newer Android DHCP |
| 6793 | * client. |
| 6794 | * (0 = false, 1 = true) |
| 6795 | * @hide |
| 6796 | */ |
| 6797 | public static final String LEGACY_DHCP_CLIENT = "legacy_dhcp_client"; |
| 6798 | |
| 6799 | /** |
Jinsuk Kim | b3d9177 | 2014-07-10 12:48:54 +0900 | [diff] [blame] | 6800 | * Whether TV will switch to MHL port when a mobile device is plugged in. |
| 6801 | * (0 = false, 1 = true) |
| 6802 | * @hide |
| 6803 | */ |
| 6804 | public static final String MHL_INPUT_SWITCHING_ENABLED = "mhl_input_switching_enabled"; |
| 6805 | |
| 6806 | /** |
| 6807 | * Whether TV will charge the mobile device connected at MHL port. (0 = false, 1 = true) |
| 6808 | * @hide |
| 6809 | */ |
| 6810 | public static final String MHL_POWER_CHARGE_ENABLED = "mhl_power_charge_enabled"; |
| 6811 | |
| 6812 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6813 | * Whether mobile data connections are allowed by the user. See |
| 6814 | * ConnectivityManager for more info. |
| 6815 | * @hide |
| 6816 | */ |
| 6817 | public static final String MOBILE_DATA = "mobile_data"; |
| 6818 | |
Erik Kline | da4bfa8 | 2015-04-30 12:58:40 +0900 | [diff] [blame] | 6819 | /** |
| 6820 | * Whether the mobile data connection should remain active even when higher |
| 6821 | * priority networks like WiFi are active, to help make network switching faster. |
| 6822 | * |
| 6823 | * See ConnectivityService for more info. |
| 6824 | * |
| 6825 | * (0 = disabled, 1 = enabled) |
| 6826 | * @hide |
| 6827 | */ |
| 6828 | public static final String MOBILE_DATA_ALWAYS_ON = "mobile_data_always_on"; |
| 6829 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6830 | /** {@hide} */ |
| 6831 | public static final String NETSTATS_ENABLED = "netstats_enabled"; |
| 6832 | /** {@hide} */ |
| 6833 | public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval"; |
| 6834 | /** {@hide} */ |
| 6835 | public static final String NETSTATS_TIME_CACHE_MAX_AGE = "netstats_time_cache_max_age"; |
| 6836 | /** {@hide} */ |
| 6837 | public static final String NETSTATS_GLOBAL_ALERT_BYTES = "netstats_global_alert_bytes"; |
| 6838 | /** {@hide} */ |
| 6839 | public static final String NETSTATS_SAMPLE_ENABLED = "netstats_sample_enabled"; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6840 | |
| 6841 | /** {@hide} */ |
| 6842 | public static final String NETSTATS_DEV_BUCKET_DURATION = "netstats_dev_bucket_duration"; |
| 6843 | /** {@hide} */ |
| 6844 | public static final String NETSTATS_DEV_PERSIST_BYTES = "netstats_dev_persist_bytes"; |
| 6845 | /** {@hide} */ |
| 6846 | public static final String NETSTATS_DEV_ROTATE_AGE = "netstats_dev_rotate_age"; |
| 6847 | /** {@hide} */ |
| 6848 | public static final String NETSTATS_DEV_DELETE_AGE = "netstats_dev_delete_age"; |
| 6849 | |
| 6850 | /** {@hide} */ |
| 6851 | public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration"; |
| 6852 | /** {@hide} */ |
| 6853 | public static final String NETSTATS_UID_PERSIST_BYTES = "netstats_uid_persist_bytes"; |
| 6854 | /** {@hide} */ |
| 6855 | public static final String NETSTATS_UID_ROTATE_AGE = "netstats_uid_rotate_age"; |
| 6856 | /** {@hide} */ |
| 6857 | public static final String NETSTATS_UID_DELETE_AGE = "netstats_uid_delete_age"; |
| 6858 | |
| 6859 | /** {@hide} */ |
| 6860 | public static final String NETSTATS_UID_TAG_BUCKET_DURATION = "netstats_uid_tag_bucket_duration"; |
| 6861 | /** {@hide} */ |
| 6862 | public static final String NETSTATS_UID_TAG_PERSIST_BYTES = "netstats_uid_tag_persist_bytes"; |
| 6863 | /** {@hide} */ |
| 6864 | public static final String NETSTATS_UID_TAG_ROTATE_AGE = "netstats_uid_tag_rotate_age"; |
| 6865 | /** {@hide} */ |
| 6866 | public static final String NETSTATS_UID_TAG_DELETE_AGE = "netstats_uid_tag_delete_age"; |
| 6867 | |
| 6868 | /** |
| 6869 | * User preference for which network(s) should be used. Only the |
| 6870 | * connectivity service should touch this. |
| 6871 | */ |
| 6872 | public static final String NETWORK_PREFERENCE = "network_preference"; |
| 6873 | |
| 6874 | /** |
Jeff Davidson | dd6fd1e | 2014-04-14 15:14:30 -0700 | [diff] [blame] | 6875 | * Which package name to use for network scoring. If null, or if the package is not a valid |
| 6876 | * scorer app, external network scores will neither be requested nor accepted. |
| 6877 | * @hide |
| 6878 | */ |
| 6879 | public static final String NETWORK_SCORER_APP = "network_scorer_app"; |
| 6880 | |
| 6881 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6882 | * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment |
| 6883 | * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been |
| 6884 | * exceeded. |
| 6885 | * @hide |
| 6886 | */ |
| 6887 | public static final String NITZ_UPDATE_DIFF = "nitz_update_diff"; |
| 6888 | |
| 6889 | /** |
| 6890 | * The length of time in milli-seconds that automatic small adjustments to |
| 6891 | * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded. |
| 6892 | * @hide |
| 6893 | */ |
| 6894 | public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing"; |
| 6895 | |
| 6896 | /** Preferred NTP server. {@hide} */ |
| 6897 | public static final String NTP_SERVER = "ntp_server"; |
| 6898 | /** Timeout in milliseconds to wait for NTP server. {@hide} */ |
| 6899 | public static final String NTP_TIMEOUT = "ntp_timeout"; |
| 6900 | |
Jeff Sharkey | e8a4b66 | 2015-06-27 15:43:45 -0700 | [diff] [blame] | 6901 | /** {@hide} */ |
| 6902 | public static final String STORAGE_BENCHMARK_INTERVAL = "storage_benchmark_interval"; |
| 6903 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6904 | /** |
Pierre Imai | 8e48e67 | 2016-04-21 13:30:43 +0900 | [diff] [blame^] | 6905 | * Sample validity in seconds to configure for the system DNS resolver. |
| 6906 | * {@hide} |
| 6907 | */ |
| 6908 | public static final String DNS_RESOLVER_SAMPLE_VALIDITY_SECONDS = |
| 6909 | "dns_resolver_sample_validity_seconds"; |
| 6910 | |
| 6911 | /** |
| 6912 | * Success threshold in percent for use with the system DNS resolver. |
| 6913 | * {@hide} |
| 6914 | */ |
| 6915 | public static final String DNS_RESOLVER_SUCCESS_THRESHOLD_PERCENT = |
| 6916 | "dns_resolver_success_threshold_percent"; |
| 6917 | |
| 6918 | /** |
| 6919 | * Minimum number of samples needed for statistics to be considered meaningful in the |
| 6920 | * system DNS resolver. |
| 6921 | * {@hide} |
| 6922 | */ |
| 6923 | public static final String DNS_RESOLVER_MIN_SAMPLES = "dns_resolver_min_samples"; |
| 6924 | |
| 6925 | /** |
| 6926 | * Maximum number taken into account for statistics purposes in the system DNS resolver. |
| 6927 | * {@hide} |
| 6928 | */ |
| 6929 | public static final String DNS_RESOLVER_MAX_SAMPLES = "dns_resolver_max_samples"; |
| 6930 | |
| 6931 | /** |
Tao Bao | fdf7c5d | 2016-02-15 20:59:15 -0800 | [diff] [blame] | 6932 | * Whether to disable the automatic scheduling of system updates. |
| 6933 | * 1 = system updates won't be automatically scheduled (will always |
| 6934 | * present notification instead). |
| 6935 | * 0 = system updates will be automatically scheduled. (default) |
| 6936 | * @hide |
| 6937 | */ |
| 6938 | @SystemApi |
| 6939 | public static final String OTA_DISABLE_AUTOMATIC_UPDATE = "ota_disable_automatic_update"; |
| 6940 | |
| 6941 | /** |
rich cannings | 4d8fc79 | 2012-09-07 14:43:43 -0700 | [diff] [blame] | 6942 | * Whether the package manager should send package verification broadcasts for verifiers to |
| 6943 | * review apps prior to installation. |
| 6944 | * 1 = request apps to be verified prior to installation, if a verifier exists. |
| 6945 | * 0 = do not verify apps before installation |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 6946 | * @hide |
rich cannings | 4d8fc79 | 2012-09-07 14:43:43 -0700 | [diff] [blame] | 6947 | */ |
| 6948 | public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable"; |
| 6949 | |
| 6950 | /** Timeout for package verification. |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 6951 | * @hide */ |
rich cannings | 4d8fc79 | 2012-09-07 14:43:43 -0700 | [diff] [blame] | 6952 | public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout"; |
| 6953 | |
| 6954 | /** Default response code for package verification. |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 6955 | * @hide */ |
rich cannings | 4d8fc79 | 2012-09-07 14:43:43 -0700 | [diff] [blame] | 6956 | public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response"; |
| 6957 | |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 6958 | /** |
| 6959 | * Show package verification setting in the Settings app. |
rich cannings | e6686b3 | 2012-09-16 14:02:20 -0700 | [diff] [blame] | 6960 | * 1 = show (default) |
| 6961 | * 0 = hide |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 6962 | * @hide |
rich cannings | e6686b3 | 2012-09-16 14:02:20 -0700 | [diff] [blame] | 6963 | */ |
| 6964 | public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible"; |
| 6965 | |
rich cannings | 4d8fc79 | 2012-09-07 14:43:43 -0700 | [diff] [blame] | 6966 | /** |
Fabrice Di Meglio | 1c1b471 | 2014-11-19 17:12:32 -0800 | [diff] [blame] | 6967 | * Run package verification on apps installed through ADB/ADT/USB |
rich cannings | 4e5753f | 2012-09-19 16:03:56 -0700 | [diff] [blame] | 6968 | * 1 = perform package verification on ADB installs (default) |
| 6969 | * 0 = bypass package verification on ADB installs |
| 6970 | * @hide |
| 6971 | */ |
| 6972 | public static final String PACKAGE_VERIFIER_INCLUDE_ADB = "verifier_verify_adb_installs"; |
| 6973 | |
| 6974 | /** |
Christopher Tate | 7265abe | 2014-11-21 13:54:45 -0800 | [diff] [blame] | 6975 | * Time since last fstrim (milliseconds) after which we force one to happen |
| 6976 | * during device startup. If unset, the default is 3 days. |
| 6977 | * @hide |
| 6978 | */ |
| 6979 | public static final String FSTRIM_MANDATORY_INTERVAL = "fstrim_mandatory_interval"; |
| 6980 | |
| 6981 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 6982 | * The interval in milliseconds at which to check packet counts on the |
| 6983 | * mobile data interface when screen is on, to detect possible data |
| 6984 | * connection problems. |
| 6985 | * @hide |
| 6986 | */ |
| 6987 | public static final String PDP_WATCHDOG_POLL_INTERVAL_MS = |
| 6988 | "pdp_watchdog_poll_interval_ms"; |
| 6989 | |
| 6990 | /** |
| 6991 | * The interval in milliseconds at which to check packet counts on the |
| 6992 | * mobile data interface when screen is off, to detect possible data |
| 6993 | * connection problems. |
| 6994 | * @hide |
| 6995 | */ |
| 6996 | public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS = |
| 6997 | "pdp_watchdog_long_poll_interval_ms"; |
| 6998 | |
| 6999 | /** |
| 7000 | * The interval in milliseconds at which to check packet counts on the |
| 7001 | * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} |
| 7002 | * outgoing packets has been reached without incoming packets. |
| 7003 | * @hide |
| 7004 | */ |
| 7005 | public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS = |
| 7006 | "pdp_watchdog_error_poll_interval_ms"; |
| 7007 | |
| 7008 | /** |
| 7009 | * The number of outgoing packets sent without seeing an incoming packet |
| 7010 | * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT} |
| 7011 | * device is logged to the event log |
| 7012 | * @hide |
| 7013 | */ |
| 7014 | public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT = |
| 7015 | "pdp_watchdog_trigger_packet_count"; |
| 7016 | |
| 7017 | /** |
| 7018 | * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS}) |
| 7019 | * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before |
| 7020 | * attempting data connection recovery. |
| 7021 | * @hide |
| 7022 | */ |
| 7023 | public static final String PDP_WATCHDOG_ERROR_POLL_COUNT = |
| 7024 | "pdp_watchdog_error_poll_count"; |
| 7025 | |
| 7026 | /** |
| 7027 | * The number of failed PDP reset attempts before moving to something more |
| 7028 | * drastic: re-registering to the network. |
| 7029 | * @hide |
| 7030 | */ |
| 7031 | public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT = |
| 7032 | "pdp_watchdog_max_pdp_reset_fail_count"; |
| 7033 | |
| 7034 | /** |
| 7035 | * A positive value indicates how often the SamplingProfiler |
| 7036 | * should take snapshots. Zero value means SamplingProfiler |
| 7037 | * is disabled. |
| 7038 | * |
| 7039 | * @hide |
| 7040 | */ |
| 7041 | public static final String SAMPLING_PROFILER_MS = "sampling_profiler_ms"; |
| 7042 | |
| 7043 | /** |
| 7044 | * URL to open browser on to allow user to manage a prepay account |
| 7045 | * @hide |
| 7046 | */ |
| 7047 | public static final String SETUP_PREPAID_DATA_SERVICE_URL = |
| 7048 | "setup_prepaid_data_service_url"; |
| 7049 | |
| 7050 | /** |
| 7051 | * URL to attempt a GET on to see if this is a prepay device |
| 7052 | * @hide |
| 7053 | */ |
| 7054 | public static final String SETUP_PREPAID_DETECTION_TARGET_URL = |
| 7055 | "setup_prepaid_detection_target_url"; |
| 7056 | |
| 7057 | /** |
| 7058 | * Host to check for a redirect to after an attempt to GET |
| 7059 | * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there, |
| 7060 | * this is a prepaid device with zero balance.) |
| 7061 | * @hide |
| 7062 | */ |
| 7063 | public static final String SETUP_PREPAID_DETECTION_REDIR_HOST = |
| 7064 | "setup_prepaid_detection_redir_host"; |
| 7065 | |
| 7066 | /** |
Jake Hamby | 76a6142 | 2012-09-06 17:40:21 -0700 | [diff] [blame] | 7067 | * The interval in milliseconds at which to check the number of SMS sent out without asking |
| 7068 | * for use permit, to limit the un-authorized SMS usage. |
| 7069 | * |
| 7070 | * @hide |
| 7071 | */ |
| 7072 | public static final String SMS_OUTGOING_CHECK_INTERVAL_MS = |
| 7073 | "sms_outgoing_check_interval_ms"; |
| 7074 | |
| 7075 | /** |
| 7076 | * The number of outgoing SMS sent without asking for user permit (of {@link |
| 7077 | * #SMS_OUTGOING_CHECK_INTERVAL_MS} |
| 7078 | * |
| 7079 | * @hide |
| 7080 | */ |
| 7081 | public static final String SMS_OUTGOING_CHECK_MAX_COUNT = |
| 7082 | "sms_outgoing_check_max_count"; |
| 7083 | |
| 7084 | /** |
| 7085 | * Used to disable SMS short code confirmation - defaults to true. |
Robert Greenwalt | 026efcc | 2012-09-24 10:03:21 -0700 | [diff] [blame] | 7086 | * True indcates we will do the check, etc. Set to false to disable. |
Jake Hamby | 76a6142 | 2012-09-06 17:40:21 -0700 | [diff] [blame] | 7087 | * @see com.android.internal.telephony.SmsUsageMonitor |
| 7088 | * @hide |
| 7089 | */ |
| 7090 | public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation"; |
| 7091 | |
Robert Greenwalt | 026efcc | 2012-09-24 10:03:21 -0700 | [diff] [blame] | 7092 | /** |
| 7093 | * Used to select which country we use to determine premium sms codes. |
| 7094 | * One of com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_SIM, |
| 7095 | * com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_NETWORK, |
| 7096 | * or com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_BOTH. |
| 7097 | * @hide |
| 7098 | */ |
| 7099 | public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule"; |
| 7100 | |
Jake Hamby | 76a6142 | 2012-09-06 17:40:21 -0700 | [diff] [blame] | 7101 | /** |
JP Abgrall | 32d1ac4d | 2014-02-21 12:05:20 -0800 | [diff] [blame] | 7102 | * Used to select TCP's default initial receiver window size in segments - defaults to a build config value |
| 7103 | * @hide |
| 7104 | */ |
| 7105 | public static final String TCP_DEFAULT_INIT_RWND = "tcp_default_init_rwnd"; |
| 7106 | |
| 7107 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7108 | * Used to disable Tethering on a device - defaults to true |
| 7109 | * @hide |
| 7110 | */ |
| 7111 | public static final String TETHER_SUPPORTED = "tether_supported"; |
| 7112 | |
| 7113 | /** |
| 7114 | * Used to require DUN APN on the device or not - defaults to a build config value |
| 7115 | * which defaults to false |
| 7116 | * @hide |
| 7117 | */ |
| 7118 | public static final String TETHER_DUN_REQUIRED = "tether_dun_required"; |
| 7119 | |
| 7120 | /** |
| 7121 | * Used to hold a gservices-provisioned apn value for DUN. If set, or the |
| 7122 | * corresponding build config values are set it will override the APN DB |
| 7123 | * values. |
| 7124 | * Consists of a comma seperated list of strings: |
| 7125 | * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type" |
| 7126 | * note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" |
| 7127 | * @hide |
| 7128 | */ |
| 7129 | public static final String TETHER_DUN_APN = "tether_dun_apn"; |
| 7130 | |
| 7131 | /** |
Junda Liu | 0c35fbc | 2016-01-19 23:20:15 -0800 | [diff] [blame] | 7132 | * List of carrier apps which are whitelisted to prompt the user for install when |
| 7133 | * a sim card with matching uicc carrier privilege rules is inserted. |
| 7134 | * |
| 7135 | * The value is "package1;package2;..." |
| 7136 | * @hide |
| 7137 | */ |
| 7138 | public static final String CARRIER_APP_WHITELIST = "carrier_app_whitelist"; |
| 7139 | |
| 7140 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7141 | * USB Mass Storage Enabled |
| 7142 | */ |
| 7143 | public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled"; |
| 7144 | |
| 7145 | /** |
| 7146 | * If this setting is set (to anything), then all references |
| 7147 | * to Gmail on the device must change to Google Mail. |
| 7148 | */ |
| 7149 | public static final String USE_GOOGLE_MAIL = "use_google_mail"; |
| 7150 | |
Hui Shu | 2267177 | 2014-10-01 21:41:07 +0000 | [diff] [blame] | 7151 | /** |
| 7152 | * Webview Data reduction proxy key. |
| 7153 | * @hide |
| 7154 | */ |
| 7155 | public static final String WEBVIEW_DATA_REDUCTION_PROXY_KEY = |
| 7156 | "webview_data_reduction_proxy_key"; |
| 7157 | |
Gustav Sennton | 14c033c | 2016-02-11 12:51:27 +0000 | [diff] [blame] | 7158 | /** |
Gustav Sennton | c83e3fa | 2016-02-18 12:19:13 +0000 | [diff] [blame] | 7159 | * Whether or not the WebView fallback mechanism should be enabled. |
| 7160 | * 0=disabled, 1=enabled. |
| 7161 | * @hide |
| 7162 | */ |
| 7163 | public static final String WEBVIEW_FALLBACK_LOGIC_ENABLED = |
| 7164 | "webview_fallback_logic_enabled"; |
| 7165 | |
| 7166 | /** |
Gustav Sennton | 14c033c | 2016-02-11 12:51:27 +0000 | [diff] [blame] | 7167 | * Name of the package used as WebView provider (if unset the provider is instead determined |
| 7168 | * by the system). |
| 7169 | * @hide |
| 7170 | */ |
| 7171 | public static final String WEBVIEW_PROVIDER = "webview_provider"; |
| 7172 | |
Tobias Sargeant | da85710 | 2016-02-11 14:52:28 +0000 | [diff] [blame] | 7173 | /** |
| 7174 | * Developer setting to enable WebView multiprocess rendering. |
| 7175 | * @hide |
| 7176 | */ |
Tobias Sargeant | adfded1 | 2016-02-22 13:45:34 +0000 | [diff] [blame] | 7177 | @SystemApi |
Tobias Sargeant | da85710 | 2016-02-11 14:52:28 +0000 | [diff] [blame] | 7178 | public static final String WEBVIEW_MULTIPROCESS = "webview_multiprocess"; |
| 7179 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7180 | /** |
Jeff Brown | 89d5546 | 2012-09-19 11:33:42 -0700 | [diff] [blame] | 7181 | * Whether Wifi display is enabled/disabled |
| 7182 | * 0=disabled. 1=enabled. |
| 7183 | * @hide |
| 7184 | */ |
| 7185 | public static final String WIFI_DISPLAY_ON = "wifi_display_on"; |
| 7186 | |
| 7187 | /** |
Chong Zhang | 1f3ecaa | 2013-05-03 15:55:36 -0700 | [diff] [blame] | 7188 | * Whether Wifi display certification mode is enabled/disabled |
| 7189 | * 0=disabled. 1=enabled. |
| 7190 | * @hide |
| 7191 | */ |
| 7192 | public static final String WIFI_DISPLAY_CERTIFICATION_ON = |
| 7193 | "wifi_display_certification_on"; |
| 7194 | |
| 7195 | /** |
Chong Zhang | e38af81 | 2013-08-29 17:25:17 -0700 | [diff] [blame] | 7196 | * WPS Configuration method used by Wifi display, this setting only |
| 7197 | * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled). |
| 7198 | * |
| 7199 | * Possible values are: |
| 7200 | * |
| 7201 | * WpsInfo.INVALID: use default WPS method chosen by framework |
| 7202 | * WpsInfo.PBC : use Push button |
| 7203 | * WpsInfo.KEYPAD : use Keypad |
| 7204 | * WpsInfo.DISPLAY: use Display |
| 7205 | * @hide |
| 7206 | */ |
| 7207 | public static final String WIFI_DISPLAY_WPS_CONFIG = |
| 7208 | "wifi_display_wps_config"; |
| 7209 | |
| 7210 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7211 | * Whether to notify the user of open networks. |
| 7212 | * <p> |
| 7213 | * If not connected and the scan results have an open network, we will |
| 7214 | * put this notification up. If we attempt to connect to a network or |
| 7215 | * the open network(s) disappear, we remove the notification. When we |
| 7216 | * show the notification, we will not show it again for |
| 7217 | * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time. |
| 7218 | */ |
| 7219 | public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 7220 | "wifi_networks_available_notification_on"; |
| 7221 | /** |
| 7222 | * {@hide} |
| 7223 | */ |
| 7224 | public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON = |
| 7225 | "wimax_networks_available_notification_on"; |
| 7226 | |
| 7227 | /** |
| 7228 | * Delay (in seconds) before repeating the Wi-Fi networks available notification. |
| 7229 | * Connecting to a network will reset the timer. |
| 7230 | */ |
| 7231 | public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = |
| 7232 | "wifi_networks_available_repeat_delay"; |
| 7233 | |
| 7234 | /** |
Robert Greenwalt | 3ea0c99 | 2013-10-03 21:13:49 +0000 | [diff] [blame] | 7235 | * 802.11 country code in ISO 3166 format |
| 7236 | * @hide |
| 7237 | */ |
| 7238 | public static final String WIFI_COUNTRY_CODE = "wifi_country_code"; |
| 7239 | |
| 7240 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7241 | * The interval in milliseconds to issue wake up scans when wifi needs |
| 7242 | * to connect. This is necessary to connect to an access point when |
| 7243 | * device is on the move and the screen is off. |
| 7244 | * @hide |
| 7245 | */ |
| 7246 | public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS = |
| 7247 | "wifi_framework_scan_interval_ms"; |
| 7248 | |
| 7249 | /** |
| 7250 | * The interval in milliseconds after which Wi-Fi is considered idle. |
| 7251 | * When idle, it is possible for the device to be switched from Wi-Fi to |
| 7252 | * the mobile data network. |
| 7253 | * @hide |
| 7254 | */ |
| 7255 | public static final String WIFI_IDLE_MS = "wifi_idle_ms"; |
| 7256 | |
| 7257 | /** |
| 7258 | * When the number of open networks exceeds this number, the |
| 7259 | * least-recently-used excess networks will be removed. |
| 7260 | */ |
| 7261 | public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept"; |
| 7262 | |
| 7263 | /** |
| 7264 | * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this. |
| 7265 | */ |
| 7266 | public static final String WIFI_ON = "wifi_on"; |
| 7267 | |
| 7268 | /** |
Irfan Sheriff | 11aefad | 2013-03-06 07:57:41 -0800 | [diff] [blame] | 7269 | * Setting to allow scans to be enabled even wifi is turned off for connectivity. |
| 7270 | * @hide |
| 7271 | */ |
| 7272 | public static final String WIFI_SCAN_ALWAYS_AVAILABLE = |
| 7273 | "wifi_scan_always_enabled"; |
| 7274 | |
| 7275 | /** |
Wei Wang | d91f193 | 2015-03-19 15:09:56 -0700 | [diff] [blame] | 7276 | * Settings to allow BLE scans to be enabled even when Bluetooth is turned off for |
| 7277 | * connectivity. |
| 7278 | * @hide |
| 7279 | */ |
| 7280 | public static final String BLE_SCAN_ALWAYS_AVAILABLE = |
| 7281 | "ble_scan_always_enabled"; |
| 7282 | |
| 7283 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7284 | * Used to save the Wifi_ON state prior to tethering. |
| 7285 | * This state will be checked to restore Wifi after |
| 7286 | * the user turns off tethering. |
| 7287 | * |
| 7288 | * @hide |
| 7289 | */ |
| 7290 | public static final String WIFI_SAVED_STATE = "wifi_saved_state"; |
| 7291 | |
| 7292 | /** |
| 7293 | * The interval in milliseconds to scan as used by the wifi supplicant |
| 7294 | * @hide |
| 7295 | */ |
| 7296 | public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS = |
| 7297 | "wifi_supplicant_scan_interval_ms"; |
| 7298 | |
vandwalle | 7c3606c | 2014-03-31 19:12:07 -0700 | [diff] [blame] | 7299 | /** |
| 7300 | * whether frameworks handles wifi auto-join |
| 7301 | * @hide |
| 7302 | */ |
| 7303 | public static final String WIFI_ENHANCED_AUTO_JOIN = |
| 7304 | "wifi_enhanced_auto_join"; |
| 7305 | |
| 7306 | /** |
| 7307 | * whether settings show RSSI |
| 7308 | * @hide |
| 7309 | */ |
| 7310 | public static final String WIFI_NETWORK_SHOW_RSSI = |
| 7311 | "wifi_network_show_rssi"; |
| 7312 | |
| 7313 | /** |
Irfan Sheriff | 3809f50 | 2012-09-17 16:04:57 -0700 | [diff] [blame] | 7314 | * The interval in milliseconds to scan at supplicant when p2p is connected |
| 7315 | * @hide |
| 7316 | */ |
| 7317 | public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS = |
| 7318 | "wifi_scan_interval_p2p_connected_ms"; |
| 7319 | |
| 7320 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7321 | * Whether the Wi-Fi watchdog is enabled. |
| 7322 | */ |
| 7323 | public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; |
| 7324 | |
| 7325 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7326 | * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and |
| 7327 | * the setting needs to be set to 0 to disable it. |
| 7328 | * @hide |
| 7329 | */ |
| 7330 | public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED = |
| 7331 | "wifi_watchdog_poor_network_test_enabled"; |
| 7332 | |
| 7333 | /** |
| 7334 | * Setting to turn on suspend optimizations at screen off on Wi-Fi. Enabled by default and |
| 7335 | * needs to be set to 0 to disable it. |
| 7336 | * @hide |
| 7337 | */ |
| 7338 | public static final String WIFI_SUSPEND_OPTIMIZATIONS_ENABLED = |
| 7339 | "wifi_suspend_optimizations_enabled"; |
| 7340 | |
| 7341 | /** |
Nathan Harold | 29589fc | 2016-03-30 21:53:48 -0700 | [diff] [blame] | 7342 | * Setting to enable verbose logging in Wi-Fi; disabled by default, and setting to 1 |
| 7343 | * will enable it. In the future, additional values may be supported. |
| 7344 | * @hide |
| 7345 | */ |
| 7346 | public static final String WIFI_VERBOSE_LOGGING_ENABLED = |
| 7347 | "wifi_verbose_logging_enabled"; |
| 7348 | |
| 7349 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7350 | * The maximum number of times we will retry a connection to an access |
| 7351 | * point for which we have failed in acquiring an IP address from DHCP. |
| 7352 | * A value of N means that we will make N+1 connection attempts in all. |
| 7353 | */ |
| 7354 | public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; |
| 7355 | |
| 7356 | /** |
| 7357 | * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile |
| 7358 | * data connectivity to be established after a disconnect from Wi-Fi. |
| 7359 | */ |
| 7360 | public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = |
| 7361 | "wifi_mobile_data_transition_wakelock_timeout_ms"; |
| 7362 | |
| 7363 | /** |
Zoltan Szatmary-Ban | 4045d24 | 2015-05-27 12:42:39 +0100 | [diff] [blame] | 7364 | * This setting controls whether WiFi configurations created by a Device Owner app |
| 7365 | * should be locked down (that is, be editable or removable only by the Device Owner App, |
| 7366 | * not even by Settings app). |
| 7367 | * This setting takes integer values. Non-zero values mean DO created configurations |
| 7368 | * are locked down. Value of zero means they are not. Default value in the absence of |
| 7369 | * actual value to this setting is 0. |
| 7370 | */ |
| 7371 | public static final String WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN = |
| 7372 | "wifi_device_owner_configs_lockdown"; |
| 7373 | |
| 7374 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7375 | * The operational wifi frequency band |
| 7376 | * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO}, |
| 7377 | * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or |
| 7378 | * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ} |
| 7379 | * |
| 7380 | * @hide |
| 7381 | */ |
| 7382 | public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band"; |
| 7383 | |
| 7384 | /** |
| 7385 | * The Wi-Fi peer-to-peer device name |
| 7386 | * @hide |
| 7387 | */ |
| 7388 | public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name"; |
| 7389 | |
| 7390 | /** |
Robert Greenwalt | c12783a | 2013-05-16 12:48:20 -0700 | [diff] [blame] | 7391 | * The min time between wifi disable and wifi enable |
| 7392 | * @hide |
| 7393 | */ |
| 7394 | public static final String WIFI_REENABLE_DELAY_MS = "wifi_reenable_delay"; |
| 7395 | |
| 7396 | /** |
Jeff Davidson | a20ca67d | 2014-12-16 11:48:54 -0800 | [diff] [blame] | 7397 | * Timeout for ephemeral networks when all known BSSIDs go out of range. We will disconnect |
| 7398 | * from an ephemeral network if there is no BSSID for that network with a non-null score that |
| 7399 | * has been seen in this time period. |
| 7400 | * |
| 7401 | * If this is less than or equal to zero, we use a more conservative behavior and only check |
| 7402 | * for a non-null score from the currently connected or target BSSID. |
| 7403 | * @hide |
| 7404 | */ |
| 7405 | public static final String WIFI_EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS = |
| 7406 | "wifi_ephemeral_out_of_range_timeout_ms"; |
| 7407 | |
| 7408 | /** |
Christopher Tate | c868b64 | 2012-09-12 17:41:04 -0700 | [diff] [blame] | 7409 | * The number of milliseconds to delay when checking for data stalls during |
| 7410 | * non-aggressive detection. (screen is turned off.) |
| 7411 | * @hide |
| 7412 | */ |
| 7413 | public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS = |
| 7414 | "data_stall_alarm_non_aggressive_delay_in_ms"; |
| 7415 | |
| 7416 | /** |
| 7417 | * The number of milliseconds to delay when checking for data stalls during |
| 7418 | * aggressive detection. (screen on or suspected data stall) |
| 7419 | * @hide |
| 7420 | */ |
| 7421 | public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS = |
| 7422 | "data_stall_alarm_aggressive_delay_in_ms"; |
| 7423 | |
| 7424 | /** |
Wink Saville | ce1e379 | 2013-09-03 16:41:44 -0700 | [diff] [blame] | 7425 | * The number of milliseconds to allow the provisioning apn to remain active |
| 7426 | * @hide |
| 7427 | */ |
| 7428 | public static final String PROVISIONING_APN_ALARM_DELAY_IN_MS = |
| 7429 | "provisioning_apn_alarm_delay_in_ms"; |
| 7430 | |
| 7431 | /** |
Christopher Tate | c868b64 | 2012-09-12 17:41:04 -0700 | [diff] [blame] | 7432 | * The interval in milliseconds at which to check gprs registration |
| 7433 | * after the first registration mismatch of gprs and voice service, |
| 7434 | * to detect possible data network registration problems. |
| 7435 | * |
| 7436 | * @hide |
| 7437 | */ |
| 7438 | public static final String GPRS_REGISTER_CHECK_PERIOD_MS = |
| 7439 | "gprs_register_check_period_ms"; |
| 7440 | |
| 7441 | /** |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7442 | * Nonzero causes Log.wtf() to crash. |
| 7443 | * @hide |
| 7444 | */ |
| 7445 | public static final String WTF_IS_FATAL = "wtf_is_fatal"; |
| 7446 | |
Eric Laurent | bc0fab1f | 2012-09-19 11:24:41 -0700 | [diff] [blame] | 7447 | /** |
| 7448 | * Ringer mode. This is used internally, changing this value will not |
| 7449 | * change the ringer mode. See AudioManager. |
| 7450 | */ |
| 7451 | public static final String MODE_RINGER = "mode_ringer"; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7452 | |
Jeff Brown | d493596 | 2012-09-25 13:27:20 -0700 | [diff] [blame] | 7453 | /** |
| 7454 | * Overlay display devices setting. |
| 7455 | * The associated value is a specially formatted string that describes the |
| 7456 | * size and density of simulated secondary display devices. |
| 7457 | * <p> |
| 7458 | * Format: {width}x{height}/{dpi};... |
| 7459 | * </p><p> |
| 7460 | * Example: |
| 7461 | * <ul> |
| 7462 | * <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li> |
| 7463 | * <li><code>1920x1080/320;1280x720/213</code>: make two overlays, the first |
| 7464 | * at 1080p and the second at 720p.</li> |
| 7465 | * <li>If the value is empty, then no overlay display devices are created.</li> |
| 7466 | * </ul></p> |
| 7467 | * |
| 7468 | * @hide |
| 7469 | */ |
| 7470 | public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices"; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 7471 | |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 7472 | /** |
| 7473 | * Threshold values for the duration and level of a discharge cycle, |
| 7474 | * under which we log discharge cycle info. |
| 7475 | * |
| 7476 | * @hide |
| 7477 | */ |
| 7478 | public static final String |
| 7479 | BATTERY_DISCHARGE_DURATION_THRESHOLD = "battery_discharge_duration_threshold"; |
| 7480 | |
| 7481 | /** @hide */ |
| 7482 | public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold"; |
| 7483 | |
| 7484 | /** |
| 7485 | * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR |
| 7486 | * intents on application crashes and ANRs. If this is disabled, the |
| 7487 | * crash/ANR dialog will never display the "Report" button. |
| 7488 | * <p> |
| 7489 | * Type: int (0 = disallow, 1 = allow) |
| 7490 | * |
| 7491 | * @hide |
| 7492 | */ |
| 7493 | public static final String SEND_ACTION_APP_ERROR = "send_action_app_error"; |
| 7494 | |
| 7495 | /** |
| 7496 | * Maximum age of entries kept by {@link DropBoxManager}. |
| 7497 | * |
| 7498 | * @hide |
| 7499 | */ |
| 7500 | public static final String DROPBOX_AGE_SECONDS = "dropbox_age_seconds"; |
| 7501 | |
| 7502 | /** |
| 7503 | * Maximum number of entry files which {@link DropBoxManager} will keep |
| 7504 | * around. |
| 7505 | * |
| 7506 | * @hide |
| 7507 | */ |
| 7508 | public static final String DROPBOX_MAX_FILES = "dropbox_max_files"; |
| 7509 | |
| 7510 | /** |
| 7511 | * Maximum amount of disk space used by {@link DropBoxManager} no matter |
| 7512 | * what. |
| 7513 | * |
| 7514 | * @hide |
| 7515 | */ |
| 7516 | public static final String DROPBOX_QUOTA_KB = "dropbox_quota_kb"; |
| 7517 | |
| 7518 | /** |
| 7519 | * Percent of free disk (excluding reserve) which {@link DropBoxManager} |
| 7520 | * will use. |
| 7521 | * |
| 7522 | * @hide |
| 7523 | */ |
| 7524 | public static final String DROPBOX_QUOTA_PERCENT = "dropbox_quota_percent"; |
| 7525 | |
| 7526 | /** |
| 7527 | * Percent of total disk which {@link DropBoxManager} will never dip |
| 7528 | * into. |
| 7529 | * |
| 7530 | * @hide |
| 7531 | */ |
| 7532 | public static final String DROPBOX_RESERVE_PERCENT = "dropbox_reserve_percent"; |
| 7533 | |
| 7534 | /** |
| 7535 | * Prefix for per-tag dropbox disable/enable settings. |
| 7536 | * |
| 7537 | * @hide |
| 7538 | */ |
| 7539 | public static final String DROPBOX_TAG_PREFIX = "dropbox:"; |
| 7540 | |
| 7541 | /** |
| 7542 | * Lines of logcat to include with system crash/ANR/etc. reports, as a |
| 7543 | * prefix of the dropbox tag of the report type. For example, |
| 7544 | * "logcat_for_system_server_anr" controls the lines of logcat captured |
| 7545 | * with system server ANR reports. 0 to disable. |
| 7546 | * |
| 7547 | * @hide |
| 7548 | */ |
| 7549 | public static final String ERROR_LOGCAT_PREFIX = "logcat_for_"; |
| 7550 | |
| 7551 | /** |
| 7552 | * The interval in minutes after which the amount of free storage left |
| 7553 | * on the device is logged to the event log |
| 7554 | * |
| 7555 | * @hide |
| 7556 | */ |
| 7557 | public static final String SYS_FREE_STORAGE_LOG_INTERVAL = "sys_free_storage_log_interval"; |
| 7558 | |
| 7559 | /** |
| 7560 | * Threshold for the amount of change in disk free space required to |
| 7561 | * report the amount of free space. Used to prevent spamming the logs |
| 7562 | * when the disk free space isn't changing frequently. |
| 7563 | * |
| 7564 | * @hide |
| 7565 | */ |
| 7566 | public static final String |
| 7567 | DISK_FREE_CHANGE_REPORTING_THRESHOLD = "disk_free_change_reporting_threshold"; |
| 7568 | |
| 7569 | /** |
| 7570 | * Minimum percentage of free storage on the device that is used to |
| 7571 | * determine if the device is running low on storage. The default is 10. |
| 7572 | * <p> |
| 7573 | * Say this value is set to 10, the device is considered running low on |
| 7574 | * storage if 90% or more of the device storage is filled up. |
| 7575 | * |
| 7576 | * @hide |
| 7577 | */ |
| 7578 | public static final String |
| 7579 | SYS_STORAGE_THRESHOLD_PERCENTAGE = "sys_storage_threshold_percentage"; |
| 7580 | |
| 7581 | /** |
| 7582 | * Maximum byte size of the low storage threshold. This is to ensure |
| 7583 | * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in an |
| 7584 | * overly large threshold for large storage devices. Currently this must |
| 7585 | * be less than 2GB. This default is 500MB. |
| 7586 | * |
| 7587 | * @hide |
| 7588 | */ |
| 7589 | public static final String |
| 7590 | SYS_STORAGE_THRESHOLD_MAX_BYTES = "sys_storage_threshold_max_bytes"; |
| 7591 | |
| 7592 | /** |
| 7593 | * Minimum bytes of free storage on the device before the data partition |
| 7594 | * is considered full. By default, 1 MB is reserved to avoid system-wide |
| 7595 | * SQLite disk full exceptions. |
| 7596 | * |
| 7597 | * @hide |
| 7598 | */ |
| 7599 | public static final String |
| 7600 | SYS_STORAGE_FULL_THRESHOLD_BYTES = "sys_storage_full_threshold_bytes"; |
| 7601 | |
| 7602 | /** |
| 7603 | * The maximum reconnect delay for short network outages or when the |
| 7604 | * network is suspended due to phone use. |
| 7605 | * |
| 7606 | * @hide |
| 7607 | */ |
| 7608 | public static final String |
| 7609 | SYNC_MAX_RETRY_DELAY_IN_SECONDS = "sync_max_retry_delay_in_seconds"; |
| 7610 | |
| 7611 | /** |
| 7612 | * The number of milliseconds to delay before sending out |
Erik Kline | 8f29dcf | 2014-12-08 16:25:20 +0900 | [diff] [blame] | 7613 | * {@link ConnectivityManager#CONNECTIVITY_ACTION} broadcasts. Ignored. |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 7614 | * |
| 7615 | * @hide |
| 7616 | */ |
| 7617 | public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay"; |
| 7618 | |
Vinit Deshapnde | 1f12cb5 | 2013-08-21 13:09:01 -0700 | [diff] [blame] | 7619 | |
| 7620 | /** |
| 7621 | * Network sampling interval, in seconds. We'll generate link information |
| 7622 | * about bytes/packets sent and error rates based on data sampled in this interval |
| 7623 | * |
| 7624 | * @hide |
| 7625 | */ |
| 7626 | |
| 7627 | public static final String CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS = |
| 7628 | "connectivity_sampling_interval_in_seconds"; |
| 7629 | |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 7630 | /** |
Jason Monk | 602b232 | 2013-07-03 17:04:33 -0400 | [diff] [blame] | 7631 | * The series of successively longer delays used in retrying to download PAC file. |
| 7632 | * Last delay is used between successful PAC downloads. |
| 7633 | * |
| 7634 | * @hide |
| 7635 | */ |
| 7636 | public static final String PAC_CHANGE_DELAY = "pac_change_delay"; |
| 7637 | |
| 7638 | /** |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 7639 | * Setting to turn off captive portal detection. Feature is enabled by |
| 7640 | * default and the setting needs to be set to 0 to disable it. |
| 7641 | * |
| 7642 | * @hide |
| 7643 | */ |
| 7644 | public static final String |
| 7645 | CAPTIVE_PORTAL_DETECTION_ENABLED = "captive_portal_detection_enabled"; |
| 7646 | |
| 7647 | /** |
| 7648 | * The server used for captive portal detection upon a new conection. A |
| 7649 | * 204 response code from the server is used for validation. |
| 7650 | * |
| 7651 | * @hide |
| 7652 | */ |
| 7653 | public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server"; |
| 7654 | |
| 7655 | /** |
| 7656 | * Whether network service discovery is enabled. |
| 7657 | * |
| 7658 | * @hide |
| 7659 | */ |
| 7660 | public static final String NSD_ON = "nsd_on"; |
| 7661 | |
| 7662 | /** |
| 7663 | * Let user pick default install location. |
| 7664 | * |
| 7665 | * @hide |
| 7666 | */ |
| 7667 | public static final String SET_INSTALL_LOCATION = "set_install_location"; |
| 7668 | |
| 7669 | /** |
| 7670 | * Default install location value. |
| 7671 | * 0 = auto, let system decide |
| 7672 | * 1 = internal |
| 7673 | * 2 = sdcard |
| 7674 | * @hide |
| 7675 | */ |
| 7676 | public static final String DEFAULT_INSTALL_LOCATION = "default_install_location"; |
| 7677 | |
| 7678 | /** |
| 7679 | * ms during which to consume extra events related to Inet connection |
| 7680 | * condition after a transtion to fully-connected |
| 7681 | * |
| 7682 | * @hide |
| 7683 | */ |
| 7684 | public static final String |
| 7685 | INET_CONDITION_DEBOUNCE_UP_DELAY = "inet_condition_debounce_up_delay"; |
| 7686 | |
| 7687 | /** |
| 7688 | * ms during which to consume extra events related to Inet connection |
| 7689 | * condtion after a transtion to partly-connected |
| 7690 | * |
| 7691 | * @hide |
| 7692 | */ |
| 7693 | public static final String |
| 7694 | INET_CONDITION_DEBOUNCE_DOWN_DELAY = "inet_condition_debounce_down_delay"; |
| 7695 | |
| 7696 | /** {@hide} */ |
| 7697 | public static final String |
| 7698 | READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default"; |
| 7699 | |
| 7700 | /** |
| 7701 | * Host name and port for global http proxy. Uses ':' seperator for |
| 7702 | * between host and port. |
| 7703 | */ |
| 7704 | public static final String HTTP_PROXY = "http_proxy"; |
| 7705 | |
| 7706 | /** |
| 7707 | * Host name for global http proxy. Set via ConnectivityManager. |
| 7708 | * |
| 7709 | * @hide |
| 7710 | */ |
| 7711 | public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host"; |
| 7712 | |
| 7713 | /** |
| 7714 | * Integer host port for global http proxy. Set via ConnectivityManager. |
| 7715 | * |
| 7716 | * @hide |
| 7717 | */ |
| 7718 | public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port"; |
| 7719 | |
| 7720 | /** |
| 7721 | * Exclusion list for global proxy. This string contains a list of |
| 7722 | * comma-separated domains where the global proxy does not apply. |
| 7723 | * Domains should be listed in a comma- separated list. Example of |
| 7724 | * acceptable formats: ".domain1.com,my.domain2.com" Use |
| 7725 | * ConnectivityManager to set/get. |
| 7726 | * |
| 7727 | * @hide |
| 7728 | */ |
| 7729 | public static final String |
| 7730 | GLOBAL_HTTP_PROXY_EXCLUSION_LIST = "global_http_proxy_exclusion_list"; |
| 7731 | |
| 7732 | /** |
Jason Monk | 602b232 | 2013-07-03 17:04:33 -0400 | [diff] [blame] | 7733 | * The location PAC File for the proxy. |
| 7734 | * @hide |
| 7735 | */ |
| 7736 | public static final String |
| 7737 | GLOBAL_HTTP_PROXY_PAC = "global_proxy_pac_url"; |
| 7738 | |
| 7739 | /** |
Jeff Sharkey | 625239a | 2012-09-26 22:03:49 -0700 | [diff] [blame] | 7740 | * Enables the UI setting to allow the user to specify the global HTTP |
| 7741 | * proxy and associated exclusion list. |
| 7742 | * |
| 7743 | * @hide |
| 7744 | */ |
| 7745 | public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy"; |
| 7746 | |
| 7747 | /** |
| 7748 | * Setting for default DNS in case nobody suggests one |
| 7749 | * |
| 7750 | * @hide |
| 7751 | */ |
| 7752 | public static final String DEFAULT_DNS_SERVER = "default_dns_server"; |
| 7753 | |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 7754 | /** {@hide} */ |
| 7755 | public static final String |
| 7756 | BLUETOOTH_HEADSET_PRIORITY_PREFIX = "bluetooth_headset_priority_"; |
| 7757 | /** {@hide} */ |
| 7758 | public static final String |
| 7759 | BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX = "bluetooth_a2dp_sink_priority_"; |
| 7760 | /** {@hide} */ |
| 7761 | public static final String |
Sanket Agarwal | 1bec6a5 | 2015-10-21 18:23:27 -0700 | [diff] [blame] | 7762 | BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX = "bluetooth_a2dp_src_priority_"; |
| 7763 | /** {@hide} */ |
| 7764 | public static final String |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 7765 | BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX = "bluetooth_input_device_priority_"; |
Kim Schulz | 0d37605 | 2013-08-22 11:18:02 +0200 | [diff] [blame] | 7766 | /** {@hide} */ |
| 7767 | public static final String |
| 7768 | BLUETOOTH_MAP_PRIORITY_PREFIX = "bluetooth_map_priority_"; |
Casper Bonde | 2a5f608 | 2015-03-19 10:36:45 +0100 | [diff] [blame] | 7769 | /** {@hide} */ |
| 7770 | public static final String |
Joseph Pirozzo | 563c700 | 2016-03-21 15:49:48 -0700 | [diff] [blame] | 7771 | BLUETOOTH_PBAP_CLIENT_PRIORITY_PREFIX = "bluetooth_pbap_client_priority_"; |
| 7772 | /** {@hide} */ |
| 7773 | public static final String |
Casper Bonde | 2a5f608 | 2015-03-19 10:36:45 +0100 | [diff] [blame] | 7774 | BLUETOOTH_SAP_PRIORITY_PREFIX = "bluetooth_sap_priority_"; |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 7775 | |
| 7776 | /** |
Adam Lesinski | 31c05d1 | 2015-06-09 17:34:04 -0700 | [diff] [blame] | 7777 | * Device Idle (Doze) specific settings. |
| 7778 | * This is encoded as a key=value list, separated by commas. Ex: |
| 7779 | * |
| 7780 | * "inactive_timeout=60000,sensing_timeout=400000" |
| 7781 | * |
| 7782 | * The following keys are supported: |
| 7783 | * |
| 7784 | * <pre> |
| 7785 | * inactive_to (long) |
| 7786 | * sensing_to (long) |
| 7787 | * motion_inactive_to (long) |
| 7788 | * idle_after_inactive_to (long) |
| 7789 | * idle_pending_to (long) |
| 7790 | * max_idle_pending_to (long) |
| 7791 | * idle_pending_factor (float) |
| 7792 | * idle_to (long) |
| 7793 | * max_idle_to (long) |
| 7794 | * idle_factor (float) |
| 7795 | * min_time_to_alarm (long) |
| 7796 | * max_temp_app_whitelist_duration (long) |
| 7797 | * </pre> |
| 7798 | * |
| 7799 | * <p> |
| 7800 | * Type: string |
| 7801 | * @hide |
| 7802 | * @see com.android.server.DeviceIdleController.Constants |
| 7803 | */ |
| 7804 | public static final String DEVICE_IDLE_CONSTANTS = "device_idle_constants"; |
| 7805 | |
| 7806 | /** |
Joe LaPenna | f33b5bf | 2016-03-23 15:19:47 -0700 | [diff] [blame] | 7807 | * Device Idle (Doze) specific settings for watches. See {@code #DEVICE_IDLE_CONSTANTS} |
| 7808 | * |
| 7809 | * <p> |
| 7810 | * Type: string |
| 7811 | * @hide |
| 7812 | * @see com.android.server.DeviceIdleController.Constants |
| 7813 | */ |
| 7814 | public static final String DEVICE_IDLE_CONSTANTS_WATCH = "device_idle_constants_watch"; |
| 7815 | |
| 7816 | /** |
Adam Lesinski | a6232df | 2015-06-11 18:16:41 -0700 | [diff] [blame] | 7817 | * App standby (app idle) specific settings. |
| 7818 | * This is encoded as a key=value list, separated by commas. Ex: |
| 7819 | * |
| 7820 | * "idle_duration=5000,parole_interval=4500" |
| 7821 | * |
| 7822 | * The following keys are supported: |
| 7823 | * |
| 7824 | * <pre> |
Adam Lesinski | f0ef3c1 | 2016-01-13 12:26:07 -0800 | [diff] [blame] | 7825 | * idle_duration2 (long) |
Adam Lesinski | a6232df | 2015-06-11 18:16:41 -0700 | [diff] [blame] | 7826 | * wallclock_threshold (long) |
| 7827 | * parole_interval (long) |
| 7828 | * parole_duration (long) |
Adam Lesinski | f0ef3c1 | 2016-01-13 12:26:07 -0800 | [diff] [blame] | 7829 | * |
| 7830 | * idle_duration (long) // This is deprecated and used to circumvent b/26355386. |
Adam Lesinski | a6232df | 2015-06-11 18:16:41 -0700 | [diff] [blame] | 7831 | * </pre> |
| 7832 | * |
| 7833 | * <p> |
| 7834 | * Type: string |
| 7835 | * @hide |
| 7836 | * @see com.android.server.usage.UsageStatsService.SettingsObserver |
| 7837 | */ |
| 7838 | public static final String APP_IDLE_CONSTANTS = "app_idle_constants"; |
| 7839 | |
| 7840 | /** |
Dianne Hackborn | a750a63 | 2015-06-16 17:18:23 -0700 | [diff] [blame] | 7841 | * Alarm manager specific settings. |
| 7842 | * This is encoded as a key=value list, separated by commas. Ex: |
| 7843 | * |
| 7844 | * "min_futurity=5000,allow_while_idle_short_time=4500" |
| 7845 | * |
| 7846 | * The following keys are supported: |
| 7847 | * |
| 7848 | * <pre> |
| 7849 | * min_futurity (long) |
| 7850 | * min_interval (long) |
| 7851 | * allow_while_idle_short_time (long) |
| 7852 | * allow_while_idle_long_time (long) |
| 7853 | * allow_while_idle_whitelist_duration (long) |
| 7854 | * </pre> |
| 7855 | * |
| 7856 | * <p> |
| 7857 | * Type: string |
| 7858 | * @hide |
| 7859 | * @see com.android.server.AlarmManagerService.Constants |
| 7860 | */ |
| 7861 | public static final String ALARM_MANAGER_CONSTANTS = "alarm_manager_constants"; |
| 7862 | |
| 7863 | /** |
Makoto Onuki | 4362a66 | 2016-03-08 18:59:09 -0800 | [diff] [blame] | 7864 | * ShortcutManager specific settings. |
| 7865 | * This is encoded as a key=value list, separated by commas. Ex: |
| 7866 | * |
Makoto Onuki | b6d3523 | 2016-04-04 15:57:17 -0700 | [diff] [blame] | 7867 | * "reset_interval_sec=86400,max_updates_per_interval=1" |
Makoto Onuki | 4362a66 | 2016-03-08 18:59:09 -0800 | [diff] [blame] | 7868 | * |
| 7869 | * The following keys are supported: |
| 7870 | * |
| 7871 | * <pre> |
| 7872 | * reset_interval_sec (long) |
Makoto Onuki | b6d3523 | 2016-04-04 15:57:17 -0700 | [diff] [blame] | 7873 | * max_updates_per_interval (int) |
Makoto Onuki | 4362a66 | 2016-03-08 18:59:09 -0800 | [diff] [blame] | 7874 | * max_icon_dimension_dp (int, DP) |
| 7875 | * max_icon_dimension_dp_lowram (int, DP) |
| 7876 | * max_shortcuts (int) |
| 7877 | * icon_quality (int, 0-100) |
| 7878 | * icon_format (String) |
| 7879 | * </pre> |
| 7880 | * |
| 7881 | * <p> |
| 7882 | * Type: string |
| 7883 | * @hide |
| 7884 | * @see com.android.server.pm.ShortcutService.ConfigConstants |
| 7885 | */ |
| 7886 | public static final String SHORTCUT_MANAGER_CONSTANTS = "shortcut_manager_constants"; |
| 7887 | |
| 7888 | /** |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 7889 | * Get the key that retrieves a bluetooth headset's priority. |
| 7890 | * @hide |
| 7891 | */ |
| 7892 | public static final String getBluetoothHeadsetPriorityKey(String address) { |
Elliott Hughes | cb64d43 | 2013-08-02 10:00:44 -0700 | [diff] [blame] | 7893 | return BLUETOOTH_HEADSET_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 7894 | } |
| 7895 | |
| 7896 | /** |
| 7897 | * Get the key that retrieves a bluetooth a2dp sink's priority. |
| 7898 | * @hide |
| 7899 | */ |
| 7900 | public static final String getBluetoothA2dpSinkPriorityKey(String address) { |
Elliott Hughes | cb64d43 | 2013-08-02 10:00:44 -0700 | [diff] [blame] | 7901 | return BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 7902 | } |
| 7903 | |
| 7904 | /** |
Sanket Agarwal | 1bec6a5 | 2015-10-21 18:23:27 -0700 | [diff] [blame] | 7905 | * Get the key that retrieves a bluetooth a2dp src's priority. |
| 7906 | * @hide |
| 7907 | */ |
| 7908 | public static final String getBluetoothA2dpSrcPriorityKey(String address) { |
| 7909 | return BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
| 7910 | } |
| 7911 | |
| 7912 | /** |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 7913 | * Get the key that retrieves a bluetooth Input Device's priority. |
| 7914 | * @hide |
| 7915 | */ |
| 7916 | public static final String getBluetoothInputDevicePriorityKey(String address) { |
Elliott Hughes | cb64d43 | 2013-08-02 10:00:44 -0700 | [diff] [blame] | 7917 | return BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
Jeff Sharkey | 0ac1028 | 2012-10-01 12:50:22 -0700 | [diff] [blame] | 7918 | } |
| 7919 | |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 7920 | /** |
Kim Schulz | 0d37605 | 2013-08-22 11:18:02 +0200 | [diff] [blame] | 7921 | * Get the key that retrieves a bluetooth map priority. |
| 7922 | * @hide |
| 7923 | */ |
| 7924 | public static final String getBluetoothMapPriorityKey(String address) { |
| 7925 | return BLUETOOTH_MAP_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
| 7926 | } |
Casper Bonde | 2a5f608 | 2015-03-19 10:36:45 +0100 | [diff] [blame] | 7927 | |
| 7928 | /** |
Joseph Pirozzo | 563c700 | 2016-03-21 15:49:48 -0700 | [diff] [blame] | 7929 | * Get the key that retrieves a bluetooth pbap client priority. |
| 7930 | * @hide |
| 7931 | */ |
| 7932 | public static final String getBluetoothPbapClientPriorityKey(String address) { |
| 7933 | return BLUETOOTH_PBAP_CLIENT_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
| 7934 | } |
| 7935 | |
| 7936 | /** |
Casper Bonde | 2a5f608 | 2015-03-19 10:36:45 +0100 | [diff] [blame] | 7937 | * Get the key that retrieves a bluetooth map priority. |
| 7938 | * @hide |
| 7939 | */ |
| 7940 | public static final String getBluetoothSapPriorityKey(String address) { |
| 7941 | return BLUETOOTH_SAP_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT); |
| 7942 | } |
| 7943 | |
Kim Schulz | 0d37605 | 2013-08-22 11:18:02 +0200 | [diff] [blame] | 7944 | /** |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 7945 | * Scaling factor for normal window animations. Setting to 0 will |
| 7946 | * disable window animations. |
| 7947 | */ |
| 7948 | public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale"; |
| 7949 | |
| 7950 | /** |
| 7951 | * Scaling factor for activity transition animations. Setting to 0 will |
| 7952 | * disable window animations. |
| 7953 | */ |
| 7954 | public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; |
| 7955 | |
| 7956 | /** |
| 7957 | * Scaling factor for Animator-based animations. This affects both the |
| 7958 | * start delay and duration of all such animations. Setting to 0 will |
| 7959 | * cause animations to end immediately. The default value is 1. |
| 7960 | */ |
| 7961 | public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; |
| 7962 | |
| 7963 | /** |
| 7964 | * Scaling factor for normal window animations. Setting to 0 will |
| 7965 | * disable window animations. |
| 7966 | * |
| 7967 | * @hide |
| 7968 | */ |
| 7969 | public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations"; |
| 7970 | |
| 7971 | /** |
| 7972 | * If 0, the compatibility mode is off for all applications. |
| 7973 | * If 1, older applications run under compatibility mode. |
| 7974 | * TODO: remove this settings before code freeze (bug/1907571) |
| 7975 | * @hide |
| 7976 | */ |
| 7977 | public static final String COMPATIBILITY_MODE = "compatibility_mode"; |
| 7978 | |
| 7979 | /** |
| 7980 | * CDMA only settings |
| 7981 | * Emergency Tone 0 = Off |
| 7982 | * 1 = Alert |
| 7983 | * 2 = Vibrate |
| 7984 | * @hide |
| 7985 | */ |
| 7986 | public static final String EMERGENCY_TONE = "emergency_tone"; |
| 7987 | |
| 7988 | /** |
| 7989 | * CDMA only settings |
| 7990 | * Whether the auto retry is enabled. The value is |
| 7991 | * boolean (1 or 0). |
| 7992 | * @hide |
| 7993 | */ |
| 7994 | public static final String CALL_AUTO_RETRY = "call_auto_retry"; |
| 7995 | |
| 7996 | /** |
Sungmin Choi | e099ab1 | 2014-06-09 14:45:51 +0900 | [diff] [blame] | 7997 | * See RIL_PreferredNetworkType in ril.h |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 7998 | * @hide |
| 7999 | */ |
| 8000 | public static final String PREFERRED_NETWORK_MODE = |
| 8001 | "preferred_network_mode"; |
| 8002 | |
| 8003 | /** |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 8004 | * Name of an application package to be debugged. |
| 8005 | */ |
| 8006 | public static final String DEBUG_APP = "debug_app"; |
| 8007 | |
| 8008 | /** |
| 8009 | * If 1, when launching DEBUG_APP it will wait for the debugger before |
| 8010 | * starting user code. If 0, it will run normally. |
| 8011 | */ |
| 8012 | public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger"; |
| 8013 | |
| 8014 | /** |
| 8015 | * Control whether the process CPU usage meter should be shown. |
| 8016 | */ |
| 8017 | public static final String SHOW_PROCESSES = "show_processes"; |
| 8018 | |
| 8019 | /** |
Ruchi Kandoi | 62b8a49 | 2014-04-17 18:01:40 -0700 | [diff] [blame] | 8020 | * If 1 low power mode is enabled. |
| 8021 | * @hide |
| 8022 | */ |
| 8023 | public static final String LOW_POWER_MODE = "low_power"; |
| 8024 | |
John Spurlock | f8f524c | 2014-06-10 14:47:29 -0400 | [diff] [blame] | 8025 | /** |
| 8026 | * Battery level [1-99] at which low power mode automatically turns on. |
Dianne Hackborn | 1427230 | 2014-06-10 23:13:02 -0700 | [diff] [blame] | 8027 | * If 0, it will not automatically turn on. |
John Spurlock | f8f524c | 2014-06-10 14:47:29 -0400 | [diff] [blame] | 8028 | * @hide |
| 8029 | */ |
| 8030 | public static final String LOW_POWER_MODE_TRIGGER_LEVEL = "low_power_trigger_level"; |
| 8031 | |
Ruchi Kandoi | 62b8a49 | 2014-04-17 18:01:40 -0700 | [diff] [blame] | 8032 | /** |
Dianne Hackborn | b2117d1 | 2016-02-16 18:26:35 -0800 | [diff] [blame] | 8033 | * If not 0, the activity manager will aggressively finish activities and |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 8034 | * processes as soon as they are no longer needed. If 0, the normal |
| 8035 | * extended lifetime is used. |
| 8036 | */ |
Dianne Hackborn | 89ad456 | 2014-08-24 16:45:38 -0700 | [diff] [blame] | 8037 | public static final String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; |
Jeff Sharkey | 6e2bee7 | 2012-10-01 13:39:08 -0700 | [diff] [blame] | 8038 | |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 8039 | /** |
Dianne Hackborn | b2117d1 | 2016-02-16 18:26:35 -0800 | [diff] [blame] | 8040 | * @hide |
| 8041 | * If not 0, the activity manager will implement a looser version of background |
| 8042 | * check that is more compatible with existing apps. |
| 8043 | */ |
| 8044 | public static final String LENIENT_BACKGROUND_CHECK = "lenient_background_check"; |
| 8045 | |
| 8046 | /** |
Eric Laurent | 7ee1e4f | 2012-10-26 18:11:21 -0700 | [diff] [blame] | 8047 | * Use Dock audio output for media: |
| 8048 | * 0 = disabled |
| 8049 | * 1 = enabled |
| 8050 | * @hide |
| 8051 | */ |
| 8052 | public static final String DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled"; |
| 8053 | |
| 8054 | /** |
Phil Burk | deaa8d9 | 2016-02-23 17:12:04 -0800 | [diff] [blame] | 8055 | * The surround sound formats AC3, DTS or IEC61937 are |
| 8056 | * available for use if they are detected. |
| 8057 | * This is the default mode. |
| 8058 | * |
| 8059 | * Note that AUTO is equivalent to ALWAYS for Android TVs and other |
| 8060 | * devices that have an S/PDIF output. This is because S/PDIF |
| 8061 | * is unidirectional and the TV cannot know if a decoder is |
| 8062 | * connected. So it assumes they are always available. |
| 8063 | * @hide |
| 8064 | */ |
| 8065 | public static final int ENCODED_SURROUND_OUTPUT_AUTO = 0; |
| 8066 | |
| 8067 | /** |
| 8068 | * AC3, DTS or IEC61937 are NEVER available, even if they |
| 8069 | * are detected by the hardware. Those formats will not be |
| 8070 | * reported. |
| 8071 | * |
| 8072 | * An example use case would be an AVR reports that it is capable of |
| 8073 | * surround sound decoding but is broken. If NEVER is chosen |
| 8074 | * then apps must use PCM output instead of encoded output. |
| 8075 | * @hide |
| 8076 | */ |
| 8077 | public static final int ENCODED_SURROUND_OUTPUT_NEVER = 1; |
| 8078 | |
| 8079 | /** |
| 8080 | * AC3, DTS or IEC61937 are ALWAYS available, even if they |
| 8081 | * are not detected by the hardware. Those formats will be |
| 8082 | * reported as part of the HDMI output capability. Applications |
| 8083 | * are then free to use either PCM or encoded output. |
| 8084 | * |
| 8085 | * An example use case would be a when TV was connected over |
| 8086 | * TOS-link to an AVR. But the TV could not see it because TOS-link |
| 8087 | * is unidirectional. |
| 8088 | * @hide |
| 8089 | */ |
| 8090 | public static final int ENCODED_SURROUND_OUTPUT_ALWAYS = 2; |
| 8091 | |
| 8092 | /** |
| 8093 | * Set to ENCODED_SURROUND_OUTPUT_AUTO, |
| 8094 | * ENCODED_SURROUND_OUTPUT_NEVER or |
| 8095 | * ENCODED_SURROUND_OUTPUT_ALWAYS |
| 8096 | * @hide |
| 8097 | */ |
| 8098 | public static final String ENCODED_SURROUND_OUTPUT = "encoded_surround_output"; |
| 8099 | |
| 8100 | /** |
Eric Laurent | 05274f3 | 2012-11-29 12:48:18 -0800 | [diff] [blame] | 8101 | * Persisted safe headphone volume management state by AudioService |
| 8102 | * @hide |
| 8103 | */ |
| 8104 | public static final String AUDIO_SAFE_VOLUME_STATE = "audio_safe_volume_state"; |
| 8105 | |
| 8106 | /** |
Geremy Condra | a073511 | 2013-03-26 21:49:26 -0700 | [diff] [blame] | 8107 | * URL for tzinfo (time zone) updates |
| 8108 | * @hide |
| 8109 | */ |
| 8110 | public static final String TZINFO_UPDATE_CONTENT_URL = "tzinfo_content_url"; |
| 8111 | |
| 8112 | /** |
| 8113 | * URL for tzinfo (time zone) update metadata |
| 8114 | * @hide |
| 8115 | */ |
| 8116 | public static final String TZINFO_UPDATE_METADATA_URL = "tzinfo_metadata_url"; |
| 8117 | |
| 8118 | /** |
| 8119 | * URL for selinux (mandatory access control) updates |
| 8120 | * @hide |
| 8121 | */ |
| 8122 | public static final String SELINUX_UPDATE_CONTENT_URL = "selinux_content_url"; |
| 8123 | |
| 8124 | /** |
| 8125 | * URL for selinux (mandatory access control) update metadata |
| 8126 | * @hide |
| 8127 | */ |
| 8128 | public static final String SELINUX_UPDATE_METADATA_URL = "selinux_metadata_url"; |
| 8129 | |
| 8130 | /** |
| 8131 | * URL for sms short code updates |
| 8132 | * @hide |
| 8133 | */ |
| 8134 | public static final String SMS_SHORT_CODES_UPDATE_CONTENT_URL = |
| 8135 | "sms_short_codes_content_url"; |
| 8136 | |
| 8137 | /** |
| 8138 | * URL for sms short code update metadata |
| 8139 | * @hide |
| 8140 | */ |
| 8141 | public static final String SMS_SHORT_CODES_UPDATE_METADATA_URL = |
| 8142 | "sms_short_codes_metadata_url"; |
| 8143 | |
| 8144 | /** |
Amit Mahajan | 9069fab | 2015-05-01 11:05:47 -0700 | [diff] [blame] | 8145 | * URL for apn_db updates |
| 8146 | * @hide |
| 8147 | */ |
| 8148 | public static final String APN_DB_UPDATE_CONTENT_URL = "apn_db_content_url"; |
| 8149 | |
| 8150 | /** |
| 8151 | * URL for apn_db update metadata |
| 8152 | * @hide |
| 8153 | */ |
| 8154 | public static final String APN_DB_UPDATE_METADATA_URL = "apn_db_metadata_url"; |
| 8155 | |
| 8156 | /** |
Geremy Condra | a073511 | 2013-03-26 21:49:26 -0700 | [diff] [blame] | 8157 | * URL for cert pinlist updates |
| 8158 | * @hide |
| 8159 | */ |
| 8160 | public static final String CERT_PIN_UPDATE_CONTENT_URL = "cert_pin_content_url"; |
| 8161 | |
| 8162 | /** |
| 8163 | * URL for cert pinlist updates |
| 8164 | * @hide |
| 8165 | */ |
| 8166 | public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url"; |
| 8167 | |
Geremy Condra | 757ee52 | 2013-03-29 16:39:45 -0700 | [diff] [blame] | 8168 | /** |
Ben Gruver | 633dc9b | 2013-04-04 12:05:49 -0700 | [diff] [blame] | 8169 | * URL for intent firewall updates |
| 8170 | * @hide |
| 8171 | */ |
| 8172 | public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL = |
| 8173 | "intent_firewall_content_url"; |
| 8174 | |
| 8175 | /** |
| 8176 | * URL for intent firewall update metadata |
| 8177 | * @hide |
| 8178 | */ |
| 8179 | public static final String INTENT_FIREWALL_UPDATE_METADATA_URL = |
| 8180 | "intent_firewall_metadata_url"; |
| 8181 | |
| 8182 | /** |
Geremy Condra | 4e7f7e8 | 2013-03-26 21:09:01 -0700 | [diff] [blame] | 8183 | * SELinux enforcement status. If 0, permissive; if 1, enforcing. |
| 8184 | * @hide |
| 8185 | */ |
| 8186 | public static final String SELINUX_STATUS = "selinux_status"; |
| 8187 | |
Geremy Condra | a073511 | 2013-03-26 21:49:26 -0700 | [diff] [blame] | 8188 | /** |
Amith Yamasani | d8415f4 | 2013-08-07 20:15:10 -0700 | [diff] [blame] | 8189 | * Developer setting to force RTL layout. |
| 8190 | * @hide |
| 8191 | */ |
| 8192 | public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl"; |
| 8193 | |
| 8194 | /** |
Daniel Sandler | dea6462 | 2013-09-23 16:05:57 -0400 | [diff] [blame] | 8195 | * Milliseconds after screen-off after which low battery sounds will be silenced. |
| 8196 | * |
| 8197 | * If zero, battery sounds will always play. |
| 8198 | * Defaults to @integer/def_low_battery_sound_timeout in SettingsProvider. |
| 8199 | * |
| 8200 | * @hide |
| 8201 | */ |
| 8202 | public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout"; |
| 8203 | |
| 8204 | /** |
Evan Charlton | cc7b043 | 2014-01-14 14:47:11 -0800 | [diff] [blame] | 8205 | * Milliseconds to wait before bouncing Wi-Fi after settings is restored. Note that after |
Dianne Hackborn | a3fb40d | 2014-08-12 15:06:50 -0700 | [diff] [blame] | 8206 | * the caller is done with this, they should call {@link ContentResolver#delete} to |
Evan Charlton | cc7b043 | 2014-01-14 14:47:11 -0800 | [diff] [blame] | 8207 | * clean up any value that they may have written. |
| 8208 | * |
| 8209 | * @hide |
| 8210 | */ |
| 8211 | public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms"; |
| 8212 | |
John Spurlock | c6d1c60 | 2014-01-17 15:22:06 -0500 | [diff] [blame] | 8213 | /** |
| 8214 | * Defines global runtime overrides to window policy. |
| 8215 | * |
Jorim Jaggi | b10e33f | 2015-02-04 21:57:40 +0100 | [diff] [blame] | 8216 | * See {@link com.android.server.policy.PolicyControl} for value format. |
John Spurlock | c6d1c60 | 2014-01-17 15:22:06 -0500 | [diff] [blame] | 8217 | * |
| 8218 | * @hide |
| 8219 | */ |
| 8220 | public static final String POLICY_CONTROL = "policy_control"; |
Evan Charlton | cc7b043 | 2014-01-14 14:47:11 -0800 | [diff] [blame] | 8221 | |
| 8222 | /** |
John Spurlock | ae641c9 | 2014-06-30 18:11:40 -0400 | [diff] [blame] | 8223 | * Defines global zen mode. ZEN_MODE_OFF, ZEN_MODE_IMPORTANT_INTERRUPTIONS, |
| 8224 | * or ZEN_MODE_NO_INTERRUPTIONS. |
John Spurlock | e677d71 | 2014-02-13 12:52:19 -0500 | [diff] [blame] | 8225 | * |
| 8226 | * @hide |
| 8227 | */ |
| 8228 | public static final String ZEN_MODE = "zen_mode"; |
| 8229 | |
| 8230 | /** @hide */ public static final int ZEN_MODE_OFF = 0; |
John Spurlock | ae641c9 | 2014-06-30 18:11:40 -0400 | [diff] [blame] | 8231 | /** @hide */ public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; |
| 8232 | /** @hide */ public static final int ZEN_MODE_NO_INTERRUPTIONS = 2; |
John Spurlock | 4f1163c | 2015-04-02 17:41:21 -0400 | [diff] [blame] | 8233 | /** @hide */ public static final int ZEN_MODE_ALARMS = 3; |
John Spurlock | e677d71 | 2014-02-13 12:52:19 -0500 | [diff] [blame] | 8234 | |
| 8235 | /** @hide */ public static String zenModeToString(int mode) { |
John Spurlock | ae641c9 | 2014-06-30 18:11:40 -0400 | [diff] [blame] | 8236 | if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS"; |
John Spurlock | 4f1163c | 2015-04-02 17:41:21 -0400 | [diff] [blame] | 8237 | if (mode == ZEN_MODE_ALARMS) return "ZEN_MODE_ALARMS"; |
John Spurlock | ae641c9 | 2014-06-30 18:11:40 -0400 | [diff] [blame] | 8238 | if (mode == ZEN_MODE_NO_INTERRUPTIONS) return "ZEN_MODE_NO_INTERRUPTIONS"; |
| 8239 | return "ZEN_MODE_OFF"; |
John Spurlock | e677d71 | 2014-02-13 12:52:19 -0500 | [diff] [blame] | 8240 | } |
| 8241 | |
John Spurlock | b2278d6 | 2015-04-07 12:47:12 -0400 | [diff] [blame] | 8242 | /** @hide */ public static boolean isValidZenMode(int value) { |
| 8243 | switch (value) { |
| 8244 | case Global.ZEN_MODE_OFF: |
| 8245 | case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS: |
| 8246 | case Global.ZEN_MODE_ALARMS: |
| 8247 | case Global.ZEN_MODE_NO_INTERRUPTIONS: |
| 8248 | return true; |
| 8249 | default: |
| 8250 | return false; |
| 8251 | } |
| 8252 | } |
| 8253 | |
John Spurlock | e677d71 | 2014-02-13 12:52:19 -0500 | [diff] [blame] | 8254 | /** |
Julia Reynolds | 9b11fdb | 2015-07-31 09:49:55 -0400 | [diff] [blame] | 8255 | * Value of the ringer before entering zen mode. |
| 8256 | * |
| 8257 | * @hide |
| 8258 | */ |
| 8259 | public static final String ZEN_MODE_RINGER_LEVEL = "zen_mode_ringer_level"; |
| 8260 | |
| 8261 | /** |
John Spurlock | 056c519 | 2014-04-20 21:52:01 -0400 | [diff] [blame] | 8262 | * Opaque value, changes when persisted zen mode configuration changes. |
| 8263 | * |
| 8264 | * @hide |
| 8265 | */ |
| 8266 | public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag"; |
| 8267 | |
| 8268 | /** |
Chris Wren | 7bd24123 | 2014-02-28 16:25:05 -0500 | [diff] [blame] | 8269 | * Defines global heads up toggle. One of HEADS_UP_OFF, HEADS_UP_ON. |
| 8270 | * |
| 8271 | * @hide |
| 8272 | */ |
Chris Wren | 10d82df | 2014-03-01 10:34:51 -0500 | [diff] [blame] | 8273 | public static final String HEADS_UP_NOTIFICATIONS_ENABLED = |
| 8274 | "heads_up_notifications_enabled"; |
Chris Wren | 7bd24123 | 2014-02-28 16:25:05 -0500 | [diff] [blame] | 8275 | |
| 8276 | /** @hide */ public static final int HEADS_UP_OFF = 0; |
| 8277 | /** @hide */ public static final int HEADS_UP_ON = 1; |
| 8278 | |
| 8279 | /** |
Jerome Poichet | 147b4d7 | 2014-05-12 18:13:27 -0700 | [diff] [blame] | 8280 | * The name of the device |
| 8281 | * |
| 8282 | * @hide |
| 8283 | */ |
| 8284 | public static final String DEVICE_NAME = "device_name"; |
| 8285 | |
| 8286 | /** |
Jeff Davidson | 56f9f73 | 2014-08-14 16:47:23 -0700 | [diff] [blame] | 8287 | * Whether the NetworkScoringService has been first initialized. |
| 8288 | * <p> |
| 8289 | * Type: int (0 for false, 1 for true) |
| 8290 | * @hide |
| 8291 | */ |
| 8292 | public static final String NETWORK_SCORING_PROVISIONED = "network_scoring_provisioned"; |
| 8293 | |
| 8294 | /** |
Jim Miller | 6848dc8 | 2014-10-13 18:51:53 -0700 | [diff] [blame] | 8295 | * Whether the user wants to be prompted for password to decrypt the device on boot. |
| 8296 | * This only matters if the storage is encrypted. |
| 8297 | * <p> |
| 8298 | * Type: int (0 for false, 1 for true) |
| 8299 | * @hide |
| 8300 | */ |
| 8301 | public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt"; |
| 8302 | |
| 8303 | /** |
Etan Cohen | 93bbf27 | 2015-05-04 18:01:47 -0700 | [diff] [blame] | 8304 | * Whether the Volte is enabled |
Libin.Tang@motorola.com | 0499bb5 | 2014-10-10 14:55:57 -0500 | [diff] [blame] | 8305 | * <p> |
| 8306 | * Type: int (0 for false, 1 for true) |
| 8307 | * @hide |
| 8308 | */ |
Etan Cohen | e41a9cf | 2014-10-22 10:50:46 -0700 | [diff] [blame] | 8309 | public static final String ENHANCED_4G_MODE_ENABLED = "volte_vt_enabled"; |
Libin.Tang@motorola.com | 0499bb5 | 2014-10-10 14:55:57 -0500 | [diff] [blame] | 8310 | |
| 8311 | /** |
Etan Cohen | 93bbf27 | 2015-05-04 18:01:47 -0700 | [diff] [blame] | 8312 | * Whether VT (Video Telephony over IMS) is enabled |
| 8313 | * <p> |
| 8314 | * Type: int (0 for false, 1 for true) |
| 8315 | * |
| 8316 | * @hide |
| 8317 | */ |
| 8318 | public static final String VT_IMS_ENABLED = "vt_ims_enabled"; |
| 8319 | |
| 8320 | /** |
Etan Cohen | 9c8f21b | 2014-12-23 15:02:19 -0800 | [diff] [blame] | 8321 | * Whether WFC is enabled |
| 8322 | * <p> |
| 8323 | * Type: int (0 for false, 1 for true) |
| 8324 | * |
| 8325 | * @hide |
| 8326 | */ |
| 8327 | public static final String WFC_IMS_ENABLED = "wfc_ims_enabled"; |
| 8328 | |
| 8329 | /** |
| 8330 | * WFC Mode. |
| 8331 | * <p> |
| 8332 | * Type: int - 2=Wi-Fi preferred, 1=Cellular preferred, 0=Wi-Fi only |
| 8333 | * |
| 8334 | * @hide |
| 8335 | */ |
| 8336 | public static final String WFC_IMS_MODE = "wfc_ims_mode"; |
| 8337 | |
| 8338 | /** |
| 8339 | * Whether WFC roaming is enabled |
| 8340 | * <p> |
| 8341 | * Type: int (0 for false, 1 for true) |
| 8342 | * |
| 8343 | * @hide |
| 8344 | */ |
| 8345 | public static final String WFC_IMS_ROAMING_ENABLED = "wfc_ims_roaming_enabled"; |
| 8346 | |
| 8347 | /** |
Amit Mahajan | 4fea092 | 2014-11-18 12:56:28 -0800 | [diff] [blame] | 8348 | * Whether user can enable/disable LTE as a preferred network. A carrier might control |
| 8349 | * this via gservices, OMA-DM, carrier app, etc. |
| 8350 | * <p> |
| 8351 | * Type: int (0 for false, 1 for true) |
| 8352 | * @hide |
| 8353 | */ |
| 8354 | public static final String LTE_SERVICE_FORCED = "lte_service_forced"; |
| 8355 | |
| 8356 | /** |
Svet Ganov | 2acf063 | 2015-11-24 19:10:59 -0800 | [diff] [blame] | 8357 | * Ephemeral app cookie max size in bytes. |
| 8358 | * <p> |
| 8359 | * Type: int |
| 8360 | * @hide |
| 8361 | */ |
| 8362 | public static final String EPHEMERAL_COOKIE_MAX_SIZE_BYTES = |
| 8363 | "ephemeral_cookie_max_size_bytes"; |
| 8364 | |
| 8365 | /** |
| 8366 | * The duration for caching uninstalled ephemeral apps. |
| 8367 | * <p> |
| 8368 | * Type: long |
| 8369 | * @hide |
| 8370 | */ |
| 8371 | public static final String UNINSTALLED_EPHEMERAL_APP_CACHE_DURATION_MILLIS = |
| 8372 | "uninstalled_ephemeral_app_cache_duration_millis"; |
| 8373 | |
| 8374 | /** |
Fyodor Kupolov | 07140f7 | 2016-02-17 10:46:11 -0800 | [diff] [blame] | 8375 | * Allows switching users when system user is locked. |
| 8376 | * <p> |
| 8377 | * Type: int |
| 8378 | * @hide |
| 8379 | */ |
| 8380 | public static final String ALLOW_USER_SWITCHING_WHEN_SYSTEM_USER_LOCKED = |
| 8381 | "allow_user_switching_when_system_user_locked"; |
| 8382 | |
| 8383 | /** |
Daichi Hirono | 82ab980 | 2016-03-02 13:23:29 +0900 | [diff] [blame] | 8384 | * Boot count since the device starts running APK level 24. |
| 8385 | * <p> |
| 8386 | * Type: int |
| 8387 | */ |
| 8388 | public static final String BOOT_COUNT = "boot_count"; |
| 8389 | |
| 8390 | /** |
Lenka Trochtova | 6474f0e | 2016-03-24 16:43:10 +0100 | [diff] [blame] | 8391 | * Whether the safe boot is disallowed. |
| 8392 | * |
| 8393 | * <p>This setting should have the identical value as the corresponding user restriction. |
| 8394 | * The purpose of the setting is to make the restriction available in early boot stages |
| 8395 | * before the user restrictions are loaded. |
| 8396 | * @hide |
| 8397 | */ |
| 8398 | public static final String SAFE_BOOT_DISALLOWED = "safe_boot_disallowed"; |
| 8399 | |
| 8400 | /** |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 8401 | * Settings to backup. This is here so that it's in the same place as the settings |
| 8402 | * keys and easy to update. |
| 8403 | * |
| 8404 | * These keys may be mentioned in the SETTINGS_TO_BACKUP arrays in System |
| 8405 | * and Secure as well. This is because those tables drive both backup and |
| 8406 | * restore, and restore needs to properly whitelist keys that used to live |
| 8407 | * in those namespaces. The keys will only actually be backed up / restored |
| 8408 | * if they are also mentioned in this table (Global.SETTINGS_TO_BACKUP). |
| 8409 | * |
| 8410 | * NOTE: Settings are backed up and restored in the order they appear |
| 8411 | * in this array. If you have one setting depending on another, |
| 8412 | * make sure that they are ordered appropriately. |
| 8413 | * |
| 8414 | * @hide |
| 8415 | */ |
| 8416 | public static final String[] SETTINGS_TO_BACKUP = { |
Christopher Tate | 58f41ec | 2013-01-11 15:40:36 -0800 | [diff] [blame] | 8417 | BUGREPORT_IN_POWER_MENU, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 8418 | STAY_ON_WHILE_PLUGGED_IN, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 8419 | AUTO_TIME, |
| 8420 | AUTO_TIME_ZONE, |
| 8421 | POWER_SOUNDS_ENABLED, |
| 8422 | DOCK_SOUNDS_ENABLED, |
Ritesh Reddy | f8f1213 | 2015-11-20 16:43:28 +0000 | [diff] [blame] | 8423 | CHARGING_SOUNDS_ENABLED, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 8424 | USB_MASS_STORAGE_ENABLED, |
| 8425 | ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED, |
| 8426 | WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, |
| 8427 | WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, |
Christopher Tate | 16eb7cd | 2012-10-09 15:26:30 -0700 | [diff] [blame] | 8428 | WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 8429 | WIFI_NUM_OPEN_NETWORKS_KEPT, |
| 8430 | EMERGENCY_TONE, |
| 8431 | CALL_AUTO_RETRY, |
Amith Yamasani | 9400524 | 2014-10-31 11:35:13 -0700 | [diff] [blame] | 8432 | DOCK_AUDIO_MEDIA_ENABLED, |
Phil Burk | deaa8d9 | 2016-02-23 17:12:04 -0800 | [diff] [blame] | 8433 | ENCODED_SURROUND_OUTPUT, |
Amith Yamasani | 9400524 | 2014-10-31 11:35:13 -0700 | [diff] [blame] | 8434 | LOW_POWER_MODE_TRIGGER_LEVEL |
Christopher Tate | 66488d6 | 2012-10-02 11:58:01 -0700 | [diff] [blame] | 8435 | }; |
| 8436 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 8437 | // Populated lazily, guarded by class object: |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 8438 | private static NameValueCache sNameValueCache = new NameValueCache( |
| 8439 | SYS_PROP_SETTING_VERSION, |
| 8440 | CONTENT_URI, |
| 8441 | CALL_METHOD_GET_GLOBAL, |
| 8442 | CALL_METHOD_PUT_GLOBAL); |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 8443 | |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 8444 | // Certain settings have been moved from global to the per-user secure namespace |
| 8445 | private static final HashSet<String> MOVED_TO_SECURE; |
| 8446 | static { |
| 8447 | MOVED_TO_SECURE = new HashSet<String>(1); |
| 8448 | MOVED_TO_SECURE.add(Settings.Global.INSTALL_NON_MARKET_APPS); |
| 8449 | } |
| 8450 | |
Svetoslav | 683914b | 2015-01-15 14:22:26 -0800 | [diff] [blame] | 8451 | /** @hide */ |
| 8452 | public static void getMovedToSecureSettings(Set<String> outKeySet) { |
| 8453 | outKeySet.addAll(MOVED_TO_SECURE); |
| 8454 | } |
| 8455 | |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 8456 | /** |
| 8457 | * Look up a name in the database. |
| 8458 | * @param resolver to access the database with |
| 8459 | * @param name to look up in the table |
| 8460 | * @return the corresponding value, or null if not present |
| 8461 | */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 8462 | public static String getString(ContentResolver resolver, String name) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 8463 | return getStringForUser(resolver, name, UserHandle.myUserId()); |
| 8464 | } |
| 8465 | |
| 8466 | /** @hide */ |
Dianne Hackborn | 139748f | 2012-09-24 11:36:57 -0700 | [diff] [blame] | 8467 | public static String getStringForUser(ContentResolver resolver, String name, |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 8468 | int userHandle) { |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 8469 | if (MOVED_TO_SECURE.contains(name)) { |
| 8470 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" |
| 8471 | + " to android.provider.Settings.Secure, returning read-only value."); |
| 8472 | return Secure.getStringForUser(resolver, name, userHandle); |
| 8473 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 8474 | return sNameValueCache.getStringForUser(resolver, name, userHandle); |
| 8475 | } |
| 8476 | |
| 8477 | /** |
| 8478 | * Store a name/value pair into the database. |
| 8479 | * @param resolver to access the database with |
| 8480 | * @param name to store |
| 8481 | * @param value to associate with the name |
| 8482 | * @return true if the value was set, false on database errors |
| 8483 | */ |
| 8484 | public static boolean putString(ContentResolver resolver, |
| 8485 | String name, String value) { |
| 8486 | return putStringForUser(resolver, name, value, UserHandle.myUserId()); |
| 8487 | } |
| 8488 | |
| 8489 | /** @hide */ |
| 8490 | public static boolean putStringForUser(ContentResolver resolver, |
| 8491 | String name, String value, int userHandle) { |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 8492 | if (LOCAL_LOGV) { |
| 8493 | Log.v(TAG, "Global.putString(name=" + name + ", value=" + value |
| 8494 | + " for " + userHandle); |
| 8495 | } |
Christopher Tate | aa036a2 | 2014-05-19 16:33:27 -0700 | [diff] [blame] | 8496 | // Global and Secure have the same access policy so we can forward writes |
| 8497 | if (MOVED_TO_SECURE.contains(name)) { |
| 8498 | Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global" |
| 8499 | + " to android.provider.Settings.Secure, value is unchanged."); |
| 8500 | return Secure.putStringForUser(resolver, name, value, userHandle); |
| 8501 | } |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 8502 | return sNameValueCache.putStringForUser(resolver, name, value, userHandle); |
| 8503 | } |
| 8504 | |
| 8505 | /** |
| 8506 | * Construct the content URI for a particular name/value pair, |
| 8507 | * useful for monitoring changes with a ContentObserver. |
| 8508 | * @param name to look up in the table |
| 8509 | * @return the corresponding content URI, or null if not present |
| 8510 | */ |
| 8511 | public static Uri getUriFor(String name) { |
| 8512 | return getUriFor(CONTENT_URI, name); |
| 8513 | } |
| 8514 | |
| 8515 | /** |
| 8516 | * Convenience function for retrieving a single secure settings value |
| 8517 | * as an integer. Note that internally setting values are always |
| 8518 | * stored as strings; this function converts the string to an integer |
| 8519 | * for you. The default value will be returned if the setting is |
| 8520 | * not defined or not an integer. |
| 8521 | * |
| 8522 | * @param cr The ContentResolver to access. |
| 8523 | * @param name The name of the setting to retrieve. |
| 8524 | * @param def Value to return if the setting is not defined. |
| 8525 | * |
| 8526 | * @return The setting's current value, or 'def' if it is not defined |
| 8527 | * or not a valid integer. |
| 8528 | */ |
| 8529 | public static int getInt(ContentResolver cr, String name, int def) { |
| 8530 | String v = getString(cr, name); |
| 8531 | try { |
| 8532 | return v != null ? Integer.parseInt(v) : def; |
| 8533 | } catch (NumberFormatException e) { |
| 8534 | return def; |
| 8535 | } |
| 8536 | } |
| 8537 | |
| 8538 | /** |
| 8539 | * Convenience function for retrieving a single secure settings value |
| 8540 | * as an integer. Note that internally setting values are always |
| 8541 | * stored as strings; this function converts the string to an integer |
| 8542 | * for you. |
| 8543 | * <p> |
| 8544 | * This version does not take a default value. If the setting has not |
| 8545 | * been set, or the string value is not a number, |
| 8546 | * it throws {@link SettingNotFoundException}. |
| 8547 | * |
| 8548 | * @param cr The ContentResolver to access. |
| 8549 | * @param name The name of the setting to retrieve. |
| 8550 | * |
| 8551 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 8552 | * name can't be found or the setting value is not an integer. |
| 8553 | * |
| 8554 | * @return The setting's current value. |
| 8555 | */ |
| 8556 | public static int getInt(ContentResolver cr, String name) |
| 8557 | throws SettingNotFoundException { |
| 8558 | String v = getString(cr, name); |
| 8559 | try { |
| 8560 | return Integer.parseInt(v); |
| 8561 | } catch (NumberFormatException e) { |
| 8562 | throw new SettingNotFoundException(name); |
| 8563 | } |
| 8564 | } |
| 8565 | |
| 8566 | /** |
| 8567 | * Convenience function for updating a single settings value as an |
| 8568 | * integer. This will either create a new entry in the table if the |
| 8569 | * given name does not exist, or modify the value of the existing row |
| 8570 | * with that name. Note that internally setting values are always |
| 8571 | * stored as strings, so this function converts the given value to a |
| 8572 | * string before storing it. |
| 8573 | * |
| 8574 | * @param cr The ContentResolver to access. |
| 8575 | * @param name The name of the setting to modify. |
| 8576 | * @param value The new value for the setting. |
| 8577 | * @return true if the value was set, false on database errors |
| 8578 | */ |
| 8579 | public static boolean putInt(ContentResolver cr, String name, int value) { |
| 8580 | return putString(cr, name, Integer.toString(value)); |
| 8581 | } |
| 8582 | |
| 8583 | /** |
| 8584 | * Convenience function for retrieving a single secure settings value |
| 8585 | * as a {@code long}. Note that internally setting values are always |
| 8586 | * stored as strings; this function converts the string to a {@code long} |
| 8587 | * for you. The default value will be returned if the setting is |
| 8588 | * not defined or not a {@code long}. |
| 8589 | * |
| 8590 | * @param cr The ContentResolver to access. |
| 8591 | * @param name The name of the setting to retrieve. |
| 8592 | * @param def Value to return if the setting is not defined. |
| 8593 | * |
| 8594 | * @return The setting's current value, or 'def' if it is not defined |
| 8595 | * or not a valid {@code long}. |
| 8596 | */ |
| 8597 | public static long getLong(ContentResolver cr, String name, long def) { |
| 8598 | String valString = getString(cr, name); |
| 8599 | long value; |
| 8600 | try { |
| 8601 | value = valString != null ? Long.parseLong(valString) : def; |
| 8602 | } catch (NumberFormatException e) { |
| 8603 | value = def; |
| 8604 | } |
| 8605 | return value; |
| 8606 | } |
| 8607 | |
| 8608 | /** |
| 8609 | * Convenience function for retrieving a single secure settings value |
| 8610 | * as a {@code long}. Note that internally setting values are always |
| 8611 | * stored as strings; this function converts the string to a {@code long} |
| 8612 | * for you. |
| 8613 | * <p> |
| 8614 | * This version does not take a default value. If the setting has not |
| 8615 | * been set, or the string value is not a number, |
| 8616 | * it throws {@link SettingNotFoundException}. |
| 8617 | * |
| 8618 | * @param cr The ContentResolver to access. |
| 8619 | * @param name The name of the setting to retrieve. |
| 8620 | * |
| 8621 | * @return The setting's current value. |
| 8622 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 8623 | * name can't be found or the setting value is not an integer. |
| 8624 | */ |
| 8625 | public static long getLong(ContentResolver cr, String name) |
| 8626 | throws SettingNotFoundException { |
| 8627 | String valString = getString(cr, name); |
| 8628 | try { |
| 8629 | return Long.parseLong(valString); |
| 8630 | } catch (NumberFormatException e) { |
| 8631 | throw new SettingNotFoundException(name); |
| 8632 | } |
| 8633 | } |
| 8634 | |
| 8635 | /** |
| 8636 | * Convenience function for updating a secure settings value as a long |
| 8637 | * integer. This will either create a new entry in the table if the |
| 8638 | * given name does not exist, or modify the value of the existing row |
| 8639 | * with that name. Note that internally setting values are always |
| 8640 | * stored as strings, so this function converts the given value to a |
| 8641 | * string before storing it. |
| 8642 | * |
| 8643 | * @param cr The ContentResolver to access. |
| 8644 | * @param name The name of the setting to modify. |
| 8645 | * @param value The new value for the setting. |
| 8646 | * @return true if the value was set, false on database errors |
| 8647 | */ |
| 8648 | public static boolean putLong(ContentResolver cr, String name, long value) { |
| 8649 | return putString(cr, name, Long.toString(value)); |
| 8650 | } |
| 8651 | |
| 8652 | /** |
| 8653 | * Convenience function for retrieving a single secure settings value |
| 8654 | * as a floating point number. Note that internally setting values are |
| 8655 | * always stored as strings; this function converts the string to an |
| 8656 | * float for you. The default value will be returned if the setting |
| 8657 | * is not defined or not a valid float. |
| 8658 | * |
| 8659 | * @param cr The ContentResolver to access. |
| 8660 | * @param name The name of the setting to retrieve. |
| 8661 | * @param def Value to return if the setting is not defined. |
| 8662 | * |
| 8663 | * @return The setting's current value, or 'def' if it is not defined |
| 8664 | * or not a valid float. |
| 8665 | */ |
| 8666 | public static float getFloat(ContentResolver cr, String name, float def) { |
| 8667 | String v = getString(cr, name); |
| 8668 | try { |
| 8669 | return v != null ? Float.parseFloat(v) : def; |
| 8670 | } catch (NumberFormatException e) { |
| 8671 | return def; |
| 8672 | } |
| 8673 | } |
| 8674 | |
| 8675 | /** |
| 8676 | * Convenience function for retrieving a single secure settings value |
| 8677 | * as a float. Note that internally setting values are always |
| 8678 | * stored as strings; this function converts the string to a float |
| 8679 | * for you. |
| 8680 | * <p> |
| 8681 | * This version does not take a default value. If the setting has not |
| 8682 | * been set, or the string value is not a number, |
| 8683 | * it throws {@link SettingNotFoundException}. |
| 8684 | * |
| 8685 | * @param cr The ContentResolver to access. |
| 8686 | * @param name The name of the setting to retrieve. |
| 8687 | * |
| 8688 | * @throws SettingNotFoundException Thrown if a setting by the given |
| 8689 | * name can't be found or the setting value is not a float. |
| 8690 | * |
| 8691 | * @return The setting's current value. |
| 8692 | */ |
| 8693 | public static float getFloat(ContentResolver cr, String name) |
| 8694 | throws SettingNotFoundException { |
| 8695 | String v = getString(cr, name); |
| 8696 | if (v == null) { |
| 8697 | throw new SettingNotFoundException(name); |
| 8698 | } |
| 8699 | try { |
| 8700 | return Float.parseFloat(v); |
| 8701 | } catch (NumberFormatException e) { |
| 8702 | throw new SettingNotFoundException(name); |
| 8703 | } |
| 8704 | } |
| 8705 | |
| 8706 | /** |
| 8707 | * Convenience function for updating a single settings value as a |
| 8708 | * floating point number. This will either create a new entry in the |
| 8709 | * table if the given name does not exist, or modify the value of the |
| 8710 | * existing row with that name. Note that internally setting values |
| 8711 | * are always stored as strings, so this function converts the given |
| 8712 | * value to a string before storing it. |
| 8713 | * |
| 8714 | * @param cr The ContentResolver to access. |
| 8715 | * @param name The name of the setting to modify. |
| 8716 | * @param value The new value for the setting. |
| 8717 | * @return true if the value was set, false on database errors |
| 8718 | */ |
| 8719 | public static boolean putFloat(ContentResolver cr, String name, float value) { |
| 8720 | return putString(cr, name, Float.toString(value)); |
| 8721 | } |
Wink Saville | fb40dd4 | 2014-06-12 17:02:31 -0700 | [diff] [blame] | 8722 | |
| 8723 | |
| 8724 | /** |
| 8725 | * Subscription to be used for voice call on a multi sim device. The supported values |
| 8726 | * are 0 = SUB1, 1 = SUB2 and etc. |
| 8727 | * @hide |
| 8728 | */ |
| 8729 | public static final String MULTI_SIM_VOICE_CALL_SUBSCRIPTION = "multi_sim_voice_call"; |
| 8730 | |
| 8731 | /** |
| 8732 | * Used to provide option to user to select subscription during dial. |
| 8733 | * The supported values are 0 = disable or 1 = enable prompt. |
| 8734 | * @hide |
| 8735 | */ |
| 8736 | public static final String MULTI_SIM_VOICE_PROMPT = "multi_sim_voice_prompt"; |
| 8737 | |
| 8738 | /** |
| 8739 | * Subscription to be used for data call on a multi sim device. The supported values |
| 8740 | * are 0 = SUB1, 1 = SUB2 and etc. |
| 8741 | * @hide |
| 8742 | */ |
| 8743 | public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call"; |
| 8744 | |
| 8745 | /** |
| 8746 | * Subscription to be used for SMS on a multi sim device. The supported values |
| 8747 | * are 0 = SUB1, 1 = SUB2 and etc. |
| 8748 | * @hide |
| 8749 | */ |
| 8750 | public static final String MULTI_SIM_SMS_SUBSCRIPTION = "multi_sim_sms"; |
| 8751 | |
| 8752 | /** |
| 8753 | * Used to provide option to user to select subscription during send SMS. |
| 8754 | * The value 1 - enable, 0 - disable |
| 8755 | * @hide |
| 8756 | */ |
| 8757 | public static final String MULTI_SIM_SMS_PROMPT = "multi_sim_sms_prompt"; |
| 8758 | |
| 8759 | |
| 8760 | |
| 8761 | /** User preferred subscriptions setting. |
| 8762 | * This holds the details of the user selected subscription from the card and |
| 8763 | * the activation status. Each settings string have the coma separated values |
| 8764 | * iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index |
| 8765 | * @hide |
| 8766 | */ |
| 8767 | public static final String[] MULTI_SIM_USER_PREFERRED_SUBS = {"user_preferred_sub1", |
| 8768 | "user_preferred_sub2","user_preferred_sub3"}; |
Zheng Fu | b218ff4 | 2015-04-13 16:31:16 -0700 | [diff] [blame] | 8769 | |
| 8770 | /** |
| 8771 | * Whether to enable new contacts aggregator or not. |
| 8772 | * The value 1 - enable, 0 - disable |
| 8773 | * @hide |
| 8774 | */ |
| 8775 | public static final String NEW_CONTACT_AGGREGATOR = "new_contact_aggregator"; |
Zheng Fu | 31ce78c | 2015-04-15 16:57:53 -0700 | [diff] [blame] | 8776 | |
| 8777 | /** |
| 8778 | * Whether to enable contacts metadata syncing or not |
| 8779 | * The value 1 - enable, 0 - disable |
Zheng Fu | 31ce78c | 2015-04-15 16:57:53 -0700 | [diff] [blame] | 8780 | */ |
| 8781 | public static final String CONTACT_METADATA_SYNC = "contact_metadata_sync"; |
Wei Liu | a181770 | 2015-08-11 21:21:12 -0700 | [diff] [blame] | 8782 | |
| 8783 | /** |
| 8784 | * Whether to enable cellular on boot. |
| 8785 | * The value 1 - enable, 0 - disable |
| 8786 | * @hide |
| 8787 | */ |
| 8788 | public static final String ENABLE_CELLULAR_ON_BOOT = "enable_cellular_on_boot"; |
Christopher Tate | 06efb53 | 2012-08-24 15:29:27 -0700 | [diff] [blame] | 8789 | } |
| 8790 | |
| 8791 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8792 | * User-defined bookmarks and shortcuts. The target of each bookmark is an |
| 8793 | * Intent URL, allowing it to be either a web page or a particular |
| 8794 | * application activity. |
| 8795 | * |
| 8796 | * @hide |
| 8797 | */ |
| 8798 | public static final class Bookmarks implements BaseColumns |
| 8799 | { |
| 8800 | private static final String TAG = "Bookmarks"; |
| 8801 | |
| 8802 | /** |
| 8803 | * The content:// style URL for this table |
| 8804 | */ |
| 8805 | public static final Uri CONTENT_URI = |
| 8806 | Uri.parse("content://" + AUTHORITY + "/bookmarks"); |
| 8807 | |
| 8808 | /** |
| 8809 | * The row ID. |
| 8810 | * <p>Type: INTEGER</p> |
| 8811 | */ |
| 8812 | public static final String ID = "_id"; |
| 8813 | |
| 8814 | /** |
| 8815 | * Descriptive name of the bookmark that can be displayed to the user. |
| 8816 | * If this is empty, the title should be resolved at display time (use |
| 8817 | * {@link #getTitle(Context, Cursor)} any time you want to display the |
| 8818 | * title of a bookmark.) |
| 8819 | * <P> |
| 8820 | * Type: TEXT |
| 8821 | * </P> |
| 8822 | */ |
| 8823 | public static final String TITLE = "title"; |
| 8824 | |
| 8825 | /** |
| 8826 | * Arbitrary string (displayed to the user) that allows bookmarks to be |
| 8827 | * organized into categories. There are some special names for |
| 8828 | * standard folders, which all start with '@'. The label displayed for |
| 8829 | * the folder changes with the locale (via {@link #getLabelForFolder}) but |
| 8830 | * the folder name does not change so you can consistently query for |
| 8831 | * the folder regardless of the current locale. |
| 8832 | * |
| 8833 | * <P>Type: TEXT</P> |
| 8834 | * |
| 8835 | */ |
| 8836 | public static final String FOLDER = "folder"; |
| 8837 | |
| 8838 | /** |
| 8839 | * The Intent URL of the bookmark, describing what it points to. This |
| 8840 | * value is given to {@link android.content.Intent#getIntent} to create |
| 8841 | * an Intent that can be launched. |
| 8842 | * <P>Type: TEXT</P> |
| 8843 | */ |
| 8844 | public static final String INTENT = "intent"; |
| 8845 | |
| 8846 | /** |
| 8847 | * Optional shortcut character associated with this bookmark. |
| 8848 | * <P>Type: INTEGER</P> |
| 8849 | */ |
| 8850 | public static final String SHORTCUT = "shortcut"; |
| 8851 | |
| 8852 | /** |
| 8853 | * The order in which the bookmark should be displayed |
| 8854 | * <P>Type: INTEGER</P> |
| 8855 | */ |
| 8856 | public static final String ORDERING = "ordering"; |
| 8857 | |
| 8858 | private static final String[] sIntentProjection = { INTENT }; |
| 8859 | private static final String[] sShortcutProjection = { ID, SHORTCUT }; |
| 8860 | private static final String sShortcutSelection = SHORTCUT + "=?"; |
| 8861 | |
| 8862 | /** |
| 8863 | * Convenience function to retrieve the bookmarked Intent for a |
| 8864 | * particular shortcut key. |
| 8865 | * |
| 8866 | * @param cr The ContentResolver to query. |
| 8867 | * @param shortcut The shortcut key. |
| 8868 | * |
| 8869 | * @return Intent The bookmarked URL, or null if there is no bookmark |
| 8870 | * matching the given shortcut. |
| 8871 | */ |
| 8872 | public static Intent getIntentForShortcut(ContentResolver cr, char shortcut) |
| 8873 | { |
| 8874 | Intent intent = null; |
| 8875 | |
| 8876 | Cursor c = cr.query(CONTENT_URI, |
| 8877 | sIntentProjection, sShortcutSelection, |
| 8878 | new String[] { String.valueOf((int) shortcut) }, ORDERING); |
| 8879 | // Keep trying until we find a valid shortcut |
| 8880 | try { |
| 8881 | while (intent == null && c.moveToNext()) { |
| 8882 | try { |
| 8883 | String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT)); |
Christian Mehlmauer | a34d2c9 | 2010-05-25 19:04:20 +0200 | [diff] [blame] | 8884 | intent = Intent.parseUri(intentURI, 0); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8885 | } catch (java.net.URISyntaxException e) { |
| 8886 | // The stored URL is bad... ignore it. |
| 8887 | } catch (IllegalArgumentException e) { |
| 8888 | // Column not found |
Dianne Hackborn | a33e3f7 | 2009-09-29 17:28:24 -0700 | [diff] [blame] | 8889 | Log.w(TAG, "Intent column not found", e); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8890 | } |
| 8891 | } |
| 8892 | } finally { |
| 8893 | if (c != null) c.close(); |
| 8894 | } |
| 8895 | |
| 8896 | return intent; |
| 8897 | } |
| 8898 | |
| 8899 | /** |
| 8900 | * Add a new bookmark to the system. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 8901 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8902 | * @param cr The ContentResolver to query. |
| 8903 | * @param intent The desired target of the bookmark. |
| 8904 | * @param title Bookmark title that is shown to the user; null if none |
| 8905 | * or it should be resolved to the intent's title. |
| 8906 | * @param folder Folder in which to place the bookmark; null if none. |
| 8907 | * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If |
| 8908 | * this is non-zero and there is an existing bookmark entry |
| 8909 | * with this same shortcut, then that existing shortcut is |
| 8910 | * cleared (the bookmark is not removed). |
| 8911 | * @return The unique content URL for the new bookmark entry. |
| 8912 | */ |
| 8913 | public static Uri add(ContentResolver cr, |
| 8914 | Intent intent, |
| 8915 | String title, |
| 8916 | String folder, |
| 8917 | char shortcut, |
| 8918 | int ordering) |
| 8919 | { |
| 8920 | // If a shortcut is supplied, and it is already defined for |
| 8921 | // another bookmark, then remove the old definition. |
| 8922 | if (shortcut != 0) { |
Jeff Hamilton | 7cd51ef | 2010-05-12 17:30:27 -0500 | [diff] [blame] | 8923 | cr.delete(CONTENT_URI, sShortcutSelection, |
| 8924 | new String[] { String.valueOf((int) shortcut) }); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8925 | } |
| 8926 | |
| 8927 | ContentValues values = new ContentValues(); |
| 8928 | if (title != null) values.put(TITLE, title); |
| 8929 | if (folder != null) values.put(FOLDER, folder); |
Jean-Baptiste Queru | 3b9f0a3 | 2010-06-21 13:46:59 -0700 | [diff] [blame] | 8930 | values.put(INTENT, intent.toUri(0)); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8931 | if (shortcut != 0) values.put(SHORTCUT, (int) shortcut); |
| 8932 | values.put(ORDERING, ordering); |
| 8933 | return cr.insert(CONTENT_URI, values); |
| 8934 | } |
| 8935 | |
| 8936 | /** |
| 8937 | * Return the folder name as it should be displayed to the user. This |
| 8938 | * takes care of localizing special folders. |
| 8939 | * |
| 8940 | * @param r Resources object for current locale; only need access to |
| 8941 | * system resources. |
| 8942 | * @param folder The value found in the {@link #FOLDER} column. |
| 8943 | * |
| 8944 | * @return CharSequence The label for this folder that should be shown |
| 8945 | * to the user. |
| 8946 | */ |
| 8947 | public static CharSequence getLabelForFolder(Resources r, String folder) { |
| 8948 | return folder; |
| 8949 | } |
| 8950 | |
| 8951 | /** |
| 8952 | * Return the title as it should be displayed to the user. This takes |
| 8953 | * care of localizing bookmarks that point to activities. |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 8954 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8955 | * @param context A context. |
| 8956 | * @param cursor A cursor pointing to the row whose title should be |
| 8957 | * returned. The cursor must contain at least the {@link #TITLE} |
| 8958 | * and {@link #INTENT} columns. |
| 8959 | * @return A title that is localized and can be displayed to the user, |
| 8960 | * or the empty string if one could not be found. |
| 8961 | */ |
| 8962 | public static CharSequence getTitle(Context context, Cursor cursor) { |
| 8963 | int titleColumn = cursor.getColumnIndex(TITLE); |
| 8964 | int intentColumn = cursor.getColumnIndex(INTENT); |
| 8965 | if (titleColumn == -1 || intentColumn == -1) { |
| 8966 | throw new IllegalArgumentException( |
| 8967 | "The cursor must contain the TITLE and INTENT columns."); |
| 8968 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 8969 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8970 | String title = cursor.getString(titleColumn); |
| 8971 | if (!TextUtils.isEmpty(title)) { |
| 8972 | return title; |
| 8973 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 8974 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8975 | String intentUri = cursor.getString(intentColumn); |
| 8976 | if (TextUtils.isEmpty(intentUri)) { |
| 8977 | return ""; |
| 8978 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 8979 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8980 | Intent intent; |
| 8981 | try { |
Christian Mehlmauer | a34d2c9 | 2010-05-25 19:04:20 +0200 | [diff] [blame] | 8982 | intent = Intent.parseUri(intentUri, 0); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8983 | } catch (URISyntaxException e) { |
| 8984 | return ""; |
| 8985 | } |
Jaikumar Ganesh | 9bfbfbd | 2009-05-15 12:05:56 -0700 | [diff] [blame] | 8986 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8987 | PackageManager packageManager = context.getPackageManager(); |
| 8988 | ResolveInfo info = packageManager.resolveActivity(intent, 0); |
| 8989 | return info != null ? info.loadLabel(packageManager) : ""; |
| 8990 | } |
| 8991 | } |
| 8992 | |
| 8993 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8994 | * Returns the device ID that we should use when connecting to the mobile gtalk server. |
| 8995 | * This is a string like "android-0x1242", where the hex string is the Android ID obtained |
| 8996 | * from the GoogleLoginService. |
| 8997 | * |
| 8998 | * @param androidId The Android ID for this device. |
| 8999 | * @return The device ID that should be used when connecting to the mobile gtalk server. |
| 9000 | * @hide |
| 9001 | */ |
| 9002 | public static String getGTalkDeviceId(long androidId) { |
| 9003 | return "android-" + Long.toHexString(androidId); |
| 9004 | } |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9005 | |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9006 | private static final String[] PM_WRITE_SETTINGS = { |
| 9007 | android.Manifest.permission.WRITE_SETTINGS |
| 9008 | }; |
| 9009 | private static final String[] PM_CHANGE_NETWORK_STATE = { |
| 9010 | android.Manifest.permission.CHANGE_NETWORK_STATE, |
| 9011 | android.Manifest.permission.WRITE_SETTINGS |
| 9012 | }; |
| 9013 | private static final String[] PM_SYSTEM_ALERT_WINDOW = { |
| 9014 | android.Manifest.permission.SYSTEM_ALERT_WINDOW |
| 9015 | }; |
| 9016 | |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9017 | /** |
| 9018 | * Performs a strict and comprehensive check of whether a calling package is allowed to |
| 9019 | * write/modify system settings, as the condition differs for pre-M, M+, and |
| 9020 | * privileged/preinstalled apps. If the provided uid does not match the |
| 9021 | * callingPackage, a negative result will be returned. |
| 9022 | * @hide |
| 9023 | */ |
| 9024 | public static boolean isCallingPackageAllowedToWriteSettings(Context context, int uid, |
| 9025 | String callingPackage, boolean throwException) { |
| 9026 | return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, |
| 9027 | callingPackage, throwException, AppOpsManager.OP_WRITE_SETTINGS, |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9028 | PM_WRITE_SETTINGS, false); |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9029 | } |
| 9030 | |
| 9031 | /** |
| 9032 | * Performs a strict and comprehensive check of whether a calling package is allowed to |
| 9033 | * write/modify system settings, as the condition differs for pre-M, M+, and |
| 9034 | * privileged/preinstalled apps. If the provided uid does not match the |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9035 | * callingPackage, a negative result will be returned. The caller is expected to have |
Lorenzo Colitti | d542705 | 2015-10-15 16:29:00 +0900 | [diff] [blame] | 9036 | * the WRITE_SETTINGS permission declared. |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9037 | * |
| 9038 | * Note: if the check is successful, the operation of this app will be updated to the |
| 9039 | * current time. |
| 9040 | * @hide |
| 9041 | */ |
| 9042 | public static boolean checkAndNoteWriteSettingsOperation(Context context, int uid, |
| 9043 | String callingPackage, boolean throwException) { |
| 9044 | return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, |
| 9045 | callingPackage, throwException, AppOpsManager.OP_WRITE_SETTINGS, |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9046 | PM_WRITE_SETTINGS, true); |
| 9047 | } |
| 9048 | |
| 9049 | /** |
| 9050 | * Performs a strict and comprehensive check of whether a calling package is allowed to |
| 9051 | * change the state of network, as the condition differs for pre-M, M+, and |
Lorenzo Colitti | d542705 | 2015-10-15 16:29:00 +0900 | [diff] [blame] | 9052 | * privileged/preinstalled apps. The caller is expected to have either the |
| 9053 | * CHANGE_NETWORK_STATE or the WRITE_SETTINGS permission declared. Either of these |
| 9054 | * permissions allow changing network state; WRITE_SETTINGS is a runtime permission and |
| 9055 | * can be revoked, but (except in M, excluding M MRs), CHANGE_NETWORK_STATE is a normal |
| 9056 | * permission and cannot be revoked. See http://b/23597341 |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9057 | * |
Lorenzo Colitti | d542705 | 2015-10-15 16:29:00 +0900 | [diff] [blame] | 9058 | * Note: if the check succeeds because the application holds WRITE_SETTINGS, the operation |
| 9059 | * of this app will be updated to the current time. |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9060 | * @hide |
| 9061 | */ |
| 9062 | public static boolean checkAndNoteChangeNetworkStateOperation(Context context, int uid, |
| 9063 | String callingPackage, boolean throwException) { |
Lorenzo Colitti | d542705 | 2015-10-15 16:29:00 +0900 | [diff] [blame] | 9064 | if (context.checkCallingOrSelfPermission(android.Manifest.permission.CHANGE_NETWORK_STATE) |
| 9065 | == PackageManager.PERMISSION_GRANTED) { |
| 9066 | return true; |
| 9067 | } |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9068 | return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, |
| 9069 | callingPackage, throwException, AppOpsManager.OP_WRITE_SETTINGS, |
| 9070 | PM_CHANGE_NETWORK_STATE, true); |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9071 | } |
| 9072 | |
| 9073 | /** |
| 9074 | * Performs a strict and comprehensive check of whether a calling package is allowed to |
| 9075 | * draw on top of other apps, as the conditions differs for pre-M, M+, and |
| 9076 | * privileged/preinstalled apps. If the provided uid does not match the callingPackage, |
| 9077 | * a negative result will be returned. |
| 9078 | * @hide |
| 9079 | */ |
| 9080 | public static boolean isCallingPackageAllowedToDrawOverlays(Context context, int uid, |
| 9081 | String callingPackage, boolean throwException) { |
| 9082 | return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, |
| 9083 | callingPackage, throwException, AppOpsManager.OP_SYSTEM_ALERT_WINDOW, |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9084 | PM_SYSTEM_ALERT_WINDOW, false); |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9085 | } |
| 9086 | |
| 9087 | /** |
| 9088 | * Performs a strict and comprehensive check of whether a calling package is allowed to |
| 9089 | * draw on top of other apps, as the conditions differs for pre-M, M+, and |
| 9090 | * privileged/preinstalled apps. If the provided uid does not match the callingPackage, |
| 9091 | * a negative result will be returned. |
| 9092 | * |
| 9093 | * Note: if the check is successful, the operation of this app will be updated to the |
| 9094 | * current time. |
| 9095 | * @hide |
| 9096 | */ |
| 9097 | public static boolean checkAndNoteDrawOverlaysOperation(Context context, int uid, String |
| 9098 | callingPackage, boolean throwException) { |
| 9099 | return isCallingPackageAllowedToPerformAppOpsProtectedOperation(context, uid, |
| 9100 | callingPackage, throwException, AppOpsManager.OP_SYSTEM_ALERT_WINDOW, |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9101 | PM_SYSTEM_ALERT_WINDOW, true); |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9102 | } |
| 9103 | |
| 9104 | /** |
| 9105 | * Helper method to perform a general and comprehensive check of whether an operation that is |
| 9106 | * protected by appops can be performed by a caller or not. e.g. OP_SYSTEM_ALERT_WINDOW and |
| 9107 | * OP_WRITE_SETTINGS |
| 9108 | * @hide |
| 9109 | */ |
| 9110 | public static boolean isCallingPackageAllowedToPerformAppOpsProtectedOperation(Context context, |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9111 | int uid, String callingPackage, boolean throwException, int appOpsOpCode, String[] |
| 9112 | permissions, boolean makeNote) { |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9113 | if (callingPackage == null) { |
| 9114 | return false; |
| 9115 | } |
| 9116 | |
| 9117 | AppOpsManager appOpsMgr = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE); |
| 9118 | int mode = AppOpsManager.MODE_DEFAULT; |
| 9119 | if (makeNote) { |
| 9120 | mode = appOpsMgr.noteOpNoThrow(appOpsOpCode, uid, callingPackage); |
| 9121 | } else { |
| 9122 | mode = appOpsMgr.checkOpNoThrow(appOpsOpCode, uid, callingPackage); |
| 9123 | } |
| 9124 | |
| 9125 | switch (mode) { |
| 9126 | case AppOpsManager.MODE_ALLOWED: |
| 9127 | return true; |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9128 | |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9129 | case AppOpsManager.MODE_DEFAULT: |
| 9130 | // this is the default operating mode after an app's installation |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9131 | // In this case we will check all associated static permission to see |
| 9132 | // if it is granted during install time. |
| 9133 | for (String permission : permissions) { |
| 9134 | if (context.checkCallingOrSelfPermission(permission) == PackageManager |
| 9135 | .PERMISSION_GRANTED) { |
| 9136 | // if either of the permissions are granted, we will allow it |
| 9137 | return true; |
| 9138 | } |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9139 | } |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9140 | |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9141 | default: |
| 9142 | // this is for all other cases trickled down here... |
| 9143 | if (!throwException) { |
| 9144 | return false; |
| 9145 | } |
| 9146 | } |
Billy Lau | a7238a3 | 2015-08-01 12:45:02 +0100 | [diff] [blame] | 9147 | |
| 9148 | // prepare string to throw SecurityException |
| 9149 | StringBuilder exceptionMessage = new StringBuilder(); |
| 9150 | exceptionMessage.append(callingPackage); |
| 9151 | exceptionMessage.append(" was not granted "); |
| 9152 | if (permissions.length > 1) { |
| 9153 | exceptionMessage.append(" either of these permissions: "); |
| 9154 | } else { |
| 9155 | exceptionMessage.append(" this permission: "); |
| 9156 | } |
| 9157 | for (int i = 0; i < permissions.length; i++) { |
| 9158 | exceptionMessage.append(permissions[i]); |
| 9159 | exceptionMessage.append((i == permissions.length - 1) ? "." : ", "); |
| 9160 | } |
| 9161 | |
| 9162 | throw new SecurityException(exceptionMessage.toString()); |
Billy Lau | 6ad2d66 | 2015-07-18 00:26:58 +0100 | [diff] [blame] | 9163 | } |
| 9164 | |
| 9165 | /** |
| 9166 | * Retrieves a correponding package name for a given uid. It will query all |
| 9167 | * packages that are associated with the given uid, but it will return only |
| 9168 | * the zeroth result. |
| 9169 | * Note: If package could not be found, a null is returned. |
| 9170 | * @hide |
| 9171 | */ |
| 9172 | public static String getPackageNameForUid(Context context, int uid) { |
| 9173 | String[] packages = context.getPackageManager().getPackagesForUid(uid); |
| 9174 | if (packages == null) { |
| 9175 | return null; |
| 9176 | } |
| 9177 | return packages[0]; |
| 9178 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 9179 | } |