blob: 167d8e584a78dfc9e97358d40caf26bbcc401d0f [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.provider;
18
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080019import android.annotation.SdkConstant;
20import android.annotation.SdkConstant.SdkConstantType;
Bryce Leecdfebd62015-02-02 08:19:11 -080021import android.annotation.SystemApi;
Narayan Kamathee69ff42011-06-28 12:07:18 +010022import android.app.SearchManager;
Jeff Sharkey6e2bee72012-10-01 13:39:08 -070023import android.app.WallpaperManager;
Mike LeBeau5d34e9b2010-02-10 19:34:56 -080024import android.content.ComponentName;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080025import android.content.ContentResolver;
26import android.content.ContentValues;
27import android.content.Context;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -080028import android.content.IContentProvider;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080029import android.content.Intent;
Dianne Hackbornb8b11a02010-03-10 15:53:11 -080030import android.content.pm.ActivityInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080031import android.content.pm.PackageManager;
32import android.content.pm.ResolveInfo;
33import android.content.res.Configuration;
34import android.content.res.Resources;
35import android.database.Cursor;
36import android.database.SQLException;
David Christie3f7b6522013-08-06 19:19:08 -070037import android.location.LocationManager;
Jeff Sharkey625239a2012-09-26 22:03:49 -070038import android.net.ConnectivityManager;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080039import android.net.Uri;
Irfan Sheriff36f74132010-11-04 16:57:37 -070040import android.net.wifi.WifiManager;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070041import android.os.BatteryManager;
42import android.os.Bundle;
Jeff Sharkey625239a2012-09-26 22:03:49 -070043import android.os.DropBoxManager;
Amith Yamasani52c489c2012-03-28 11:42:42 -070044import android.os.IBinder;
Amith Yamasani7ab8c4a2012-04-06 09:27:12 -070045import android.os.Process;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070046import android.os.RemoteException;
Amith Yamasani52c489c2012-03-28 11:42:42 -070047import android.os.ServiceManager;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070048import android.os.SystemProperties;
Dianne Hackbornf02b60a2012-08-16 10:48:27 -070049import android.os.UserHandle;
Jeff Sharkey625239a2012-09-26 22:03:49 -070050import android.os.Build.VERSION_CODES;
Narayan Kamath6d632962011-08-24 11:51:37 +010051import android.speech.tts.TextToSpeech;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080052import android.text.TextUtils;
53import android.util.AndroidException;
Svetoslav683914b2015-01-15 14:22:26 -080054import android.util.ArrayMap;
55import android.util.ArraySet;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080056import android.util.Log;
57
Svetoslav683914b2015-01-15 14:22:26 -080058import com.android.internal.util.ArrayUtils;
Amith Yamasani52c489c2012-03-28 11:42:42 -070059import com.android.internal.widget.ILockSettings;
60
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080061import java.net.URISyntaxException;
Svetoslav683914b2015-01-15 14:22:26 -080062import java.text.SimpleDateFormat;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080063import java.util.HashMap;
64import java.util.HashSet;
Elliott Hughescb64d432013-08-02 10:00:44 -070065import java.util.Locale;
Svetoslav683914b2015-01-15 14:22:26 -080066import java.util.Map;
67import java.util.Set;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080068
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080069/**
70 * The Settings provider contains global system-level device preferences.
71 */
72public final class Settings {
73
74 // Intent actions for Settings
75
76 /**
77 * Activity Action: Show system settings.
78 * <p>
79 * Input: Nothing.
80 * <p>
Gilles Debunnee90bed12011-08-30 14:28:27 -070081 * Output: Nothing.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080082 */
83 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
84 public static final String ACTION_SETTINGS = "android.settings.SETTINGS";
85
86 /**
87 * Activity Action: Show settings to allow configuration of APNs.
88 * <p>
89 * Input: Nothing.
90 * <p>
Gilles Debunnee90bed12011-08-30 14:28:27 -070091 * Output: Nothing.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080092 */
93 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
94 public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS";
95
96 /**
97 * Activity Action: Show settings to allow configuration of current location
98 * sources.
99 * <p>
100 * In some cases, a matching Activity may not exist, so ensure you
101 * safeguard against this.
102 * <p>
103 * Input: Nothing.
104 * <p>
105 * Output: Nothing.
106 */
107 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
108 public static final String ACTION_LOCATION_SOURCE_SETTINGS =
109 "android.settings.LOCATION_SOURCE_SETTINGS";
110
111 /**
112 * Activity Action: Show settings to allow configuration of wireless controls
113 * such as Wi-Fi, Bluetooth and Mobile networks.
114 * <p>
115 * In some cases, a matching Activity may not exist, so ensure you
116 * safeguard against this.
117 * <p>
118 * Input: Nothing.
119 * <p>
120 * Output: Nothing.
121 */
122 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
123 public static final String ACTION_WIRELESS_SETTINGS =
124 "android.settings.WIRELESS_SETTINGS";
125
126 /**
127 * Activity Action: Show settings to allow entering/exiting airplane mode.
128 * <p>
129 * In some cases, a matching Activity may not exist, so ensure you
130 * safeguard against this.
131 * <p>
132 * Input: Nothing.
133 * <p>
134 * Output: Nothing.
135 */
136 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
137 public static final String ACTION_AIRPLANE_MODE_SETTINGS =
138 "android.settings.AIRPLANE_MODE_SETTINGS";
139
140 /**
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700141 * Activity Action: Modify Airplane mode settings using a voice command.
Barnaby James48f35522014-07-16 14:27:39 -0700142 * <p>
143 * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
144 * <p>
145 * This intent MUST be started using
146 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
147 * startVoiceActivity}.
148 * <p>
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700149 * Note: The activity implementing this intent MUST verify that
Barnaby James48f35522014-07-16 14:27:39 -0700150 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before
151 * modifying the setting.
152 * <p>
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700153 * Input: To tell which state airplane mode should be set to, add the
154 * {@link #EXTRA_AIRPLANE_MODE_ENABLED} extra to this Intent with the state specified.
155 * If the extra is not included, no changes will be made.
Barnaby James48f35522014-07-16 14:27:39 -0700156 * <p>
157 * Output: Nothing.
158 */
159 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
160 public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE =
161 "android.settings.VOICE_CONTROL_AIRPLANE_MODE";
162
163 /**
Dianne Hackborndd9b82c2009-09-03 00:18:47 -0700164 * Activity Action: Show settings for accessibility modules.
165 * <p>
166 * In some cases, a matching Activity may not exist, so ensure you
167 * safeguard against this.
168 * <p>
169 * Input: Nothing.
170 * <p>
171 * Output: Nothing.
172 */
173 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
174 public static final String ACTION_ACCESSIBILITY_SETTINGS =
175 "android.settings.ACCESSIBILITY_SETTINGS";
176
177 /**
Dianne Hackborna3fb40d2014-08-12 15:06:50 -0700178 * Activity Action: Show settings to control access to usage information.
179 * <p>
180 * In some cases, a matching Activity may not exist, so ensure you
181 * safeguard against this.
182 * <p>
183 * Input: Nothing.
184 * <p>
185 * Output: Nothing.
186 */
187 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
188 public static final String ACTION_USAGE_ACCESS_SETTINGS =
189 "android.settings.USAGE_ACCESS_SETTINGS";
190
191 /**
Jason Monk6f909782015-04-17 14:30:25 -0400192 * Activity Category: Show application settings related to usage access.
193 * <p>
194 * An activity that provides a user interface for adjusting usage access related
195 * preferences for its containing application. Optional but recommended for apps that
196 * use {@link android.Manifest.permission#PACKAGE_USAGE_STATS}.
197 * <p>
198 * The activity may define meta-data to describe what usage access is
199 * used for within their app with {@link #METADATA_USAGE_ACCESS_REASON}, which
200 * will be displayed in Settings.
201 * <p>
202 * Input: Nothing.
203 * <p>
204 * Output: Nothing.
205 */
206 @SdkConstant(SdkConstantType.INTENT_CATEGORY)
207 public static final String INTENT_CATEGORY_USAGE_ACCESS_CONFIG =
208 "android.intent.category.USAGE_ACCESS_CONFIG";
209
210 /**
211 * Metadata key: Reason for needing usage access.
212 * <p>
213 * A key for metadata attached to an activity that receives action
214 * {@link #INTENT_CATEGORY_USAGE_ACCESS_CONFIG}, shown to the
215 * user as description of how the app uses usage access.
216 * <p>
217 */
218 public static final String METADATA_USAGE_ACCESS_REASON =
219 "android.settings.metadata.USAGE_ACCESS_REASON";
220
221 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800222 * Activity Action: Show settings to allow configuration of security and
223 * location privacy.
224 * <p>
225 * In some cases, a matching Activity may not exist, so ensure you
226 * safeguard against this.
227 * <p>
228 * Input: Nothing.
229 * <p>
230 * Output: Nothing.
231 */
232 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
233 public static final String ACTION_SECURITY_SETTINGS =
234 "android.settings.SECURITY_SETTINGS";
235
236 /**
Maggie Benthall0469f412013-09-05 15:30:26 -0400237 * Activity Action: Show trusted credentials settings, opening to the user tab,
238 * to allow management of installed credentials.
239 * <p>
240 * In some cases, a matching Activity may not exist, so ensure you
241 * safeguard against this.
242 * <p>
243 * Input: Nothing.
244 * <p>
245 * Output: Nothing.
246 * @hide
247 */
248 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
249 public static final String ACTION_TRUSTED_CREDENTIALS_USER =
250 "com.android.settings.TRUSTED_CREDENTIALS_USER";
251
252 /**
253 * Activity Action: Show dialog explaining that an installed CA cert may enable
254 * monitoring of encrypted network traffic.
255 * <p>
256 * In some cases, a matching Activity may not exist, so ensure you
257 * safeguard against this.
258 * <p>
259 * Input: Nothing.
260 * <p>
261 * Output: Nothing.
262 * @hide
263 */
264 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
265 public static final String ACTION_MONITORING_CERT_INFO =
266 "com.android.settings.MONITORING_CERT_INFO";
267
268 /**
Amith Yamasanic15255a2009-09-23 15:33:19 -0700269 * Activity Action: Show settings to allow configuration of privacy options.
270 * <p>
271 * In some cases, a matching Activity may not exist, so ensure you
272 * safeguard against this.
273 * <p>
274 * Input: Nothing.
275 * <p>
276 * Output: Nothing.
277 */
278 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
279 public static final String ACTION_PRIVACY_SETTINGS =
280 "android.settings.PRIVACY_SETTINGS";
281
282 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800283 * Activity Action: Show settings to allow configuration of Wi-Fi.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800284 * <p>
285 * In some cases, a matching Activity may not exist, so ensure you
286 * safeguard against this.
287 * <p>
288 * Input: Nothing.
289 * <p>
290 * Output: Nothing.
291
292 */
293 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
294 public static final String ACTION_WIFI_SETTINGS =
295 "android.settings.WIFI_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700296
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800297 /**
298 * Activity Action: Show settings to allow configuration of a static IP
299 * address for Wi-Fi.
300 * <p>
301 * In some cases, a matching Activity may not exist, so ensure you safeguard
302 * against this.
303 * <p>
304 * Input: Nothing.
305 * <p>
306 * Output: Nothing.
307 */
308 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
309 public static final String ACTION_WIFI_IP_SETTINGS =
310 "android.settings.WIFI_IP_SETTINGS";
311
312 /**
313 * Activity Action: Show settings to allow configuration of Bluetooth.
314 * <p>
315 * In some cases, a matching Activity may not exist, so ensure you
316 * safeguard against this.
317 * <p>
318 * Input: Nothing.
319 * <p>
320 * Output: Nothing.
321 */
322 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
323 public static final String ACTION_BLUETOOTH_SETTINGS =
324 "android.settings.BLUETOOTH_SETTINGS";
325
326 /**
Jeff Brownc05c1ae2015-05-05 13:46:30 -0700327 * Activity Action: Show settings to allow configuration of cast endpoints.
Jeff Brown1a937b02014-07-01 22:13:04 -0700328 * <p>
329 * In some cases, a matching Activity may not exist, so ensure you
330 * safeguard against this.
331 * <p>
332 * Input: Nothing.
333 * <p>
334 * Output: Nothing.
335 */
336 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
337 public static final String ACTION_CAST_SETTINGS =
338 "android.settings.CAST_SETTINGS";
339
340 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800341 * Activity Action: Show settings to allow configuration of date and time.
342 * <p>
343 * In some cases, a matching Activity may not exist, so ensure you
344 * safeguard against this.
345 * <p>
346 * Input: Nothing.
347 * <p>
348 * Output: Nothing.
349 */
350 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
351 public static final String ACTION_DATE_SETTINGS =
352 "android.settings.DATE_SETTINGS";
353
354 /**
355 * Activity Action: Show settings to allow configuration of sound and volume.
356 * <p>
357 * In some cases, a matching Activity may not exist, so ensure you
358 * safeguard against this.
359 * <p>
360 * Input: Nothing.
361 * <p>
362 * Output: Nothing.
363 */
364 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
365 public static final String ACTION_SOUND_SETTINGS =
366 "android.settings.SOUND_SETTINGS";
367
368 /**
369 * Activity Action: Show settings to allow configuration of display.
370 * <p>
371 * In some cases, a matching Activity may not exist, so ensure you
372 * safeguard against this.
373 * <p>
374 * Input: Nothing.
375 * <p>
376 * Output: Nothing.
377 */
378 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
379 public static final String ACTION_DISPLAY_SETTINGS =
380 "android.settings.DISPLAY_SETTINGS";
381
382 /**
383 * Activity Action: Show settings to allow configuration of locale.
384 * <p>
385 * In some cases, a matching Activity may not exist, so ensure you
386 * safeguard against this.
387 * <p>
388 * Input: Nothing.
389 * <p>
390 * Output: Nothing.
391 */
392 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
393 public static final String ACTION_LOCALE_SETTINGS =
394 "android.settings.LOCALE_SETTINGS";
395
396 /**
397 * Activity Action: Show settings to configure input methods, in particular
398 * allowing the user to enable input methods.
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)
Dianne Hackborna3fb40d2014-08-12 15:06:50 -0700408 public static final String ACTION_VOICE_INPUT_SETTINGS =
409 "android.settings.VOICE_INPUT_SETTINGS";
410
411 /**
412 * Activity Action: Show settings to configure input methods, in particular
413 * allowing the user to enable input methods.
414 * <p>
415 * In some cases, a matching Activity may not exist, so ensure you
416 * safeguard against this.
417 * <p>
418 * Input: Nothing.
419 * <p>
420 * Output: Nothing.
421 */
422 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800423 public static final String ACTION_INPUT_METHOD_SETTINGS =
424 "android.settings.INPUT_METHOD_SETTINGS";
425
426 /**
Tadashi G. Takaokaf49688f2011-01-20 17:56:13 +0900427 * Activity Action: Show settings to enable/disable input method subtypes.
satok86417ea2010-10-27 14:11:03 +0900428 * <p>
429 * In some cases, a matching Activity may not exist, so ensure you
430 * safeguard against this.
431 * <p>
Tadashi G. Takaoka25480202011-01-20 23:13:02 +0900432 * To tell which input method's subtypes are displayed in the settings, add
433 * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id.
434 * If there is no extra in this Intent, subtypes from all installed input methods
435 * will be displayed in the settings.
436 *
437 * @see android.view.inputmethod.InputMethodInfo#getId
438 * <p>
satok86417ea2010-10-27 14:11:03 +0900439 * Input: Nothing.
440 * <p>
441 * Output: Nothing.
442 */
443 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
Tadashi G. Takaokaf49688f2011-01-20 17:56:13 +0900444 public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS =
445 "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS";
satok86417ea2010-10-27 14:11:03 +0900446
447 /**
satok7cfc0ed2011-06-20 21:29:36 +0900448 * Activity Action: Show a dialog to select input method.
449 * <p>
450 * In some cases, a matching Activity may not exist, so ensure you
451 * safeguard against this.
452 * <p>
453 * Input: Nothing.
454 * <p>
455 * Output: Nothing.
456 * @hide
457 */
458 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
459 public static final String ACTION_SHOW_INPUT_METHOD_PICKER =
460 "android.settings.SHOW_INPUT_METHOD_PICKER";
461
462 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800463 * Activity Action: Show settings to manage the user input dictionary.
464 * <p>
Chet Haasee8222dd2013-09-05 07:44:18 -0700465 * Starting with {@link android.os.Build.VERSION_CODES#KITKAT},
Satoshi Kataoka2aa2bc52013-07-30 14:25:11 +0900466 * it is guaranteed there will always be an appropriate implementation for this Intent action.
467 * In prior releases of the platform this was optional, so ensure you safeguard against it.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800468 * <p>
469 * Input: Nothing.
470 * <p>
471 * Output: Nothing.
472 */
473 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
474 public static final String ACTION_USER_DICTIONARY_SETTINGS =
475 "android.settings.USER_DICTIONARY_SETTINGS";
476
477 /**
Gilles Debunnee90bed12011-08-30 14:28:27 -0700478 * Activity Action: Adds a word to the user dictionary.
479 * <p>
480 * In some cases, a matching Activity may not exist, so ensure you
481 * safeguard against this.
482 * <p>
483 * Input: An extra with key <code>word</code> that contains the word
484 * that should be added to the dictionary.
485 * <p>
486 * Output: Nothing.
487 *
488 * @hide
489 */
490 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
491 public static final String ACTION_USER_DICTIONARY_INSERT =
492 "com.android.settings.USER_DICTIONARY_INSERT";
493
494 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800495 * Activity Action: Show settings to allow configuration of application-related settings.
496 * <p>
497 * In some cases, a matching Activity may not exist, so ensure you
498 * safeguard against this.
499 * <p>
500 * Input: Nothing.
501 * <p>
502 * Output: Nothing.
503 */
504 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
505 public static final String ACTION_APPLICATION_SETTINGS =
506 "android.settings.APPLICATION_SETTINGS";
507
508 /**
509 * Activity Action: Show settings to allow configuration of application
Dianne Hackborn8d866e52012-10-10 18:39:45 -0700510 * development-related settings. As of
511 * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is
512 * a required part of the platform.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800513 * <p>
514 * Input: Nothing.
515 * <p>
516 * Output: Nothing.
517 */
518 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
519 public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS =
520 "android.settings.APPLICATION_DEVELOPMENT_SETTINGS";
521
522 /**
523 * Activity Action: Show settings to allow configuration of quick launch shortcuts.
524 * <p>
525 * In some cases, a matching Activity may not exist, so ensure you
526 * safeguard against this.
527 * <p>
528 * Input: Nothing.
529 * <p>
530 * Output: Nothing.
531 */
532 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
533 public static final String ACTION_QUICK_LAUNCH_SETTINGS =
534 "android.settings.QUICK_LAUNCH_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700535
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800536 /**
537 * Activity Action: Show settings to manage installed applications.
538 * <p>
539 * In some cases, a matching Activity may not exist, so ensure you
540 * safeguard against this.
541 * <p>
542 * Input: Nothing.
543 * <p>
544 * Output: Nothing.
545 */
546 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
547 public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS =
548 "android.settings.MANAGE_APPLICATIONS_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700549
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800550 /**
Winson Chung44e8ff92010-09-27 14:36:52 -0700551 * Activity Action: Show settings to manage all applications.
552 * <p>
553 * In some cases, a matching Activity may not exist, so ensure you
554 * safeguard against this.
555 * <p>
556 * Input: Nothing.
557 * <p>
558 * Output: Nothing.
559 */
560 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
561 public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS =
562 "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS";
563
564 /**
Dianne Hackbornb7bb3b32010-06-06 22:47:50 -0700565 * Activity Action: Show screen of details about a particular application.
566 * <p>
567 * In some cases, a matching Activity may not exist, so ensure you
568 * safeguard against this.
569 * <p>
570 * Input: The Intent's data URI specifies the application package name
571 * to be shown, with the "package" scheme. That is "package:com.my.app".
572 * <p>
573 * Output: Nothing.
574 */
575 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
576 public static final String ACTION_APPLICATION_DETAILS_SETTINGS =
577 "android.settings.APPLICATION_DETAILS_SETTINGS";
578
579 /**
Jason Monk287b8892015-06-10 10:39:23 -0400580 * Activity Action: Show screen for controlling which apps can ignore battery optimizations.
581 * <p>
582 * In some cases, a matching Activity may not exist, so ensure you
583 * safeguard against this.
584 * <p>
585 * Input: The Intent's data URI specifies the application package name
586 * to be shown, with the "package" scheme. That is "package:com.my.app".
587 * <p>
588 * Output: Nothing.
589 */
590 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
591 public static final String ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS =
592 "android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS";
593
594 /**
Dianne Hackborn35654b62013-01-14 17:38:02 -0800595 * @hide
596 * Activity Action: Show the "app ops" settings screen.
597 * <p>
598 * Input: Nothing.
599 * <p>
600 * Output: Nothing.
601 */
602 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
603 public static final String ACTION_APP_OPS_SETTINGS =
604 "android.settings.APP_OPS_SETTINGS";
605
606 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800607 * Activity Action: Show settings for system update functionality.
608 * <p>
609 * In some cases, a matching Activity may not exist, so ensure you
610 * safeguard against this.
611 * <p>
612 * Input: Nothing.
613 * <p>
614 * Output: Nothing.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700615 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800616 * @hide
617 */
618 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
619 public static final String ACTION_SYSTEM_UPDATE_SETTINGS =
620 "android.settings.SYSTEM_UPDATE_SETTINGS";
621
622 /**
623 * Activity Action: Show settings to allow configuration of sync settings.
624 * <p>
625 * In some cases, a matching Activity may not exist, so ensure you
626 * safeguard against this.
627 * <p>
Erikeebc8e22010-02-18 13:27:19 -0800628 * The account types available to add via the add account button may be restricted by adding an
629 * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's
630 * authorities. Only account types which can sync with that content provider will be offered to
631 * the user.
632 * <p>
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800633 * Input: Nothing.
634 * <p>
635 * Output: Nothing.
636 */
637 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
638 public static final String ACTION_SYNC_SETTINGS =
639 "android.settings.SYNC_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700640
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800641 /**
Erikeebc8e22010-02-18 13:27:19 -0800642 * Activity Action: Show add account screen for creating a new account.
643 * <p>
644 * In some cases, a matching Activity may not exist, so ensure you
645 * safeguard against this.
646 * <p>
647 * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES}
648 * extra to the Intent with one or more syncable content provider's authorities. Only account
649 * types which can sync with that content provider will be offered to the user.
650 * <p>
Alon Albert50359c22013-02-26 14:47:48 -0800651 * Account types can also be filtered by adding an {@link #EXTRA_ACCOUNT_TYPES} extra to the
652 * Intent with one or more account types.
653 * <p>
Erikeebc8e22010-02-18 13:27:19 -0800654 * Input: Nothing.
655 * <p>
656 * Output: Nothing.
657 */
658 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
659 public static final String ACTION_ADD_ACCOUNT =
660 "android.settings.ADD_ACCOUNT_SETTINGS";
661
662 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800663 * Activity Action: Show settings for selecting the network operator.
664 * <p>
665 * In some cases, a matching Activity may not exist, so ensure you
666 * safeguard against this.
667 * <p>
668 * Input: Nothing.
669 * <p>
670 * Output: Nothing.
671 */
672 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
673 public static final String ACTION_NETWORK_OPERATOR_SETTINGS =
674 "android.settings.NETWORK_OPERATOR_SETTINGS";
675
676 /**
677 * Activity Action: Show settings for selection of 2G/3G.
678 * <p>
679 * In some cases, a matching Activity may not exist, so ensure you
680 * safeguard against this.
681 * <p>
682 * Input: Nothing.
683 * <p>
684 * Output: Nothing.
685 */
686 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
687 public static final String ACTION_DATA_ROAMING_SETTINGS =
688 "android.settings.DATA_ROAMING_SETTINGS";
689
690 /**
691 * Activity Action: Show settings for internal storage.
692 * <p>
693 * In some cases, a matching Activity may not exist, so ensure you
694 * safeguard against this.
695 * <p>
696 * Input: Nothing.
697 * <p>
698 * Output: Nothing.
699 */
700 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
701 public static final String ACTION_INTERNAL_STORAGE_SETTINGS =
702 "android.settings.INTERNAL_STORAGE_SETTINGS";
703 /**
704 * Activity Action: Show settings for memory card storage.
705 * <p>
706 * In some cases, a matching Activity may not exist, so ensure you
707 * safeguard against this.
708 * <p>
709 * Input: Nothing.
710 * <p>
711 * Output: Nothing.
712 */
713 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
714 public static final String ACTION_MEMORY_CARD_SETTINGS =
715 "android.settings.MEMORY_CARD_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700716
Justin Mattsonef340352010-01-13 21:05:46 -0800717 /**
718 * Activity Action: Show settings for global search.
719 * <p>
720 * In some cases, a matching Activity may not exist, so ensure you
721 * safeguard against this.
722 * <p>
723 * Input: Nothing.
724 * <p>
725 * Output: Nothing
726 */
727 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
728 public static final String ACTION_SEARCH_SETTINGS =
729 "android.search.action.SEARCH_SETTINGS";
730
Daniel Sandler9d8b8762010-01-22 20:50:15 -0500731 /**
732 * Activity Action: Show general device information settings (serial
733 * number, software version, phone number, etc.).
734 * <p>
735 * In some cases, a matching Activity may not exist, so ensure you
736 * safeguard against this.
737 * <p>
738 * Input: Nothing.
739 * <p>
740 * Output: Nothing
741 */
742 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
743 public static final String ACTION_DEVICE_INFO_SETTINGS =
744 "android.settings.DEVICE_INFO_SETTINGS";
745
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500746 /**
Nick Pellycccf01d2011-10-31 14:49:40 -0700747 * Activity Action: Show NFC settings.
748 * <p>
749 * This shows UI that allows NFC to be turned on or off.
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500750 * <p>
751 * In some cases, a matching Activity may not exist, so ensure you
752 * safeguard against this.
753 * <p>
754 * Input: Nothing.
755 * <p>
756 * Output: Nothing
Nick Pellycccf01d2011-10-31 14:49:40 -0700757 * @see android.nfc.NfcAdapter#isEnabled()
758 */
759 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
760 public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS";
761
762 /**
763 * Activity Action: Show NFC Sharing settings.
764 * <p>
765 * This shows UI that allows NDEF Push (Android Beam) to be turned on or
766 * off.
767 * <p>
768 * In some cases, a matching Activity may not exist, so ensure you
769 * safeguard against this.
770 * <p>
771 * Input: Nothing.
772 * <p>
773 * Output: Nothing
774 * @see android.nfc.NfcAdapter#isNdefPushEnabled()
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500775 */
776 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
777 public static final String ACTION_NFCSHARING_SETTINGS =
778 "android.settings.NFCSHARING_SETTINGS";
779
Daniel Sandlerc08cd022012-11-27 22:47:37 -0500780 /**
Martijn Coenen62c196a2013-08-09 13:43:34 -0700781 * Activity Action: Show NFC Tap & Pay settings
782 * <p>
783 * This shows UI that allows the user to configure Tap&Pay
784 * settings.
785 * <p>
786 * In some cases, a matching Activity may not exist, so ensure you
787 * safeguard against this.
788 * <p>
789 * Input: Nothing.
790 * <p>
791 * Output: Nothing
792 */
793 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
794 public static final String ACTION_NFC_PAYMENT_SETTINGS =
795 "android.settings.NFC_PAYMENT_SETTINGS";
796
797 /**
Daniel Sandlerc08cd022012-11-27 22:47:37 -0500798 * Activity Action: Show Daydream settings.
799 * <p>
800 * In some cases, a matching Activity may not exist, so ensure you
801 * safeguard against this.
802 * <p>
803 * Input: Nothing.
804 * <p>
805 * Output: Nothing.
806 * @see android.service.dreams.DreamService
Daniel Sandlerc08cd022012-11-27 22:47:37 -0500807 */
808 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
809 public static final String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS";
810
Daniel Sandler5feceeb2013-03-22 18:29:23 -0700811 /**
812 * Activity Action: Show Notification listener settings.
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 * @see android.service.notification.NotificationListenerService
Daniel Sandler5feceeb2013-03-22 18:29:23 -0700821 */
822 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
823 public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS
Chris Wren8326a8a2014-10-22 14:13:32 -0400824 = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS";
Daniel Sandler5feceeb2013-03-22 18:29:23 -0700825
Alan Viverette69ce69b2013-08-29 12:23:48 -0700826 /**
John Spurlock80774932015-05-07 17:38:50 -0400827 * Activity Action: Show Do Not Disturb access settings.
828 * <p>
John Spurlock7c74f782015-06-04 13:01:42 -0400829 * Users can grant and deny access to Do Not Disturb configuration from here.
830 * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more
831 * details.
John Spurlock80774932015-05-07 17:38:50 -0400832 * <p>
833 * Input: Nothing.
834 * <p>
835 * Output: Nothing.
836 */
837 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
John Spurlock7c74f782015-06-04 13:01:42 -0400838 public static final String ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS
839 = "android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS";
John Spurlock80774932015-05-07 17:38:50 -0400840
841 /**
John Spurlock7340fc82014-04-24 18:50:12 -0400842 * @hide
843 */
844 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
845 public static final String ACTION_CONDITION_PROVIDER_SETTINGS
846 = "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS";
847
848 /**
Alan Viverette69ce69b2013-08-29 12:23:48 -0700849 * Activity Action: Show settings for video captioning.
850 * <p>
851 * In some cases, a matching Activity may not exist, so ensure you safeguard
852 * against this.
853 * <p>
854 * Input: Nothing.
855 * <p>
856 * Output: Nothing.
857 */
858 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
859 public static final String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS";
860
Svetoslav773f54d2013-09-03 14:01:43 -0700861 /**
862 * Activity Action: Show the top level print settings.
863 * <p>
864 * In some cases, a matching Activity may not exist, so ensure you
865 * safeguard against this.
866 * <p>
867 * Input: Nothing.
868 * <p>
869 * Output: Nothing.
870 */
871 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
872 public static final String ACTION_PRINT_SETTINGS =
873 "android.settings.ACTION_PRINT_SETTINGS";
874
John Spurlockde547002014-02-28 17:50:39 -0500875 /**
876 * Activity Action: Show Zen Mode configuration settings.
877 *
878 * @hide
879 */
880 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
881 public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS";
882
Santos Cordona4c75242014-07-09 12:07:51 -0700883 /**
John Spurlockfc746f82015-04-03 13:47:14 -0400884 * Activity Action: Show Zen Mode priority configuration settings.
885 *
886 * @hide
887 */
888 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
889 public static final String ACTION_ZEN_MODE_PRIORITY_SETTINGS
890 = "android.settings.ZEN_MODE_PRIORITY_SETTINGS";
891
892 /**
John Spurlock7af10182015-04-03 15:10:31 -0400893 * Activity Action: Show Zen Mode automation configuration settings.
894 *
895 * @hide
896 */
897 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
898 public static final String ACTION_ZEN_MODE_AUTOMATION_SETTINGS
899 = "android.settings.ZEN_MODE_AUTOMATION_SETTINGS";
900
901 /**
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700902 * Activity Action: Modify do not disturb mode settings.
903 * <p>
904 * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
905 * <p>
906 * This intent MUST be started using
907 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
908 * startVoiceActivity}.
909 * <p>
910 * Note: The Activity implementing this intent MUST verify that
911 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction}.
912 * returns true before modifying the setting.
913 * <p>
914 * Input: The optional {@link #EXTRA_DO_NOT_DISTURB_MODE_MINUTES} extra can be used to indicate
915 * how long the user wishes to avoid interruptions for. The optional
916 * {@link #EXTRA_DO_NOT_DISTURB_MODE_ENABLED} extra can be to indicate if the user is
917 * enabling or disabling do not disturb mode. If either extra is not included, the
918 * user maybe asked to provide the value.
919 * <p>
920 * Output: Nothing.
921 */
922 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
923 public static final String ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE =
924 "android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE";
925
926 /**
John Spurlockb2278d62015-04-07 12:47:12 -0400927 * Activity Action: Show Zen Mode schedule rule configuration settings.
928 *
929 * @hide
930 */
931 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
932 public static final String ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS
933 = "android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS";
934
935 /**
John Spurlockd60258f2015-04-30 09:30:52 -0400936 * Activity Action: Show Zen Mode event rule configuration settings.
937 *
938 * @hide
939 */
940 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
941 public static final String ACTION_ZEN_MODE_EVENT_RULE_SETTINGS
942 = "android.settings.ZEN_MODE_EVENT_RULE_SETTINGS";
943
944 /**
John Spurlock39581cc2015-04-10 11:59:01 -0400945 * Activity Action: Show Zen Mode external rule configuration settings.
946 *
947 * @hide
948 */
949 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
950 public static final String ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS
951 = "android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS";
952
953 /**
Santos Cordona4c75242014-07-09 12:07:51 -0700954 * Activity Action: Show the regulatory information screen for the device.
955 * <p>
956 * In some cases, a matching Activity may not exist, so ensure you safeguard
957 * against this.
958 * <p>
959 * Input: Nothing.
960 * <p>
961 * Output: Nothing.
962 */
Jeff Sharkeydd77fda2014-04-16 17:23:08 -0700963 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
964 public static final String
965 ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO";
966
Jerome Poichet7974cb32014-05-14 12:04:43 -0700967 /**
968 * Activity Action: Show Device Name Settings.
969 * <p>
970 * In some cases, a matching Activity may not exist, so ensure you safeguard
Tim Kilbourn87cd0dc2014-04-14 15:37:51 -0700971 * against this.
Jerome Poichet7974cb32014-05-14 12:04:43 -0700972 *
973 * @hide
974 */
975 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
976 public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME";
977
Tim Kilbourn87cd0dc2014-04-14 15:37:51 -0700978 /**
979 * Activity Action: Show pairing settings.
980 * <p>
981 * In some cases, a matching Activity may not exist, so ensure you safeguard
982 * against this.
983 *
984 * @hide
985 */
986 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
987 public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS";
988
John Spurlockf8f524c2014-06-10 14:47:29 -0400989 /**
990 * Activity Action: Show battery saver settings.
John Spurlock73466662014-10-30 13:42:05 -0400991 * <p>
992 * In some cases, a matching Activity may not exist, so ensure you safeguard
993 * against this.
John Spurlockf8f524c2014-06-10 14:47:29 -0400994 */
995 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
996 public static final String ACTION_BATTERY_SAVER_SETTINGS
997 = "android.settings.BATTERY_SAVER_SETTINGS";
998
Amith Yamasanieb7b94a2014-07-14 18:02:08 -0700999 /**
Barnaby Jamesb3006d32015-04-02 17:49:54 -07001000 * Activity Action: Modify Battery Saver mode setting using a voice command.
1001 * <p>
1002 * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
1003 * <p>
1004 * This intent MUST be started using
1005 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
1006 * startVoiceActivity}.
1007 * <p>
1008 * Note: The activity implementing this intent MUST verify that
1009 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before
1010 * modifying the setting.
1011 * <p>
1012 * Input: To tell which state batter saver mode should be set to, add the
1013 * {@link #EXTRA_BATTERY_SAVER_MODE_ENABLED} extra to this Intent with the state specified.
1014 * If the extra is not included, no changes will be made.
1015 * <p>
1016 * Output: Nothing.
1017 */
1018 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1019 public static final String ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE =
1020 "android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE";
1021
1022 /**
Amith Yamasanieb7b94a2014-07-14 18:02:08 -07001023 * Activity Action: Show Home selection settings. If there are multiple activities
1024 * that can satisfy the {@link Intent#CATEGORY_HOME} intent, this screen allows you
1025 * to pick your preferred activity.
1026 */
1027 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1028 public static final String ACTION_HOME_SETTINGS
1029 = "android.settings.HOME_SETTINGS";
1030
John Spurlock2b0e09c2014-07-27 13:27:47 -04001031 /**
1032 * Activity Action: Show notification settings.
1033 *
1034 * @hide
1035 */
1036 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1037 public static final String ACTION_NOTIFICATION_SETTINGS
1038 = "android.settings.NOTIFICATION_SETTINGS";
1039
1040 /**
1041 * Activity Action: Show notification settings for a single app.
1042 *
1043 * @hide
1044 */
1045 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1046 public static final String ACTION_APP_NOTIFICATION_SETTINGS
1047 = "android.settings.APP_NOTIFICATION_SETTINGS";
1048
Chris Wrencd8f4f72014-08-27 18:48:13 -04001049 /**
1050 * Activity Action: Show notification redaction settings.
1051 *
1052 * @hide
1053 */
1054 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1055 public static final String ACTION_APP_NOTIFICATION_REDACTION
1056 = "android.settings.ACTION_APP_NOTIFICATION_REDACTION";
1057
John Spurlock2b0e09c2014-07-27 13:27:47 -04001058 /** @hide */ public static final String EXTRA_APP_UID = "app_uid";
1059 /** @hide */ public static final String EXTRA_APP_PACKAGE = "app_package";
1060
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001061 // End of Intent actions for Settings
1062
Erikeebc8e22010-02-18 13:27:19 -08001063 /**
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001064 * @hide - Private call() method on SettingsProvider to read from 'system' table.
1065 */
1066 public static final String CALL_METHOD_GET_SYSTEM = "GET_system";
1067
1068 /**
1069 * @hide - Private call() method on SettingsProvider to read from 'secure' table.
1070 */
1071 public static final String CALL_METHOD_GET_SECURE = "GET_secure";
1072
1073 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001074 * @hide - Private call() method on SettingsProvider to read from 'global' table.
1075 */
1076 public static final String CALL_METHOD_GET_GLOBAL = "GET_global";
1077
1078 /**
1079 * @hide - User handle argument extra to the fast-path call()-based requests
1080 */
1081 public static final String CALL_METHOD_USER_KEY = "_user";
1082
1083 /** @hide - Private call() method to write to 'system' table */
1084 public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system";
1085
1086 /** @hide - Private call() method to write to 'secure' table */
1087 public static final String CALL_METHOD_PUT_SECURE = "PUT_secure";
1088
1089 /** @hide - Private call() method to write to 'global' table */
1090 public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global";
1091
1092 /**
Erikeebc8e22010-02-18 13:27:19 -08001093 * Activity Extra: Limit available options in launched activity based on the given authority.
1094 * <p>
1095 * This can be passed as an extra field in an Activity Intent with one or more syncable content
1096 * provider's authorities as a String[]. This field is used by some intents to alter the
1097 * behavior of the called activity.
1098 * <p>
1099 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based
1100 * on the authority given.
1101 */
Alon Albert50359c22013-02-26 14:47:48 -08001102 public static final String EXTRA_AUTHORITIES = "authorities";
1103
Alon Albertd35bf1f2013-04-18 14:26:51 -07001104 /**
1105 * Activity Extra: Limit available options in launched activity based on the given account
1106 * types.
1107 * <p>
1108 * This can be passed as an extra field in an Activity Intent with one or more account types
1109 * as a String[]. This field is used by some intents to alter the behavior of the called
1110 * activity.
1111 * <p>
1112 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types to the specified
1113 * list.
1114 */
Alon Albert50359c22013-02-26 14:47:48 -08001115 public static final String EXTRA_ACCOUNT_TYPES = "account_types";
Erikeebc8e22010-02-18 13:27:19 -08001116
Tadashi G. Takaoka25480202011-01-20 23:13:02 +09001117 public static final String EXTRA_INPUT_METHOD_ID = "input_method_id";
1118
Barnaby James48f35522014-07-16 14:27:39 -07001119 /**
Michael Wrightc93fbd12014-09-22 20:07:59 -07001120 * Activity Extra: The device identifier to act upon.
1121 * <p>
1122 * This can be passed as an extra field in an Activity Intent with a single
1123 * InputDeviceIdentifier. This field is used by some activities to jump straight into the
1124 * settings for the given device.
1125 * <p>
Dianne Hackbornad6a99b2014-11-18 10:11:10 -08001126 * Example: The {@link #ACTION_INPUT_METHOD_SETTINGS} intent opens the keyboard layout
1127 * dialog for the given device.
Michael Wrightc93fbd12014-09-22 20:07:59 -07001128 * @hide
1129 */
1130 public static final String EXTRA_INPUT_DEVICE_IDENTIFIER = "input_device_identifier";
1131
1132 /**
Barnaby James48f35522014-07-16 14:27:39 -07001133 * Activity Extra: Enable or disable Airplane Mode.
1134 * <p>
1135 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE}
Barnaby Jamesb3006d32015-04-02 17:49:54 -07001136 * intent as a boolean to indicate if it should be enabled.
Barnaby James48f35522014-07-16 14:27:39 -07001137 */
1138 public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled";
1139
Barnaby Jamesb3006d32015-04-02 17:49:54 -07001140 /**
1141 * Activity Extra: Enable or disable Battery saver mode.
1142 * <p>
1143 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE}
1144 * intent as a boolean to indicate if it should be enabled.
1145 */
1146 public static final String EXTRA_BATTERY_SAVER_MODE_ENABLED =
1147 "android.settings.extra.battery_saver_mode_enabled";
1148
1149 /**
1150 * Activity Extra: Enable or disable Do Not Disturb mode.
1151 * <p>
1152 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE}
1153 * intent as a boolean to indicate if it should be enabled.
1154 */
1155 public static final String EXTRA_DO_NOT_DISTURB_MODE_ENABLED =
1156 "android.settings.extra.do_not_disturb_mode_enabled";
1157
1158 /**
1159 * Activity Extra: How many minutes to enable do not disturb mode for.
1160 * <p>
1161 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE}
1162 * intent to indicate how long do not disturb mode should be enabled for.
1163 */
1164 public static final String EXTRA_DO_NOT_DISTURB_MODE_MINUTES =
1165 "android.settings.extra.do_not_disturb_mode_minutes";
1166
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001167 private static final String JID_RESOURCE_PREFIX = "android";
1168
1169 public static final String AUTHORITY = "settings";
1170
1171 private static final String TAG = "Settings";
Christopher Tate06efb532012-08-24 15:29:27 -07001172 private static final boolean LOCAL_LOGV = false;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001173
David Christie3f7b6522013-08-06 19:19:08 -07001174 // Lock ensures that when enabling/disabling the master location switch, we don't end up
1175 // with a partial enable/disable state in multi-threaded situations.
1176 private static final Object mLocationSettingsLock = new Object();
1177
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001178 public static class SettingNotFoundException extends AndroidException {
1179 public SettingNotFoundException(String msg) {
1180 super(msg);
1181 }
1182 }
1183
1184 /**
1185 * Common base for tables of name/value settings.
1186 */
1187 public static class NameValueTable implements BaseColumns {
1188 public static final String NAME = "name";
1189 public static final String VALUE = "value";
1190
1191 protected static boolean putString(ContentResolver resolver, Uri uri,
1192 String name, String value) {
1193 // The database will take care of replacing duplicates.
1194 try {
1195 ContentValues values = new ContentValues();
1196 values.put(NAME, name);
1197 values.put(VALUE, value);
1198 resolver.insert(uri, values);
1199 return true;
1200 } catch (SQLException e) {
Dianne Hackborna33e3f72009-09-29 17:28:24 -07001201 Log.w(TAG, "Can't set key " + name + " in " + uri, e);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001202 return false;
1203 }
1204 }
1205
1206 public static Uri getUriFor(Uri uri, String name) {
1207 return Uri.withAppendedPath(uri, name);
1208 }
1209 }
1210
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001211 // Thread-safe.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001212 private static class NameValueCache {
1213 private final String mVersionSystemProperty;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001214 private final Uri mUri;
1215
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001216 private static final String[] SELECT_VALUE =
1217 new String[] { Settings.NameValueTable.VALUE };
1218 private static final String NAME_EQ_PLACEHOLDER = "name=?";
1219
1220 // Must synchronize on 'this' to access mValues and mValuesVersion.
Dan Egnor799f7212009-11-24 16:24:44 -08001221 private final HashMap<String, String> mValues = new HashMap<String, String>();
1222 private long mValuesVersion = 0;
1223
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001224 // Initially null; set lazily and held forever. Synchronized on 'this'.
1225 private IContentProvider mContentProvider = null;
1226
1227 // The method we'll call (or null, to not use) on the provider
1228 // for the fast path of retrieving settings.
Christopher Tate06efb532012-08-24 15:29:27 -07001229 private final String mCallGetCommand;
1230 private final String mCallSetCommand;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001231
Christopher Tate06efb532012-08-24 15:29:27 -07001232 public NameValueCache(String versionSystemProperty, Uri uri,
1233 String getCommand, String setCommand) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001234 mVersionSystemProperty = versionSystemProperty;
1235 mUri = uri;
Christopher Tate06efb532012-08-24 15:29:27 -07001236 mCallGetCommand = getCommand;
1237 mCallSetCommand = setCommand;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001238 }
1239
Christopher Tate06efb532012-08-24 15:29:27 -07001240 private IContentProvider lazyGetProvider(ContentResolver cr) {
1241 IContentProvider cp = null;
1242 synchronized (this) {
1243 cp = mContentProvider;
1244 if (cp == null) {
1245 cp = mContentProvider = cr.acquireProvider(mUri.getAuthority());
1246 }
1247 }
1248 return cp;
1249 }
1250
1251 public boolean putStringForUser(ContentResolver cr, String name, String value,
1252 final int userHandle) {
1253 try {
1254 Bundle arg = new Bundle();
1255 arg.putString(Settings.NameValueTable.VALUE, value);
Christopher Tated5fe1472012-09-10 15:48:38 -07001256 arg.putInt(CALL_METHOD_USER_KEY, userHandle);
Christopher Tate06efb532012-08-24 15:29:27 -07001257 IContentProvider cp = lazyGetProvider(cr);
Dianne Hackborn35654b62013-01-14 17:38:02 -08001258 cp.call(cr.getPackageName(), mCallSetCommand, name, arg);
Christopher Tate06efb532012-08-24 15:29:27 -07001259 } catch (RemoteException e) {
1260 Log.w(TAG, "Can't set key " + name + " in " + mUri, e);
1261 return false;
1262 }
1263 return true;
1264 }
1265
Christopher Tate06efb532012-08-24 15:29:27 -07001266 public String getStringForUser(ContentResolver cr, String name, final int userHandle) {
Christopher Tate78d2a662012-09-13 16:19:44 -07001267 final boolean isSelf = (userHandle == UserHandle.myUserId());
1268 if (isSelf) {
1269 long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0);
Dan Egnor799f7212009-11-24 16:24:44 -08001270
Christopher Tate78d2a662012-09-13 16:19:44 -07001271 // Our own user's settings data uses a client-side cache
1272 synchronized (this) {
1273 if (mValuesVersion != newValuesVersion) {
1274 if (LOCAL_LOGV || false) {
1275 Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current "
1276 + newValuesVersion + " != cached " + mValuesVersion);
1277 }
1278
1279 mValues.clear();
1280 mValuesVersion = newValuesVersion;
Dan Egnor799f7212009-11-24 16:24:44 -08001281 }
1282
Christopher Tate78d2a662012-09-13 16:19:44 -07001283 if (mValues.containsKey(name)) {
1284 return mValues.get(name); // Could be null, that's OK -- negative caching
1285 }
Dan Egnor799f7212009-11-24 16:24:44 -08001286 }
Christopher Tate78d2a662012-09-13 16:19:44 -07001287 } else {
1288 if (LOCAL_LOGV) Log.v(TAG, "get setting for user " + userHandle
1289 + " by user " + UserHandle.myUserId() + " so skipping cache");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001290 }
Dan Egnor799f7212009-11-24 16:24:44 -08001291
Christopher Tate06efb532012-08-24 15:29:27 -07001292 IContentProvider cp = lazyGetProvider(cr);
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001293
1294 // Try the fast path first, not using query(). If this
1295 // fails (alternate Settings provider that doesn't support
1296 // this interface?) then we fall back to the query/table
1297 // interface.
Christopher Tate06efb532012-08-24 15:29:27 -07001298 if (mCallGetCommand != null) {
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001299 try {
Christopher Tate06efb532012-08-24 15:29:27 -07001300 Bundle args = null;
Christopher Tate5e08af02012-09-21 17:17:22 -07001301 if (!isSelf) {
Christopher Tate06efb532012-08-24 15:29:27 -07001302 args = new Bundle();
1303 args.putInt(CALL_METHOD_USER_KEY, userHandle);
1304 }
Dianne Hackborn35654b62013-01-14 17:38:02 -08001305 Bundle b = cp.call(cr.getPackageName(), mCallGetCommand, name, args);
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001306 if (b != null) {
1307 String value = b.getPairValue();
Christopher Tate78d2a662012-09-13 16:19:44 -07001308 // Don't update our cache for reads of other users' data
1309 if (isSelf) {
1310 synchronized (this) {
1311 mValues.put(name, value);
1312 }
1313 } else {
1314 if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle
1315 + " by " + UserHandle.myUserId()
1316 + " so not updating cache");
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001317 }
1318 return value;
1319 }
1320 // If the response Bundle is null, we fall through
1321 // to the query interface below.
1322 } catch (RemoteException e) {
1323 // Not supported by the remote side? Fall through
1324 // to query().
1325 }
1326 }
1327
Dan Egnor799f7212009-11-24 16:24:44 -08001328 Cursor c = null;
1329 try {
Dianne Hackborn35654b62013-01-14 17:38:02 -08001330 c = cp.query(cr.getPackageName(), mUri, SELECT_VALUE, NAME_EQ_PLACEHOLDER,
Jeff Brown75ea64f2012-01-25 19:37:13 -08001331 new String[]{name}, null, null);
Dan Egnor799f7212009-11-24 16:24:44 -08001332 if (c == null) {
1333 Log.w(TAG, "Can't get key " + name + " from " + mUri);
1334 return null;
1335 }
1336
1337 String value = c.moveToNext() ? c.getString(0) : null;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001338 synchronized (this) {
Dan Egnor799f7212009-11-24 16:24:44 -08001339 mValues.put(name, value);
1340 }
1341 if (LOCAL_LOGV) {
1342 Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " +
1343 name + " = " + (value == null ? "(null)" : value));
1344 }
1345 return value;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001346 } catch (RemoteException e) {
Dan Egnor799f7212009-11-24 16:24:44 -08001347 Log.w(TAG, "Can't get key " + name + " from " + mUri, e);
1348 return null; // Return null, but don't cache it.
1349 } finally {
1350 if (c != null) c.close();
1351 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001352 }
1353 }
1354
1355 /**
1356 * System settings, containing miscellaneous system preferences. This
1357 * table holds simple name/value pairs. There are convenience
1358 * functions for accessing individual settings entries.
1359 */
1360 public static final class System extends NameValueTable {
1361 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version";
1362
Svetoslav683914b2015-01-15 14:22:26 -08001363 /** @hide */
1364 public static interface Validator {
1365 public boolean validate(String value);
1366 }
1367
Dianne Hackborn139748f2012-09-24 11:36:57 -07001368 /**
1369 * The content:// style URL for this table
1370 */
1371 public static final Uri CONTENT_URI =
1372 Uri.parse("content://" + AUTHORITY + "/system");
1373
1374 private static final NameValueCache sNameValueCache = new NameValueCache(
1375 SYS_PROP_SETTING_VERSION,
1376 CONTENT_URI,
1377 CALL_METHOD_GET_SYSTEM,
1378 CALL_METHOD_PUT_SYSTEM);
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07001379
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001380 private static final HashSet<String> MOVED_TO_SECURE;
1381 static {
1382 MOVED_TO_SECURE = new HashSet<String>(30);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001383 MOVED_TO_SECURE.add(Secure.ANDROID_ID);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001384 MOVED_TO_SECURE.add(Secure.HTTP_PROXY);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001385 MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED);
Danielle Millett925a7d82012-03-19 18:02:20 -04001386 MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS);
Amith Yamasani156c4352010-03-05 17:10:03 -08001387 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED);
1388 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE);
1389 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001390 MOVED_TO_SECURE.add(Secure.LOGGING_ID);
1391 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED);
1392 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE);
1393 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL);
1394 MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001395 MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL);
1396 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON);
1397 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY);
1398 MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT);
1399 MOVED_TO_SECURE.add(Secure.WIFI_ON);
1400 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE);
1401 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT);
1402 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS);
1403 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED);
1404 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS);
1405 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT);
1406 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS);
1407 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON);
1408 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT);
1409 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS);
1410 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS);
Christopher Tateaa036a22014-05-19 16:33:27 -07001411
1412 // At one time in System, then Global, but now back in Secure
1413 MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001414 }
1415
Christopher Tate06efb532012-08-24 15:29:27 -07001416 private static final HashSet<String> MOVED_TO_GLOBAL;
Christopher Tate66488d62012-10-02 11:58:01 -07001417 private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL;
Christopher Tate06efb532012-08-24 15:29:27 -07001418 static {
1419 MOVED_TO_GLOBAL = new HashSet<String>();
Christopher Tate66488d62012-10-02 11:58:01 -07001420 MOVED_TO_SECURE_THEN_GLOBAL = new HashSet<String>();
1421
Christopher Tate92198742012-09-07 12:00:13 -07001422 // these were originally in system but migrated to secure in the past,
1423 // so are duplicated in the Secure.* namespace
Christopher Tate66488d62012-10-02 11:58:01 -07001424 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.ADB_ENABLED);
1425 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.BLUETOOTH_ON);
1426 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DATA_ROAMING);
1427 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DEVICE_PROVISIONED);
Christopher Tate66488d62012-10-02 11:58:01 -07001428 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED);
1429 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.HTTP_PROXY);
Christopher Tate06efb532012-08-24 15:29:27 -07001430
Christopher Tate92198742012-09-07 12:00:13 -07001431 // these are moving directly from system to global
Christopher Tate06efb532012-08-24 15:29:27 -07001432 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON);
1433 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS);
1434 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS);
1435 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME);
1436 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE);
1437 MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND);
1438 MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND);
1439 MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND);
1440 MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND);
1441 MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED);
1442 MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND);
1443 MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND);
1444 MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND);
1445 MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED);
1446 MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN);
1447 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY);
Eric Laurentbc0fab1f2012-09-19 11:24:41 -07001448 MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER);
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07001449 MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE);
1450 MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE);
1451 MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE);
1452 MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS);
1453 MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE);
1454 MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE);
1455 MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY);
1456 MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP);
1457 MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER);
1458 MOVED_TO_GLOBAL.add(Settings.Global.SHOW_PROCESSES);
1459 MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES);
Geremy Condraa0735112013-03-26 21:49:26 -07001460 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_CONTENT_URL);
1461 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_METADATA_URL);
1462 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_CONTENT_URL);
1463 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_METADATA_URL);
1464 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL);
1465 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL);
1466 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_CONTENT_URL);
1467 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL);
Christopher Tate06efb532012-08-24 15:29:27 -07001468 }
1469
Svetoslav683914b2015-01-15 14:22:26 -08001470 private static final Validator sBooleanValidator =
1471 new DiscreteValueValidator(new String[] {"0", "1"});
1472
1473 private static final Validator sNonNegativeIntegerValidator = new Validator() {
1474 @Override
1475 public boolean validate(String value) {
1476 try {
1477 return Integer.parseInt(value) >= 0;
1478 } catch (NumberFormatException e) {
1479 return false;
1480 }
1481 }
1482 };
1483
Svetoslav683914b2015-01-15 14:22:26 -08001484 private static final Validator sUriValidator = new Validator() {
1485 @Override
1486 public boolean validate(String value) {
1487 try {
1488 Uri.decode(value);
1489 return true;
1490 } catch (IllegalArgumentException e) {
1491 return false;
1492 }
1493 }
1494 };
1495
1496 private static final Validator sLenientIpAddressValidator = new Validator() {
1497 private static final int MAX_IPV6_LENGTH = 45;
1498
1499 @Override
1500 public boolean validate(String value) {
1501 return value.length() <= MAX_IPV6_LENGTH;
1502 }
1503 };
1504
Christopher Tate66488d62012-10-02 11:58:01 -07001505 /** @hide */
Svetoslav683914b2015-01-15 14:22:26 -08001506 public static void getMovedToGlobalSettings(Set<String> outKeySet) {
Christopher Tate66488d62012-10-02 11:58:01 -07001507 outKeySet.addAll(MOVED_TO_GLOBAL);
1508 outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL);
1509 }
1510
1511 /** @hide */
Svetoslav683914b2015-01-15 14:22:26 -08001512 public static void getMovedToSecureSettings(Set<String> outKeySet) {
1513 outKeySet.addAll(MOVED_TO_SECURE);
1514 }
1515
1516 /** @hide */
Christopher Tate66488d62012-10-02 11:58:01 -07001517 public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) {
1518 outKeySet.addAll(MOVED_TO_GLOBAL);
1519 }
1520
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001521 /**
1522 * Look up a name in the database.
1523 * @param resolver to access the database with
1524 * @param name to look up in the table
1525 * @return the corresponding value, or null if not present
1526 */
Dianne Hackborn139748f2012-09-24 11:36:57 -07001527 public static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07001528 return getStringForUser(resolver, name, UserHandle.myUserId());
1529 }
1530
1531 /** @hide */
Dianne Hackborn139748f2012-09-24 11:36:57 -07001532 public static String getStringForUser(ContentResolver resolver, String name,
Christopher Tate06efb532012-08-24 15:29:27 -07001533 int userHandle) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001534 if (MOVED_TO_SECURE.contains(name)) {
1535 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1536 + " to android.provider.Settings.Secure, returning read-only value.");
Christopher Tate06efb532012-08-24 15:29:27 -07001537 return Secure.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001538 }
Christopher Tate66488d62012-10-02 11:58:01 -07001539 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Christopher Tate06efb532012-08-24 15:29:27 -07001540 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1541 + " to android.provider.Settings.Global, returning read-only value.");
1542 return Global.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001543 }
Christopher Tate06efb532012-08-24 15:29:27 -07001544 return sNameValueCache.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001545 }
1546
1547 /**
1548 * Store a name/value pair into the database.
1549 * @param resolver to access the database with
1550 * @param name to store
1551 * @param value to associate with the name
1552 * @return true if the value was set, false on database errors
1553 */
1554 public static boolean putString(ContentResolver resolver, String name, String value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001555 return putStringForUser(resolver, name, value, UserHandle.myUserId());
1556 }
1557
1558 /** @hide */
1559 public static boolean putStringForUser(ContentResolver resolver, String name, String value,
1560 int userHandle) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001561 if (MOVED_TO_SECURE.contains(name)) {
1562 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1563 + " to android.provider.Settings.Secure, value is unchanged.");
1564 return false;
1565 }
Christopher Tate66488d62012-10-02 11:58:01 -07001566 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Christopher Tate06efb532012-08-24 15:29:27 -07001567 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1568 + " to android.provider.Settings.Global, value is unchanged.");
1569 return false;
1570 }
Christopher Tate06efb532012-08-24 15:29:27 -07001571 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001572 }
1573
1574 /**
1575 * Construct the content URI for a particular name/value pair,
1576 * useful for monitoring changes with a ContentObserver.
1577 * @param name to look up in the table
1578 * @return the corresponding content URI, or null if not present
1579 */
1580 public static Uri getUriFor(String name) {
1581 if (MOVED_TO_SECURE.contains(name)) {
1582 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1583 + " to android.provider.Settings.Secure, returning Secure URI.");
1584 return Secure.getUriFor(Secure.CONTENT_URI, name);
1585 }
Christopher Tate66488d62012-10-02 11:58:01 -07001586 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Christopher Tate06efb532012-08-24 15:29:27 -07001587 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1588 + " to android.provider.Settings.Global, returning read-only global URI.");
1589 return Global.getUriFor(Global.CONTENT_URI, name);
1590 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001591 return getUriFor(CONTENT_URI, name);
1592 }
1593
1594 /**
1595 * Convenience function for retrieving a single system settings value
1596 * as an integer. Note that internally setting values are always
1597 * stored as strings; this function converts the string to an integer
1598 * for you. The default value will be returned if the setting is
1599 * not defined or not an integer.
1600 *
1601 * @param cr The ContentResolver to access.
1602 * @param name The name of the setting to retrieve.
1603 * @param def Value to return if the setting is not defined.
1604 *
1605 * @return The setting's current value, or 'def' if it is not defined
1606 * or not a valid integer.
1607 */
1608 public static int getInt(ContentResolver cr, String name, int def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001609 return getIntForUser(cr, name, def, UserHandle.myUserId());
1610 }
1611
1612 /** @hide */
1613 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
1614 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001615 try {
1616 return v != null ? Integer.parseInt(v) : def;
1617 } catch (NumberFormatException e) {
1618 return def;
1619 }
1620 }
1621
1622 /**
1623 * Convenience function for retrieving a single system settings value
1624 * as an integer. Note that internally setting values are always
1625 * stored as strings; this function converts the string to an integer
1626 * for you.
1627 * <p>
1628 * This version does not take a default value. If the setting has not
1629 * been set, or the string value is not a number,
1630 * it throws {@link SettingNotFoundException}.
1631 *
1632 * @param cr The ContentResolver to access.
1633 * @param name The name of the setting to retrieve.
1634 *
1635 * @throws SettingNotFoundException Thrown if a setting by the given
1636 * name can't be found or the setting value is not an integer.
1637 *
1638 * @return The setting's current value.
1639 */
1640 public static int getInt(ContentResolver cr, String name)
1641 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001642 return getIntForUser(cr, name, UserHandle.myUserId());
1643 }
1644
1645 /** @hide */
1646 public static int getIntForUser(ContentResolver cr, String name, int userHandle)
1647 throws SettingNotFoundException {
1648 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001649 try {
1650 return Integer.parseInt(v);
1651 } catch (NumberFormatException e) {
1652 throw new SettingNotFoundException(name);
1653 }
1654 }
1655
1656 /**
1657 * Convenience function for updating a single settings value as an
1658 * integer. This will either create a new entry in the table if the
1659 * given name does not exist, or modify the value of the existing row
1660 * with that name. Note that internally setting values are always
1661 * stored as strings, so this function converts the given value to a
1662 * string before storing it.
1663 *
1664 * @param cr The ContentResolver to access.
1665 * @param name The name of the setting to modify.
1666 * @param value The new value for the setting.
1667 * @return true if the value was set, false on database errors
1668 */
1669 public static boolean putInt(ContentResolver cr, String name, int value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001670 return putIntForUser(cr, name, value, UserHandle.myUserId());
1671 }
1672
1673 /** @hide */
1674 public static boolean putIntForUser(ContentResolver cr, String name, int value,
1675 int userHandle) {
1676 return putStringForUser(cr, name, Integer.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001677 }
1678
1679 /**
1680 * Convenience function for retrieving a single system settings value
1681 * as a {@code long}. Note that internally setting values are always
1682 * stored as strings; this function converts the string to a {@code long}
1683 * for you. The default value will be returned if the setting is
1684 * not defined or not a {@code long}.
1685 *
1686 * @param cr The ContentResolver to access.
1687 * @param name The name of the setting to retrieve.
1688 * @param def Value to return if the setting is not defined.
1689 *
1690 * @return The setting's current value, or 'def' if it is not defined
1691 * or not a valid {@code long}.
1692 */
1693 public static long getLong(ContentResolver cr, String name, long def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001694 return getLongForUser(cr, name, def, UserHandle.myUserId());
1695 }
1696
1697 /** @hide */
1698 public static long getLongForUser(ContentResolver cr, String name, long def,
1699 int userHandle) {
1700 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001701 long value;
1702 try {
1703 value = valString != null ? Long.parseLong(valString) : def;
1704 } catch (NumberFormatException e) {
1705 value = def;
1706 }
1707 return value;
1708 }
1709
1710 /**
1711 * Convenience function for retrieving a single system settings value
1712 * as a {@code long}. Note that internally setting values are always
1713 * stored as strings; this function converts the string to a {@code long}
1714 * for you.
1715 * <p>
1716 * This version does not take a default value. If the setting has not
1717 * been set, or the string value is not a number,
1718 * it throws {@link SettingNotFoundException}.
1719 *
1720 * @param cr The ContentResolver to access.
1721 * @param name The name of the setting to retrieve.
1722 *
1723 * @return The setting's current value.
1724 * @throws SettingNotFoundException Thrown if a setting by the given
1725 * name can't be found or the setting value is not an integer.
1726 */
1727 public static long getLong(ContentResolver cr, String name)
1728 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001729 return getLongForUser(cr, name, UserHandle.myUserId());
1730 }
1731
1732 /** @hide */
1733 public static long getLongForUser(ContentResolver cr, String name, int userHandle)
1734 throws SettingNotFoundException {
1735 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001736 try {
1737 return Long.parseLong(valString);
1738 } catch (NumberFormatException e) {
1739 throw new SettingNotFoundException(name);
1740 }
1741 }
1742
1743 /**
1744 * Convenience function for updating a single settings value as a long
1745 * integer. This will either create a new entry in the table if the
1746 * given name does not exist, or modify the value of the existing row
1747 * with that name. Note that internally setting values are always
1748 * stored as strings, so this function converts the given value to a
1749 * string before storing it.
1750 *
1751 * @param cr The ContentResolver to access.
1752 * @param name The name of the setting to modify.
1753 * @param value The new value for the setting.
1754 * @return true if the value was set, false on database errors
1755 */
1756 public static boolean putLong(ContentResolver cr, String name, long value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001757 return putLongForUser(cr, name, value, UserHandle.myUserId());
1758 }
1759
1760 /** @hide */
1761 public static boolean putLongForUser(ContentResolver cr, String name, long value,
1762 int userHandle) {
1763 return putStringForUser(cr, name, Long.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001764 }
1765
1766 /**
1767 * Convenience function for retrieving a single system settings value
1768 * as a floating point number. Note that internally setting values are
1769 * always stored as strings; this function converts the string to an
1770 * float for you. The default value will be returned if the setting
1771 * is not defined or not a valid float.
1772 *
1773 * @param cr The ContentResolver to access.
1774 * @param name The name of the setting to retrieve.
1775 * @param def Value to return if the setting is not defined.
1776 *
1777 * @return The setting's current value, or 'def' if it is not defined
1778 * or not a valid float.
1779 */
1780 public static float getFloat(ContentResolver cr, String name, float def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001781 return getFloatForUser(cr, name, def, UserHandle.myUserId());
1782 }
1783
1784 /** @hide */
1785 public static float getFloatForUser(ContentResolver cr, String name, float def,
1786 int userHandle) {
1787 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001788 try {
1789 return v != null ? Float.parseFloat(v) : def;
1790 } catch (NumberFormatException e) {
1791 return def;
1792 }
1793 }
1794
1795 /**
1796 * Convenience function for retrieving a single system settings value
1797 * as a float. Note that internally setting values are always
1798 * stored as strings; this function converts the string to a float
1799 * for you.
1800 * <p>
1801 * This version does not take a default value. If the setting has not
1802 * been set, or the string value is not a number,
1803 * it throws {@link SettingNotFoundException}.
1804 *
1805 * @param cr The ContentResolver to access.
1806 * @param name The name of the setting to retrieve.
1807 *
1808 * @throws SettingNotFoundException Thrown if a setting by the given
1809 * name can't be found or the setting value is not a float.
1810 *
1811 * @return The setting's current value.
1812 */
1813 public static float getFloat(ContentResolver cr, String name)
1814 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001815 return getFloatForUser(cr, name, UserHandle.myUserId());
1816 }
1817
1818 /** @hide */
1819 public static float getFloatForUser(ContentResolver cr, String name, int userHandle)
1820 throws SettingNotFoundException {
1821 String v = getStringForUser(cr, name, userHandle);
Brian Muramatsue1d46982010-12-06 17:34:20 -08001822 if (v == null) {
1823 throw new SettingNotFoundException(name);
1824 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001825 try {
1826 return Float.parseFloat(v);
1827 } catch (NumberFormatException e) {
1828 throw new SettingNotFoundException(name);
1829 }
1830 }
1831
1832 /**
1833 * Convenience function for updating a single settings value as a
1834 * floating point number. This will either create a new entry in the
1835 * table if the given name does not exist, or modify the value of the
1836 * existing row with that name. Note that internally setting values
1837 * are always stored as strings, so this function converts the given
1838 * value to a string before storing it.
1839 *
1840 * @param cr The ContentResolver to access.
1841 * @param name The name of the setting to modify.
1842 * @param value The new value for the setting.
1843 * @return true if the value was set, false on database errors
1844 */
1845 public static boolean putFloat(ContentResolver cr, String name, float value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001846 return putFloatForUser(cr, name, value, UserHandle.myUserId());
1847 }
1848
1849 /** @hide */
1850 public static boolean putFloatForUser(ContentResolver cr, String name, float value,
1851 int userHandle) {
1852 return putStringForUser(cr, name, Float.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001853 }
1854
1855 /**
1856 * Convenience function to read all of the current
1857 * configuration-related settings into a
1858 * {@link Configuration} object.
1859 *
1860 * @param cr The ContentResolver to access.
1861 * @param outConfig Where to place the configuration settings.
1862 */
1863 public static void getConfiguration(ContentResolver cr, Configuration outConfig) {
Christopher Tate06efb532012-08-24 15:29:27 -07001864 getConfigurationForUser(cr, outConfig, UserHandle.myUserId());
1865 }
1866
1867 /** @hide */
1868 public static void getConfigurationForUser(ContentResolver cr, Configuration outConfig,
1869 int userHandle) {
1870 outConfig.fontScale = Settings.System.getFloatForUser(
1871 cr, FONT_SCALE, outConfig.fontScale, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001872 if (outConfig.fontScale < 0) {
1873 outConfig.fontScale = 1;
1874 }
1875 }
1876
1877 /**
Dianne Hackborn31ca8542011-07-19 14:58:28 -07001878 * @hide Erase the fields in the Configuration that should be applied
1879 * by the settings.
1880 */
1881 public static void clearConfiguration(Configuration inoutConfig) {
1882 inoutConfig.fontScale = 0;
1883 }
Narayan Kamath6d632962011-08-24 11:51:37 +01001884
Dianne Hackborn31ca8542011-07-19 14:58:28 -07001885 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001886 * Convenience function to write a batch of configuration-related
1887 * settings from a {@link Configuration} object.
1888 *
1889 * @param cr The ContentResolver to access.
1890 * @param config The settings to write.
1891 * @return true if the values were set, false on database errors
1892 */
1893 public static boolean putConfiguration(ContentResolver cr, Configuration config) {
Christopher Tate06efb532012-08-24 15:29:27 -07001894 return putConfigurationForUser(cr, config, UserHandle.myUserId());
1895 }
1896
1897 /** @hide */
1898 public static boolean putConfigurationForUser(ContentResolver cr, Configuration config,
1899 int userHandle) {
1900 return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001901 }
1902
Dianne Hackbornb8b11a02010-03-10 15:53:11 -08001903 /** @hide */
1904 public static boolean hasInterestingConfigurationChanges(int changes) {
1905 return (changes&ActivityInfo.CONFIG_FONT_SCALE) != 0;
1906 }
Jaikumar Ganesh545e6702010-06-04 10:23:03 -07001907
Christopher Tate06efb532012-08-24 15:29:27 -07001908 /** @deprecated - Do not use */
1909 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001910 public static boolean getShowGTalkServiceStatus(ContentResolver cr) {
Christopher Tate06efb532012-08-24 15:29:27 -07001911 return getShowGTalkServiceStatusForUser(cr, UserHandle.myUserId());
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001912 }
1913
Christopher Tate06efb532012-08-24 15:29:27 -07001914 /**
1915 * @hide
1916 * @deprecated - Do not use
1917 */
1918 public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr,
1919 int userHandle) {
1920 return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0;
1921 }
1922
1923 /** @deprecated - Do not use */
1924 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001925 public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) {
Christopher Tatec8c08382012-09-19 17:18:18 -07001926 setShowGTalkServiceStatusForUser(cr, flag, UserHandle.myUserId());
Christopher Tate06efb532012-08-24 15:29:27 -07001927 }
1928
1929 /**
1930 * @hide
1931 * @deprecated - Do not use
1932 */
1933 @Deprecated
1934 public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag,
1935 int userHandle) {
1936 putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001937 }
1938
Svetoslav683914b2015-01-15 14:22:26 -08001939 private static final class DiscreteValueValidator implements Validator {
1940 private final String[] mValues;
1941
1942 public DiscreteValueValidator(String[] values) {
1943 mValues = values;
1944 }
1945
Svetoslav1b71ea92015-02-17 18:20:29 -08001946 @Override
Svetoslav683914b2015-01-15 14:22:26 -08001947 public boolean validate(String value) {
1948 return ArrayUtils.contains(mValues, value);
1949 }
1950 }
1951
1952 private static final class InclusiveIntegerRangeValidator implements Validator {
1953 private final int mMin;
1954 private final int mMax;
1955
1956 public InclusiveIntegerRangeValidator(int min, int max) {
1957 mMin = min;
1958 mMax = max;
1959 }
1960
Svetoslav1b71ea92015-02-17 18:20:29 -08001961 @Override
Svetoslav683914b2015-01-15 14:22:26 -08001962 public boolean validate(String value) {
1963 try {
1964 final int intValue = Integer.parseInt(value);
1965 return intValue >= mMin && intValue <= mMax;
1966 } catch (NumberFormatException e) {
1967 return false;
1968 }
1969 }
1970 }
1971
1972 private static final class InclusiveFloatRangeValidator implements Validator {
1973 private final float mMin;
1974 private final float mMax;
1975
1976 public InclusiveFloatRangeValidator(float min, float max) {
1977 mMin = min;
1978 mMax = max;
1979 }
1980
Svetoslav1b71ea92015-02-17 18:20:29 -08001981 @Override
Svetoslav683914b2015-01-15 14:22:26 -08001982 public boolean validate(String value) {
1983 try {
1984 final float floatValue = Float.parseFloat(value);
1985 return floatValue >= mMin && floatValue <= mMax;
1986 } catch (NumberFormatException e) {
1987 return false;
1988 }
1989 }
1990 }
1991
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001992 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001993 * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001994 */
Christopher Tate06efb532012-08-24 15:29:27 -07001995 @Deprecated
1996 public static final String STAY_ON_WHILE_PLUGGED_IN = Global.STAY_ON_WHILE_PLUGGED_IN;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001997
1998 /**
1999 * What happens when the user presses the end call button if they're not
2000 * on a call.<br/>
2001 * <b>Values:</b><br/>
2002 * 0 - The end button does nothing.<br/>
2003 * 1 - The end button goes to the home screen.<br/>
2004 * 2 - The end button puts the device to sleep and locks the keyguard.<br/>
2005 * 3 - The end button goes to the home screen. If the user is already on the
2006 * home screen, it puts the device to sleep.
2007 */
2008 public static final String END_BUTTON_BEHAVIOR = "end_button_behavior";
2009
Svetoslav683914b2015-01-15 14:22:26 -08002010 private static final Validator END_BUTTON_BEHAVIOR_VALIDATOR =
2011 new InclusiveIntegerRangeValidator(0, 3);
2012
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002013 /**
David Brown458e8062010-03-08 21:52:11 -08002014 * END_BUTTON_BEHAVIOR value for "go home".
2015 * @hide
2016 */
2017 public static final int END_BUTTON_BEHAVIOR_HOME = 0x1;
2018
2019 /**
2020 * END_BUTTON_BEHAVIOR value for "go to sleep".
2021 * @hide
2022 */
2023 public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2;
2024
2025 /**
2026 * END_BUTTON_BEHAVIOR default value.
2027 * @hide
2028 */
2029 public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP;
2030
2031 /**
Joe Onorato9cdffa12011-04-06 18:27:27 -07002032 * Is advanced settings mode turned on. 0 == no, 1 == yes
2033 * @hide
2034 */
2035 public static final String ADVANCED_SETTINGS = "advanced_settings";
2036
Svetoslav683914b2015-01-15 14:22:26 -08002037 private static final Validator ADVANCED_SETTINGS_VALIDATOR = sBooleanValidator;
2038
Joe Onorato9cdffa12011-04-06 18:27:27 -07002039 /**
2040 * ADVANCED_SETTINGS default value.
2041 * @hide
2042 */
2043 public static final int ADVANCED_SETTINGS_DEFAULT = 0;
2044
2045 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002046 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002047 */
Christopher Tate06efb532012-08-24 15:29:27 -07002048 @Deprecated
2049 public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002050
2051 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002052 * @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002053 */
Christopher Tate06efb532012-08-24 15:29:27 -07002054 @Deprecated
2055 public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002056
2057 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002058 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002059 */
Christopher Tate06efb532012-08-24 15:29:27 -07002060 @Deprecated
2061 public static final String RADIO_WIFI = Global.RADIO_WIFI;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002062
Robert Greenwalt8588e472011-11-08 10:12:25 -08002063 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002064 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead
Robert Greenwalt8588e472011-11-08 10:12:25 -08002065 * {@hide}
2066 */
Christopher Tate06efb532012-08-24 15:29:27 -07002067 @Deprecated
2068 public static final String RADIO_WIMAX = Global.RADIO_WIMAX;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002069
2070 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002071 * @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead
Nick Pelly8d32a012011-08-09 07:03:49 -07002072 */
Christopher Tate06efb532012-08-24 15:29:27 -07002073 @Deprecated
2074 public static final String RADIO_CELL = Global.RADIO_CELL;
Nick Pelly8d32a012011-08-09 07:03:49 -07002075
2076 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002077 * @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002078 */
Christopher Tate06efb532012-08-24 15:29:27 -07002079 @Deprecated
2080 public static final String RADIO_NFC = Global.RADIO_NFC;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002081
2082 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002083 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead
2084 */
2085 @Deprecated
2086 public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS;
2087
2088 /**
2089 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead
Mike Lockwoodbd5ddf02009-07-29 21:37:14 -07002090 *
2091 * {@hide}
2092 */
Christopher Tate06efb532012-08-24 15:29:27 -07002093 @Deprecated
2094 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS =
2095 Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS;
Mike Lockwoodbd5ddf02009-07-29 21:37:14 -07002096
2097 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002098 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002099 */
Christopher Tate06efb532012-08-24 15:29:27 -07002100 @Deprecated
2101 public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002102
2103 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002104 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002105 */
Christopher Tate06efb532012-08-24 15:29:27 -07002106 @Deprecated
2107 public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002108
2109 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002110 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002111 */
Christopher Tate06efb532012-08-24 15:29:27 -07002112 @Deprecated
2113 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED =
2114 Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002115
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002116 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002117 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002118 */
Christopher Tate06efb532012-08-24 15:29:27 -07002119 @Deprecated
2120 public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002121
Eric Laurentbc0fab1f2012-09-19 11:24:41 -07002122 /**
2123 * @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead
2124 */
2125 @Deprecated
2126 public static final String MODE_RINGER = Global.MODE_RINGER;
2127
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002128 /**
2129 * Whether to use static IP and other static network attributes.
2130 * <p>
2131 * Set to 1 for true and 0 for false.
Jeff Sharkey625239a2012-09-26 22:03:49 -07002132 *
2133 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002134 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002135 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002136 public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip";
2137
Svetoslav683914b2015-01-15 14:22:26 -08002138 private static final Validator WIFI_USE_STATIC_IP_VALIDATOR = sBooleanValidator;
2139
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002140 /**
2141 * The static IP address.
2142 * <p>
2143 * Example: "192.168.1.51"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002144 *
2145 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002146 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002147 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002148 public static final String WIFI_STATIC_IP = "wifi_static_ip";
2149
Svetoslav683914b2015-01-15 14:22:26 -08002150 private static final Validator WIFI_STATIC_IP_VALIDATOR = sLenientIpAddressValidator;
2151
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002152 /**
2153 * If using static IP, the gateway's IP address.
2154 * <p>
2155 * Example: "192.168.1.1"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002156 *
2157 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002158 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002159 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002160 public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway";
2161
Svetoslav683914b2015-01-15 14:22:26 -08002162 private static final Validator WIFI_STATIC_GATEWAY_VALIDATOR = sLenientIpAddressValidator;
2163
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002164 /**
2165 * If using static IP, the net mask.
2166 * <p>
2167 * Example: "255.255.255.0"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002168 *
2169 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002170 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002171 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002172 public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask";
2173
Svetoslav683914b2015-01-15 14:22:26 -08002174 private static final Validator WIFI_STATIC_NETMASK_VALIDATOR = sLenientIpAddressValidator;
2175
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002176 /**
2177 * If using static IP, the primary DNS's IP address.
2178 * <p>
2179 * Example: "192.168.1.1"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002180 *
2181 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002182 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002183 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002184 public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1";
2185
Svetoslav683914b2015-01-15 14:22:26 -08002186 private static final Validator WIFI_STATIC_DNS1_VALIDATOR = sLenientIpAddressValidator;
2187
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002188 /**
2189 * If using static IP, the secondary DNS's IP address.
2190 * <p>
2191 * Example: "192.168.1.2"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002192 *
2193 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002194 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002195 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002196 public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2";
2197
Svetoslav683914b2015-01-15 14:22:26 -08002198 private static final Validator WIFI_STATIC_DNS2_VALIDATOR = sLenientIpAddressValidator;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002199
2200 /**
2201 * Determines whether remote devices may discover and/or connect to
2202 * this device.
2203 * <P>Type: INT</P>
2204 * 2 -- discoverable and connectable
2205 * 1 -- connectable but not discoverable
2206 * 0 -- neither connectable nor discoverable
2207 */
2208 public static final String BLUETOOTH_DISCOVERABILITY =
2209 "bluetooth_discoverability";
2210
Svetoslav683914b2015-01-15 14:22:26 -08002211 private static final Validator BLUETOOTH_DISCOVERABILITY_VALIDATOR =
2212 new InclusiveIntegerRangeValidator(0, 2);
2213
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002214 /**
2215 * Bluetooth discoverability timeout. If this value is nonzero, then
2216 * Bluetooth becomes discoverable for a certain number of seconds,
2217 * after which is becomes simply connectable. The value is in seconds.
2218 */
2219 public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT =
2220 "bluetooth_discoverability_timeout";
2221
Svetoslav683914b2015-01-15 14:22:26 -08002222 private static final Validator BLUETOOTH_DISCOVERABILITY_TIMEOUT_VALIDATOR =
2223 sNonNegativeIntegerValidator;
2224
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002225 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08002226 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED}
2227 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002228 */
Amith Yamasani156c4352010-03-05 17:10:03 -08002229 @Deprecated
2230 public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002231
2232 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08002233 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE}
2234 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002235 */
Amith Yamasani156c4352010-03-05 17:10:03 -08002236 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002237 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
2238
2239 /**
Jaikumar Ganesh545e6702010-06-04 10:23:03 -07002240 * @deprecated Use
Amith Yamasani156c4352010-03-05 17:10:03 -08002241 * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED}
2242 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002243 */
Amith Yamasani156c4352010-03-05 17:10:03 -08002244 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002245 public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED =
2246 "lock_pattern_tactile_feedback_enabled";
2247
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002248 /**
2249 * A formatted string of the next alarm that is set, or the empty string
2250 * if there is no alarm set.
Adrian Roosc42a1e12014-07-07 23:35:53 +02002251 *
2252 * @deprecated Use {@link android.app.AlarmManager#getNextAlarmClock()}.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002253 */
Adrian Roosc42a1e12014-07-07 23:35:53 +02002254 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002255 public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted";
2256
Svetoslav683914b2015-01-15 14:22:26 -08002257 private static final Validator NEXT_ALARM_FORMATTED_VALIDATOR = new Validator() {
2258 private static final int MAX_LENGTH = 1000;
Svetoslav1b71ea92015-02-17 18:20:29 -08002259
Svetoslav683914b2015-01-15 14:22:26 -08002260 @Override
2261 public boolean validate(String value) {
2262 // TODO: No idea what the correct format is.
Svetoslav64d6e9c2015-02-12 11:30:36 -08002263 return value == null || value.length() < MAX_LENGTH;
Svetoslav683914b2015-01-15 14:22:26 -08002264 }
2265 };
2266
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002267 /**
2268 * Scaling factor for fonts, float.
2269 */
2270 public static final String FONT_SCALE = "font_scale";
2271
Svetoslav683914b2015-01-15 14:22:26 -08002272 private static final Validator FONT_SCALE_VALIDATOR = new Validator() {
2273 @Override
2274 public boolean validate(String value) {
2275 try {
2276 return Float.parseFloat(value) >= 0;
2277 } catch (NumberFormatException e) {
2278 return false;
2279 }
2280 }
2281 };
2282
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002283 /**
2284 * Name of an application package to be debugged.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002285 *
2286 * @deprecated Use {@link Global#DEBUG_APP} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002287 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002288 @Deprecated
2289 public static final String DEBUG_APP = Global.DEBUG_APP;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002290
2291 /**
2292 * If 1, when launching DEBUG_APP it will wait for the debugger before
2293 * starting user code. If 0, it will run normally.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002294 *
2295 * @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002296 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002297 @Deprecated
2298 public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002299
2300 /**
2301 * Whether or not to dim the screen. 0=no 1=yes
Jeff Brown96307042012-07-27 15:51:34 -07002302 * @deprecated This setting is no longer used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002303 */
Jeff Brown96307042012-07-27 15:51:34 -07002304 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002305 public static final String DIM_SCREEN = "dim_screen";
2306
Svetoslav683914b2015-01-15 14:22:26 -08002307 private static final Validator DIM_SCREEN_VALIDATOR = sBooleanValidator;
2308
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002309 /**
Jeff Brown05af6ad2014-09-30 20:54:30 -07002310 * The amount of time in milliseconds before the device goes to sleep or begins
2311 * to dream after a period of inactivity. This value is also known as the
2312 * user activity timeout period since the screen isn't necessarily turned off
2313 * when it expires.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002314 */
2315 public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout";
2316
Svetoslav683914b2015-01-15 14:22:26 -08002317 private static final Validator SCREEN_OFF_TIMEOUT_VALIDATOR = sNonNegativeIntegerValidator;
2318
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002319 /**
2320 * The screen backlight brightness between 0 and 255.
2321 */
2322 public static final String SCREEN_BRIGHTNESS = "screen_brightness";
2323
Svetoslav683914b2015-01-15 14:22:26 -08002324 private static final Validator SCREEN_BRIGHTNESS_VALIDATOR =
2325 new InclusiveIntegerRangeValidator(0, 255);
2326
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002327 /**
Dan Murphy951764b2009-08-27 14:59:03 -05002328 * Control whether to enable automatic brightness mode.
Dan Murphy951764b2009-08-27 14:59:03 -05002329 */
2330 public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode";
2331
Svetoslav683914b2015-01-15 14:22:26 -08002332 private static final Validator SCREEN_BRIGHTNESS_MODE_VALIDATOR = sBooleanValidator;
2333
Dan Murphy951764b2009-08-27 14:59:03 -05002334 /**
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08002335 * Adjustment to auto-brightness to make it generally more (>0.0 <1.0)
2336 * or less (<0.0 >-1.0) bright.
Dianne Hackborn518a3d82012-05-09 16:30:49 -07002337 * @hide
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08002338 */
2339 public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj";
2340
Svetoslav683914b2015-01-15 14:22:26 -08002341 private static final Validator SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR =
2342 new InclusiveFloatRangeValidator(-1, 1);
2343
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08002344 /**
Mike Lockwooddc3494e2009-10-14 21:17:09 -07002345 * SCREEN_BRIGHTNESS_MODE value for manual mode.
Mike Lockwooddc3494e2009-10-14 21:17:09 -07002346 */
2347 public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0;
2348
2349 /**
Scott Main52bfc242012-02-09 10:09:14 -08002350 * SCREEN_BRIGHTNESS_MODE value for automatic mode.
Mike Lockwooddc3494e2009-10-14 21:17:09 -07002351 */
2352 public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1;
2353
2354 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002355 * Control whether the process CPU usage meter should be shown.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002356 *
2357 * @deprecated Use {@link Global#SHOW_PROCESSES} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002358 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002359 @Deprecated
2360 public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002361
2362 /**
2363 * If 1, the activity manager will aggressively finish activities and
2364 * processes as soon as they are no longer needed. If 0, the normal
2365 * extended lifetime is used.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002366 *
2367 * @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002368 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002369 @Deprecated
2370 public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002371
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002372 /**
2373 * Determines which streams are affected by ringer mode changes. The
2374 * stream type's bit should be set to 1 if it should be muted when going
2375 * into an inaudible ringer mode.
2376 */
2377 public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected";
2378
Svetoslav683914b2015-01-15 14:22:26 -08002379 private static final Validator MODE_RINGER_STREAMS_AFFECTED_VALIDATOR =
2380 sNonNegativeIntegerValidator;
2381
2382 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002383 * Determines which streams are affected by mute. The
2384 * stream type's bit should be set to 1 if it should be muted when a mute request
2385 * is received.
2386 */
Svetoslav683914b2015-01-15 14:22:26 -08002387 public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected";
2388
2389 private static final Validator MUTE_STREAMS_AFFECTED_VALIDATOR =
2390 sNonNegativeIntegerValidator;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002391
2392 /**
2393 * Whether vibrate is on for different events. This is used internally,
2394 * changing this value will not change the vibrate. See AudioManager.
2395 */
2396 public static final String VIBRATE_ON = "vibrate_on";
2397
Svetoslav683914b2015-01-15 14:22:26 -08002398 private static final Validator VIBRATE_ON_VALIDATOR = sBooleanValidator;
2399
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002400 /**
Jeff Brown7f6c2312012-04-13 20:38:38 -07002401 * If 1, redirects the system vibrator to all currently attached input devices
2402 * that support vibration. If there are no such input devices, then the system
2403 * vibrator is used instead.
2404 * If 0, does not register the system vibrator.
2405 *
2406 * This setting is mainly intended to provide a compatibility mechanism for
2407 * applications that only know about the system vibrator and do not use the
2408 * input device vibrator API.
2409 *
2410 * @hide
2411 */
2412 public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices";
2413
Svetoslav683914b2015-01-15 14:22:26 -08002414 private static final Validator VIBRATE_INPUT_DEVICES_VALIDATOR = sBooleanValidator;
2415
Jeff Brown7f6c2312012-04-13 20:38:38 -07002416 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002417 * Ringer volume. This is used internally, changing this value will not
2418 * change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002419 *
2420 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002421 */
2422 public static final String VOLUME_RING = "volume_ring";
2423
2424 /**
2425 * System/notifications volume. This is used internally, changing this
2426 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002427 *
2428 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002429 */
2430 public static final String VOLUME_SYSTEM = "volume_system";
2431
2432 /**
2433 * Voice call volume. This is used internally, changing this value will
2434 * not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002435 *
2436 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002437 */
2438 public static final String VOLUME_VOICE = "volume_voice";
2439
2440 /**
2441 * Music/media/gaming volume. This is used internally, changing this
2442 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002443 *
2444 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002445 */
2446 public static final String VOLUME_MUSIC = "volume_music";
2447
2448 /**
2449 * Alarm volume. This is used internally, changing this
2450 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002451 *
2452 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002453 */
2454 public static final String VOLUME_ALARM = "volume_alarm";
2455
2456 /**
2457 * Notification volume. This is used internally, changing this
2458 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002459 *
2460 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002461 */
2462 public static final String VOLUME_NOTIFICATION = "volume_notification";
2463
2464 /**
Eric Laurent484d2882009-12-08 09:05:45 -08002465 * Bluetooth Headset volume. This is used internally, changing this value will
2466 * not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002467 *
2468 * @removed Not used by anything since API 2.
Eric Laurent484d2882009-12-08 09:05:45 -08002469 */
2470 public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco";
2471
2472 /**
Mike Lockwood8517e462011-10-25 14:47:19 -04002473 * Master volume (float in the range 0.0f to 1.0f).
Svetoslavdbbeeb32015-02-18 19:16:25 -08002474 *
Mike Lockwood8517e462011-10-25 14:47:19 -04002475 * @hide
2476 */
2477 public static final String VOLUME_MASTER = "volume_master";
2478
2479 /**
Justin Koh57978ed2012-04-03 17:37:58 -07002480 * Master volume mute (int 1 = mute, 0 = not muted).
2481 *
2482 * @hide
2483 */
2484 public static final String VOLUME_MASTER_MUTE = "volume_master_mute";
2485
Svetoslav683914b2015-01-15 14:22:26 -08002486 private static final Validator VOLUME_MASTER_MUTE_VALIDATOR = sBooleanValidator;
2487
Justin Koh57978ed2012-04-03 17:37:58 -07002488 /**
Julia Reynoldsb53453f2014-08-22 11:42:43 -04002489 * Microphone mute (int 1 = mute, 0 = not muted).
2490 *
2491 * @hide
2492 */
2493 public static final String MICROPHONE_MUTE = "microphone_mute";
2494
Svetoslav683914b2015-01-15 14:22:26 -08002495 private static final Validator MICROPHONE_MUTE_VALIDATOR = sBooleanValidator;
2496
Julia Reynoldsb53453f2014-08-22 11:42:43 -04002497 /**
Justin Koh57978ed2012-04-03 17:37:58 -07002498 * Whether the notifications should use the ring volume (value of 1) or
2499 * a separate notification volume (value of 0). In most cases, users
2500 * will have this enabled so the notification and ringer volumes will be
2501 * the same. However, power users can disable this and use the separate
2502 * notification volume control.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002503 * <p>
Justin Koh57978ed2012-04-03 17:37:58 -07002504 * Note: This is a one-off setting that will be removed in the future
2505 * when there is profile support. For this reason, it is kept hidden
2506 * from the public APIs.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002507 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002508 * @hide
Amith Yamasani42722bf2011-07-22 10:34:27 -07002509 * @deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002510 */
Gilles Debunnee90bed12011-08-30 14:28:27 -07002511 @Deprecated
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002512 public static final String NOTIFICATIONS_USE_RING_VOLUME =
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002513 "notifications_use_ring_volume";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002514
Svetoslav683914b2015-01-15 14:22:26 -08002515 private static final Validator NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR = sBooleanValidator;
2516
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002517 /**
Daniel Sandler6329bf72010-02-26 15:17:44 -05002518 * Whether silent mode should allow vibration feedback. This is used
2519 * internally in AudioService and the Sound settings activity to
2520 * coordinate decoupling of vibrate and silent modes. This setting
2521 * will likely be removed in a future release with support for
2522 * audio/vibe feedback profiles.
2523 *
Eric Laurentbffc3d12012-05-07 17:43:49 -07002524 * Not used anymore. On devices with vibrator, the user explicitly selects
2525 * silent or vibrate mode.
2526 * Kept for use by legacy database upgrade code in DatabaseHelper.
Daniel Sandler6329bf72010-02-26 15:17:44 -05002527 * @hide
2528 */
2529 public static final String VIBRATE_IN_SILENT = "vibrate_in_silent";
2530
Svetoslav683914b2015-01-15 14:22:26 -08002531 private static final Validator VIBRATE_IN_SILENT_VALIDATOR = sBooleanValidator;
2532
Daniel Sandler6329bf72010-02-26 15:17:44 -05002533 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002534 * The mapping of stream type (integer) to its setting.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002535 *
2536 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002537 */
2538 public static final String[] VOLUME_SETTINGS = {
2539 VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC,
Eric Laurent484d2882009-12-08 09:05:45 -08002540 VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002541 };
2542
2543 /**
2544 * Appended to various volume related settings to record the previous
2545 * values before they the settings were affected by a silent/vibrate
2546 * ringer mode change.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002547 *
2548 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002549 */
2550 public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible";
2551
2552 /**
2553 * Persistent store for the system-wide default ringtone URI.
2554 * <p>
2555 * If you need to play the default ringtone at any given time, it is recommended
2556 * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve
2557 * to the set default ringtone at the time of playing.
2558 *
2559 * @see #DEFAULT_RINGTONE_URI
2560 */
2561 public static final String RINGTONE = "ringtone";
2562
Svetoslav683914b2015-01-15 14:22:26 -08002563 private static final Validator RINGTONE_VALIDATOR = sUriValidator;
2564
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002565 /**
2566 * A {@link Uri} that will point to the current default ringtone at any
2567 * given time.
2568 * <p>
2569 * If the current default ringtone is in the DRM provider and the caller
2570 * does not have permission, the exception will be a
2571 * FileNotFoundException.
2572 */
2573 public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE);
2574
2575 /**
2576 * Persistent store for the system-wide default notification sound.
2577 *
2578 * @see #RINGTONE
2579 * @see #DEFAULT_NOTIFICATION_URI
2580 */
2581 public static final String NOTIFICATION_SOUND = "notification_sound";
2582
Svetoslav683914b2015-01-15 14:22:26 -08002583 private static final Validator NOTIFICATION_SOUND_VALIDATOR = sUriValidator;
2584
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002585 /**
2586 * A {@link Uri} that will point to the current default notification
2587 * sound at any given time.
2588 *
2589 * @see #DEFAULT_RINGTONE_URI
2590 */
2591 public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND);
2592
2593 /**
Patrick Scott3156bb002009-04-13 09:57:38 -07002594 * Persistent store for the system-wide default alarm alert.
2595 *
2596 * @see #RINGTONE
2597 * @see #DEFAULT_ALARM_ALERT_URI
2598 */
2599 public static final String ALARM_ALERT = "alarm_alert";
2600
Svetoslav683914b2015-01-15 14:22:26 -08002601 private static final Validator ALARM_ALERT_VALIDATOR = sUriValidator;
2602
Patrick Scott3156bb002009-04-13 09:57:38 -07002603 /**
2604 * A {@link Uri} that will point to the current default alarm alert at
2605 * any given time.
2606 *
2607 * @see #DEFAULT_ALARM_ALERT_URI
2608 */
2609 public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT);
2610
2611 /**
Jean-Michel Trivid589fea2011-04-15 11:28:10 -07002612 * Persistent store for the system default media button event receiver.
2613 *
2614 * @hide
2615 */
2616 public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver";
2617
Svetoslav683914b2015-01-15 14:22:26 -08002618 private static final Validator MEDIA_BUTTON_RECEIVER_VALIDATOR = new Validator() {
2619 @Override
2620 public boolean validate(String value) {
2621 try {
2622 ComponentName.unflattenFromString(value);
2623 return true;
2624 } catch (NullPointerException e) {
2625 return false;
2626 }
2627 }
2628 };
2629
Jean-Michel Trivid589fea2011-04-15 11:28:10 -07002630 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002631 * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off
2632 */
2633 public static final String TEXT_AUTO_REPLACE = "auto_replace";
2634
Svetoslav683914b2015-01-15 14:22:26 -08002635 private static final Validator TEXT_AUTO_REPLACE_VALIDATOR = sBooleanValidator;
2636
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002637 /**
2638 * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off
2639 */
2640 public static final String TEXT_AUTO_CAPS = "auto_caps";
2641
Svetoslav683914b2015-01-15 14:22:26 -08002642 private static final Validator TEXT_AUTO_CAPS_VALIDATOR = sBooleanValidator;
2643
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002644 /**
2645 * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This
2646 * feature converts two spaces to a "." and space.
2647 */
2648 public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002649
Svetoslav683914b2015-01-15 14:22:26 -08002650 private static final Validator TEXT_AUTO_PUNCTUATE_VALIDATOR = sBooleanValidator;
2651
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002652 /**
2653 * Setting to showing password characters in text editors. 1 = On, 0 = Off
2654 */
2655 public static final String TEXT_SHOW_PASSWORD = "show_password";
2656
Svetoslav683914b2015-01-15 14:22:26 -08002657 private static final Validator TEXT_SHOW_PASSWORD_VALIDATOR = sBooleanValidator;
2658
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002659 public static final String SHOW_GTALK_SERVICE_STATUS =
2660 "SHOW_GTALK_SERVICE_STATUS";
2661
Svetoslav683914b2015-01-15 14:22:26 -08002662 private static final Validator SHOW_GTALK_SERVICE_STATUS_VALIDATOR = sBooleanValidator;
2663
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002664 /**
2665 * Name of activity to use for wallpaper on the home screen.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002666 *
2667 * @deprecated Use {@link WallpaperManager} instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002668 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002669 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002670 public static final String WALLPAPER_ACTIVITY = "wallpaper_activity";
2671
Svetoslav683914b2015-01-15 14:22:26 -08002672 private static final Validator WALLPAPER_ACTIVITY_VALIDATOR = new Validator() {
2673 private static final int MAX_LENGTH = 1000;
2674
2675 @Override
2676 public boolean validate(String value) {
2677 if (value != null && value.length() > MAX_LENGTH) {
2678 return false;
2679 }
2680 return ComponentName.unflattenFromString(value) != null;
2681 }
2682 };
2683
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002684 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002685 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME}
2686 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002687 */
Christopher Tate06efb532012-08-24 15:29:27 -07002688 @Deprecated
2689 public static final String AUTO_TIME = Global.AUTO_TIME;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002690
2691 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002692 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE}
2693 * instead
Amith Yamasaniad450be2010-09-16 16:47:00 -07002694 */
Christopher Tate06efb532012-08-24 15:29:27 -07002695 @Deprecated
2696 public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE;
Amith Yamasaniad450be2010-09-16 16:47:00 -07002697
2698 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002699 * Display times as 12 or 24 hours
2700 * 12
2701 * 24
2702 */
2703 public static final String TIME_12_24 = "time_12_24";
2704
Svetoslav683914b2015-01-15 14:22:26 -08002705 /** @hide */
2706 public static final Validator TIME_12_24_VALIDATOR =
2707 new DiscreteValueValidator(new String[] {"12", "24"});
2708
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002709 /**
2710 * Date format string
2711 * mm/dd/yyyy
2712 * dd/mm/yyyy
2713 * yyyy/mm/dd
2714 */
2715 public static final String DATE_FORMAT = "date_format";
2716
Svetoslav683914b2015-01-15 14:22:26 -08002717 /** @hide */
2718 public static final Validator DATE_FORMAT_VALIDATOR = new Validator() {
2719 @Override
2720 public boolean validate(String value) {
2721 try {
2722 new SimpleDateFormat(value);
2723 return true;
2724 } catch (IllegalArgumentException e) {
2725 return false;
2726 }
2727 }
2728 };
2729
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002730 /**
2731 * Whether the setup wizard has been run before (on first boot), or if
2732 * it still needs to be run.
2733 *
2734 * nonzero = it has been run in the past
2735 * 0 = it has not been run in the past
2736 */
2737 public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run";
2738
Svetoslav683914b2015-01-15 14:22:26 -08002739 /** @hide */
2740 public static final Validator SETUP_WIZARD_HAS_RUN_VALIDATOR = sBooleanValidator;
2741
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002742 /**
2743 * Scaling factor for normal window animations. Setting to 0 will disable window
2744 * animations.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002745 *
2746 * @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002747 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002748 @Deprecated
2749 public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002750
2751 /**
2752 * Scaling factor for activity transition animations. Setting to 0 will disable window
2753 * animations.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002754 *
2755 * @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002756 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002757 @Deprecated
2758 public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002759
2760 /**
Chet Haasec38fa1f2012-02-01 16:37:46 -08002761 * Scaling factor for Animator-based animations. This affects both the start delay and
2762 * duration of all such animations. Setting to 0 will cause animations to end immediately.
2763 * The default value is 1.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002764 *
2765 * @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead
Chet Haasec38fa1f2012-02-01 16:37:46 -08002766 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002767 @Deprecated
2768 public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002769
2770 /**
2771 * Control whether the accelerometer will be used to change screen
2772 * orientation. If 0, it will not be used unless explicitly requested
2773 * by the application; if 1, it will be used by default unless explicitly
2774 * disabled by the application.
2775 */
2776 public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation";
2777
Svetoslav683914b2015-01-15 14:22:26 -08002778 /** @hide */
2779 public static final Validator ACCELEROMETER_ROTATION_VALIDATOR = sBooleanValidator;
2780
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002781 /**
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002782 * Default screen rotation when no other policy applies.
2783 * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a
2784 * preference, this rotation value will be used. Must be one of the
Brian Muramatsue1d46982010-12-06 17:34:20 -08002785 * {@link android.view.Surface#ROTATION_0 Surface rotation constants}.
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002786 *
Dianne Hackborn16ec0802014-08-15 18:32:33 -07002787 * @see android.view.Display#getRotation
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002788 */
2789 public static final String USER_ROTATION = "user_rotation";
2790
Svetoslav683914b2015-01-15 14:22:26 -08002791 /** @hide */
2792 public static final Validator USER_ROTATION_VALIDATOR =
2793 new InclusiveIntegerRangeValidator(0, 3);
2794
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002795 /**
Jeff Brown207673cd2012-06-05 17:47:11 -07002796 * Control whether the rotation lock toggle in the System UI should be hidden.
2797 * Typically this is done for accessibility purposes to make it harder for
2798 * the user to accidentally toggle the rotation lock while the display rotation
2799 * has been locked for accessibility.
2800 *
2801 * If 0, then rotation lock toggle is not hidden for accessibility (although it may be
2802 * unavailable for other reasons). If 1, then the rotation lock toggle is hidden.
2803 *
2804 * @hide
2805 */
2806 public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY =
2807 "hide_rotation_lock_toggle_for_accessibility";
2808
Svetoslav683914b2015-01-15 14:22:26 -08002809 /** @hide */
2810 public static final Validator HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY_VALIDATOR =
2811 sBooleanValidator;
2812
Jeff Brown207673cd2012-06-05 17:47:11 -07002813 /**
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07002814 * Whether the phone vibrates when it is ringing due to an incoming call. This will
2815 * be used by Phone and Setting apps; it shouldn't affect other apps.
2816 * The value is boolean (1 or 0).
2817 *
2818 * Note: this is not same as "vibrate on ring", which had been available until ICS.
2819 * It was about AudioManager's setting and thus affected all the applications which
2820 * relied on the setting, while this is purely about the vibration setting for incoming
2821 * calls.
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07002822 */
2823 public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
2824
Svetoslav683914b2015-01-15 14:22:26 -08002825 /** @hide */
2826 public static final Validator VIBRATE_WHEN_RINGING_VALIDATOR = sBooleanValidator;
2827
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07002828 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002829 * Whether the audible DTMF tones are played by the dialer when dialing. The value is
2830 * boolean (1 or 0).
2831 */
2832 public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone";
2833
Svetoslav683914b2015-01-15 14:22:26 -08002834 /** @hide */
2835 public static final Validator DTMF_TONE_WHEN_DIALING_VALIDATOR = sBooleanValidator;
2836
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002837 /**
David Kraused0f67152009-06-13 18:01:13 -05002838 * CDMA only settings
2839 * DTMF tone type played by the dialer when dialing.
2840 * 0 = Normal
2841 * 1 = Long
David Kraused0f67152009-06-13 18:01:13 -05002842 */
2843 public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type";
2844
Svetoslav683914b2015-01-15 14:22:26 -08002845 /** @hide */
2846 public static final Validator DTMF_TONE_TYPE_WHEN_DIALING_VALIDATOR = sBooleanValidator;
2847
David Kraused0f67152009-06-13 18:01:13 -05002848 /**
David Kraused0f67152009-06-13 18:01:13 -05002849 * Whether the hearing aid is enabled. The value is
2850 * boolean (1 or 0).
2851 * @hide
2852 */
2853 public static final String HEARING_AID = "hearing_aid";
2854
Svetoslav683914b2015-01-15 14:22:26 -08002855 /** @hide */
2856 public static final Validator HEARING_AID_VALIDATOR = sBooleanValidator;
2857
David Kraused0f67152009-06-13 18:01:13 -05002858 /**
2859 * CDMA only settings
2860 * TTY Mode
2861 * 0 = OFF
2862 * 1 = FULL
2863 * 2 = VCO
2864 * 3 = HCO
2865 * @hide
2866 */
2867 public static final String TTY_MODE = "tty_mode";
2868
Svetoslav683914b2015-01-15 14:22:26 -08002869 /** @hide */
2870 public static final Validator TTY_MODE_VALIDATOR = new InclusiveIntegerRangeValidator(0, 3);
2871
David Kraused0f67152009-06-13 18:01:13 -05002872 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002873 * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is
2874 * boolean (1 or 0).
2875 */
2876 public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002877
Svetoslav683914b2015-01-15 14:22:26 -08002878 /** @hide */
2879 public static final Validator SOUND_EFFECTS_ENABLED_VALIDATOR = sBooleanValidator;
2880
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002881 /**
2882 * Whether the haptic feedback (long presses, ...) are enabled. The value is
2883 * boolean (1 or 0).
2884 */
2885 public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled";
Sanjay Jeyakumar21bf2412009-07-09 13:31:48 -07002886
Svetoslav683914b2015-01-15 14:22:26 -08002887 /** @hide */
2888 public static final Validator HAPTIC_FEEDBACK_ENABLED_VALIDATOR = sBooleanValidator;
2889
Mike LeBeau48603e72009-06-05 00:27:00 +01002890 /**
Bjorn Bringert24abb662010-09-21 12:21:18 +01002891 * @deprecated Each application that shows web suggestions should have its own
2892 * setting for this.
Mike LeBeau48603e72009-06-05 00:27:00 +01002893 */
Bjorn Bringert24abb662010-09-21 12:21:18 +01002894 @Deprecated
Mike LeBeau48603e72009-06-05 00:27:00 +01002895 public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002896
Svetoslav683914b2015-01-15 14:22:26 -08002897 /** @hide */
2898 public static final Validator SHOW_WEB_SUGGESTIONS_VALIDATOR = sBooleanValidator;
2899
-b master501eec92009-07-06 13:53:11 -07002900 /**
Amith Yamasaniae3ed702009-12-01 19:02:05 -08002901 * Whether the notification LED should repeatedly flash when a notification is
2902 * pending. The value is boolean (1 or 0).
2903 * @hide
2904 */
2905 public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse";
2906
Svetoslav683914b2015-01-15 14:22:26 -08002907 /** @hide */
2908 public static final Validator NOTIFICATION_LIGHT_PULSE_VALIDATOR = sBooleanValidator;
2909
Amith Yamasaniae3ed702009-12-01 19:02:05 -08002910 /**
Dianne Hackborn90d2db32010-02-11 22:19:06 -08002911 * Show pointer location on screen?
2912 * 0 = no
2913 * 1 = yes
2914 * @hide
2915 */
2916 public static final String POINTER_LOCATION = "pointer_location";
2917
Svetoslav683914b2015-01-15 14:22:26 -08002918 /** @hide */
2919 public static final Validator POINTER_LOCATION_VALIDATOR = sBooleanValidator;
2920
Dianne Hackborn90d2db32010-02-11 22:19:06 -08002921 /**
Jeff Browndaf4a122011-08-26 17:14:14 -07002922 * Show touch positions on screen?
2923 * 0 = no
2924 * 1 = yes
2925 * @hide
2926 */
2927 public static final String SHOW_TOUCHES = "show_touches";
2928
Svetoslav683914b2015-01-15 14:22:26 -08002929 /** @hide */
2930 public static final Validator SHOW_TOUCHES_VALIDATOR = sBooleanValidator;
2931
Jeff Browndaf4a122011-08-26 17:14:14 -07002932 /**
Dianne Hackborn16ec0802014-08-15 18:32:33 -07002933 * Log raw orientation data from
Jorim Jaggib10e33f2015-02-04 21:57:40 +01002934 * {@link com.android.server.policy.WindowOrientationListener} for use with the
Jeff Brown4519f072011-01-23 13:16:01 -08002935 * orientationplot.py tool.
2936 * 0 = no
2937 * 1 = yes
2938 * @hide
2939 */
2940 public static final String WINDOW_ORIENTATION_LISTENER_LOG =
2941 "window_orientation_listener_log";
2942
Svetoslav683914b2015-01-15 14:22:26 -08002943 /** @hide */
2944 public static final Validator WINDOW_ORIENTATION_LISTENER_LOG_VALIDATOR = sBooleanValidator;
2945
Jeff Brown4519f072011-01-23 13:16:01 -08002946 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002947 * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED}
2948 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002949 * @hide
2950 */
Christopher Tate06efb532012-08-24 15:29:27 -07002951 @Deprecated
2952 public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002953
2954 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002955 * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED}
2956 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002957 * @hide
2958 */
Christopher Tate06efb532012-08-24 15:29:27 -07002959 @Deprecated
2960 public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002961
2962 /**
2963 * Whether to play sounds when the keyguard is shown and dismissed.
2964 * @hide
2965 */
2966 public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled";
2967
Svetoslav683914b2015-01-15 14:22:26 -08002968 /** @hide */
2969 public static final Validator LOCKSCREEN_SOUNDS_ENABLED_VALIDATOR = sBooleanValidator;
2970
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002971 /**
Mike Lockwood7bef7392011-10-20 16:51:53 -04002972 * Whether the lockscreen should be completely disabled.
2973 * @hide
2974 */
2975 public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled";
2976
Svetoslav683914b2015-01-15 14:22:26 -08002977 /** @hide */
2978 public static final Validator LOCKSCREEN_DISABLED_VALIDATOR = sBooleanValidator;
2979
Mike Lockwood7bef7392011-10-20 16:51:53 -04002980 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002981 * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND}
2982 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002983 * @hide
2984 */
Christopher Tate06efb532012-08-24 15:29:27 -07002985 @Deprecated
2986 public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002987
2988 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002989 * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND}
2990 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002991 * @hide
2992 */
Christopher Tate06efb532012-08-24 15:29:27 -07002993 @Deprecated
2994 public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002995
2996 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002997 * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND}
2998 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002999 * @hide
3000 */
Christopher Tate06efb532012-08-24 15:29:27 -07003001 @Deprecated
3002 public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003003
3004 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003005 * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND}
3006 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003007 * @hide
3008 */
Christopher Tate06efb532012-08-24 15:29:27 -07003009 @Deprecated
3010 public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003011
3012 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003013 * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND}
3014 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003015 * @hide
3016 */
Christopher Tate06efb532012-08-24 15:29:27 -07003017 @Deprecated
3018 public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003019
3020 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003021 * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND}
3022 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003023 * @hide
3024 */
Christopher Tate06efb532012-08-24 15:29:27 -07003025 @Deprecated
3026 public static final String LOCK_SOUND = Global.LOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003027
3028 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003029 * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND}
3030 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003031 * @hide
3032 */
Christopher Tate06efb532012-08-24 15:29:27 -07003033 @Deprecated
3034 public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003035
3036 /**
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003037 * Receive incoming SIP calls?
3038 * 0 = no
3039 * 1 = yes
3040 * @hide
3041 */
3042 public static final String SIP_RECEIVE_CALLS = "sip_receive_calls";
3043
Svetoslav683914b2015-01-15 14:22:26 -08003044 /** @hide */
3045 public static final Validator SIP_RECEIVE_CALLS_VALIDATOR = sBooleanValidator;
3046
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003047 /**
3048 * Call Preference String.
3049 * "SIP_ALWAYS" : Always use SIP with network access
3050 * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003051 * @hide
3052 */
3053 public static final String SIP_CALL_OPTIONS = "sip_call_options";
3054
Svetoslav683914b2015-01-15 14:22:26 -08003055 /** @hide */
3056 public static final Validator SIP_CALL_OPTIONS_VALIDATOR = new DiscreteValueValidator(
3057 new String[] {"SIP_ALWAYS", "SIP_ADDRESS_ONLY"});
3058
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003059 /**
3060 * One of the sip call options: Always use SIP with network access.
3061 * @hide
3062 */
3063 public static final String SIP_ALWAYS = "SIP_ALWAYS";
3064
Svetoslav683914b2015-01-15 14:22:26 -08003065 /** @hide */
3066 public static final Validator SIP_ALWAYS_VALIDATOR = sBooleanValidator;
3067
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003068 /**
3069 * One of the sip call options: Only if destination is a SIP address.
3070 * @hide
3071 */
3072 public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY";
3073
Svetoslav683914b2015-01-15 14:22:26 -08003074 /** @hide */
3075 public static final Validator SIP_ADDRESS_ONLY_VALIDATOR = sBooleanValidator;
3076
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003077 /**
Tyler Gunn2c830a22014-09-02 08:39:35 -07003078 * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that
3079 * the user should be prompted each time a call is made whether it should be placed using
3080 * SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with
3081 * SIP_ADDRESS_ONLY.
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003082 * @hide
3083 */
Tyler Gunn2c830a22014-09-02 08:39:35 -07003084 @Deprecated
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003085 public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME";
3086
Svetoslav683914b2015-01-15 14:22:26 -08003087 /** @hide */
3088 public static final Validator SIP_ASK_ME_EACH_TIME_VALIDATOR = sBooleanValidator;
3089
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003090 /**
Jeff Brown1a84fd12011-06-02 01:26:32 -07003091 * Pointer speed setting.
3092 * This is an integer value in a range between -7 and +7, so there are 15 possible values.
3093 * -7 = slowest
3094 * 0 = default speed
3095 * +7 = fastest
3096 * @hide
3097 */
3098 public static final String POINTER_SPEED = "pointer_speed";
3099
Svetoslav683914b2015-01-15 14:22:26 -08003100 /** @hide */
3101 public static final Validator POINTER_SPEED_VALIDATOR =
3102 new InclusiveFloatRangeValidator(-7, 7);
3103
Jeff Brown1a84fd12011-06-02 01:26:32 -07003104 /**
Jason Monk56e09b42014-07-18 10:29:14 -04003105 * Whether lock-to-app will be triggered by long-press on recents.
3106 * @hide
3107 */
3108 public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled";
3109
Svetoslav683914b2015-01-15 14:22:26 -08003110 /** @hide */
3111 public static final Validator LOCK_TO_APP_ENABLED_VALIDATOR = sBooleanValidator;
3112
Jason Monk56e09b42014-07-18 10:29:14 -04003113 /**
Daniel Sandler2fdb68b2013-10-03 00:12:11 -04003114 * I am the lolrus.
3115 * <p>
3116 * Nonzero values indicate that the user has a bukkit.
3117 * Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>.
3118 * @hide
3119 */
3120 public static final String EGG_MODE = "egg_mode";
3121
Svetoslav683914b2015-01-15 14:22:26 -08003122 /** @hide */
Svet Ganovb1918a02015-05-15 09:32:55 -07003123 public static final Validator EGG_MODE_VALIDATOR = new Validator() {
3124 @Override
3125 public boolean validate(String value) {
3126 try {
3127 return Long.parseLong(value) >= 0;
3128 } catch (NumberFormatException e) {
3129 return false;
3130 }
3131 }
3132 };
Svetoslav683914b2015-01-15 14:22:26 -08003133
3134 /**
3135 * IMPORTANT: If you add a new public settings you also have to add it to
3136 * PUBLIC_SETTINGS below. If the new setting is hidden you have to add
3137 * it to PRIVATE_SETTINGS below. Also add a validator that can validate
3138 * the setting value. See an example above.
3139 */
3140
Daniel Sandler2fdb68b2013-10-03 00:12:11 -04003141 /**
-b master501eec92009-07-06 13:53:11 -07003142 * Settings to backup. This is here so that it's in the same place as the settings
3143 * keys and easy to update.
Svetoslav Ganova571a582011-09-20 18:32:20 -07003144 *
3145 * NOTE: Settings are backed up and restored in the order they appear
3146 * in this array. If you have one setting depending on another,
3147 * make sure that they are ordered appropriately.
3148 *
-b master501eec92009-07-06 13:53:11 -07003149 * @hide
3150 */
3151 public static final String[] SETTINGS_TO_BACKUP = {
Christopher Tate66488d62012-10-02 11:58:01 -07003152 STAY_ON_WHILE_PLUGGED_IN, // moved to global
-b master501eec92009-07-06 13:53:11 -07003153 WIFI_USE_STATIC_IP,
3154 WIFI_STATIC_IP,
3155 WIFI_STATIC_GATEWAY,
3156 WIFI_STATIC_NETMASK,
3157 WIFI_STATIC_DNS1,
3158 WIFI_STATIC_DNS2,
3159 BLUETOOTH_DISCOVERABILITY,
3160 BLUETOOTH_DISCOVERABILITY_TIMEOUT,
3161 DIM_SCREEN,
3162 SCREEN_OFF_TIMEOUT,
3163 SCREEN_BRIGHTNESS,
Christopher Tate362aca62009-09-25 15:58:03 -07003164 SCREEN_BRIGHTNESS_MODE,
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08003165 SCREEN_AUTO_BRIGHTNESS_ADJ,
Jeff Brown7f6c2312012-04-13 20:38:38 -07003166 VIBRATE_INPUT_DEVICES,
Amith Yamasani8823c0a82009-07-07 14:30:17 -07003167 MODE_RINGER_STREAMS_AFFECTED,
-b master501eec92009-07-06 13:53:11 -07003168 TEXT_AUTO_REPLACE,
3169 TEXT_AUTO_CAPS,
3170 TEXT_AUTO_PUNCTUATE,
3171 TEXT_SHOW_PASSWORD,
Christopher Tate66488d62012-10-02 11:58:01 -07003172 AUTO_TIME, // moved to global
3173 AUTO_TIME_ZONE, // moved to global
-b master501eec92009-07-06 13:53:11 -07003174 TIME_12_24,
3175 DATE_FORMAT,
-b master501eec92009-07-06 13:53:11 -07003176 DTMF_TONE_WHEN_DIALING,
3177 DTMF_TONE_TYPE_WHEN_DIALING,
-b master501eec92009-07-06 13:53:11 -07003178 HEARING_AID,
3179 TTY_MODE,
3180 SOUND_EFFECTS_ENABLED,
3181 HAPTIC_FEEDBACK_ENABLED,
Christopher Tate66488d62012-10-02 11:58:01 -07003182 POWER_SOUNDS_ENABLED, // moved to global
3183 DOCK_SOUNDS_ENABLED, // moved to global
Christopher Tate14c2d792010-02-25 16:49:44 -08003184 LOCKSCREEN_SOUNDS_ENABLED,
Amith Yamasaniae3ed702009-12-01 19:02:05 -08003185 SHOW_WEB_SUGGESTIONS,
Mike Lockwoodeabe8bf2010-08-31 14:35:23 -04003186 NOTIFICATION_LIGHT_PULSE,
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003187 SIP_CALL_OPTIONS,
Nick Pelly038cabe2010-09-23 16:12:11 -07003188 SIP_RECEIVE_CALLS,
Jeff Brown1a84fd12011-06-02 01:26:32 -07003189 POINTER_SPEED,
Amith Yamasani622bf2222013-09-06 13:54:28 -07003190 VIBRATE_WHEN_RINGING,
3191 RINGTONE,
Jason Monk94cfd9d2014-10-31 13:18:21 -04003192 LOCK_TO_APP_ENABLED,
Amith Yamasani622bf2222013-09-06 13:54:28 -07003193 NOTIFICATION_SOUND
-b master501eec92009-07-06 13:53:11 -07003194 };
3195
Sailesh Nepal1bd78762014-02-11 22:32:21 -08003196 /**
Amith Yamasanib0ff3222015-03-04 09:56:14 -08003197 * These are all public system settings
Svetoslav683914b2015-01-15 14:22:26 -08003198 *
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07003199 * @hide
3200 */
Svetoslav683914b2015-01-15 14:22:26 -08003201 public static final Set<String> PUBLIC_SETTINGS = new ArraySet<>();
3202 static {
3203 PUBLIC_SETTINGS.add(END_BUTTON_BEHAVIOR);
3204 PUBLIC_SETTINGS.add(WIFI_USE_STATIC_IP);
3205 PUBLIC_SETTINGS.add(WIFI_STATIC_IP);
3206 PUBLIC_SETTINGS.add(WIFI_STATIC_GATEWAY);
3207 PUBLIC_SETTINGS.add(WIFI_STATIC_NETMASK);
3208 PUBLIC_SETTINGS.add(WIFI_STATIC_DNS1);
3209 PUBLIC_SETTINGS.add(WIFI_STATIC_DNS2);
3210 PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY);
3211 PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY_TIMEOUT);
3212 PUBLIC_SETTINGS.add(NEXT_ALARM_FORMATTED);
3213 PUBLIC_SETTINGS.add(FONT_SCALE);
3214 PUBLIC_SETTINGS.add(DIM_SCREEN);
3215 PUBLIC_SETTINGS.add(SCREEN_OFF_TIMEOUT);
3216 PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS);
3217 PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_MODE);
3218 PUBLIC_SETTINGS.add(MODE_RINGER_STREAMS_AFFECTED);
3219 PUBLIC_SETTINGS.add(MUTE_STREAMS_AFFECTED);
3220 PUBLIC_SETTINGS.add(VIBRATE_ON);
3221 PUBLIC_SETTINGS.add(VOLUME_RING);
3222 PUBLIC_SETTINGS.add(VOLUME_SYSTEM);
3223 PUBLIC_SETTINGS.add(VOLUME_VOICE);
3224 PUBLIC_SETTINGS.add(VOLUME_MUSIC);
3225 PUBLIC_SETTINGS.add(VOLUME_ALARM);
3226 PUBLIC_SETTINGS.add(VOLUME_NOTIFICATION);
3227 PUBLIC_SETTINGS.add(VOLUME_BLUETOOTH_SCO);
3228 PUBLIC_SETTINGS.add(RINGTONE);
3229 PUBLIC_SETTINGS.add(NOTIFICATION_SOUND);
3230 PUBLIC_SETTINGS.add(ALARM_ALERT);
3231 PUBLIC_SETTINGS.add(TEXT_AUTO_REPLACE);
3232 PUBLIC_SETTINGS.add(TEXT_AUTO_CAPS);
3233 PUBLIC_SETTINGS.add(TEXT_AUTO_PUNCTUATE);
3234 PUBLIC_SETTINGS.add(TEXT_SHOW_PASSWORD);
3235 PUBLIC_SETTINGS.add(SHOW_GTALK_SERVICE_STATUS);
3236 PUBLIC_SETTINGS.add(WALLPAPER_ACTIVITY);
3237 PUBLIC_SETTINGS.add(TIME_12_24);
3238 PUBLIC_SETTINGS.add(DATE_FORMAT);
3239 PUBLIC_SETTINGS.add(SETUP_WIZARD_HAS_RUN);
3240 PUBLIC_SETTINGS.add(ACCELEROMETER_ROTATION);
3241 PUBLIC_SETTINGS.add(USER_ROTATION);
3242 PUBLIC_SETTINGS.add(DTMF_TONE_WHEN_DIALING);
3243 PUBLIC_SETTINGS.add(SOUND_EFFECTS_ENABLED);
3244 PUBLIC_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED);
3245 PUBLIC_SETTINGS.add(SHOW_WEB_SUGGESTIONS);
3246 }
3247
3248 /**
3249 * These are all hidden system settings.
3250 *
3251 * @hide
3252 */
3253 public static final Set<String> PRIVATE_SETTINGS = new ArraySet<>();
3254 static {
3255 PRIVATE_SETTINGS.add(WIFI_USE_STATIC_IP);
3256 PRIVATE_SETTINGS.add(END_BUTTON_BEHAVIOR);
3257 PRIVATE_SETTINGS.add(ADVANCED_SETTINGS);
3258 PRIVATE_SETTINGS.add(SCREEN_AUTO_BRIGHTNESS_ADJ);
3259 PRIVATE_SETTINGS.add(VIBRATE_INPUT_DEVICES);
3260 PRIVATE_SETTINGS.add(VOLUME_MASTER);
3261 PRIVATE_SETTINGS.add(VOLUME_MASTER_MUTE);
3262 PRIVATE_SETTINGS.add(MICROPHONE_MUTE);
3263 PRIVATE_SETTINGS.add(NOTIFICATIONS_USE_RING_VOLUME);
3264 PRIVATE_SETTINGS.add(VIBRATE_IN_SILENT);
3265 PRIVATE_SETTINGS.add(MEDIA_BUTTON_RECEIVER);
3266 PRIVATE_SETTINGS.add(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY);
3267 PRIVATE_SETTINGS.add(VIBRATE_WHEN_RINGING);
3268 PRIVATE_SETTINGS.add(DTMF_TONE_TYPE_WHEN_DIALING);
3269 PRIVATE_SETTINGS.add(HEARING_AID);
3270 PRIVATE_SETTINGS.add(TTY_MODE);
3271 PRIVATE_SETTINGS.add(NOTIFICATION_LIGHT_PULSE);
3272 PRIVATE_SETTINGS.add(POINTER_LOCATION);
3273 PRIVATE_SETTINGS.add(SHOW_TOUCHES);
3274 PRIVATE_SETTINGS.add(WINDOW_ORIENTATION_LISTENER_LOG);
3275 PRIVATE_SETTINGS.add(POWER_SOUNDS_ENABLED);
3276 PRIVATE_SETTINGS.add(DOCK_SOUNDS_ENABLED);
3277 PRIVATE_SETTINGS.add(LOCKSCREEN_SOUNDS_ENABLED);
3278 PRIVATE_SETTINGS.add(LOCKSCREEN_DISABLED);
3279 PRIVATE_SETTINGS.add(LOW_BATTERY_SOUND);
3280 PRIVATE_SETTINGS.add(DESK_DOCK_SOUND);
3281 PRIVATE_SETTINGS.add(DESK_UNDOCK_SOUND);
3282 PRIVATE_SETTINGS.add(CAR_DOCK_SOUND);
3283 PRIVATE_SETTINGS.add(CAR_UNDOCK_SOUND);
3284 PRIVATE_SETTINGS.add(LOCK_SOUND);
3285 PRIVATE_SETTINGS.add(UNLOCK_SOUND);
3286 PRIVATE_SETTINGS.add(SIP_RECEIVE_CALLS);
3287 PRIVATE_SETTINGS.add(SIP_CALL_OPTIONS);
3288 PRIVATE_SETTINGS.add(SIP_ALWAYS);
3289 PRIVATE_SETTINGS.add(SIP_ADDRESS_ONLY);
3290 PRIVATE_SETTINGS.add(SIP_ASK_ME_EACH_TIME);
3291 PRIVATE_SETTINGS.add(POINTER_SPEED);
3292 PRIVATE_SETTINGS.add(LOCK_TO_APP_ENABLED);
3293 PRIVATE_SETTINGS.add(EGG_MODE);
3294 }
3295
3296 /**
Amith Yamasanib0ff3222015-03-04 09:56:14 -08003297 * These are all public system settings
Svetoslav683914b2015-01-15 14:22:26 -08003298 *
3299 * @hide
3300 */
3301 public static final Map<String, Validator> VALIDATORS = new ArrayMap<>();
3302 static {
3303 VALIDATORS.put(END_BUTTON_BEHAVIOR,END_BUTTON_BEHAVIOR_VALIDATOR);
3304 VALIDATORS.put(WIFI_USE_STATIC_IP, WIFI_USE_STATIC_IP_VALIDATOR);
3305 VALIDATORS.put(BLUETOOTH_DISCOVERABILITY, BLUETOOTH_DISCOVERABILITY_VALIDATOR);
3306 VALIDATORS.put(BLUETOOTH_DISCOVERABILITY_TIMEOUT,
3307 BLUETOOTH_DISCOVERABILITY_TIMEOUT_VALIDATOR);
3308 VALIDATORS.put(NEXT_ALARM_FORMATTED, NEXT_ALARM_FORMATTED_VALIDATOR);
3309 VALIDATORS.put(FONT_SCALE, FONT_SCALE_VALIDATOR);
3310 VALIDATORS.put(DIM_SCREEN, DIM_SCREEN_VALIDATOR);
3311 VALIDATORS.put(SCREEN_OFF_TIMEOUT, SCREEN_OFF_TIMEOUT_VALIDATOR);
3312 VALIDATORS.put(SCREEN_BRIGHTNESS, SCREEN_BRIGHTNESS_VALIDATOR);
3313 VALIDATORS.put(SCREEN_BRIGHTNESS_MODE, SCREEN_BRIGHTNESS_MODE_VALIDATOR);
3314 VALIDATORS.put(MODE_RINGER_STREAMS_AFFECTED, MODE_RINGER_STREAMS_AFFECTED_VALIDATOR);
3315 VALIDATORS.put(MUTE_STREAMS_AFFECTED, MUTE_STREAMS_AFFECTED_VALIDATOR);
3316 VALIDATORS.put(VIBRATE_ON, VIBRATE_ON_VALIDATOR);
Svetoslav683914b2015-01-15 14:22:26 -08003317 VALIDATORS.put(RINGTONE, RINGTONE_VALIDATOR);
3318 VALIDATORS.put(NOTIFICATION_SOUND, NOTIFICATION_SOUND_VALIDATOR);
3319 VALIDATORS.put(ALARM_ALERT, ALARM_ALERT_VALIDATOR);
3320 VALIDATORS.put(TEXT_AUTO_REPLACE, TEXT_AUTO_REPLACE_VALIDATOR);
3321 VALIDATORS.put(TEXT_AUTO_CAPS, TEXT_AUTO_CAPS_VALIDATOR);
3322 VALIDATORS.put(TEXT_AUTO_PUNCTUATE, TEXT_AUTO_PUNCTUATE_VALIDATOR);
3323 VALIDATORS.put(TEXT_SHOW_PASSWORD, TEXT_SHOW_PASSWORD_VALIDATOR);
3324 VALIDATORS.put(SHOW_GTALK_SERVICE_STATUS, SHOW_GTALK_SERVICE_STATUS_VALIDATOR);
3325 VALIDATORS.put(WALLPAPER_ACTIVITY, WALLPAPER_ACTIVITY_VALIDATOR);
3326 VALIDATORS.put(TIME_12_24, TIME_12_24_VALIDATOR);
3327 VALIDATORS.put(DATE_FORMAT, DATE_FORMAT_VALIDATOR);
3328 VALIDATORS.put(SETUP_WIZARD_HAS_RUN, SETUP_WIZARD_HAS_RUN_VALIDATOR);
3329 VALIDATORS.put(ACCELEROMETER_ROTATION, ACCELEROMETER_ROTATION_VALIDATOR);
3330 VALIDATORS.put(USER_ROTATION, USER_ROTATION_VALIDATOR);
3331 VALIDATORS.put(DTMF_TONE_WHEN_DIALING, DTMF_TONE_WHEN_DIALING_VALIDATOR);
3332 VALIDATORS.put(SOUND_EFFECTS_ENABLED, SOUND_EFFECTS_ENABLED_VALIDATOR);
3333 VALIDATORS.put(HAPTIC_FEEDBACK_ENABLED, HAPTIC_FEEDBACK_ENABLED_VALIDATOR);
3334 VALIDATORS.put(SHOW_WEB_SUGGESTIONS, SHOW_WEB_SUGGESTIONS_VALIDATOR);
3335 VALIDATORS.put(WIFI_USE_STATIC_IP, WIFI_USE_STATIC_IP_VALIDATOR);
3336 VALIDATORS.put(END_BUTTON_BEHAVIOR, END_BUTTON_BEHAVIOR_VALIDATOR);
3337 VALIDATORS.put(ADVANCED_SETTINGS, ADVANCED_SETTINGS_VALIDATOR);
3338 VALIDATORS.put(SCREEN_AUTO_BRIGHTNESS_ADJ, SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR);
3339 VALIDATORS.put(VIBRATE_INPUT_DEVICES, VIBRATE_INPUT_DEVICES_VALIDATOR);
Svetoslav683914b2015-01-15 14:22:26 -08003340 VALIDATORS.put(VOLUME_MASTER_MUTE, VOLUME_MASTER_MUTE_VALIDATOR);
3341 VALIDATORS.put(MICROPHONE_MUTE, MICROPHONE_MUTE_VALIDATOR);
3342 VALIDATORS.put(NOTIFICATIONS_USE_RING_VOLUME, NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR);
3343 VALIDATORS.put(VIBRATE_IN_SILENT, VIBRATE_IN_SILENT_VALIDATOR);
3344 VALIDATORS.put(MEDIA_BUTTON_RECEIVER, MEDIA_BUTTON_RECEIVER_VALIDATOR);
3345 VALIDATORS.put(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY,
3346 HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY_VALIDATOR);
3347 VALIDATORS.put(VIBRATE_WHEN_RINGING, VIBRATE_WHEN_RINGING_VALIDATOR);
3348 VALIDATORS.put(DTMF_TONE_TYPE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING_VALIDATOR);
3349 VALIDATORS.put(HEARING_AID, HEARING_AID_VALIDATOR);
3350 VALIDATORS.put(TTY_MODE, TTY_MODE_VALIDATOR);
3351 VALIDATORS.put(NOTIFICATION_LIGHT_PULSE, NOTIFICATION_LIGHT_PULSE_VALIDATOR);
3352 VALIDATORS.put(POINTER_LOCATION, POINTER_LOCATION_VALIDATOR);
3353 VALIDATORS.put(SHOW_TOUCHES, SHOW_TOUCHES_VALIDATOR);
3354 VALIDATORS.put(WINDOW_ORIENTATION_LISTENER_LOG,
3355 WINDOW_ORIENTATION_LISTENER_LOG_VALIDATOR);
3356 VALIDATORS.put(LOCKSCREEN_SOUNDS_ENABLED, LOCKSCREEN_SOUNDS_ENABLED_VALIDATOR);
3357 VALIDATORS.put(LOCKSCREEN_DISABLED, LOCKSCREEN_DISABLED_VALIDATOR);
3358 VALIDATORS.put(SIP_RECEIVE_CALLS, SIP_RECEIVE_CALLS_VALIDATOR);
3359 VALIDATORS.put(SIP_CALL_OPTIONS, SIP_CALL_OPTIONS_VALIDATOR);
3360 VALIDATORS.put(SIP_ALWAYS, SIP_ALWAYS_VALIDATOR);
3361 VALIDATORS.put(SIP_ADDRESS_ONLY, SIP_ADDRESS_ONLY_VALIDATOR);
3362 VALIDATORS.put(SIP_ASK_ME_EACH_TIME, SIP_ASK_ME_EACH_TIME_VALIDATOR);
3363 VALIDATORS.put(POINTER_SPEED, POINTER_SPEED_VALIDATOR);
3364 VALIDATORS.put(LOCK_TO_APP_ENABLED, LOCK_TO_APP_ENABLED_VALIDATOR);
3365 VALIDATORS.put(EGG_MODE, EGG_MODE_VALIDATOR);
3366 VALIDATORS.put(WIFI_STATIC_IP, WIFI_STATIC_IP_VALIDATOR);
3367 VALIDATORS.put(WIFI_STATIC_GATEWAY, WIFI_STATIC_GATEWAY_VALIDATOR);
3368 VALIDATORS.put(WIFI_STATIC_NETMASK, WIFI_STATIC_NETMASK_VALIDATOR);
3369 VALIDATORS.put(WIFI_STATIC_DNS1, WIFI_STATIC_DNS1_VALIDATOR);
3370 VALIDATORS.put(WIFI_STATIC_DNS2, WIFI_STATIC_DNS2_VALIDATOR);
3371 }
3372
3373 /**
3374 * These entries are considered common between the personal and the managed profile,
3375 * since the managed profile doesn't get to change them.
3376 */
3377 private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>();
3378 static {
3379 CLONE_TO_MANAGED_PROFILE.add(DATE_FORMAT);
3380 CLONE_TO_MANAGED_PROFILE.add(HAPTIC_FEEDBACK_ENABLED);
3381 CLONE_TO_MANAGED_PROFILE.add(SOUND_EFFECTS_ENABLED);
3382 CLONE_TO_MANAGED_PROFILE.add(TEXT_SHOW_PASSWORD);
3383 CLONE_TO_MANAGED_PROFILE.add(TIME_12_24);
3384 }
3385
3386 /** @hide */
3387 public static void getCloneToManagedProfileSettings(Set<String> outKeySet) {
3388 outKeySet.addAll(CLONE_TO_MANAGED_PROFILE);
3389 }
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07003390
3391 /**
Sailesh Nepal1bd78762014-02-11 22:32:21 -08003392 * When to use Wi-Fi calling
3393 *
3394 * @see android.telephony.TelephonyManager.WifiCallingChoices
3395 * @hide
3396 */
3397 public static final String WHEN_TO_MAKE_WIFI_CALLS = "when_to_make_wifi_calls";
3398
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003399 // Settings moved to Settings.Secure
3400
3401 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003402 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003403 * instead
3404 */
3405 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003406 public static final String ADB_ENABLED = Global.ADB_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003407
3408 /**
3409 * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead
3410 */
3411 @Deprecated
3412 public static final String ANDROID_ID = Secure.ANDROID_ID;
3413
3414 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003415 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003416 */
3417 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003418 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003419
3420 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003421 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003422 */
3423 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003424 public static final String DATA_ROAMING = Global.DATA_ROAMING;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003425
3426 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003427 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003428 */
3429 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003430 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003431
3432 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07003433 * @deprecated Use {@link android.provider.Settings.Global#HTTP_PROXY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003434 */
3435 @Deprecated
Jeff Sharkey625239a2012-09-26 22:03:49 -07003436 public static final String HTTP_PROXY = Global.HTTP_PROXY;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003437
3438 /**
Christopher Tateaa036a22014-05-19 16:33:27 -07003439 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003440 */
3441 @Deprecated
Christopher Tateaa036a22014-05-19 16:33:27 -07003442 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003443
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003444 /**
3445 * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED}
3446 * instead
3447 */
3448 @Deprecated
3449 public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED;
3450
3451 /**
3452 * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead
3453 */
3454 @Deprecated
3455 public static final String LOGGING_ID = Secure.LOGGING_ID;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003456
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003457 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003458 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003459 */
3460 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003461 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003462
3463 /**
3464 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED}
3465 * instead
3466 */
3467 @Deprecated
3468 public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED;
3469
3470 /**
3471 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE}
3472 * instead
3473 */
3474 @Deprecated
3475 public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE;
3476
3477 /**
3478 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL}
3479 * instead
3480 */
3481 @Deprecated
3482 public static final String PARENTAL_CONTROL_REDIRECT_URL =
3483 Secure.PARENTAL_CONTROL_REDIRECT_URL;
3484
3485 /**
3486 * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead
3487 */
3488 @Deprecated
3489 public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME;
3490
3491 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003492 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003493 */
3494 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003495 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003496
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003497 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003498 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003499 */
3500 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003501 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003502
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003503 /**
3504 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003505 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003506 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003507 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003508 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003509
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003510 /**
3511 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003512 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003513 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003514 @Deprecated
3515 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
Christopher Tate06efb532012-08-24 15:29:27 -07003516 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003517
3518 /**
3519 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003520 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003521 */
3522 @Deprecated
3523 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Christopher Tate06efb532012-08-24 15:29:27 -07003524 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003525
3526 /**
3527 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003528 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003529 */
3530 @Deprecated
3531 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
Christopher Tate06efb532012-08-24 15:29:27 -07003532 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003533
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003534 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003535 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003536 * instead
3537 */
3538 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003539 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = Global.WIFI_NUM_OPEN_NETWORKS_KEPT;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003540
3541 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003542 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003543 */
3544 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003545 public static final String WIFI_ON = Global.WIFI_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003546
3547 /**
3548 * @deprecated Use
3549 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE}
3550 * instead
3551 */
3552 @Deprecated
3553 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
3554 Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE;
3555
3556 /**
3557 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead
3558 */
3559 @Deprecated
3560 public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT;
3561
3562 /**
3563 * @deprecated Use
3564 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead
3565 */
3566 @Deprecated
3567 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
3568 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003569
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003570 /**
3571 * @deprecated Use
3572 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead
3573 */
3574 @Deprecated
3575 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
3576 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED;
3577
3578 /**
3579 * @deprecated Use
3580 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS}
3581 * instead
3582 */
3583 @Deprecated
3584 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
3585 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS;
3586
3587 /**
3588 * @deprecated Use
3589 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead
3590 */
3591 @Deprecated
3592 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
3593 Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT;
3594
3595 /**
3596 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS}
3597 * instead
3598 */
3599 @Deprecated
3600 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS;
3601
3602 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003603 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003604 */
3605 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003606 public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003607
3608 /**
3609 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead
3610 */
3611 @Deprecated
3612 public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT;
3613
3614 /**
3615 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS}
3616 * instead
3617 */
3618 @Deprecated
3619 public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS;
3620
3621 /**
3622 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS}
3623 * instead
3624 */
3625 @Deprecated
3626 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS =
3627 Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS;
3628 }
3629
3630 /**
3631 * Secure system settings, containing system preferences that applications
3632 * can read but are not allowed to write. These are for preferences that
3633 * the user must explicitly modify through the system UI or specialized
3634 * APIs for those values, not modified directly by applications.
3635 */
3636 public static final class Secure extends NameValueTable {
3637 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
3638
Dianne Hackborn139748f2012-09-24 11:36:57 -07003639 /**
3640 * The content:// style URL for this table
3641 */
3642 public static final Uri CONTENT_URI =
3643 Uri.parse("content://" + AUTHORITY + "/secure");
3644
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08003645 // Populated lazily, guarded by class object:
Dianne Hackborn139748f2012-09-24 11:36:57 -07003646 private static final NameValueCache sNameValueCache = new NameValueCache(
3647 SYS_PROP_SETTING_VERSION,
3648 CONTENT_URI,
3649 CALL_METHOD_GET_SECURE,
3650 CALL_METHOD_PUT_SECURE);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003651
Amith Yamasani52c489c2012-03-28 11:42:42 -07003652 private static ILockSettings sLockSettings = null;
3653
Amith Yamasani7ab8c4a2012-04-06 09:27:12 -07003654 private static boolean sIsSystemProcess;
Amith Yamasani52c489c2012-03-28 11:42:42 -07003655 private static final HashSet<String> MOVED_TO_LOCK_SETTINGS;
Christopher Tate06efb532012-08-24 15:29:27 -07003656 private static final HashSet<String> MOVED_TO_GLOBAL;
Amith Yamasani52c489c2012-03-28 11:42:42 -07003657 static {
3658 MOVED_TO_LOCK_SETTINGS = new HashSet<String>(3);
3659 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED);
3660 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE);
3661 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
Christopher Tate06efb532012-08-24 15:29:27 -07003662
3663 MOVED_TO_GLOBAL = new HashSet<String>();
3664 MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED);
3665 MOVED_TO_GLOBAL.add(Settings.Global.ASSISTED_GPS_ENABLED);
3666 MOVED_TO_GLOBAL.add(Settings.Global.BLUETOOTH_ON);
Christopher Tate58f41ec2013-01-11 15:40:36 -08003667 MOVED_TO_GLOBAL.add(Settings.Global.BUGREPORT_IN_POWER_MENU);
Christopher Tate06efb532012-08-24 15:29:27 -07003668 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_CELL_BROADCAST_SMS);
3669 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_ROAMING_MODE);
3670 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_SUBSCRIPTION_MODE);
3671 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE);
3672 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI);
3673 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ROAMING);
3674 MOVED_TO_GLOBAL.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED);
3675 MOVED_TO_GLOBAL.add(Settings.Global.DEVICE_PROVISIONED);
3676 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_DENSITY_FORCED);
3677 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_SIZE_FORCED);
3678 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE);
3679 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE);
Christopher Tate06efb532012-08-24 15:29:27 -07003680 MOVED_TO_GLOBAL.add(Settings.Global.MOBILE_DATA);
3681 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION);
3682 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_DELETE_AGE);
3683 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES);
3684 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE);
3685 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_ENABLED);
3686 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES);
3687 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_POLL_INTERVAL);
Christopher Tate06efb532012-08-24 15:29:27 -07003688 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_SAMPLE_ENABLED);
3689 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE);
3690 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION);
3691 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_DELETE_AGE);
3692 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES);
3693 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_ROTATE_AGE);
3694 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION);
3695 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE);
3696 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES);
3697 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE);
3698 MOVED_TO_GLOBAL.add(Settings.Global.NETWORK_PREFERENCE);
3699 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_DIFF);
3700 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING);
3701 MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER);
3702 MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT);
3703 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT);
3704 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS);
3705 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT);
3706 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS);
3707 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT);
3708 MOVED_TO_GLOBAL.add(Settings.Global.SAMPLING_PROFILER_MS);
3709 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL);
3710 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST);
3711 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL);
3712 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_APN);
3713 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_REQUIRED);
3714 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_SUPPORTED);
Christopher Tate06efb532012-08-24 15:29:27 -07003715 MOVED_TO_GLOBAL.add(Settings.Global.USB_MASS_STORAGE_ENABLED);
3716 MOVED_TO_GLOBAL.add(Settings.Global.USE_GOOGLE_MAIL);
Robert Greenwalt3ea0c992013-10-03 21:13:49 +00003717 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_COUNTRY_CODE);
Christopher Tate06efb532012-08-24 15:29:27 -07003718 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS);
3719 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FREQUENCY_BAND);
3720 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_IDLE_MS);
3721 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT);
3722 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS);
3723 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON);
3724 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY);
3725 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT);
3726 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON);
3727 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME);
3728 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SAVED_STATE);
3729 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS);
3730 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED);
vandwalle7c3606c2014-03-31 19:12:07 -07003731 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ENHANCED_AUTO_JOIN);
3732 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORK_SHOW_RSSI);
Christopher Tate06efb532012-08-24 15:29:27 -07003733 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_ON);
3734 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED);
Christopher Tate06efb532012-08-24 15:29:27 -07003735 MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON);
Christopher Tatec868b642012-09-12 17:41:04 -07003736 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_ENABLE);
3737 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT);
3738 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE);
3739 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS);
3740 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS);
3741 MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS);
Christopher Tate06efb532012-08-24 15:29:27 -07003742 MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL);
Jeff Sharkey625239a2012-09-26 22:03:49 -07003743 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD);
3744 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_THRESHOLD);
3745 MOVED_TO_GLOBAL.add(Settings.Global.SEND_ACTION_APP_ERROR);
3746 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_AGE_SECONDS);
3747 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_MAX_FILES);
3748 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_KB);
3749 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_PERCENT);
3750 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_RESERVE_PERCENT);
3751 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_TAG_PREFIX);
3752 MOVED_TO_GLOBAL.add(Settings.Global.ERROR_LOGCAT_PREFIX);
3753 MOVED_TO_GLOBAL.add(Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL);
3754 MOVED_TO_GLOBAL.add(Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD);
3755 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE);
3756 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES);
3757 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES);
3758 MOVED_TO_GLOBAL.add(Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS);
3759 MOVED_TO_GLOBAL.add(Settings.Global.CONNECTIVITY_CHANGE_DELAY);
3760 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED);
3761 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_SERVER);
3762 MOVED_TO_GLOBAL.add(Settings.Global.NSD_ON);
3763 MOVED_TO_GLOBAL.add(Settings.Global.SET_INSTALL_LOCATION);
3764 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_INSTALL_LOCATION);
3765 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY);
3766 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY);
3767 MOVED_TO_GLOBAL.add(Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT);
3768 MOVED_TO_GLOBAL.add(Settings.Global.HTTP_PROXY);
3769 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_HOST);
3770 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_PORT);
3771 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST);
3772 MOVED_TO_GLOBAL.add(Settings.Global.SET_GLOBAL_HTTP_PROXY);
3773 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER);
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07003774 MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE);
Hui Shu22671772014-10-01 21:41:07 +00003775 MOVED_TO_GLOBAL.add(Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY);
Christopher Tate06efb532012-08-24 15:29:27 -07003776 }
3777
Christopher Tate66488d62012-10-02 11:58:01 -07003778 /** @hide */
Svetoslav683914b2015-01-15 14:22:26 -08003779 public static void getMovedToGlobalSettings(Set<String> outKeySet) {
Christopher Tate66488d62012-10-02 11:58:01 -07003780 outKeySet.addAll(MOVED_TO_GLOBAL);
3781 }
3782
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003783 /**
3784 * Look up a name in the database.
3785 * @param resolver to access the database with
3786 * @param name to look up in the table
3787 * @return the corresponding value, or null if not present
3788 */
Dianne Hackborn139748f2012-09-24 11:36:57 -07003789 public static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07003790 return getStringForUser(resolver, name, UserHandle.myUserId());
3791 }
3792
3793 /** @hide */
Dianne Hackborn139748f2012-09-24 11:36:57 -07003794 public static String getStringForUser(ContentResolver resolver, String name,
Christopher Tate06efb532012-08-24 15:29:27 -07003795 int userHandle) {
3796 if (MOVED_TO_GLOBAL.contains(name)) {
3797 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure"
3798 + " to android.provider.Settings.Global.");
3799 return Global.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003800 }
Amith Yamasani52c489c2012-03-28 11:42:42 -07003801
Dianne Hackborn139748f2012-09-24 11:36:57 -07003802 if (MOVED_TO_LOCK_SETTINGS.contains(name)) {
3803 synchronized (Secure.class) {
3804 if (sLockSettings == null) {
3805 sLockSettings = ILockSettings.Stub.asInterface(
3806 (IBinder) ServiceManager.getService("lock_settings"));
3807 sIsSystemProcess = Process.myUid() == Process.SYSTEM_UID;
3808 }
3809 }
3810 if (sLockSettings != null && !sIsSystemProcess) {
3811 try {
3812 return sLockSettings.getString(name, "0", userHandle);
3813 } catch (RemoteException re) {
3814 // Fall through
3815 }
Amith Yamasani52c489c2012-03-28 11:42:42 -07003816 }
3817 }
3818
Christopher Tate06efb532012-08-24 15:29:27 -07003819 return sNameValueCache.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003820 }
3821
3822 /**
3823 * Store a name/value pair into the database.
3824 * @param resolver to access the database with
3825 * @param name to store
3826 * @param value to associate with the name
3827 * @return true if the value was set, false on database errors
3828 */
Christopher Tate06efb532012-08-24 15:29:27 -07003829 public static boolean putString(ContentResolver resolver, String name, String value) {
3830 return putStringForUser(resolver, name, value, UserHandle.myUserId());
3831 }
3832
3833 /** @hide */
3834 public static boolean putStringForUser(ContentResolver resolver, String name, String value,
3835 int userHandle) {
Julia Reynolds82735bc2014-09-04 16:43:30 -04003836 if (LOCATION_MODE.equals(name)) {
3837 // HACK ALERT: temporary hack to work around b/10491283.
3838 // TODO: once b/10491283 fixed, remove this hack
3839 return setLocationModeForUser(resolver, Integer.parseInt(value), userHandle);
3840 }
Christopher Tate06efb532012-08-24 15:29:27 -07003841 if (MOVED_TO_GLOBAL.contains(name)) {
3842 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
3843 + " to android.provider.Settings.Global");
3844 return Global.putStringForUser(resolver, name, value, userHandle);
3845 }
Christopher Tate06efb532012-08-24 15:29:27 -07003846 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003847 }
3848
3849 /**
3850 * Construct the content URI for a particular name/value pair,
3851 * useful for monitoring changes with a ContentObserver.
3852 * @param name to look up in the table
3853 * @return the corresponding content URI, or null if not present
3854 */
3855 public static Uri getUriFor(String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07003856 if (MOVED_TO_GLOBAL.contains(name)) {
3857 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure"
3858 + " to android.provider.Settings.Global, returning global URI.");
3859 return Global.getUriFor(Global.CONTENT_URI, name);
3860 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003861 return getUriFor(CONTENT_URI, name);
3862 }
3863
3864 /**
3865 * Convenience function for retrieving a single secure settings value
3866 * as an integer. Note that internally setting values are always
3867 * stored as strings; this function converts the string to an integer
3868 * for you. The default value will be returned if the setting is
3869 * not defined or not an integer.
3870 *
3871 * @param cr The ContentResolver to access.
3872 * @param name The name of the setting to retrieve.
3873 * @param def Value to return if the setting is not defined.
3874 *
3875 * @return The setting's current value, or 'def' if it is not defined
3876 * or not a valid integer.
3877 */
3878 public static int getInt(ContentResolver cr, String name, int def) {
Christopher Tate06efb532012-08-24 15:29:27 -07003879 return getIntForUser(cr, name, def, UserHandle.myUserId());
3880 }
3881
3882 /** @hide */
3883 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
Tom O'Neill7f6f4572013-08-27 10:53:15 -07003884 if (LOCATION_MODE.equals(name)) {
3885 // HACK ALERT: temporary hack to work around b/10491283.
3886 // TODO: once b/10491283 fixed, remove this hack
3887 return getLocationModeForUser(cr, userHandle);
3888 }
Christopher Tate06efb532012-08-24 15:29:27 -07003889 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003890 try {
3891 return v != null ? Integer.parseInt(v) : def;
3892 } catch (NumberFormatException e) {
3893 return def;
3894 }
3895 }
3896
3897 /**
3898 * Convenience function for retrieving a single secure settings value
3899 * as an integer. Note that internally setting values are always
3900 * stored as strings; this function converts the string to an integer
3901 * for you.
3902 * <p>
3903 * This version does not take a default value. If the setting has not
3904 * been set, or the string value is not a number,
3905 * it throws {@link SettingNotFoundException}.
3906 *
3907 * @param cr The ContentResolver to access.
3908 * @param name The name of the setting to retrieve.
3909 *
3910 * @throws SettingNotFoundException Thrown if a setting by the given
3911 * name can't be found or the setting value is not an integer.
3912 *
3913 * @return The setting's current value.
3914 */
3915 public static int getInt(ContentResolver cr, String name)
3916 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07003917 return getIntForUser(cr, name, UserHandle.myUserId());
3918 }
3919
3920 /** @hide */
3921 public static int getIntForUser(ContentResolver cr, String name, int userHandle)
3922 throws SettingNotFoundException {
Tom O'Neill7f6f4572013-08-27 10:53:15 -07003923 if (LOCATION_MODE.equals(name)) {
3924 // HACK ALERT: temporary hack to work around b/10491283.
3925 // TODO: once b/10491283 fixed, remove this hack
3926 return getLocationModeForUser(cr, userHandle);
3927 }
Christopher Tate06efb532012-08-24 15:29:27 -07003928 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003929 try {
3930 return Integer.parseInt(v);
3931 } catch (NumberFormatException e) {
3932 throw new SettingNotFoundException(name);
3933 }
3934 }
3935
3936 /**
3937 * Convenience function for updating a single settings value as an
3938 * integer. This will either create a new entry in the table if the
3939 * given name does not exist, or modify the value of the existing row
3940 * with that name. Note that internally setting values are always
3941 * stored as strings, so this function converts the given value to a
3942 * string before storing it.
3943 *
3944 * @param cr The ContentResolver to access.
3945 * @param name The name of the setting to modify.
3946 * @param value The new value for the setting.
3947 * @return true if the value was set, false on database errors
3948 */
3949 public static boolean putInt(ContentResolver cr, String name, int value) {
Christopher Tate06efb532012-08-24 15:29:27 -07003950 return putIntForUser(cr, name, value, UserHandle.myUserId());
3951 }
3952
3953 /** @hide */
3954 public static boolean putIntForUser(ContentResolver cr, String name, int value,
3955 int userHandle) {
3956 return putStringForUser(cr, name, Integer.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003957 }
3958
3959 /**
3960 * Convenience function for retrieving a single secure settings value
3961 * as a {@code long}. Note that internally setting values are always
3962 * stored as strings; this function converts the string to a {@code long}
3963 * for you. The default value will be returned if the setting is
3964 * not defined or not a {@code long}.
3965 *
3966 * @param cr The ContentResolver to access.
3967 * @param name The name of the setting to retrieve.
3968 * @param def Value to return if the setting is not defined.
3969 *
3970 * @return The setting's current value, or 'def' if it is not defined
3971 * or not a valid {@code long}.
3972 */
3973 public static long getLong(ContentResolver cr, String name, long def) {
Christopher Tate06efb532012-08-24 15:29:27 -07003974 return getLongForUser(cr, name, def, UserHandle.myUserId());
3975 }
3976
3977 /** @hide */
3978 public static long getLongForUser(ContentResolver cr, String name, long def,
3979 int userHandle) {
3980 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003981 long value;
3982 try {
3983 value = valString != null ? Long.parseLong(valString) : def;
3984 } catch (NumberFormatException e) {
3985 value = def;
3986 }
3987 return value;
3988 }
3989
3990 /**
3991 * Convenience function for retrieving a single secure settings value
3992 * as a {@code long}. Note that internally setting values are always
3993 * stored as strings; this function converts the string to a {@code long}
3994 * for you.
3995 * <p>
3996 * This version does not take a default value. If the setting has not
3997 * been set, or the string value is not a number,
3998 * it throws {@link SettingNotFoundException}.
3999 *
4000 * @param cr The ContentResolver to access.
4001 * @param name The name of the setting to retrieve.
4002 *
4003 * @return The setting's current value.
4004 * @throws SettingNotFoundException Thrown if a setting by the given
4005 * name can't be found or the setting value is not an integer.
4006 */
4007 public static long getLong(ContentResolver cr, String name)
4008 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07004009 return getLongForUser(cr, name, UserHandle.myUserId());
4010 }
4011
4012 /** @hide */
4013 public static long getLongForUser(ContentResolver cr, String name, int userHandle)
4014 throws SettingNotFoundException {
4015 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004016 try {
4017 return Long.parseLong(valString);
4018 } catch (NumberFormatException e) {
4019 throw new SettingNotFoundException(name);
4020 }
4021 }
4022
4023 /**
4024 * Convenience function for updating a secure settings value as a long
4025 * integer. This will either create a new entry in the table if the
4026 * given name does not exist, or modify the value of the existing row
4027 * with that name. Note that internally setting values are always
4028 * stored as strings, so this function converts the given value to a
4029 * string before storing it.
4030 *
4031 * @param cr The ContentResolver to access.
4032 * @param name The name of the setting to modify.
4033 * @param value The new value for the setting.
4034 * @return true if the value was set, false on database errors
4035 */
4036 public static boolean putLong(ContentResolver cr, String name, long value) {
Christopher Tate06efb532012-08-24 15:29:27 -07004037 return putLongForUser(cr, name, value, UserHandle.myUserId());
4038 }
4039
4040 /** @hide */
4041 public static boolean putLongForUser(ContentResolver cr, String name, long value,
4042 int userHandle) {
4043 return putStringForUser(cr, name, Long.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004044 }
4045
4046 /**
4047 * Convenience function for retrieving a single secure settings value
4048 * as a floating point number. Note that internally setting values are
4049 * always stored as strings; this function converts the string to an
4050 * float for you. The default value will be returned if the setting
4051 * is not defined or not a valid float.
4052 *
4053 * @param cr The ContentResolver to access.
4054 * @param name The name of the setting to retrieve.
4055 * @param def Value to return if the setting is not defined.
4056 *
4057 * @return The setting's current value, or 'def' if it is not defined
4058 * or not a valid float.
4059 */
4060 public static float getFloat(ContentResolver cr, String name, float def) {
Christopher Tate06efb532012-08-24 15:29:27 -07004061 return getFloatForUser(cr, name, def, UserHandle.myUserId());
4062 }
4063
4064 /** @hide */
4065 public static float getFloatForUser(ContentResolver cr, String name, float def,
4066 int userHandle) {
4067 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004068 try {
4069 return v != null ? Float.parseFloat(v) : def;
4070 } catch (NumberFormatException e) {
4071 return def;
4072 }
4073 }
4074
4075 /**
4076 * Convenience function for retrieving a single secure settings value
4077 * as a float. Note that internally setting values are always
4078 * stored as strings; this function converts the string to a float
4079 * for you.
4080 * <p>
4081 * This version does not take a default value. If the setting has not
4082 * been set, or the string value is not a number,
4083 * it throws {@link SettingNotFoundException}.
4084 *
4085 * @param cr The ContentResolver to access.
4086 * @param name The name of the setting to retrieve.
4087 *
4088 * @throws SettingNotFoundException Thrown if a setting by the given
4089 * name can't be found or the setting value is not a float.
4090 *
4091 * @return The setting's current value.
4092 */
4093 public static float getFloat(ContentResolver cr, String name)
4094 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07004095 return getFloatForUser(cr, name, UserHandle.myUserId());
4096 }
4097
4098 /** @hide */
4099 public static float getFloatForUser(ContentResolver cr, String name, int userHandle)
4100 throws SettingNotFoundException {
4101 String v = getStringForUser(cr, name, userHandle);
Brian Muramatsue1d46982010-12-06 17:34:20 -08004102 if (v == null) {
4103 throw new SettingNotFoundException(name);
4104 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004105 try {
4106 return Float.parseFloat(v);
4107 } catch (NumberFormatException e) {
4108 throw new SettingNotFoundException(name);
4109 }
4110 }
4111
4112 /**
4113 * Convenience function for updating a single settings value as a
4114 * floating point number. This will either create a new entry in the
4115 * table if the given name does not exist, or modify the value of the
4116 * existing row with that name. Note that internally setting values
4117 * are always stored as strings, so this function converts the given
4118 * value to a string before storing it.
4119 *
4120 * @param cr The ContentResolver to access.
4121 * @param name The name of the setting to modify.
4122 * @param value The new value for the setting.
4123 * @return true if the value was set, false on database errors
4124 */
4125 public static boolean putFloat(ContentResolver cr, String name, float value) {
Christopher Tate06efb532012-08-24 15:29:27 -07004126 return putFloatForUser(cr, name, value, UserHandle.myUserId());
4127 }
4128
4129 /** @hide */
4130 public static boolean putFloatForUser(ContentResolver cr, String name, float value,
4131 int userHandle) {
4132 return putStringForUser(cr, name, Float.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004133 }
4134
4135 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004136 * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED}
4137 * instead
Dianne Hackborn895f99e2012-02-02 11:49:12 -08004138 */
Christopher Tate06efb532012-08-24 15:29:27 -07004139 @Deprecated
4140 public static final String DEVELOPMENT_SETTINGS_ENABLED =
4141 Global.DEVELOPMENT_SETTINGS_ENABLED;
Dianne Hackborn895f99e2012-02-02 11:49:12 -08004142
4143 /**
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07004144 * When the user has enable the option to have a "bug report" command
4145 * in the power menu.
Christopher Tate58f41ec2013-01-11 15:40:36 -08004146 * @deprecated Use {@link android.provider.Settings.Global#BUGREPORT_IN_POWER_MENU} instead
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07004147 * @hide
4148 */
Christopher Tate58f41ec2013-01-11 15:40:36 -08004149 @Deprecated
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07004150 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu";
4151
4152 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004153 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004154 */
Christopher Tate06efb532012-08-24 15:29:27 -07004155 @Deprecated
4156 public static final String ADB_ENABLED = Global.ADB_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004157
4158 /**
4159 * Setting to allow mock locations and location provider status to be injected into the
4160 * LocationManager service for testing purposes during application development. These
4161 * locations and status values override actual location and status information generated
4162 * by network, gps, or other location providers.
Svet Ganovf7e9cf42015-05-13 10:40:31 -07004163 *
4164 * @deprecated This settings is not used anymore.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004165 */
Svet Ganovf7e9cf42015-05-13 10:40:31 -07004166 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004167 public static final String ALLOW_MOCK_LOCATION = "mock_location";
4168
4169 /**
Doug Zongkerd8893db2010-01-26 12:29:44 -08004170 * A 64-bit number (as a hex string) that is randomly
Scott Main44895332013-11-12 09:23:13 -08004171 * generated when the user first sets up the device and should remain
4172 * constant for the lifetime of the user's device. The value may
4173 * change if a factory reset is performed on the device.
4174 * <p class="note"><strong>Note:</strong> When a device has <a
4175 * href="{@docRoot}about/versions/android-4.2.html#MultipleUsers">multiple users</a>
4176 * (available on certain devices running Android 4.2 or higher), each user appears as a
4177 * completely separate device, so the {@code ANDROID_ID} value is unique to each
4178 * user.</p>
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004179 */
4180 public static final String ANDROID_ID = "android_id";
4181
4182 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004183 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004184 */
Christopher Tate06efb532012-08-24 15:29:27 -07004185 @Deprecated
4186 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004187
4188 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004189 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004190 */
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07004191 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07004192 public static final String DATA_ROAMING = Global.DATA_ROAMING;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004193
4194 /**
4195 * Setting to record the input method used by default, holding the ID
4196 * of the desired method.
4197 */
4198 public static final String DEFAULT_INPUT_METHOD = "default_input_method";
4199
4200 /**
satokab751aa2010-09-14 19:17:36 +09004201 * Setting to record the input method subtype used by default, holding the ID
4202 * of the desired method.
4203 */
4204 public static final String SELECTED_INPUT_METHOD_SUBTYPE =
4205 "selected_input_method_subtype";
4206
4207 /**
satok723a27e2010-11-11 14:58:11 +09004208 * Setting to record the history of input method subtype, holding the pair of ID of IME
4209 * and its last used subtype.
4210 * @hide
4211 */
4212 public static final String INPUT_METHODS_SUBTYPE_HISTORY =
4213 "input_methods_subtype_history";
4214
4215 /**
satok5c58dfc2010-12-14 21:54:47 +09004216 * Setting to record the visibility of input method selector
4217 */
4218 public static final String INPUT_METHOD_SELECTOR_VISIBILITY =
4219 "input_method_selector_visibility";
4220
4221 /**
Dianne Hackborn91097de2014-04-04 18:02:06 -07004222 * The currently selected voice interaction service flattened ComponentName.
4223 * @hide
4224 */
4225 public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service";
4226
4227 /**
Zhihai Xuaf5971e2013-06-10 20:28:31 -07004228 * bluetooth HCI snoop log configuration
4229 * @hide
4230 */
4231 public static final String BLUETOOTH_HCI_LOG =
4232 "bluetooth_hci_log";
4233
4234 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004235 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004236 */
Christopher Tate06efb532012-08-24 15:29:27 -07004237 @Deprecated
4238 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004239
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004240 /**
Russell Brennerde6ae442012-09-26 20:53:10 -07004241 * Whether the current user has been set up via setup wizard (0 = false, 1 = true)
4242 * @hide
4243 */
4244 public static final String USER_SETUP_COMPLETE = "user_setup_complete";
4245
4246 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004247 * List of input methods that are currently enabled. This is a string
4248 * containing the IDs of all enabled input methods, each ID separated
4249 * by ':'.
4250 */
4251 public static final String ENABLED_INPUT_METHODS = "enabled_input_methods";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004252
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004253 /**
Amith Yamasanie861ec12010-03-24 21:39:27 -07004254 * List of system input methods that are currently disabled. This is a string
4255 * containing the IDs of all disabled input methods, each ID separated
4256 * by ':'.
4257 * @hide
4258 */
4259 public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods";
4260
4261 /**
Michael Wright7b5a96b2014-08-09 19:28:42 -07004262 * Whether to show the IME when a hard keyboard is connected. This is a boolean that
4263 * determines if the IME should be shown when a hard keyboard is attached.
4264 * @hide
4265 */
4266 public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard";
4267
4268 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07004269 * Host name and port for global http proxy. Uses ':' seperator for
4270 * between host and port.
4271 *
4272 * @deprecated Use {@link Global#HTTP_PROXY}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004273 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07004274 @Deprecated
4275 public static final String HTTP_PROXY = Global.HTTP_PROXY;
Robert Greenwalte90aa5e2010-09-01 11:34:05 -07004276
4277 /**
Christopher Tateaa036a22014-05-19 16:33:27 -07004278 * Whether applications can be installed for this user via the system's
4279 * {@link Intent#ACTION_INSTALL_PACKAGE} mechanism.
4280 *
4281 * <p>1 = permit app installation via the system package installer intent
4282 * <p>0 = do not allow use of the package installer
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004283 */
Christopher Tateaa036a22014-05-19 16:33:27 -07004284 public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004285
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004286 /**
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004287 * Comma-separated list of location providers that activities may access. Do not rely on
4288 * this value being present in settings.db or on ContentObserver notifications on the
4289 * corresponding Uri.
Tom O'Neilla324ac72013-08-26 14:40:23 -07004290 *
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004291 * @deprecated use {@link #LOCATION_MODE} and
4292 * {@link LocationManager#MODE_CHANGED_ACTION} (or
4293 * {@link LocationManager#PROVIDERS_CHANGED_ACTION})
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004294 */
Tom O'Neilla324ac72013-08-26 14:40:23 -07004295 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004296 public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004297
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004298 /**
Tom O'Neill7f6f4572013-08-27 10:53:15 -07004299 * The degree of location access enabled by the user.
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004300 * <p>
Tom O'Neill7f6f4572013-08-27 10:53:15 -07004301 * When used with {@link #putInt(ContentResolver, String, int)}, must be one of {@link
4302 * #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, {@link
4303 * #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. When used with {@link
4304 * #getInt(ContentResolver, String)}, the caller must gracefully handle additional location
4305 * modes that might be added in the future.
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004306 * <p>
4307 * Note: do not rely on this value being present in settings.db or on ContentObserver
4308 * notifications for the corresponding Uri. Use {@link LocationManager#MODE_CHANGED_ACTION}
4309 * to receive changes in this value.
Tom O'Neilla324ac72013-08-26 14:40:23 -07004310 */
4311 public static final String LOCATION_MODE = "location_mode";
4312
4313 /**
Tom O'Neill7f6f4572013-08-27 10:53:15 -07004314 * Location access disabled.
Tom O'Neill1f48b782013-08-19 18:14:56 -07004315 */
4316 public static final int LOCATION_MODE_OFF = 0;
4317 /**
4318 * Network Location Provider disabled, but GPS and other sensors enabled.
4319 */
4320 public static final int LOCATION_MODE_SENSORS_ONLY = 1;
4321 /**
Tom O'Neilld5759432013-09-11 11:03:03 -07004322 * Reduced power usage, such as limiting the number of GPS updates per hour. Requests
4323 * with {@link android.location.Criteria#POWER_HIGH} may be downgraded to
4324 * {@link android.location.Criteria#POWER_MEDIUM}.
Tom O'Neill1f48b782013-08-19 18:14:56 -07004325 */
4326 public static final int LOCATION_MODE_BATTERY_SAVING = 2;
4327 /**
4328 * Best-effort location computation allowed.
4329 */
4330 public static final int LOCATION_MODE_HIGH_ACCURACY = 3;
4331
4332 /**
Danielle Millett925a7d82012-03-19 18:02:20 -04004333 * A flag containing settings used for biometric weak
4334 * @hide
4335 */
Adrian Roos230635e2015-01-07 20:50:29 +01004336 @Deprecated
Danielle Millett925a7d82012-03-19 18:02:20 -04004337 public static final String LOCK_BIOMETRIC_WEAK_FLAGS =
4338 "lock_biometric_weak_flags";
4339
4340 /**
Jason Monk94cfd9d2014-10-31 13:18:21 -04004341 * Whether lock-to-app will lock the keyguard when exiting.
4342 * @hide
4343 */
4344 public static final String LOCK_TO_APP_EXIT_LOCKED = "lock_to_app_exit_locked";
4345
4346 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08004347 * Whether autolock is enabled (0 = false, 1 = true)
Adrian Roos9dd16eb2015-01-08 16:20:49 +01004348 *
4349 * @deprecated Use {@link android.app.KeyguardManager} to determine the state and security
4350 * level of the keyguard.
Amith Yamasani156c4352010-03-05 17:10:03 -08004351 */
Adrian Roos9dd16eb2015-01-08 16:20:49 +01004352 @Deprecated
Amith Yamasani156c4352010-03-05 17:10:03 -08004353 public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
4354
4355 /**
4356 * Whether lock pattern is visible as user enters (0 = false, 1 = true)
4357 */
4358 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
4359
4360 /**
Jeff Sharkey5ed9d682012-10-10 14:28:27 -07004361 * Whether lock pattern will vibrate as user enters (0 = false, 1 =
4362 * true)
4363 *
4364 * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the
4365 * lockscreen uses
4366 * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}.
Amith Yamasani156c4352010-03-05 17:10:03 -08004367 */
Jeff Sharkey5ed9d682012-10-10 14:28:27 -07004368 @Deprecated
4369 public static final String
4370 LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
Amith Yamasani156c4352010-03-05 17:10:03 -08004371
4372 /**
Jim Millerbc4603b2010-08-30 21:21:34 -07004373 * This preference allows the device to be locked given time after screen goes off,
4374 * subject to current DeviceAdmin policy limits.
4375 * @hide
4376 */
4377 public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout";
4378
4379
4380 /**
John Spurlock5f050e52012-10-27 10:44:19 -04004381 * This preference contains the string that shows for owner info on LockScreen.
Jim Miller253a5ef2010-10-13 20:57:29 -07004382 * @hide
Jim Miller187ec582013-04-15 18:27:54 -07004383 * @deprecated
Jim Miller253a5ef2010-10-13 20:57:29 -07004384 */
4385 public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info";
4386
4387 /**
John Spurlock5f050e52012-10-27 10:44:19 -04004388 * Ids of the user-selected appwidgets on the lockscreen (comma-delimited).
Jim Millerf229e4d2012-09-12 20:32:50 -07004389 * @hide
4390 */
Adrian Roos230635e2015-01-07 20:50:29 +01004391 @Deprecated
Michael Jurkaaa2859a2012-10-24 12:46:49 -07004392 public static final String LOCK_SCREEN_APPWIDGET_IDS =
4393 "lock_screen_appwidget_ids";
Jim Millerf229e4d2012-09-12 20:32:50 -07004394
4395 /**
Jim Miller51117262012-11-04 17:58:09 -08004396 * Id of the appwidget shown on the lock screen when appwidgets are disabled.
4397 * @hide
4398 */
Adrian Roos230635e2015-01-07 20:50:29 +01004399 @Deprecated
Jim Miller51117262012-11-04 17:58:09 -08004400 public static final String LOCK_SCREEN_FALLBACK_APPWIDGET_ID =
4401 "lock_screen_fallback_appwidget_id";
4402
4403 /**
John Spurlock5f050e52012-10-27 10:44:19 -04004404 * Index of the lockscreen appwidget to restore, -1 if none.
4405 * @hide
4406 */
Adrian Roos230635e2015-01-07 20:50:29 +01004407 @Deprecated
John Spurlock5f050e52012-10-27 10:44:19 -04004408 public static final String LOCK_SCREEN_STICKY_APPWIDGET =
4409 "lock_screen_sticky_appwidget";
4410
4411 /**
4412 * This preference enables showing the owner info on LockScreen.
Jim Miller253a5ef2010-10-13 20:57:29 -07004413 * @hide
Jim Miller187ec582013-04-15 18:27:54 -07004414 * @deprecated
Jim Miller253a5ef2010-10-13 20:57:29 -07004415 */
4416 public static final String LOCK_SCREEN_OWNER_INFO_ENABLED =
4417 "lock_screen_owner_info_enabled";
4418
4419 /**
Dan Sandler5d7c3cc2014-02-18 17:35:15 -05004420 * When set by a user, allows notifications to be shown atop a securely locked screen
4421 * in their full "private" form (same as when the device is unlocked).
Dan Sandlerfd16d562014-02-13 18:43:31 -08004422 * @hide
4423 */
4424 public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS =
4425 "lock_screen_allow_private_notifications";
4426
4427 /**
Chris Wrencd8f4f72014-08-27 18:48:13 -04004428 * Set by the system to track if the user needs to see the call to action for
4429 * the lockscreen notification policy.
4430 * @hide
4431 */
4432 public static final String SHOW_NOTE_ABOUT_NOTIFICATION_HIDING =
4433 "show_note_about_notification_hiding";
4434
4435 /**
Adrian Roos3870d452014-09-05 18:22:28 +02004436 * Set to 1 by the system after trust agents have been initialized.
4437 * @hide
4438 */
4439 public static final String TRUST_AGENTS_INITIALIZED =
4440 "trust_agents_initialized";
4441
4442 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004443 * The Logging ID (a unique 64-bit value) as a hex string.
4444 * Used as a pseudonymous identifier for logging.
4445 * @deprecated This identifier is poorly initialized and has
4446 * many collisions. It should not be used.
4447 */
4448 @Deprecated
4449 public static final String LOGGING_ID = "logging_id";
4450
4451 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004452 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004453 */
Christopher Tate06efb532012-08-24 15:29:27 -07004454 @Deprecated
4455 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004456
4457 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08004458 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004459 */
4460 public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004461
4462 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08004463 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004464 */
4465 public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004466
4467 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08004468 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004469 */
4470 public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004471
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004472 /**
4473 * Settings classname to launch when Settings is clicked from All
4474 * Applications. Needed because of user testing between the old
4475 * and new Settings apps.
4476 */
4477 // TODO: 881807
4478 public static final String SETTINGS_CLASSNAME = "settings_classname";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004479
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004480 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004481 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004482 */
Christopher Tate06efb532012-08-24 15:29:27 -07004483 @Deprecated
4484 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004485
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004486 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004487 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004488 */
Christopher Tate06efb532012-08-24 15:29:27 -07004489 @Deprecated
4490 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004491
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004492 /**
svetoslavganov75986cf2009-05-14 22:28:01 -07004493 * If accessibility is enabled.
4494 */
4495 public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled";
4496
4497 /**
Svetoslav Ganov00aabf72011-07-21 11:35:03 -07004498 * If touch exploration is enabled.
Svetoslav Ganov35bfede2011-07-14 17:57:06 -07004499 */
Svetoslav Ganov00aabf72011-07-21 11:35:03 -07004500 public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled";
Svetoslav Ganov35bfede2011-07-14 17:57:06 -07004501
4502 /**
svetoslavganov75986cf2009-05-14 22:28:01 -07004503 * List of the enabled accessibility providers.
4504 */
4505 public static final String ENABLED_ACCESSIBILITY_SERVICES =
4506 "enabled_accessibility_services";
4507
4508 /**
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07004509 * List of the accessibility services to which the user has granted
Svetoslav Ganov9a4c5cd2012-05-30 14:06:32 -07004510 * permission to put the device into touch exploration mode.
4511 *
4512 * @hide
4513 */
4514 public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES =
4515 "touch_exploration_granted_accessibility_services";
4516
4517 /**
Svetoslav Ganov55f937a2011-12-05 11:42:07 -08004518 * Whether to speak passwords while in accessibility mode.
4519 */
4520 public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
4521
4522 /**
Chris Craikcce47eb2014-07-16 15:12:15 -07004523 * Whether to draw text with high contrast while in accessibility mode.
4524 *
4525 * @hide
4526 */
4527 public static final String ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED =
4528 "high_text_contrast_enabled";
4529
4530 /**
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004531 * If injection of accessibility enhancing JavaScript screen-reader
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004532 * is enabled.
4533 * <p>
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004534 * Note: The JavaScript based screen-reader is served by the
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004535 * Google infrastructure and enable users with disabilities to
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07004536 * efficiently navigate in and explore web content.
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004537 * </p>
4538 * <p>
4539 * This property represents a boolean value.
4540 * </p>
4541 * @hide
4542 */
4543 public static final String ACCESSIBILITY_SCRIPT_INJECTION =
4544 "accessibility_script_injection";
4545
4546 /**
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004547 * The URL for the injected JavaScript based screen-reader used
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07004548 * for providing accessibility of content in WebView.
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004549 * <p>
4550 * Note: The JavaScript based screen-reader is served by the
4551 * Google infrastructure and enable users with disabilities to
4552 * efficiently navigate in and explore web content.
4553 * </p>
4554 * <p>
4555 * This property represents a string value.
4556 * </p>
4557 * @hide
4558 */
4559 public static final String ACCESSIBILITY_SCREEN_READER_URL =
4560 "accessibility_script_injection_url";
4561
4562 /**
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004563 * Key bindings for navigation in built-in accessibility support for web content.
4564 * <p>
4565 * Note: These key bindings are for the built-in accessibility navigation for
4566 * web content which is used as a fall back solution if JavaScript in a WebView
4567 * is not enabled or the user has not opted-in script injection from Google.
4568 * </p>
4569 * <p>
4570 * The bindings are separated by semi-colon. A binding is a mapping from
4571 * a key to a sequence of actions (for more details look at
4572 * android.webkit.AccessibilityInjector). A key is represented as the hexademical
4573 * string representation of an integer obtained from a meta state (optional) shifted
4574 * sixteen times left and bitwise ored with a key code. An action is represented
4575 * as a hexademical string representation of an integer where the first two digits
4576 * are navigation action index, the second, the third, and the fourth digit pairs
4577 * represent the action arguments. The separate actions in a binding are colon
4578 * separated. The key and the action sequence it maps to are separated by equals.
4579 * </p>
4580 * <p>
4581 * For example, the binding below maps the DPAD right button to traverse the
4582 * current navigation axis once without firing an accessibility event and to
4583 * perform the same traversal again but to fire an event:
4584 * <code>
4585 * 0x16=0x01000100:0x01000101;
4586 * </code>
4587 * </p>
4588 * <p>
4589 * The goal of this binding is to enable dynamic rebinding of keys to
4590 * navigation actions for web content without requiring a framework change.
4591 * </p>
4592 * <p>
4593 * This property represents a string value.
4594 * </p>
4595 * @hide
4596 */
4597 public static final String ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS =
4598 "accessibility_web_content_key_bindings";
4599
4600 /**
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -07004601 * Setting that specifies whether the display magnification is enabled.
4602 * Display magnifications allows the user to zoom in the display content
4603 * and is targeted to low vision users. The current magnification scale
4604 * is controlled by {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}.
4605 *
4606 * @hide
4607 */
4608 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED =
4609 "accessibility_display_magnification_enabled";
4610
4611 /**
4612 * Setting that specifies what the display magnification scale is.
4613 * Display magnifications allows the user to zoom in the display
4614 * content and is targeted to low vision users. Whether a display
4615 * magnification is performed is controlled by
4616 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED}
4617 *
4618 * @hide
4619 */
4620 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE =
4621 "accessibility_display_magnification_scale";
4622
4623 /**
4624 * Setting that specifies whether the display magnification should be
4625 * automatically updated. If this fearture is enabled the system will
4626 * exit magnification mode or pan the viewport when a context change
4627 * occurs. For example, on staring a new activity or rotating the screen,
4628 * the system may zoom out so the user can see the new context he is in.
4629 * Another example is on showing a window that is not visible in the
4630 * magnified viewport the system may pan the viewport to make the window
4631 * the has popped up so the user knows that the context has changed.
4632 * Whether a screen magnification is performed is controlled by
4633 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED}
4634 *
4635 * @hide
4636 */
4637 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE =
4638 "accessibility_display_magnification_auto_update";
4639
4640 /**
Alan Viveretteef793802013-07-23 14:15:28 -07004641 * Setting that specifies whether timed text (captions) should be
4642 * displayed in video content. Text display properties are controlled by
4643 * the following settings:
4644 * <ul>
4645 * <li>{@link #ACCESSIBILITY_CAPTIONING_LOCALE}
4646 * <li>{@link #ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR}
4647 * <li>{@link #ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR}
4648 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_COLOR}
4649 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_TYPE}
4650 * <li>{@link #ACCESSIBILITY_CAPTIONING_TYPEFACE}
Alan Viverette69ce69b2013-08-29 12:23:48 -07004651 * <li>{@link #ACCESSIBILITY_CAPTIONING_FONT_SCALE}
Alan Viveretteef793802013-07-23 14:15:28 -07004652 * </ul>
4653 *
4654 * @hide
4655 */
4656 public static final String ACCESSIBILITY_CAPTIONING_ENABLED =
4657 "accessibility_captioning_enabled";
4658
4659 /**
4660 * Setting that specifies the language for captions as a locale string,
4661 * e.g. en_US.
4662 *
4663 * @see java.util.Locale#toString
4664 * @hide
4665 */
4666 public static final String ACCESSIBILITY_CAPTIONING_LOCALE =
4667 "accessibility_captioning_locale";
4668
4669 /**
Alan Viverette43a1e3d2013-08-02 16:45:03 -07004670 * Integer property that specifies the preset style for captions, one
4671 * of:
4672 * <ul>
Alan Viverette69ce69b2013-08-29 12:23:48 -07004673 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESET_CUSTOM}
4674 * <li>a valid index of {@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESETS}
Alan Viverette43a1e3d2013-08-02 16:45:03 -07004675 * </ul>
4676 *
4677 * @see java.util.Locale#toString
4678 * @hide
4679 */
4680 public static final String ACCESSIBILITY_CAPTIONING_PRESET =
4681 "accessibility_captioning_preset";
4682
4683 /**
Alan Viveretteef793802013-07-23 14:15:28 -07004684 * Integer property that specifes the background color for captions as a
4685 * packed 32-bit color.
4686 *
4687 * @see android.graphics.Color#argb
4688 * @hide
4689 */
4690 public static final String ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR =
4691 "accessibility_captioning_background_color";
4692
4693 /**
4694 * Integer property that specifes the foreground color for captions as a
4695 * packed 32-bit color.
4696 *
4697 * @see android.graphics.Color#argb
4698 * @hide
4699 */
4700 public static final String ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR =
4701 "accessibility_captioning_foreground_color";
4702
4703 /**
4704 * Integer property that specifes the edge type for captions, one of:
4705 * <ul>
Alan Viverette69ce69b2013-08-29 12:23:48 -07004706 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_NONE}
4707 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE}
4708 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW}
Alan Viveretteef793802013-07-23 14:15:28 -07004709 * </ul>
4710 *
4711 * @see #ACCESSIBILITY_CAPTIONING_EDGE_COLOR
4712 * @hide
4713 */
4714 public static final String ACCESSIBILITY_CAPTIONING_EDGE_TYPE =
4715 "accessibility_captioning_edge_type";
4716
4717 /**
4718 * Integer property that specifes the edge color for captions as a
4719 * packed 32-bit color.
4720 *
4721 * @see #ACCESSIBILITY_CAPTIONING_EDGE_TYPE
4722 * @see android.graphics.Color#argb
4723 * @hide
4724 */
4725 public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR =
4726 "accessibility_captioning_edge_color";
4727
4728 /**
Alan Viverette55d70622013-12-11 15:22:14 -08004729 * Integer property that specifes the window color for captions as a
4730 * packed 32-bit color.
4731 *
4732 * @see android.graphics.Color#argb
4733 * @hide
4734 */
4735 public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR =
4736 "accessibility_captioning_window_color";
4737
4738 /**
Alan Viveretteef793802013-07-23 14:15:28 -07004739 * String property that specifies the typeface for captions, one of:
4740 * <ul>
4741 * <li>DEFAULT
4742 * <li>MONOSPACE
4743 * <li>SANS_SERIF
4744 * <li>SERIF
4745 * </ul>
4746 *
4747 * @see android.graphics.Typeface
4748 * @hide
4749 */
4750 public static final String ACCESSIBILITY_CAPTIONING_TYPEFACE =
4751 "accessibility_captioning_typeface";
4752
4753 /**
Alan Viverette69ce69b2013-08-29 12:23:48 -07004754 * Floating point property that specifies font scaling for captions.
Alan Viveretteef793802013-07-23 14:15:28 -07004755 *
4756 * @hide
4757 */
Alan Viverette69ce69b2013-08-29 12:23:48 -07004758 public static final String ACCESSIBILITY_CAPTIONING_FONT_SCALE =
4759 "accessibility_captioning_font_scale";
Alan Viveretteef793802013-07-23 14:15:28 -07004760
4761 /**
Alan Viverette410d4e32013-09-30 15:37:38 -07004762 * Setting that specifies whether display color inversion is enabled.
Alan Viverette410d4e32013-09-30 15:37:38 -07004763 */
4764 public static final String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED =
4765 "accessibility_display_inversion_enabled";
4766
4767 /**
Alan Viverette410d4e32013-09-30 15:37:38 -07004768 * Setting that specifies whether display color space adjustment is
4769 * enabled.
4770 *
4771 * @hide
4772 */
4773 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED =
4774 "accessibility_display_daltonizer_enabled";
4775
4776 /**
4777 * Integer property that specifies the type of color space adjustment to
4778 * perform. Valid values are defined in AccessibilityManager.
4779 *
4780 * @hide
4781 */
4782 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER =
4783 "accessibility_display_daltonizer";
4784
4785 /**
Svetoslav Ganov54d068e2011-03-02 12:58:40 -08004786 * The timout for considering a press to be a long press in milliseconds.
4787 * @hide
4788 */
4789 public static final String LONG_PRESS_TIMEOUT = "long_press_timeout";
4790
4791 /**
Svetoslav Ganov6bd20bc2013-09-02 15:24:45 -07004792 * List of the enabled print services.
Svetoslav Ganov4b9a4d12013-06-11 15:20:06 -07004793 * @hide
4794 */
4795 public static final String ENABLED_PRINT_SERVICES =
4796 "enabled_print_services";
4797
4798 /**
Svetoslav Ganov6bd20bc2013-09-02 15:24:45 -07004799 * List of the system print services we enabled on first boot. On
4800 * first boot we enable all system, i.e. bundled print services,
4801 * once, so they work out-of-the-box.
4802 * @hide
4803 */
4804 public static final String ENABLED_ON_FIRST_BOOT_SYSTEM_PRINT_SERVICES =
4805 "enabled_on_first_boot_system_print_services";
4806
4807 /**
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07004808 * Setting to always use the default text-to-speech settings regardless
4809 * of the application settings.
4810 * 1 = override application settings,
4811 * 0 = use application settings (if specified).
Narayan Kamath6d632962011-08-24 11:51:37 +01004812 *
4813 * @deprecated The value of this setting is no longer respected by
4814 * the framework text to speech APIs as of the Ice Cream Sandwich release.
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07004815 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004816 @Deprecated
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07004817 public static final String TTS_USE_DEFAULTS = "tts_use_defaults";
4818
4819 /**
4820 * Default text-to-speech engine speech rate. 100 = 1x
4821 */
4822 public static final String TTS_DEFAULT_RATE = "tts_default_rate";
4823
4824 /**
4825 * Default text-to-speech engine pitch. 100 = 1x
4826 */
4827 public static final String TTS_DEFAULT_PITCH = "tts_default_pitch";
4828
4829 /**
4830 * Default text-to-speech engine.
4831 */
4832 public static final String TTS_DEFAULT_SYNTH = "tts_default_synth";
4833
4834 /**
Jean-Michel Trivif4782672009-06-09 16:22:48 -07004835 * Default text-to-speech language.
Narayan Kamath6d632962011-08-24 11:51:37 +01004836 *
4837 * @deprecated this setting is no longer in use, as of the Ice Cream
4838 * Sandwich release. Apps should never need to read this setting directly,
4839 * instead can query the TextToSpeech framework classes for the default
4840 * locale. {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivif4782672009-06-09 16:22:48 -07004841 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004842 @Deprecated
Jean-Michel Trivif4782672009-06-09 16:22:48 -07004843 public static final String TTS_DEFAULT_LANG = "tts_default_lang";
4844
4845 /**
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004846 * Default text-to-speech country.
Narayan Kamath6d632962011-08-24 11:51:37 +01004847 *
4848 * @deprecated this setting is no longer in use, as of the Ice Cream
4849 * Sandwich release. Apps should never need to read this setting directly,
4850 * instead can query the TextToSpeech framework classes for the default
4851 * locale. {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004852 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004853 @Deprecated
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004854 public static final String TTS_DEFAULT_COUNTRY = "tts_default_country";
4855
4856 /**
4857 * Default text-to-speech locale variant.
Narayan Kamath6d632962011-08-24 11:51:37 +01004858 *
4859 * @deprecated this setting is no longer in use, as of the Ice Cream
4860 * Sandwich release. Apps should never need to read this setting directly,
4861 * instead can query the TextToSpeech framework classes for the
4862 * locale that is in use {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004863 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004864 @Deprecated
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004865 public static final String TTS_DEFAULT_VARIANT = "tts_default_variant";
4866
4867 /**
Narayan Kamathe5b8c4d2011-08-22 15:37:47 +01004868 * Stores the default tts locales on a per engine basis. Stored as
4869 * a comma seperated list of values, each value being of the form
4870 * {@code engine_name:locale} for example,
Narayan Kamath6d632962011-08-24 11:51:37 +01004871 * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This
4872 * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and
4873 * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this
4874 * setting directly, and can query the TextToSpeech framework classes
4875 * for the locale that is in use.
Narayan Kamathe5b8c4d2011-08-22 15:37:47 +01004876 *
4877 * @hide
4878 */
4879 public static final String TTS_DEFAULT_LOCALE = "tts_default_locale";
4880
4881 /**
Charles Chenceffa152010-03-16 21:18:10 -07004882 * Space delimited list of plugin packages that are enabled.
4883 */
4884 public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins";
4885
4886 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004887 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON}
4888 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004889 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004890 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004891 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004892 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004893
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004894 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004895 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY}
4896 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004897 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004898 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004899 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004900 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004901
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004902 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004903 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT}
4904 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004905 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004906 @Deprecated
4907 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT =
4908 Global.WIFI_NUM_OPEN_NETWORKS_KEPT;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004909
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004910 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004911 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON}
4912 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004913 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004914 @Deprecated
4915 public static final String WIFI_ON = Global.WIFI_ON;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004916
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004917 /**
4918 * The acceptable packet loss percentage (range 0 - 100) before trying
4919 * another AP on the same network.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004920 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004921 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004922 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004923 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
4924 "wifi_watchdog_acceptable_packet_loss_percentage";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004925
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004926 /**
4927 * The number of access points required for a network in order for the
4928 * watchdog to monitor it.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004929 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004930 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004931 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004932 public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004933
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004934 /**
4935 * The delay between background checks.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004936 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004937 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004938 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004939 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
4940 "wifi_watchdog_background_check_delay_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004941
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004942 /**
4943 * Whether the Wi-Fi watchdog is enabled for background checking even
4944 * after it thinks the user has connected to a good access point.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004945 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004946 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004947 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004948 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
4949 "wifi_watchdog_background_check_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004950
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004951 /**
4952 * The timeout for a background ping
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004953 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004954 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004955 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004956 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
4957 "wifi_watchdog_background_check_timeout_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004958
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004959 /**
4960 * The number of initial pings to perform that *may* be ignored if they
4961 * fail. Again, if these fail, they will *not* be used in packet loss
4962 * calculation. For example, one network always seemed to time out for
4963 * the first couple pings, so this is set to 3 by default.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004964 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004965 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004966 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004967 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
4968 "wifi_watchdog_initial_ignored_ping_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004969
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004970 /**
4971 * The maximum number of access points (per network) to attempt to test.
4972 * If this number is reached, the watchdog will no longer monitor the
4973 * initial connection state for the network. This is a safeguard for
4974 * networks containing multiple APs whose DNS does not respond to pings.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004975 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004976 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004977 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004978 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004979
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004980 /**
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07004981 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004982 */
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07004983 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004984 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
4985
4986 /**
4987 * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004988 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004989 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004990 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004991 public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list";
4992
4993 /**
4994 * The number of pings to test if an access point is a good connection.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004995 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004996 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004997 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004998 public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004999
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005000 /**
5001 * The delay between pings.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005002 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005003 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07005004 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005005 public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005006
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005007 /**
5008 * The timeout per ping.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005009 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005010 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07005011 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005012 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005013
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005014 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005015 * @deprecated Use
5016 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005017 */
Christopher Tate06efb532012-08-24 15:29:27 -07005018 @Deprecated
5019 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005020
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005021 /**
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005022 * @deprecated Use
5023 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005024 */
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07005025 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005026 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005027 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005028
5029 /**
Jeremy Joslin79294842014-12-03 17:15:28 -08005030 * The number of milliseconds to hold on to a PendingIntent based request. This delay gives
5031 * the receivers of the PendingIntent an opportunity to make a new network request before
5032 * the Network satisfying the request is potentially removed.
5033 *
5034 * @hide
5035 */
5036 public static final String CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS =
5037 "connectivity_release_pending_intent_delay_ms";
5038
5039 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07005040 * Whether background data usage is allowed.
5041 *
5042 * @deprecated As of {@link VERSION_CODES#ICE_CREAM_SANDWICH},
5043 * availability of background data depends on several
5044 * combined factors. When background data is unavailable,
5045 * {@link ConnectivityManager#getActiveNetworkInfo()} will
5046 * now appear disconnected.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005047 */
Jeff Sharkey3a844fc2011-08-16 14:37:57 -07005048 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005049 public static final String BACKGROUND_DATA = "background_data";
Wink Saville04e71b32009-04-02 11:00:54 -07005050
5051 /**
Bjorn Bringert98bfa392010-03-24 10:59:48 +00005052 * Origins for which browsers should allow geolocation by default.
5053 * The value is a space-separated list of origins.
5054 */
5055 public static final String ALLOWED_GEOLOCATION_ORIGINS
5056 = "allowed_geolocation_origins";
5057
5058 /**
Wink Savillee9b06d72009-05-18 21:47:50 -07005059 * The preferred TTY mode 0 = TTy Off, CDMA default
5060 * 1 = TTY Full
5061 * 2 = TTY HCO
5062 * 3 = TTY VCO
5063 * @hide
5064 */
5065 public static final String PREFERRED_TTY_MODE =
5066 "preferred_tty_mode";
5067
Wink Saville04e71b32009-04-02 11:00:54 -07005068 /**
Wink Saville04e71b32009-04-02 11:00:54 -07005069 * Whether the enhanced voice privacy mode is enabled.
5070 * 0 = normal voice privacy
5071 * 1 = enhanced voice privacy
5072 * @hide
5073 */
5074 public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled";
5075
5076 /**
5077 * Whether the TTY mode mode is enabled.
5078 * 0 = disabled
5079 * 1 = enabled
5080 * @hide
5081 */
5082 public static final String TTY_MODE_ENABLED = "tty_mode_enabled";
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005083
5084 /**
Christopher Tate8031a3d2009-07-06 16:36:05 -07005085 * Controls whether settings backup is enabled.
Dianne Hackborncf098292009-07-01 19:55:20 -07005086 * Type: int ( 0 = disabled, 1 = enabled )
5087 * @hide
5088 */
5089 public static final String BACKUP_ENABLED = "backup_enabled";
5090
5091 /**
Christopher Tatecce9da52010-02-03 15:11:15 -08005092 * Controls whether application data is automatically restored from backup
5093 * at install time.
5094 * Type: int ( 0 = disabled, 1 = enabled )
5095 * @hide
5096 */
5097 public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore";
5098
5099 /**
Christopher Tate8031a3d2009-07-06 16:36:05 -07005100 * Indicates whether settings backup has been fully provisioned.
5101 * Type: int ( 0 = unprovisioned, 1 = fully provisioned )
5102 * @hide
5103 */
5104 public static final String BACKUP_PROVISIONED = "backup_provisioned";
5105
5106 /**
Dianne Hackborncf098292009-07-01 19:55:20 -07005107 * Component of the transport to use for backup/restore.
5108 * @hide
5109 */
5110 public static final String BACKUP_TRANSPORT = "backup_transport";
Sanjay Jeyakumar21bf2412009-07-09 13:31:48 -07005111
Dianne Hackbornd7cd29d2009-07-01 11:22:45 -07005112 /**
5113 * Version for which the setup wizard was last shown. Bumped for
5114 * each release when there is new setup information to show.
5115 * @hide
5116 */
5117 public static final String LAST_SETUP_SHOWN = "last_setup_shown";
Dianne Hackborncf098292009-07-01 19:55:20 -07005118
5119 /**
Doug Zongker43866e02010-01-07 12:09:54 -08005120 * The interval in milliseconds after which Wi-Fi is considered idle.
5121 * When idle, it is possible for the device to be switched from Wi-Fi to
5122 * the mobile data network.
5123 * @hide
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005124 * @deprecated Use {@link android.provider.Settings.Global#WIFI_IDLE_MS}
5125 * instead.
Doug Zongker43866e02010-01-07 12:09:54 -08005126 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07005127 @Deprecated
5128 public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS;
Doug Zongker43866e02010-01-07 12:09:54 -08005129
5130 /**
Narayan Kamathee69ff42011-06-28 12:07:18 +01005131 * The global search provider chosen by the user (if multiple global
5132 * search providers are installed). This will be the provider returned
5133 * by {@link SearchManager#getGlobalSearchActivity()} if it's still
5134 * installed. This setting is stored as a flattened component name as
5135 * per {@link ComponentName#flattenToString()}.
5136 *
5137 * @hide
5138 */
5139 public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY =
5140 "search_global_search_activity";
5141
5142 /**
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08005143 * The number of promoted sources in GlobalSearch.
5144 * @hide
5145 */
5146 public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources";
5147 /**
5148 * The maximum number of suggestions returned by GlobalSearch.
5149 * @hide
5150 */
5151 public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display";
5152 /**
5153 * The number of suggestions GlobalSearch will ask each non-web search source for.
5154 * @hide
5155 */
5156 public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source";
5157 /**
5158 * The number of suggestions the GlobalSearch will ask the web search source for.
5159 * @hide
5160 */
5161 public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT =
5162 "search_web_results_override_limit";
5163 /**
5164 * The number of milliseconds that GlobalSearch will wait for suggestions from
5165 * promoted sources before continuing with all other sources.
5166 * @hide
5167 */
5168 public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS =
5169 "search_promoted_source_deadline_millis";
5170 /**
5171 * The number of milliseconds before GlobalSearch aborts search suggesiton queries.
5172 * @hide
5173 */
5174 public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis";
5175 /**
5176 * The maximum number of milliseconds that GlobalSearch shows the previous results
5177 * after receiving a new query.
5178 * @hide
5179 */
5180 public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis";
5181 /**
5182 * The maximum age of log data used for shortcuts in GlobalSearch.
5183 * @hide
5184 */
5185 public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis";
5186 /**
5187 * The maximum age of log data used for source ranking in GlobalSearch.
5188 * @hide
5189 */
5190 public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS =
5191 "search_max_source_event_age_millis";
5192 /**
5193 * The minimum number of impressions needed to rank a source in GlobalSearch.
5194 * @hide
5195 */
5196 public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING =
5197 "search_min_impressions_for_source_ranking";
5198 /**
5199 * The minimum number of clicks needed to rank a source in GlobalSearch.
5200 * @hide
5201 */
5202 public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING =
5203 "search_min_clicks_for_source_ranking";
5204 /**
5205 * The maximum number of shortcuts shown by GlobalSearch.
5206 * @hide
5207 */
5208 public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned";
5209 /**
5210 * The size of the core thread pool for suggestion queries in GlobalSearch.
5211 * @hide
5212 */
5213 public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE =
5214 "search_query_thread_core_pool_size";
5215 /**
5216 * The maximum size of the thread pool for suggestion queries in GlobalSearch.
5217 * @hide
5218 */
5219 public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE =
5220 "search_query_thread_max_pool_size";
5221 /**
5222 * The size of the core thread pool for shortcut refreshing in GlobalSearch.
5223 * @hide
5224 */
5225 public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE =
5226 "search_shortcut_refresh_core_pool_size";
5227 /**
5228 * The maximum size of the thread pool for shortcut refreshing in GlobalSearch.
5229 * @hide
5230 */
5231 public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE =
5232 "search_shortcut_refresh_max_pool_size";
5233 /**
5234 * The maximun time that excess threads in the GlobalSeach thread pools will
5235 * wait before terminating.
5236 * @hide
5237 */
5238 public static final String SEARCH_THREAD_KEEPALIVE_SECONDS =
5239 "search_thread_keepalive_seconds";
5240 /**
5241 * The maximum number of concurrent suggestion queries to each source.
5242 * @hide
5243 */
5244 public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT =
5245 "search_per_source_concurrent_query_limit";
5246
San Mehat87734d32010-01-08 12:53:06 -08005247 /**
5248 * Whether or not alert sounds are played on MountService events. (0 = false, 1 = true)
5249 * @hide
5250 */
5251 public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd";
5252
5253 /**
5254 * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true)
5255 * @hide
5256 */
5257 public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart";
5258
5259 /**
5260 * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true)
5261 * @hide
5262 */
5263 public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt";
5264
5265 /**
5266 * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true)
5267 * @hide
5268 */
5269 public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled";
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08005270
Dan Egnor42471dd2010-01-07 17:25:22 -08005271 /**
5272 * If nonzero, ANRs in invisible background processes bring up a dialog.
5273 * Otherwise, the process will be silently killed.
5274 * @hide
5275 */
5276 public static final String ANR_SHOW_BACKGROUND = "anr_show_background";
Erikeebc8e22010-02-18 13:27:19 -08005277
Mike LeBeau5d34e9b2010-02-10 19:34:56 -08005278 /**
5279 * The {@link ComponentName} string of the service to be used as the voice recognition
5280 * service.
Erikeebc8e22010-02-18 13:27:19 -08005281 *
Mike LeBeau5d34e9b2010-02-10 19:34:56 -08005282 * @hide
5283 */
5284 public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";
Dan Egnor42471dd2010-01-07 17:25:22 -08005285
William Luh623a4282013-06-24 12:14:18 -07005286 /**
5287 * Stores whether an user has consented to have apps verified through PAM.
5288 * The value is boolean (1 or 0).
5289 *
5290 * @hide
5291 */
5292 public static final String PACKAGE_VERIFIER_USER_CONSENT =
5293 "package_verifier_user_consent";
satok988323c2011-06-22 16:38:13 +09005294
5295 /**
satokada8c4e2011-08-23 14:56:56 +09005296 * The {@link ComponentName} string of the selected spell checker service which is
5297 * one of the services managed by the text service manager.
5298 *
5299 * @hide
5300 */
5301 public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker";
5302
5303 /**
5304 * The {@link ComponentName} string of the selected subtype of the selected spell checker
satok988323c2011-06-22 16:38:13 +09005305 * service which is one of the services managed by the text service manager.
5306 *
5307 * @hide
5308 */
satokada8c4e2011-08-23 14:56:56 +09005309 public static final String SELECTED_SPELL_CHECKER_SUBTYPE =
5310 "selected_spell_checker_subtype";
satok988323c2011-06-22 16:38:13 +09005311
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08005312 /**
satoka33c4fc2011-08-25 16:50:11 +09005313 * The {@link ComponentName} string whether spell checker is enabled or not.
5314 *
5315 * @hide
5316 */
5317 public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled";
5318
5319 /**
David Brown458e8062010-03-08 21:52:11 -08005320 * What happens when the user presses the Power button while in-call
5321 * and the screen is on.<br/>
5322 * <b>Values:</b><br/>
5323 * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/>
5324 * 2 - The Power button hangs up the current call.<br/>
5325 *
5326 * @hide
5327 */
5328 public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior";
5329
5330 /**
5331 * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen".
5332 * @hide
5333 */
5334 public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1;
5335
5336 /**
5337 * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up".
5338 * @hide
5339 */
5340 public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2;
5341
5342 /**
5343 * INCALL_POWER_BUTTON_BEHAVIOR default value.
5344 * @hide
5345 */
5346 public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT =
5347 INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF;
5348
5349 /**
Jeff Browna20dda42014-05-27 20:57:24 -07005350 * Whether the device should wake when the wake gesture sensor detects motion.
5351 * @hide
5352 */
5353 public static final String WAKE_GESTURE_ENABLED = "wake_gesture_enabled";
5354
5355 /**
John Spurlocka4215ce2014-08-04 14:50:38 -04005356 * Whether the device should doze if configured.
5357 * @hide
5358 */
5359 public static final String DOZE_ENABLED = "doze_enabled";
5360
5361 /**
Dianne Hackborn2ccda4d2010-03-22 21:49:15 -07005362 * The current night mode that has been selected by the user. Owned
5363 * and controlled by UiModeManagerService. Constants are as per
5364 * UiModeManager.
5365 * @hide
5366 */
5367 public static final String UI_NIGHT_MODE = "ui_night_mode";
Suchi Amalapurapu40e47252010-04-07 16:15:50 -07005368
5369 /**
John Spurlock1a868b72012-08-22 09:56:51 -04005370 * Whether screensavers are enabled.
Daniel Sandler0601eb72011-04-13 01:01:32 -04005371 * @hide
5372 */
Daniel Sandler2d545362011-11-17 10:38:37 -08005373 public static final String SCREENSAVER_ENABLED = "screensaver_enabled";
Daniel Sandler0601eb72011-04-13 01:01:32 -04005374
5375 /**
John Spurlock1a868b72012-08-22 09:56:51 -04005376 * The user's chosen screensaver components.
Daniel Sandler2d545362011-11-17 10:38:37 -08005377 *
John Spurlock1a868b72012-08-22 09:56:51 -04005378 * These will be launched by the PhoneWindowManager after a timeout when not on
Daniel Sandler2d545362011-11-17 10:38:37 -08005379 * battery, or upon dock insertion (if SCREENSAVER_ACTIVATE_ON_DOCK is set to 1).
Daniel Sandler0601eb72011-04-13 01:01:32 -04005380 * @hide
5381 */
John Spurlock1a868b72012-08-22 09:56:51 -04005382 public static final String SCREENSAVER_COMPONENTS = "screensaver_components";
Daniel Sandler2d545362011-11-17 10:38:37 -08005383
5384 /**
John Spurlock1a868b72012-08-22 09:56:51 -04005385 * If screensavers are enabled, whether the screensaver should be automatically launched
5386 * when the device is inserted into a (desk) dock.
Daniel Sandler2d545362011-11-17 10:38:37 -08005387 * @hide
5388 */
5389 public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock";
Daniel Sandler0601eb72011-04-13 01:01:32 -04005390
John Spurlock1a868b72012-08-22 09:56:51 -04005391 /**
5392 * If screensavers are enabled, whether the screensaver should be automatically launched
5393 * when the screen times out when not on battery.
5394 * @hide
5395 */
5396 public static final String SCREENSAVER_ACTIVATE_ON_SLEEP = "screensaver_activate_on_sleep";
5397
5398 /**
5399 * If screensavers are enabled, the default screensaver component.
5400 * @hide
5401 */
5402 public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component";
5403
Daniel Sandler0601eb72011-04-13 01:01:32 -04005404 /**
Martijn Coenena7397882013-07-30 20:07:47 -07005405 * The default NFC payment component
5406 * @hide
5407 */
5408 public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component";
5409
5410 /**
Martijn Coenen2f6f3a012014-04-25 17:00:21 -07005411 * Whether NFC payment is handled by the foreground application or a default.
5412 * @hide
5413 */
5414 public static final String NFC_PAYMENT_FOREGROUND = "nfc_payment_foreground";
5415
5416 /**
David Braunf5d83192013-09-16 13:43:51 -07005417 * Specifies the package name currently configured to be the primary sms application
5418 * @hide
5419 */
5420 public static final String SMS_DEFAULT_APPLICATION = "sms_default_application";
5421
5422 /**
Yorke Lee014de022015-04-21 17:15:47 -07005423 * Specifies the package name currently configured to be the default dialer application
5424 * @hide
5425 */
5426 public static final String DIALER_DEFAULT_APPLICATION = "dialer_default_application";
5427
5428 /**
Adrian Roos943eb862015-03-26 12:31:16 -07005429 * Specifies the package name currently configured to be the emergency assistance application
5430 *
5431 * @see android.telephony.TelephonyManager#ACTION_EMERGENCY_ASSISTANCE
5432 *
5433 * @hide
5434 */
5435 public static final String EMERGENCY_ASSISTANCE_APPLICATION = "emergency_assistance_application";
5436
5437 /**
Jorim Jaggi9d910832015-05-18 17:35:26 -07005438 * Specifies whether the current app context on scren (assist data) will be sent to the
5439 * assist application (active voice interaction service).
5440 *
5441 * @hide
5442 */
5443 public static final String ASSIST_STRUCTURE_ENABLED = "assist_structure_enabled";
5444
5445 /**
John Spurlock7c74f782015-06-04 13:01:42 -04005446 * Names of the service components that the current user has explicitly allowed to
Chris Wren8326a8a2014-10-22 14:13:32 -04005447 * see all of the user's notifications, separated by ':'.
Daniel Sandler4b749ef2013-03-18 21:53:04 -04005448 *
5449 * @hide
5450 */
5451 public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners";
5452
John Spurlock7340fc82014-04-24 18:50:12 -04005453 /**
John Spurlock7c74f782015-06-04 13:01:42 -04005454 * Names of the packages that the current user has explicitly allowed to
5455 * manage notification policy configuration, separated by ':'.
5456 *
5457 * @hide
5458 */
5459 public static final String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES =
5460 "enabled_notification_policy_access_packages";
5461
5462 /**
John Spurlock7340fc82014-04-24 18:50:12 -04005463 * @hide
5464 */
5465 public static final String ENABLED_CONDITION_PROVIDERS = "enabled_condition_providers";
5466
John Spurlock5c454122013-06-17 07:35:46 -04005467 /** @hide */
5468 public static final String BAR_SERVICE_COMPONENT = "bar_service_component";
5469
John Spurlockd67ec252013-09-05 11:31:54 -04005470 /** @hide */
John Spurlockcdb57ae2015-02-11 19:04:11 -05005471 public static final String VOLUME_CONTROLLER_SERVICE_COMPONENT
5472 = "volume_controller_service_component";
5473
5474 /** @hide */
John Spurlockf1a36642013-10-12 17:50:42 -04005475 public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations";
John Spurlockd67ec252013-09-05 11:31:54 -04005476
Yorke Lee647f8f32013-05-07 10:49:44 -07005477 /**
Svetoslavf43e8512013-09-30 17:33:05 -07005478 * This is the query URI for finding a print service to install.
5479 *
5480 * @hide
5481 */
5482 public static final String PRINT_SERVICE_SEARCH_URI = "print_service_search_uri";
5483
5484 /**
5485 * This is the query URI for finding a NFC payment service to install.
5486 *
5487 * @hide
5488 */
5489 public static final String PAYMENT_SERVICE_SEARCH_URI = "payment_service_search_uri";
5490
5491 /**
Amith Yamasani1e9c2182014-06-11 17:25:51 -07005492 * If enabled, apps should try to skip any introductory hints on first launch. This might
Amith Yamasani0c416392014-06-13 15:54:39 -07005493 * apply to users that are already familiar with the environment or temporary users.
Amith Yamasani1e9c2182014-06-11 17:25:51 -07005494 * <p>
5495 * Type : int (0 to show hints, 1 to skip showing hints)
Amith Yamasani1e9c2182014-06-11 17:25:51 -07005496 */
5497 public static final String SKIP_FIRST_USE_HINTS = "skip_first_use_hints";
5498
5499 /**
John Spurlockaa5ee4d2014-07-25 13:05:12 -04005500 * Persisted playback time after a user confirmation of an unsafe volume level.
5501 *
5502 * @hide
5503 */
5504 public static final String UNSAFE_VOLUME_MUSIC_ACTIVE_MS = "unsafe_volume_music_active_ms";
5505
5506 /**
Dan Sandler52e5701e2014-07-22 23:14:54 -04005507 * This preference enables notification display on the lockscreen.
5508 * @hide
5509 */
5510 public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS =
5511 "lock_screen_show_notifications";
5512
5513 /**
Dongwon Kang4d933a02014-08-07 22:51:47 -07005514 * List of TV inputs that are currently hidden. This is a string
Jaewan Kimf0e530e2014-08-22 00:43:31 +09005515 * containing the IDs of all hidden TV inputs. Each ID is encoded by
5516 * {@link android.net.Uri#encode(String)} and separated by ':'.
Dongwon Kang4d933a02014-08-07 22:51:47 -07005517 * @hide
5518 */
5519 public static final String TV_INPUT_HIDDEN_INPUTS = "tv_input_hidden_inputs";
5520
5521 /**
5522 * List of custom TV input labels. This is a string containing <TV input id, custom name>
Jaewan Kimf0e530e2014-08-22 00:43:31 +09005523 * pairs. TV input id and custom name are encoded by {@link android.net.Uri#encode(String)}
5524 * and separated by ','. Each pair is separated by ':'.
Dongwon Kang4d933a02014-08-07 22:51:47 -07005525 * @hide
5526 */
5527 public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels";
5528
5529 /**
Glenn Kasten34cc4db2014-08-13 10:56:38 -07005530 * Whether automatic routing of system audio to USB audio peripheral is disabled.
5531 * The value is boolean (1 or 0), where 1 means automatic routing is disabled,
5532 * and 0 means automatic routing is enabled.
5533 *
5534 * @hide
5535 */
5536 public static final String USB_AUDIO_AUTOMATIC_ROUTING_DISABLED =
5537 "usb_audio_automatic_routing_disabled";
5538
5539 /**
Jeff Brown05af6ad2014-09-30 20:54:30 -07005540 * The timeout in milliseconds before the device fully goes to sleep after
5541 * a period of inactivity. This value sets an upper bound on how long the device
5542 * will stay awake or dreaming without user activity. It should generally
Dianne Hackbornad6a99b2014-11-18 10:11:10 -08005543 * be longer than {@link Settings.System#SCREEN_OFF_TIMEOUT} as otherwise the device
Jeff Brown05af6ad2014-09-30 20:54:30 -07005544 * will sleep before it ever has a chance to dream.
5545 * <p>
5546 * Use -1 to disable this timeout.
5547 * </p>
5548 *
5549 * @hide
5550 */
5551 public static final String SLEEP_TIMEOUT = "sleep_timeout";
5552
5553 /**
Amith Yamasanib0ff3222015-03-04 09:56:14 -08005554 * Duration in milliseconds that an app should be inactive before it is considered idle.
5555 * <p/>Type: Long
5556 * @hide
5557 */
5558 public static final String APP_IDLE_DURATION = "app_idle_duration";
5559
5560 /**
Jason Monk27bbb2d2015-03-31 16:46:39 -04005561 * Controls whether double tap to wake is enabled.
5562 * @hide
5563 */
5564 public static final String DOUBLE_TAP_TO_WAKE = "double_tap_to_wake";
5565
5566 /**
Xiyuan Xiae6de8b92015-06-06 22:18:05 -07005567 * The current assistant component. It could be a voice interaction service,
5568 * or an activity that handles ACTION_ASSIST, or empty which means using the default
5569 * handling.
5570 *
5571 * @hide
5572 */
5573 public static final String ASSISTANT = "assistant";
5574
5575 /**
Svetoslav Ganova571a582011-09-20 18:32:20 -07005576 * This are the settings to be backed up.
5577 *
5578 * NOTE: Settings are backed up and restored in the order they appear
5579 * in this array. If you have one setting depending on another,
5580 * make sure that they are ordered appropriately.
5581 *
-b master501eec92009-07-06 13:53:11 -07005582 * @hide
5583 */
5584 public static final String[] SETTINGS_TO_BACKUP = {
Christopher Tate58f41ec2013-01-11 15:40:36 -08005585 BUGREPORT_IN_POWER_MENU, // moved to global
Amith Yamasani8823c0a82009-07-07 14:30:17 -07005586 ALLOW_MOCK_LOCATION,
-b master501eec92009-07-06 13:53:11 -07005587 PARENTAL_CONTROL_ENABLED,
5588 PARENTAL_CONTROL_REDIRECT_URL,
Christopher Tate66488d62012-10-02 11:58:01 -07005589 USB_MASS_STORAGE_ENABLED, // moved to global
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -07005590 ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
5591 ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
5592 ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE,
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07005593 ACCESSIBILITY_SCRIPT_INJECTION,
Christopher Tate14c2d792010-02-25 16:49:44 -08005594 BACKUP_AUTO_RESTORE,
-b master501eec92009-07-06 13:53:11 -07005595 ENABLED_ACCESSIBILITY_SERVICES,
Christopher Tate6597e342015-02-17 12:15:25 -08005596 ENABLED_NOTIFICATION_LISTENERS,
Christopher Tate7b9a28c2015-03-18 13:06:16 -07005597 ENABLED_INPUT_METHODS,
Svetoslav Ganov9a4c5cd2012-05-30 14:06:32 -07005598 TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES,
Svetoslav Ganova28a16d2011-07-28 11:24:21 -07005599 TOUCH_EXPLORATION_ENABLED,
Svetoslav Ganova571a582011-09-20 18:32:20 -07005600 ACCESSIBILITY_ENABLED,
Svetoslav Ganov55f937a2011-12-05 11:42:07 -08005601 ACCESSIBILITY_SPEAK_PASSWORD,
Chris Craikcce47eb2014-07-16 15:12:15 -07005602 ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED,
Alan Viveretteef793802013-07-23 14:15:28 -07005603 ACCESSIBILITY_CAPTIONING_ENABLED,
5604 ACCESSIBILITY_CAPTIONING_LOCALE,
5605 ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR,
5606 ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR,
5607 ACCESSIBILITY_CAPTIONING_EDGE_TYPE,
5608 ACCESSIBILITY_CAPTIONING_EDGE_COLOR,
5609 ACCESSIBILITY_CAPTIONING_TYPEFACE,
Alan Viverette69ce69b2013-08-29 12:23:48 -07005610 ACCESSIBILITY_CAPTIONING_FONT_SCALE,
-b master501eec92009-07-06 13:53:11 -07005611 TTS_USE_DEFAULTS,
5612 TTS_DEFAULT_RATE,
5613 TTS_DEFAULT_PITCH,
5614 TTS_DEFAULT_SYNTH,
5615 TTS_DEFAULT_LANG,
5616 TTS_DEFAULT_COUNTRY,
Charles Chenceffa152010-03-16 21:18:10 -07005617 TTS_ENABLED_PLUGINS,
Narayan Kamath6d632962011-08-24 11:51:37 +01005618 TTS_DEFAULT_LOCALE,
Christopher Tate66488d62012-10-02 11:58:01 -07005619 WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, // moved to global
5620 WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, // moved to global
5621 WIFI_NUM_OPEN_NETWORKS_KEPT, // moved to global
Christopher Tate06cbadd2015-03-16 18:29:42 -07005622 SELECTED_SPELL_CHECKER,
5623 SELECTED_SPELL_CHECKER_SUBTYPE,
5624 SPELL_CHECKER_ENABLED,
San Mehat87734d32010-01-08 12:53:06 -08005625 MOUNT_PLAY_NOTIFICATION_SND,
5626 MOUNT_UMS_AUTOSTART,
5627 MOUNT_UMS_PROMPT,
Dianne Hackborn2ccda4d2010-03-22 21:49:15 -07005628 MOUNT_UMS_NOTIFY_ENABLED,
Jeff Brown05af6ad2014-09-30 20:54:30 -07005629 UI_NIGHT_MODE,
Jason Monk27bbb2d2015-03-31 16:46:39 -04005630 SLEEP_TIMEOUT,
5631 DOUBLE_TAP_TO_WAKE,
-b master501eec92009-07-06 13:53:11 -07005632 };
5633
5634 /**
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07005635 * These entries are considered common between the personal and the managed profile,
5636 * since the managed profile doesn't get to change them.
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07005637 */
Svetoslav683914b2015-01-15 14:22:26 -08005638 private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>();
Amith Yamasanib0ff3222015-03-04 09:56:14 -08005639
Svetoslav683914b2015-01-15 14:22:26 -08005640 static {
5641 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_ENABLED);
5642 CLONE_TO_MANAGED_PROFILE.add(ALLOW_MOCK_LOCATION);
5643 CLONE_TO_MANAGED_PROFILE.add(ALLOWED_GEOLOCATION_ORIGINS);
5644 CLONE_TO_MANAGED_PROFILE.add(DEFAULT_INPUT_METHOD);
5645 CLONE_TO_MANAGED_PROFILE.add(ENABLED_ACCESSIBILITY_SERVICES);
5646 CLONE_TO_MANAGED_PROFILE.add(ENABLED_INPUT_METHODS);
5647 CLONE_TO_MANAGED_PROFILE.add(LOCATION_MODE);
5648 CLONE_TO_MANAGED_PROFILE.add(LOCATION_PROVIDERS_ALLOWED);
5649 CLONE_TO_MANAGED_PROFILE.add(LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS);
5650 CLONE_TO_MANAGED_PROFILE.add(SELECTED_INPUT_METHOD_SUBTYPE);
5651 CLONE_TO_MANAGED_PROFILE.add(SELECTED_SPELL_CHECKER);
5652 CLONE_TO_MANAGED_PROFILE.add(SELECTED_SPELL_CHECKER_SUBTYPE);
5653 }
5654
5655 /** @hide */
5656 public static void getCloneToManagedProfileSettings(Set<String> outKeySet) {
5657 outKeySet.addAll(CLONE_TO_MANAGED_PROFILE);
5658 }
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07005659
5660 /**
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005661 * Helper method for determining if a location provider is enabled.
Tom O'Neilld5759432013-09-11 11:03:03 -07005662 *
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005663 * @param cr the content resolver to use
5664 * @param provider the location provider to query
5665 * @return true if the provider is enabled
Tom O'Neilld5759432013-09-11 11:03:03 -07005666 *
5667 * @deprecated use {@link #LOCATION_MODE} or
5668 * {@link LocationManager#isProviderEnabled(String)}
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005669 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005670 @Deprecated
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005671 public static final boolean isLocationProviderEnabled(ContentResolver cr, String provider) {
Victoria Leaseb711d572012-10-02 13:14:11 -07005672 return isLocationProviderEnabledForUser(cr, provider, UserHandle.myUserId());
5673 }
5674
5675 /**
5676 * Helper method for determining if a location provider is enabled.
5677 * @param cr the content resolver to use
5678 * @param provider the location provider to query
5679 * @param userId the userId to query
5680 * @return true if the provider is enabled
Tom O'Neilld5759432013-09-11 11:03:03 -07005681 * @deprecated use {@link #LOCATION_MODE} or
5682 * {@link LocationManager#isProviderEnabled(String)}
Victoria Leaseb711d572012-10-02 13:14:11 -07005683 * @hide
5684 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005685 @Deprecated
Victoria Leaseb711d572012-10-02 13:14:11 -07005686 public static final boolean isLocationProviderEnabledForUser(ContentResolver cr, String provider, int userId) {
5687 String allowedProviders = Settings.Secure.getStringForUser(cr,
5688 LOCATION_PROVIDERS_ALLOWED, userId);
Brad Fitzpatrick11fe1812010-09-10 16:07:52 -07005689 return TextUtils.delimitedStringContains(allowedProviders, ',', provider);
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005690 }
5691
5692 /**
5693 * Thread-safe method for enabling or disabling a single location provider.
5694 * @param cr the content resolver to use
5695 * @param provider the location provider to enable or disable
5696 * @param enabled true if the provider should be enabled
Tom O'Neilla324ac72013-08-26 14:40:23 -07005697 * @deprecated use {@link #putInt(ContentResolver, String, int)} and {@link #LOCATION_MODE}
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005698 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005699 @Deprecated
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005700 public static final void setLocationProviderEnabled(ContentResolver cr,
5701 String provider, boolean enabled) {
Victoria Leaseb711d572012-10-02 13:14:11 -07005702 setLocationProviderEnabledForUser(cr, provider, enabled, UserHandle.myUserId());
5703 }
5704
5705 /**
5706 * Thread-safe method for enabling or disabling a single location provider.
Tom O'Neilla324ac72013-08-26 14:40:23 -07005707 *
Victoria Leaseb711d572012-10-02 13:14:11 -07005708 * @param cr the content resolver to use
5709 * @param provider the location provider to enable or disable
5710 * @param enabled true if the provider should be enabled
5711 * @param userId the userId for which to enable/disable providers
Tom O'Neilla324ac72013-08-26 14:40:23 -07005712 * @return true if the value was set, false on database errors
5713 * @deprecated use {@link #putIntForUser(ContentResolver, String, int, int)} and
5714 * {@link #LOCATION_MODE}
Victoria Leaseb711d572012-10-02 13:14:11 -07005715 * @hide
5716 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005717 @Deprecated
Tom O'Neilla324ac72013-08-26 14:40:23 -07005718 public static final boolean setLocationProviderEnabledForUser(ContentResolver cr,
Victoria Leaseb711d572012-10-02 13:14:11 -07005719 String provider, boolean enabled, int userId) {
David Christie3f7b6522013-08-06 19:19:08 -07005720 synchronized (mLocationSettingsLock) {
5721 // to ensure thread safety, we write the provider name with a '+' or '-'
5722 // and let the SettingsProvider handle it rather than reading and modifying
5723 // the list of enabled providers.
5724 if (enabled) {
5725 provider = "+" + provider;
5726 } else {
5727 provider = "-" + provider;
5728 }
Tom O'Neilla324ac72013-08-26 14:40:23 -07005729 return putStringForUser(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider,
David Christie3f7b6522013-08-06 19:19:08 -07005730 userId);
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005731 }
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005732 }
Tom O'Neill1f48b782013-08-19 18:14:56 -07005733
5734 /**
5735 * Thread-safe method for setting the location mode to one of
5736 * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY},
5737 * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}.
5738 *
Tom O'Neill1f48b782013-08-19 18:14:56 -07005739 * @param cr the content resolver to use
5740 * @param mode such as {@link #LOCATION_MODE_HIGH_ACCURACY}
5741 * @param userId the userId for which to change mode
Tom O'Neilla324ac72013-08-26 14:40:23 -07005742 * @return true if the value was set, false on database errors
Tom O'Neill1f48b782013-08-19 18:14:56 -07005743 *
5744 * @throws IllegalArgumentException if mode is not one of the supported values
5745 */
Tom O'Neill7f6f4572013-08-27 10:53:15 -07005746 private static final boolean setLocationModeForUser(ContentResolver cr, int mode,
5747 int userId) {
Tom O'Neill1f48b782013-08-19 18:14:56 -07005748 synchronized (mLocationSettingsLock) {
5749 boolean gps = false;
5750 boolean network = false;
5751 switch (mode) {
5752 case LOCATION_MODE_OFF:
5753 break;
5754 case LOCATION_MODE_SENSORS_ONLY:
5755 gps = true;
5756 break;
5757 case LOCATION_MODE_BATTERY_SAVING:
5758 network = true;
5759 break;
5760 case LOCATION_MODE_HIGH_ACCURACY:
5761 gps = true;
5762 network = true;
5763 break;
5764 default:
5765 throw new IllegalArgumentException("Invalid location mode: " + mode);
5766 }
Tom O'Neill7731a992014-10-09 11:30:49 -07005767 // Note it's important that we set the NLP mode first. The Google implementation
5768 // of NLP clears its NLP consent setting any time it receives a
5769 // LocationManager.PROVIDERS_CHANGED_ACTION broadcast and NLP is disabled. Also,
5770 // it shows an NLP consent dialog any time it receives the broadcast, NLP is
5771 // enabled, and the NLP consent is not set. If 1) we were to enable GPS first,
5772 // 2) a setup wizard has its own NLP consent UI that sets the NLP consent setting,
5773 // and 3) the receiver happened to complete before we enabled NLP, then the Google
5774 // NLP would detect the attempt to enable NLP and show a redundant NLP consent
5775 // dialog. Then the people who wrote the setup wizard would be sad.
Tom O'Neilla324ac72013-08-26 14:40:23 -07005776 boolean nlpSuccess = Settings.Secure.setLocationProviderEnabledForUser(
Tom O'Neill1f48b782013-08-19 18:14:56 -07005777 cr, LocationManager.NETWORK_PROVIDER, network, userId);
Tom O'Neill7731a992014-10-09 11:30:49 -07005778 boolean gpsSuccess = Settings.Secure.setLocationProviderEnabledForUser(
5779 cr, LocationManager.GPS_PROVIDER, gps, userId);
Tom O'Neilla324ac72013-08-26 14:40:23 -07005780 return gpsSuccess && nlpSuccess;
Tom O'Neill1f48b782013-08-19 18:14:56 -07005781 }
5782 }
5783
5784 /**
Tom O'Neill1f48b782013-08-19 18:14:56 -07005785 * Thread-safe method for reading the location mode, returns one of
5786 * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY},
5787 * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}.
5788 *
5789 * @param cr the content resolver to use
5790 * @param userId the userId for which to read the mode
5791 * @return the location mode
5792 */
Tom O'Neill7f6f4572013-08-27 10:53:15 -07005793 private static final int getLocationModeForUser(ContentResolver cr, int userId) {
Tom O'Neill1f48b782013-08-19 18:14:56 -07005794 synchronized (mLocationSettingsLock) {
5795 boolean gpsEnabled = Settings.Secure.isLocationProviderEnabledForUser(
5796 cr, LocationManager.GPS_PROVIDER, userId);
5797 boolean networkEnabled = Settings.Secure.isLocationProviderEnabledForUser(
5798 cr, LocationManager.NETWORK_PROVIDER, userId);
5799 if (gpsEnabled && networkEnabled) {
5800 return LOCATION_MODE_HIGH_ACCURACY;
5801 } else if (gpsEnabled) {
5802 return LOCATION_MODE_SENSORS_ONLY;
5803 } else if (networkEnabled) {
5804 return LOCATION_MODE_BATTERY_SAVING;
5805 } else {
5806 return LOCATION_MODE_OFF;
5807 }
5808 }
5809 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005810 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005811
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005812 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005813 * Global system settings, containing preferences that always apply identically
5814 * to all defined users. Applications can read these but are not allowed to write;
5815 * like the "Secure" settings, these are for preferences that the user must
5816 * explicitly modify through the system UI or specialized APIs for those values.
5817 */
5818 public static final class Global extends NameValueTable {
5819 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_global_version";
5820
5821 /**
5822 * The content:// style URL for global secure settings items. Not public.
5823 */
5824 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global");
5825
5826 /**
Amith Yamasani23a0f052014-07-25 12:26:53 -07005827 * Whether users are allowed to add more users or guest from lockscreen.
5828 * <p>
5829 * Type: int
5830 * @hide
5831 */
5832 public static final String ADD_USERS_WHEN_LOCKED = "add_users_when_locked";
5833
5834 /**
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07005835 * Setting whether the global gesture for enabling accessibility is enabled.
5836 * If this gesture is enabled the user will be able to perfrom it to enable
5837 * the accessibility state without visiting the settings app.
5838 * @hide
5839 */
5840 public static final String ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED =
5841 "enable_accessibility_global_gesture_enabled";
5842
5843 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005844 * Whether Airplane Mode is on.
5845 */
5846 public static final String AIRPLANE_MODE_ON = "airplane_mode_on";
5847
5848 /**
Bryce Lee584a4452014-10-21 15:55:55 -07005849 * Whether Theater Mode is on.
5850 * {@hide}
5851 */
Bryce Leecdfebd62015-02-02 08:19:11 -08005852 @SystemApi
Bryce Lee584a4452014-10-21 15:55:55 -07005853 public static final String THEATER_MODE_ON = "theater_mode_on";
5854
5855 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005856 * Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.
5857 */
5858 public static final String RADIO_BLUETOOTH = "bluetooth";
5859
5860 /**
5861 * Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio.
5862 */
5863 public static final String RADIO_WIFI = "wifi";
5864
5865 /**
5866 * {@hide}
5867 */
5868 public static final String RADIO_WIMAX = "wimax";
5869 /**
5870 * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.
5871 */
5872 public static final String RADIO_CELL = "cell";
5873
5874 /**
5875 * Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio.
5876 */
5877 public static final String RADIO_NFC = "nfc";
5878
5879 /**
5880 * A comma separated list of radios that need to be disabled when airplane mode
5881 * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are
5882 * included in the comma separated list.
5883 */
5884 public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios";
5885
5886 /**
5887 * A comma separated list of radios that should to be disabled when airplane mode
5888 * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is
5889 * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi
5890 * will be turned off when entering airplane mode, but the user will be able to reenable
5891 * Wifi in the Settings app.
5892 *
5893 * {@hide}
5894 */
5895 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios";
5896
5897 /**
5898 * The policy for deciding when Wi-Fi should go to sleep (which will in
5899 * turn switch to using the mobile data as an Internet connection).
5900 * <p>
5901 * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT},
5902 * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or
5903 * {@link #WIFI_SLEEP_POLICY_NEVER}.
5904 */
5905 public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy";
5906
5907 /**
5908 * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep
5909 * policy, which is to sleep shortly after the turning off
5910 * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting.
5911 */
5912 public static final int WIFI_SLEEP_POLICY_DEFAULT = 0;
5913
5914 /**
5915 * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when
5916 * the device is on battery, and never go to sleep when the device is
5917 * plugged in.
5918 */
5919 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1;
5920
5921 /**
5922 * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep.
5923 */
5924 public static final int WIFI_SLEEP_POLICY_NEVER = 2;
5925
5926 /**
5927 * Value to specify if the user prefers the date, time and time zone
5928 * to be automatically fetched from the network (NITZ). 1=yes, 0=no
5929 */
5930 public static final String AUTO_TIME = "auto_time";
5931
5932 /**
5933 * Value to specify if the user prefers the time zone
5934 * to be automatically fetched from the network (NITZ). 1=yes, 0=no
5935 */
5936 public static final String AUTO_TIME_ZONE = "auto_time_zone";
5937
5938 /**
5939 * URI for the car dock "in" event sound.
5940 * @hide
5941 */
5942 public static final String CAR_DOCK_SOUND = "car_dock_sound";
5943
5944 /**
5945 * URI for the car dock "out" event sound.
5946 * @hide
5947 */
5948 public static final String CAR_UNDOCK_SOUND = "car_undock_sound";
5949
5950 /**
5951 * URI for the desk dock "in" event sound.
5952 * @hide
5953 */
5954 public static final String DESK_DOCK_SOUND = "desk_dock_sound";
5955
5956 /**
5957 * URI for the desk dock "out" event sound.
5958 * @hide
5959 */
5960 public static final String DESK_UNDOCK_SOUND = "desk_undock_sound";
5961
5962 /**
5963 * Whether to play a sound for dock events.
5964 * @hide
5965 */
5966 public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled";
5967
5968 /**
5969 * URI for the "device locked" (keyguard shown) sound.
5970 * @hide
5971 */
5972 public static final String LOCK_SOUND = "lock_sound";
5973
5974 /**
5975 * URI for the "device unlocked" sound.
5976 * @hide
5977 */
5978 public static final String UNLOCK_SOUND = "unlock_sound";
5979
5980 /**
Adrian Roos49e057d2014-08-13 17:14:51 +02005981 * URI for the "device is trusted" sound, which is played when the device enters the trusted
5982 * state without unlocking.
5983 * @hide
5984 */
5985 public static final String TRUSTED_SOUND = "trusted_sound";
5986
5987 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005988 * URI for the low battery sound file.
5989 * @hide
5990 */
5991 public static final String LOW_BATTERY_SOUND = "low_battery_sound";
5992
5993 /**
5994 * Whether to play a sound for low-battery alerts.
5995 * @hide
5996 */
5997 public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled";
5998
5999 /**
Jeff Brown84e27562012-12-07 13:56:34 -08006000 * URI for the "wireless charging started" sound.
6001 * @hide
6002 */
6003 public static final String WIRELESS_CHARGING_STARTED_SOUND =
6004 "wireless_charging_started_sound";
6005
6006 /**
John Spurlock51a871d2015-05-06 17:41:30 -04006007 * Whether to play a sound for charging events.
6008 * @hide
6009 */
6010 public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled";
6011
6012 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006013 * Whether we keep the device on while the device is plugged in.
6014 * Supported values are:
6015 * <ul>
6016 * <li>{@code 0} to never stay on while plugged in</li>
6017 * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li>
6018 * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li>
6019 * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li>
6020 * </ul>
6021 * These values can be OR-ed together.
6022 */
6023 public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in";
6024
6025 /**
Christopher Tate58f41ec2013-01-11 15:40:36 -08006026 * When the user has enable the option to have a "bug report" command
6027 * in the power menu.
6028 * @hide
6029 */
6030 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu";
6031
6032 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006033 * Whether ADB is enabled.
6034 */
6035 public static final String ADB_ENABLED = "adb_enabled";
6036
6037 /**
Jon Miranda836c0a82014-08-11 12:32:26 -07006038 * Whether Views are allowed to save their attribute data.
6039 * @hide
6040 */
6041 public static final String DEBUG_VIEW_ATTRIBUTES = "debug_view_attributes";
6042
6043 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006044 * Whether assisted GPS should be enabled or not.
6045 * @hide
6046 */
6047 public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled";
6048
6049 /**
6050 * Whether bluetooth is enabled/disabled
6051 * 0=disabled. 1=enabled.
6052 */
6053 public static final String BLUETOOTH_ON = "bluetooth_on";
6054
6055 /**
6056 * CDMA Cell Broadcast SMS
6057 * 0 = CDMA Cell Broadcast SMS disabled
6058 * 1 = CDMA Cell Broadcast SMS enabled
6059 * @hide
6060 */
6061 public static final String CDMA_CELL_BROADCAST_SMS =
6062 "cdma_cell_broadcast_sms";
6063
6064 /**
6065 * The CDMA roaming mode 0 = Home Networks, CDMA default
6066 * 1 = Roaming on Affiliated networks
6067 * 2 = Roaming on any networks
6068 * @hide
6069 */
6070 public static final String CDMA_ROAMING_MODE = "roaming_settings";
6071
6072 /**
6073 * The CDMA subscription mode 0 = RUIM/SIM (default)
6074 * 1 = NV
6075 * @hide
6076 */
6077 public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode";
6078
6079 /** Inactivity timeout to track mobile data activity.
6080 *
6081 * If set to a positive integer, it indicates the inactivity timeout value in seconds to
6082 * infer the data activity of mobile network. After a period of no activity on mobile
6083 * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE}
6084 * intent is fired to indicate a transition of network status from "active" to "idle". Any
6085 * subsequent activity on mobile networks triggers the firing of {@code
6086 * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active".
6087 *
6088 * Network activity refers to transmitting or receiving data on the network interfaces.
6089 *
6090 * Tracking is disabled if set to zero or negative value.
6091 *
6092 * @hide
6093 */
6094 public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile";
6095
6096 /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE}
6097 * but for Wifi network.
6098 * @hide
6099 */
6100 public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi";
6101
6102 /**
6103 * Whether or not data roaming is enabled. (0 = false, 1 = true)
6104 */
6105 public static final String DATA_ROAMING = "data_roaming";
6106
6107 /**
Wink Saville75c1e692013-03-20 17:06:50 -07006108 * The value passed to a Mobile DataConnection via bringUp which defines the
6109 * number of retries to preform when setting up the initial connection. The default
6110 * value defined in DataConnectionTrackerBase#DEFAULT_MDC_INITIAL_RETRY is currently 1.
6111 * @hide
6112 */
6113 public static final String MDC_INITIAL_MAX_RETRY = "mdc_initial_max_retry";
6114
6115 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006116 * Whether user has enabled development settings.
6117 */
6118 public static final String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
6119
6120 /**
6121 * Whether the device has been provisioned (0 = false, 1 = true)
6122 */
6123 public static final String DEVICE_PROVISIONED = "device_provisioned";
6124
6125 /**
6126 * The saved value for WindowManagerService.setForcedDisplayDensity().
6127 * One integer in dpi. If unset, then use the real display density.
6128 * @hide
6129 */
6130 public static final String DISPLAY_DENSITY_FORCED = "display_density_forced";
6131
6132 /**
6133 * The saved value for WindowManagerService.setForcedDisplaySize().
6134 * Two integers separated by a comma. If unset, then use the real display size.
6135 * @hide
6136 */
6137 public static final String DISPLAY_SIZE_FORCED = "display_size_forced";
6138
6139 /**
Jeff Brownd46747a2015-04-15 19:02:36 -07006140 * The saved value for WindowManagerService.setForcedDisplayScalingMode().
6141 * 0 or unset if scaling is automatic, 1 if scaling is disabled.
6142 * @hide
6143 */
6144 public static final String DISPLAY_SCALING_FORCE = "display_scaling_force";
6145
6146 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006147 * The maximum size, in bytes, of a download that the download manager will transfer over
6148 * a non-wifi connection.
6149 * @hide
6150 */
6151 public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE =
6152 "download_manager_max_bytes_over_mobile";
6153
6154 /**
6155 * The recommended maximum size, in bytes, of a download that the download manager should
6156 * transfer over a non-wifi connection. Over this size, the use will be warned, but will
6157 * have the option to start the download over the mobile connection anyway.
6158 * @hide
6159 */
6160 public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE =
6161 "download_manager_recommended_max_bytes_over_mobile";
6162
6163 /**
Christopher Tateaa036a22014-05-19 16:33:27 -07006164 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead
Christopher Tate06efb532012-08-24 15:29:27 -07006165 */
Christopher Tateaa036a22014-05-19 16:33:27 -07006166 @Deprecated
6167 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS;
Christopher Tate06efb532012-08-24 15:29:27 -07006168
6169 /**
Jinsuk Kimb3d91772014-07-10 12:48:54 +09006170 * Whether HDMI control shall be enabled. If disabled, no CEC/MHL command will be
6171 * sent or processed. (0 = false, 1 = true)
6172 * @hide
6173 */
6174 public static final String HDMI_CONTROL_ENABLED = "hdmi_control_enabled";
6175
6176 /**
6177 * Whether HDMI system audio is enabled. If enabled, TV internal speaker is muted,
6178 * and the output is redirected to AV Receiver connected via
6179 * {@Global#HDMI_SYSTEM_AUDIO_OUTPUT}.
6180 * @hide
6181 */
6182 public static final String HDMI_SYSTEM_AUDIO_ENABLED = "hdmi_system_audio_enabled";
6183
6184 /**
Jinsuk Kimb3d91772014-07-10 12:48:54 +09006185 * Whether TV will automatically turn on upon reception of the CEC command
6186 * &lt;Text View On&gt; or &lt;Image View On&gt;. (0 = false, 1 = true)
6187 * @hide
6188 */
6189 public static final String HDMI_CONTROL_AUTO_WAKEUP_ENABLED =
6190 "hdmi_control_auto_wakeup_enabled";
6191
6192 /**
6193 * Whether TV will also turn off other CEC devices when it goes to standby mode.
6194 * (0 = false, 1 = true)
6195 * @hide
6196 */
6197 public static final String HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED =
6198 "hdmi_control_auto_device_off_enabled";
6199
6200 /**
Lorenzo Colitti06d7e532015-03-16 23:46:24 +09006201 * Whether to use the DHCP client from Lollipop and earlier instead of the newer Android DHCP
6202 * client.
6203 * (0 = false, 1 = true)
6204 * @hide
6205 */
6206 public static final String LEGACY_DHCP_CLIENT = "legacy_dhcp_client";
6207
6208 /**
Jinsuk Kimb3d91772014-07-10 12:48:54 +09006209 * Whether TV will switch to MHL port when a mobile device is plugged in.
6210 * (0 = false, 1 = true)
6211 * @hide
6212 */
6213 public static final String MHL_INPUT_SWITCHING_ENABLED = "mhl_input_switching_enabled";
6214
6215 /**
6216 * Whether TV will charge the mobile device connected at MHL port. (0 = false, 1 = true)
6217 * @hide
6218 */
6219 public static final String MHL_POWER_CHARGE_ENABLED = "mhl_power_charge_enabled";
6220
6221 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006222 * Whether mobile data connections are allowed by the user. See
6223 * ConnectivityManager for more info.
6224 * @hide
6225 */
6226 public static final String MOBILE_DATA = "mobile_data";
6227
Erik Klineda4bfa82015-04-30 12:58:40 +09006228 /**
6229 * Whether the mobile data connection should remain active even when higher
6230 * priority networks like WiFi are active, to help make network switching faster.
6231 *
6232 * See ConnectivityService for more info.
6233 *
6234 * (0 = disabled, 1 = enabled)
6235 * @hide
6236 */
6237 public static final String MOBILE_DATA_ALWAYS_ON = "mobile_data_always_on";
6238
Christopher Tate06efb532012-08-24 15:29:27 -07006239 /** {@hide} */
6240 public static final String NETSTATS_ENABLED = "netstats_enabled";
6241 /** {@hide} */
6242 public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval";
6243 /** {@hide} */
6244 public static final String NETSTATS_TIME_CACHE_MAX_AGE = "netstats_time_cache_max_age";
6245 /** {@hide} */
6246 public static final String NETSTATS_GLOBAL_ALERT_BYTES = "netstats_global_alert_bytes";
6247 /** {@hide} */
6248 public static final String NETSTATS_SAMPLE_ENABLED = "netstats_sample_enabled";
Christopher Tate06efb532012-08-24 15:29:27 -07006249
6250 /** {@hide} */
6251 public static final String NETSTATS_DEV_BUCKET_DURATION = "netstats_dev_bucket_duration";
6252 /** {@hide} */
6253 public static final String NETSTATS_DEV_PERSIST_BYTES = "netstats_dev_persist_bytes";
6254 /** {@hide} */
6255 public static final String NETSTATS_DEV_ROTATE_AGE = "netstats_dev_rotate_age";
6256 /** {@hide} */
6257 public static final String NETSTATS_DEV_DELETE_AGE = "netstats_dev_delete_age";
6258
6259 /** {@hide} */
6260 public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration";
6261 /** {@hide} */
6262 public static final String NETSTATS_UID_PERSIST_BYTES = "netstats_uid_persist_bytes";
6263 /** {@hide} */
6264 public static final String NETSTATS_UID_ROTATE_AGE = "netstats_uid_rotate_age";
6265 /** {@hide} */
6266 public static final String NETSTATS_UID_DELETE_AGE = "netstats_uid_delete_age";
6267
6268 /** {@hide} */
6269 public static final String NETSTATS_UID_TAG_BUCKET_DURATION = "netstats_uid_tag_bucket_duration";
6270 /** {@hide} */
6271 public static final String NETSTATS_UID_TAG_PERSIST_BYTES = "netstats_uid_tag_persist_bytes";
6272 /** {@hide} */
6273 public static final String NETSTATS_UID_TAG_ROTATE_AGE = "netstats_uid_tag_rotate_age";
6274 /** {@hide} */
6275 public static final String NETSTATS_UID_TAG_DELETE_AGE = "netstats_uid_tag_delete_age";
6276
6277 /**
6278 * User preference for which network(s) should be used. Only the
6279 * connectivity service should touch this.
6280 */
6281 public static final String NETWORK_PREFERENCE = "network_preference";
6282
6283 /**
Jeff Davidsondd6fd1e2014-04-14 15:14:30 -07006284 * Which package name to use for network scoring. If null, or if the package is not a valid
6285 * scorer app, external network scores will neither be requested nor accepted.
6286 * @hide
6287 */
6288 public static final String NETWORK_SCORER_APP = "network_scorer_app";
6289
6290 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006291 * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
6292 * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
6293 * exceeded.
6294 * @hide
6295 */
6296 public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
6297
6298 /**
6299 * The length of time in milli-seconds that automatic small adjustments to
6300 * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
6301 * @hide
6302 */
6303 public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
6304
6305 /** Preferred NTP server. {@hide} */
6306 public static final String NTP_SERVER = "ntp_server";
6307 /** Timeout in milliseconds to wait for NTP server. {@hide} */
6308 public static final String NTP_TIMEOUT = "ntp_timeout";
6309
6310 /**
rich cannings4d8fc792012-09-07 14:43:43 -07006311 * Whether the package manager should send package verification broadcasts for verifiers to
6312 * review apps prior to installation.
6313 * 1 = request apps to be verified prior to installation, if a verifier exists.
6314 * 0 = do not verify apps before installation
rich cannings4e5753f2012-09-19 16:03:56 -07006315 * @hide
rich cannings4d8fc792012-09-07 14:43:43 -07006316 */
6317 public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable";
6318
6319 /** Timeout for package verification.
rich cannings4e5753f2012-09-19 16:03:56 -07006320 * @hide */
rich cannings4d8fc792012-09-07 14:43:43 -07006321 public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout";
6322
6323 /** Default response code for package verification.
rich cannings4e5753f2012-09-19 16:03:56 -07006324 * @hide */
rich cannings4d8fc792012-09-07 14:43:43 -07006325 public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response";
6326
rich cannings4e5753f2012-09-19 16:03:56 -07006327 /**
6328 * Show package verification setting in the Settings app.
rich canningse6686b32012-09-16 14:02:20 -07006329 * 1 = show (default)
6330 * 0 = hide
rich cannings4e5753f2012-09-19 16:03:56 -07006331 * @hide
rich canningse6686b32012-09-16 14:02:20 -07006332 */
6333 public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible";
6334
rich cannings4d8fc792012-09-07 14:43:43 -07006335 /**
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -08006336 * Run package verification on apps installed through ADB/ADT/USB
rich cannings4e5753f2012-09-19 16:03:56 -07006337 * 1 = perform package verification on ADB installs (default)
6338 * 0 = bypass package verification on ADB installs
6339 * @hide
6340 */
6341 public static final String PACKAGE_VERIFIER_INCLUDE_ADB = "verifier_verify_adb_installs";
6342
6343 /**
Christopher Tate7265abe2014-11-21 13:54:45 -08006344 * Time since last fstrim (milliseconds) after which we force one to happen
6345 * during device startup. If unset, the default is 3 days.
6346 * @hide
6347 */
6348 public static final String FSTRIM_MANDATORY_INTERVAL = "fstrim_mandatory_interval";
6349
6350 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006351 * The interval in milliseconds at which to check packet counts on the
6352 * mobile data interface when screen is on, to detect possible data
6353 * connection problems.
6354 * @hide
6355 */
6356 public static final String PDP_WATCHDOG_POLL_INTERVAL_MS =
6357 "pdp_watchdog_poll_interval_ms";
6358
6359 /**
6360 * The interval in milliseconds at which to check packet counts on the
6361 * mobile data interface when screen is off, to detect possible data
6362 * connection problems.
6363 * @hide
6364 */
6365 public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS =
6366 "pdp_watchdog_long_poll_interval_ms";
6367
6368 /**
6369 * The interval in milliseconds at which to check packet counts on the
6370 * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT}
6371 * outgoing packets has been reached without incoming packets.
6372 * @hide
6373 */
6374 public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS =
6375 "pdp_watchdog_error_poll_interval_ms";
6376
6377 /**
6378 * The number of outgoing packets sent without seeing an incoming packet
6379 * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT}
6380 * device is logged to the event log
6381 * @hide
6382 */
6383 public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT =
6384 "pdp_watchdog_trigger_packet_count";
6385
6386 /**
6387 * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS})
6388 * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before
6389 * attempting data connection recovery.
6390 * @hide
6391 */
6392 public static final String PDP_WATCHDOG_ERROR_POLL_COUNT =
6393 "pdp_watchdog_error_poll_count";
6394
6395 /**
6396 * The number of failed PDP reset attempts before moving to something more
6397 * drastic: re-registering to the network.
6398 * @hide
6399 */
6400 public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT =
6401 "pdp_watchdog_max_pdp_reset_fail_count";
6402
6403 /**
6404 * A positive value indicates how often the SamplingProfiler
6405 * should take snapshots. Zero value means SamplingProfiler
6406 * is disabled.
6407 *
6408 * @hide
6409 */
6410 public static final String SAMPLING_PROFILER_MS = "sampling_profiler_ms";
6411
6412 /**
6413 * URL to open browser on to allow user to manage a prepay account
6414 * @hide
6415 */
6416 public static final String SETUP_PREPAID_DATA_SERVICE_URL =
6417 "setup_prepaid_data_service_url";
6418
6419 /**
6420 * URL to attempt a GET on to see if this is a prepay device
6421 * @hide
6422 */
6423 public static final String SETUP_PREPAID_DETECTION_TARGET_URL =
6424 "setup_prepaid_detection_target_url";
6425
6426 /**
6427 * Host to check for a redirect to after an attempt to GET
6428 * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there,
6429 * this is a prepaid device with zero balance.)
6430 * @hide
6431 */
6432 public static final String SETUP_PREPAID_DETECTION_REDIR_HOST =
6433 "setup_prepaid_detection_redir_host";
6434
6435 /**
Jake Hamby76a61422012-09-06 17:40:21 -07006436 * The interval in milliseconds at which to check the number of SMS sent out without asking
6437 * for use permit, to limit the un-authorized SMS usage.
6438 *
6439 * @hide
6440 */
6441 public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
6442 "sms_outgoing_check_interval_ms";
6443
6444 /**
6445 * The number of outgoing SMS sent without asking for user permit (of {@link
6446 * #SMS_OUTGOING_CHECK_INTERVAL_MS}
6447 *
6448 * @hide
6449 */
6450 public static final String SMS_OUTGOING_CHECK_MAX_COUNT =
6451 "sms_outgoing_check_max_count";
6452
6453 /**
6454 * Used to disable SMS short code confirmation - defaults to true.
Robert Greenwalt026efcc2012-09-24 10:03:21 -07006455 * True indcates we will do the check, etc. Set to false to disable.
Jake Hamby76a61422012-09-06 17:40:21 -07006456 * @see com.android.internal.telephony.SmsUsageMonitor
6457 * @hide
6458 */
6459 public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation";
6460
Robert Greenwalt026efcc2012-09-24 10:03:21 -07006461 /**
6462 * Used to select which country we use to determine premium sms codes.
6463 * One of com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_SIM,
6464 * com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_NETWORK,
6465 * or com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_BOTH.
6466 * @hide
6467 */
6468 public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule";
6469
Jake Hamby76a61422012-09-06 17:40:21 -07006470 /**
JP Abgrall32d1ac4d2014-02-21 12:05:20 -08006471 * Used to select TCP's default initial receiver window size in segments - defaults to a build config value
6472 * @hide
6473 */
6474 public static final String TCP_DEFAULT_INIT_RWND = "tcp_default_init_rwnd";
6475
6476 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006477 * Used to disable Tethering on a device - defaults to true
6478 * @hide
6479 */
6480 public static final String TETHER_SUPPORTED = "tether_supported";
6481
6482 /**
6483 * Used to require DUN APN on the device or not - defaults to a build config value
6484 * which defaults to false
6485 * @hide
6486 */
6487 public static final String TETHER_DUN_REQUIRED = "tether_dun_required";
6488
6489 /**
6490 * Used to hold a gservices-provisioned apn value for DUN. If set, or the
6491 * corresponding build config values are set it will override the APN DB
6492 * values.
6493 * Consists of a comma seperated list of strings:
6494 * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
6495 * note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN"
6496 * @hide
6497 */
6498 public static final String TETHER_DUN_APN = "tether_dun_apn";
6499
6500 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006501 * USB Mass Storage Enabled
6502 */
6503 public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
6504
6505 /**
6506 * If this setting is set (to anything), then all references
6507 * to Gmail on the device must change to Google Mail.
6508 */
6509 public static final String USE_GOOGLE_MAIL = "use_google_mail";
6510
Hui Shu22671772014-10-01 21:41:07 +00006511 /**
6512 * Webview Data reduction proxy key.
6513 * @hide
6514 */
6515 public static final String WEBVIEW_DATA_REDUCTION_PROXY_KEY =
6516 "webview_data_reduction_proxy_key";
6517
Christopher Tate06efb532012-08-24 15:29:27 -07006518 /**
Jeff Brown89d55462012-09-19 11:33:42 -07006519 * Whether Wifi display is enabled/disabled
6520 * 0=disabled. 1=enabled.
6521 * @hide
6522 */
6523 public static final String WIFI_DISPLAY_ON = "wifi_display_on";
6524
6525 /**
Chong Zhang1f3ecaa2013-05-03 15:55:36 -07006526 * Whether Wifi display certification mode is enabled/disabled
6527 * 0=disabled. 1=enabled.
6528 * @hide
6529 */
6530 public static final String WIFI_DISPLAY_CERTIFICATION_ON =
6531 "wifi_display_certification_on";
6532
6533 /**
Chong Zhange38af812013-08-29 17:25:17 -07006534 * WPS Configuration method used by Wifi display, this setting only
6535 * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled).
6536 *
6537 * Possible values are:
6538 *
6539 * WpsInfo.INVALID: use default WPS method chosen by framework
6540 * WpsInfo.PBC : use Push button
6541 * WpsInfo.KEYPAD : use Keypad
6542 * WpsInfo.DISPLAY: use Display
6543 * @hide
6544 */
6545 public static final String WIFI_DISPLAY_WPS_CONFIG =
6546 "wifi_display_wps_config";
6547
6548 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006549 * Whether to notify the user of open networks.
6550 * <p>
6551 * If not connected and the scan results have an open network, we will
6552 * put this notification up. If we attempt to connect to a network or
6553 * the open network(s) disappear, we remove the notification. When we
6554 * show the notification, we will not show it again for
6555 * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time.
6556 */
6557 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
6558 "wifi_networks_available_notification_on";
6559 /**
6560 * {@hide}
6561 */
6562 public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON =
6563 "wimax_networks_available_notification_on";
6564
6565 /**
6566 * Delay (in seconds) before repeating the Wi-Fi networks available notification.
6567 * Connecting to a network will reset the timer.
6568 */
6569 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
6570 "wifi_networks_available_repeat_delay";
6571
6572 /**
Robert Greenwalt3ea0c992013-10-03 21:13:49 +00006573 * 802.11 country code in ISO 3166 format
6574 * @hide
6575 */
6576 public static final String WIFI_COUNTRY_CODE = "wifi_country_code";
6577
6578 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006579 * The interval in milliseconds to issue wake up scans when wifi needs
6580 * to connect. This is necessary to connect to an access point when
6581 * device is on the move and the screen is off.
6582 * @hide
6583 */
6584 public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS =
6585 "wifi_framework_scan_interval_ms";
6586
6587 /**
6588 * The interval in milliseconds after which Wi-Fi is considered idle.
6589 * When idle, it is possible for the device to be switched from Wi-Fi to
6590 * the mobile data network.
6591 * @hide
6592 */
6593 public static final String WIFI_IDLE_MS = "wifi_idle_ms";
6594
6595 /**
6596 * When the number of open networks exceeds this number, the
6597 * least-recently-used excess networks will be removed.
6598 */
6599 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept";
6600
6601 /**
6602 * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this.
6603 */
6604 public static final String WIFI_ON = "wifi_on";
6605
6606 /**
Irfan Sheriff11aefad2013-03-06 07:57:41 -08006607 * Setting to allow scans to be enabled even wifi is turned off for connectivity.
6608 * @hide
6609 */
6610 public static final String WIFI_SCAN_ALWAYS_AVAILABLE =
6611 "wifi_scan_always_enabled";
6612
6613 /**
Wei Wangd91f1932015-03-19 15:09:56 -07006614 * Settings to allow BLE scans to be enabled even when Bluetooth is turned off for
6615 * connectivity.
6616 * @hide
6617 */
6618 public static final String BLE_SCAN_ALWAYS_AVAILABLE =
6619 "ble_scan_always_enabled";
6620
6621 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006622 * Used to save the Wifi_ON state prior to tethering.
6623 * This state will be checked to restore Wifi after
6624 * the user turns off tethering.
6625 *
6626 * @hide
6627 */
6628 public static final String WIFI_SAVED_STATE = "wifi_saved_state";
6629
6630 /**
6631 * The interval in milliseconds to scan as used by the wifi supplicant
6632 * @hide
6633 */
6634 public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS =
6635 "wifi_supplicant_scan_interval_ms";
6636
vandwalle7c3606c2014-03-31 19:12:07 -07006637 /**
6638 * whether frameworks handles wifi auto-join
6639 * @hide
6640 */
6641 public static final String WIFI_ENHANCED_AUTO_JOIN =
6642 "wifi_enhanced_auto_join";
6643
6644 /**
6645 * whether settings show RSSI
6646 * @hide
6647 */
6648 public static final String WIFI_NETWORK_SHOW_RSSI =
6649 "wifi_network_show_rssi";
6650
6651 /**
Irfan Sheriff3809f502012-09-17 16:04:57 -07006652 * The interval in milliseconds to scan at supplicant when p2p is connected
6653 * @hide
6654 */
6655 public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS =
6656 "wifi_scan_interval_p2p_connected_ms";
6657
6658 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006659 * Whether the Wi-Fi watchdog is enabled.
6660 */
6661 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
6662
6663 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006664 * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and
6665 * the setting needs to be set to 0 to disable it.
6666 * @hide
6667 */
6668 public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED =
6669 "wifi_watchdog_poor_network_test_enabled";
6670
6671 /**
6672 * Setting to turn on suspend optimizations at screen off on Wi-Fi. Enabled by default and
6673 * needs to be set to 0 to disable it.
6674 * @hide
6675 */
6676 public static final String WIFI_SUSPEND_OPTIMIZATIONS_ENABLED =
6677 "wifi_suspend_optimizations_enabled";
6678
6679 /**
6680 * The maximum number of times we will retry a connection to an access
6681 * point for which we have failed in acquiring an IP address from DHCP.
6682 * A value of N means that we will make N+1 connection attempts in all.
6683 */
6684 public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
6685
6686 /**
6687 * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile
6688 * data connectivity to be established after a disconnect from Wi-Fi.
6689 */
6690 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
6691 "wifi_mobile_data_transition_wakelock_timeout_ms";
6692
6693 /**
6694 * The operational wifi frequency band
6695 * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO},
6696 * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or
6697 * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ}
6698 *
6699 * @hide
6700 */
6701 public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band";
6702
6703 /**
6704 * The Wi-Fi peer-to-peer device name
6705 * @hide
6706 */
6707 public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name";
6708
6709 /**
Robert Greenwaltc12783a2013-05-16 12:48:20 -07006710 * The min time between wifi disable and wifi enable
6711 * @hide
6712 */
6713 public static final String WIFI_REENABLE_DELAY_MS = "wifi_reenable_delay";
6714
6715 /**
Jeff Davidsona20ca67d2014-12-16 11:48:54 -08006716 * Timeout for ephemeral networks when all known BSSIDs go out of range. We will disconnect
6717 * from an ephemeral network if there is no BSSID for that network with a non-null score that
6718 * has been seen in this time period.
6719 *
6720 * If this is less than or equal to zero, we use a more conservative behavior and only check
6721 * for a non-null score from the currently connected or target BSSID.
6722 * @hide
6723 */
6724 public static final String WIFI_EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS =
6725 "wifi_ephemeral_out_of_range_timeout_ms";
6726
6727 /**
Christopher Tatec868b642012-09-12 17:41:04 -07006728 * The number of milliseconds to delay when checking for data stalls during
6729 * non-aggressive detection. (screen is turned off.)
6730 * @hide
6731 */
6732 public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
6733 "data_stall_alarm_non_aggressive_delay_in_ms";
6734
6735 /**
6736 * The number of milliseconds to delay when checking for data stalls during
6737 * aggressive detection. (screen on or suspected data stall)
6738 * @hide
6739 */
6740 public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
6741 "data_stall_alarm_aggressive_delay_in_ms";
6742
6743 /**
Wink Savillece1e3792013-09-03 16:41:44 -07006744 * The number of milliseconds to allow the provisioning apn to remain active
6745 * @hide
6746 */
6747 public static final String PROVISIONING_APN_ALARM_DELAY_IN_MS =
6748 "provisioning_apn_alarm_delay_in_ms";
6749
6750 /**
Christopher Tatec868b642012-09-12 17:41:04 -07006751 * The interval in milliseconds at which to check gprs registration
6752 * after the first registration mismatch of gprs and voice service,
6753 * to detect possible data network registration problems.
6754 *
6755 * @hide
6756 */
6757 public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
6758 "gprs_register_check_period_ms";
6759
6760 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006761 * Nonzero causes Log.wtf() to crash.
6762 * @hide
6763 */
6764 public static final String WTF_IS_FATAL = "wtf_is_fatal";
6765
Eric Laurentbc0fab1f2012-09-19 11:24:41 -07006766 /**
6767 * Ringer mode. This is used internally, changing this value will not
6768 * change the ringer mode. See AudioManager.
6769 */
6770 public static final String MODE_RINGER = "mode_ringer";
Christopher Tate06efb532012-08-24 15:29:27 -07006771
Jeff Brownd4935962012-09-25 13:27:20 -07006772 /**
6773 * Overlay display devices setting.
6774 * The associated value is a specially formatted string that describes the
6775 * size and density of simulated secondary display devices.
6776 * <p>
6777 * Format: {width}x{height}/{dpi};...
6778 * </p><p>
6779 * Example:
6780 * <ul>
6781 * <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li>
6782 * <li><code>1920x1080/320;1280x720/213</code>: make two overlays, the first
6783 * at 1080p and the second at 720p.</li>
6784 * <li>If the value is empty, then no overlay display devices are created.</li>
6785 * </ul></p>
6786 *
6787 * @hide
6788 */
6789 public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices";
Christopher Tate06efb532012-08-24 15:29:27 -07006790
Jeff Sharkey625239a2012-09-26 22:03:49 -07006791 /**
6792 * Threshold values for the duration and level of a discharge cycle,
6793 * under which we log discharge cycle info.
6794 *
6795 * @hide
6796 */
6797 public static final String
6798 BATTERY_DISCHARGE_DURATION_THRESHOLD = "battery_discharge_duration_threshold";
6799
6800 /** @hide */
6801 public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold";
6802
6803 /**
6804 * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR
6805 * intents on application crashes and ANRs. If this is disabled, the
6806 * crash/ANR dialog will never display the "Report" button.
6807 * <p>
6808 * Type: int (0 = disallow, 1 = allow)
6809 *
6810 * @hide
6811 */
6812 public static final String SEND_ACTION_APP_ERROR = "send_action_app_error";
6813
6814 /**
6815 * Maximum age of entries kept by {@link DropBoxManager}.
6816 *
6817 * @hide
6818 */
6819 public static final String DROPBOX_AGE_SECONDS = "dropbox_age_seconds";
6820
6821 /**
6822 * Maximum number of entry files which {@link DropBoxManager} will keep
6823 * around.
6824 *
6825 * @hide
6826 */
6827 public static final String DROPBOX_MAX_FILES = "dropbox_max_files";
6828
6829 /**
6830 * Maximum amount of disk space used by {@link DropBoxManager} no matter
6831 * what.
6832 *
6833 * @hide
6834 */
6835 public static final String DROPBOX_QUOTA_KB = "dropbox_quota_kb";
6836
6837 /**
6838 * Percent of free disk (excluding reserve) which {@link DropBoxManager}
6839 * will use.
6840 *
6841 * @hide
6842 */
6843 public static final String DROPBOX_QUOTA_PERCENT = "dropbox_quota_percent";
6844
6845 /**
6846 * Percent of total disk which {@link DropBoxManager} will never dip
6847 * into.
6848 *
6849 * @hide
6850 */
6851 public static final String DROPBOX_RESERVE_PERCENT = "dropbox_reserve_percent";
6852
6853 /**
6854 * Prefix for per-tag dropbox disable/enable settings.
6855 *
6856 * @hide
6857 */
6858 public static final String DROPBOX_TAG_PREFIX = "dropbox:";
6859
6860 /**
6861 * Lines of logcat to include with system crash/ANR/etc. reports, as a
6862 * prefix of the dropbox tag of the report type. For example,
6863 * "logcat_for_system_server_anr" controls the lines of logcat captured
6864 * with system server ANR reports. 0 to disable.
6865 *
6866 * @hide
6867 */
6868 public static final String ERROR_LOGCAT_PREFIX = "logcat_for_";
6869
6870 /**
6871 * The interval in minutes after which the amount of free storage left
6872 * on the device is logged to the event log
6873 *
6874 * @hide
6875 */
6876 public static final String SYS_FREE_STORAGE_LOG_INTERVAL = "sys_free_storage_log_interval";
6877
6878 /**
6879 * Threshold for the amount of change in disk free space required to
6880 * report the amount of free space. Used to prevent spamming the logs
6881 * when the disk free space isn't changing frequently.
6882 *
6883 * @hide
6884 */
6885 public static final String
6886 DISK_FREE_CHANGE_REPORTING_THRESHOLD = "disk_free_change_reporting_threshold";
6887
6888 /**
6889 * Minimum percentage of free storage on the device that is used to
6890 * determine if the device is running low on storage. The default is 10.
6891 * <p>
6892 * Say this value is set to 10, the device is considered running low on
6893 * storage if 90% or more of the device storage is filled up.
6894 *
6895 * @hide
6896 */
6897 public static final String
6898 SYS_STORAGE_THRESHOLD_PERCENTAGE = "sys_storage_threshold_percentage";
6899
6900 /**
6901 * Maximum byte size of the low storage threshold. This is to ensure
6902 * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in an
6903 * overly large threshold for large storage devices. Currently this must
6904 * be less than 2GB. This default is 500MB.
6905 *
6906 * @hide
6907 */
6908 public static final String
6909 SYS_STORAGE_THRESHOLD_MAX_BYTES = "sys_storage_threshold_max_bytes";
6910
6911 /**
6912 * Minimum bytes of free storage on the device before the data partition
6913 * is considered full. By default, 1 MB is reserved to avoid system-wide
6914 * SQLite disk full exceptions.
6915 *
6916 * @hide
6917 */
6918 public static final String
6919 SYS_STORAGE_FULL_THRESHOLD_BYTES = "sys_storage_full_threshold_bytes";
6920
6921 /**
6922 * The maximum reconnect delay for short network outages or when the
6923 * network is suspended due to phone use.
6924 *
6925 * @hide
6926 */
6927 public static final String
6928 SYNC_MAX_RETRY_DELAY_IN_SECONDS = "sync_max_retry_delay_in_seconds";
6929
6930 /**
6931 * The number of milliseconds to delay before sending out
Erik Kline8f29dcf2014-12-08 16:25:20 +09006932 * {@link ConnectivityManager#CONNECTIVITY_ACTION} broadcasts. Ignored.
Jeff Sharkey625239a2012-09-26 22:03:49 -07006933 *
6934 * @hide
6935 */
6936 public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay";
6937
Vinit Deshapnde1f12cb52013-08-21 13:09:01 -07006938
6939 /**
6940 * Network sampling interval, in seconds. We'll generate link information
6941 * about bytes/packets sent and error rates based on data sampled in this interval
6942 *
6943 * @hide
6944 */
6945
6946 public static final String CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS =
6947 "connectivity_sampling_interval_in_seconds";
6948
Jeff Sharkey625239a2012-09-26 22:03:49 -07006949 /**
Jason Monk602b2322013-07-03 17:04:33 -04006950 * The series of successively longer delays used in retrying to download PAC file.
6951 * Last delay is used between successful PAC downloads.
6952 *
6953 * @hide
6954 */
6955 public static final String PAC_CHANGE_DELAY = "pac_change_delay";
6956
6957 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07006958 * Setting to turn off captive portal detection. Feature is enabled by
6959 * default and the setting needs to be set to 0 to disable it.
6960 *
6961 * @hide
6962 */
6963 public static final String
6964 CAPTIVE_PORTAL_DETECTION_ENABLED = "captive_portal_detection_enabled";
6965
6966 /**
6967 * The server used for captive portal detection upon a new conection. A
6968 * 204 response code from the server is used for validation.
6969 *
6970 * @hide
6971 */
6972 public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server";
6973
6974 /**
6975 * Whether network service discovery is enabled.
6976 *
6977 * @hide
6978 */
6979 public static final String NSD_ON = "nsd_on";
6980
6981 /**
6982 * Let user pick default install location.
6983 *
6984 * @hide
6985 */
6986 public static final String SET_INSTALL_LOCATION = "set_install_location";
6987
6988 /**
6989 * Default install location value.
6990 * 0 = auto, let system decide
6991 * 1 = internal
6992 * 2 = sdcard
6993 * @hide
6994 */
6995 public static final String DEFAULT_INSTALL_LOCATION = "default_install_location";
6996
6997 /**
6998 * ms during which to consume extra events related to Inet connection
6999 * condition after a transtion to fully-connected
7000 *
7001 * @hide
7002 */
7003 public static final String
7004 INET_CONDITION_DEBOUNCE_UP_DELAY = "inet_condition_debounce_up_delay";
7005
7006 /**
7007 * ms during which to consume extra events related to Inet connection
7008 * condtion after a transtion to partly-connected
7009 *
7010 * @hide
7011 */
7012 public static final String
7013 INET_CONDITION_DEBOUNCE_DOWN_DELAY = "inet_condition_debounce_down_delay";
7014
7015 /** {@hide} */
7016 public static final String
7017 READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default";
7018
7019 /**
7020 * Host name and port for global http proxy. Uses ':' seperator for
7021 * between host and port.
7022 */
7023 public static final String HTTP_PROXY = "http_proxy";
7024
7025 /**
7026 * Host name for global http proxy. Set via ConnectivityManager.
7027 *
7028 * @hide
7029 */
7030 public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host";
7031
7032 /**
7033 * Integer host port for global http proxy. Set via ConnectivityManager.
7034 *
7035 * @hide
7036 */
7037 public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port";
7038
7039 /**
7040 * Exclusion list for global proxy. This string contains a list of
7041 * comma-separated domains where the global proxy does not apply.
7042 * Domains should be listed in a comma- separated list. Example of
7043 * acceptable formats: ".domain1.com,my.domain2.com" Use
7044 * ConnectivityManager to set/get.
7045 *
7046 * @hide
7047 */
7048 public static final String
7049 GLOBAL_HTTP_PROXY_EXCLUSION_LIST = "global_http_proxy_exclusion_list";
7050
7051 /**
Jason Monk602b2322013-07-03 17:04:33 -04007052 * The location PAC File for the proxy.
7053 * @hide
7054 */
7055 public static final String
7056 GLOBAL_HTTP_PROXY_PAC = "global_proxy_pac_url";
7057
7058 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07007059 * Enables the UI setting to allow the user to specify the global HTTP
7060 * proxy and associated exclusion list.
7061 *
7062 * @hide
7063 */
7064 public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy";
7065
7066 /**
7067 * Setting for default DNS in case nobody suggests one
7068 *
7069 * @hide
7070 */
7071 public static final String DEFAULT_DNS_SERVER = "default_dns_server";
7072
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007073 /** {@hide} */
7074 public static final String
7075 BLUETOOTH_HEADSET_PRIORITY_PREFIX = "bluetooth_headset_priority_";
7076 /** {@hide} */
7077 public static final String
7078 BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX = "bluetooth_a2dp_sink_priority_";
7079 /** {@hide} */
7080 public static final String
7081 BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX = "bluetooth_input_device_priority_";
Kim Schulz0d376052013-08-22 11:18:02 +02007082 /** {@hide} */
7083 public static final String
7084 BLUETOOTH_MAP_PRIORITY_PREFIX = "bluetooth_map_priority_";
Casper Bonde2a5f6082015-03-19 10:36:45 +01007085 /** {@hide} */
7086 public static final String
7087 BLUETOOTH_SAP_PRIORITY_PREFIX = "bluetooth_sap_priority_";
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007088
7089 /**
7090 * Get the key that retrieves a bluetooth headset's priority.
7091 * @hide
7092 */
7093 public static final String getBluetoothHeadsetPriorityKey(String address) {
Elliott Hughescb64d432013-08-02 10:00:44 -07007094 return BLUETOOTH_HEADSET_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007095 }
7096
7097 /**
7098 * Get the key that retrieves a bluetooth a2dp sink's priority.
7099 * @hide
7100 */
7101 public static final String getBluetoothA2dpSinkPriorityKey(String address) {
Elliott Hughescb64d432013-08-02 10:00:44 -07007102 return BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007103 }
7104
7105 /**
7106 * Get the key that retrieves a bluetooth Input Device's priority.
7107 * @hide
7108 */
7109 public static final String getBluetoothInputDevicePriorityKey(String address) {
Elliott Hughescb64d432013-08-02 10:00:44 -07007110 return BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007111 }
7112
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007113 /**
Kim Schulz0d376052013-08-22 11:18:02 +02007114 * Get the key that retrieves a bluetooth map priority.
7115 * @hide
7116 */
7117 public static final String getBluetoothMapPriorityKey(String address) {
7118 return BLUETOOTH_MAP_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
7119 }
Casper Bonde2a5f6082015-03-19 10:36:45 +01007120
7121 /**
7122 * Get the key that retrieves a bluetooth map priority.
7123 * @hide
7124 */
7125 public static final String getBluetoothSapPriorityKey(String address) {
7126 return BLUETOOTH_SAP_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
7127 }
7128
Kim Schulz0d376052013-08-22 11:18:02 +02007129 /**
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007130 * Scaling factor for normal window animations. Setting to 0 will
7131 * disable window animations.
7132 */
7133 public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale";
7134
7135 /**
7136 * Scaling factor for activity transition animations. Setting to 0 will
7137 * disable window animations.
7138 */
7139 public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale";
7140
7141 /**
7142 * Scaling factor for Animator-based animations. This affects both the
7143 * start delay and duration of all such animations. Setting to 0 will
7144 * cause animations to end immediately. The default value is 1.
7145 */
7146 public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale";
7147
7148 /**
7149 * Scaling factor for normal window animations. Setting to 0 will
7150 * disable window animations.
7151 *
7152 * @hide
7153 */
7154 public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations";
7155
7156 /**
7157 * If 0, the compatibility mode is off for all applications.
7158 * If 1, older applications run under compatibility mode.
7159 * TODO: remove this settings before code freeze (bug/1907571)
7160 * @hide
7161 */
7162 public static final String COMPATIBILITY_MODE = "compatibility_mode";
7163
7164 /**
7165 * CDMA only settings
7166 * Emergency Tone 0 = Off
7167 * 1 = Alert
7168 * 2 = Vibrate
7169 * @hide
7170 */
7171 public static final String EMERGENCY_TONE = "emergency_tone";
7172
7173 /**
7174 * CDMA only settings
7175 * Whether the auto retry is enabled. The value is
7176 * boolean (1 or 0).
7177 * @hide
7178 */
7179 public static final String CALL_AUTO_RETRY = "call_auto_retry";
7180
7181 /**
Sungmin Choie099ab12014-06-09 14:45:51 +09007182 * See RIL_PreferredNetworkType in ril.h
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007183 * @hide
7184 */
7185 public static final String PREFERRED_NETWORK_MODE =
7186 "preferred_network_mode";
7187
7188 /**
Junda Liubbdc1c02014-11-07 11:18:02 -08007189 * Setting to 1 will hide carrier network settings.
7190 * Default is 0.
Junda Liubbdc1c02014-11-07 11:18:02 -08007191 */
7192 public static final String HIDE_CARRIER_NETWORK_SETTINGS =
7193 "hide_carrier_network_settings";
7194
7195 /**
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007196 * Name of an application package to be debugged.
7197 */
7198 public static final String DEBUG_APP = "debug_app";
7199
7200 /**
7201 * If 1, when launching DEBUG_APP it will wait for the debugger before
7202 * starting user code. If 0, it will run normally.
7203 */
7204 public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger";
7205
7206 /**
7207 * Control whether the process CPU usage meter should be shown.
7208 */
7209 public static final String SHOW_PROCESSES = "show_processes";
7210
7211 /**
Ruchi Kandoi62b8a492014-04-17 18:01:40 -07007212 * If 1 low power mode is enabled.
7213 * @hide
7214 */
7215 public static final String LOW_POWER_MODE = "low_power";
7216
John Spurlockf8f524c2014-06-10 14:47:29 -04007217 /**
7218 * Battery level [1-99] at which low power mode automatically turns on.
Dianne Hackborn14272302014-06-10 23:13:02 -07007219 * If 0, it will not automatically turn on.
John Spurlockf8f524c2014-06-10 14:47:29 -04007220 * @hide
7221 */
7222 public static final String LOW_POWER_MODE_TRIGGER_LEVEL = "low_power_trigger_level";
7223
Ruchi Kandoi62b8a492014-04-17 18:01:40 -07007224 /**
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007225 * If 1, the activity manager will aggressively finish activities and
7226 * processes as soon as they are no longer needed. If 0, the normal
7227 * extended lifetime is used.
7228 */
Dianne Hackborn89ad4562014-08-24 16:45:38 -07007229 public static final String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities";
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007230
Christopher Tate66488d62012-10-02 11:58:01 -07007231 /**
Eric Laurent7ee1e4f2012-10-26 18:11:21 -07007232 * Use Dock audio output for media:
7233 * 0 = disabled
7234 * 1 = enabled
7235 * @hide
7236 */
7237 public static final String DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled";
7238
7239 /**
Eric Laurent05274f32012-11-29 12:48:18 -08007240 * Persisted safe headphone volume management state by AudioService
7241 * @hide
7242 */
7243 public static final String AUDIO_SAFE_VOLUME_STATE = "audio_safe_volume_state";
7244
7245 /**
Geremy Condraa0735112013-03-26 21:49:26 -07007246 * URL for tzinfo (time zone) updates
7247 * @hide
7248 */
7249 public static final String TZINFO_UPDATE_CONTENT_URL = "tzinfo_content_url";
7250
7251 /**
7252 * URL for tzinfo (time zone) update metadata
7253 * @hide
7254 */
7255 public static final String TZINFO_UPDATE_METADATA_URL = "tzinfo_metadata_url";
7256
7257 /**
7258 * URL for selinux (mandatory access control) updates
7259 * @hide
7260 */
7261 public static final String SELINUX_UPDATE_CONTENT_URL = "selinux_content_url";
7262
7263 /**
7264 * URL for selinux (mandatory access control) update metadata
7265 * @hide
7266 */
7267 public static final String SELINUX_UPDATE_METADATA_URL = "selinux_metadata_url";
7268
7269 /**
7270 * URL for sms short code updates
7271 * @hide
7272 */
7273 public static final String SMS_SHORT_CODES_UPDATE_CONTENT_URL =
7274 "sms_short_codes_content_url";
7275
7276 /**
7277 * URL for sms short code update metadata
7278 * @hide
7279 */
7280 public static final String SMS_SHORT_CODES_UPDATE_METADATA_URL =
7281 "sms_short_codes_metadata_url";
7282
7283 /**
7284 * URL for cert pinlist updates
7285 * @hide
7286 */
7287 public static final String CERT_PIN_UPDATE_CONTENT_URL = "cert_pin_content_url";
7288
7289 /**
7290 * URL for cert pinlist updates
7291 * @hide
7292 */
7293 public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url";
7294
Geremy Condra757ee522013-03-29 16:39:45 -07007295 /**
Ben Gruver633dc9b2013-04-04 12:05:49 -07007296 * URL for intent firewall updates
7297 * @hide
7298 */
7299 public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL =
7300 "intent_firewall_content_url";
7301
7302 /**
7303 * URL for intent firewall update metadata
7304 * @hide
7305 */
7306 public static final String INTENT_FIREWALL_UPDATE_METADATA_URL =
7307 "intent_firewall_metadata_url";
7308
7309 /**
Geremy Condra4e7f7e82013-03-26 21:09:01 -07007310 * SELinux enforcement status. If 0, permissive; if 1, enforcing.
7311 * @hide
7312 */
7313 public static final String SELINUX_STATUS = "selinux_status";
7314
Geremy Condraa0735112013-03-26 21:49:26 -07007315 /**
Amith Yamasanid8415f42013-08-07 20:15:10 -07007316 * Developer setting to force RTL layout.
7317 * @hide
7318 */
7319 public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl";
7320
7321 /**
Daniel Sandlerdea64622013-09-23 16:05:57 -04007322 * Milliseconds after screen-off after which low battery sounds will be silenced.
7323 *
7324 * If zero, battery sounds will always play.
7325 * Defaults to @integer/def_low_battery_sound_timeout in SettingsProvider.
7326 *
7327 * @hide
7328 */
7329 public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout";
7330
7331 /**
Evan Charltoncc7b0432014-01-14 14:47:11 -08007332 * Milliseconds to wait before bouncing Wi-Fi after settings is restored. Note that after
Dianne Hackborna3fb40d2014-08-12 15:06:50 -07007333 * the caller is done with this, they should call {@link ContentResolver#delete} to
Evan Charltoncc7b0432014-01-14 14:47:11 -08007334 * clean up any value that they may have written.
7335 *
7336 * @hide
7337 */
7338 public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms";
7339
John Spurlockc6d1c602014-01-17 15:22:06 -05007340 /**
7341 * Defines global runtime overrides to window policy.
7342 *
Jorim Jaggib10e33f2015-02-04 21:57:40 +01007343 * See {@link com.android.server.policy.PolicyControl} for value format.
John Spurlockc6d1c602014-01-17 15:22:06 -05007344 *
7345 * @hide
7346 */
7347 public static final String POLICY_CONTROL = "policy_control";
Evan Charltoncc7b0432014-01-14 14:47:11 -08007348
7349 /**
John Spurlockae641c92014-06-30 18:11:40 -04007350 * Defines global zen mode. ZEN_MODE_OFF, ZEN_MODE_IMPORTANT_INTERRUPTIONS,
7351 * or ZEN_MODE_NO_INTERRUPTIONS.
John Spurlocke677d712014-02-13 12:52:19 -05007352 *
7353 * @hide
7354 */
7355 public static final String ZEN_MODE = "zen_mode";
7356
7357 /** @hide */ public static final int ZEN_MODE_OFF = 0;
John Spurlockae641c92014-06-30 18:11:40 -04007358 /** @hide */ public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
7359 /** @hide */ public static final int ZEN_MODE_NO_INTERRUPTIONS = 2;
John Spurlock4f1163c2015-04-02 17:41:21 -04007360 /** @hide */ public static final int ZEN_MODE_ALARMS = 3;
John Spurlocke677d712014-02-13 12:52:19 -05007361
7362 /** @hide */ public static String zenModeToString(int mode) {
John Spurlockae641c92014-06-30 18:11:40 -04007363 if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS";
John Spurlock4f1163c2015-04-02 17:41:21 -04007364 if (mode == ZEN_MODE_ALARMS) return "ZEN_MODE_ALARMS";
John Spurlockae641c92014-06-30 18:11:40 -04007365 if (mode == ZEN_MODE_NO_INTERRUPTIONS) return "ZEN_MODE_NO_INTERRUPTIONS";
7366 return "ZEN_MODE_OFF";
John Spurlocke677d712014-02-13 12:52:19 -05007367 }
7368
John Spurlockb2278d62015-04-07 12:47:12 -04007369 /** @hide */ public static boolean isValidZenMode(int value) {
7370 switch (value) {
7371 case Global.ZEN_MODE_OFF:
7372 case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
7373 case Global.ZEN_MODE_ALARMS:
7374 case Global.ZEN_MODE_NO_INTERRUPTIONS:
7375 return true;
7376 default:
7377 return false;
7378 }
7379 }
7380
John Spurlocke677d712014-02-13 12:52:19 -05007381 /**
John Spurlock056c5192014-04-20 21:52:01 -04007382 * Opaque value, changes when persisted zen mode configuration changes.
7383 *
7384 * @hide
7385 */
7386 public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag";
7387
7388 /**
Chris Wren7bd241232014-02-28 16:25:05 -05007389 * Defines global heads up toggle. One of HEADS_UP_OFF, HEADS_UP_ON.
7390 *
7391 * @hide
7392 */
Chris Wren10d82df2014-03-01 10:34:51 -05007393 public static final String HEADS_UP_NOTIFICATIONS_ENABLED =
7394 "heads_up_notifications_enabled";
Chris Wren7bd241232014-02-28 16:25:05 -05007395
7396 /** @hide */ public static final int HEADS_UP_OFF = 0;
7397 /** @hide */ public static final int HEADS_UP_ON = 1;
7398
7399 /**
Jerome Poichet147b4d72014-05-12 18:13:27 -07007400 * The name of the device
7401 *
7402 * @hide
7403 */
7404 public static final String DEVICE_NAME = "device_name";
7405
7406 /**
Amith Yamasani1e9c2182014-06-11 17:25:51 -07007407 * Whether it should be possible to create a guest user on the device.
7408 * <p>
7409 * Type: int (0 for disabled, 1 for enabled)
7410 * @hide
7411 */
7412 public static final String GUEST_USER_ENABLED = "guest_user_enabled";
7413
7414 /**
Jeff Davidson56f9f732014-08-14 16:47:23 -07007415 * Whether the NetworkScoringService has been first initialized.
7416 * <p>
7417 * Type: int (0 for false, 1 for true)
7418 * @hide
7419 */
7420 public static final String NETWORK_SCORING_PROVISIONED = "network_scoring_provisioned";
7421
7422 /**
Jim Miller6848dc82014-10-13 18:51:53 -07007423 * Whether the user wants to be prompted for password to decrypt the device on boot.
7424 * This only matters if the storage is encrypted.
7425 * <p>
7426 * Type: int (0 for false, 1 for true)
7427 * @hide
7428 */
7429 public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt";
7430
7431 /**
Libin.Tang@motorola.com0499bb52014-10-10 14:55:57 -05007432 * Whether the Volte/VT is enabled
7433 * <p>
7434 * Type: int (0 for false, 1 for true)
7435 * @hide
7436 */
Etan Cohene41a9cf2014-10-22 10:50:46 -07007437 public static final String ENHANCED_4G_MODE_ENABLED = "volte_vt_enabled";
Libin.Tang@motorola.com0499bb52014-10-10 14:55:57 -05007438
7439 /**
Etan Cohen9c8f21b2014-12-23 15:02:19 -08007440 * Whether WFC is enabled
7441 * <p>
7442 * Type: int (0 for false, 1 for true)
7443 *
7444 * @hide
7445 */
7446 public static final String WFC_IMS_ENABLED = "wfc_ims_enabled";
7447
7448 /**
7449 * WFC Mode.
7450 * <p>
7451 * Type: int - 2=Wi-Fi preferred, 1=Cellular preferred, 0=Wi-Fi only
7452 *
7453 * @hide
7454 */
7455 public static final String WFC_IMS_MODE = "wfc_ims_mode";
7456
7457 /**
7458 * Whether WFC roaming is enabled
7459 * <p>
7460 * Type: int (0 for false, 1 for true)
7461 *
7462 * @hide
7463 */
7464 public static final String WFC_IMS_ROAMING_ENABLED = "wfc_ims_roaming_enabled";
7465
7466 /**
Etan Cohen7ab0ad12014-11-24 11:18:01 -08007467 * Global override to disable VoLTE (independent of user setting)
7468 * <p>
7469 * Type: int (1 for disable VoLTE, 0 to use user configuration)
7470 * @hide
7471 */
7472 public static final String VOLTE_FEATURE_DISABLED = "volte_feature_disabled";
7473
7474 /**
Amit Mahajan4fea0922014-11-18 12:56:28 -08007475 * Whether user can enable/disable LTE as a preferred network. A carrier might control
7476 * this via gservices, OMA-DM, carrier app, etc.
7477 * <p>
7478 * Type: int (0 for false, 1 for true)
7479 * @hide
7480 */
7481 public static final String LTE_SERVICE_FORCED = "lte_service_forced";
7482
7483 /**
Christopher Tate66488d62012-10-02 11:58:01 -07007484 * Settings to backup. This is here so that it's in the same place as the settings
7485 * keys and easy to update.
7486 *
7487 * These keys may be mentioned in the SETTINGS_TO_BACKUP arrays in System
7488 * and Secure as well. This is because those tables drive both backup and
7489 * restore, and restore needs to properly whitelist keys that used to live
7490 * in those namespaces. The keys will only actually be backed up / restored
7491 * if they are also mentioned in this table (Global.SETTINGS_TO_BACKUP).
7492 *
7493 * NOTE: Settings are backed up and restored in the order they appear
7494 * in this array. If you have one setting depending on another,
7495 * make sure that they are ordered appropriately.
7496 *
7497 * @hide
7498 */
7499 public static final String[] SETTINGS_TO_BACKUP = {
Christopher Tate58f41ec2013-01-11 15:40:36 -08007500 BUGREPORT_IN_POWER_MENU,
Christopher Tate66488d62012-10-02 11:58:01 -07007501 STAY_ON_WHILE_PLUGGED_IN,
Christopher Tate66488d62012-10-02 11:58:01 -07007502 AUTO_TIME,
7503 AUTO_TIME_ZONE,
7504 POWER_SOUNDS_ENABLED,
7505 DOCK_SOUNDS_ENABLED,
7506 USB_MASS_STORAGE_ENABLED,
7507 ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED,
7508 WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
7509 WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
Christopher Tate16eb7cd2012-10-09 15:26:30 -07007510 WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED,
Christopher Tate66488d62012-10-02 11:58:01 -07007511 WIFI_NUM_OPEN_NETWORKS_KEPT,
7512 EMERGENCY_TONE,
7513 CALL_AUTO_RETRY,
Amith Yamasani94005242014-10-31 11:35:13 -07007514 DOCK_AUDIO_MEDIA_ENABLED,
7515 LOW_POWER_MODE_TRIGGER_LEVEL
Christopher Tate66488d62012-10-02 11:58:01 -07007516 };
7517
Christopher Tate06efb532012-08-24 15:29:27 -07007518 // Populated lazily, guarded by class object:
Dianne Hackborn139748f2012-09-24 11:36:57 -07007519 private static NameValueCache sNameValueCache = new NameValueCache(
7520 SYS_PROP_SETTING_VERSION,
7521 CONTENT_URI,
7522 CALL_METHOD_GET_GLOBAL,
7523 CALL_METHOD_PUT_GLOBAL);
Christopher Tate06efb532012-08-24 15:29:27 -07007524
Christopher Tateaa036a22014-05-19 16:33:27 -07007525 // Certain settings have been moved from global to the per-user secure namespace
7526 private static final HashSet<String> MOVED_TO_SECURE;
7527 static {
7528 MOVED_TO_SECURE = new HashSet<String>(1);
7529 MOVED_TO_SECURE.add(Settings.Global.INSTALL_NON_MARKET_APPS);
7530 }
7531
Svetoslav683914b2015-01-15 14:22:26 -08007532 /** @hide */
7533 public static void getMovedToSecureSettings(Set<String> outKeySet) {
7534 outKeySet.addAll(MOVED_TO_SECURE);
7535 }
7536
Christopher Tate06efb532012-08-24 15:29:27 -07007537 /**
7538 * Look up a name in the database.
7539 * @param resolver to access the database with
7540 * @param name to look up in the table
7541 * @return the corresponding value, or null if not present
7542 */
Dianne Hackborn139748f2012-09-24 11:36:57 -07007543 public static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07007544 return getStringForUser(resolver, name, UserHandle.myUserId());
7545 }
7546
7547 /** @hide */
Dianne Hackborn139748f2012-09-24 11:36:57 -07007548 public static String getStringForUser(ContentResolver resolver, String name,
Christopher Tate06efb532012-08-24 15:29:27 -07007549 int userHandle) {
Christopher Tateaa036a22014-05-19 16:33:27 -07007550 if (MOVED_TO_SECURE.contains(name)) {
7551 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global"
7552 + " to android.provider.Settings.Secure, returning read-only value.");
7553 return Secure.getStringForUser(resolver, name, userHandle);
7554 }
Christopher Tate06efb532012-08-24 15:29:27 -07007555 return sNameValueCache.getStringForUser(resolver, name, userHandle);
7556 }
7557
7558 /**
7559 * Store a name/value pair into the database.
7560 * @param resolver to access the database with
7561 * @param name to store
7562 * @param value to associate with the name
7563 * @return true if the value was set, false on database errors
7564 */
7565 public static boolean putString(ContentResolver resolver,
7566 String name, String value) {
7567 return putStringForUser(resolver, name, value, UserHandle.myUserId());
7568 }
7569
7570 /** @hide */
7571 public static boolean putStringForUser(ContentResolver resolver,
7572 String name, String value, int userHandle) {
Christopher Tate06efb532012-08-24 15:29:27 -07007573 if (LOCAL_LOGV) {
7574 Log.v(TAG, "Global.putString(name=" + name + ", value=" + value
7575 + " for " + userHandle);
7576 }
Christopher Tateaa036a22014-05-19 16:33:27 -07007577 // Global and Secure have the same access policy so we can forward writes
7578 if (MOVED_TO_SECURE.contains(name)) {
7579 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global"
7580 + " to android.provider.Settings.Secure, value is unchanged.");
7581 return Secure.putStringForUser(resolver, name, value, userHandle);
7582 }
Christopher Tate06efb532012-08-24 15:29:27 -07007583 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
7584 }
7585
7586 /**
7587 * Construct the content URI for a particular name/value pair,
7588 * useful for monitoring changes with a ContentObserver.
7589 * @param name to look up in the table
7590 * @return the corresponding content URI, or null if not present
7591 */
7592 public static Uri getUriFor(String name) {
7593 return getUriFor(CONTENT_URI, name);
7594 }
7595
7596 /**
7597 * Convenience function for retrieving a single secure settings value
7598 * as an integer. Note that internally setting values are always
7599 * stored as strings; this function converts the string to an integer
7600 * for you. The default value will be returned if the setting is
7601 * not defined or not an integer.
7602 *
7603 * @param cr The ContentResolver to access.
7604 * @param name The name of the setting to retrieve.
7605 * @param def Value to return if the setting is not defined.
7606 *
7607 * @return The setting's current value, or 'def' if it is not defined
7608 * or not a valid integer.
7609 */
7610 public static int getInt(ContentResolver cr, String name, int def) {
7611 String v = getString(cr, name);
7612 try {
7613 return v != null ? Integer.parseInt(v) : def;
7614 } catch (NumberFormatException e) {
7615 return def;
7616 }
7617 }
7618
7619 /**
7620 * Convenience function for retrieving a single secure settings value
7621 * as an integer. Note that internally setting values are always
7622 * stored as strings; this function converts the string to an integer
7623 * for you.
7624 * <p>
7625 * This version does not take a default value. If the setting has not
7626 * been set, or the string value is not a number,
7627 * it throws {@link SettingNotFoundException}.
7628 *
7629 * @param cr The ContentResolver to access.
7630 * @param name The name of the setting to retrieve.
7631 *
7632 * @throws SettingNotFoundException Thrown if a setting by the given
7633 * name can't be found or the setting value is not an integer.
7634 *
7635 * @return The setting's current value.
7636 */
7637 public static int getInt(ContentResolver cr, String name)
7638 throws SettingNotFoundException {
7639 String v = getString(cr, name);
7640 try {
7641 return Integer.parseInt(v);
7642 } catch (NumberFormatException e) {
7643 throw new SettingNotFoundException(name);
7644 }
7645 }
7646
7647 /**
7648 * Convenience function for updating a single settings value as an
7649 * integer. This will either create a new entry in the table if the
7650 * given name does not exist, or modify the value of the existing row
7651 * with that name. Note that internally setting values are always
7652 * stored as strings, so this function converts the given value to a
7653 * string before storing it.
7654 *
7655 * @param cr The ContentResolver to access.
7656 * @param name The name of the setting to modify.
7657 * @param value The new value for the setting.
7658 * @return true if the value was set, false on database errors
7659 */
7660 public static boolean putInt(ContentResolver cr, String name, int value) {
7661 return putString(cr, name, Integer.toString(value));
7662 }
7663
7664 /**
7665 * Convenience function for retrieving a single secure settings value
7666 * as a {@code long}. Note that internally setting values are always
7667 * stored as strings; this function converts the string to a {@code long}
7668 * for you. The default value will be returned if the setting is
7669 * not defined or not a {@code long}.
7670 *
7671 * @param cr The ContentResolver to access.
7672 * @param name The name of the setting to retrieve.
7673 * @param def Value to return if the setting is not defined.
7674 *
7675 * @return The setting's current value, or 'def' if it is not defined
7676 * or not a valid {@code long}.
7677 */
7678 public static long getLong(ContentResolver cr, String name, long def) {
7679 String valString = getString(cr, name);
7680 long value;
7681 try {
7682 value = valString != null ? Long.parseLong(valString) : def;
7683 } catch (NumberFormatException e) {
7684 value = def;
7685 }
7686 return value;
7687 }
7688
7689 /**
7690 * Convenience function for retrieving a single secure settings value
7691 * as a {@code long}. Note that internally setting values are always
7692 * stored as strings; this function converts the string to a {@code long}
7693 * for you.
7694 * <p>
7695 * This version does not take a default value. If the setting has not
7696 * been set, or the string value is not a number,
7697 * it throws {@link SettingNotFoundException}.
7698 *
7699 * @param cr The ContentResolver to access.
7700 * @param name The name of the setting to retrieve.
7701 *
7702 * @return The setting's current value.
7703 * @throws SettingNotFoundException Thrown if a setting by the given
7704 * name can't be found or the setting value is not an integer.
7705 */
7706 public static long getLong(ContentResolver cr, String name)
7707 throws SettingNotFoundException {
7708 String valString = getString(cr, name);
7709 try {
7710 return Long.parseLong(valString);
7711 } catch (NumberFormatException e) {
7712 throw new SettingNotFoundException(name);
7713 }
7714 }
7715
7716 /**
7717 * Convenience function for updating a secure settings value as a long
7718 * integer. This will either create a new entry in the table if the
7719 * given name does not exist, or modify the value of the existing row
7720 * with that name. Note that internally setting values are always
7721 * stored as strings, so this function converts the given value to a
7722 * string before storing it.
7723 *
7724 * @param cr The ContentResolver to access.
7725 * @param name The name of the setting to modify.
7726 * @param value The new value for the setting.
7727 * @return true if the value was set, false on database errors
7728 */
7729 public static boolean putLong(ContentResolver cr, String name, long value) {
7730 return putString(cr, name, Long.toString(value));
7731 }
7732
7733 /**
7734 * Convenience function for retrieving a single secure settings value
7735 * as a floating point number. Note that internally setting values are
7736 * always stored as strings; this function converts the string to an
7737 * float for you. The default value will be returned if the setting
7738 * is not defined or not a valid float.
7739 *
7740 * @param cr The ContentResolver to access.
7741 * @param name The name of the setting to retrieve.
7742 * @param def Value to return if the setting is not defined.
7743 *
7744 * @return The setting's current value, or 'def' if it is not defined
7745 * or not a valid float.
7746 */
7747 public static float getFloat(ContentResolver cr, String name, float def) {
7748 String v = getString(cr, name);
7749 try {
7750 return v != null ? Float.parseFloat(v) : def;
7751 } catch (NumberFormatException e) {
7752 return def;
7753 }
7754 }
7755
7756 /**
7757 * Convenience function for retrieving a single secure settings value
7758 * as a float. Note that internally setting values are always
7759 * stored as strings; this function converts the string to a float
7760 * for you.
7761 * <p>
7762 * This version does not take a default value. If the setting has not
7763 * been set, or the string value is not a number,
7764 * it throws {@link SettingNotFoundException}.
7765 *
7766 * @param cr The ContentResolver to access.
7767 * @param name The name of the setting to retrieve.
7768 *
7769 * @throws SettingNotFoundException Thrown if a setting by the given
7770 * name can't be found or the setting value is not a float.
7771 *
7772 * @return The setting's current value.
7773 */
7774 public static float getFloat(ContentResolver cr, String name)
7775 throws SettingNotFoundException {
7776 String v = getString(cr, name);
7777 if (v == null) {
7778 throw new SettingNotFoundException(name);
7779 }
7780 try {
7781 return Float.parseFloat(v);
7782 } catch (NumberFormatException e) {
7783 throw new SettingNotFoundException(name);
7784 }
7785 }
7786
7787 /**
7788 * Convenience function for updating a single settings value as a
7789 * floating point number. This will either create a new entry in the
7790 * table if the given name does not exist, or modify the value of the
7791 * existing row with that name. Note that internally setting values
7792 * are always stored as strings, so this function converts the given
7793 * value to a string before storing it.
7794 *
7795 * @param cr The ContentResolver to access.
7796 * @param name The name of the setting to modify.
7797 * @param value The new value for the setting.
7798 * @return true if the value was set, false on database errors
7799 */
7800 public static boolean putFloat(ContentResolver cr, String name, float value) {
7801 return putString(cr, name, Float.toString(value));
7802 }
Wink Savillefb40dd42014-06-12 17:02:31 -07007803
7804
7805 /**
7806 * Subscription to be used for voice call on a multi sim device. The supported values
7807 * are 0 = SUB1, 1 = SUB2 and etc.
7808 * @hide
7809 */
7810 public static final String MULTI_SIM_VOICE_CALL_SUBSCRIPTION = "multi_sim_voice_call";
7811
7812 /**
7813 * Used to provide option to user to select subscription during dial.
7814 * The supported values are 0 = disable or 1 = enable prompt.
7815 * @hide
7816 */
7817 public static final String MULTI_SIM_VOICE_PROMPT = "multi_sim_voice_prompt";
7818
7819 /**
7820 * Subscription to be used for data call on a multi sim device. The supported values
7821 * are 0 = SUB1, 1 = SUB2 and etc.
7822 * @hide
7823 */
7824 public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call";
7825
7826 /**
7827 * Subscription to be used for SMS on a multi sim device. The supported values
7828 * are 0 = SUB1, 1 = SUB2 and etc.
7829 * @hide
7830 */
7831 public static final String MULTI_SIM_SMS_SUBSCRIPTION = "multi_sim_sms";
7832
7833 /**
7834 * Used to provide option to user to select subscription during send SMS.
7835 * The value 1 - enable, 0 - disable
7836 * @hide
7837 */
7838 public static final String MULTI_SIM_SMS_PROMPT = "multi_sim_sms_prompt";
7839
7840
7841
7842 /** User preferred subscriptions setting.
7843 * This holds the details of the user selected subscription from the card and
7844 * the activation status. Each settings string have the coma separated values
7845 * iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index
7846 * @hide
7847 */
7848 public static final String[] MULTI_SIM_USER_PREFERRED_SUBS = {"user_preferred_sub1",
7849 "user_preferred_sub2","user_preferred_sub3"};
Zheng Fub218ff42015-04-13 16:31:16 -07007850
7851 /**
7852 * Whether to enable new contacts aggregator or not.
7853 * The value 1 - enable, 0 - disable
7854 * @hide
7855 */
7856 public static final String NEW_CONTACT_AGGREGATOR = "new_contact_aggregator";
Zheng Fu31ce78c2015-04-15 16:57:53 -07007857
7858 /**
7859 * Whether to enable contacts metadata syncing or not
7860 * The value 1 - enable, 0 - disable
7861 * @hide
7862 */
7863 public static final String CONTACT_METADATA_SYNC = "contact_metadata_sync";
Christopher Tate06efb532012-08-24 15:29:27 -07007864 }
7865
7866 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08007867 * User-defined bookmarks and shortcuts. The target of each bookmark is an
7868 * Intent URL, allowing it to be either a web page or a particular
7869 * application activity.
7870 *
7871 * @hide
7872 */
7873 public static final class Bookmarks implements BaseColumns
7874 {
7875 private static final String TAG = "Bookmarks";
7876
7877 /**
7878 * The content:// style URL for this table
7879 */
7880 public static final Uri CONTENT_URI =
7881 Uri.parse("content://" + AUTHORITY + "/bookmarks");
7882
7883 /**
7884 * The row ID.
7885 * <p>Type: INTEGER</p>
7886 */
7887 public static final String ID = "_id";
7888
7889 /**
7890 * Descriptive name of the bookmark that can be displayed to the user.
7891 * If this is empty, the title should be resolved at display time (use
7892 * {@link #getTitle(Context, Cursor)} any time you want to display the
7893 * title of a bookmark.)
7894 * <P>
7895 * Type: TEXT
7896 * </P>
7897 */
7898 public static final String TITLE = "title";
7899
7900 /**
7901 * Arbitrary string (displayed to the user) that allows bookmarks to be
7902 * organized into categories. There are some special names for
7903 * standard folders, which all start with '@'. The label displayed for
7904 * the folder changes with the locale (via {@link #getLabelForFolder}) but
7905 * the folder name does not change so you can consistently query for
7906 * the folder regardless of the current locale.
7907 *
7908 * <P>Type: TEXT</P>
7909 *
7910 */
7911 public static final String FOLDER = "folder";
7912
7913 /**
7914 * The Intent URL of the bookmark, describing what it points to. This
7915 * value is given to {@link android.content.Intent#getIntent} to create
7916 * an Intent that can be launched.
7917 * <P>Type: TEXT</P>
7918 */
7919 public static final String INTENT = "intent";
7920
7921 /**
7922 * Optional shortcut character associated with this bookmark.
7923 * <P>Type: INTEGER</P>
7924 */
7925 public static final String SHORTCUT = "shortcut";
7926
7927 /**
7928 * The order in which the bookmark should be displayed
7929 * <P>Type: INTEGER</P>
7930 */
7931 public static final String ORDERING = "ordering";
7932
7933 private static final String[] sIntentProjection = { INTENT };
7934 private static final String[] sShortcutProjection = { ID, SHORTCUT };
7935 private static final String sShortcutSelection = SHORTCUT + "=?";
7936
7937 /**
7938 * Convenience function to retrieve the bookmarked Intent for a
7939 * particular shortcut key.
7940 *
7941 * @param cr The ContentResolver to query.
7942 * @param shortcut The shortcut key.
7943 *
7944 * @return Intent The bookmarked URL, or null if there is no bookmark
7945 * matching the given shortcut.
7946 */
7947 public static Intent getIntentForShortcut(ContentResolver cr, char shortcut)
7948 {
7949 Intent intent = null;
7950
7951 Cursor c = cr.query(CONTENT_URI,
7952 sIntentProjection, sShortcutSelection,
7953 new String[] { String.valueOf((int) shortcut) }, ORDERING);
7954 // Keep trying until we find a valid shortcut
7955 try {
7956 while (intent == null && c.moveToNext()) {
7957 try {
7958 String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT));
Christian Mehlmauera34d2c92010-05-25 19:04:20 +02007959 intent = Intent.parseUri(intentURI, 0);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08007960 } catch (java.net.URISyntaxException e) {
7961 // The stored URL is bad... ignore it.
7962 } catch (IllegalArgumentException e) {
7963 // Column not found
Dianne Hackborna33e3f72009-09-29 17:28:24 -07007964 Log.w(TAG, "Intent column not found", e);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08007965 }
7966 }
7967 } finally {
7968 if (c != null) c.close();
7969 }
7970
7971 return intent;
7972 }
7973
7974 /**
7975 * Add a new bookmark to the system.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07007976 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08007977 * @param cr The ContentResolver to query.
7978 * @param intent The desired target of the bookmark.
7979 * @param title Bookmark title that is shown to the user; null if none
7980 * or it should be resolved to the intent's title.
7981 * @param folder Folder in which to place the bookmark; null if none.
7982 * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If
7983 * this is non-zero and there is an existing bookmark entry
7984 * with this same shortcut, then that existing shortcut is
7985 * cleared (the bookmark is not removed).
7986 * @return The unique content URL for the new bookmark entry.
7987 */
7988 public static Uri add(ContentResolver cr,
7989 Intent intent,
7990 String title,
7991 String folder,
7992 char shortcut,
7993 int ordering)
7994 {
7995 // If a shortcut is supplied, and it is already defined for
7996 // another bookmark, then remove the old definition.
7997 if (shortcut != 0) {
Jeff Hamilton7cd51ef2010-05-12 17:30:27 -05007998 cr.delete(CONTENT_URI, sShortcutSelection,
7999 new String[] { String.valueOf((int) shortcut) });
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008000 }
8001
8002 ContentValues values = new ContentValues();
8003 if (title != null) values.put(TITLE, title);
8004 if (folder != null) values.put(FOLDER, folder);
Jean-Baptiste Queru3b9f0a32010-06-21 13:46:59 -07008005 values.put(INTENT, intent.toUri(0));
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008006 if (shortcut != 0) values.put(SHORTCUT, (int) shortcut);
8007 values.put(ORDERING, ordering);
8008 return cr.insert(CONTENT_URI, values);
8009 }
8010
8011 /**
8012 * Return the folder name as it should be displayed to the user. This
8013 * takes care of localizing special folders.
8014 *
8015 * @param r Resources object for current locale; only need access to
8016 * system resources.
8017 * @param folder The value found in the {@link #FOLDER} column.
8018 *
8019 * @return CharSequence The label for this folder that should be shown
8020 * to the user.
8021 */
8022 public static CharSequence getLabelForFolder(Resources r, String folder) {
8023 return folder;
8024 }
8025
8026 /**
8027 * Return the title as it should be displayed to the user. This takes
8028 * care of localizing bookmarks that point to activities.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008029 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008030 * @param context A context.
8031 * @param cursor A cursor pointing to the row whose title should be
8032 * returned. The cursor must contain at least the {@link #TITLE}
8033 * and {@link #INTENT} columns.
8034 * @return A title that is localized and can be displayed to the user,
8035 * or the empty string if one could not be found.
8036 */
8037 public static CharSequence getTitle(Context context, Cursor cursor) {
8038 int titleColumn = cursor.getColumnIndex(TITLE);
8039 int intentColumn = cursor.getColumnIndex(INTENT);
8040 if (titleColumn == -1 || intentColumn == -1) {
8041 throw new IllegalArgumentException(
8042 "The cursor must contain the TITLE and INTENT columns.");
8043 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008044
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008045 String title = cursor.getString(titleColumn);
8046 if (!TextUtils.isEmpty(title)) {
8047 return title;
8048 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008049
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008050 String intentUri = cursor.getString(intentColumn);
8051 if (TextUtils.isEmpty(intentUri)) {
8052 return "";
8053 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008054
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008055 Intent intent;
8056 try {
Christian Mehlmauera34d2c92010-05-25 19:04:20 +02008057 intent = Intent.parseUri(intentUri, 0);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008058 } catch (URISyntaxException e) {
8059 return "";
8060 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008061
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008062 PackageManager packageManager = context.getPackageManager();
8063 ResolveInfo info = packageManager.resolveActivity(intent, 0);
8064 return info != null ? info.loadLabel(packageManager) : "";
8065 }
8066 }
8067
8068 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008069 * Returns the device ID that we should use when connecting to the mobile gtalk server.
8070 * This is a string like "android-0x1242", where the hex string is the Android ID obtained
8071 * from the GoogleLoginService.
8072 *
8073 * @param androidId The Android ID for this device.
8074 * @return The device ID that should be used when connecting to the mobile gtalk server.
8075 * @hide
8076 */
8077 public static String getGTalkDeviceId(long androidId) {
8078 return "android-" + Long.toHexString(androidId);
8079 }
8080}