blob: 2cda5a881359b62fbba44e0ab48920eebe03addb [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;
Narayan Kamathee69ff42011-06-28 12:07:18 +010021import android.app.SearchManager;
Mike LeBeau5d34e9b2010-02-10 19:34:56 -080022import android.content.ComponentName;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080023import android.content.ContentResolver;
24import android.content.ContentValues;
25import android.content.Context;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -080026import android.content.IContentProvider;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080027import android.content.Intent;
Dianne Hackbornb8b11a02010-03-10 15:53:11 -080028import android.content.pm.ActivityInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080029import android.content.pm.PackageManager;
30import android.content.pm.ResolveInfo;
31import android.content.res.Configuration;
32import android.content.res.Resources;
33import android.database.Cursor;
34import android.database.SQLException;
35import android.net.Uri;
Irfan Sheriff36f74132010-11-04 16:57:37 -070036import android.net.wifi.WifiManager;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070037import android.os.BatteryManager;
38import android.os.Bundle;
Amith Yamasani52c489c2012-03-28 11:42:42 -070039import android.os.IBinder;
Amith Yamasani7ab8c4a2012-04-06 09:27:12 -070040import android.os.Process;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070041import android.os.RemoteException;
Amith Yamasani52c489c2012-03-28 11:42:42 -070042import android.os.ServiceManager;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070043import android.os.SystemProperties;
Dianne Hackbornf02b60a2012-08-16 10:48:27 -070044import android.os.UserHandle;
Narayan Kamath6d632962011-08-24 11:51:37 +010045import android.speech.tts.TextToSpeech;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080046import android.text.TextUtils;
47import android.util.AndroidException;
48import android.util.Log;
Gilles Debunnee90bed12011-08-30 14:28:27 -070049import android.view.WindowOrientationListener;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080050
Amith Yamasani52c489c2012-03-28 11:42:42 -070051import com.android.internal.widget.ILockSettings;
52
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080053import java.net.URISyntaxException;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080054import java.util.HashMap;
55import java.util.HashSet;
56
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080057/**
58 * The Settings provider contains global system-level device preferences.
59 */
60public final class Settings {
61
62 // Intent actions for Settings
63
64 /**
65 * Activity Action: Show system settings.
66 * <p>
67 * Input: Nothing.
68 * <p>
Gilles Debunnee90bed12011-08-30 14:28:27 -070069 * Output: Nothing.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080070 */
71 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
72 public static final String ACTION_SETTINGS = "android.settings.SETTINGS";
73
74 /**
75 * Activity Action: Show settings to allow configuration of APNs.
76 * <p>
77 * Input: Nothing.
78 * <p>
Gilles Debunnee90bed12011-08-30 14:28:27 -070079 * Output: Nothing.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080080 */
81 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
82 public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS";
83
84 /**
85 * Activity Action: Show settings to allow configuration of current location
86 * sources.
87 * <p>
88 * In some cases, a matching Activity may not exist, so ensure you
89 * safeguard against this.
90 * <p>
91 * Input: Nothing.
92 * <p>
93 * Output: Nothing.
94 */
95 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
96 public static final String ACTION_LOCATION_SOURCE_SETTINGS =
97 "android.settings.LOCATION_SOURCE_SETTINGS";
98
99 /**
100 * Activity Action: Show settings to allow configuration of wireless controls
101 * such as Wi-Fi, Bluetooth and Mobile networks.
102 * <p>
103 * In some cases, a matching Activity may not exist, so ensure you
104 * safeguard against this.
105 * <p>
106 * Input: Nothing.
107 * <p>
108 * Output: Nothing.
109 */
110 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
111 public static final String ACTION_WIRELESS_SETTINGS =
112 "android.settings.WIRELESS_SETTINGS";
113
114 /**
115 * Activity Action: Show settings to allow entering/exiting airplane mode.
116 * <p>
117 * In some cases, a matching Activity may not exist, so ensure you
118 * safeguard against this.
119 * <p>
120 * Input: Nothing.
121 * <p>
122 * Output: Nothing.
123 */
124 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
125 public static final String ACTION_AIRPLANE_MODE_SETTINGS =
126 "android.settings.AIRPLANE_MODE_SETTINGS";
127
128 /**
Dianne Hackborndd9b82c2009-09-03 00:18:47 -0700129 * Activity Action: Show settings for accessibility modules.
130 * <p>
131 * In some cases, a matching Activity may not exist, so ensure you
132 * safeguard against this.
133 * <p>
134 * Input: Nothing.
135 * <p>
136 * Output: Nothing.
137 */
138 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
139 public static final String ACTION_ACCESSIBILITY_SETTINGS =
140 "android.settings.ACCESSIBILITY_SETTINGS";
141
142 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800143 * Activity Action: Show settings to allow configuration of security and
144 * location privacy.
145 * <p>
146 * In some cases, a matching Activity may not exist, so ensure you
147 * safeguard against this.
148 * <p>
149 * Input: Nothing.
150 * <p>
151 * Output: Nothing.
152 */
153 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
154 public static final String ACTION_SECURITY_SETTINGS =
155 "android.settings.SECURITY_SETTINGS";
156
157 /**
Amith Yamasanic15255a2009-09-23 15:33:19 -0700158 * Activity Action: Show settings to allow configuration of privacy options.
159 * <p>
160 * In some cases, a matching Activity may not exist, so ensure you
161 * safeguard against this.
162 * <p>
163 * Input: Nothing.
164 * <p>
165 * Output: Nothing.
166 */
167 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
168 public static final String ACTION_PRIVACY_SETTINGS =
169 "android.settings.PRIVACY_SETTINGS";
170
171 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800172 * Activity Action: Show settings to allow configuration of Wi-Fi.
173
174 * <p>
175 * In some cases, a matching Activity may not exist, so ensure you
176 * safeguard against this.
177 * <p>
178 * Input: Nothing.
179 * <p>
180 * Output: Nothing.
181
182 */
183 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
184 public static final String ACTION_WIFI_SETTINGS =
185 "android.settings.WIFI_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700186
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800187 /**
188 * Activity Action: Show settings to allow configuration of a static IP
189 * address for Wi-Fi.
190 * <p>
191 * In some cases, a matching Activity may not exist, so ensure you safeguard
192 * against this.
193 * <p>
194 * Input: Nothing.
195 * <p>
196 * Output: Nothing.
197 */
198 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
199 public static final String ACTION_WIFI_IP_SETTINGS =
200 "android.settings.WIFI_IP_SETTINGS";
201
202 /**
203 * Activity Action: Show settings to allow configuration of Bluetooth.
204 * <p>
205 * In some cases, a matching Activity may not exist, so ensure you
206 * safeguard against this.
207 * <p>
208 * Input: Nothing.
209 * <p>
210 * Output: Nothing.
211 */
212 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
213 public static final String ACTION_BLUETOOTH_SETTINGS =
214 "android.settings.BLUETOOTH_SETTINGS";
215
216 /**
217 * Activity Action: Show settings to allow configuration of date and time.
218 * <p>
219 * In some cases, a matching Activity may not exist, so ensure you
220 * safeguard against this.
221 * <p>
222 * Input: Nothing.
223 * <p>
224 * Output: Nothing.
225 */
226 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
227 public static final String ACTION_DATE_SETTINGS =
228 "android.settings.DATE_SETTINGS";
229
230 /**
231 * Activity Action: Show settings to allow configuration of sound and volume.
232 * <p>
233 * In some cases, a matching Activity may not exist, so ensure you
234 * safeguard against this.
235 * <p>
236 * Input: Nothing.
237 * <p>
238 * Output: Nothing.
239 */
240 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
241 public static final String ACTION_SOUND_SETTINGS =
242 "android.settings.SOUND_SETTINGS";
243
244 /**
245 * Activity Action: Show settings to allow configuration of display.
246 * <p>
247 * In some cases, a matching Activity may not exist, so ensure you
248 * safeguard against this.
249 * <p>
250 * Input: Nothing.
251 * <p>
252 * Output: Nothing.
253 */
254 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
255 public static final String ACTION_DISPLAY_SETTINGS =
256 "android.settings.DISPLAY_SETTINGS";
257
258 /**
259 * Activity Action: Show settings to allow configuration of locale.
260 * <p>
261 * In some cases, a matching Activity may not exist, so ensure you
262 * safeguard against this.
263 * <p>
264 * Input: Nothing.
265 * <p>
266 * Output: Nothing.
267 */
268 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
269 public static final String ACTION_LOCALE_SETTINGS =
270 "android.settings.LOCALE_SETTINGS";
271
272 /**
273 * Activity Action: Show settings to configure input methods, in particular
274 * allowing the user to enable input methods.
275 * <p>
276 * In some cases, a matching Activity may not exist, so ensure you
277 * safeguard against this.
278 * <p>
279 * Input: Nothing.
280 * <p>
281 * Output: Nothing.
282 */
283 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
284 public static final String ACTION_INPUT_METHOD_SETTINGS =
285 "android.settings.INPUT_METHOD_SETTINGS";
286
287 /**
Tadashi G. Takaokaf49688f2011-01-20 17:56:13 +0900288 * Activity Action: Show settings to enable/disable input method subtypes.
satok86417ea2010-10-27 14:11:03 +0900289 * <p>
290 * In some cases, a matching Activity may not exist, so ensure you
291 * safeguard against this.
292 * <p>
Tadashi G. Takaoka25480202011-01-20 23:13:02 +0900293 * To tell which input method's subtypes are displayed in the settings, add
294 * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id.
295 * If there is no extra in this Intent, subtypes from all installed input methods
296 * will be displayed in the settings.
297 *
298 * @see android.view.inputmethod.InputMethodInfo#getId
299 * <p>
satok86417ea2010-10-27 14:11:03 +0900300 * Input: Nothing.
301 * <p>
302 * Output: Nothing.
303 */
304 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
Tadashi G. Takaokaf49688f2011-01-20 17:56:13 +0900305 public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS =
306 "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS";
satok86417ea2010-10-27 14:11:03 +0900307
308 /**
satok7cfc0ed2011-06-20 21:29:36 +0900309 * Activity Action: Show a dialog to select input method.
310 * <p>
311 * In some cases, a matching Activity may not exist, so ensure you
312 * safeguard against this.
313 * <p>
314 * Input: Nothing.
315 * <p>
316 * Output: Nothing.
317 * @hide
318 */
319 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
320 public static final String ACTION_SHOW_INPUT_METHOD_PICKER =
321 "android.settings.SHOW_INPUT_METHOD_PICKER";
322
323 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800324 * Activity Action: Show settings to manage the user input dictionary.
325 * <p>
326 * In some cases, a matching Activity may not exist, so ensure you
327 * safeguard against this.
328 * <p>
329 * Input: Nothing.
330 * <p>
331 * Output: Nothing.
332 */
333 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
334 public static final String ACTION_USER_DICTIONARY_SETTINGS =
335 "android.settings.USER_DICTIONARY_SETTINGS";
336
337 /**
Gilles Debunnee90bed12011-08-30 14:28:27 -0700338 * Activity Action: Adds a word to the user dictionary.
339 * <p>
340 * In some cases, a matching Activity may not exist, so ensure you
341 * safeguard against this.
342 * <p>
343 * Input: An extra with key <code>word</code> that contains the word
344 * that should be added to the dictionary.
345 * <p>
346 * Output: Nothing.
347 *
348 * @hide
349 */
350 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
351 public static final String ACTION_USER_DICTIONARY_INSERT =
352 "com.android.settings.USER_DICTIONARY_INSERT";
353
354 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800355 * Activity Action: Show settings to allow configuration of application-related settings.
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_APPLICATION_SETTINGS =
366 "android.settings.APPLICATION_SETTINGS";
367
368 /**
369 * Activity Action: Show settings to allow configuration of application
370 * development-related settings.
371 * <p>
372 * In some cases, a matching Activity may not exist, so ensure you safeguard
373 * against this.
374 * <p>
375 * Input: Nothing.
376 * <p>
377 * Output: Nothing.
378 */
379 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
380 public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS =
381 "android.settings.APPLICATION_DEVELOPMENT_SETTINGS";
382
383 /**
384 * Activity Action: Show settings to allow configuration of quick launch shortcuts.
385 * <p>
386 * In some cases, a matching Activity may not exist, so ensure you
387 * safeguard against this.
388 * <p>
389 * Input: Nothing.
390 * <p>
391 * Output: Nothing.
392 */
393 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
394 public static final String ACTION_QUICK_LAUNCH_SETTINGS =
395 "android.settings.QUICK_LAUNCH_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700396
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800397 /**
398 * Activity Action: Show settings to manage installed applications.
399 * <p>
400 * In some cases, a matching Activity may not exist, so ensure you
401 * safeguard against this.
402 * <p>
403 * Input: Nothing.
404 * <p>
405 * Output: Nothing.
406 */
407 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
408 public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS =
409 "android.settings.MANAGE_APPLICATIONS_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700410
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800411 /**
Winson Chung44e8ff92010-09-27 14:36:52 -0700412 * Activity Action: Show settings to manage all applications.
413 * <p>
414 * In some cases, a matching Activity may not exist, so ensure you
415 * safeguard against this.
416 * <p>
417 * Input: Nothing.
418 * <p>
419 * Output: Nothing.
420 */
421 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
422 public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS =
423 "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS";
424
425 /**
Dianne Hackbornb7bb3b32010-06-06 22:47:50 -0700426 * Activity Action: Show screen of details about a particular application.
427 * <p>
428 * In some cases, a matching Activity may not exist, so ensure you
429 * safeguard against this.
430 * <p>
431 * Input: The Intent's data URI specifies the application package name
432 * to be shown, with the "package" scheme. That is "package:com.my.app".
433 * <p>
434 * Output: Nothing.
435 */
436 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
437 public static final String ACTION_APPLICATION_DETAILS_SETTINGS =
438 "android.settings.APPLICATION_DETAILS_SETTINGS";
439
440 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800441 * Activity Action: Show settings for system update functionality.
442 * <p>
443 * In some cases, a matching Activity may not exist, so ensure you
444 * safeguard against this.
445 * <p>
446 * Input: Nothing.
447 * <p>
448 * Output: Nothing.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700449 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800450 * @hide
451 */
452 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
453 public static final String ACTION_SYSTEM_UPDATE_SETTINGS =
454 "android.settings.SYSTEM_UPDATE_SETTINGS";
455
456 /**
457 * Activity Action: Show settings to allow configuration of sync settings.
458 * <p>
459 * In some cases, a matching Activity may not exist, so ensure you
460 * safeguard against this.
461 * <p>
Erikeebc8e22010-02-18 13:27:19 -0800462 * The account types available to add via the add account button may be restricted by adding an
463 * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's
464 * authorities. Only account types which can sync with that content provider will be offered to
465 * the user.
466 * <p>
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800467 * Input: Nothing.
468 * <p>
469 * Output: Nothing.
470 */
471 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
472 public static final String ACTION_SYNC_SETTINGS =
473 "android.settings.SYNC_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700474
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800475 /**
Erikeebc8e22010-02-18 13:27:19 -0800476 * Activity Action: Show add account screen for creating a new account.
477 * <p>
478 * In some cases, a matching Activity may not exist, so ensure you
479 * safeguard against this.
480 * <p>
481 * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES}
482 * extra to the Intent with one or more syncable content provider's authorities. Only account
483 * types which can sync with that content provider will be offered to the user.
484 * <p>
485 * Input: Nothing.
486 * <p>
487 * Output: Nothing.
488 */
489 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
490 public static final String ACTION_ADD_ACCOUNT =
491 "android.settings.ADD_ACCOUNT_SETTINGS";
492
493 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800494 * Activity Action: Show settings for selecting the network operator.
495 * <p>
496 * In some cases, a matching Activity may not exist, so ensure you
497 * safeguard against this.
498 * <p>
499 * Input: Nothing.
500 * <p>
501 * Output: Nothing.
502 */
503 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
504 public static final String ACTION_NETWORK_OPERATOR_SETTINGS =
505 "android.settings.NETWORK_OPERATOR_SETTINGS";
506
507 /**
508 * Activity Action: Show settings for selection of 2G/3G.
509 * <p>
510 * In some cases, a matching Activity may not exist, so ensure you
511 * safeguard against this.
512 * <p>
513 * Input: Nothing.
514 * <p>
515 * Output: Nothing.
516 */
517 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
518 public static final String ACTION_DATA_ROAMING_SETTINGS =
519 "android.settings.DATA_ROAMING_SETTINGS";
520
521 /**
522 * Activity Action: Show settings for internal storage.
523 * <p>
524 * In some cases, a matching Activity may not exist, so ensure you
525 * safeguard against this.
526 * <p>
527 * Input: Nothing.
528 * <p>
529 * Output: Nothing.
530 */
531 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
532 public static final String ACTION_INTERNAL_STORAGE_SETTINGS =
533 "android.settings.INTERNAL_STORAGE_SETTINGS";
534 /**
535 * Activity Action: Show settings for memory card storage.
536 * <p>
537 * In some cases, a matching Activity may not exist, so ensure you
538 * safeguard against this.
539 * <p>
540 * Input: Nothing.
541 * <p>
542 * Output: Nothing.
543 */
544 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
545 public static final String ACTION_MEMORY_CARD_SETTINGS =
546 "android.settings.MEMORY_CARD_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700547
Justin Mattsonef340352010-01-13 21:05:46 -0800548 /**
549 * Activity Action: Show settings for global search.
550 * <p>
551 * In some cases, a matching Activity may not exist, so ensure you
552 * safeguard against this.
553 * <p>
554 * Input: Nothing.
555 * <p>
556 * Output: Nothing
557 */
558 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
559 public static final String ACTION_SEARCH_SETTINGS =
560 "android.search.action.SEARCH_SETTINGS";
561
Daniel Sandler9d8b8762010-01-22 20:50:15 -0500562 /**
563 * Activity Action: Show general device information settings (serial
564 * number, software version, phone number, etc.).
565 * <p>
566 * In some cases, a matching Activity may not exist, so ensure you
567 * safeguard against this.
568 * <p>
569 * Input: Nothing.
570 * <p>
571 * Output: Nothing
572 */
573 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
574 public static final String ACTION_DEVICE_INFO_SETTINGS =
575 "android.settings.DEVICE_INFO_SETTINGS";
576
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500577 /**
Nick Pellycccf01d2011-10-31 14:49:40 -0700578 * Activity Action: Show NFC settings.
579 * <p>
580 * This shows UI that allows NFC to be turned on or off.
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500581 * <p>
582 * In some cases, a matching Activity may not exist, so ensure you
583 * safeguard against this.
584 * <p>
585 * Input: Nothing.
586 * <p>
587 * Output: Nothing
Nick Pellycccf01d2011-10-31 14:49:40 -0700588 * @see android.nfc.NfcAdapter#isEnabled()
589 */
590 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
591 public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS";
592
593 /**
594 * Activity Action: Show NFC Sharing settings.
595 * <p>
596 * This shows UI that allows NDEF Push (Android Beam) to be turned on or
597 * off.
598 * <p>
599 * In some cases, a matching Activity may not exist, so ensure you
600 * safeguard against this.
601 * <p>
602 * Input: Nothing.
603 * <p>
604 * Output: Nothing
605 * @see android.nfc.NfcAdapter#isNdefPushEnabled()
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500606 */
607 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
608 public static final String ACTION_NFCSHARING_SETTINGS =
609 "android.settings.NFCSHARING_SETTINGS";
610
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800611 // End of Intent actions for Settings
612
Erikeebc8e22010-02-18 13:27:19 -0800613 /**
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800614 * @hide - Private call() method on SettingsProvider to read from 'system' table.
615 */
616 public static final String CALL_METHOD_GET_SYSTEM = "GET_system";
617
618 /**
619 * @hide - Private call() method on SettingsProvider to read from 'secure' table.
620 */
621 public static final String CALL_METHOD_GET_SECURE = "GET_secure";
622
623 /**
Christopher Tate06efb532012-08-24 15:29:27 -0700624 * @hide - Private call() method on SettingsProvider to read from 'global' table.
625 */
626 public static final String CALL_METHOD_GET_GLOBAL = "GET_global";
627
628 /**
629 * @hide - User handle argument extra to the fast-path call()-based requests
630 */
631 public static final String CALL_METHOD_USER_KEY = "_user";
632
633 /** @hide - Private call() method to write to 'system' table */
634 public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system";
635
636 /** @hide - Private call() method to write to 'secure' table */
637 public static final String CALL_METHOD_PUT_SECURE = "PUT_secure";
638
639 /** @hide - Private call() method to write to 'global' table */
640 public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global";
641
642 /**
Erikeebc8e22010-02-18 13:27:19 -0800643 * Activity Extra: Limit available options in launched activity based on the given authority.
644 * <p>
645 * This can be passed as an extra field in an Activity Intent with one or more syncable content
646 * provider's authorities as a String[]. This field is used by some intents to alter the
647 * behavior of the called activity.
648 * <p>
649 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based
650 * on the authority given.
651 */
652 public static final String EXTRA_AUTHORITIES =
653 "authorities";
654
Tadashi G. Takaoka25480202011-01-20 23:13:02 +0900655 public static final String EXTRA_INPUT_METHOD_ID = "input_method_id";
656
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800657 private static final String JID_RESOURCE_PREFIX = "android";
658
659 public static final String AUTHORITY = "settings";
660
661 private static final String TAG = "Settings";
Christopher Tate06efb532012-08-24 15:29:27 -0700662 private static final boolean LOCAL_LOGV = false;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800663
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800664 public static class SettingNotFoundException extends AndroidException {
665 public SettingNotFoundException(String msg) {
666 super(msg);
667 }
668 }
669
670 /**
671 * Common base for tables of name/value settings.
672 */
673 public static class NameValueTable implements BaseColumns {
674 public static final String NAME = "name";
675 public static final String VALUE = "value";
676
677 protected static boolean putString(ContentResolver resolver, Uri uri,
678 String name, String value) {
679 // The database will take care of replacing duplicates.
680 try {
681 ContentValues values = new ContentValues();
682 values.put(NAME, name);
683 values.put(VALUE, value);
684 resolver.insert(uri, values);
685 return true;
686 } catch (SQLException e) {
Dianne Hackborna33e3f72009-09-29 17:28:24 -0700687 Log.w(TAG, "Can't set key " + name + " in " + uri, e);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800688 return false;
689 }
690 }
691
692 public static Uri getUriFor(Uri uri, String name) {
693 return Uri.withAppendedPath(uri, name);
694 }
695 }
696
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800697 // Thread-safe.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800698 private static class NameValueCache {
699 private final String mVersionSystemProperty;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800700 private final Uri mUri;
701
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800702 private static final String[] SELECT_VALUE =
703 new String[] { Settings.NameValueTable.VALUE };
704 private static final String NAME_EQ_PLACEHOLDER = "name=?";
705
706 // Must synchronize on 'this' to access mValues and mValuesVersion.
Dan Egnor799f7212009-11-24 16:24:44 -0800707 private final HashMap<String, String> mValues = new HashMap<String, String>();
708 private long mValuesVersion = 0;
709
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800710 // Initially null; set lazily and held forever. Synchronized on 'this'.
711 private IContentProvider mContentProvider = null;
712
713 // The method we'll call (or null, to not use) on the provider
714 // for the fast path of retrieving settings.
Christopher Tate06efb532012-08-24 15:29:27 -0700715 private final String mCallGetCommand;
716 private final String mCallSetCommand;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800717
Christopher Tate06efb532012-08-24 15:29:27 -0700718 public NameValueCache(String versionSystemProperty, Uri uri,
719 String getCommand, String setCommand) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800720 mVersionSystemProperty = versionSystemProperty;
721 mUri = uri;
Christopher Tate06efb532012-08-24 15:29:27 -0700722 mCallGetCommand = getCommand;
723 mCallSetCommand = setCommand;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800724 }
725
Christopher Tate06efb532012-08-24 15:29:27 -0700726 private IContentProvider lazyGetProvider(ContentResolver cr) {
727 IContentProvider cp = null;
728 synchronized (this) {
729 cp = mContentProvider;
730 if (cp == null) {
731 cp = mContentProvider = cr.acquireProvider(mUri.getAuthority());
732 }
733 }
734 return cp;
735 }
736
737 public boolean putStringForUser(ContentResolver cr, String name, String value,
738 final int userHandle) {
739 try {
740 Bundle arg = new Bundle();
741 arg.putString(Settings.NameValueTable.VALUE, value);
Christopher Tated5fe1472012-09-10 15:48:38 -0700742 arg.putInt(CALL_METHOD_USER_KEY, userHandle);
Christopher Tate06efb532012-08-24 15:29:27 -0700743 IContentProvider cp = lazyGetProvider(cr);
744 cp.call(mCallSetCommand, name, arg);
745 } catch (RemoteException e) {
746 Log.w(TAG, "Can't set key " + name + " in " + mUri, e);
747 return false;
748 }
749 return true;
750 }
751
752 public boolean putString(ContentResolver cr, String name, String value) {
753 return putStringForUser(cr, name, value, UserHandle.myUserId());
754 }
755
756 public String getStringForUser(ContentResolver cr, String name, final int userHandle) {
Christopher Tate78d2a662012-09-13 16:19:44 -0700757 final boolean isSelf = (userHandle == UserHandle.myUserId());
758 if (isSelf) {
759 long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0);
Dan Egnor799f7212009-11-24 16:24:44 -0800760
Christopher Tate78d2a662012-09-13 16:19:44 -0700761 // Our own user's settings data uses a client-side cache
762 synchronized (this) {
763 if (mValuesVersion != newValuesVersion) {
764 if (LOCAL_LOGV || false) {
765 Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current "
766 + newValuesVersion + " != cached " + mValuesVersion);
767 }
768
769 mValues.clear();
770 mValuesVersion = newValuesVersion;
Dan Egnor799f7212009-11-24 16:24:44 -0800771 }
772
Christopher Tate78d2a662012-09-13 16:19:44 -0700773 if (mValues.containsKey(name)) {
774 return mValues.get(name); // Could be null, that's OK -- negative caching
775 }
Dan Egnor799f7212009-11-24 16:24:44 -0800776 }
Christopher Tate78d2a662012-09-13 16:19:44 -0700777 } else {
778 if (LOCAL_LOGV) Log.v(TAG, "get setting for user " + userHandle
779 + " by user " + UserHandle.myUserId() + " so skipping cache");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800780 }
Dan Egnor799f7212009-11-24 16:24:44 -0800781
Christopher Tate06efb532012-08-24 15:29:27 -0700782 IContentProvider cp = lazyGetProvider(cr);
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800783
784 // Try the fast path first, not using query(). If this
785 // fails (alternate Settings provider that doesn't support
786 // this interface?) then we fall back to the query/table
787 // interface.
Christopher Tate06efb532012-08-24 15:29:27 -0700788 if (mCallGetCommand != null) {
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800789 try {
Christopher Tate06efb532012-08-24 15:29:27 -0700790 Bundle args = null;
791 if (userHandle != UserHandle.myUserId()) {
792 args = new Bundle();
793 args.putInt(CALL_METHOD_USER_KEY, userHandle);
794 }
795 Bundle b = cp.call(mCallGetCommand, name, args);
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800796 if (b != null) {
797 String value = b.getPairValue();
Christopher Tate78d2a662012-09-13 16:19:44 -0700798 // Don't update our cache for reads of other users' data
799 if (isSelf) {
800 synchronized (this) {
801 mValues.put(name, value);
802 }
803 } else {
804 if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle
805 + " by " + UserHandle.myUserId()
806 + " so not updating cache");
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800807 }
808 return value;
809 }
810 // If the response Bundle is null, we fall through
811 // to the query interface below.
812 } catch (RemoteException e) {
813 // Not supported by the remote side? Fall through
814 // to query().
815 }
816 }
817
Dan Egnor799f7212009-11-24 16:24:44 -0800818 Cursor c = null;
819 try {
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800820 c = cp.query(mUri, SELECT_VALUE, NAME_EQ_PLACEHOLDER,
Jeff Brown75ea64f2012-01-25 19:37:13 -0800821 new String[]{name}, null, null);
Dan Egnor799f7212009-11-24 16:24:44 -0800822 if (c == null) {
823 Log.w(TAG, "Can't get key " + name + " from " + mUri);
824 return null;
825 }
826
827 String value = c.moveToNext() ? c.getString(0) : null;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800828 synchronized (this) {
Dan Egnor799f7212009-11-24 16:24:44 -0800829 mValues.put(name, value);
830 }
831 if (LOCAL_LOGV) {
832 Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " +
833 name + " = " + (value == null ? "(null)" : value));
834 }
835 return value;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800836 } catch (RemoteException e) {
Dan Egnor799f7212009-11-24 16:24:44 -0800837 Log.w(TAG, "Can't get key " + name + " from " + mUri, e);
838 return null; // Return null, but don't cache it.
839 } finally {
840 if (c != null) c.close();
841 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800842 }
Christopher Tate06efb532012-08-24 15:29:27 -0700843
844 public String getString(ContentResolver cr, String name) {
845 return getStringForUser(cr, name, UserHandle.myUserId());
846 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800847 }
848
849 /**
850 * System settings, containing miscellaneous system preferences. This
851 * table holds simple name/value pairs. There are convenience
852 * functions for accessing individual settings entries.
853 */
854 public static final class System extends NameValueTable {
855 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version";
856
Brad Fitzpatrick1877d012010-03-04 17:48:13 -0800857 // Populated lazily, guarded by class object:
858 private static NameValueCache sNameValueCache = null;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700859
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800860 private static final HashSet<String> MOVED_TO_SECURE;
861 static {
862 MOVED_TO_SECURE = new HashSet<String>(30);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800863 MOVED_TO_SECURE.add(Secure.ANDROID_ID);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800864 MOVED_TO_SECURE.add(Secure.HTTP_PROXY);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800865 MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED);
Danielle Millett925a7d82012-03-19 18:02:20 -0400866 MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS);
Amith Yamasani156c4352010-03-05 17:10:03 -0800867 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED);
868 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE);
869 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800870 MOVED_TO_SECURE.add(Secure.LOGGING_ID);
871 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED);
872 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE);
873 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL);
874 MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800875 MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL);
876 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON);
877 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY);
878 MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT);
879 MOVED_TO_SECURE.add(Secure.WIFI_ON);
880 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE);
881 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT);
882 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS);
883 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED);
884 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS);
885 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT);
886 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS);
887 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON);
888 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT);
889 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS);
890 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS);
891 }
892
Christopher Tate06efb532012-08-24 15:29:27 -0700893 private static final HashSet<String> MOVED_TO_GLOBAL;
894 static {
895 MOVED_TO_GLOBAL = new HashSet<String>();
Christopher Tate92198742012-09-07 12:00:13 -0700896 // these were originally in system but migrated to secure in the past,
897 // so are duplicated in the Secure.* namespace
Christopher Tate06efb532012-08-24 15:29:27 -0700898 MOVED_TO_GLOBAL.add(Global.ADB_ENABLED);
899 MOVED_TO_GLOBAL.add(Global.BLUETOOTH_ON);
900 MOVED_TO_GLOBAL.add(Global.DATA_ROAMING);
901 MOVED_TO_GLOBAL.add(Global.DEVICE_PROVISIONED);
902 MOVED_TO_GLOBAL.add(Global.INSTALL_NON_MARKET_APPS);
903 MOVED_TO_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED);
904
Christopher Tate92198742012-09-07 12:00:13 -0700905 // these are moving directly from system to global
Christopher Tate06efb532012-08-24 15:29:27 -0700906 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON);
907 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS);
908 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS);
909 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME);
910 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE);
911 MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND);
912 MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND);
913 MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND);
914 MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND);
915 MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED);
916 MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND);
917 MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND);
918 MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND);
919 MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED);
920 MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN);
921 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY);
922 }
923
924 private static void lazyInitCache() {
925 if (sNameValueCache == null) {
926 sNameValueCache = new NameValueCache(
927 SYS_PROP_SETTING_VERSION + '_' + UserHandle.myUserId(),
928 CONTENT_URI,
929 CALL_METHOD_GET_SYSTEM,
930 CALL_METHOD_PUT_SYSTEM);
931 }
932 }
933
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800934 /**
935 * Look up a name in the database.
936 * @param resolver to access the database with
937 * @param name to look up in the table
938 * @return the corresponding value, or null if not present
939 */
940 public synchronized static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -0700941 return getStringForUser(resolver, name, UserHandle.myUserId());
942 }
943
944 /** @hide */
945 public synchronized static String getStringForUser(ContentResolver resolver, String name,
946 int userHandle) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800947 if (MOVED_TO_SECURE.contains(name)) {
948 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
949 + " to android.provider.Settings.Secure, returning read-only value.");
Christopher Tate06efb532012-08-24 15:29:27 -0700950 return Secure.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800951 }
Christopher Tate06efb532012-08-24 15:29:27 -0700952 if (MOVED_TO_GLOBAL.contains(name)) {
953 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
954 + " to android.provider.Settings.Global, returning read-only value.");
955 return Global.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800956 }
Christopher Tate06efb532012-08-24 15:29:27 -0700957 lazyInitCache();
958 return sNameValueCache.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800959 }
960
961 /**
962 * Store a name/value pair into the database.
963 * @param resolver to access the database with
964 * @param name to store
965 * @param value to associate with the name
966 * @return true if the value was set, false on database errors
967 */
968 public static boolean putString(ContentResolver resolver, String name, String value) {
Christopher Tate06efb532012-08-24 15:29:27 -0700969 return putStringForUser(resolver, name, value, UserHandle.myUserId());
970 }
971
972 /** @hide */
973 public static boolean putStringForUser(ContentResolver resolver, String name, String value,
974 int userHandle) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800975 if (MOVED_TO_SECURE.contains(name)) {
976 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
977 + " to android.provider.Settings.Secure, value is unchanged.");
978 return false;
979 }
Christopher Tate06efb532012-08-24 15:29:27 -0700980 if (MOVED_TO_GLOBAL.contains(name)) {
981 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
982 + " to android.provider.Settings.Global, value is unchanged.");
983 return false;
984 }
985 lazyInitCache();
986 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800987 }
988
989 /**
990 * Construct the content URI for a particular name/value pair,
991 * useful for monitoring changes with a ContentObserver.
992 * @param name to look up in the table
993 * @return the corresponding content URI, or null if not present
994 */
995 public static Uri getUriFor(String name) {
996 if (MOVED_TO_SECURE.contains(name)) {
997 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
998 + " to android.provider.Settings.Secure, returning Secure URI.");
999 return Secure.getUriFor(Secure.CONTENT_URI, name);
1000 }
Christopher Tate06efb532012-08-24 15:29:27 -07001001 if (MOVED_TO_GLOBAL.contains(name)) {
1002 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1003 + " to android.provider.Settings.Global, returning read-only global URI.");
1004 return Global.getUriFor(Global.CONTENT_URI, name);
1005 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001006 return getUriFor(CONTENT_URI, name);
1007 }
1008
1009 /**
1010 * Convenience function for retrieving a single system settings value
1011 * as an integer. Note that internally setting values are always
1012 * stored as strings; this function converts the string to an integer
1013 * for you. The default value will be returned if the setting is
1014 * not defined or not an integer.
1015 *
1016 * @param cr The ContentResolver to access.
1017 * @param name The name of the setting to retrieve.
1018 * @param def Value to return if the setting is not defined.
1019 *
1020 * @return The setting's current value, or 'def' if it is not defined
1021 * or not a valid integer.
1022 */
1023 public static int getInt(ContentResolver cr, String name, int def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001024 return getIntForUser(cr, name, def, UserHandle.myUserId());
1025 }
1026
1027 /** @hide */
1028 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
1029 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001030 try {
1031 return v != null ? Integer.parseInt(v) : def;
1032 } catch (NumberFormatException e) {
1033 return def;
1034 }
1035 }
1036
1037 /**
1038 * Convenience function for retrieving a single system settings value
1039 * as an integer. Note that internally setting values are always
1040 * stored as strings; this function converts the string to an integer
1041 * for you.
1042 * <p>
1043 * This version does not take a default value. If the setting has not
1044 * been set, or the string value is not a number,
1045 * it throws {@link SettingNotFoundException}.
1046 *
1047 * @param cr The ContentResolver to access.
1048 * @param name The name of the setting to retrieve.
1049 *
1050 * @throws SettingNotFoundException Thrown if a setting by the given
1051 * name can't be found or the setting value is not an integer.
1052 *
1053 * @return The setting's current value.
1054 */
1055 public static int getInt(ContentResolver cr, String name)
1056 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001057 return getIntForUser(cr, name, UserHandle.myUserId());
1058 }
1059
1060 /** @hide */
1061 public static int getIntForUser(ContentResolver cr, String name, int userHandle)
1062 throws SettingNotFoundException {
1063 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001064 try {
1065 return Integer.parseInt(v);
1066 } catch (NumberFormatException e) {
1067 throw new SettingNotFoundException(name);
1068 }
1069 }
1070
1071 /**
1072 * Convenience function for updating a single settings value as an
1073 * integer. This will either create a new entry in the table if the
1074 * given name does not exist, or modify the value of the existing row
1075 * with that name. Note that internally setting values are always
1076 * stored as strings, so this function converts the given value to a
1077 * string before storing it.
1078 *
1079 * @param cr The ContentResolver to access.
1080 * @param name The name of the setting to modify.
1081 * @param value The new value for the setting.
1082 * @return true if the value was set, false on database errors
1083 */
1084 public static boolean putInt(ContentResolver cr, String name, int value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001085 return putIntForUser(cr, name, value, UserHandle.myUserId());
1086 }
1087
1088 /** @hide */
1089 public static boolean putIntForUser(ContentResolver cr, String name, int value,
1090 int userHandle) {
1091 return putStringForUser(cr, name, Integer.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001092 }
1093
1094 /**
1095 * Convenience function for retrieving a single system settings value
1096 * as a {@code long}. Note that internally setting values are always
1097 * stored as strings; this function converts the string to a {@code long}
1098 * for you. The default value will be returned if the setting is
1099 * not defined or not a {@code long}.
1100 *
1101 * @param cr The ContentResolver to access.
1102 * @param name The name of the setting to retrieve.
1103 * @param def Value to return if the setting is not defined.
1104 *
1105 * @return The setting's current value, or 'def' if it is not defined
1106 * or not a valid {@code long}.
1107 */
1108 public static long getLong(ContentResolver cr, String name, long def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001109 return getLongForUser(cr, name, def, UserHandle.myUserId());
1110 }
1111
1112 /** @hide */
1113 public static long getLongForUser(ContentResolver cr, String name, long def,
1114 int userHandle) {
1115 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001116 long value;
1117 try {
1118 value = valString != null ? Long.parseLong(valString) : def;
1119 } catch (NumberFormatException e) {
1120 value = def;
1121 }
1122 return value;
1123 }
1124
1125 /**
1126 * Convenience function for retrieving a single system settings value
1127 * as a {@code long}. Note that internally setting values are always
1128 * stored as strings; this function converts the string to a {@code long}
1129 * for you.
1130 * <p>
1131 * This version does not take a default value. If the setting has not
1132 * been set, or the string value is not a number,
1133 * it throws {@link SettingNotFoundException}.
1134 *
1135 * @param cr The ContentResolver to access.
1136 * @param name The name of the setting to retrieve.
1137 *
1138 * @return The setting's current value.
1139 * @throws SettingNotFoundException Thrown if a setting by the given
1140 * name can't be found or the setting value is not an integer.
1141 */
1142 public static long getLong(ContentResolver cr, String name)
1143 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001144 return getLongForUser(cr, name, UserHandle.myUserId());
1145 }
1146
1147 /** @hide */
1148 public static long getLongForUser(ContentResolver cr, String name, int userHandle)
1149 throws SettingNotFoundException {
1150 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001151 try {
1152 return Long.parseLong(valString);
1153 } catch (NumberFormatException e) {
1154 throw new SettingNotFoundException(name);
1155 }
1156 }
1157
1158 /**
1159 * Convenience function for updating a single settings value as a long
1160 * integer. This will either create a new entry in the table if the
1161 * given name does not exist, or modify the value of the existing row
1162 * with that name. Note that internally setting values are always
1163 * stored as strings, so this function converts the given value to a
1164 * string before storing it.
1165 *
1166 * @param cr The ContentResolver to access.
1167 * @param name The name of the setting to modify.
1168 * @param value The new value for the setting.
1169 * @return true if the value was set, false on database errors
1170 */
1171 public static boolean putLong(ContentResolver cr, String name, long value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001172 return putLongForUser(cr, name, value, UserHandle.myUserId());
1173 }
1174
1175 /** @hide */
1176 public static boolean putLongForUser(ContentResolver cr, String name, long value,
1177 int userHandle) {
1178 return putStringForUser(cr, name, Long.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001179 }
1180
1181 /**
1182 * Convenience function for retrieving a single system settings value
1183 * as a floating point number. Note that internally setting values are
1184 * always stored as strings; this function converts the string to an
1185 * float for you. The default value will be returned if the setting
1186 * is not defined or not a valid float.
1187 *
1188 * @param cr The ContentResolver to access.
1189 * @param name The name of the setting to retrieve.
1190 * @param def Value to return if the setting is not defined.
1191 *
1192 * @return The setting's current value, or 'def' if it is not defined
1193 * or not a valid float.
1194 */
1195 public static float getFloat(ContentResolver cr, String name, float def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001196 return getFloatForUser(cr, name, def, UserHandle.myUserId());
1197 }
1198
1199 /** @hide */
1200 public static float getFloatForUser(ContentResolver cr, String name, float def,
1201 int userHandle) {
1202 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001203 try {
1204 return v != null ? Float.parseFloat(v) : def;
1205 } catch (NumberFormatException e) {
1206 return def;
1207 }
1208 }
1209
1210 /**
1211 * Convenience function for retrieving a single system settings value
1212 * as a float. Note that internally setting values are always
1213 * stored as strings; this function converts the string to a float
1214 * for you.
1215 * <p>
1216 * This version does not take a default value. If the setting has not
1217 * been set, or the string value is not a number,
1218 * it throws {@link SettingNotFoundException}.
1219 *
1220 * @param cr The ContentResolver to access.
1221 * @param name The name of the setting to retrieve.
1222 *
1223 * @throws SettingNotFoundException Thrown if a setting by the given
1224 * name can't be found or the setting value is not a float.
1225 *
1226 * @return The setting's current value.
1227 */
1228 public static float getFloat(ContentResolver cr, String name)
1229 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001230 return getFloatForUser(cr, name, UserHandle.myUserId());
1231 }
1232
1233 /** @hide */
1234 public static float getFloatForUser(ContentResolver cr, String name, int userHandle)
1235 throws SettingNotFoundException {
1236 String v = getStringForUser(cr, name, userHandle);
Brian Muramatsue1d46982010-12-06 17:34:20 -08001237 if (v == null) {
1238 throw new SettingNotFoundException(name);
1239 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001240 try {
1241 return Float.parseFloat(v);
1242 } catch (NumberFormatException e) {
1243 throw new SettingNotFoundException(name);
1244 }
1245 }
1246
1247 /**
1248 * Convenience function for updating a single settings value as a
1249 * floating point number. This will either create a new entry in the
1250 * table if the given name does not exist, or modify the value of the
1251 * existing row with that name. Note that internally setting values
1252 * are always stored as strings, so this function converts the given
1253 * value to a string before storing it.
1254 *
1255 * @param cr The ContentResolver to access.
1256 * @param name The name of the setting to modify.
1257 * @param value The new value for the setting.
1258 * @return true if the value was set, false on database errors
1259 */
1260 public static boolean putFloat(ContentResolver cr, String name, float value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001261 return putFloatForUser(cr, name, value, UserHandle.myUserId());
1262 }
1263
1264 /** @hide */
1265 public static boolean putFloatForUser(ContentResolver cr, String name, float value,
1266 int userHandle) {
1267 return putStringForUser(cr, name, Float.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001268 }
1269
1270 /**
1271 * Convenience function to read all of the current
1272 * configuration-related settings into a
1273 * {@link Configuration} object.
1274 *
1275 * @param cr The ContentResolver to access.
1276 * @param outConfig Where to place the configuration settings.
1277 */
1278 public static void getConfiguration(ContentResolver cr, Configuration outConfig) {
Christopher Tate06efb532012-08-24 15:29:27 -07001279 getConfigurationForUser(cr, outConfig, UserHandle.myUserId());
1280 }
1281
1282 /** @hide */
1283 public static void getConfigurationForUser(ContentResolver cr, Configuration outConfig,
1284 int userHandle) {
1285 outConfig.fontScale = Settings.System.getFloatForUser(
1286 cr, FONT_SCALE, outConfig.fontScale, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001287 if (outConfig.fontScale < 0) {
1288 outConfig.fontScale = 1;
1289 }
1290 }
1291
1292 /**
Dianne Hackborn31ca8542011-07-19 14:58:28 -07001293 * @hide Erase the fields in the Configuration that should be applied
1294 * by the settings.
1295 */
1296 public static void clearConfiguration(Configuration inoutConfig) {
1297 inoutConfig.fontScale = 0;
1298 }
Narayan Kamath6d632962011-08-24 11:51:37 +01001299
Dianne Hackborn31ca8542011-07-19 14:58:28 -07001300 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001301 * Convenience function to write a batch of configuration-related
1302 * settings from a {@link Configuration} object.
1303 *
1304 * @param cr The ContentResolver to access.
1305 * @param config The settings to write.
1306 * @return true if the values were set, false on database errors
1307 */
1308 public static boolean putConfiguration(ContentResolver cr, Configuration config) {
Christopher Tate06efb532012-08-24 15:29:27 -07001309 return putConfigurationForUser(cr, config, UserHandle.myUserId());
1310 }
1311
1312 /** @hide */
1313 public static boolean putConfigurationForUser(ContentResolver cr, Configuration config,
1314 int userHandle) {
1315 return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001316 }
1317
Dianne Hackbornb8b11a02010-03-10 15:53:11 -08001318 /** @hide */
1319 public static boolean hasInterestingConfigurationChanges(int changes) {
1320 return (changes&ActivityInfo.CONFIG_FONT_SCALE) != 0;
1321 }
Jaikumar Ganesh545e6702010-06-04 10:23:03 -07001322
Christopher Tate06efb532012-08-24 15:29:27 -07001323 /** @deprecated - Do not use */
1324 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001325 public static boolean getShowGTalkServiceStatus(ContentResolver cr) {
Christopher Tate06efb532012-08-24 15:29:27 -07001326 return getShowGTalkServiceStatusForUser(cr, UserHandle.myUserId());
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001327 }
1328
Christopher Tate06efb532012-08-24 15:29:27 -07001329 /**
1330 * @hide
1331 * @deprecated - Do not use
1332 */
1333 public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr,
1334 int userHandle) {
1335 return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0;
1336 }
1337
1338 /** @deprecated - Do not use */
1339 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001340 public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) {
Christopher Tatec8c08382012-09-19 17:18:18 -07001341 setShowGTalkServiceStatusForUser(cr, flag, UserHandle.myUserId());
Christopher Tate06efb532012-08-24 15:29:27 -07001342 }
1343
1344 /**
1345 * @hide
1346 * @deprecated - Do not use
1347 */
1348 @Deprecated
1349 public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag,
1350 int userHandle) {
1351 putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001352 }
1353
1354 /**
1355 * The content:// style URL for this table
1356 */
1357 public static final Uri CONTENT_URI =
1358 Uri.parse("content://" + AUTHORITY + "/system");
1359
1360 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001361 * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001362 */
Christopher Tate06efb532012-08-24 15:29:27 -07001363 @Deprecated
1364 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 -08001365
1366 /**
1367 * What happens when the user presses the end call button if they're not
1368 * on a call.<br/>
1369 * <b>Values:</b><br/>
1370 * 0 - The end button does nothing.<br/>
1371 * 1 - The end button goes to the home screen.<br/>
1372 * 2 - The end button puts the device to sleep and locks the keyguard.<br/>
1373 * 3 - The end button goes to the home screen. If the user is already on the
1374 * home screen, it puts the device to sleep.
1375 */
1376 public static final String END_BUTTON_BEHAVIOR = "end_button_behavior";
1377
1378 /**
David Brown458e8062010-03-08 21:52:11 -08001379 * END_BUTTON_BEHAVIOR value for "go home".
1380 * @hide
1381 */
1382 public static final int END_BUTTON_BEHAVIOR_HOME = 0x1;
1383
1384 /**
1385 * END_BUTTON_BEHAVIOR value for "go to sleep".
1386 * @hide
1387 */
1388 public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2;
1389
1390 /**
1391 * END_BUTTON_BEHAVIOR default value.
1392 * @hide
1393 */
1394 public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP;
1395
1396 /**
Joe Onorato9cdffa12011-04-06 18:27:27 -07001397 * Is advanced settings mode turned on. 0 == no, 1 == yes
1398 * @hide
1399 */
1400 public static final String ADVANCED_SETTINGS = "advanced_settings";
1401
1402 /**
1403 * ADVANCED_SETTINGS default value.
1404 * @hide
1405 */
1406 public static final int ADVANCED_SETTINGS_DEFAULT = 0;
1407
1408 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001409 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001410 */
Christopher Tate06efb532012-08-24 15:29:27 -07001411 @Deprecated
1412 public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001413
1414 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001415 * @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001416 */
Christopher Tate06efb532012-08-24 15:29:27 -07001417 @Deprecated
1418 public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001419
1420 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001421 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001422 */
Christopher Tate06efb532012-08-24 15:29:27 -07001423 @Deprecated
1424 public static final String RADIO_WIFI = Global.RADIO_WIFI;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001425
Robert Greenwalt8588e472011-11-08 10:12:25 -08001426 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001427 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead
Robert Greenwalt8588e472011-11-08 10:12:25 -08001428 * {@hide}
1429 */
Christopher Tate06efb532012-08-24 15:29:27 -07001430 @Deprecated
1431 public static final String RADIO_WIMAX = Global.RADIO_WIMAX;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001432
1433 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001434 * @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead
Nick Pelly8d32a012011-08-09 07:03:49 -07001435 */
Christopher Tate06efb532012-08-24 15:29:27 -07001436 @Deprecated
1437 public static final String RADIO_CELL = Global.RADIO_CELL;
Nick Pelly8d32a012011-08-09 07:03:49 -07001438
1439 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001440 * @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001441 */
Christopher Tate06efb532012-08-24 15:29:27 -07001442 @Deprecated
1443 public static final String RADIO_NFC = Global.RADIO_NFC;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001444
1445 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001446 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead
1447 */
1448 @Deprecated
1449 public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS;
1450
1451 /**
1452 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead
Mike Lockwoodbd5ddf02009-07-29 21:37:14 -07001453 *
1454 * {@hide}
1455 */
Christopher Tate06efb532012-08-24 15:29:27 -07001456 @Deprecated
1457 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS =
1458 Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS;
Mike Lockwoodbd5ddf02009-07-29 21:37:14 -07001459
1460 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001461 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001462 */
Christopher Tate06efb532012-08-24 15:29:27 -07001463 @Deprecated
1464 public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001465
1466 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001467 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001468 */
Christopher Tate06efb532012-08-24 15:29:27 -07001469 @Deprecated
1470 public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001471
1472 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001473 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001474 */
Christopher Tate06efb532012-08-24 15:29:27 -07001475 @Deprecated
1476 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED =
1477 Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07001478
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001479 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001480 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001481 */
Christopher Tate06efb532012-08-24 15:29:27 -07001482 @Deprecated
1483 public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07001484
Irfan Sheriff31b62322010-08-30 12:26:00 -07001485 //TODO: deprecate static IP constants
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001486 /**
1487 * Whether to use static IP and other static network attributes.
1488 * <p>
1489 * Set to 1 for true and 0 for false.
1490 */
1491 public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip";
1492
1493 /**
1494 * The static IP address.
1495 * <p>
1496 * Example: "192.168.1.51"
1497 */
1498 public static final String WIFI_STATIC_IP = "wifi_static_ip";
1499
1500 /**
1501 * If using static IP, the gateway's IP address.
1502 * <p>
1503 * Example: "192.168.1.1"
1504 */
1505 public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway";
1506
1507 /**
1508 * If using static IP, the net mask.
1509 * <p>
1510 * Example: "255.255.255.0"
1511 */
1512 public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask";
1513
1514 /**
1515 * If using static IP, the primary DNS's IP address.
1516 * <p>
1517 * Example: "192.168.1.1"
1518 */
1519 public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1";
1520
1521 /**
1522 * If using static IP, the secondary DNS's IP address.
1523 * <p>
1524 * Example: "192.168.1.2"
1525 */
1526 public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2";
1527
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001528
1529 /**
1530 * Determines whether remote devices may discover and/or connect to
1531 * this device.
1532 * <P>Type: INT</P>
1533 * 2 -- discoverable and connectable
1534 * 1 -- connectable but not discoverable
1535 * 0 -- neither connectable nor discoverable
1536 */
1537 public static final String BLUETOOTH_DISCOVERABILITY =
1538 "bluetooth_discoverability";
1539
1540 /**
1541 * Bluetooth discoverability timeout. If this value is nonzero, then
1542 * Bluetooth becomes discoverable for a certain number of seconds,
1543 * after which is becomes simply connectable. The value is in seconds.
1544 */
1545 public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT =
1546 "bluetooth_discoverability_timeout";
1547
1548 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08001549 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED}
1550 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001551 */
Amith Yamasani156c4352010-03-05 17:10:03 -08001552 @Deprecated
1553 public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001554
1555 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08001556 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE}
1557 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001558 */
Amith Yamasani156c4352010-03-05 17:10:03 -08001559 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001560 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
1561
1562 /**
Jaikumar Ganesh545e6702010-06-04 10:23:03 -07001563 * @deprecated Use
Amith Yamasani156c4352010-03-05 17:10:03 -08001564 * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED}
1565 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001566 */
Amith Yamasani156c4352010-03-05 17:10:03 -08001567 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001568 public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED =
1569 "lock_pattern_tactile_feedback_enabled";
1570
1571
1572 /**
1573 * A formatted string of the next alarm that is set, or the empty string
1574 * if there is no alarm set.
1575 */
1576 public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted";
1577
1578 /**
1579 * Scaling factor for fonts, float.
1580 */
1581 public static final String FONT_SCALE = "font_scale";
1582
1583 /**
1584 * Name of an application package to be debugged.
1585 */
1586 public static final String DEBUG_APP = "debug_app";
1587
1588 /**
1589 * If 1, when launching DEBUG_APP it will wait for the debugger before
1590 * starting user code. If 0, it will run normally.
1591 */
1592 public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger";
1593
1594 /**
1595 * Whether or not to dim the screen. 0=no 1=yes
Jeff Brown96307042012-07-27 15:51:34 -07001596 * @deprecated This setting is no longer used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001597 */
Jeff Brown96307042012-07-27 15:51:34 -07001598 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001599 public static final String DIM_SCREEN = "dim_screen";
1600
1601 /**
1602 * The timeout before the screen turns off.
1603 */
1604 public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout";
1605
1606 /**
Mitsuru Oshimae5fb3282009-06-09 21:16:08 -07001607 * If 0, the compatibility mode is off for all applications.
1608 * If 1, older applications run under compatibility mode.
1609 * TODO: remove this settings before code freeze (bug/1907571)
1610 * @hide
1611 */
1612 public static final String COMPATIBILITY_MODE = "compatibility_mode";
1613
1614 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001615 * The screen backlight brightness between 0 and 255.
1616 */
1617 public static final String SCREEN_BRIGHTNESS = "screen_brightness";
1618
1619 /**
Dan Murphy951764b2009-08-27 14:59:03 -05001620 * Control whether to enable automatic brightness mode.
Dan Murphy951764b2009-08-27 14:59:03 -05001621 */
1622 public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode";
1623
1624 /**
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08001625 * Adjustment to auto-brightness to make it generally more (>0.0 <1.0)
1626 * or less (<0.0 >-1.0) bright.
Dianne Hackborn518a3d82012-05-09 16:30:49 -07001627 * @hide
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08001628 */
1629 public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj";
1630
1631 /**
Mike Lockwooddc3494e2009-10-14 21:17:09 -07001632 * SCREEN_BRIGHTNESS_MODE value for manual mode.
Mike Lockwooddc3494e2009-10-14 21:17:09 -07001633 */
1634 public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0;
1635
1636 /**
Scott Main52bfc242012-02-09 10:09:14 -08001637 * SCREEN_BRIGHTNESS_MODE value for automatic mode.
Mike Lockwooddc3494e2009-10-14 21:17:09 -07001638 */
1639 public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1;
1640
1641 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001642 * Control whether the process CPU usage meter should be shown.
1643 */
1644 public static final String SHOW_PROCESSES = "show_processes";
1645
1646 /**
1647 * If 1, the activity manager will aggressively finish activities and
1648 * processes as soon as they are no longer needed. If 0, the normal
1649 * extended lifetime is used.
1650 */
1651 public static final String ALWAYS_FINISH_ACTIVITIES =
1652 "always_finish_activities";
1653
1654
1655 /**
1656 * Ringer mode. This is used internally, changing this value will not
1657 * change the ringer mode. See AudioManager.
1658 */
1659 public static final String MODE_RINGER = "mode_ringer";
1660
1661 /**
1662 * Determines which streams are affected by ringer mode changes. The
1663 * stream type's bit should be set to 1 if it should be muted when going
1664 * into an inaudible ringer mode.
1665 */
1666 public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected";
1667
1668 /**
1669 * Determines which streams are affected by mute. The
1670 * stream type's bit should be set to 1 if it should be muted when a mute request
1671 * is received.
1672 */
1673 public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected";
1674
1675 /**
1676 * Whether vibrate is on for different events. This is used internally,
1677 * changing this value will not change the vibrate. See AudioManager.
1678 */
1679 public static final String VIBRATE_ON = "vibrate_on";
1680
1681 /**
Jeff Brown7f6c2312012-04-13 20:38:38 -07001682 * If 1, redirects the system vibrator to all currently attached input devices
1683 * that support vibration. If there are no such input devices, then the system
1684 * vibrator is used instead.
1685 * If 0, does not register the system vibrator.
1686 *
1687 * This setting is mainly intended to provide a compatibility mechanism for
1688 * applications that only know about the system vibrator and do not use the
1689 * input device vibrator API.
1690 *
1691 * @hide
1692 */
1693 public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices";
1694
1695 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001696 * Ringer volume. This is used internally, changing this value will not
1697 * change the volume. See AudioManager.
1698 */
1699 public static final String VOLUME_RING = "volume_ring";
1700
1701 /**
1702 * System/notifications volume. This is used internally, changing this
1703 * value will not change the volume. See AudioManager.
1704 */
1705 public static final String VOLUME_SYSTEM = "volume_system";
1706
1707 /**
1708 * Voice call volume. This is used internally, changing this value will
1709 * not change the volume. See AudioManager.
1710 */
1711 public static final String VOLUME_VOICE = "volume_voice";
1712
1713 /**
1714 * Music/media/gaming volume. This is used internally, changing this
1715 * value will not change the volume. See AudioManager.
1716 */
1717 public static final String VOLUME_MUSIC = "volume_music";
1718
1719 /**
1720 * Alarm volume. This is used internally, changing this
1721 * value will not change the volume. See AudioManager.
1722 */
1723 public static final String VOLUME_ALARM = "volume_alarm";
1724
1725 /**
1726 * Notification volume. This is used internally, changing this
1727 * value will not change the volume. See AudioManager.
1728 */
1729 public static final String VOLUME_NOTIFICATION = "volume_notification";
1730
1731 /**
Eric Laurent484d2882009-12-08 09:05:45 -08001732 * Bluetooth Headset volume. This is used internally, changing this value will
1733 * not change the volume. See AudioManager.
1734 */
1735 public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco";
1736
1737 /**
Mike Lockwood8517e462011-10-25 14:47:19 -04001738 * Master volume (float in the range 0.0f to 1.0f).
1739 * @hide
1740 */
1741 public static final String VOLUME_MASTER = "volume_master";
1742
1743 /**
Justin Koh57978ed2012-04-03 17:37:58 -07001744 * Master volume mute (int 1 = mute, 0 = not muted).
1745 *
1746 * @hide
1747 */
1748 public static final String VOLUME_MASTER_MUTE = "volume_master_mute";
1749
1750 /**
1751 * Whether the notifications should use the ring volume (value of 1) or
1752 * a separate notification volume (value of 0). In most cases, users
1753 * will have this enabled so the notification and ringer volumes will be
1754 * the same. However, power users can disable this and use the separate
1755 * notification volume control.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001756 * <p>
Justin Koh57978ed2012-04-03 17:37:58 -07001757 * Note: This is a one-off setting that will be removed in the future
1758 * when there is profile support. For this reason, it is kept hidden
1759 * from the public APIs.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07001760 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001761 * @hide
Amith Yamasani42722bf2011-07-22 10:34:27 -07001762 * @deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001763 */
Gilles Debunnee90bed12011-08-30 14:28:27 -07001764 @Deprecated
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07001765 public static final String NOTIFICATIONS_USE_RING_VOLUME =
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001766 "notifications_use_ring_volume";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07001767
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001768 /**
Daniel Sandler6329bf72010-02-26 15:17:44 -05001769 * Whether silent mode should allow vibration feedback. This is used
1770 * internally in AudioService and the Sound settings activity to
1771 * coordinate decoupling of vibrate and silent modes. This setting
1772 * will likely be removed in a future release with support for
1773 * audio/vibe feedback profiles.
1774 *
Eric Laurentbffc3d12012-05-07 17:43:49 -07001775 * Not used anymore. On devices with vibrator, the user explicitly selects
1776 * silent or vibrate mode.
1777 * Kept for use by legacy database upgrade code in DatabaseHelper.
Daniel Sandler6329bf72010-02-26 15:17:44 -05001778 * @hide
1779 */
1780 public static final String VIBRATE_IN_SILENT = "vibrate_in_silent";
1781
1782 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001783 * The mapping of stream type (integer) to its setting.
1784 */
1785 public static final String[] VOLUME_SETTINGS = {
1786 VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC,
Eric Laurent484d2882009-12-08 09:05:45 -08001787 VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001788 };
1789
1790 /**
1791 * Appended to various volume related settings to record the previous
1792 * values before they the settings were affected by a silent/vibrate
1793 * ringer mode change.
1794 */
1795 public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible";
1796
1797 /**
1798 * Persistent store for the system-wide default ringtone URI.
1799 * <p>
1800 * If you need to play the default ringtone at any given time, it is recommended
1801 * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve
1802 * to the set default ringtone at the time of playing.
1803 *
1804 * @see #DEFAULT_RINGTONE_URI
1805 */
1806 public static final String RINGTONE = "ringtone";
1807
1808 /**
1809 * A {@link Uri} that will point to the current default ringtone at any
1810 * given time.
1811 * <p>
1812 * If the current default ringtone is in the DRM provider and the caller
1813 * does not have permission, the exception will be a
1814 * FileNotFoundException.
1815 */
1816 public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE);
1817
1818 /**
1819 * Persistent store for the system-wide default notification sound.
1820 *
1821 * @see #RINGTONE
1822 * @see #DEFAULT_NOTIFICATION_URI
1823 */
1824 public static final String NOTIFICATION_SOUND = "notification_sound";
1825
1826 /**
1827 * A {@link Uri} that will point to the current default notification
1828 * sound at any given time.
1829 *
1830 * @see #DEFAULT_RINGTONE_URI
1831 */
1832 public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND);
1833
1834 /**
Patrick Scott3156bb002009-04-13 09:57:38 -07001835 * Persistent store for the system-wide default alarm alert.
1836 *
1837 * @see #RINGTONE
1838 * @see #DEFAULT_ALARM_ALERT_URI
1839 */
1840 public static final String ALARM_ALERT = "alarm_alert";
1841
1842 /**
1843 * A {@link Uri} that will point to the current default alarm alert at
1844 * any given time.
1845 *
1846 * @see #DEFAULT_ALARM_ALERT_URI
1847 */
1848 public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT);
1849
1850 /**
Jean-Michel Trivid589fea2011-04-15 11:28:10 -07001851 * Persistent store for the system default media button event receiver.
1852 *
1853 * @hide
1854 */
1855 public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver";
1856
1857 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001858 * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off
1859 */
1860 public static final String TEXT_AUTO_REPLACE = "auto_replace";
1861
1862 /**
1863 * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off
1864 */
1865 public static final String TEXT_AUTO_CAPS = "auto_caps";
1866
1867 /**
1868 * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This
1869 * feature converts two spaces to a "." and space.
1870 */
1871 public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07001872
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001873 /**
1874 * Setting to showing password characters in text editors. 1 = On, 0 = Off
1875 */
1876 public static final String TEXT_SHOW_PASSWORD = "show_password";
1877
1878 public static final String SHOW_GTALK_SERVICE_STATUS =
1879 "SHOW_GTALK_SERVICE_STATUS";
1880
1881 /**
1882 * Name of activity to use for wallpaper on the home screen.
1883 */
1884 public static final String WALLPAPER_ACTIVITY = "wallpaper_activity";
1885
1886 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001887 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME}
1888 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001889 */
Christopher Tate06efb532012-08-24 15:29:27 -07001890 @Deprecated
1891 public static final String AUTO_TIME = Global.AUTO_TIME;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001892
1893 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001894 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE}
1895 * instead
Amith Yamasaniad450be2010-09-16 16:47:00 -07001896 */
Christopher Tate06efb532012-08-24 15:29:27 -07001897 @Deprecated
1898 public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE;
Amith Yamasaniad450be2010-09-16 16:47:00 -07001899
1900 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001901 * Display times as 12 or 24 hours
1902 * 12
1903 * 24
1904 */
1905 public static final String TIME_12_24 = "time_12_24";
1906
1907 /**
1908 * Date format string
1909 * mm/dd/yyyy
1910 * dd/mm/yyyy
1911 * yyyy/mm/dd
1912 */
1913 public static final String DATE_FORMAT = "date_format";
1914
1915 /**
1916 * Whether the setup wizard has been run before (on first boot), or if
1917 * it still needs to be run.
1918 *
1919 * nonzero = it has been run in the past
1920 * 0 = it has not been run in the past
1921 */
1922 public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run";
1923
1924 /**
1925 * Scaling factor for normal window animations. Setting to 0 will disable window
1926 * animations.
1927 */
1928 public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale";
1929
1930 /**
1931 * Scaling factor for activity transition animations. Setting to 0 will disable window
1932 * animations.
1933 */
1934 public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale";
1935
1936 /**
Chet Haasec38fa1f2012-02-01 16:37:46 -08001937 * Scaling factor for Animator-based animations. This affects both the start delay and
1938 * duration of all such animations. Setting to 0 will cause animations to end immediately.
1939 * The default value is 1.
1940 */
1941 public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale";
1942
1943 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001944 * Scaling factor for normal window animations. Setting to 0 will disable window
1945 * animations.
1946 * @hide
1947 */
1948 public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations";
1949
1950 /**
1951 * Control whether the accelerometer will be used to change screen
1952 * orientation. If 0, it will not be used unless explicitly requested
1953 * by the application; if 1, it will be used by default unless explicitly
1954 * disabled by the application.
1955 */
1956 public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation";
1957
1958 /**
Daniel Sandlerb73617d2010-08-17 00:41:00 -04001959 * Default screen rotation when no other policy applies.
1960 * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a
1961 * preference, this rotation value will be used. Must be one of the
Brian Muramatsue1d46982010-12-06 17:34:20 -08001962 * {@link android.view.Surface#ROTATION_0 Surface rotation constants}.
Daniel Sandlerb73617d2010-08-17 00:41:00 -04001963 *
1964 * @see Display#getRotation
1965 */
1966 public static final String USER_ROTATION = "user_rotation";
1967
1968 /**
Jeff Brown207673cd2012-06-05 17:47:11 -07001969 * Control whether the rotation lock toggle in the System UI should be hidden.
1970 * Typically this is done for accessibility purposes to make it harder for
1971 * the user to accidentally toggle the rotation lock while the display rotation
1972 * has been locked for accessibility.
1973 *
1974 * If 0, then rotation lock toggle is not hidden for accessibility (although it may be
1975 * unavailable for other reasons). If 1, then the rotation lock toggle is hidden.
1976 *
1977 * @hide
1978 */
1979 public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY =
1980 "hide_rotation_lock_toggle_for_accessibility";
1981
1982 /**
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07001983 * Whether the phone vibrates when it is ringing due to an incoming call. This will
1984 * be used by Phone and Setting apps; it shouldn't affect other apps.
1985 * The value is boolean (1 or 0).
1986 *
1987 * Note: this is not same as "vibrate on ring", which had been available until ICS.
1988 * It was about AudioManager's setting and thus affected all the applications which
1989 * relied on the setting, while this is purely about the vibration setting for incoming
1990 * calls.
1991 *
1992 * @hide
1993 */
1994 public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
1995
1996 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001997 * Whether the audible DTMF tones are played by the dialer when dialing. The value is
1998 * boolean (1 or 0).
1999 */
2000 public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone";
2001
2002 /**
David Kraused0f67152009-06-13 18:01:13 -05002003 * CDMA only settings
2004 * DTMF tone type played by the dialer when dialing.
2005 * 0 = Normal
2006 * 1 = Long
2007 * @hide
2008 */
2009 public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type";
2010
2011 /**
2012 * CDMA only settings
2013 * Emergency Tone 0 = Off
2014 * 1 = Alert
2015 * 2 = Vibrate
2016 * @hide
2017 */
2018 public static final String EMERGENCY_TONE = "emergency_tone";
2019
2020 /**
2021 * CDMA only settings
2022 * Whether the auto retry is enabled. The value is
2023 * boolean (1 or 0).
2024 * @hide
2025 */
2026 public static final String CALL_AUTO_RETRY = "call_auto_retry";
2027
2028 /**
2029 * Whether the hearing aid is enabled. The value is
2030 * boolean (1 or 0).
2031 * @hide
2032 */
2033 public static final String HEARING_AID = "hearing_aid";
2034
2035 /**
2036 * CDMA only settings
2037 * TTY Mode
2038 * 0 = OFF
2039 * 1 = FULL
2040 * 2 = VCO
2041 * 3 = HCO
2042 * @hide
2043 */
2044 public static final String TTY_MODE = "tty_mode";
2045
2046 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002047 * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is
2048 * boolean (1 or 0).
2049 */
2050 public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002051
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002052 /**
2053 * Whether the haptic feedback (long presses, ...) are enabled. The value is
2054 * boolean (1 or 0).
2055 */
2056 public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled";
Sanjay Jeyakumar21bf2412009-07-09 13:31:48 -07002057
Mike LeBeau48603e72009-06-05 00:27:00 +01002058 /**
Bjorn Bringert24abb662010-09-21 12:21:18 +01002059 * @deprecated Each application that shows web suggestions should have its own
2060 * setting for this.
Mike LeBeau48603e72009-06-05 00:27:00 +01002061 */
Bjorn Bringert24abb662010-09-21 12:21:18 +01002062 @Deprecated
Mike LeBeau48603e72009-06-05 00:27:00 +01002063 public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002064
-b master501eec92009-07-06 13:53:11 -07002065 /**
Amith Yamasaniae3ed702009-12-01 19:02:05 -08002066 * Whether the notification LED should repeatedly flash when a notification is
2067 * pending. The value is boolean (1 or 0).
2068 * @hide
2069 */
2070 public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse";
2071
2072 /**
Dianne Hackborn90d2db32010-02-11 22:19:06 -08002073 * Show pointer location on screen?
2074 * 0 = no
2075 * 1 = yes
2076 * @hide
2077 */
2078 public static final String POINTER_LOCATION = "pointer_location";
2079
2080 /**
Jeff Browndaf4a122011-08-26 17:14:14 -07002081 * Show touch positions on screen?
2082 * 0 = no
2083 * 1 = yes
2084 * @hide
2085 */
2086 public static final String SHOW_TOUCHES = "show_touches";
2087
2088 /**
Jeff Brown4519f072011-01-23 13:16:01 -08002089 * Log raw orientation data from {@link WindowOrientationListener} for use with the
2090 * orientationplot.py tool.
2091 * 0 = no
2092 * 1 = yes
2093 * @hide
2094 */
2095 public static final String WINDOW_ORIENTATION_LISTENER_LOG =
2096 "window_orientation_listener_log";
2097
2098 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002099 * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED}
2100 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002101 * @hide
2102 */
Christopher Tate06efb532012-08-24 15:29:27 -07002103 @Deprecated
2104 public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002105
2106 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002107 * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED}
2108 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002109 * @hide
2110 */
Christopher Tate06efb532012-08-24 15:29:27 -07002111 @Deprecated
2112 public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002113
2114 /**
2115 * Whether to play sounds when the keyguard is shown and dismissed.
2116 * @hide
2117 */
2118 public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled";
2119
2120 /**
Mike Lockwood7bef7392011-10-20 16:51:53 -04002121 * Whether the lockscreen should be completely disabled.
2122 * @hide
2123 */
2124 public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled";
2125
2126 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002127 * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND}
2128 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002129 * @hide
2130 */
Christopher Tate06efb532012-08-24 15:29:27 -07002131 @Deprecated
2132 public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002133
2134 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002135 * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND}
2136 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002137 * @hide
2138 */
Christopher Tate06efb532012-08-24 15:29:27 -07002139 @Deprecated
2140 public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002141
2142 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002143 * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND}
2144 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002145 * @hide
2146 */
Christopher Tate06efb532012-08-24 15:29:27 -07002147 @Deprecated
2148 public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002149
2150 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002151 * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND}
2152 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002153 * @hide
2154 */
Christopher Tate06efb532012-08-24 15:29:27 -07002155 @Deprecated
2156 public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002157
2158 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002159 * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND}
2160 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002161 * @hide
2162 */
Christopher Tate06efb532012-08-24 15:29:27 -07002163 @Deprecated
2164 public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002165
2166 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002167 * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND}
2168 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002169 * @hide
2170 */
Christopher Tate06efb532012-08-24 15:29:27 -07002171 @Deprecated
2172 public static final String LOCK_SOUND = Global.LOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002173
2174 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002175 * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND}
2176 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002177 * @hide
2178 */
Christopher Tate06efb532012-08-24 15:29:27 -07002179 @Deprecated
2180 public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002181
2182 /**
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08002183 * Receive incoming SIP calls?
2184 * 0 = no
2185 * 1 = yes
2186 * @hide
2187 */
2188 public static final String SIP_RECEIVE_CALLS = "sip_receive_calls";
2189
2190 /**
2191 * Call Preference String.
2192 * "SIP_ALWAYS" : Always use SIP with network access
2193 * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address
2194 * "SIP_ASK_ME_EACH_TIME" : Always ask me each time
2195 * @hide
2196 */
2197 public static final String SIP_CALL_OPTIONS = "sip_call_options";
2198
2199 /**
2200 * One of the sip call options: Always use SIP with network access.
2201 * @hide
2202 */
2203 public static final String SIP_ALWAYS = "SIP_ALWAYS";
2204
2205 /**
2206 * One of the sip call options: Only if destination is a SIP address.
2207 * @hide
2208 */
2209 public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY";
2210
2211 /**
2212 * One of the sip call options: Always ask me each time.
2213 * @hide
2214 */
2215 public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME";
2216
2217 /**
Jeff Brown1a84fd12011-06-02 01:26:32 -07002218 * Pointer speed setting.
2219 * This is an integer value in a range between -7 and +7, so there are 15 possible values.
2220 * -7 = slowest
2221 * 0 = default speed
2222 * +7 = fastest
2223 * @hide
2224 */
2225 public static final String POINTER_SPEED = "pointer_speed";
2226
2227 /**
-b master501eec92009-07-06 13:53:11 -07002228 * Settings to backup. This is here so that it's in the same place as the settings
2229 * keys and easy to update.
Svetoslav Ganova571a582011-09-20 18:32:20 -07002230 *
2231 * NOTE: Settings are backed up and restored in the order they appear
2232 * in this array. If you have one setting depending on another,
2233 * make sure that they are ordered appropriately.
2234 *
-b master501eec92009-07-06 13:53:11 -07002235 * @hide
2236 */
2237 public static final String[] SETTINGS_TO_BACKUP = {
2238 STAY_ON_WHILE_PLUGGED_IN,
-b master501eec92009-07-06 13:53:11 -07002239 WIFI_USE_STATIC_IP,
2240 WIFI_STATIC_IP,
2241 WIFI_STATIC_GATEWAY,
2242 WIFI_STATIC_NETMASK,
2243 WIFI_STATIC_DNS1,
2244 WIFI_STATIC_DNS2,
2245 BLUETOOTH_DISCOVERABILITY,
2246 BLUETOOTH_DISCOVERABILITY_TIMEOUT,
2247 DIM_SCREEN,
2248 SCREEN_OFF_TIMEOUT,
2249 SCREEN_BRIGHTNESS,
Christopher Tate362aca62009-09-25 15:58:03 -07002250 SCREEN_BRIGHTNESS_MODE,
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08002251 SCREEN_AUTO_BRIGHTNESS_ADJ,
Jeff Brown7f6c2312012-04-13 20:38:38 -07002252 VIBRATE_INPUT_DEVICES,
Amith Yamasani8823c0a82009-07-07 14:30:17 -07002253 MODE_RINGER,
2254 MODE_RINGER_STREAMS_AFFECTED,
2255 MUTE_STREAMS_AFFECTED,
2256 VOLUME_VOICE,
2257 VOLUME_SYSTEM,
2258 VOLUME_RING,
2259 VOLUME_MUSIC,
2260 VOLUME_ALARM,
2261 VOLUME_NOTIFICATION,
Eric Laurent484d2882009-12-08 09:05:45 -08002262 VOLUME_BLUETOOTH_SCO,
Amith Yamasani8823c0a82009-07-07 14:30:17 -07002263 VOLUME_VOICE + APPEND_FOR_LAST_AUDIBLE,
2264 VOLUME_SYSTEM + APPEND_FOR_LAST_AUDIBLE,
2265 VOLUME_RING + APPEND_FOR_LAST_AUDIBLE,
2266 VOLUME_MUSIC + APPEND_FOR_LAST_AUDIBLE,
2267 VOLUME_ALARM + APPEND_FOR_LAST_AUDIBLE,
2268 VOLUME_NOTIFICATION + APPEND_FOR_LAST_AUDIBLE,
Eric Laurent484d2882009-12-08 09:05:45 -08002269 VOLUME_BLUETOOTH_SCO + APPEND_FOR_LAST_AUDIBLE,
-b master501eec92009-07-06 13:53:11 -07002270 TEXT_AUTO_REPLACE,
2271 TEXT_AUTO_CAPS,
2272 TEXT_AUTO_PUNCTUATE,
2273 TEXT_SHOW_PASSWORD,
2274 AUTO_TIME,
Amith Yamasaniad450be2010-09-16 16:47:00 -07002275 AUTO_TIME_ZONE,
-b master501eec92009-07-06 13:53:11 -07002276 TIME_12_24,
2277 DATE_FORMAT,
-b master501eec92009-07-06 13:53:11 -07002278 DTMF_TONE_WHEN_DIALING,
2279 DTMF_TONE_TYPE_WHEN_DIALING,
2280 EMERGENCY_TONE,
2281 CALL_AUTO_RETRY,
2282 HEARING_AID,
2283 TTY_MODE,
2284 SOUND_EFFECTS_ENABLED,
2285 HAPTIC_FEEDBACK_ENABLED,
Christopher Tate14c2d792010-02-25 16:49:44 -08002286 POWER_SOUNDS_ENABLED,
2287 DOCK_SOUNDS_ENABLED,
2288 LOCKSCREEN_SOUNDS_ENABLED,
Amith Yamasaniae3ed702009-12-01 19:02:05 -08002289 SHOW_WEB_SUGGESTIONS,
Mike Lockwoodeabe8bf2010-08-31 14:35:23 -04002290 NOTIFICATION_LIGHT_PULSE,
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08002291 SIP_CALL_OPTIONS,
Nick Pelly038cabe2010-09-23 16:12:11 -07002292 SIP_RECEIVE_CALLS,
Jeff Brown1a84fd12011-06-02 01:26:32 -07002293 POINTER_SPEED,
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07002294 VIBRATE_WHEN_RINGING
-b master501eec92009-07-06 13:53:11 -07002295 };
2296
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002297 // Settings moved to Settings.Secure
2298
2299 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002300 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002301 * instead
2302 */
2303 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002304 public static final String ADB_ENABLED = Global.ADB_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002305
2306 /**
2307 * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead
2308 */
2309 @Deprecated
2310 public static final String ANDROID_ID = Secure.ANDROID_ID;
2311
2312 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002313 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002314 */
2315 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002316 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002317
2318 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002319 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002320 */
2321 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002322 public static final String DATA_ROAMING = Global.DATA_ROAMING;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002323
2324 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002325 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002326 */
2327 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002328 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002329
2330 /**
2331 * @deprecated Use {@link android.provider.Settings.Secure#HTTP_PROXY} instead
2332 */
2333 @Deprecated
2334 public static final String HTTP_PROXY = Secure.HTTP_PROXY;
2335
2336 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002337 * @deprecated Use {@link android.provider.Settings.Global#INSTALL_NON_MARKET_APPS} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002338 */
2339 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002340 public static final String INSTALL_NON_MARKET_APPS = Global.INSTALL_NON_MARKET_APPS;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002341
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002342 /**
2343 * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED}
2344 * instead
2345 */
2346 @Deprecated
2347 public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED;
2348
2349 /**
2350 * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead
2351 */
2352 @Deprecated
2353 public static final String LOGGING_ID = Secure.LOGGING_ID;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002354
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002355 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002356 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002357 */
2358 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002359 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002360
2361 /**
2362 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED}
2363 * instead
2364 */
2365 @Deprecated
2366 public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED;
2367
2368 /**
2369 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE}
2370 * instead
2371 */
2372 @Deprecated
2373 public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE;
2374
2375 /**
2376 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL}
2377 * instead
2378 */
2379 @Deprecated
2380 public static final String PARENTAL_CONTROL_REDIRECT_URL =
2381 Secure.PARENTAL_CONTROL_REDIRECT_URL;
2382
2383 /**
2384 * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead
2385 */
2386 @Deprecated
2387 public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME;
2388
2389 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002390 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002391 */
2392 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002393 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002394
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002395 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002396 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002397 */
2398 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002399 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002400
Dianne Hackborn4a51c202009-08-21 15:14:02 -07002401 /**
2402 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07002403 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead
Dianne Hackborn4a51c202009-08-21 15:14:02 -07002404 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002405 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002406 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 -08002407
Dianne Hackborn4a51c202009-08-21 15:14:02 -07002408 /**
2409 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07002410 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead
Dianne Hackborn4a51c202009-08-21 15:14:02 -07002411 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002412 @Deprecated
2413 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
Christopher Tate06efb532012-08-24 15:29:27 -07002414 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002415
2416 /**
2417 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07002418 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002419 */
2420 @Deprecated
2421 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Christopher Tate06efb532012-08-24 15:29:27 -07002422 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002423
2424 /**
2425 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07002426 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002427 */
2428 @Deprecated
2429 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
Christopher Tate06efb532012-08-24 15:29:27 -07002430 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002431
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002432 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002433 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002434 * instead
2435 */
2436 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002437 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 -08002438
2439 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002440 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002441 */
2442 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002443 public static final String WIFI_ON = Global.WIFI_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002444
2445 /**
2446 * @deprecated Use
2447 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE}
2448 * instead
2449 */
2450 @Deprecated
2451 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
2452 Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE;
2453
2454 /**
2455 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead
2456 */
2457 @Deprecated
2458 public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT;
2459
2460 /**
2461 * @deprecated Use
2462 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead
2463 */
2464 @Deprecated
2465 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
2466 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002467
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002468 /**
2469 * @deprecated Use
2470 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead
2471 */
2472 @Deprecated
2473 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
2474 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED;
2475
2476 /**
2477 * @deprecated Use
2478 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS}
2479 * instead
2480 */
2481 @Deprecated
2482 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
2483 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS;
2484
2485 /**
2486 * @deprecated Use
2487 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead
2488 */
2489 @Deprecated
2490 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
2491 Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT;
2492
2493 /**
2494 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS}
2495 * instead
2496 */
2497 @Deprecated
2498 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS;
2499
2500 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002501 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002502 */
2503 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07002504 public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002505
2506 /**
2507 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead
2508 */
2509 @Deprecated
2510 public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT;
2511
2512 /**
2513 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS}
2514 * instead
2515 */
2516 @Deprecated
2517 public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS;
2518
2519 /**
2520 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS}
2521 * instead
2522 */
2523 @Deprecated
2524 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS =
2525 Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS;
2526 }
2527
2528 /**
2529 * Secure system settings, containing system preferences that applications
2530 * can read but are not allowed to write. These are for preferences that
2531 * the user must explicitly modify through the system UI or specialized
2532 * APIs for those values, not modified directly by applications.
2533 */
2534 public static final class Secure extends NameValueTable {
2535 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
2536
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08002537 // Populated lazily, guarded by class object:
2538 private static NameValueCache sNameValueCache = null;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002539
Amith Yamasani52c489c2012-03-28 11:42:42 -07002540 private static ILockSettings sLockSettings = null;
2541
Amith Yamasani7ab8c4a2012-04-06 09:27:12 -07002542 private static boolean sIsSystemProcess;
Amith Yamasani52c489c2012-03-28 11:42:42 -07002543 private static final HashSet<String> MOVED_TO_LOCK_SETTINGS;
Christopher Tate06efb532012-08-24 15:29:27 -07002544 private static final HashSet<String> MOVED_TO_GLOBAL;
Amith Yamasani52c489c2012-03-28 11:42:42 -07002545 static {
2546 MOVED_TO_LOCK_SETTINGS = new HashSet<String>(3);
2547 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED);
2548 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE);
2549 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
Christopher Tate06efb532012-08-24 15:29:27 -07002550
2551 MOVED_TO_GLOBAL = new HashSet<String>();
2552 MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED);
2553 MOVED_TO_GLOBAL.add(Settings.Global.ASSISTED_GPS_ENABLED);
2554 MOVED_TO_GLOBAL.add(Settings.Global.BLUETOOTH_ON);
2555 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_CELL_BROADCAST_SMS);
2556 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_ROAMING_MODE);
2557 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_SUBSCRIPTION_MODE);
2558 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE);
2559 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI);
2560 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ROAMING);
2561 MOVED_TO_GLOBAL.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED);
2562 MOVED_TO_GLOBAL.add(Settings.Global.DEVICE_PROVISIONED);
2563 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_DENSITY_FORCED);
2564 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_SIZE_FORCED);
2565 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE);
2566 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE);
2567 MOVED_TO_GLOBAL.add(Settings.Global.INSTALL_NON_MARKET_APPS);
2568 MOVED_TO_GLOBAL.add(Settings.Global.MOBILE_DATA);
2569 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION);
2570 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_DELETE_AGE);
2571 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES);
2572 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE);
2573 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_ENABLED);
2574 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES);
2575 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_POLL_INTERVAL);
2576 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_REPORT_XT_OVER_DEV);
2577 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_SAMPLE_ENABLED);
2578 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE);
2579 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION);
2580 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_DELETE_AGE);
2581 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES);
2582 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_ROTATE_AGE);
2583 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION);
2584 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE);
2585 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES);
2586 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE);
2587 MOVED_TO_GLOBAL.add(Settings.Global.NETWORK_PREFERENCE);
2588 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_DIFF);
2589 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING);
2590 MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER);
2591 MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT);
2592 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT);
2593 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS);
2594 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT);
2595 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS);
2596 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT);
2597 MOVED_TO_GLOBAL.add(Settings.Global.SAMPLING_PROFILER_MS);
2598 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL);
2599 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST);
2600 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL);
2601 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_APN);
2602 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_REQUIRED);
2603 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_SUPPORTED);
2604 MOVED_TO_GLOBAL.add(Settings.Global.THROTTLE_HELP_URI);
2605 MOVED_TO_GLOBAL.add(Settings.Global.THROTTLE_MAX_NTP_CACHE_AGE_SEC);
2606 MOVED_TO_GLOBAL.add(Settings.Global.THROTTLE_NOTIFICATION_TYPE);
2607 MOVED_TO_GLOBAL.add(Settings.Global.THROTTLE_POLLING_SEC);
2608 MOVED_TO_GLOBAL.add(Settings.Global.THROTTLE_RESET_DAY);
2609 MOVED_TO_GLOBAL.add(Settings.Global.THROTTLE_THRESHOLD_BYTES);
2610 MOVED_TO_GLOBAL.add(Settings.Global.THROTTLE_VALUE_KBITSPS);
2611 MOVED_TO_GLOBAL.add(Settings.Global.USB_MASS_STORAGE_ENABLED);
2612 MOVED_TO_GLOBAL.add(Settings.Global.USE_GOOGLE_MAIL);
2613 MOVED_TO_GLOBAL.add(Settings.Global.WEB_AUTOFILL_QUERY_URL);
2614 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_COUNTRY_CODE);
2615 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS);
2616 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FREQUENCY_BAND);
2617 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_IDLE_MS);
2618 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT);
2619 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS);
2620 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON);
2621 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY);
2622 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT);
2623 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON);
2624 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME);
2625 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SAVED_STATE);
2626 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS);
2627 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED);
2628 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_NUM_ARP_PINGS);
2629 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_ON);
2630 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED);
2631 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS);
2632 MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON);
Christopher Tatec868b642012-09-12 17:41:04 -07002633 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_ENABLE);
2634 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT);
2635 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE);
2636 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS);
2637 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS);
2638 MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS);
Christopher Tate06efb532012-08-24 15:29:27 -07002639 MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL);
2640 }
2641
2642 private static void lazyInitCache() {
2643 if (sNameValueCache == null) {
2644 sNameValueCache = new NameValueCache(
2645 SYS_PROP_SETTING_VERSION + '_' + UserHandle.myUserId(),
2646 CONTENT_URI,
2647 CALL_METHOD_GET_SECURE,
2648 CALL_METHOD_PUT_SECURE);
2649 }
Amith Yamasani52c489c2012-03-28 11:42:42 -07002650 }
2651
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002652 /**
2653 * Look up a name in the database.
2654 * @param resolver to access the database with
2655 * @param name to look up in the table
2656 * @return the corresponding value, or null if not present
2657 */
2658 public synchronized static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07002659 return getStringForUser(resolver, name, UserHandle.myUserId());
2660 }
2661
2662 /** @hide */
2663 public synchronized static String getStringForUser(ContentResolver resolver, String name,
2664 int userHandle) {
2665 if (MOVED_TO_GLOBAL.contains(name)) {
2666 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure"
2667 + " to android.provider.Settings.Global.");
2668 return Global.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002669 }
Amith Yamasani52c489c2012-03-28 11:42:42 -07002670
2671 if (sLockSettings == null) {
2672 sLockSettings = ILockSettings.Stub.asInterface(
2673 (IBinder) ServiceManager.getService("lock_settings"));
Amith Yamasani7ab8c4a2012-04-06 09:27:12 -07002674 sIsSystemProcess = Process.myUid() == Process.SYSTEM_UID;
Amith Yamasani52c489c2012-03-28 11:42:42 -07002675 }
Amith Yamasani7ab8c4a2012-04-06 09:27:12 -07002676 if (sLockSettings != null && !sIsSystemProcess
2677 && MOVED_TO_LOCK_SETTINGS.contains(name)) {
Amith Yamasani52c489c2012-03-28 11:42:42 -07002678 try {
Christopher Tate06efb532012-08-24 15:29:27 -07002679 return sLockSettings.getString(name, "0", userHandle);
Amith Yamasani52c489c2012-03-28 11:42:42 -07002680 } catch (RemoteException re) {
2681 // Fall through
2682 }
2683 }
2684
Christopher Tate06efb532012-08-24 15:29:27 -07002685 lazyInitCache();
2686 return sNameValueCache.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002687 }
2688
2689 /**
2690 * Store a name/value pair into the database.
2691 * @param resolver to access the database with
2692 * @param name to store
2693 * @param value to associate with the name
2694 * @return true if the value was set, false on database errors
2695 */
Christopher Tate06efb532012-08-24 15:29:27 -07002696 public static boolean putString(ContentResolver resolver, String name, String value) {
2697 return putStringForUser(resolver, name, value, UserHandle.myUserId());
2698 }
2699
2700 /** @hide */
2701 public static boolean putStringForUser(ContentResolver resolver, String name, String value,
2702 int userHandle) {
2703 if (MOVED_TO_GLOBAL.contains(name)) {
2704 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
2705 + " to android.provider.Settings.Global");
2706 return Global.putStringForUser(resolver, name, value, userHandle);
2707 }
2708 lazyInitCache();
2709 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002710 }
2711
2712 /**
2713 * Construct the content URI for a particular name/value pair,
2714 * useful for monitoring changes with a ContentObserver.
2715 * @param name to look up in the table
2716 * @return the corresponding content URI, or null if not present
2717 */
2718 public static Uri getUriFor(String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07002719 if (MOVED_TO_GLOBAL.contains(name)) {
2720 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure"
2721 + " to android.provider.Settings.Global, returning global URI.");
2722 return Global.getUriFor(Global.CONTENT_URI, name);
2723 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002724 return getUriFor(CONTENT_URI, name);
2725 }
2726
2727 /**
2728 * Convenience function for retrieving a single secure settings value
2729 * as an integer. Note that internally setting values are always
2730 * stored as strings; this function converts the string to an integer
2731 * for you. The default value will be returned if the setting is
2732 * not defined or not an integer.
2733 *
2734 * @param cr The ContentResolver to access.
2735 * @param name The name of the setting to retrieve.
2736 * @param def Value to return if the setting is not defined.
2737 *
2738 * @return The setting's current value, or 'def' if it is not defined
2739 * or not a valid integer.
2740 */
2741 public static int getInt(ContentResolver cr, String name, int def) {
Christopher Tate06efb532012-08-24 15:29:27 -07002742 return getIntForUser(cr, name, def, UserHandle.myUserId());
2743 }
2744
2745 /** @hide */
2746 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
2747 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002748 try {
2749 return v != null ? Integer.parseInt(v) : def;
2750 } catch (NumberFormatException e) {
2751 return def;
2752 }
2753 }
2754
2755 /**
2756 * Convenience function for retrieving a single secure settings value
2757 * as an integer. Note that internally setting values are always
2758 * stored as strings; this function converts the string to an integer
2759 * for you.
2760 * <p>
2761 * This version does not take a default value. If the setting has not
2762 * been set, or the string value is not a number,
2763 * it throws {@link SettingNotFoundException}.
2764 *
2765 * @param cr The ContentResolver to access.
2766 * @param name The name of the setting to retrieve.
2767 *
2768 * @throws SettingNotFoundException Thrown if a setting by the given
2769 * name can't be found or the setting value is not an integer.
2770 *
2771 * @return The setting's current value.
2772 */
2773 public static int getInt(ContentResolver cr, String name)
2774 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07002775 return getIntForUser(cr, name, UserHandle.myUserId());
2776 }
2777
2778 /** @hide */
2779 public static int getIntForUser(ContentResolver cr, String name, int userHandle)
2780 throws SettingNotFoundException {
2781 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002782 try {
2783 return Integer.parseInt(v);
2784 } catch (NumberFormatException e) {
2785 throw new SettingNotFoundException(name);
2786 }
2787 }
2788
2789 /**
2790 * Convenience function for updating a single settings value as an
2791 * integer. This will either create a new entry in the table if the
2792 * given name does not exist, or modify the value of the existing row
2793 * with that name. Note that internally setting values are always
2794 * stored as strings, so this function converts the given value to a
2795 * string before storing it.
2796 *
2797 * @param cr The ContentResolver to access.
2798 * @param name The name of the setting to modify.
2799 * @param value The new value for the setting.
2800 * @return true if the value was set, false on database errors
2801 */
2802 public static boolean putInt(ContentResolver cr, String name, int value) {
Christopher Tate06efb532012-08-24 15:29:27 -07002803 return putIntForUser(cr, name, value, UserHandle.myUserId());
2804 }
2805
2806 /** @hide */
2807 public static boolean putIntForUser(ContentResolver cr, String name, int value,
2808 int userHandle) {
2809 return putStringForUser(cr, name, Integer.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002810 }
2811
2812 /**
2813 * Convenience function for retrieving a single secure settings value
2814 * as a {@code long}. Note that internally setting values are always
2815 * stored as strings; this function converts the string to a {@code long}
2816 * for you. The default value will be returned if the setting is
2817 * not defined or not a {@code long}.
2818 *
2819 * @param cr The ContentResolver to access.
2820 * @param name The name of the setting to retrieve.
2821 * @param def Value to return if the setting is not defined.
2822 *
2823 * @return The setting's current value, or 'def' if it is not defined
2824 * or not a valid {@code long}.
2825 */
2826 public static long getLong(ContentResolver cr, String name, long def) {
Christopher Tate06efb532012-08-24 15:29:27 -07002827 return getLongForUser(cr, name, def, UserHandle.myUserId());
2828 }
2829
2830 /** @hide */
2831 public static long getLongForUser(ContentResolver cr, String name, long def,
2832 int userHandle) {
2833 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002834 long value;
2835 try {
2836 value = valString != null ? Long.parseLong(valString) : def;
2837 } catch (NumberFormatException e) {
2838 value = def;
2839 }
2840 return value;
2841 }
2842
2843 /**
2844 * Convenience function for retrieving a single secure settings value
2845 * as a {@code long}. Note that internally setting values are always
2846 * stored as strings; this function converts the string to a {@code long}
2847 * for you.
2848 * <p>
2849 * This version does not take a default value. If the setting has not
2850 * been set, or the string value is not a number,
2851 * it throws {@link SettingNotFoundException}.
2852 *
2853 * @param cr The ContentResolver to access.
2854 * @param name The name of the setting to retrieve.
2855 *
2856 * @return The setting's current value.
2857 * @throws SettingNotFoundException Thrown if a setting by the given
2858 * name can't be found or the setting value is not an integer.
2859 */
2860 public static long getLong(ContentResolver cr, String name)
2861 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07002862 return getLongForUser(cr, name, UserHandle.myUserId());
2863 }
2864
2865 /** @hide */
2866 public static long getLongForUser(ContentResolver cr, String name, int userHandle)
2867 throws SettingNotFoundException {
2868 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002869 try {
2870 return Long.parseLong(valString);
2871 } catch (NumberFormatException e) {
2872 throw new SettingNotFoundException(name);
2873 }
2874 }
2875
2876 /**
2877 * Convenience function for updating a secure settings value as a long
2878 * integer. This will either create a new entry in the table if the
2879 * given name does not exist, or modify the value of the existing row
2880 * with that name. Note that internally setting values are always
2881 * stored as strings, so this function converts the given value to a
2882 * string before storing it.
2883 *
2884 * @param cr The ContentResolver to access.
2885 * @param name The name of the setting to modify.
2886 * @param value The new value for the setting.
2887 * @return true if the value was set, false on database errors
2888 */
2889 public static boolean putLong(ContentResolver cr, String name, long value) {
Christopher Tate06efb532012-08-24 15:29:27 -07002890 return putLongForUser(cr, name, value, UserHandle.myUserId());
2891 }
2892
2893 /** @hide */
2894 public static boolean putLongForUser(ContentResolver cr, String name, long value,
2895 int userHandle) {
2896 return putStringForUser(cr, name, Long.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002897 }
2898
2899 /**
2900 * Convenience function for retrieving a single secure settings value
2901 * as a floating point number. Note that internally setting values are
2902 * always stored as strings; this function converts the string to an
2903 * float for you. The default value will be returned if the setting
2904 * is not defined or not a valid float.
2905 *
2906 * @param cr The ContentResolver to access.
2907 * @param name The name of the setting to retrieve.
2908 * @param def Value to return if the setting is not defined.
2909 *
2910 * @return The setting's current value, or 'def' if it is not defined
2911 * or not a valid float.
2912 */
2913 public static float getFloat(ContentResolver cr, String name, float def) {
Christopher Tate06efb532012-08-24 15:29:27 -07002914 return getFloatForUser(cr, name, def, UserHandle.myUserId());
2915 }
2916
2917 /** @hide */
2918 public static float getFloatForUser(ContentResolver cr, String name, float def,
2919 int userHandle) {
2920 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002921 try {
2922 return v != null ? Float.parseFloat(v) : def;
2923 } catch (NumberFormatException e) {
2924 return def;
2925 }
2926 }
2927
2928 /**
2929 * Convenience function for retrieving a single secure settings value
2930 * as a float. Note that internally setting values are always
2931 * stored as strings; this function converts the string to a float
2932 * for you.
2933 * <p>
2934 * This version does not take a default value. If the setting has not
2935 * been set, or the string value is not a number,
2936 * it throws {@link SettingNotFoundException}.
2937 *
2938 * @param cr The ContentResolver to access.
2939 * @param name The name of the setting to retrieve.
2940 *
2941 * @throws SettingNotFoundException Thrown if a setting by the given
2942 * name can't be found or the setting value is not a float.
2943 *
2944 * @return The setting's current value.
2945 */
2946 public static float getFloat(ContentResolver cr, String name)
2947 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07002948 return getFloatForUser(cr, name, UserHandle.myUserId());
2949 }
2950
2951 /** @hide */
2952 public static float getFloatForUser(ContentResolver cr, String name, int userHandle)
2953 throws SettingNotFoundException {
2954 String v = getStringForUser(cr, name, userHandle);
Brian Muramatsue1d46982010-12-06 17:34:20 -08002955 if (v == null) {
2956 throw new SettingNotFoundException(name);
2957 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002958 try {
2959 return Float.parseFloat(v);
2960 } catch (NumberFormatException e) {
2961 throw new SettingNotFoundException(name);
2962 }
2963 }
2964
2965 /**
2966 * Convenience function for updating a single settings value as a
2967 * floating point number. This will either create a new entry in the
2968 * table if the given name does not exist, or modify the value of the
2969 * existing row with that name. Note that internally setting values
2970 * are always stored as strings, so this function converts the given
2971 * value to a string before storing it.
2972 *
2973 * @param cr The ContentResolver to access.
2974 * @param name The name of the setting to modify.
2975 * @param value The new value for the setting.
2976 * @return true if the value was set, false on database errors
2977 */
2978 public static boolean putFloat(ContentResolver cr, String name, float value) {
Christopher Tate06efb532012-08-24 15:29:27 -07002979 return putFloatForUser(cr, name, value, UserHandle.myUserId());
2980 }
2981
2982 /** @hide */
2983 public static boolean putFloatForUser(ContentResolver cr, String name, float value,
2984 int userHandle) {
2985 return putStringForUser(cr, name, Float.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002986 }
2987
2988 /**
2989 * The content:// style URL for this table
2990 */
2991 public static final Uri CONTENT_URI =
2992 Uri.parse("content://" + AUTHORITY + "/secure");
2993
2994 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002995 * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED}
2996 * instead
Dianne Hackborn895f99e2012-02-02 11:49:12 -08002997 */
Christopher Tate06efb532012-08-24 15:29:27 -07002998 @Deprecated
2999 public static final String DEVELOPMENT_SETTINGS_ENABLED =
3000 Global.DEVELOPMENT_SETTINGS_ENABLED;
Dianne Hackborn895f99e2012-02-02 11:49:12 -08003001
3002 /**
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07003003 * When the user has enable the option to have a "bug report" command
3004 * in the power menu.
3005 * @hide
3006 */
3007 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu";
3008
3009 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003010 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003011 */
Christopher Tate06efb532012-08-24 15:29:27 -07003012 @Deprecated
3013 public static final String ADB_ENABLED = Global.ADB_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003014
3015 /**
3016 * Setting to allow mock locations and location provider status to be injected into the
3017 * LocationManager service for testing purposes during application development. These
3018 * locations and status values override actual location and status information generated
3019 * by network, gps, or other location providers.
3020 */
3021 public static final String ALLOW_MOCK_LOCATION = "mock_location";
3022
3023 /**
Doug Zongkerd8893db2010-01-26 12:29:44 -08003024 * A 64-bit number (as a hex string) that is randomly
3025 * generated on the device's first boot and should remain
3026 * constant for the lifetime of the device. (The value may
3027 * change if a factory reset is performed on the device.)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003028 */
3029 public static final String ANDROID_ID = "android_id";
3030
3031 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003032 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003033 */
Christopher Tate06efb532012-08-24 15:29:27 -07003034 @Deprecated
3035 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003036
3037 /**
3038 * Get the key that retrieves a bluetooth headset's priority.
3039 * @hide
3040 */
3041 public static final String getBluetoothHeadsetPriorityKey(String address) {
3042 return ("bluetooth_headset_priority_" + address.toUpperCase());
3043 }
3044
3045 /**
3046 * Get the key that retrieves a bluetooth a2dp sink's priority.
3047 * @hide
3048 */
3049 public static final String getBluetoothA2dpSinkPriorityKey(String address) {
3050 return ("bluetooth_a2dp_sink_priority_" + address.toUpperCase());
3051 }
3052
3053 /**
Jaikumar Ganesh545e6702010-06-04 10:23:03 -07003054 * Get the key that retrieves a bluetooth Input Device's priority.
3055 * @hide
3056 */
3057 public static final String getBluetoothInputDevicePriorityKey(String address) {
3058 return ("bluetooth_input_device_priority_" + address.toUpperCase());
3059 }
3060
3061 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003062 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003063 */
Christopher Tate06efb532012-08-24 15:29:27 -07003064 public static final String DATA_ROAMING = Global.DATA_ROAMING;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003065
3066 /**
3067 * Setting to record the input method used by default, holding the ID
3068 * of the desired method.
3069 */
3070 public static final String DEFAULT_INPUT_METHOD = "default_input_method";
3071
3072 /**
satokab751aa2010-09-14 19:17:36 +09003073 * Setting to record the input method subtype used by default, holding the ID
3074 * of the desired method.
3075 */
3076 public static final String SELECTED_INPUT_METHOD_SUBTYPE =
3077 "selected_input_method_subtype";
3078
3079 /**
satok723a27e2010-11-11 14:58:11 +09003080 * Setting to record the history of input method subtype, holding the pair of ID of IME
3081 * and its last used subtype.
3082 * @hide
3083 */
3084 public static final String INPUT_METHODS_SUBTYPE_HISTORY =
3085 "input_methods_subtype_history";
3086
3087 /**
satok5c58dfc2010-12-14 21:54:47 +09003088 * Setting to record the visibility of input method selector
3089 */
3090 public static final String INPUT_METHOD_SELECTOR_VISIBILITY =
3091 "input_method_selector_visibility";
3092
3093 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003094 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003095 */
Christopher Tate06efb532012-08-24 15:29:27 -07003096 @Deprecated
3097 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003098
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003099 /**
3100 * List of input methods that are currently enabled. This is a string
3101 * containing the IDs of all enabled input methods, each ID separated
3102 * by ':'.
3103 */
3104 public static final String ENABLED_INPUT_METHODS = "enabled_input_methods";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003105
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003106 /**
Amith Yamasanie861ec12010-03-24 21:39:27 -07003107 * List of system input methods that are currently disabled. This is a string
3108 * containing the IDs of all disabled input methods, each ID separated
3109 * by ':'.
3110 * @hide
3111 */
3112 public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods";
3113
3114 /**
Robert Greenwalt434203a2010-10-11 16:00:27 -07003115 * Host name and port for global http proxy. Uses ':' seperator for between host and port
3116 * TODO - deprecate in favor of global_http_proxy_host, etc
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003117 */
3118 public static final String HTTP_PROXY = "http_proxy";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003119
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003120 /**
Robert Greenwalt434203a2010-10-11 16:00:27 -07003121 * Host name for global http proxy. Set via ConnectivityManager.
3122 * @hide
3123 */
3124 public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host";
3125
3126 /**
3127 * Integer host port for global http proxy. Set via ConnectivityManager.
3128 * @hide
3129 */
3130 public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port";
3131
3132 /**
Oscar Montemayor16fb7912010-08-02 09:38:48 -07003133 * Exclusion list for global proxy. This string contains a list of comma-separated
3134 * domains where the global proxy does not apply. Domains should be listed in a comma-
3135 * separated list. Example of acceptable formats: ".domain1.com,my.domain2.com"
Robert Greenwalt434203a2010-10-11 16:00:27 -07003136 * Use ConnectivityManager to set/get.
Oscar Montemayor16fb7912010-08-02 09:38:48 -07003137 * @hide
3138 */
Robert Greenwalt434203a2010-10-11 16:00:27 -07003139 public static final String GLOBAL_HTTP_PROXY_EXCLUSION_LIST =
3140 "global_http_proxy_exclusion_list";
Oscar Montemayor16fb7912010-08-02 09:38:48 -07003141
3142 /**
3143 * Enables the UI setting to allow the user to specify the global HTTP proxy
3144 * and associated exclusion list.
3145 * @hide
3146 */
3147 public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy";
3148
3149 /**
Robert Greenwalte90aa5e2010-09-01 11:34:05 -07003150 * Setting for default DNS in case nobody suggests one
3151 * @hide
3152 */
3153 public static final String DEFAULT_DNS_SERVER = "default_dns_server";
3154
3155 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003156 * @deprecated Use {@link android.provider.Settings.Global#INSTALL_NON_MARKET_APPS} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003157 */
Christopher Tate06efb532012-08-24 15:29:27 -07003158 @Deprecated
3159 public static final String INSTALL_NON_MARKET_APPS = Global.INSTALL_NON_MARKET_APPS;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003160
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003161 /**
3162 * Comma-separated list of location providers that activities may access.
3163 */
3164 public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003165
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003166 /**
Danielle Millett925a7d82012-03-19 18:02:20 -04003167 * A flag containing settings used for biometric weak
3168 * @hide
3169 */
3170 public static final String LOCK_BIOMETRIC_WEAK_FLAGS =
3171 "lock_biometric_weak_flags";
3172
3173 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08003174 * Whether autolock is enabled (0 = false, 1 = true)
3175 */
3176 public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
3177
3178 /**
3179 * Whether lock pattern is visible as user enters (0 = false, 1 = true)
3180 */
3181 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
3182
3183 /**
3184 * Whether lock pattern will vibrate as user enters (0 = false, 1 = true)
3185 */
3186 public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED =
3187 "lock_pattern_tactile_feedback_enabled";
3188
3189 /**
Jim Millerbc4603b2010-08-30 21:21:34 -07003190 * This preference allows the device to be locked given time after screen goes off,
3191 * subject to current DeviceAdmin policy limits.
3192 * @hide
3193 */
3194 public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout";
3195
3196
3197 /**
Jim Miller253a5ef2010-10-13 20:57:29 -07003198 * This preference contains the string that shows for owner info on LockScren.
3199 * @hide
3200 */
3201 public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info";
3202
3203 /**
Jim Millerf229e4d2012-09-12 20:32:50 -07003204 * Id of the time appwidget on the lockscreen, or -1 if none
3205 * @hide
3206 */
3207 public static final String LOCK_SCREEN_CLOCK_APPWIDGET_ID =
3208 "lock_screen_clock_appwidget_id";
3209
3210 /**
3211 * Id of the user-selected appwidget on the lockscreen, or -1 if none
3212 * @hide
3213 */
3214 public static final String LOCK_SCREEN_USER_SELECTED_APPWIDGET_ID =
3215 "lock_screen_user_selected_appwidget_id";
3216
3217 /**
Jim Miller253a5ef2010-10-13 20:57:29 -07003218 * This preference enables showing the owner info on LockScren.
3219 * @hide
3220 */
3221 public static final String LOCK_SCREEN_OWNER_INFO_ENABLED =
3222 "lock_screen_owner_info_enabled";
3223
3224 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003225 * @deprecated Use {@link android.provider.Settings.Global#DISPLAY_SIZE_FORCED} instead
Joe Onorato571ae902011-05-24 13:48:43 -07003226 * @hide
3227 */
Christopher Tate06efb532012-08-24 15:29:27 -07003228 @Deprecated
3229 public static final String DISPLAY_SIZE_FORCED = Global.DISPLAY_SIZE_FORCED;
Joe Onorato571ae902011-05-24 13:48:43 -07003230
3231 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003232 * @deprecated Use {@link android.provider.Settings.Global#DISPLAY_DENSITY_FORCED} instead
Dianne Hackborndde331c2012-08-03 14:01:57 -07003233 * @hide
3234 */
Christopher Tate06efb532012-08-24 15:29:27 -07003235 @Deprecated
3236 public static final String DISPLAY_DENSITY_FORCED = Global.DISPLAY_DENSITY_FORCED;
Dianne Hackborndde331c2012-08-03 14:01:57 -07003237
3238 /**
Jake Hamby76a61422012-09-06 17:40:21 -07003239 * @deprecated Use {@link android.provider.Settings.Global#ASSISTED_GPS_ENABLED} instead
Mike Lockwoodbcab8df2009-06-25 16:39:09 -04003240 * @hide
3241 */
Christopher Tate06efb532012-08-24 15:29:27 -07003242 @Deprecated
3243 public static final String ASSISTED_GPS_ENABLED = Global.ASSISTED_GPS_ENABLED;
Mike Lockwoodbcab8df2009-06-25 16:39:09 -04003244
3245 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003246 * The Logging ID (a unique 64-bit value) as a hex string.
3247 * Used as a pseudonymous identifier for logging.
3248 * @deprecated This identifier is poorly initialized and has
3249 * many collisions. It should not be used.
3250 */
3251 @Deprecated
3252 public static final String LOGGING_ID = "logging_id";
3253
3254 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003255 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003256 */
Christopher Tate06efb532012-08-24 15:29:27 -07003257 @Deprecated
3258 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003259
3260 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003261 * @deprecated Use {@link android.provider.Settings.Global#TETHER_SUPPORTED} instead
Robert Greenwalt2a091d72010-02-11 18:18:40 -08003262 * @hide
3263 */
Christopher Tate06efb532012-08-24 15:29:27 -07003264 @Deprecated
3265 public static final String TETHER_SUPPORTED = Global.TETHER_SUPPORTED;
Robert Greenwalt2a091d72010-02-11 18:18:40 -08003266
3267 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003268 * @deprecated Use {@link android.provider.Settings.Global#TETHER_DUN_REQUIRED} instead
Robert Greenwalt77b32dd2010-06-03 18:57:26 -07003269 * @hide
3270 */
Christopher Tate06efb532012-08-24 15:29:27 -07003271 @Deprecated
3272 public static final String TETHER_DUN_REQUIRED = Global.TETHER_DUN_REQUIRED;
Robert Greenwalt77b32dd2010-06-03 18:57:26 -07003273
3274 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003275 * @deprecated Use {@link android.provider.Settings.Global#TETHER_DUN_REQUIRED} instead
Robert Greenwalt77b32dd2010-06-03 18:57:26 -07003276 * @hide
3277 */
Christopher Tate06efb532012-08-24 15:29:27 -07003278 @Deprecated
3279 public static final String TETHER_DUN_APN = Global.TETHER_DUN_APN;
Robert Greenwalt77b32dd2010-06-03 18:57:26 -07003280
Christopher Tate06efb532012-08-24 15:29:27 -07003281 /**
3282 * @deprecated Use {@link android.provider.Settings.Global#DATA_ACTIVITY_TIMEOUT_MOBILE}
3283 * instead
Haoyu Bai04124232012-06-28 15:26:19 -07003284 * @hide
3285 */
Christopher Tate06efb532012-08-24 15:29:27 -07003286 @Deprecated
3287 public static final String DATA_ACTIVITY_TIMEOUT_MOBILE =
3288 Global.DATA_ACTIVITY_TIMEOUT_MOBILE;
Haoyu Bai04124232012-06-28 15:26:19 -07003289
Christopher Tate06efb532012-08-24 15:29:27 -07003290 /**
3291 * @deprecated Use {@link android.provider.Settings.Global#DATA_ACTIVITY_TIMEOUT_MOBILE}
3292 * instead
Haoyu Bai04124232012-06-28 15:26:19 -07003293 * @hide
3294 */
Christopher Tate06efb532012-08-24 15:29:27 -07003295 @Deprecated
3296 public static final String DATA_ACTIVITY_TIMEOUT_WIFI = Global.DATA_ACTIVITY_TIMEOUT_WIFI;
Haoyu Bai04124232012-06-28 15:26:19 -07003297
Robert Greenwalt77b32dd2010-06-03 18:57:26 -07003298 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08003299 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003300 */
3301 public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003302
3303 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08003304 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003305 */
3306 public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003307
3308 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08003309 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003310 */
3311 public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003312
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003313 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003314 * @deprecated Use {@link android.provider.Settings.Global#SAMPLING_PROFILER_MS} instead
Sen Hubde75702010-05-28 01:54:03 -07003315 * @hide
3316 */
Christopher Tate06efb532012-08-24 15:29:27 -07003317 @Deprecated
3318 public static final String SAMPLING_PROFILER_MS = Global.SAMPLING_PROFILER_MS;
Sen Hubde75702010-05-28 01:54:03 -07003319
3320 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003321 * Settings classname to launch when Settings is clicked from All
3322 * Applications. Needed because of user testing between the old
3323 * and new Settings apps.
3324 */
3325 // TODO: 881807
3326 public static final String SETTINGS_CLASSNAME = "settings_classname";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003327
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003328 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003329 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003330 */
Christopher Tate06efb532012-08-24 15:29:27 -07003331 @Deprecated
3332 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003333
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003334 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003335 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003336 */
Christopher Tate06efb532012-08-24 15:29:27 -07003337 @Deprecated
3338 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003339
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003340 /**
svetoslavganov75986cf2009-05-14 22:28:01 -07003341 * If accessibility is enabled.
3342 */
3343 public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled";
3344
3345 /**
Svetoslav Ganov00aabf72011-07-21 11:35:03 -07003346 * If touch exploration is enabled.
Svetoslav Ganov35bfede2011-07-14 17:57:06 -07003347 */
Svetoslav Ganov00aabf72011-07-21 11:35:03 -07003348 public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled";
Svetoslav Ganov35bfede2011-07-14 17:57:06 -07003349
3350 /**
svetoslavganov75986cf2009-05-14 22:28:01 -07003351 * List of the enabled accessibility providers.
3352 */
3353 public static final String ENABLED_ACCESSIBILITY_SERVICES =
3354 "enabled_accessibility_services";
3355
3356 /**
Svetoslav Ganov9a4c5cd2012-05-30 14:06:32 -07003357 * List of the accessibility services to which the user has graned
3358 * permission to put the device into touch exploration mode.
3359 *
3360 * @hide
3361 */
3362 public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES =
3363 "touch_exploration_granted_accessibility_services";
3364
3365 /**
Svetoslav Ganov55f937a2011-12-05 11:42:07 -08003366 * Whether to speak passwords while in accessibility mode.
3367 */
3368 public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
3369
3370 /**
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08003371 * If injection of accessibility enhancing JavaScript screen-reader
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07003372 * is enabled.
3373 * <p>
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08003374 * Note: The JavaScript based screen-reader is served by the
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07003375 * Google infrastructure and enable users with disabilities to
3376 * efficiantly navigate in and explore web content.
3377 * </p>
3378 * <p>
3379 * This property represents a boolean value.
3380 * </p>
3381 * @hide
3382 */
3383 public static final String ACCESSIBILITY_SCRIPT_INJECTION =
3384 "accessibility_script_injection";
3385
3386 /**
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08003387 * The URL for the injected JavaScript based screen-reader used
3388 * for providing accessiblity of content in WebView.
3389 * <p>
3390 * Note: The JavaScript based screen-reader is served by the
3391 * Google infrastructure and enable users with disabilities to
3392 * efficiently navigate in and explore web content.
3393 * </p>
3394 * <p>
3395 * This property represents a string value.
3396 * </p>
3397 * @hide
3398 */
3399 public static final String ACCESSIBILITY_SCREEN_READER_URL =
3400 "accessibility_script_injection_url";
3401
3402 /**
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07003403 * Key bindings for navigation in built-in accessibility support for web content.
3404 * <p>
3405 * Note: These key bindings are for the built-in accessibility navigation for
3406 * web content which is used as a fall back solution if JavaScript in a WebView
3407 * is not enabled or the user has not opted-in script injection from Google.
3408 * </p>
3409 * <p>
3410 * The bindings are separated by semi-colon. A binding is a mapping from
3411 * a key to a sequence of actions (for more details look at
3412 * android.webkit.AccessibilityInjector). A key is represented as the hexademical
3413 * string representation of an integer obtained from a meta state (optional) shifted
3414 * sixteen times left and bitwise ored with a key code. An action is represented
3415 * as a hexademical string representation of an integer where the first two digits
3416 * are navigation action index, the second, the third, and the fourth digit pairs
3417 * represent the action arguments. The separate actions in a binding are colon
3418 * separated. The key and the action sequence it maps to are separated by equals.
3419 * </p>
3420 * <p>
3421 * For example, the binding below maps the DPAD right button to traverse the
3422 * current navigation axis once without firing an accessibility event and to
3423 * perform the same traversal again but to fire an event:
3424 * <code>
3425 * 0x16=0x01000100:0x01000101;
3426 * </code>
3427 * </p>
3428 * <p>
3429 * The goal of this binding is to enable dynamic rebinding of keys to
3430 * navigation actions for web content without requiring a framework change.
3431 * </p>
3432 * <p>
3433 * This property represents a string value.
3434 * </p>
3435 * @hide
3436 */
3437 public static final String ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS =
3438 "accessibility_web_content_key_bindings";
3439
3440 /**
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -07003441 * Setting that specifies whether the display magnification is enabled.
3442 * Display magnifications allows the user to zoom in the display content
3443 * and is targeted to low vision users. The current magnification scale
3444 * is controlled by {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}.
3445 *
3446 * @hide
3447 */
3448 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED =
3449 "accessibility_display_magnification_enabled";
3450
3451 /**
3452 * Setting that specifies what the display magnification scale is.
3453 * Display magnifications allows the user to zoom in the display
3454 * content and is targeted to low vision users. Whether a display
3455 * magnification is performed is controlled by
3456 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED}
3457 *
3458 * @hide
3459 */
3460 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE =
3461 "accessibility_display_magnification_scale";
3462
3463 /**
3464 * Setting that specifies whether the display magnification should be
3465 * automatically updated. If this fearture is enabled the system will
3466 * exit magnification mode or pan the viewport when a context change
3467 * occurs. For example, on staring a new activity or rotating the screen,
3468 * the system may zoom out so the user can see the new context he is in.
3469 * Another example is on showing a window that is not visible in the
3470 * magnified viewport the system may pan the viewport to make the window
3471 * the has popped up so the user knows that the context has changed.
3472 * Whether a screen magnification is performed is controlled by
3473 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED}
3474 *
3475 * @hide
3476 */
3477 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE =
3478 "accessibility_display_magnification_auto_update";
3479
3480 /**
Svetoslav Ganov54d068e2011-03-02 12:58:40 -08003481 * The timout for considering a press to be a long press in milliseconds.
3482 * @hide
3483 */
3484 public static final String LONG_PRESS_TIMEOUT = "long_press_timeout";
3485
3486 /**
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07003487 * Setting to always use the default text-to-speech settings regardless
3488 * of the application settings.
3489 * 1 = override application settings,
3490 * 0 = use application settings (if specified).
Narayan Kamath6d632962011-08-24 11:51:37 +01003491 *
3492 * @deprecated The value of this setting is no longer respected by
3493 * the framework text to speech APIs as of the Ice Cream Sandwich release.
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07003494 */
Narayan Kamath6d632962011-08-24 11:51:37 +01003495 @Deprecated
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07003496 public static final String TTS_USE_DEFAULTS = "tts_use_defaults";
3497
3498 /**
3499 * Default text-to-speech engine speech rate. 100 = 1x
3500 */
3501 public static final String TTS_DEFAULT_RATE = "tts_default_rate";
3502
3503 /**
3504 * Default text-to-speech engine pitch. 100 = 1x
3505 */
3506 public static final String TTS_DEFAULT_PITCH = "tts_default_pitch";
3507
3508 /**
3509 * Default text-to-speech engine.
3510 */
3511 public static final String TTS_DEFAULT_SYNTH = "tts_default_synth";
3512
3513 /**
Jean-Michel Trivif4782672009-06-09 16:22:48 -07003514 * Default text-to-speech language.
Narayan Kamath6d632962011-08-24 11:51:37 +01003515 *
3516 * @deprecated this setting is no longer in use, as of the Ice Cream
3517 * Sandwich release. Apps should never need to read this setting directly,
3518 * instead can query the TextToSpeech framework classes for the default
3519 * locale. {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivif4782672009-06-09 16:22:48 -07003520 */
Narayan Kamath6d632962011-08-24 11:51:37 +01003521 @Deprecated
Jean-Michel Trivif4782672009-06-09 16:22:48 -07003522 public static final String TTS_DEFAULT_LANG = "tts_default_lang";
3523
3524 /**
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07003525 * Default text-to-speech country.
Narayan Kamath6d632962011-08-24 11:51:37 +01003526 *
3527 * @deprecated this setting is no longer in use, as of the Ice Cream
3528 * Sandwich release. Apps should never need to read this setting directly,
3529 * instead can query the TextToSpeech framework classes for the default
3530 * locale. {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07003531 */
Narayan Kamath6d632962011-08-24 11:51:37 +01003532 @Deprecated
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07003533 public static final String TTS_DEFAULT_COUNTRY = "tts_default_country";
3534
3535 /**
3536 * Default text-to-speech locale variant.
Narayan Kamath6d632962011-08-24 11:51:37 +01003537 *
3538 * @deprecated this setting is no longer in use, as of the Ice Cream
3539 * Sandwich release. Apps should never need to read this setting directly,
3540 * instead can query the TextToSpeech framework classes for the
3541 * locale that is in use {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07003542 */
Narayan Kamath6d632962011-08-24 11:51:37 +01003543 @Deprecated
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07003544 public static final String TTS_DEFAULT_VARIANT = "tts_default_variant";
3545
3546 /**
Narayan Kamathe5b8c4d2011-08-22 15:37:47 +01003547 * Stores the default tts locales on a per engine basis. Stored as
3548 * a comma seperated list of values, each value being of the form
3549 * {@code engine_name:locale} for example,
Narayan Kamath6d632962011-08-24 11:51:37 +01003550 * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This
3551 * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and
3552 * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this
3553 * setting directly, and can query the TextToSpeech framework classes
3554 * for the locale that is in use.
Narayan Kamathe5b8c4d2011-08-22 15:37:47 +01003555 *
3556 * @hide
3557 */
3558 public static final String TTS_DEFAULT_LOCALE = "tts_default_locale";
3559
3560 /**
Charles Chenceffa152010-03-16 21:18:10 -07003561 * Space delimited list of plugin packages that are enabled.
3562 */
3563 public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins";
3564
3565 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003566 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON}
3567 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003568 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003569 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003570 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003571 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
Robert Greenwalt8588e472011-11-08 10:12:25 -08003572 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003573 * @deprecated Moved to Global namespace
Robert Greenwalt8588e472011-11-08 10:12:25 -08003574 * {@hide}
3575 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003576 @Deprecated
tk.mun148c7d02011-10-13 22:51:57 +09003577 public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003578 Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003579
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003580 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003581 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY}
3582 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003583 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003584 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003585 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003586 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003587
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003588 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003589 * @deprecated Use {@link android.provider.Settings.Global#WIFI_COUNTRY_CODE}
3590 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003591 * @hide
3592 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003593 @Deprecated
3594 public static final String WIFI_COUNTRY_CODE = Global.WIFI_COUNTRY_CODE;
Irfan Sheriffed4f28b2010-10-29 15:32:10 -07003595
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003596
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003597 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003598 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT}
3599 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003600 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003601 @Deprecated
3602 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT =
3603 Global.WIFI_NUM_OPEN_NETWORKS_KEPT;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003604
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003605 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003606 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON}
3607 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003608 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003609 @Deprecated
3610 public static final String WIFI_ON = Global.WIFI_ON;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003611
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003612 /**
Irfan Sheriffa3bd4092010-03-24 17:58:59 -07003613 * Used to save the Wifi_ON state prior to tethering.
3614 * This state will be checked to restore Wifi after
3615 * the user turns off tethering.
Irfan Sheriff5321aef2010-02-12 12:35:59 -08003616 *
3617 * @hide
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003618 * @deprecated moved to Global
Irfan Sheriff5321aef2010-02-12 12:35:59 -08003619 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07003620 @Deprecated
3621 public static final String WIFI_SAVED_STATE = Global.WIFI_SAVED_STATE;
Irfan Sheriff5321aef2010-02-12 12:35:59 -08003622
3623 /**
Irfan Sheriff9ab518ad2010-03-12 15:48:17 -08003624 * AP SSID
3625 *
3626 * @hide
3627 */
3628 public static final String WIFI_AP_SSID = "wifi_ap_ssid";
3629
3630 /**
3631 * AP security
3632 *
3633 * @hide
3634 */
3635 public static final String WIFI_AP_SECURITY = "wifi_ap_security";
3636
3637 /**
3638 * AP passphrase
3639 *
3640 * @hide
3641 */
3642 public static final String WIFI_AP_PASSWD = "wifi_ap_passwd";
3643
3644 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003645 * The acceptable packet loss percentage (range 0 - 100) before trying
3646 * another AP on the same network.
3647 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003648 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003649 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
3650 "wifi_watchdog_acceptable_packet_loss_percentage";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003651
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003652 /**
3653 * The number of access points required for a network in order for the
3654 * watchdog to monitor it.
3655 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003656 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003657 public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003658
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003659 /**
3660 * The delay between background checks.
3661 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003662 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003663 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
3664 "wifi_watchdog_background_check_delay_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003665
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003666 /**
3667 * Whether the Wi-Fi watchdog is enabled for background checking even
3668 * after it thinks the user has connected to a good access point.
3669 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003670 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003671 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
3672 "wifi_watchdog_background_check_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003673
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003674 /**
3675 * The timeout for a background ping
3676 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003677 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003678 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
3679 "wifi_watchdog_background_check_timeout_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003680
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003681 /**
3682 * The number of initial pings to perform that *may* be ignored if they
3683 * fail. Again, if these fail, they will *not* be used in packet loss
3684 * calculation. For example, one network always seemed to time out for
3685 * the first couple pings, so this is set to 3 by default.
3686 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003687 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003688 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
3689 "wifi_watchdog_initial_ignored_ping_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003690
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003691 /**
3692 * The maximum number of access points (per network) to attempt to test.
3693 * If this number is reached, the watchdog will no longer monitor the
3694 * initial connection state for the network. This is a safeguard for
3695 * networks containing multiple APs whose DNS does not respond to pings.
3696 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003697 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003698 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003699
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003700 /**
3701 * Whether the Wi-Fi watchdog is enabled.
3702 */
3703 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
3704
3705 /**
3706 * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003707 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003708 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003709 public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list";
3710
3711 /**
3712 * The number of pings to test if an access point is a good connection.
3713 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003714 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003715 public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003716
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003717 /**
3718 * The delay between pings.
3719 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003720 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003721 public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003722
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003723 /**
3724 * The timeout per ping.
3725 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003726 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003727 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003728
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003729 /**
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003730 * ms delay before rechecking an 'online' wifi connection when it is thought to be unstable.
3731 * @hide
3732 */
Irfan Sheriff07573b32012-01-27 21:00:19 -08003733 public static final String WIFI_WATCHDOG_ARP_CHECK_INTERVAL_MS =
3734 "wifi_watchdog_arp_interval_ms";
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003735
3736 /**
Irfan Sheriff4c8982a2012-03-08 16:11:02 -08003737 * ms delay interval between rssi polling when the signal is known to be weak
3738 * @hide
3739 */
3740 public static final String WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS =
3741 "wifi_watchdog_rssi_fetch_interval_ms";
3742
3743
3744 /**
Irfan Sheriff07573b32012-01-27 21:00:19 -08003745 * Number of ARP pings per check.
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003746 * @hide
3747 */
Irfan Sheriff07573b32012-01-27 21:00:19 -08003748 public static final String WIFI_WATCHDOG_NUM_ARP_PINGS = "wifi_watchdog_num_arp_pings";
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003749
3750 /**
Irfan Sheriff07573b32012-01-27 21:00:19 -08003751 * Minimum number of responses to the arp pings to consider the test 'successful'.
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003752 * @hide
3753 */
Irfan Sheriff07573b32012-01-27 21:00:19 -08003754 public static final String WIFI_WATCHDOG_MIN_ARP_RESPONSES =
3755 "wifi_watchdog_min_arp_responses";
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003756
3757 /**
Irfan Sheriff07573b32012-01-27 21:00:19 -08003758 * Timeout on ARP pings
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003759 * @hide
3760 */
Irfan Sheriff07573b32012-01-27 21:00:19 -08003761 public static final String WIFI_WATCHDOG_ARP_PING_TIMEOUT_MS =
3762 "wifi_watchdog_arp_ping_timeout_ms";
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07003763
3764 /**
Irfan Sheriff07573b32012-01-27 21:00:19 -08003765 * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and
3766 * the setting needs to be set to 0 to disable it.
Irfan Sheriff19380da2011-12-06 14:41:14 -08003767 * @hide
3768 */
3769 public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED =
3770 "wifi_watchdog_poor_network_test_enabled";
3771
3772 /**
Irfan Sheriff3fb4ba62012-08-09 15:07:45 -07003773 * Setting to turn on suspend optimizations at screen off on Wi-Fi. Enabled by default and
3774 * needs to be set to 0 to disable it.
3775 * @hide
3776 */
3777 public static final String WIFI_SUSPEND_OPTIMIZATIONS_ENABLED =
3778 "wifi_suspend_optimizations_enabled";
3779
3780 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003781 * @deprecated Use
3782 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003783 */
Christopher Tate06efb532012-08-24 15:29:27 -07003784 @Deprecated
3785 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003786
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003787 /**
Irfan Sheriff36f74132010-11-04 16:57:37 -07003788 * The operational wifi frequency band
3789 * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO},
3790 * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or
3791 * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ}
3792 *
3793 * @hide
3794 */
3795 public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band";
3796
3797 /**
Irfan Sheriff2bdefca2012-04-25 16:40:14 -07003798 * The Wi-Fi peer-to-peer device name
3799 * @hide
3800 */
3801 public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name";
3802
3803 /**
Irfan Sheriffda6da092012-08-16 12:49:23 -07003804 * Setting to turn off captive portal detection. Feature is enabled by default and
3805 * the setting needs to be set to 0 to disable it.
3806 * @hide
3807 */
3808 public static final String CAPTIVE_PORTAL_DETECTION_ENABLED =
3809 "captive_portal_detection_enabled";
3810
3811 /**
3812 * The server used for captive portal detection upon a new conection. A 204 response
3813 * code from the server is used for validation.
3814 * @hide
3815 */
3816 public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server";
3817
3818 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003819 * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile
3820 * data connectivity to be established after a disconnect from Wi-Fi.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003821 */
3822 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
3823 "wifi_mobile_data_transition_wakelock_timeout_ms";
3824
3825 /**
Irfan Sheriff3ef889b2012-04-17 23:15:29 -07003826 * Whether network service discovery is enabled.
3827 * @hide
3828 */
3829 public static final String NSD_ON = "nsd_on";
3830
3831 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003832 * Whether background data usage is allowed by the user. See
3833 * ConnectivityManager for more info.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003834 */
Jeff Sharkey3a844fc2011-08-16 14:37:57 -07003835 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003836 public static final String BACKGROUND_DATA = "background_data";
Wink Saville04e71b32009-04-02 11:00:54 -07003837
3838 /**
Bjorn Bringert98bfa392010-03-24 10:59:48 +00003839 * Origins for which browsers should allow geolocation by default.
3840 * The value is a space-separated list of origins.
3841 */
3842 public static final String ALLOWED_GEOLOCATION_ORIGINS
3843 = "allowed_geolocation_origins";
3844
3845 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003846 * @deprecated Use {@link android.provider.Settings.Global#MOBILE_DATA} instead
Robert Greenwaltc03fa502010-02-23 18:58:05 -08003847 * @hide
3848 */
Christopher Tate06efb532012-08-24 15:29:27 -07003849 @Deprecated
3850 public static final String MOBILE_DATA = Global.MOBILE_DATA;
Robert Greenwaltc03fa502010-02-23 18:58:05 -08003851
3852 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003853 * @deprecated Use {@link android.provider.Settings.Global#CDMA_ROAMING_MODE} instead
Wink Saville04e71b32009-04-02 11:00:54 -07003854 * @hide
3855 */
Christopher Tate06efb532012-08-24 15:29:27 -07003856 @Deprecated
3857 public static final String CDMA_ROAMING_MODE = Global.CDMA_ROAMING_MODE;
Wink Saville04e71b32009-04-02 11:00:54 -07003858
3859 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003860 * @deprecated Use {@link android.provider.Settings.Global#CDMA_ROAMING_MODE} instead
Wink Saville04e71b32009-04-02 11:00:54 -07003861 * @hide
3862 */
Christopher Tate06efb532012-08-24 15:29:27 -07003863 @Deprecated
3864 public static final String CDMA_SUBSCRIPTION_MODE = Global.CDMA_SUBSCRIPTION_MODE;
Wink Saville04e71b32009-04-02 11:00:54 -07003865
3866 /**
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003867 * The preferred network mode 7 = Global
3868 * 6 = EvDo only
3869 * 5 = CDMA w/o EvDo
3870 * 4 = CDMA / EvDo auto
3871 * 3 = GSM / WCDMA auto
3872 * 2 = WCDMA only
3873 * 1 = GSM only
3874 * 0 = GSM / WCDMA preferred
Wink Saville04e71b32009-04-02 11:00:54 -07003875 * @hide
3876 */
3877 public static final String PREFERRED_NETWORK_MODE =
3878 "preferred_network_mode";
3879
3880 /**
Wink Savillee9b06d72009-05-18 21:47:50 -07003881 * The preferred TTY mode 0 = TTy Off, CDMA default
3882 * 1 = TTY Full
3883 * 2 = TTY HCO
3884 * 3 = TTY VCO
3885 * @hide
3886 */
3887 public static final String PREFERRED_TTY_MODE =
3888 "preferred_tty_mode";
3889
3890
3891 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003892 * @deprecated Use {@link android.provider.Settings.Global#CDMA_CELL_BROADCAST_SMS} instead
Wink Saville04e71b32009-04-02 11:00:54 -07003893 * @hide
3894 */
Christopher Tate06efb532012-08-24 15:29:27 -07003895 @Deprecated
3896 public static final String CDMA_CELL_BROADCAST_SMS = Global.CDMA_CELL_BROADCAST_SMS;
Wink Saville04e71b32009-04-02 11:00:54 -07003897
3898 /**
3899 * The cdma subscription 0 = Subscription from RUIM, when available
3900 * 1 = Subscription from NV
3901 * @hide
3902 */
3903 public static final String PREFERRED_CDMA_SUBSCRIPTION =
3904 "preferred_cdma_subscription";
3905
3906 /**
3907 * Whether the enhanced voice privacy mode is enabled.
3908 * 0 = normal voice privacy
3909 * 1 = enhanced voice privacy
3910 * @hide
3911 */
3912 public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled";
3913
3914 /**
3915 * Whether the TTY mode mode is enabled.
3916 * 0 = disabled
3917 * 1 = enabled
3918 * @hide
3919 */
3920 public static final String TTY_MODE_ENABLED = "tty_mode_enabled";
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07003921
3922 /**
Wink Saville628b0852011-08-04 15:01:58 -07003923 * The number of milliseconds to delay before sending out Connectivyt Change broadcasts
3924 * @hide
3925 */
3926 public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay";
3927
3928 /**
3929 * Default value for CONNECTIVITY_CHANGE_DELAY in milliseconds.
3930 * @hide
3931 */
3932 public static final int CONNECTIVITY_CHANGE_DELAY_DEFAULT = 3000;
3933
3934 /**
Christopher Tate8031a3d2009-07-06 16:36:05 -07003935 * Controls whether settings backup is enabled.
Dianne Hackborncf098292009-07-01 19:55:20 -07003936 * Type: int ( 0 = disabled, 1 = enabled )
3937 * @hide
3938 */
3939 public static final String BACKUP_ENABLED = "backup_enabled";
3940
3941 /**
Christopher Tatecce9da52010-02-03 15:11:15 -08003942 * Controls whether application data is automatically restored from backup
3943 * at install time.
3944 * Type: int ( 0 = disabled, 1 = enabled )
3945 * @hide
3946 */
3947 public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore";
3948
3949 /**
Christopher Tate8031a3d2009-07-06 16:36:05 -07003950 * Indicates whether settings backup has been fully provisioned.
3951 * Type: int ( 0 = unprovisioned, 1 = fully provisioned )
3952 * @hide
3953 */
3954 public static final String BACKUP_PROVISIONED = "backup_provisioned";
3955
3956 /**
Dianne Hackborncf098292009-07-01 19:55:20 -07003957 * Component of the transport to use for backup/restore.
3958 * @hide
3959 */
3960 public static final String BACKUP_TRANSPORT = "backup_transport";
Sanjay Jeyakumar21bf2412009-07-09 13:31:48 -07003961
Dianne Hackbornd7cd29d2009-07-01 11:22:45 -07003962 /**
3963 * Version for which the setup wizard was last shown. Bumped for
3964 * each release when there is new setup information to show.
3965 * @hide
3966 */
3967 public static final String LAST_SETUP_SHOWN = "last_setup_shown";
Dianne Hackborncf098292009-07-01 19:55:20 -07003968
3969 /**
Doug Zongkerf6888892010-01-06 16:38:14 -08003970 * How frequently (in seconds) to check the memory status of the
3971 * device.
3972 * @hide
3973 */
3974 public static final String MEMCHECK_INTERVAL = "memcheck_interval";
3975
3976 /**
3977 * Max frequency (in seconds) to log memory check stats, in realtime
3978 * seconds. This allows for throttling of logs when the device is
3979 * running for large amounts of time.
3980 * @hide
3981 */
3982 public static final String MEMCHECK_LOG_REALTIME_INTERVAL =
3983 "memcheck_log_realtime_interval";
3984
3985 /**
3986 * Boolean indicating whether rebooting due to system memory checks
3987 * is enabled.
3988 * @hide
3989 */
3990 public static final String MEMCHECK_SYSTEM_ENABLED = "memcheck_system_enabled";
3991
3992 /**
3993 * How many bytes the system process must be below to avoid scheduling
3994 * a soft reboot. This reboot will happen when it is next determined
3995 * to be a good time.
3996 * @hide
3997 */
3998 public static final String MEMCHECK_SYSTEM_SOFT_THRESHOLD = "memcheck_system_soft";
3999
4000 /**
4001 * How many bytes the system process must be below to avoid scheduling
4002 * a hard reboot. This reboot will happen immediately.
4003 * @hide
4004 */
4005 public static final String MEMCHECK_SYSTEM_HARD_THRESHOLD = "memcheck_system_hard";
4006
4007 /**
4008 * How many bytes the phone process must be below to avoid scheduling
4009 * a soft restart. This restart will happen when it is next determined
4010 * to be a good time.
4011 * @hide
4012 */
4013 public static final String MEMCHECK_PHONE_SOFT_THRESHOLD = "memcheck_phone_soft";
4014
4015 /**
4016 * How many bytes the phone process must be below to avoid scheduling
4017 * a hard restart. This restart will happen immediately.
4018 * @hide
4019 */
4020 public static final String MEMCHECK_PHONE_HARD_THRESHOLD = "memcheck_phone_hard";
4021
4022 /**
4023 * Boolean indicating whether restarting the phone process due to
4024 * memory checks is enabled.
4025 * @hide
4026 */
4027 public static final String MEMCHECK_PHONE_ENABLED = "memcheck_phone_enabled";
4028
4029 /**
4030 * First time during the day it is okay to kill processes
4031 * or reboot the device due to low memory situations. This number is
4032 * in seconds since midnight.
4033 * @hide
4034 */
4035 public static final String MEMCHECK_EXEC_START_TIME = "memcheck_exec_start_time";
4036
4037 /**
4038 * Last time during the day it is okay to kill processes
4039 * or reboot the device due to low memory situations. This number is
4040 * in seconds since midnight.
4041 * @hide
4042 */
4043 public static final String MEMCHECK_EXEC_END_TIME = "memcheck_exec_end_time";
4044
4045 /**
4046 * How long the screen must have been off in order to kill processes
4047 * or reboot. This number is in seconds. A value of -1 means to
4048 * entirely disregard whether the screen is on.
4049 * @hide
4050 */
4051 public static final String MEMCHECK_MIN_SCREEN_OFF = "memcheck_min_screen_off";
4052
4053 /**
4054 * How much time there must be until the next alarm in order to kill processes
4055 * or reboot. This number is in seconds. Note: this value must be
4056 * smaller than {@link #MEMCHECK_RECHECK_INTERVAL} or else it will
4057 * always see an alarm scheduled within its time.
4058 * @hide
4059 */
4060 public static final String MEMCHECK_MIN_ALARM = "memcheck_min_alarm";
4061
4062 /**
4063 * How frequently to check whether it is a good time to restart things,
4064 * if the device is in a bad state. This number is in seconds. Note:
4065 * this value must be larger than {@link #MEMCHECK_MIN_ALARM} or else
4066 * the alarm to schedule the recheck will always appear within the
4067 * minimum "do not execute now" time.
4068 * @hide
4069 */
4070 public static final String MEMCHECK_RECHECK_INTERVAL = "memcheck_recheck_interval";
4071
4072 /**
4073 * How frequently (in DAYS) to reboot the device. If 0, no reboots
4074 * will occur.
4075 * @hide
4076 */
4077 public static final String REBOOT_INTERVAL = "reboot_interval";
4078
4079 /**
4080 * First time during the day it is okay to force a reboot of the
4081 * device (if REBOOT_INTERVAL is set). This number is
4082 * in seconds since midnight.
4083 * @hide
4084 */
4085 public static final String REBOOT_START_TIME = "reboot_start_time";
4086
4087 /**
4088 * The window of time (in seconds) after each REBOOT_INTERVAL in which
4089 * a reboot can be executed. If 0, a reboot will always be executed at
4090 * exactly the given time. Otherwise, it will only be executed if
4091 * the device is idle within the window.
4092 * @hide
4093 */
4094 public static final String REBOOT_WINDOW = "reboot_window";
4095
4096 /**
Doug Zongker43866e02010-01-07 12:09:54 -08004097 * Threshold values for the duration and level of a discharge cycle, under
4098 * which we log discharge cycle info.
4099 * @hide
4100 */
4101 public static final String BATTERY_DISCHARGE_DURATION_THRESHOLD =
4102 "battery_discharge_duration_threshold";
4103 /** @hide */
4104 public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold";
4105
4106 /**
4107 * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR intents
4108 * on application crashes and ANRs. If this is disabled, the crash/ANR dialog
4109 * will never display the "Report" button.
4110 * Type: int ( 0 = disallow, 1 = allow )
4111 * @hide
4112 */
4113 public static final String SEND_ACTION_APP_ERROR = "send_action_app_error";
4114
4115 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004116 * @deprecated Use {@link android.provider.Settings.Global#WTF_IS_FATAL} instead
Doug Zongker43866e02010-01-07 12:09:54 -08004117 * @hide
4118 */
Christopher Tate06efb532012-08-24 15:29:27 -07004119 @Deprecated
4120 public static final String WTF_IS_FATAL = Global.WTF_IS_FATAL;
Doug Zongker43866e02010-01-07 12:09:54 -08004121
4122 /**
Jake Hambybb371632010-08-23 18:16:48 -07004123 * Maximum age of entries kept by {@link com.android.internal.os.IDropBoxManagerService}.
Doug Zongker43866e02010-01-07 12:09:54 -08004124 * @hide
4125 */
4126 public static final String DROPBOX_AGE_SECONDS =
4127 "dropbox_age_seconds";
4128 /**
Jake Hambybb371632010-08-23 18:16:48 -07004129 * Maximum number of entry files which {@link com.android.internal.os.IDropBoxManagerService} will keep around.
Dan Egnor3a8b0c12010-03-24 17:48:20 -07004130 * @hide
4131 */
4132 public static final String DROPBOX_MAX_FILES =
4133 "dropbox_max_files";
4134 /**
Jake Hambybb371632010-08-23 18:16:48 -07004135 * Maximum amount of disk space used by {@link com.android.internal.os.IDropBoxManagerService} no matter what.
Doug Zongker43866e02010-01-07 12:09:54 -08004136 * @hide
4137 */
4138 public static final String DROPBOX_QUOTA_KB =
4139 "dropbox_quota_kb";
4140 /**
Jake Hambybb371632010-08-23 18:16:48 -07004141 * Percent of free disk (excluding reserve) which {@link com.android.internal.os.IDropBoxManagerService} will use.
Doug Zongker43866e02010-01-07 12:09:54 -08004142 * @hide
4143 */
4144 public static final String DROPBOX_QUOTA_PERCENT =
4145 "dropbox_quota_percent";
4146 /**
Jake Hambybb371632010-08-23 18:16:48 -07004147 * Percent of total disk which {@link com.android.internal.os.IDropBoxManagerService} will never dip into.
Doug Zongker43866e02010-01-07 12:09:54 -08004148 * @hide
4149 */
4150 public static final String DROPBOX_RESERVE_PERCENT =
4151 "dropbox_reserve_percent";
4152 /**
4153 * Prefix for per-tag dropbox disable/enable settings.
4154 * @hide
4155 */
4156 public static final String DROPBOX_TAG_PREFIX =
4157 "dropbox:";
Dan Egnora455d192010-03-12 08:52:28 -08004158 /**
4159 * Lines of logcat to include with system crash/ANR/etc. reports,
4160 * as a prefix of the dropbox tag of the report type.
4161 * For example, "logcat_for_system_server_anr" controls the lines
4162 * of logcat captured with system server ANR reports. 0 to disable.
4163 * @hide
4164 */
4165 public static final String ERROR_LOGCAT_PREFIX =
4166 "logcat_for_";
Doug Zongker43866e02010-01-07 12:09:54 -08004167
4168
4169 /**
4170 * Screen timeout in milliseconds corresponding to the
4171 * PowerManager's POKE_LOCK_SHORT_TIMEOUT flag (i.e. the fastest
4172 * possible screen timeout behavior.)
4173 * @hide
4174 */
4175 public static final String SHORT_KEYLIGHT_DELAY_MS =
4176 "short_keylight_delay_ms";
4177
4178 /**
4179 * The interval in minutes after which the amount of free storage left on the
4180 * device is logged to the event log
4181 * @hide
4182 */
4183 public static final String SYS_FREE_STORAGE_LOG_INTERVAL =
4184 "sys_free_storage_log_interval";
4185
4186 /**
4187 * Threshold for the amount of change in disk free space required to report the amount of
4188 * free space. Used to prevent spamming the logs when the disk free space isn't changing
4189 * frequently.
4190 * @hide
4191 */
4192 public static final String DISK_FREE_CHANGE_REPORTING_THRESHOLD =
4193 "disk_free_change_reporting_threshold";
4194
4195
4196 /**
4197 * Minimum percentage of free storage on the device that is used to determine if
Dianne Hackborn247fe742011-01-08 17:25:57 -08004198 * the device is running low on storage. The default is 10.
4199 * <p>Say this value is set to 10, the device is considered running low on storage
Doug Zongker43866e02010-01-07 12:09:54 -08004200 * if 90% or more of the device storage is filled up.
4201 * @hide
4202 */
4203 public static final String SYS_STORAGE_THRESHOLD_PERCENTAGE =
4204 "sys_storage_threshold_percentage";
4205
4206 /**
Dianne Hackborn247fe742011-01-08 17:25:57 -08004207 * Maximum byte size of the low storage threshold. This is to ensure
4208 * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in
4209 * an overly large threshold for large storage devices. Currently this
4210 * must be less than 2GB. This default is 500MB.
4211 * @hide
4212 */
4213 public static final String SYS_STORAGE_THRESHOLD_MAX_BYTES =
4214 "sys_storage_threshold_max_bytes";
4215
4216 /**
Jake Hambybb371632010-08-23 18:16:48 -07004217 * Minimum bytes of free storage on the device before the data
4218 * partition is considered full. By default, 1 MB is reserved
4219 * to avoid system-wide SQLite disk full exceptions.
4220 * @hide
4221 */
4222 public static final String SYS_STORAGE_FULL_THRESHOLD_BYTES =
4223 "sys_storage_full_threshold_bytes";
4224
4225 /**
Doug Zongker43866e02010-01-07 12:09:54 -08004226 * The interval in milliseconds after which Wi-Fi is considered idle.
4227 * When idle, it is possible for the device to be switched from Wi-Fi to
4228 * the mobile data network.
4229 * @hide
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004230 * @deprecated Moved to Global
Doug Zongker43866e02010-01-07 12:09:54 -08004231 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004232 @Deprecated
4233 public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS;
Doug Zongker43866e02010-01-07 12:09:54 -08004234
4235 /**
Irfan Sheriff2b7f6382011-03-25 14:29:19 -07004236 * The interval in milliseconds to issue wake up scans when wifi needs
4237 * to connect. This is necessary to connect to an access point when
4238 * device is on the move and the screen is off.
Irfan Sheriff4f5f7c92010-10-14 17:01:27 -07004239 * @hide
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004240 * @deprecated Moved to Global
Irfan Sheriff4f5f7c92010-10-14 17:01:27 -07004241 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004242 @Deprecated
Irfan Sheriff2b7f6382011-03-25 14:29:19 -07004243 public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004244 Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS;
Irfan Sheriff2b7f6382011-03-25 14:29:19 -07004245
4246 /**
4247 * The interval in milliseconds to scan as used by the wifi supplicant
4248 * @hide
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004249 * @deprecated Moved to Global
Irfan Sheriff2b7f6382011-03-25 14:29:19 -07004250 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004251 @Deprecated
Irfan Sheriff2b7f6382011-03-25 14:29:19 -07004252 public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004253 Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS;
Irfan Sheriff4f5f7c92010-10-14 17:01:27 -07004254
4255 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004256 * @deprecated Moved to Settings.Global
Doug Zongkeredc51892010-01-07 13:51:16 -08004257 * @hide
4258 */
Christopher Tate06efb532012-08-24 15:29:27 -07004259 @Deprecated
Doug Zongkeredc51892010-01-07 13:51:16 -08004260 public static final String PDP_WATCHDOG_POLL_INTERVAL_MS =
Christopher Tate06efb532012-08-24 15:29:27 -07004261 Global.PDP_WATCHDOG_POLL_INTERVAL_MS;
Doug Zongkeredc51892010-01-07 13:51:16 -08004262
4263 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004264 * @deprecated Moved to Settings.Global
Doug Zongkeredc51892010-01-07 13:51:16 -08004265 * @hide
4266 */
Christopher Tate06efb532012-08-24 15:29:27 -07004267 @Deprecated
Doug Zongkeredc51892010-01-07 13:51:16 -08004268 public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS =
Christopher Tate06efb532012-08-24 15:29:27 -07004269 Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS;
Doug Zongkeredc51892010-01-07 13:51:16 -08004270
4271 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004272 * @deprecated Moved to Settings.Global
Doug Zongkeredc51892010-01-07 13:51:16 -08004273 * @hide
4274 */
Christopher Tate06efb532012-08-24 15:29:27 -07004275 @Deprecated
Doug Zongkeredc51892010-01-07 13:51:16 -08004276 public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS =
Christopher Tate06efb532012-08-24 15:29:27 -07004277 Global.PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS;
Doug Zongkeredc51892010-01-07 13:51:16 -08004278
4279 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004280 * @deprecated Moved to Settings.Global
Doug Zongkeredc51892010-01-07 13:51:16 -08004281 * @hide
4282 */
Christopher Tate06efb532012-08-24 15:29:27 -07004283 @Deprecated
Doug Zongkeredc51892010-01-07 13:51:16 -08004284 public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT =
Christopher Tate06efb532012-08-24 15:29:27 -07004285 Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT;
Doug Zongkeredc51892010-01-07 13:51:16 -08004286
4287 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004288 * @deprecated Moved to Settings.Global
Doug Zongkeredc51892010-01-07 13:51:16 -08004289 * @hide
4290 */
Christopher Tate06efb532012-08-24 15:29:27 -07004291 @Deprecated
Doug Zongkeredc51892010-01-07 13:51:16 -08004292 public static final String PDP_WATCHDOG_ERROR_POLL_COUNT =
Christopher Tate06efb532012-08-24 15:29:27 -07004293 Global.PDP_WATCHDOG_ERROR_POLL_COUNT;
Doug Zongkeredc51892010-01-07 13:51:16 -08004294
4295 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004296 * @deprecated Moved to Settings.Global
Doug Zongkeredc51892010-01-07 13:51:16 -08004297 * @hide
4298 */
Christopher Tate06efb532012-08-24 15:29:27 -07004299 @Deprecated
Doug Zongkeredc51892010-01-07 13:51:16 -08004300 public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT =
Christopher Tate06efb532012-08-24 15:29:27 -07004301 Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT;
Doug Zongkeredc51892010-01-07 13:51:16 -08004302
4303 /**
Christopher Tatec868b642012-09-12 17:41:04 -07004304 * @deprecated Moved to Settings.Global
Wink Saville2861d232011-11-03 18:52:58 -07004305 * @hide
4306 */
Christopher Tatec868b642012-09-12 17:41:04 -07004307 @Deprecated
Kazuhiro Ondo7efb89b2011-12-21 20:54:03 -06004308 public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
Christopher Tatec868b642012-09-12 17:41:04 -07004309 Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS;
Kazuhiro Ondo7efb89b2011-12-21 20:54:03 -06004310
4311 /**
Christopher Tatec868b642012-09-12 17:41:04 -07004312 * @deprecated Moved to Settings.Global
Kazuhiro Ondo7efb89b2011-12-21 20:54:03 -06004313 * @hide
4314 */
Christopher Tatec868b642012-09-12 17:41:04 -07004315 @Deprecated
Kazuhiro Ondo7efb89b2011-12-21 20:54:03 -06004316 public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
Christopher Tatec868b642012-09-12 17:41:04 -07004317 Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS;
Wink Saville2861d232011-11-03 18:52:58 -07004318
4319 /**
Christopher Tatec868b642012-09-12 17:41:04 -07004320 * @deprecated Moved to Settings.Global
Doug Zongkeredc51892010-01-07 13:51:16 -08004321 * @hide
4322 */
Christopher Tatec868b642012-09-12 17:41:04 -07004323 @Deprecated
Doug Zongkeredc51892010-01-07 13:51:16 -08004324 public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
Christopher Tatec868b642012-09-12 17:41:04 -07004325 Global.GPRS_REGISTER_CHECK_PERIOD_MS;
Doug Zongkeredc51892010-01-07 13:51:16 -08004326
4327 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004328 * @deprecated Use {@link android.provider.Settings.Global#NITZ_UPDATE_SPACING} instead
Doug Zongkeredc51892010-01-07 13:51:16 -08004329 * @hide
4330 */
Christopher Tate06efb532012-08-24 15:29:27 -07004331 public static final String NITZ_UPDATE_SPACING = Global.NITZ_UPDATE_SPACING;
Doug Zongkeredc51892010-01-07 13:51:16 -08004332
4333 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004334 * @deprecated Use {@link android.provider.Settings.Global#NITZ_UPDATE_SPACING} instead
Doug Zongkeredc51892010-01-07 13:51:16 -08004335 * @hide
4336 */
Christopher Tate06efb532012-08-24 15:29:27 -07004337 public static final String NITZ_UPDATE_DIFF = Global.NITZ_UPDATE_DIFF;
Doug Zongkeredc51892010-01-07 13:51:16 -08004338
4339 /**
4340 * The maximum reconnect delay for short network outages or when the network is suspended
4341 * due to phone use.
4342 * @hide
4343 */
4344 public static final String SYNC_MAX_RETRY_DELAY_IN_SECONDS =
4345 "sync_max_retry_delay_in_seconds";
4346
4347 /**
Jake Hamby76a61422012-09-06 17:40:21 -07004348 * @deprecated Use {@link Settings.Global#SMS_OUTGOING_CHECK_INTERVAL_MS} instead.
Doug Zongkeredc51892010-01-07 13:51:16 -08004349 * @hide
4350 */
4351 public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
Jake Hamby76a61422012-09-06 17:40:21 -07004352 Global.SMS_OUTGOING_CHECK_INTERVAL_MS;
Doug Zongkeredc51892010-01-07 13:51:16 -08004353
4354 /**
Jake Hamby76a61422012-09-06 17:40:21 -07004355 * @deprecated Use {@link Settings.Global#SMS_OUTGOING_CHECK_MAX_COUNT} instead.
Doug Zongkeredc51892010-01-07 13:51:16 -08004356 * @hide
4357 */
4358 public static final String SMS_OUTGOING_CHECK_MAX_COUNT =
Jake Hamby76a61422012-09-06 17:40:21 -07004359 Global.SMS_OUTGOING_CHECK_MAX_COUNT;
Doug Zongkeredc51892010-01-07 13:51:16 -08004360
4361 /**
Narayan Kamathee69ff42011-06-28 12:07:18 +01004362 * The global search provider chosen by the user (if multiple global
4363 * search providers are installed). This will be the provider returned
4364 * by {@link SearchManager#getGlobalSearchActivity()} if it's still
4365 * installed. This setting is stored as a flattened component name as
4366 * per {@link ComponentName#flattenToString()}.
4367 *
4368 * @hide
4369 */
4370 public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY =
4371 "search_global_search_activity";
4372
4373 /**
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08004374 * The number of promoted sources in GlobalSearch.
4375 * @hide
4376 */
4377 public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources";
4378 /**
4379 * The maximum number of suggestions returned by GlobalSearch.
4380 * @hide
4381 */
4382 public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display";
4383 /**
4384 * The number of suggestions GlobalSearch will ask each non-web search source for.
4385 * @hide
4386 */
4387 public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source";
4388 /**
4389 * The number of suggestions the GlobalSearch will ask the web search source for.
4390 * @hide
4391 */
4392 public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT =
4393 "search_web_results_override_limit";
4394 /**
4395 * The number of milliseconds that GlobalSearch will wait for suggestions from
4396 * promoted sources before continuing with all other sources.
4397 * @hide
4398 */
4399 public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS =
4400 "search_promoted_source_deadline_millis";
4401 /**
4402 * The number of milliseconds before GlobalSearch aborts search suggesiton queries.
4403 * @hide
4404 */
4405 public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis";
4406 /**
4407 * The maximum number of milliseconds that GlobalSearch shows the previous results
4408 * after receiving a new query.
4409 * @hide
4410 */
4411 public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis";
4412 /**
4413 * The maximum age of log data used for shortcuts in GlobalSearch.
4414 * @hide
4415 */
4416 public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis";
4417 /**
4418 * The maximum age of log data used for source ranking in GlobalSearch.
4419 * @hide
4420 */
4421 public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS =
4422 "search_max_source_event_age_millis";
4423 /**
4424 * The minimum number of impressions needed to rank a source in GlobalSearch.
4425 * @hide
4426 */
4427 public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING =
4428 "search_min_impressions_for_source_ranking";
4429 /**
4430 * The minimum number of clicks needed to rank a source in GlobalSearch.
4431 * @hide
4432 */
4433 public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING =
4434 "search_min_clicks_for_source_ranking";
4435 /**
4436 * The maximum number of shortcuts shown by GlobalSearch.
4437 * @hide
4438 */
4439 public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned";
4440 /**
4441 * The size of the core thread pool for suggestion queries in GlobalSearch.
4442 * @hide
4443 */
4444 public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE =
4445 "search_query_thread_core_pool_size";
4446 /**
4447 * The maximum size of the thread pool for suggestion queries in GlobalSearch.
4448 * @hide
4449 */
4450 public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE =
4451 "search_query_thread_max_pool_size";
4452 /**
4453 * The size of the core thread pool for shortcut refreshing in GlobalSearch.
4454 * @hide
4455 */
4456 public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE =
4457 "search_shortcut_refresh_core_pool_size";
4458 /**
4459 * The maximum size of the thread pool for shortcut refreshing in GlobalSearch.
4460 * @hide
4461 */
4462 public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE =
4463 "search_shortcut_refresh_max_pool_size";
4464 /**
4465 * The maximun time that excess threads in the GlobalSeach thread pools will
4466 * wait before terminating.
4467 * @hide
4468 */
4469 public static final String SEARCH_THREAD_KEEPALIVE_SECONDS =
4470 "search_thread_keepalive_seconds";
4471 /**
4472 * The maximum number of concurrent suggestion queries to each source.
4473 * @hide
4474 */
4475 public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT =
4476 "search_per_source_concurrent_query_limit";
4477
San Mehat87734d32010-01-08 12:53:06 -08004478 /**
4479 * Whether or not alert sounds are played on MountService events. (0 = false, 1 = true)
4480 * @hide
4481 */
4482 public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd";
4483
4484 /**
4485 * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true)
4486 * @hide
4487 */
4488 public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart";
4489
4490 /**
4491 * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true)
4492 * @hide
4493 */
4494 public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt";
4495
4496 /**
4497 * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true)
4498 * @hide
4499 */
4500 public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled";
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08004501
Dan Egnor42471dd2010-01-07 17:25:22 -08004502 /**
4503 * If nonzero, ANRs in invisible background processes bring up a dialog.
4504 * Otherwise, the process will be silently killed.
4505 * @hide
4506 */
4507 public static final String ANR_SHOW_BACKGROUND = "anr_show_background";
Erikeebc8e22010-02-18 13:27:19 -08004508
Mike LeBeau5d34e9b2010-02-10 19:34:56 -08004509 /**
4510 * The {@link ComponentName} string of the service to be used as the voice recognition
4511 * service.
Erikeebc8e22010-02-18 13:27:19 -08004512 *
Mike LeBeau5d34e9b2010-02-10 19:34:56 -08004513 * @hide
4514 */
4515 public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";
Dan Egnor42471dd2010-01-07 17:25:22 -08004516
satok988323c2011-06-22 16:38:13 +09004517
4518 /**
satokada8c4e2011-08-23 14:56:56 +09004519 * The {@link ComponentName} string of the selected spell checker service which is
4520 * one of the services managed by the text service manager.
4521 *
4522 * @hide
4523 */
4524 public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker";
4525
4526 /**
4527 * The {@link ComponentName} string of the selected subtype of the selected spell checker
satok988323c2011-06-22 16:38:13 +09004528 * service which is one of the services managed by the text service manager.
4529 *
4530 * @hide
4531 */
satokada8c4e2011-08-23 14:56:56 +09004532 public static final String SELECTED_SPELL_CHECKER_SUBTYPE =
4533 "selected_spell_checker_subtype";
satok988323c2011-06-22 16:38:13 +09004534
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08004535 /**
satoka33c4fc2011-08-25 16:50:11 +09004536 * The {@link ComponentName} string whether spell checker is enabled or not.
4537 *
4538 * @hide
4539 */
4540 public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled";
4541
4542 /**
David Brown458e8062010-03-08 21:52:11 -08004543 * What happens when the user presses the Power button while in-call
4544 * and the screen is on.<br/>
4545 * <b>Values:</b><br/>
4546 * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/>
4547 * 2 - The Power button hangs up the current call.<br/>
4548 *
4549 * @hide
4550 */
4551 public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior";
4552
4553 /**
4554 * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen".
4555 * @hide
4556 */
4557 public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1;
4558
4559 /**
4560 * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up".
4561 * @hide
4562 */
4563 public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2;
4564
4565 /**
4566 * INCALL_POWER_BUTTON_BEHAVIOR default value.
4567 * @hide
4568 */
4569 public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT =
4570 INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF;
4571
4572 /**
Dianne Hackborn2ccda4d2010-03-22 21:49:15 -07004573 * The current night mode that has been selected by the user. Owned
4574 * and controlled by UiModeManagerService. Constants are as per
4575 * UiModeManager.
4576 * @hide
4577 */
4578 public static final String UI_NIGHT_MODE = "ui_night_mode";
Suchi Amalapurapu40e47252010-04-07 16:15:50 -07004579
4580 /**
4581 * Let user pick default install location.
4582 * @hide
4583 */
4584 public static final String SET_INSTALL_LOCATION = "set_install_location";
4585
4586 /**
4587 * Default install location value.
4588 * 0 = auto, let system decide
4589 * 1 = internal
4590 * 2 = sdcard
4591 * @hide
4592 */
4593 public static final String DEFAULT_INSTALL_LOCATION = "default_install_location";
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004594
4595 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004596 * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_POLLING_SEC} instead
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004597 * @hide
4598 */
Christopher Tate06efb532012-08-24 15:29:27 -07004599 @Deprecated
4600 public static final String THROTTLE_POLLING_SEC = Global.THROTTLE_POLLING_SEC;
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004601
4602 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004603 * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_THRESHOLD_BYTES} instead
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004604 * @hide
4605 */
Christopher Tate06efb532012-08-24 15:29:27 -07004606 @Deprecated
4607 public static final String THROTTLE_THRESHOLD_BYTES = Global.THROTTLE_THRESHOLD_BYTES;
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004608
4609 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004610 * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_VALUE_KBITSPS} instead
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004611 * @hide
4612 */
Christopher Tate06efb532012-08-24 15:29:27 -07004613 @Deprecated
4614 public static final String THROTTLE_VALUE_KBITSPS = Global.THROTTLE_VALUE_KBITSPS;
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004615
4616 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004617 * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_VALUE_KBITSPS} instead
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004618 * @hide
4619 */
Christopher Tate06efb532012-08-24 15:29:27 -07004620 @Deprecated
4621 public static final String THROTTLE_RESET_DAY = Global.THROTTLE_RESET_DAY;
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004622
4623 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004624 * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_NOTIFICATION_TYPE} instead
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004625 * @hide
4626 */
Christopher Tate06efb532012-08-24 15:29:27 -07004627 @Deprecated
4628 public static final String THROTTLE_NOTIFICATION_TYPE = Global.THROTTLE_NOTIFICATION_TYPE;
Robert Greenwalt9e696c22010-04-01 14:45:18 -07004629
4630 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004631 * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_HELP_URI} instead
Irfan Sheriffc9b68512010-04-08 14:12:33 -07004632 * @hide
4633 */
Christopher Tate06efb532012-08-24 15:29:27 -07004634 @Deprecated
4635 public static final String THROTTLE_HELP_URI = Global.THROTTLE_HELP_URI;
Irfan Sheriffc9b68512010-04-08 14:12:33 -07004636
Robert Greenwaltd1055a22010-05-25 15:54:52 -07004637 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004638 * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_MAX_NTP_CACHE_AGE_SEC} instead
Robert Greenwaltd1055a22010-05-25 15:54:52 -07004639 * @hide
4640 */
Christopher Tate06efb532012-08-24 15:29:27 -07004641 @Deprecated
Robert Greenwaltd1055a22010-05-25 15:54:52 -07004642 public static final String THROTTLE_MAX_NTP_CACHE_AGE_SEC =
Christopher Tate06efb532012-08-24 15:29:27 -07004643 Global.THROTTLE_MAX_NTP_CACHE_AGE_SEC;
Robert Greenwaltd1055a22010-05-25 15:54:52 -07004644
Steve Howard9c4e33e2010-07-28 15:59:29 -07004645 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004646 * @deprecated Use {@link android.provider.Settings.Global#DOWNLOAD_MAX_BYTES_OVER_MOBILE} instead
Steve Howard9c4e33e2010-07-28 15:59:29 -07004647 * @hide
4648 */
Christopher Tate06efb532012-08-24 15:29:27 -07004649 @Deprecated
Steve Howard9c4e33e2010-07-28 15:59:29 -07004650 public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE =
Christopher Tate06efb532012-08-24 15:29:27 -07004651 Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE;
Steve Howard9c4e33e2010-07-28 15:59:29 -07004652
Robert Greenwaltd7085fc2010-09-08 15:24:47 -07004653 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004654 * @deprecated Use {@link android.provider.Settings.Global#DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE} instead
Steve Howardf1766812010-09-17 16:46:19 -07004655 * @hide
4656 */
Christopher Tate06efb532012-08-24 15:29:27 -07004657 @Deprecated
Steve Howardf1766812010-09-17 16:46:19 -07004658 public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE =
Christopher Tate06efb532012-08-24 15:29:27 -07004659 Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE;
Steve Howardf1766812010-09-17 16:46:19 -07004660
4661 /**
Robert Greenwaltd7085fc2010-09-08 15:24:47 -07004662 * ms during which to consume extra events related to Inet connection condition
4663 * after a transtion to fully-connected
4664 * @hide
4665 */
4666 public static final String INET_CONDITION_DEBOUNCE_UP_DELAY =
4667 "inet_condition_debounce_up_delay";
4668
4669 /**
4670 * ms during which to consume extra events related to Inet connection condtion
4671 * after a transtion to partly-connected
4672 * @hide
4673 */
4674 public static final String INET_CONDITION_DEBOUNCE_DOWN_DELAY =
4675 "inet_condition_debounce_down_delay";
Irfan Sheriffc9b68512010-04-08 14:12:33 -07004676
4677 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004678 * @deprecated Use {@link android.provider.Settings.Global#SETUP_PREPAID_DATA_SERVICE_URL} instead
Freeman Ng96be4e02011-04-07 18:21:40 -07004679 * @hide
4680 */
Christopher Tate06efb532012-08-24 15:29:27 -07004681 @Deprecated
Freeman Ng96be4e02011-04-07 18:21:40 -07004682 public static final String SETUP_PREPAID_DATA_SERVICE_URL =
Christopher Tate06efb532012-08-24 15:29:27 -07004683 Global.SETUP_PREPAID_DATA_SERVICE_URL;
Freeman Ng96be4e02011-04-07 18:21:40 -07004684
4685 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004686 * @deprecated Use {@link android.provider.Settings.Global#SETUP_PREPAID_DETECTION_TARGET_URL} instead
Freeman Ng3b9089c2011-04-22 16:42:57 -07004687 * @hide
4688 */
Christopher Tate06efb532012-08-24 15:29:27 -07004689 @Deprecated
Freeman Ng3b9089c2011-04-22 16:42:57 -07004690 public static final String SETUP_PREPAID_DETECTION_TARGET_URL =
Christopher Tate06efb532012-08-24 15:29:27 -07004691 Global.SETUP_PREPAID_DETECTION_TARGET_URL;
Freeman Ng3b9089c2011-04-22 16:42:57 -07004692
4693 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004694 * @deprecated Use {@link android.provider.Settings.Global#SETUP_PREPAID_DETECTION_REDIR_HOST} instead
Freeman Ng3b9089c2011-04-22 16:42:57 -07004695 * @hide
4696 */
Christopher Tate06efb532012-08-24 15:29:27 -07004697 @Deprecated
Freeman Ng3b9089c2011-04-22 16:42:57 -07004698 public static final String SETUP_PREPAID_DETECTION_REDIR_HOST =
Christopher Tate06efb532012-08-24 15:29:27 -07004699 Global.SETUP_PREPAID_DETECTION_REDIR_HOST;
Freeman Ng3b9089c2011-04-22 16:42:57 -07004700
4701 /**
John Spurlock1a868b72012-08-22 09:56:51 -04004702 * Whether screensavers are enabled.
Daniel Sandler0601eb72011-04-13 01:01:32 -04004703 * @hide
4704 */
Daniel Sandler2d545362011-11-17 10:38:37 -08004705 public static final String SCREENSAVER_ENABLED = "screensaver_enabled";
Daniel Sandler0601eb72011-04-13 01:01:32 -04004706
4707 /**
John Spurlock1a868b72012-08-22 09:56:51 -04004708 * The user's chosen screensaver components.
Daniel Sandler2d545362011-11-17 10:38:37 -08004709 *
John Spurlock1a868b72012-08-22 09:56:51 -04004710 * These will be launched by the PhoneWindowManager after a timeout when not on
Daniel Sandler2d545362011-11-17 10:38:37 -08004711 * battery, or upon dock insertion (if SCREENSAVER_ACTIVATE_ON_DOCK is set to 1).
Daniel Sandler0601eb72011-04-13 01:01:32 -04004712 * @hide
4713 */
John Spurlock1a868b72012-08-22 09:56:51 -04004714 public static final String SCREENSAVER_COMPONENTS = "screensaver_components";
Daniel Sandler2d545362011-11-17 10:38:37 -08004715
4716 /**
John Spurlock1a868b72012-08-22 09:56:51 -04004717 * If screensavers are enabled, whether the screensaver should be automatically launched
4718 * when the device is inserted into a (desk) dock.
Daniel Sandler2d545362011-11-17 10:38:37 -08004719 * @hide
4720 */
4721 public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock";
Daniel Sandler0601eb72011-04-13 01:01:32 -04004722
John Spurlock1a868b72012-08-22 09:56:51 -04004723 /**
4724 * If screensavers are enabled, whether the screensaver should be automatically launched
4725 * when the screen times out when not on battery.
4726 * @hide
4727 */
4728 public static final String SCREENSAVER_ACTIVATE_ON_SLEEP = "screensaver_activate_on_sleep";
4729
4730 /**
4731 * If screensavers are enabled, the default screensaver component.
4732 * @hide
4733 */
4734 public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component";
4735
Christopher Tate06efb532012-08-24 15:29:27 -07004736 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4737 * {@hide} */
4738 @Deprecated
4739 public static final String NETSTATS_ENABLED = Global.NETSTATS_ENABLED;
4740 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4741 * {@hide} */
4742 @Deprecated
4743 public static final String NETSTATS_POLL_INTERVAL = Global.NETSTATS_POLL_INTERVAL;
4744 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4745 * {@hide} */
4746 @Deprecated
4747 public static final String NETSTATS_TIME_CACHE_MAX_AGE = Global.NETSTATS_TIME_CACHE_MAX_AGE;
4748 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4749 * {@hide} */
4750 @Deprecated
4751 public static final String NETSTATS_GLOBAL_ALERT_BYTES = Global.NETSTATS_GLOBAL_ALERT_BYTES;
4752 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4753 * {@hide} */
4754 @Deprecated
4755 public static final String NETSTATS_SAMPLE_ENABLED = Global.NETSTATS_SAMPLE_ENABLED;
4756 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4757 * {@hide} */
4758 @Deprecated
4759 public static final String NETSTATS_REPORT_XT_OVER_DEV = Global.NETSTATS_REPORT_XT_OVER_DEV;
Jeff Sharkey63abc372012-01-11 18:38:16 -08004760
Christopher Tate06efb532012-08-24 15:29:27 -07004761 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4762 * {@hide} */
4763 @Deprecated
4764 public static final String NETSTATS_DEV_BUCKET_DURATION = Global.NETSTATS_DEV_BUCKET_DURATION;
4765 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4766 * {@hide} */
4767 @Deprecated
4768 public static final String NETSTATS_DEV_PERSIST_BYTES = Global.NETSTATS_DEV_PERSIST_BYTES;
4769 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4770 * {@hide} */
4771 @Deprecated
4772 public static final String NETSTATS_DEV_ROTATE_AGE = Global.NETSTATS_DEV_ROTATE_AGE;
4773 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4774 * {@hide} */
4775 @Deprecated
4776 public static final String NETSTATS_DEV_DELETE_AGE = Global.NETSTATS_DEV_DELETE_AGE;
Jeff Sharkey63abc372012-01-11 18:38:16 -08004777
Christopher Tate06efb532012-08-24 15:29:27 -07004778 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4779 * {@hide} */
4780 @Deprecated
4781 public static final String NETSTATS_UID_BUCKET_DURATION = Global.NETSTATS_UID_BUCKET_DURATION;
4782 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4783 * {@hide} */
4784 @Deprecated
4785 public static final String NETSTATS_UID_PERSIST_BYTES = Global.NETSTATS_UID_PERSIST_BYTES;
4786 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4787 * {@hide} */
4788 @Deprecated
4789 public static final String NETSTATS_UID_ROTATE_AGE = Global.NETSTATS_UID_ROTATE_AGE;
4790 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4791 * {@hide} */
4792 @Deprecated
4793 public static final String NETSTATS_UID_DELETE_AGE = Global.NETSTATS_UID_DELETE_AGE;
Jeff Sharkey63abc372012-01-11 18:38:16 -08004794
Christopher Tate06efb532012-08-24 15:29:27 -07004795 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4796 * {@hide} */
4797 @Deprecated
4798 public static final String NETSTATS_UID_TAG_BUCKET_DURATION = Global.NETSTATS_UID_TAG_BUCKET_DURATION;
4799 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4800 * {@hide} */
4801 @Deprecated
4802 public static final String NETSTATS_UID_TAG_PERSIST_BYTES = Global.NETSTATS_UID_TAG_PERSIST_BYTES;
4803 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4804 * {@hide} */
4805 @Deprecated
4806 public static final String NETSTATS_UID_TAG_ROTATE_AGE = Global.NETSTATS_UID_TAG_ROTATE_AGE;
4807 /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now
4808 * {@hide} */
4809 @Deprecated
4810 public static final String NETSTATS_UID_TAG_DELETE_AGE = Global.NETSTATS_UID_TAG_DELETE_AGE;
Jeff Sharkey61ee0bb2011-05-29 22:50:42 -07004811
Christopher Tate06efb532012-08-24 15:29:27 -07004812 /** Preferred NTP server. {@hide}
4813 * @deprecated moved to Settings.Global */
4814 public static final String NTP_SERVER = Global.NTP_SERVER;
Jeff Sharkey104344e2011-07-10 14:20:41 -07004815
Christopher Tate06efb532012-08-24 15:29:27 -07004816 /** Timeout in milliseconds to wait for NTP server. {@hide}
4817 * @deprecated moved to Settings.Global */
4818 public static final String NTP_TIMEOUT = Global.NTP_TIMEOUT;
4819
4820 /** Autofill server address (Used in WebView/browser).
4821 * @deprecated moved to Settings.Global
4822 * {@hide} */
4823 public static final String WEB_AUTOFILL_QUERY_URL = Global.WEB_AUTOFILL_QUERY_URL;
Ben Murdoch9999c1d2011-07-19 16:51:24 +01004824
rich cannings16e119e2012-09-06 12:04:37 -07004825 /**
4826 * Whether the package manager should send package verification broadcasts for verifiers to
4827 * review apps prior to installation.
rich cannings4d8fc792012-09-07 14:43:43 -07004828 * @deprecated moved to Settings.Global
rich cannings16e119e2012-09-06 12:04:37 -07004829 * 1 = request apps to be verified prior to installation, if a verifier exists.
4830 * 0 = do not verify apps before installation
4831 * {@hide}
4832 */
rich cannings4d8fc792012-09-07 14:43:43 -07004833 @Deprecated
rich cannings16e119e2012-09-06 12:04:37 -07004834 public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable";
Kenny Root5ab21572011-07-27 11:11:19 -07004835
rich cannings4d8fc792012-09-07 14:43:43 -07004836 /** Timeout for package verification.
4837 * @deprecated moved to Settings.Global
4838 * {@hide} */
4839 @Deprecated
Kenny Root5ab21572011-07-27 11:11:19 -07004840 public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout";
4841
rich cannings4d8fc792012-09-07 14:43:43 -07004842 /** Default response code for package verification.
4843 * @deprecated moved to Settings.Global
4844 * {@hide} */
4845 @Deprecated
rich canningsa6cfe522012-05-21 15:50:56 -07004846 public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response";
4847
Jeff Sharkeyf5385772012-05-11 14:04:41 -07004848 /** {@hide} */
4849 public static final String
4850 READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default";
4851
Daniel Sandler0601eb72011-04-13 01:01:32 -04004852 /**
Dave Santoroe43185e2011-10-10 18:11:00 -07004853 * Duration in milliseconds before pre-authorized URIs for the contacts
4854 * provider should expire.
4855 * @hide
4856 */
4857 public static final String CONTACTS_PREAUTH_URI_EXPIRATION =
4858 "contacts_preauth_uri_expiration";
4859
4860 /**
Jeff Brownbd6e1502012-08-28 03:27:37 -07004861 * Overlay display devices setting.
4862 * The associated value is a specially formatted string that describes the
4863 * size and density of simulated secondary display devices.
4864 * <p>
4865 * Format: {width}x{height}/{dpi};...
4866 * </p><p>
4867 * Example:
4868 * <ul>
4869 * <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li>
4870 * <li><code>1920x1080/320;1280x720/213</code>: make two overlays, the first
4871 * at 1080p and the second at 720p.</li>
4872 * <li>If the value is empty, then no overlay display devices are created.</li>
4873 * </ul></p>
4874 *
4875 * @hide
4876 */
4877 public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices";
4878
4879 /**
Svetoslav Ganova571a582011-09-20 18:32:20 -07004880 * This are the settings to be backed up.
4881 *
4882 * NOTE: Settings are backed up and restored in the order they appear
4883 * in this array. If you have one setting depending on another,
4884 * make sure that they are ordered appropriately.
4885 *
-b master501eec92009-07-06 13:53:11 -07004886 * @hide
4887 */
4888 public static final String[] SETTINGS_TO_BACKUP = {
Amith Yamasani8823c0a82009-07-07 14:30:17 -07004889 ADB_ENABLED,
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07004890 BUGREPORT_IN_POWER_MENU,
Amith Yamasani8823c0a82009-07-07 14:30:17 -07004891 ALLOW_MOCK_LOCATION,
-b master501eec92009-07-06 13:53:11 -07004892 PARENTAL_CONTROL_ENABLED,
4893 PARENTAL_CONTROL_REDIRECT_URL,
4894 USB_MASS_STORAGE_ENABLED,
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -07004895 ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
4896 ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
4897 ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE,
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004898 ACCESSIBILITY_SCRIPT_INJECTION,
Christopher Tate14c2d792010-02-25 16:49:44 -08004899 BACKUP_AUTO_RESTORE,
-b master501eec92009-07-06 13:53:11 -07004900 ENABLED_ACCESSIBILITY_SERVICES,
Svetoslav Ganov9a4c5cd2012-05-30 14:06:32 -07004901 TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES,
Svetoslav Ganova28a16d2011-07-28 11:24:21 -07004902 TOUCH_EXPLORATION_ENABLED,
Svetoslav Ganova571a582011-09-20 18:32:20 -07004903 ACCESSIBILITY_ENABLED,
Svetoslav Ganov55f937a2011-12-05 11:42:07 -08004904 ACCESSIBILITY_SPEAK_PASSWORD,
-b master501eec92009-07-06 13:53:11 -07004905 TTS_USE_DEFAULTS,
4906 TTS_DEFAULT_RATE,
4907 TTS_DEFAULT_PITCH,
4908 TTS_DEFAULT_SYNTH,
4909 TTS_DEFAULT_LANG,
4910 TTS_DEFAULT_COUNTRY,
Charles Chenceffa152010-03-16 21:18:10 -07004911 TTS_ENABLED_PLUGINS,
Narayan Kamath6d632962011-08-24 11:51:37 +01004912 TTS_DEFAULT_LOCALE,
-b master501eec92009-07-06 13:53:11 -07004913 WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
4914 WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
-b master501eec92009-07-06 13:53:11 -07004915 WIFI_NUM_OPEN_NETWORKS_KEPT,
San Mehat87734d32010-01-08 12:53:06 -08004916 MOUNT_PLAY_NOTIFICATION_SND,
4917 MOUNT_UMS_AUTOSTART,
4918 MOUNT_UMS_PROMPT,
Dianne Hackborn2ccda4d2010-03-22 21:49:15 -07004919 MOUNT_UMS_NOTIFY_ENABLED,
Amith Yamasaniaee26872011-10-11 13:53:30 -07004920 UI_NIGHT_MODE,
4921 LOCK_SCREEN_OWNER_INFO,
Tom Taylor994da2a2011-11-10 11:17:38 -08004922 LOCK_SCREEN_OWNER_INFO_ENABLED
-b master501eec92009-07-06 13:53:11 -07004923 };
4924
4925 /**
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07004926 * Helper method for determining if a location provider is enabled.
4927 * @param cr the content resolver to use
4928 * @param provider the location provider to query
4929 * @return true if the provider is enabled
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07004930 */
4931 public static final boolean isLocationProviderEnabled(ContentResolver cr, String provider) {
4932 String allowedProviders = Settings.Secure.getString(cr, LOCATION_PROVIDERS_ALLOWED);
Brad Fitzpatrick11fe1812010-09-10 16:07:52 -07004933 return TextUtils.delimitedStringContains(allowedProviders, ',', provider);
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07004934 }
4935
4936 /**
4937 * Thread-safe method for enabling or disabling a single location provider.
4938 * @param cr the content resolver to use
4939 * @param provider the location provider to enable or disable
4940 * @param enabled true if the provider should be enabled
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07004941 */
4942 public static final void setLocationProviderEnabled(ContentResolver cr,
4943 String provider, boolean enabled) {
4944 // to ensure thread safety, we write the provider name with a '+' or '-'
4945 // and let the SettingsProvider handle it rather than reading and modifying
4946 // the list of enabled providers.
4947 if (enabled) {
4948 provider = "+" + provider;
4949 } else {
4950 provider = "-" + provider;
4951 }
4952 putString(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider);
4953 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004954 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004955
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004956 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004957 * Global system settings, containing preferences that always apply identically
4958 * to all defined users. Applications can read these but are not allowed to write;
4959 * like the "Secure" settings, these are for preferences that the user must
4960 * explicitly modify through the system UI or specialized APIs for those values.
4961 */
4962 public static final class Global extends NameValueTable {
4963 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_global_version";
4964
4965 /**
4966 * The content:// style URL for global secure settings items. Not public.
4967 */
4968 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global");
4969
4970 /**
4971 * Whether Airplane Mode is on.
4972 */
4973 public static final String AIRPLANE_MODE_ON = "airplane_mode_on";
4974
4975 /**
4976 * Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.
4977 */
4978 public static final String RADIO_BLUETOOTH = "bluetooth";
4979
4980 /**
4981 * Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio.
4982 */
4983 public static final String RADIO_WIFI = "wifi";
4984
4985 /**
4986 * {@hide}
4987 */
4988 public static final String RADIO_WIMAX = "wimax";
4989 /**
4990 * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.
4991 */
4992 public static final String RADIO_CELL = "cell";
4993
4994 /**
4995 * Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio.
4996 */
4997 public static final String RADIO_NFC = "nfc";
4998
4999 /**
5000 * A comma separated list of radios that need to be disabled when airplane mode
5001 * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are
5002 * included in the comma separated list.
5003 */
5004 public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios";
5005
5006 /**
5007 * A comma separated list of radios that should to be disabled when airplane mode
5008 * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is
5009 * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi
5010 * will be turned off when entering airplane mode, but the user will be able to reenable
5011 * Wifi in the Settings app.
5012 *
5013 * {@hide}
5014 */
5015 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios";
5016
5017 /**
5018 * The policy for deciding when Wi-Fi should go to sleep (which will in
5019 * turn switch to using the mobile data as an Internet connection).
5020 * <p>
5021 * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT},
5022 * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or
5023 * {@link #WIFI_SLEEP_POLICY_NEVER}.
5024 */
5025 public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy";
5026
5027 /**
5028 * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep
5029 * policy, which is to sleep shortly after the turning off
5030 * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting.
5031 */
5032 public static final int WIFI_SLEEP_POLICY_DEFAULT = 0;
5033
5034 /**
5035 * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when
5036 * the device is on battery, and never go to sleep when the device is
5037 * plugged in.
5038 */
5039 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1;
5040
5041 /**
5042 * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep.
5043 */
5044 public static final int WIFI_SLEEP_POLICY_NEVER = 2;
5045
5046 /**
5047 * Value to specify if the user prefers the date, time and time zone
5048 * to be automatically fetched from the network (NITZ). 1=yes, 0=no
5049 */
5050 public static final String AUTO_TIME = "auto_time";
5051
5052 /**
5053 * Value to specify if the user prefers the time zone
5054 * to be automatically fetched from the network (NITZ). 1=yes, 0=no
5055 */
5056 public static final String AUTO_TIME_ZONE = "auto_time_zone";
5057
5058 /**
5059 * URI for the car dock "in" event sound.
5060 * @hide
5061 */
5062 public static final String CAR_DOCK_SOUND = "car_dock_sound";
5063
5064 /**
5065 * URI for the car dock "out" event sound.
5066 * @hide
5067 */
5068 public static final String CAR_UNDOCK_SOUND = "car_undock_sound";
5069
5070 /**
5071 * URI for the desk dock "in" event sound.
5072 * @hide
5073 */
5074 public static final String DESK_DOCK_SOUND = "desk_dock_sound";
5075
5076 /**
5077 * URI for the desk dock "out" event sound.
5078 * @hide
5079 */
5080 public static final String DESK_UNDOCK_SOUND = "desk_undock_sound";
5081
5082 /**
5083 * Whether to play a sound for dock events.
5084 * @hide
5085 */
5086 public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled";
5087
5088 /**
5089 * URI for the "device locked" (keyguard shown) sound.
5090 * @hide
5091 */
5092 public static final String LOCK_SOUND = "lock_sound";
5093
5094 /**
5095 * URI for the "device unlocked" sound.
5096 * @hide
5097 */
5098 public static final String UNLOCK_SOUND = "unlock_sound";
5099
5100 /**
5101 * URI for the low battery sound file.
5102 * @hide
5103 */
5104 public static final String LOW_BATTERY_SOUND = "low_battery_sound";
5105
5106 /**
5107 * Whether to play a sound for low-battery alerts.
5108 * @hide
5109 */
5110 public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled";
5111
5112 /**
5113 * Whether we keep the device on while the device is plugged in.
5114 * Supported values are:
5115 * <ul>
5116 * <li>{@code 0} to never stay on while plugged in</li>
5117 * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li>
5118 * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li>
5119 * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li>
5120 * </ul>
5121 * These values can be OR-ed together.
5122 */
5123 public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in";
5124
5125 /**
5126 * Whether ADB is enabled.
5127 */
5128 public static final String ADB_ENABLED = "adb_enabled";
5129
5130 /**
5131 * Whether assisted GPS should be enabled or not.
5132 * @hide
5133 */
5134 public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled";
5135
5136 /**
5137 * Whether bluetooth is enabled/disabled
5138 * 0=disabled. 1=enabled.
5139 */
5140 public static final String BLUETOOTH_ON = "bluetooth_on";
5141
5142 /**
5143 * CDMA Cell Broadcast SMS
5144 * 0 = CDMA Cell Broadcast SMS disabled
5145 * 1 = CDMA Cell Broadcast SMS enabled
5146 * @hide
5147 */
5148 public static final String CDMA_CELL_BROADCAST_SMS =
5149 "cdma_cell_broadcast_sms";
5150
5151 /**
5152 * The CDMA roaming mode 0 = Home Networks, CDMA default
5153 * 1 = Roaming on Affiliated networks
5154 * 2 = Roaming on any networks
5155 * @hide
5156 */
5157 public static final String CDMA_ROAMING_MODE = "roaming_settings";
5158
5159 /**
5160 * The CDMA subscription mode 0 = RUIM/SIM (default)
5161 * 1 = NV
5162 * @hide
5163 */
5164 public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode";
5165
5166 /** Inactivity timeout to track mobile data activity.
5167 *
5168 * If set to a positive integer, it indicates the inactivity timeout value in seconds to
5169 * infer the data activity of mobile network. After a period of no activity on mobile
5170 * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE}
5171 * intent is fired to indicate a transition of network status from "active" to "idle". Any
5172 * subsequent activity on mobile networks triggers the firing of {@code
5173 * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active".
5174 *
5175 * Network activity refers to transmitting or receiving data on the network interfaces.
5176 *
5177 * Tracking is disabled if set to zero or negative value.
5178 *
5179 * @hide
5180 */
5181 public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile";
5182
5183 /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE}
5184 * but for Wifi network.
5185 * @hide
5186 */
5187 public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi";
5188
5189 /**
5190 * Whether or not data roaming is enabled. (0 = false, 1 = true)
5191 */
5192 public static final String DATA_ROAMING = "data_roaming";
5193
5194 /**
5195 * Whether user has enabled development settings.
5196 */
5197 public static final String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
5198
5199 /**
5200 * Whether the device has been provisioned (0 = false, 1 = true)
5201 */
5202 public static final String DEVICE_PROVISIONED = "device_provisioned";
5203
5204 /**
5205 * The saved value for WindowManagerService.setForcedDisplayDensity().
5206 * One integer in dpi. If unset, then use the real display density.
5207 * @hide
5208 */
5209 public static final String DISPLAY_DENSITY_FORCED = "display_density_forced";
5210
5211 /**
5212 * The saved value for WindowManagerService.setForcedDisplaySize().
5213 * Two integers separated by a comma. If unset, then use the real display size.
5214 * @hide
5215 */
5216 public static final String DISPLAY_SIZE_FORCED = "display_size_forced";
5217
5218 /**
5219 * The maximum size, in bytes, of a download that the download manager will transfer over
5220 * a non-wifi connection.
5221 * @hide
5222 */
5223 public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE =
5224 "download_manager_max_bytes_over_mobile";
5225
5226 /**
5227 * The recommended maximum size, in bytes, of a download that the download manager should
5228 * transfer over a non-wifi connection. Over this size, the use will be warned, but will
5229 * have the option to start the download over the mobile connection anyway.
5230 * @hide
5231 */
5232 public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE =
5233 "download_manager_recommended_max_bytes_over_mobile";
5234
5235 /**
5236 * Whether the package installer should allow installation of apps downloaded from
5237 * sources other than Google Play.
5238 *
5239 * 1 = allow installing from other sources
5240 * 0 = only allow installing from Google Play
5241 */
5242 public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
5243
5244 /**
5245 * Whether mobile data connections are allowed by the user. See
5246 * ConnectivityManager for more info.
5247 * @hide
5248 */
5249 public static final String MOBILE_DATA = "mobile_data";
5250
5251 /** {@hide} */
5252 public static final String NETSTATS_ENABLED = "netstats_enabled";
5253 /** {@hide} */
5254 public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval";
5255 /** {@hide} */
5256 public static final String NETSTATS_TIME_CACHE_MAX_AGE = "netstats_time_cache_max_age";
5257 /** {@hide} */
5258 public static final String NETSTATS_GLOBAL_ALERT_BYTES = "netstats_global_alert_bytes";
5259 /** {@hide} */
5260 public static final String NETSTATS_SAMPLE_ENABLED = "netstats_sample_enabled";
5261 /** {@hide} */
5262 public static final String NETSTATS_REPORT_XT_OVER_DEV = "netstats_report_xt_over_dev";
5263
5264 /** {@hide} */
5265 public static final String NETSTATS_DEV_BUCKET_DURATION = "netstats_dev_bucket_duration";
5266 /** {@hide} */
5267 public static final String NETSTATS_DEV_PERSIST_BYTES = "netstats_dev_persist_bytes";
5268 /** {@hide} */
5269 public static final String NETSTATS_DEV_ROTATE_AGE = "netstats_dev_rotate_age";
5270 /** {@hide} */
5271 public static final String NETSTATS_DEV_DELETE_AGE = "netstats_dev_delete_age";
5272
5273 /** {@hide} */
5274 public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration";
5275 /** {@hide} */
5276 public static final String NETSTATS_UID_PERSIST_BYTES = "netstats_uid_persist_bytes";
5277 /** {@hide} */
5278 public static final String NETSTATS_UID_ROTATE_AGE = "netstats_uid_rotate_age";
5279 /** {@hide} */
5280 public static final String NETSTATS_UID_DELETE_AGE = "netstats_uid_delete_age";
5281
5282 /** {@hide} */
5283 public static final String NETSTATS_UID_TAG_BUCKET_DURATION = "netstats_uid_tag_bucket_duration";
5284 /** {@hide} */
5285 public static final String NETSTATS_UID_TAG_PERSIST_BYTES = "netstats_uid_tag_persist_bytes";
5286 /** {@hide} */
5287 public static final String NETSTATS_UID_TAG_ROTATE_AGE = "netstats_uid_tag_rotate_age";
5288 /** {@hide} */
5289 public static final String NETSTATS_UID_TAG_DELETE_AGE = "netstats_uid_tag_delete_age";
5290
5291 /**
5292 * User preference for which network(s) should be used. Only the
5293 * connectivity service should touch this.
5294 */
5295 public static final String NETWORK_PREFERENCE = "network_preference";
5296
5297 /**
5298 * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
5299 * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
5300 * exceeded.
5301 * @hide
5302 */
5303 public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
5304
5305 /**
5306 * The length of time in milli-seconds that automatic small adjustments to
5307 * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
5308 * @hide
5309 */
5310 public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
5311
5312 /** Preferred NTP server. {@hide} */
5313 public static final String NTP_SERVER = "ntp_server";
5314 /** Timeout in milliseconds to wait for NTP server. {@hide} */
5315 public static final String NTP_TIMEOUT = "ntp_timeout";
5316
5317 /**
rich cannings4d8fc792012-09-07 14:43:43 -07005318 * Whether the package manager should send package verification broadcasts for verifiers to
5319 * review apps prior to installation.
5320 * 1 = request apps to be verified prior to installation, if a verifier exists.
5321 * 0 = do not verify apps before installation
5322 * {@hide}
5323 */
5324 public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable";
5325
5326 /** Timeout for package verification.
5327 * {@hide} */
5328 public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout";
5329
5330 /** Default response code for package verification.
5331 * {@hide} */
5332 public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response";
5333
rich canningse6686b32012-09-16 14:02:20 -07005334 /** Show package verification setting in the Settings app.
5335 * 1 = show (default)
5336 * 0 = hide
5337 * {@hide}
5338 */
5339 public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible";
5340
rich cannings4d8fc792012-09-07 14:43:43 -07005341 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005342 * The interval in milliseconds at which to check packet counts on the
5343 * mobile data interface when screen is on, to detect possible data
5344 * connection problems.
5345 * @hide
5346 */
5347 public static final String PDP_WATCHDOG_POLL_INTERVAL_MS =
5348 "pdp_watchdog_poll_interval_ms";
5349
5350 /**
5351 * The interval in milliseconds at which to check packet counts on the
5352 * mobile data interface when screen is off, to detect possible data
5353 * connection problems.
5354 * @hide
5355 */
5356 public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS =
5357 "pdp_watchdog_long_poll_interval_ms";
5358
5359 /**
5360 * The interval in milliseconds at which to check packet counts on the
5361 * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT}
5362 * outgoing packets has been reached without incoming packets.
5363 * @hide
5364 */
5365 public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS =
5366 "pdp_watchdog_error_poll_interval_ms";
5367
5368 /**
5369 * The number of outgoing packets sent without seeing an incoming packet
5370 * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT}
5371 * device is logged to the event log
5372 * @hide
5373 */
5374 public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT =
5375 "pdp_watchdog_trigger_packet_count";
5376
5377 /**
5378 * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS})
5379 * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before
5380 * attempting data connection recovery.
5381 * @hide
5382 */
5383 public static final String PDP_WATCHDOG_ERROR_POLL_COUNT =
5384 "pdp_watchdog_error_poll_count";
5385
5386 /**
5387 * The number of failed PDP reset attempts before moving to something more
5388 * drastic: re-registering to the network.
5389 * @hide
5390 */
5391 public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT =
5392 "pdp_watchdog_max_pdp_reset_fail_count";
5393
5394 /**
5395 * A positive value indicates how often the SamplingProfiler
5396 * should take snapshots. Zero value means SamplingProfiler
5397 * is disabled.
5398 *
5399 * @hide
5400 */
5401 public static final String SAMPLING_PROFILER_MS = "sampling_profiler_ms";
5402
5403 /**
5404 * URL to open browser on to allow user to manage a prepay account
5405 * @hide
5406 */
5407 public static final String SETUP_PREPAID_DATA_SERVICE_URL =
5408 "setup_prepaid_data_service_url";
5409
5410 /**
5411 * URL to attempt a GET on to see if this is a prepay device
5412 * @hide
5413 */
5414 public static final String SETUP_PREPAID_DETECTION_TARGET_URL =
5415 "setup_prepaid_detection_target_url";
5416
5417 /**
5418 * Host to check for a redirect to after an attempt to GET
5419 * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there,
5420 * this is a prepaid device with zero balance.)
5421 * @hide
5422 */
5423 public static final String SETUP_PREPAID_DETECTION_REDIR_HOST =
5424 "setup_prepaid_detection_redir_host";
5425
5426 /**
Jake Hamby76a61422012-09-06 17:40:21 -07005427 * The interval in milliseconds at which to check the number of SMS sent out without asking
5428 * for use permit, to limit the un-authorized SMS usage.
5429 *
5430 * @hide
5431 */
5432 public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
5433 "sms_outgoing_check_interval_ms";
5434
5435 /**
5436 * The number of outgoing SMS sent without asking for user permit (of {@link
5437 * #SMS_OUTGOING_CHECK_INTERVAL_MS}
5438 *
5439 * @hide
5440 */
5441 public static final String SMS_OUTGOING_CHECK_MAX_COUNT =
5442 "sms_outgoing_check_max_count";
5443
5444 /**
5445 * Used to disable SMS short code confirmation - defaults to true.
5446 * @see com.android.internal.telephony.SmsUsageMonitor
5447 * @hide
5448 */
5449 public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation";
5450
5451 /**
5452 * Prefix for SMS short code regex patterns (country code is appended).
5453 * @see com.android.internal.telephony.SmsUsageMonitor
5454 * @hide
5455 */
5456 public static final String SMS_SHORT_CODES_PREFIX = "sms_short_codes_";
5457
5458 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005459 * Used to disable Tethering on a device - defaults to true
5460 * @hide
5461 */
5462 public static final String TETHER_SUPPORTED = "tether_supported";
5463
5464 /**
5465 * Used to require DUN APN on the device or not - defaults to a build config value
5466 * which defaults to false
5467 * @hide
5468 */
5469 public static final String TETHER_DUN_REQUIRED = "tether_dun_required";
5470
5471 /**
5472 * Used to hold a gservices-provisioned apn value for DUN. If set, or the
5473 * corresponding build config values are set it will override the APN DB
5474 * values.
5475 * Consists of a comma seperated list of strings:
5476 * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
5477 * note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN"
5478 * @hide
5479 */
5480 public static final String TETHER_DUN_APN = "tether_dun_apn";
5481
5482 /**
5483 * The bandwidth throttle polling freqency in seconds
5484 * @hide
5485 */
5486 public static final String THROTTLE_POLLING_SEC = "throttle_polling_sec";
5487
5488 /**
5489 * The bandwidth throttle threshold (long)
5490 * @hide
5491 */
5492 public static final String THROTTLE_THRESHOLD_BYTES = "throttle_threshold_bytes";
5493
5494 /**
5495 * The bandwidth throttle value (kbps)
5496 * @hide
5497 */
5498 public static final String THROTTLE_VALUE_KBITSPS = "throttle_value_kbitsps";
5499
5500 /**
5501 * The bandwidth throttle reset calendar day (1-28)
5502 * @hide
5503 */
5504 public static final String THROTTLE_RESET_DAY = "throttle_reset_day";
5505
5506 /**
5507 * The throttling notifications we should send
5508 * @hide
5509 */
5510 public static final String THROTTLE_NOTIFICATION_TYPE = "throttle_notification_type";
5511
5512 /**
5513 * Help URI for data throttling policy
5514 * @hide
5515 */
5516 public static final String THROTTLE_HELP_URI = "throttle_help_uri";
5517
5518 /**
5519 * The length of time in Sec that we allow our notion of NTP time
5520 * to be cached before we refresh it
5521 * @hide
5522 */
5523 public static final String THROTTLE_MAX_NTP_CACHE_AGE_SEC =
5524 "throttle_max_ntp_cache_age_sec";
5525
5526 /**
5527 * USB Mass Storage Enabled
5528 */
5529 public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
5530
5531 /**
5532 * If this setting is set (to anything), then all references
5533 * to Gmail on the device must change to Google Mail.
5534 */
5535 public static final String USE_GOOGLE_MAIL = "use_google_mail";
5536
5537 /** Autofill server address (Used in WebView/browser).
5538 * {@hide} */
5539 public static final String WEB_AUTOFILL_QUERY_URL =
5540 "web_autofill_query_url";
5541
5542 /**
5543 * Whether to notify the user of open networks.
5544 * <p>
5545 * If not connected and the scan results have an open network, we will
5546 * put this notification up. If we attempt to connect to a network or
5547 * the open network(s) disappear, we remove the notification. When we
5548 * show the notification, we will not show it again for
5549 * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time.
5550 */
5551 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
5552 "wifi_networks_available_notification_on";
5553 /**
5554 * {@hide}
5555 */
5556 public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON =
5557 "wimax_networks_available_notification_on";
5558
5559 /**
5560 * Delay (in seconds) before repeating the Wi-Fi networks available notification.
5561 * Connecting to a network will reset the timer.
5562 */
5563 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
5564 "wifi_networks_available_repeat_delay";
5565
5566 /**
5567 * 802.11 country code in ISO 3166 format
5568 * @hide
5569 */
5570 public static final String WIFI_COUNTRY_CODE = "wifi_country_code";
5571
5572 /**
5573 * The interval in milliseconds to issue wake up scans when wifi needs
5574 * to connect. This is necessary to connect to an access point when
5575 * device is on the move and the screen is off.
5576 * @hide
5577 */
5578 public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS =
5579 "wifi_framework_scan_interval_ms";
5580
5581 /**
5582 * The interval in milliseconds after which Wi-Fi is considered idle.
5583 * When idle, it is possible for the device to be switched from Wi-Fi to
5584 * the mobile data network.
5585 * @hide
5586 */
5587 public static final String WIFI_IDLE_MS = "wifi_idle_ms";
5588
5589 /**
5590 * When the number of open networks exceeds this number, the
5591 * least-recently-used excess networks will be removed.
5592 */
5593 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept";
5594
5595 /**
5596 * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this.
5597 */
5598 public static final String WIFI_ON = "wifi_on";
5599
5600 /**
5601 * Used to save the Wifi_ON state prior to tethering.
5602 * This state will be checked to restore Wifi after
5603 * the user turns off tethering.
5604 *
5605 * @hide
5606 */
5607 public static final String WIFI_SAVED_STATE = "wifi_saved_state";
5608
5609 /**
5610 * The interval in milliseconds to scan as used by the wifi supplicant
5611 * @hide
5612 */
5613 public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS =
5614 "wifi_supplicant_scan_interval_ms";
5615
5616 /**
Irfan Sheriff3809f502012-09-17 16:04:57 -07005617 * The interval in milliseconds to scan at supplicant when p2p is connected
5618 * @hide
5619 */
5620 public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS =
5621 "wifi_scan_interval_p2p_connected_ms";
5622
5623 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005624 * Whether the Wi-Fi watchdog is enabled.
5625 */
5626 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
5627
5628 /**
5629 * ms delay interval between rssi polling when the signal is known to be weak
5630 * @hide
5631 */
5632 public static final String WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS =
5633 "wifi_watchdog_rssi_fetch_interval_ms";
5634
5635 /**
5636 * Number of ARP pings per check.
5637 * @hide
5638 */
5639 public static final String WIFI_WATCHDOG_NUM_ARP_PINGS = "wifi_watchdog_num_arp_pings";
5640
5641 /**
5642 * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and
5643 * the setting needs to be set to 0 to disable it.
5644 * @hide
5645 */
5646 public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED =
5647 "wifi_watchdog_poor_network_test_enabled";
5648
5649 /**
5650 * Setting to turn on suspend optimizations at screen off on Wi-Fi. Enabled by default and
5651 * needs to be set to 0 to disable it.
5652 * @hide
5653 */
5654 public static final String WIFI_SUSPEND_OPTIMIZATIONS_ENABLED =
5655 "wifi_suspend_optimizations_enabled";
5656
5657 /**
5658 * The maximum number of times we will retry a connection to an access
5659 * point for which we have failed in acquiring an IP address from DHCP.
5660 * A value of N means that we will make N+1 connection attempts in all.
5661 */
5662 public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
5663
5664 /**
5665 * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile
5666 * data connectivity to be established after a disconnect from Wi-Fi.
5667 */
5668 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
5669 "wifi_mobile_data_transition_wakelock_timeout_ms";
5670
5671 /**
5672 * The operational wifi frequency band
5673 * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO},
5674 * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or
5675 * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ}
5676 *
5677 * @hide
5678 */
5679 public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band";
5680
5681 /**
5682 * The Wi-Fi peer-to-peer device name
5683 * @hide
5684 */
5685 public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name";
5686
5687 /**
Christopher Tatec868b642012-09-12 17:41:04 -07005688 * The number of milliseconds to delay when checking for data stalls during
5689 * non-aggressive detection. (screen is turned off.)
5690 * @hide
5691 */
5692 public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
5693 "data_stall_alarm_non_aggressive_delay_in_ms";
5694
5695 /**
5696 * The number of milliseconds to delay when checking for data stalls during
5697 * aggressive detection. (screen on or suspected data stall)
5698 * @hide
5699 */
5700 public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
5701 "data_stall_alarm_aggressive_delay_in_ms";
5702
5703 /**
5704 * The interval in milliseconds at which to check gprs registration
5705 * after the first registration mismatch of gprs and voice service,
5706 * to detect possible data network registration problems.
5707 *
5708 * @hide
5709 */
5710 public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
5711 "gprs_register_check_period_ms";
5712
5713 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005714 * Nonzero causes Log.wtf() to crash.
5715 * @hide
5716 */
5717 public static final String WTF_IS_FATAL = "wtf_is_fatal";
5718
5719
5720
5721
5722 // Populated lazily, guarded by class object:
5723 private static NameValueCache sNameValueCache = null;
5724
5725 private static void lazyInitCache() {
5726 if (sNameValueCache == null) {
5727 sNameValueCache = new NameValueCache(
5728 SYS_PROP_SETTING_VERSION,
5729 CONTENT_URI,
5730 CALL_METHOD_GET_GLOBAL,
5731 CALL_METHOD_PUT_GLOBAL);
5732 }
5733 }
5734
5735 /**
5736 * Look up a name in the database.
5737 * @param resolver to access the database with
5738 * @param name to look up in the table
5739 * @return the corresponding value, or null if not present
5740 */
5741 public synchronized static String getString(ContentResolver resolver, String name) {
5742 return getStringForUser(resolver, name, UserHandle.myUserId());
5743 }
5744
5745 /** @hide */
5746 public synchronized static String getStringForUser(ContentResolver resolver, String name,
5747 int userHandle) {
5748 lazyInitCache();
5749 return sNameValueCache.getStringForUser(resolver, name, userHandle);
5750 }
5751
5752 /**
5753 * Store a name/value pair into the database.
5754 * @param resolver to access the database with
5755 * @param name to store
5756 * @param value to associate with the name
5757 * @return true if the value was set, false on database errors
5758 */
5759 public static boolean putString(ContentResolver resolver,
5760 String name, String value) {
5761 return putStringForUser(resolver, name, value, UserHandle.myUserId());
5762 }
5763
5764 /** @hide */
5765 public static boolean putStringForUser(ContentResolver resolver,
5766 String name, String value, int userHandle) {
5767 lazyInitCache();
5768 if (LOCAL_LOGV) {
5769 Log.v(TAG, "Global.putString(name=" + name + ", value=" + value
5770 + " for " + userHandle);
5771 }
5772 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
5773 }
5774
5775 /**
5776 * Construct the content URI for a particular name/value pair,
5777 * useful for monitoring changes with a ContentObserver.
5778 * @param name to look up in the table
5779 * @return the corresponding content URI, or null if not present
5780 */
5781 public static Uri getUriFor(String name) {
5782 return getUriFor(CONTENT_URI, name);
5783 }
5784
5785 /**
5786 * Convenience function for retrieving a single secure settings value
5787 * as an integer. Note that internally setting values are always
5788 * stored as strings; this function converts the string to an integer
5789 * for you. The default value will be returned if the setting is
5790 * not defined or not an integer.
5791 *
5792 * @param cr The ContentResolver to access.
5793 * @param name The name of the setting to retrieve.
5794 * @param def Value to return if the setting is not defined.
5795 *
5796 * @return The setting's current value, or 'def' if it is not defined
5797 * or not a valid integer.
5798 */
5799 public static int getInt(ContentResolver cr, String name, int def) {
5800 String v = getString(cr, name);
5801 try {
5802 return v != null ? Integer.parseInt(v) : def;
5803 } catch (NumberFormatException e) {
5804 return def;
5805 }
5806 }
5807
5808 /**
5809 * Convenience function for retrieving a single secure settings value
5810 * as an integer. Note that internally setting values are always
5811 * stored as strings; this function converts the string to an integer
5812 * for you.
5813 * <p>
5814 * This version does not take a default value. If the setting has not
5815 * been set, or the string value is not a number,
5816 * it throws {@link SettingNotFoundException}.
5817 *
5818 * @param cr The ContentResolver to access.
5819 * @param name The name of the setting to retrieve.
5820 *
5821 * @throws SettingNotFoundException Thrown if a setting by the given
5822 * name can't be found or the setting value is not an integer.
5823 *
5824 * @return The setting's current value.
5825 */
5826 public static int getInt(ContentResolver cr, String name)
5827 throws SettingNotFoundException {
5828 String v = getString(cr, name);
5829 try {
5830 return Integer.parseInt(v);
5831 } catch (NumberFormatException e) {
5832 throw new SettingNotFoundException(name);
5833 }
5834 }
5835
5836 /**
5837 * Convenience function for updating a single settings value as an
5838 * integer. This will either create a new entry in the table if the
5839 * given name does not exist, or modify the value of the existing row
5840 * with that name. Note that internally setting values are always
5841 * stored as strings, so this function converts the given value to a
5842 * string before storing it.
5843 *
5844 * @param cr The ContentResolver to access.
5845 * @param name The name of the setting to modify.
5846 * @param value The new value for the setting.
5847 * @return true if the value was set, false on database errors
5848 */
5849 public static boolean putInt(ContentResolver cr, String name, int value) {
5850 return putString(cr, name, Integer.toString(value));
5851 }
5852
5853 /**
5854 * Convenience function for retrieving a single secure settings value
5855 * as a {@code long}. Note that internally setting values are always
5856 * stored as strings; this function converts the string to a {@code long}
5857 * for you. The default value will be returned if the setting is
5858 * not defined or not a {@code long}.
5859 *
5860 * @param cr The ContentResolver to access.
5861 * @param name The name of the setting to retrieve.
5862 * @param def Value to return if the setting is not defined.
5863 *
5864 * @return The setting's current value, or 'def' if it is not defined
5865 * or not a valid {@code long}.
5866 */
5867 public static long getLong(ContentResolver cr, String name, long def) {
5868 String valString = getString(cr, name);
5869 long value;
5870 try {
5871 value = valString != null ? Long.parseLong(valString) : def;
5872 } catch (NumberFormatException e) {
5873 value = def;
5874 }
5875 return value;
5876 }
5877
5878 /**
5879 * Convenience function for retrieving a single secure settings value
5880 * as a {@code long}. Note that internally setting values are always
5881 * stored as strings; this function converts the string to a {@code long}
5882 * for you.
5883 * <p>
5884 * This version does not take a default value. If the setting has not
5885 * been set, or the string value is not a number,
5886 * it throws {@link SettingNotFoundException}.
5887 *
5888 * @param cr The ContentResolver to access.
5889 * @param name The name of the setting to retrieve.
5890 *
5891 * @return The setting's current value.
5892 * @throws SettingNotFoundException Thrown if a setting by the given
5893 * name can't be found or the setting value is not an integer.
5894 */
5895 public static long getLong(ContentResolver cr, String name)
5896 throws SettingNotFoundException {
5897 String valString = getString(cr, name);
5898 try {
5899 return Long.parseLong(valString);
5900 } catch (NumberFormatException e) {
5901 throw new SettingNotFoundException(name);
5902 }
5903 }
5904
5905 /**
5906 * Convenience function for updating a secure settings value as a long
5907 * integer. This will either create a new entry in the table if the
5908 * given name does not exist, or modify the value of the existing row
5909 * with that name. Note that internally setting values are always
5910 * stored as strings, so this function converts the given value to a
5911 * string before storing it.
5912 *
5913 * @param cr The ContentResolver to access.
5914 * @param name The name of the setting to modify.
5915 * @param value The new value for the setting.
5916 * @return true if the value was set, false on database errors
5917 */
5918 public static boolean putLong(ContentResolver cr, String name, long value) {
5919 return putString(cr, name, Long.toString(value));
5920 }
5921
5922 /**
5923 * Convenience function for retrieving a single secure settings value
5924 * as a floating point number. Note that internally setting values are
5925 * always stored as strings; this function converts the string to an
5926 * float for you. The default value will be returned if the setting
5927 * is not defined or not a valid float.
5928 *
5929 * @param cr The ContentResolver to access.
5930 * @param name The name of the setting to retrieve.
5931 * @param def Value to return if the setting is not defined.
5932 *
5933 * @return The setting's current value, or 'def' if it is not defined
5934 * or not a valid float.
5935 */
5936 public static float getFloat(ContentResolver cr, String name, float def) {
5937 String v = getString(cr, name);
5938 try {
5939 return v != null ? Float.parseFloat(v) : def;
5940 } catch (NumberFormatException e) {
5941 return def;
5942 }
5943 }
5944
5945 /**
5946 * Convenience function for retrieving a single secure settings value
5947 * as a float. Note that internally setting values are always
5948 * stored as strings; this function converts the string to a float
5949 * for you.
5950 * <p>
5951 * This version does not take a default value. If the setting has not
5952 * been set, or the string value is not a number,
5953 * it throws {@link SettingNotFoundException}.
5954 *
5955 * @param cr The ContentResolver to access.
5956 * @param name The name of the setting to retrieve.
5957 *
5958 * @throws SettingNotFoundException Thrown if a setting by the given
5959 * name can't be found or the setting value is not a float.
5960 *
5961 * @return The setting's current value.
5962 */
5963 public static float getFloat(ContentResolver cr, String name)
5964 throws SettingNotFoundException {
5965 String v = getString(cr, name);
5966 if (v == null) {
5967 throw new SettingNotFoundException(name);
5968 }
5969 try {
5970 return Float.parseFloat(v);
5971 } catch (NumberFormatException e) {
5972 throw new SettingNotFoundException(name);
5973 }
5974 }
5975
5976 /**
5977 * Convenience function for updating a single settings value as a
5978 * floating point number. This will either create a new entry in the
5979 * table if the given name does not exist, or modify the value of the
5980 * existing row with that name. Note that internally setting values
5981 * are always stored as strings, so this function converts the given
5982 * value to a string before storing it.
5983 *
5984 * @param cr The ContentResolver to access.
5985 * @param name The name of the setting to modify.
5986 * @param value The new value for the setting.
5987 * @return true if the value was set, false on database errors
5988 */
5989 public static boolean putFloat(ContentResolver cr, String name, float value) {
5990 return putString(cr, name, Float.toString(value));
5991 }
5992 }
5993
5994 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005995 * User-defined bookmarks and shortcuts. The target of each bookmark is an
5996 * Intent URL, allowing it to be either a web page or a particular
5997 * application activity.
5998 *
5999 * @hide
6000 */
6001 public static final class Bookmarks implements BaseColumns
6002 {
6003 private static final String TAG = "Bookmarks";
6004
6005 /**
6006 * The content:// style URL for this table
6007 */
6008 public static final Uri CONTENT_URI =
6009 Uri.parse("content://" + AUTHORITY + "/bookmarks");
6010
6011 /**
6012 * The row ID.
6013 * <p>Type: INTEGER</p>
6014 */
6015 public static final String ID = "_id";
6016
6017 /**
6018 * Descriptive name of the bookmark that can be displayed to the user.
6019 * If this is empty, the title should be resolved at display time (use
6020 * {@link #getTitle(Context, Cursor)} any time you want to display the
6021 * title of a bookmark.)
6022 * <P>
6023 * Type: TEXT
6024 * </P>
6025 */
6026 public static final String TITLE = "title";
6027
6028 /**
6029 * Arbitrary string (displayed to the user) that allows bookmarks to be
6030 * organized into categories. There are some special names for
6031 * standard folders, which all start with '@'. The label displayed for
6032 * the folder changes with the locale (via {@link #getLabelForFolder}) but
6033 * the folder name does not change so you can consistently query for
6034 * the folder regardless of the current locale.
6035 *
6036 * <P>Type: TEXT</P>
6037 *
6038 */
6039 public static final String FOLDER = "folder";
6040
6041 /**
6042 * The Intent URL of the bookmark, describing what it points to. This
6043 * value is given to {@link android.content.Intent#getIntent} to create
6044 * an Intent that can be launched.
6045 * <P>Type: TEXT</P>
6046 */
6047 public static final String INTENT = "intent";
6048
6049 /**
6050 * Optional shortcut character associated with this bookmark.
6051 * <P>Type: INTEGER</P>
6052 */
6053 public static final String SHORTCUT = "shortcut";
6054
6055 /**
6056 * The order in which the bookmark should be displayed
6057 * <P>Type: INTEGER</P>
6058 */
6059 public static final String ORDERING = "ordering";
6060
6061 private static final String[] sIntentProjection = { INTENT };
6062 private static final String[] sShortcutProjection = { ID, SHORTCUT };
6063 private static final String sShortcutSelection = SHORTCUT + "=?";
6064
6065 /**
6066 * Convenience function to retrieve the bookmarked Intent for a
6067 * particular shortcut key.
6068 *
6069 * @param cr The ContentResolver to query.
6070 * @param shortcut The shortcut key.
6071 *
6072 * @return Intent The bookmarked URL, or null if there is no bookmark
6073 * matching the given shortcut.
6074 */
6075 public static Intent getIntentForShortcut(ContentResolver cr, char shortcut)
6076 {
6077 Intent intent = null;
6078
6079 Cursor c = cr.query(CONTENT_URI,
6080 sIntentProjection, sShortcutSelection,
6081 new String[] { String.valueOf((int) shortcut) }, ORDERING);
6082 // Keep trying until we find a valid shortcut
6083 try {
6084 while (intent == null && c.moveToNext()) {
6085 try {
6086 String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT));
Christian Mehlmauera34d2c92010-05-25 19:04:20 +02006087 intent = Intent.parseUri(intentURI, 0);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006088 } catch (java.net.URISyntaxException e) {
6089 // The stored URL is bad... ignore it.
6090 } catch (IllegalArgumentException e) {
6091 // Column not found
Dianne Hackborna33e3f72009-09-29 17:28:24 -07006092 Log.w(TAG, "Intent column not found", e);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006093 }
6094 }
6095 } finally {
6096 if (c != null) c.close();
6097 }
6098
6099 return intent;
6100 }
6101
6102 /**
6103 * Add a new bookmark to the system.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07006104 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006105 * @param cr The ContentResolver to query.
6106 * @param intent The desired target of the bookmark.
6107 * @param title Bookmark title that is shown to the user; null if none
6108 * or it should be resolved to the intent's title.
6109 * @param folder Folder in which to place the bookmark; null if none.
6110 * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If
6111 * this is non-zero and there is an existing bookmark entry
6112 * with this same shortcut, then that existing shortcut is
6113 * cleared (the bookmark is not removed).
6114 * @return The unique content URL for the new bookmark entry.
6115 */
6116 public static Uri add(ContentResolver cr,
6117 Intent intent,
6118 String title,
6119 String folder,
6120 char shortcut,
6121 int ordering)
6122 {
6123 // If a shortcut is supplied, and it is already defined for
6124 // another bookmark, then remove the old definition.
6125 if (shortcut != 0) {
Jeff Hamilton7cd51ef2010-05-12 17:30:27 -05006126 cr.delete(CONTENT_URI, sShortcutSelection,
6127 new String[] { String.valueOf((int) shortcut) });
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006128 }
6129
6130 ContentValues values = new ContentValues();
6131 if (title != null) values.put(TITLE, title);
6132 if (folder != null) values.put(FOLDER, folder);
Jean-Baptiste Queru3b9f0a32010-06-21 13:46:59 -07006133 values.put(INTENT, intent.toUri(0));
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006134 if (shortcut != 0) values.put(SHORTCUT, (int) shortcut);
6135 values.put(ORDERING, ordering);
6136 return cr.insert(CONTENT_URI, values);
6137 }
6138
6139 /**
6140 * Return the folder name as it should be displayed to the user. This
6141 * takes care of localizing special folders.
6142 *
6143 * @param r Resources object for current locale; only need access to
6144 * system resources.
6145 * @param folder The value found in the {@link #FOLDER} column.
6146 *
6147 * @return CharSequence The label for this folder that should be shown
6148 * to the user.
6149 */
6150 public static CharSequence getLabelForFolder(Resources r, String folder) {
6151 return folder;
6152 }
6153
6154 /**
6155 * Return the title as it should be displayed to the user. This takes
6156 * care of localizing bookmarks that point to activities.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07006157 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006158 * @param context A context.
6159 * @param cursor A cursor pointing to the row whose title should be
6160 * returned. The cursor must contain at least the {@link #TITLE}
6161 * and {@link #INTENT} columns.
6162 * @return A title that is localized and can be displayed to the user,
6163 * or the empty string if one could not be found.
6164 */
6165 public static CharSequence getTitle(Context context, Cursor cursor) {
6166 int titleColumn = cursor.getColumnIndex(TITLE);
6167 int intentColumn = cursor.getColumnIndex(INTENT);
6168 if (titleColumn == -1 || intentColumn == -1) {
6169 throw new IllegalArgumentException(
6170 "The cursor must contain the TITLE and INTENT columns.");
6171 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07006172
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006173 String title = cursor.getString(titleColumn);
6174 if (!TextUtils.isEmpty(title)) {
6175 return title;
6176 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07006177
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006178 String intentUri = cursor.getString(intentColumn);
6179 if (TextUtils.isEmpty(intentUri)) {
6180 return "";
6181 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07006182
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006183 Intent intent;
6184 try {
Christian Mehlmauera34d2c92010-05-25 19:04:20 +02006185 intent = Intent.parseUri(intentUri, 0);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006186 } catch (URISyntaxException e) {
6187 return "";
6188 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07006189
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006190 PackageManager packageManager = context.getPackageManager();
6191 ResolveInfo info = packageManager.resolveActivity(intent, 0);
6192 return info != null ? info.loadLabel(packageManager) : "";
6193 }
6194 }
6195
6196 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08006197 * Returns the device ID that we should use when connecting to the mobile gtalk server.
6198 * This is a string like "android-0x1242", where the hex string is the Android ID obtained
6199 * from the GoogleLoginService.
6200 *
6201 * @param androidId The Android ID for this device.
6202 * @return The device ID that should be used when connecting to the mobile gtalk server.
6203 * @hide
6204 */
6205 public static String getGTalkDeviceId(long androidId) {
6206 return "android-" + Long.toHexString(androidId);
6207 }
6208}