blob: 4e1375891337c3c1cc3ef7edba269e630ebbe6bf [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.provider;
18
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080019import android.annotation.SdkConstant;
20import android.annotation.SdkConstant.SdkConstantType;
Bryce Leecdfebd62015-02-02 08:19:11 -080021import android.annotation.SystemApi;
Narayan Kamathee69ff42011-06-28 12:07:18 +010022import android.app.SearchManager;
Jeff Sharkey6e2bee72012-10-01 13:39:08 -070023import android.app.WallpaperManager;
Mike LeBeau5d34e9b2010-02-10 19:34:56 -080024import android.content.ComponentName;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080025import android.content.ContentResolver;
26import android.content.ContentValues;
27import android.content.Context;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -080028import android.content.IContentProvider;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080029import android.content.Intent;
Dianne Hackbornb8b11a02010-03-10 15:53:11 -080030import android.content.pm.ActivityInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080031import android.content.pm.PackageManager;
32import android.content.pm.ResolveInfo;
33import android.content.res.Configuration;
34import android.content.res.Resources;
35import android.database.Cursor;
36import android.database.SQLException;
David Christie3f7b6522013-08-06 19:19:08 -070037import android.location.LocationManager;
Jeff Sharkey625239a2012-09-26 22:03:49 -070038import android.net.ConnectivityManager;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080039import android.net.Uri;
Irfan Sheriff36f74132010-11-04 16:57:37 -070040import android.net.wifi.WifiManager;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070041import android.os.BatteryManager;
42import android.os.Bundle;
Jeff Sharkey625239a2012-09-26 22:03:49 -070043import android.os.DropBoxManager;
Amith Yamasani52c489c2012-03-28 11:42:42 -070044import android.os.IBinder;
Amith Yamasani7ab8c4a2012-04-06 09:27:12 -070045import android.os.Process;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070046import android.os.RemoteException;
Amith Yamasani52c489c2012-03-28 11:42:42 -070047import android.os.ServiceManager;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070048import android.os.SystemProperties;
Dianne Hackbornf02b60a2012-08-16 10:48:27 -070049import android.os.UserHandle;
Jeff Sharkey625239a2012-09-26 22:03:49 -070050import android.os.Build.VERSION_CODES;
Narayan Kamath6d632962011-08-24 11:51:37 +010051import android.speech.tts.TextToSpeech;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080052import android.text.TextUtils;
53import android.util.AndroidException;
Svetoslav683914b2015-01-15 14:22:26 -080054import android.util.ArrayMap;
55import android.util.ArraySet;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080056import android.util.Log;
57
Svetoslav683914b2015-01-15 14:22:26 -080058import com.android.internal.util.ArrayUtils;
Amith Yamasani52c489c2012-03-28 11:42:42 -070059import com.android.internal.widget.ILockSettings;
60
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080061import java.net.URISyntaxException;
Svetoslav683914b2015-01-15 14:22:26 -080062import java.text.SimpleDateFormat;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080063import java.util.HashMap;
64import java.util.HashSet;
Elliott Hughescb64d432013-08-02 10:00:44 -070065import java.util.Locale;
Svetoslav683914b2015-01-15 14:22:26 -080066import java.util.Map;
67import java.util.Set;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080068
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080069/**
70 * The Settings provider contains global system-level device preferences.
71 */
72public final class Settings {
73
74 // Intent actions for Settings
75
76 /**
77 * Activity Action: Show system settings.
78 * <p>
79 * Input: Nothing.
80 * <p>
Gilles Debunnee90bed12011-08-30 14:28:27 -070081 * Output: Nothing.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080082 */
83 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
84 public static final String ACTION_SETTINGS = "android.settings.SETTINGS";
85
86 /**
87 * Activity Action: Show settings to allow configuration of APNs.
88 * <p>
89 * Input: Nothing.
90 * <p>
Gilles Debunnee90bed12011-08-30 14:28:27 -070091 * Output: Nothing.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080092 */
93 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
94 public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS";
95
96 /**
97 * Activity Action: Show settings to allow configuration of current location
98 * sources.
99 * <p>
100 * In some cases, a matching Activity may not exist, so ensure you
101 * safeguard against this.
102 * <p>
103 * Input: Nothing.
104 * <p>
105 * Output: Nothing.
106 */
107 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
108 public static final String ACTION_LOCATION_SOURCE_SETTINGS =
109 "android.settings.LOCATION_SOURCE_SETTINGS";
110
111 /**
112 * Activity Action: Show settings to allow configuration of wireless controls
113 * such as Wi-Fi, Bluetooth and Mobile networks.
114 * <p>
115 * In some cases, a matching Activity may not exist, so ensure you
116 * safeguard against this.
117 * <p>
118 * Input: Nothing.
119 * <p>
120 * Output: Nothing.
121 */
122 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
123 public static final String ACTION_WIRELESS_SETTINGS =
124 "android.settings.WIRELESS_SETTINGS";
125
126 /**
127 * Activity Action: Show settings to allow entering/exiting airplane mode.
128 * <p>
129 * In some cases, a matching Activity may not exist, so ensure you
130 * safeguard against this.
131 * <p>
132 * Input: Nothing.
133 * <p>
134 * Output: Nothing.
135 */
136 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
137 public static final String ACTION_AIRPLANE_MODE_SETTINGS =
138 "android.settings.AIRPLANE_MODE_SETTINGS";
139
140 /**
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700141 * Activity Action: Modify Airplane mode settings using a voice command.
Barnaby James48f35522014-07-16 14:27:39 -0700142 * <p>
143 * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
144 * <p>
145 * This intent MUST be started using
146 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
147 * startVoiceActivity}.
148 * <p>
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700149 * Note: The activity implementing this intent MUST verify that
Barnaby James48f35522014-07-16 14:27:39 -0700150 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before
151 * modifying the setting.
152 * <p>
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700153 * Input: To tell which state airplane mode should be set to, add the
154 * {@link #EXTRA_AIRPLANE_MODE_ENABLED} extra to this Intent with the state specified.
155 * If the extra is not included, no changes will be made.
Barnaby James48f35522014-07-16 14:27:39 -0700156 * <p>
157 * Output: Nothing.
158 */
159 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
160 public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE =
161 "android.settings.VOICE_CONTROL_AIRPLANE_MODE";
162
163 /**
Dianne Hackborndd9b82c2009-09-03 00:18:47 -0700164 * Activity Action: Show settings for accessibility modules.
165 * <p>
166 * In some cases, a matching Activity may not exist, so ensure you
167 * safeguard against this.
168 * <p>
169 * Input: Nothing.
170 * <p>
171 * Output: Nothing.
172 */
173 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
174 public static final String ACTION_ACCESSIBILITY_SETTINGS =
175 "android.settings.ACCESSIBILITY_SETTINGS";
176
177 /**
Dianne Hackborna3fb40d2014-08-12 15:06:50 -0700178 * Activity Action: Show settings to control access to usage information.
179 * <p>
180 * In some cases, a matching Activity may not exist, so ensure you
181 * safeguard against this.
182 * <p>
183 * Input: Nothing.
184 * <p>
185 * Output: Nothing.
186 */
187 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
188 public static final String ACTION_USAGE_ACCESS_SETTINGS =
189 "android.settings.USAGE_ACCESS_SETTINGS";
190
191 /**
Jason Monk6f909782015-04-17 14:30:25 -0400192 * Activity Category: Show application settings related to usage access.
193 * <p>
194 * An activity that provides a user interface for adjusting usage access related
195 * preferences for its containing application. Optional but recommended for apps that
196 * use {@link android.Manifest.permission#PACKAGE_USAGE_STATS}.
197 * <p>
198 * The activity may define meta-data to describe what usage access is
199 * used for within their app with {@link #METADATA_USAGE_ACCESS_REASON}, which
200 * will be displayed in Settings.
201 * <p>
202 * Input: Nothing.
203 * <p>
204 * Output: Nothing.
205 */
206 @SdkConstant(SdkConstantType.INTENT_CATEGORY)
207 public static final String INTENT_CATEGORY_USAGE_ACCESS_CONFIG =
208 "android.intent.category.USAGE_ACCESS_CONFIG";
209
210 /**
211 * Metadata key: Reason for needing usage access.
212 * <p>
213 * A key for metadata attached to an activity that receives action
214 * {@link #INTENT_CATEGORY_USAGE_ACCESS_CONFIG}, shown to the
215 * user as description of how the app uses usage access.
216 * <p>
217 */
218 public static final String METADATA_USAGE_ACCESS_REASON =
219 "android.settings.metadata.USAGE_ACCESS_REASON";
220
221 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800222 * Activity Action: Show settings to allow configuration of security and
223 * location privacy.
224 * <p>
225 * In some cases, a matching Activity may not exist, so ensure you
226 * safeguard against this.
227 * <p>
228 * Input: Nothing.
229 * <p>
230 * Output: Nothing.
231 */
232 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
233 public static final String ACTION_SECURITY_SETTINGS =
234 "android.settings.SECURITY_SETTINGS";
235
236 /**
Maggie Benthall0469f412013-09-05 15:30:26 -0400237 * Activity Action: Show trusted credentials settings, opening to the user tab,
238 * to allow management of installed credentials.
239 * <p>
240 * In some cases, a matching Activity may not exist, so ensure you
241 * safeguard against this.
242 * <p>
243 * Input: Nothing.
244 * <p>
245 * Output: Nothing.
246 * @hide
247 */
248 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
249 public static final String ACTION_TRUSTED_CREDENTIALS_USER =
250 "com.android.settings.TRUSTED_CREDENTIALS_USER";
251
252 /**
253 * Activity Action: Show dialog explaining that an installed CA cert may enable
254 * monitoring of encrypted network traffic.
255 * <p>
256 * In some cases, a matching Activity may not exist, so ensure you
257 * safeguard against this.
258 * <p>
259 * Input: Nothing.
260 * <p>
261 * Output: Nothing.
262 * @hide
263 */
264 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
265 public static final String ACTION_MONITORING_CERT_INFO =
266 "com.android.settings.MONITORING_CERT_INFO";
267
268 /**
Amith Yamasanic15255a2009-09-23 15:33:19 -0700269 * Activity Action: Show settings to allow configuration of privacy options.
270 * <p>
271 * In some cases, a matching Activity may not exist, so ensure you
272 * safeguard against this.
273 * <p>
274 * Input: Nothing.
275 * <p>
276 * Output: Nothing.
277 */
278 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
279 public static final String ACTION_PRIVACY_SETTINGS =
280 "android.settings.PRIVACY_SETTINGS";
281
282 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800283 * Activity Action: Show settings to allow configuration of Wi-Fi.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800284 * <p>
285 * In some cases, a matching Activity may not exist, so ensure you
286 * safeguard against this.
287 * <p>
288 * Input: Nothing.
289 * <p>
290 * Output: Nothing.
291
292 */
293 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
294 public static final String ACTION_WIFI_SETTINGS =
295 "android.settings.WIFI_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700296
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800297 /**
298 * Activity Action: Show settings to allow configuration of a static IP
299 * address for Wi-Fi.
300 * <p>
301 * In some cases, a matching Activity may not exist, so ensure you safeguard
302 * against this.
303 * <p>
304 * Input: Nothing.
305 * <p>
306 * Output: Nothing.
307 */
308 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
309 public static final String ACTION_WIFI_IP_SETTINGS =
310 "android.settings.WIFI_IP_SETTINGS";
311
312 /**
313 * Activity Action: Show settings to allow configuration of Bluetooth.
314 * <p>
315 * In some cases, a matching Activity may not exist, so ensure you
316 * safeguard against this.
317 * <p>
318 * Input: Nothing.
319 * <p>
320 * Output: Nothing.
321 */
322 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
323 public static final String ACTION_BLUETOOTH_SETTINGS =
324 "android.settings.BLUETOOTH_SETTINGS";
325
326 /**
Jeff Brownc05c1ae2015-05-05 13:46:30 -0700327 * Activity Action: Show settings to allow configuration of cast endpoints.
Jeff Brown1a937b02014-07-01 22:13:04 -0700328 * <p>
329 * In some cases, a matching Activity may not exist, so ensure you
330 * safeguard against this.
331 * <p>
332 * Input: Nothing.
333 * <p>
334 * Output: Nothing.
335 */
336 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
337 public static final String ACTION_CAST_SETTINGS =
338 "android.settings.CAST_SETTINGS";
339
340 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800341 * Activity Action: Show settings to allow configuration of date and time.
342 * <p>
343 * In some cases, a matching Activity may not exist, so ensure you
344 * safeguard against this.
345 * <p>
346 * Input: Nothing.
347 * <p>
348 * Output: Nothing.
349 */
350 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
351 public static final String ACTION_DATE_SETTINGS =
352 "android.settings.DATE_SETTINGS";
353
354 /**
355 * Activity Action: Show settings to allow configuration of sound and volume.
356 * <p>
357 * In some cases, a matching Activity may not exist, so ensure you
358 * safeguard against this.
359 * <p>
360 * Input: Nothing.
361 * <p>
362 * Output: Nothing.
363 */
364 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
365 public static final String ACTION_SOUND_SETTINGS =
366 "android.settings.SOUND_SETTINGS";
367
368 /**
369 * Activity Action: Show settings to allow configuration of display.
370 * <p>
371 * In some cases, a matching Activity may not exist, so ensure you
372 * safeguard against this.
373 * <p>
374 * Input: Nothing.
375 * <p>
376 * Output: Nothing.
377 */
378 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
379 public static final String ACTION_DISPLAY_SETTINGS =
380 "android.settings.DISPLAY_SETTINGS";
381
382 /**
383 * Activity Action: Show settings to allow configuration of locale.
384 * <p>
385 * In some cases, a matching Activity may not exist, so ensure you
386 * safeguard against this.
387 * <p>
388 * Input: Nothing.
389 * <p>
390 * Output: Nothing.
391 */
392 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
393 public static final String ACTION_LOCALE_SETTINGS =
394 "android.settings.LOCALE_SETTINGS";
395
396 /**
397 * Activity Action: Show settings to configure input methods, in particular
398 * allowing the user to enable input methods.
399 * <p>
400 * In some cases, a matching Activity may not exist, so ensure you
401 * safeguard against this.
402 * <p>
403 * Input: Nothing.
404 * <p>
405 * Output: Nothing.
406 */
407 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
Dianne Hackborna3fb40d2014-08-12 15:06:50 -0700408 public static final String ACTION_VOICE_INPUT_SETTINGS =
409 "android.settings.VOICE_INPUT_SETTINGS";
410
411 /**
412 * Activity Action: Show settings to configure input methods, in particular
413 * allowing the user to enable input methods.
414 * <p>
415 * In some cases, a matching Activity may not exist, so ensure you
416 * safeguard against this.
417 * <p>
418 * Input: Nothing.
419 * <p>
420 * Output: Nothing.
421 */
422 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800423 public static final String ACTION_INPUT_METHOD_SETTINGS =
424 "android.settings.INPUT_METHOD_SETTINGS";
425
426 /**
Tadashi G. Takaokaf49688f2011-01-20 17:56:13 +0900427 * Activity Action: Show settings to enable/disable input method subtypes.
satok86417ea2010-10-27 14:11:03 +0900428 * <p>
429 * In some cases, a matching Activity may not exist, so ensure you
430 * safeguard against this.
431 * <p>
Tadashi G. Takaoka25480202011-01-20 23:13:02 +0900432 * To tell which input method's subtypes are displayed in the settings, add
433 * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id.
434 * If there is no extra in this Intent, subtypes from all installed input methods
435 * will be displayed in the settings.
436 *
437 * @see android.view.inputmethod.InputMethodInfo#getId
438 * <p>
satok86417ea2010-10-27 14:11:03 +0900439 * Input: Nothing.
440 * <p>
441 * Output: Nothing.
442 */
443 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
Tadashi G. Takaokaf49688f2011-01-20 17:56:13 +0900444 public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS =
445 "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS";
satok86417ea2010-10-27 14:11:03 +0900446
447 /**
satok7cfc0ed2011-06-20 21:29:36 +0900448 * Activity Action: Show a dialog to select input method.
449 * <p>
450 * In some cases, a matching Activity may not exist, so ensure you
451 * safeguard against this.
452 * <p>
453 * Input: Nothing.
454 * <p>
455 * Output: Nothing.
456 * @hide
457 */
458 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
459 public static final String ACTION_SHOW_INPUT_METHOD_PICKER =
460 "android.settings.SHOW_INPUT_METHOD_PICKER";
461
462 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800463 * Activity Action: Show settings to manage the user input dictionary.
464 * <p>
Chet Haasee8222dd2013-09-05 07:44:18 -0700465 * Starting with {@link android.os.Build.VERSION_CODES#KITKAT},
Satoshi Kataoka2aa2bc52013-07-30 14:25:11 +0900466 * it is guaranteed there will always be an appropriate implementation for this Intent action.
467 * In prior releases of the platform this was optional, so ensure you safeguard against it.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800468 * <p>
469 * Input: Nothing.
470 * <p>
471 * Output: Nothing.
472 */
473 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
474 public static final String ACTION_USER_DICTIONARY_SETTINGS =
475 "android.settings.USER_DICTIONARY_SETTINGS";
476
477 /**
Gilles Debunnee90bed12011-08-30 14:28:27 -0700478 * Activity Action: Adds a word to the user dictionary.
479 * <p>
480 * In some cases, a matching Activity may not exist, so ensure you
481 * safeguard against this.
482 * <p>
483 * Input: An extra with key <code>word</code> that contains the word
484 * that should be added to the dictionary.
485 * <p>
486 * Output: Nothing.
487 *
488 * @hide
489 */
490 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
491 public static final String ACTION_USER_DICTIONARY_INSERT =
492 "com.android.settings.USER_DICTIONARY_INSERT";
493
494 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800495 * Activity Action: Show settings to allow configuration of application-related settings.
496 * <p>
497 * In some cases, a matching Activity may not exist, so ensure you
498 * safeguard against this.
499 * <p>
500 * Input: Nothing.
501 * <p>
502 * Output: Nothing.
503 */
504 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
505 public static final String ACTION_APPLICATION_SETTINGS =
506 "android.settings.APPLICATION_SETTINGS";
507
508 /**
509 * Activity Action: Show settings to allow configuration of application
Dianne Hackborn8d866e52012-10-10 18:39:45 -0700510 * development-related settings. As of
511 * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is
512 * a required part of the platform.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800513 * <p>
514 * Input: Nothing.
515 * <p>
516 * Output: Nothing.
517 */
518 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
519 public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS =
520 "android.settings.APPLICATION_DEVELOPMENT_SETTINGS";
521
522 /**
523 * Activity Action: Show settings to allow configuration of quick launch shortcuts.
524 * <p>
525 * In some cases, a matching Activity may not exist, so ensure you
526 * safeguard against this.
527 * <p>
528 * Input: Nothing.
529 * <p>
530 * Output: Nothing.
531 */
532 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
533 public static final String ACTION_QUICK_LAUNCH_SETTINGS =
534 "android.settings.QUICK_LAUNCH_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700535
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800536 /**
537 * Activity Action: Show settings to manage installed applications.
538 * <p>
539 * In some cases, a matching Activity may not exist, so ensure you
540 * safeguard against this.
541 * <p>
542 * Input: Nothing.
543 * <p>
544 * Output: Nothing.
545 */
546 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
547 public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS =
548 "android.settings.MANAGE_APPLICATIONS_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700549
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800550 /**
Winson Chung44e8ff92010-09-27 14:36:52 -0700551 * Activity Action: Show settings to manage all applications.
552 * <p>
553 * In some cases, a matching Activity may not exist, so ensure you
554 * safeguard against this.
555 * <p>
556 * Input: Nothing.
557 * <p>
558 * Output: Nothing.
559 */
560 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
561 public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS =
562 "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS";
563
564 /**
Billy Laucbe540f2015-06-25 01:51:44 +0100565 * Activity Action: Show settings to toggle permission to draw on top of
566 * other apps.
567 * <p>
568 * In some cases, a matching Activity may not exist, so ensure you
569 * safeguard against this.
570 * <p>
571 * Input: Nothing.
572 * <p>
573 * Output: Nothing.
574 */
575 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
576 public static final String ACTION_MANAGE_OVERLAY_PERMISSION =
577 "android.settings.MANAGE_OVERLAY_PERMISSION";
578
579 /**
Dianne Hackbornb7bb3b32010-06-06 22:47:50 -0700580 * Activity Action: Show screen of details about a particular application.
581 * <p>
582 * In some cases, a matching Activity may not exist, so ensure you
583 * safeguard against this.
584 * <p>
585 * Input: The Intent's data URI specifies the application package name
586 * to be shown, with the "package" scheme. That is "package:com.my.app".
587 * <p>
588 * Output: Nothing.
589 */
590 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
591 public static final String ACTION_APPLICATION_DETAILS_SETTINGS =
592 "android.settings.APPLICATION_DETAILS_SETTINGS";
593
594 /**
Jason Monk287b8892015-06-10 10:39:23 -0400595 * Activity Action: Show screen for controlling which apps can ignore battery optimizations.
596 * <p>
Dianne Hackborn1958e5e2015-06-12 18:11:41 -0700597 * Input: Optionally, the Intent's data URI specifies the application package name
Jason Monk287b8892015-06-10 10:39:23 -0400598 * to be shown, with the "package" scheme. That is "package:com.my.app".
599 * <p>
600 * Output: Nothing.
Dianne Hackborn1958e5e2015-06-12 18:11:41 -0700601 * <p>
602 * You can use {@link android.os.PowerManager#isIgnoringBatteryOptimizations
603 * PowerManager.isIgnoringBatteryOptimizations()} to determine if an application is
604 * already ignoring optimizations.
Jason Monk287b8892015-06-10 10:39:23 -0400605 */
606 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
607 public static final String ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS =
608 "android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS";
609
610 /**
Dianne Hackborn35654b62013-01-14 17:38:02 -0800611 * @hide
612 * Activity Action: Show the "app ops" settings screen.
613 * <p>
614 * Input: Nothing.
615 * <p>
616 * Output: Nothing.
617 */
618 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
619 public static final String ACTION_APP_OPS_SETTINGS =
620 "android.settings.APP_OPS_SETTINGS";
621
622 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800623 * Activity Action: Show settings for system update functionality.
624 * <p>
625 * In some cases, a matching Activity may not exist, so ensure you
626 * safeguard against this.
627 * <p>
628 * Input: Nothing.
629 * <p>
630 * Output: Nothing.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700631 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800632 * @hide
633 */
634 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
635 public static final String ACTION_SYSTEM_UPDATE_SETTINGS =
636 "android.settings.SYSTEM_UPDATE_SETTINGS";
637
638 /**
639 * Activity Action: Show settings to allow configuration of sync settings.
640 * <p>
641 * In some cases, a matching Activity may not exist, so ensure you
642 * safeguard against this.
643 * <p>
Erikeebc8e22010-02-18 13:27:19 -0800644 * The account types available to add via the add account button may be restricted by adding an
645 * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's
646 * authorities. Only account types which can sync with that content provider will be offered to
647 * the user.
648 * <p>
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800649 * Input: Nothing.
650 * <p>
651 * Output: Nothing.
652 */
653 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
654 public static final String ACTION_SYNC_SETTINGS =
655 "android.settings.SYNC_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700656
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800657 /**
Erikeebc8e22010-02-18 13:27:19 -0800658 * Activity Action: Show add account screen for creating a new account.
659 * <p>
660 * In some cases, a matching Activity may not exist, so ensure you
661 * safeguard against this.
662 * <p>
663 * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES}
664 * extra to the Intent with one or more syncable content provider's authorities. Only account
665 * types which can sync with that content provider will be offered to the user.
666 * <p>
Alon Albert50359c22013-02-26 14:47:48 -0800667 * Account types can also be filtered by adding an {@link #EXTRA_ACCOUNT_TYPES} extra to the
668 * Intent with one or more account types.
669 * <p>
Erikeebc8e22010-02-18 13:27:19 -0800670 * Input: Nothing.
671 * <p>
672 * Output: Nothing.
673 */
674 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
675 public static final String ACTION_ADD_ACCOUNT =
676 "android.settings.ADD_ACCOUNT_SETTINGS";
677
678 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800679 * Activity Action: Show settings for selecting the network operator.
680 * <p>
681 * In some cases, a matching Activity may not exist, so ensure you
682 * safeguard against this.
683 * <p>
684 * Input: Nothing.
685 * <p>
686 * Output: Nothing.
687 */
688 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
689 public static final String ACTION_NETWORK_OPERATOR_SETTINGS =
690 "android.settings.NETWORK_OPERATOR_SETTINGS";
691
692 /**
693 * Activity Action: Show settings for selection of 2G/3G.
694 * <p>
695 * In some cases, a matching Activity may not exist, so ensure you
696 * safeguard against this.
697 * <p>
698 * Input: Nothing.
699 * <p>
700 * Output: Nothing.
701 */
702 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
703 public static final String ACTION_DATA_ROAMING_SETTINGS =
704 "android.settings.DATA_ROAMING_SETTINGS";
705
706 /**
707 * Activity Action: Show settings for internal storage.
708 * <p>
709 * In some cases, a matching Activity may not exist, so ensure you
710 * safeguard against this.
711 * <p>
712 * Input: Nothing.
713 * <p>
714 * Output: Nothing.
715 */
716 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
717 public static final String ACTION_INTERNAL_STORAGE_SETTINGS =
718 "android.settings.INTERNAL_STORAGE_SETTINGS";
719 /**
720 * Activity Action: Show settings for memory card storage.
721 * <p>
722 * In some cases, a matching Activity may not exist, so ensure you
723 * safeguard against this.
724 * <p>
725 * Input: Nothing.
726 * <p>
727 * Output: Nothing.
728 */
729 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
730 public static final String ACTION_MEMORY_CARD_SETTINGS =
731 "android.settings.MEMORY_CARD_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700732
Justin Mattsonef340352010-01-13 21:05:46 -0800733 /**
734 * Activity Action: Show settings for global search.
735 * <p>
736 * In some cases, a matching Activity may not exist, so ensure you
737 * safeguard against this.
738 * <p>
739 * Input: Nothing.
740 * <p>
741 * Output: Nothing
742 */
743 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
744 public static final String ACTION_SEARCH_SETTINGS =
745 "android.search.action.SEARCH_SETTINGS";
746
Daniel Sandler9d8b8762010-01-22 20:50:15 -0500747 /**
748 * Activity Action: Show general device information settings (serial
749 * number, software version, phone number, etc.).
750 * <p>
751 * In some cases, a matching Activity may not exist, so ensure you
752 * safeguard against this.
753 * <p>
754 * Input: Nothing.
755 * <p>
756 * Output: Nothing
757 */
758 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
759 public static final String ACTION_DEVICE_INFO_SETTINGS =
760 "android.settings.DEVICE_INFO_SETTINGS";
761
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500762 /**
Nick Pellycccf01d2011-10-31 14:49:40 -0700763 * Activity Action: Show NFC settings.
764 * <p>
765 * This shows UI that allows NFC to be turned on or off.
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500766 * <p>
767 * In some cases, a matching Activity may not exist, so ensure you
768 * safeguard against this.
769 * <p>
770 * Input: Nothing.
771 * <p>
772 * Output: Nothing
Nick Pellycccf01d2011-10-31 14:49:40 -0700773 * @see android.nfc.NfcAdapter#isEnabled()
774 */
775 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
776 public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS";
777
778 /**
779 * Activity Action: Show NFC Sharing settings.
780 * <p>
781 * This shows UI that allows NDEF Push (Android Beam) to be turned on or
782 * off.
783 * <p>
784 * In some cases, a matching Activity may not exist, so ensure you
785 * safeguard against this.
786 * <p>
787 * Input: Nothing.
788 * <p>
789 * Output: Nothing
790 * @see android.nfc.NfcAdapter#isNdefPushEnabled()
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500791 */
792 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
793 public static final String ACTION_NFCSHARING_SETTINGS =
794 "android.settings.NFCSHARING_SETTINGS";
795
Daniel Sandlerc08cd022012-11-27 22:47:37 -0500796 /**
Martijn Coenen62c196a2013-08-09 13:43:34 -0700797 * Activity Action: Show NFC Tap & Pay settings
798 * <p>
799 * This shows UI that allows the user to configure Tap&Pay
800 * settings.
801 * <p>
802 * In some cases, a matching Activity may not exist, so ensure you
803 * safeguard against this.
804 * <p>
805 * Input: Nothing.
806 * <p>
807 * Output: Nothing
808 */
809 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
810 public static final String ACTION_NFC_PAYMENT_SETTINGS =
811 "android.settings.NFC_PAYMENT_SETTINGS";
812
813 /**
Daniel Sandlerc08cd022012-11-27 22:47:37 -0500814 * Activity Action: Show Daydream settings.
815 * <p>
816 * In some cases, a matching Activity may not exist, so ensure you
817 * safeguard against this.
818 * <p>
819 * Input: Nothing.
820 * <p>
821 * Output: Nothing.
822 * @see android.service.dreams.DreamService
Daniel Sandlerc08cd022012-11-27 22:47:37 -0500823 */
824 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
825 public static final String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS";
826
Daniel Sandler5feceeb2013-03-22 18:29:23 -0700827 /**
828 * Activity Action: Show Notification listener settings.
829 * <p>
830 * In some cases, a matching Activity may not exist, so ensure you
831 * safeguard against this.
832 * <p>
833 * Input: Nothing.
834 * <p>
835 * Output: Nothing.
836 * @see android.service.notification.NotificationListenerService
Daniel Sandler5feceeb2013-03-22 18:29:23 -0700837 */
838 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
839 public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS
Chris Wren8326a8a2014-10-22 14:13:32 -0400840 = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS";
Daniel Sandler5feceeb2013-03-22 18:29:23 -0700841
Alan Viverette69ce69b2013-08-29 12:23:48 -0700842 /**
John Spurlock80774932015-05-07 17:38:50 -0400843 * Activity Action: Show Do Not Disturb access settings.
844 * <p>
John Spurlock7c74f782015-06-04 13:01:42 -0400845 * Users can grant and deny access to Do Not Disturb configuration from here.
846 * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more
847 * details.
John Spurlock80774932015-05-07 17:38:50 -0400848 * <p>
849 * Input: Nothing.
850 * <p>
851 * Output: Nothing.
852 */
853 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
John Spurlock7c74f782015-06-04 13:01:42 -0400854 public static final String ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS
855 = "android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS";
John Spurlock80774932015-05-07 17:38:50 -0400856
857 /**
John Spurlock7340fc82014-04-24 18:50:12 -0400858 * @hide
859 */
860 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
861 public static final String ACTION_CONDITION_PROVIDER_SETTINGS
862 = "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS";
863
864 /**
Alan Viverette69ce69b2013-08-29 12:23:48 -0700865 * Activity Action: Show settings for video captioning.
866 * <p>
867 * In some cases, a matching Activity may not exist, so ensure you safeguard
868 * against this.
869 * <p>
870 * Input: Nothing.
871 * <p>
872 * Output: Nothing.
873 */
874 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
875 public static final String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS";
876
Svetoslav773f54d2013-09-03 14:01:43 -0700877 /**
878 * Activity Action: Show the top level print settings.
879 * <p>
880 * In some cases, a matching Activity may not exist, so ensure you
881 * safeguard against this.
882 * <p>
883 * Input: Nothing.
884 * <p>
885 * Output: Nothing.
886 */
887 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
888 public static final String ACTION_PRINT_SETTINGS =
889 "android.settings.ACTION_PRINT_SETTINGS";
890
John Spurlockde547002014-02-28 17:50:39 -0500891 /**
892 * Activity Action: Show Zen Mode configuration settings.
893 *
894 * @hide
895 */
896 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
897 public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS";
898
Santos Cordona4c75242014-07-09 12:07:51 -0700899 /**
John Spurlockfc746f82015-04-03 13:47:14 -0400900 * Activity Action: Show Zen Mode priority configuration settings.
901 *
902 * @hide
903 */
904 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
905 public static final String ACTION_ZEN_MODE_PRIORITY_SETTINGS
906 = "android.settings.ZEN_MODE_PRIORITY_SETTINGS";
907
908 /**
John Spurlock7af10182015-04-03 15:10:31 -0400909 * Activity Action: Show Zen Mode automation configuration settings.
910 *
911 * @hide
912 */
913 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
914 public static final String ACTION_ZEN_MODE_AUTOMATION_SETTINGS
915 = "android.settings.ZEN_MODE_AUTOMATION_SETTINGS";
916
917 /**
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700918 * Activity Action: Modify do not disturb mode settings.
919 * <p>
920 * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
921 * <p>
922 * This intent MUST be started using
923 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
924 * startVoiceActivity}.
925 * <p>
926 * Note: The Activity implementing this intent MUST verify that
927 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction}.
928 * returns true before modifying the setting.
929 * <p>
930 * Input: The optional {@link #EXTRA_DO_NOT_DISTURB_MODE_MINUTES} extra can be used to indicate
931 * how long the user wishes to avoid interruptions for. The optional
932 * {@link #EXTRA_DO_NOT_DISTURB_MODE_ENABLED} extra can be to indicate if the user is
933 * enabling or disabling do not disturb mode. If either extra is not included, the
934 * user maybe asked to provide the value.
935 * <p>
936 * Output: Nothing.
937 */
938 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
939 public static final String ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE =
940 "android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE";
941
942 /**
John Spurlockb2278d62015-04-07 12:47:12 -0400943 * Activity Action: Show Zen Mode schedule rule configuration settings.
944 *
945 * @hide
946 */
947 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
948 public static final String ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS
949 = "android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS";
950
951 /**
John Spurlockd60258f2015-04-30 09:30:52 -0400952 * Activity Action: Show Zen Mode event rule configuration settings.
953 *
954 * @hide
955 */
956 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
957 public static final String ACTION_ZEN_MODE_EVENT_RULE_SETTINGS
958 = "android.settings.ZEN_MODE_EVENT_RULE_SETTINGS";
959
960 /**
John Spurlock39581cc2015-04-10 11:59:01 -0400961 * Activity Action: Show Zen Mode external rule configuration settings.
962 *
963 * @hide
964 */
965 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
966 public static final String ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS
967 = "android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS";
968
969 /**
Santos Cordona4c75242014-07-09 12:07:51 -0700970 * Activity Action: Show the regulatory information screen for the device.
971 * <p>
972 * In some cases, a matching Activity may not exist, so ensure you safeguard
973 * against this.
974 * <p>
975 * Input: Nothing.
976 * <p>
977 * Output: Nothing.
978 */
Jeff Sharkeydd77fda2014-04-16 17:23:08 -0700979 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
980 public static final String
981 ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO";
982
Jerome Poichet7974cb32014-05-14 12:04:43 -0700983 /**
984 * Activity Action: Show Device Name Settings.
985 * <p>
986 * In some cases, a matching Activity may not exist, so ensure you safeguard
Tim Kilbourn87cd0dc2014-04-14 15:37:51 -0700987 * against this.
Jerome Poichet7974cb32014-05-14 12:04:43 -0700988 *
989 * @hide
990 */
991 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
992 public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME";
993
Tim Kilbourn87cd0dc2014-04-14 15:37:51 -0700994 /**
995 * Activity Action: Show pairing settings.
996 * <p>
997 * In some cases, a matching Activity may not exist, so ensure you safeguard
998 * against this.
999 *
1000 * @hide
1001 */
1002 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1003 public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS";
1004
John Spurlockf8f524c2014-06-10 14:47:29 -04001005 /**
1006 * Activity Action: Show battery saver settings.
John Spurlock73466662014-10-30 13:42:05 -04001007 * <p>
1008 * In some cases, a matching Activity may not exist, so ensure you safeguard
1009 * against this.
John Spurlockf8f524c2014-06-10 14:47:29 -04001010 */
1011 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1012 public static final String ACTION_BATTERY_SAVER_SETTINGS
1013 = "android.settings.BATTERY_SAVER_SETTINGS";
1014
Amith Yamasanieb7b94a2014-07-14 18:02:08 -07001015 /**
Barnaby Jamesb3006d32015-04-02 17:49:54 -07001016 * Activity Action: Modify Battery Saver mode setting using a voice command.
1017 * <p>
1018 * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
1019 * <p>
1020 * This intent MUST be started using
1021 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
1022 * startVoiceActivity}.
1023 * <p>
1024 * Note: The activity implementing this intent MUST verify that
1025 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before
1026 * modifying the setting.
1027 * <p>
1028 * Input: To tell which state batter saver mode should be set to, add the
1029 * {@link #EXTRA_BATTERY_SAVER_MODE_ENABLED} extra to this Intent with the state specified.
1030 * If the extra is not included, no changes will be made.
1031 * <p>
1032 * Output: Nothing.
1033 */
1034 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1035 public static final String ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE =
1036 "android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE";
1037
1038 /**
Amith Yamasanieb7b94a2014-07-14 18:02:08 -07001039 * Activity Action: Show Home selection settings. If there are multiple activities
1040 * that can satisfy the {@link Intent#CATEGORY_HOME} intent, this screen allows you
1041 * to pick your preferred activity.
1042 */
1043 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1044 public static final String ACTION_HOME_SETTINGS
1045 = "android.settings.HOME_SETTINGS";
1046
John Spurlock2b0e09c2014-07-27 13:27:47 -04001047 /**
1048 * Activity Action: Show notification settings.
1049 *
1050 * @hide
1051 */
1052 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1053 public static final String ACTION_NOTIFICATION_SETTINGS
1054 = "android.settings.NOTIFICATION_SETTINGS";
1055
1056 /**
1057 * Activity Action: Show notification settings for a single app.
1058 *
1059 * @hide
1060 */
1061 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1062 public static final String ACTION_APP_NOTIFICATION_SETTINGS
1063 = "android.settings.APP_NOTIFICATION_SETTINGS";
1064
Chris Wrencd8f4f72014-08-27 18:48:13 -04001065 /**
1066 * Activity Action: Show notification redaction settings.
1067 *
1068 * @hide
1069 */
1070 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1071 public static final String ACTION_APP_NOTIFICATION_REDACTION
1072 = "android.settings.ACTION_APP_NOTIFICATION_REDACTION";
1073
John Spurlock2b0e09c2014-07-27 13:27:47 -04001074 /** @hide */ public static final String EXTRA_APP_UID = "app_uid";
1075 /** @hide */ public static final String EXTRA_APP_PACKAGE = "app_package";
1076
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001077 // End of Intent actions for Settings
1078
Erikeebc8e22010-02-18 13:27:19 -08001079 /**
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001080 * @hide - Private call() method on SettingsProvider to read from 'system' table.
1081 */
1082 public static final String CALL_METHOD_GET_SYSTEM = "GET_system";
1083
1084 /**
1085 * @hide - Private call() method on SettingsProvider to read from 'secure' table.
1086 */
1087 public static final String CALL_METHOD_GET_SECURE = "GET_secure";
1088
1089 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001090 * @hide - Private call() method on SettingsProvider to read from 'global' table.
1091 */
1092 public static final String CALL_METHOD_GET_GLOBAL = "GET_global";
1093
1094 /**
1095 * @hide - User handle argument extra to the fast-path call()-based requests
1096 */
1097 public static final String CALL_METHOD_USER_KEY = "_user";
1098
1099 /** @hide - Private call() method to write to 'system' table */
1100 public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system";
1101
1102 /** @hide - Private call() method to write to 'secure' table */
1103 public static final String CALL_METHOD_PUT_SECURE = "PUT_secure";
1104
1105 /** @hide - Private call() method to write to 'global' table */
1106 public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global";
1107
1108 /**
Erikeebc8e22010-02-18 13:27:19 -08001109 * Activity Extra: Limit available options in launched activity based on the given authority.
1110 * <p>
1111 * This can be passed as an extra field in an Activity Intent with one or more syncable content
1112 * provider's authorities as a String[]. This field is used by some intents to alter the
1113 * behavior of the called activity.
1114 * <p>
1115 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based
1116 * on the authority given.
1117 */
Alon Albert50359c22013-02-26 14:47:48 -08001118 public static final String EXTRA_AUTHORITIES = "authorities";
1119
Alon Albertd35bf1f2013-04-18 14:26:51 -07001120 /**
1121 * Activity Extra: Limit available options in launched activity based on the given account
1122 * types.
1123 * <p>
1124 * This can be passed as an extra field in an Activity Intent with one or more account types
1125 * as a String[]. This field is used by some intents to alter the behavior of the called
1126 * activity.
1127 * <p>
1128 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types to the specified
1129 * list.
1130 */
Alon Albert50359c22013-02-26 14:47:48 -08001131 public static final String EXTRA_ACCOUNT_TYPES = "account_types";
Erikeebc8e22010-02-18 13:27:19 -08001132
Tadashi G. Takaoka25480202011-01-20 23:13:02 +09001133 public static final String EXTRA_INPUT_METHOD_ID = "input_method_id";
1134
Barnaby James48f35522014-07-16 14:27:39 -07001135 /**
Michael Wrightc93fbd12014-09-22 20:07:59 -07001136 * Activity Extra: The device identifier to act upon.
1137 * <p>
1138 * This can be passed as an extra field in an Activity Intent with a single
1139 * InputDeviceIdentifier. This field is used by some activities to jump straight into the
1140 * settings for the given device.
1141 * <p>
Dianne Hackbornad6a99b2014-11-18 10:11:10 -08001142 * Example: The {@link #ACTION_INPUT_METHOD_SETTINGS} intent opens the keyboard layout
1143 * dialog for the given device.
Michael Wrightc93fbd12014-09-22 20:07:59 -07001144 * @hide
1145 */
1146 public static final String EXTRA_INPUT_DEVICE_IDENTIFIER = "input_device_identifier";
1147
1148 /**
Barnaby James48f35522014-07-16 14:27:39 -07001149 * Activity Extra: Enable or disable Airplane Mode.
1150 * <p>
1151 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE}
Barnaby Jamesb3006d32015-04-02 17:49:54 -07001152 * intent as a boolean to indicate if it should be enabled.
Barnaby James48f35522014-07-16 14:27:39 -07001153 */
1154 public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled";
1155
Barnaby Jamesb3006d32015-04-02 17:49:54 -07001156 /**
1157 * Activity Extra: Enable or disable Battery saver mode.
1158 * <p>
1159 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE}
1160 * intent as a boolean to indicate if it should be enabled.
1161 */
1162 public static final String EXTRA_BATTERY_SAVER_MODE_ENABLED =
1163 "android.settings.extra.battery_saver_mode_enabled";
1164
1165 /**
1166 * Activity Extra: Enable or disable Do Not Disturb mode.
1167 * <p>
1168 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE}
1169 * intent as a boolean to indicate if it should be enabled.
1170 */
1171 public static final String EXTRA_DO_NOT_DISTURB_MODE_ENABLED =
1172 "android.settings.extra.do_not_disturb_mode_enabled";
1173
1174 /**
1175 * Activity Extra: How many minutes to enable do not disturb mode for.
1176 * <p>
1177 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE}
1178 * intent to indicate how long do not disturb mode should be enabled for.
1179 */
1180 public static final String EXTRA_DO_NOT_DISTURB_MODE_MINUTES =
1181 "android.settings.extra.do_not_disturb_mode_minutes";
1182
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001183 private static final String JID_RESOURCE_PREFIX = "android";
1184
1185 public static final String AUTHORITY = "settings";
1186
1187 private static final String TAG = "Settings";
Christopher Tate06efb532012-08-24 15:29:27 -07001188 private static final boolean LOCAL_LOGV = false;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001189
David Christie3f7b6522013-08-06 19:19:08 -07001190 // Lock ensures that when enabling/disabling the master location switch, we don't end up
1191 // with a partial enable/disable state in multi-threaded situations.
1192 private static final Object mLocationSettingsLock = new Object();
1193
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001194 public static class SettingNotFoundException extends AndroidException {
1195 public SettingNotFoundException(String msg) {
1196 super(msg);
1197 }
1198 }
1199
1200 /**
1201 * Common base for tables of name/value settings.
1202 */
1203 public static class NameValueTable implements BaseColumns {
1204 public static final String NAME = "name";
1205 public static final String VALUE = "value";
1206
1207 protected static boolean putString(ContentResolver resolver, Uri uri,
1208 String name, String value) {
1209 // The database will take care of replacing duplicates.
1210 try {
1211 ContentValues values = new ContentValues();
1212 values.put(NAME, name);
1213 values.put(VALUE, value);
1214 resolver.insert(uri, values);
1215 return true;
1216 } catch (SQLException e) {
Dianne Hackborna33e3f72009-09-29 17:28:24 -07001217 Log.w(TAG, "Can't set key " + name + " in " + uri, e);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001218 return false;
1219 }
1220 }
1221
1222 public static Uri getUriFor(Uri uri, String name) {
1223 return Uri.withAppendedPath(uri, name);
1224 }
1225 }
1226
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001227 // Thread-safe.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001228 private static class NameValueCache {
1229 private final String mVersionSystemProperty;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001230 private final Uri mUri;
1231
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001232 private static final String[] SELECT_VALUE =
1233 new String[] { Settings.NameValueTable.VALUE };
1234 private static final String NAME_EQ_PLACEHOLDER = "name=?";
1235
1236 // Must synchronize on 'this' to access mValues and mValuesVersion.
Dan Egnor799f7212009-11-24 16:24:44 -08001237 private final HashMap<String, String> mValues = new HashMap<String, String>();
1238 private long mValuesVersion = 0;
1239
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001240 // Initially null; set lazily and held forever. Synchronized on 'this'.
1241 private IContentProvider mContentProvider = null;
1242
1243 // The method we'll call (or null, to not use) on the provider
1244 // for the fast path of retrieving settings.
Christopher Tate06efb532012-08-24 15:29:27 -07001245 private final String mCallGetCommand;
1246 private final String mCallSetCommand;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001247
Christopher Tate06efb532012-08-24 15:29:27 -07001248 public NameValueCache(String versionSystemProperty, Uri uri,
1249 String getCommand, String setCommand) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001250 mVersionSystemProperty = versionSystemProperty;
1251 mUri = uri;
Christopher Tate06efb532012-08-24 15:29:27 -07001252 mCallGetCommand = getCommand;
1253 mCallSetCommand = setCommand;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001254 }
1255
Christopher Tate06efb532012-08-24 15:29:27 -07001256 private IContentProvider lazyGetProvider(ContentResolver cr) {
1257 IContentProvider cp = null;
1258 synchronized (this) {
1259 cp = mContentProvider;
1260 if (cp == null) {
1261 cp = mContentProvider = cr.acquireProvider(mUri.getAuthority());
1262 }
1263 }
1264 return cp;
1265 }
1266
1267 public boolean putStringForUser(ContentResolver cr, String name, String value,
1268 final int userHandle) {
1269 try {
1270 Bundle arg = new Bundle();
1271 arg.putString(Settings.NameValueTable.VALUE, value);
Christopher Tated5fe1472012-09-10 15:48:38 -07001272 arg.putInt(CALL_METHOD_USER_KEY, userHandle);
Christopher Tate06efb532012-08-24 15:29:27 -07001273 IContentProvider cp = lazyGetProvider(cr);
Dianne Hackborn35654b62013-01-14 17:38:02 -08001274 cp.call(cr.getPackageName(), mCallSetCommand, name, arg);
Christopher Tate06efb532012-08-24 15:29:27 -07001275 } catch (RemoteException e) {
1276 Log.w(TAG, "Can't set key " + name + " in " + mUri, e);
1277 return false;
1278 }
1279 return true;
1280 }
1281
Christopher Tate06efb532012-08-24 15:29:27 -07001282 public String getStringForUser(ContentResolver cr, String name, final int userHandle) {
Christopher Tate78d2a662012-09-13 16:19:44 -07001283 final boolean isSelf = (userHandle == UserHandle.myUserId());
1284 if (isSelf) {
1285 long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0);
Dan Egnor799f7212009-11-24 16:24:44 -08001286
Christopher Tate78d2a662012-09-13 16:19:44 -07001287 // Our own user's settings data uses a client-side cache
1288 synchronized (this) {
1289 if (mValuesVersion != newValuesVersion) {
1290 if (LOCAL_LOGV || false) {
1291 Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current "
1292 + newValuesVersion + " != cached " + mValuesVersion);
1293 }
1294
1295 mValues.clear();
1296 mValuesVersion = newValuesVersion;
Dan Egnor799f7212009-11-24 16:24:44 -08001297 }
1298
Christopher Tate78d2a662012-09-13 16:19:44 -07001299 if (mValues.containsKey(name)) {
1300 return mValues.get(name); // Could be null, that's OK -- negative caching
1301 }
Dan Egnor799f7212009-11-24 16:24:44 -08001302 }
Christopher Tate78d2a662012-09-13 16:19:44 -07001303 } else {
1304 if (LOCAL_LOGV) Log.v(TAG, "get setting for user " + userHandle
1305 + " by user " + UserHandle.myUserId() + " so skipping cache");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001306 }
Dan Egnor799f7212009-11-24 16:24:44 -08001307
Christopher Tate06efb532012-08-24 15:29:27 -07001308 IContentProvider cp = lazyGetProvider(cr);
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001309
1310 // Try the fast path first, not using query(). If this
1311 // fails (alternate Settings provider that doesn't support
1312 // this interface?) then we fall back to the query/table
1313 // interface.
Christopher Tate06efb532012-08-24 15:29:27 -07001314 if (mCallGetCommand != null) {
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001315 try {
Christopher Tate06efb532012-08-24 15:29:27 -07001316 Bundle args = null;
Christopher Tate5e08af02012-09-21 17:17:22 -07001317 if (!isSelf) {
Christopher Tate06efb532012-08-24 15:29:27 -07001318 args = new Bundle();
1319 args.putInt(CALL_METHOD_USER_KEY, userHandle);
1320 }
Dianne Hackborn35654b62013-01-14 17:38:02 -08001321 Bundle b = cp.call(cr.getPackageName(), mCallGetCommand, name, args);
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001322 if (b != null) {
1323 String value = b.getPairValue();
Christopher Tate78d2a662012-09-13 16:19:44 -07001324 // Don't update our cache for reads of other users' data
1325 if (isSelf) {
1326 synchronized (this) {
1327 mValues.put(name, value);
1328 }
1329 } else {
1330 if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle
1331 + " by " + UserHandle.myUserId()
1332 + " so not updating cache");
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001333 }
1334 return value;
1335 }
1336 // If the response Bundle is null, we fall through
1337 // to the query interface below.
1338 } catch (RemoteException e) {
1339 // Not supported by the remote side? Fall through
1340 // to query().
1341 }
1342 }
1343
Dan Egnor799f7212009-11-24 16:24:44 -08001344 Cursor c = null;
1345 try {
Dianne Hackborn35654b62013-01-14 17:38:02 -08001346 c = cp.query(cr.getPackageName(), mUri, SELECT_VALUE, NAME_EQ_PLACEHOLDER,
Jeff Brown75ea64f2012-01-25 19:37:13 -08001347 new String[]{name}, null, null);
Dan Egnor799f7212009-11-24 16:24:44 -08001348 if (c == null) {
1349 Log.w(TAG, "Can't get key " + name + " from " + mUri);
1350 return null;
1351 }
1352
1353 String value = c.moveToNext() ? c.getString(0) : null;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001354 synchronized (this) {
Dan Egnor799f7212009-11-24 16:24:44 -08001355 mValues.put(name, value);
1356 }
1357 if (LOCAL_LOGV) {
1358 Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " +
1359 name + " = " + (value == null ? "(null)" : value));
1360 }
1361 return value;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001362 } catch (RemoteException e) {
Dan Egnor799f7212009-11-24 16:24:44 -08001363 Log.w(TAG, "Can't get key " + name + " from " + mUri, e);
1364 return null; // Return null, but don't cache it.
1365 } finally {
1366 if (c != null) c.close();
1367 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001368 }
1369 }
1370
1371 /**
1372 * System settings, containing miscellaneous system preferences. This
1373 * table holds simple name/value pairs. There are convenience
1374 * functions for accessing individual settings entries.
1375 */
1376 public static final class System extends NameValueTable {
1377 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version";
1378
Svetoslav683914b2015-01-15 14:22:26 -08001379 /** @hide */
1380 public static interface Validator {
1381 public boolean validate(String value);
1382 }
1383
Dianne Hackborn139748f2012-09-24 11:36:57 -07001384 /**
1385 * The content:// style URL for this table
1386 */
1387 public static final Uri CONTENT_URI =
1388 Uri.parse("content://" + AUTHORITY + "/system");
1389
1390 private static final NameValueCache sNameValueCache = new NameValueCache(
1391 SYS_PROP_SETTING_VERSION,
1392 CONTENT_URI,
1393 CALL_METHOD_GET_SYSTEM,
1394 CALL_METHOD_PUT_SYSTEM);
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07001395
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001396 private static final HashSet<String> MOVED_TO_SECURE;
1397 static {
1398 MOVED_TO_SECURE = new HashSet<String>(30);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001399 MOVED_TO_SECURE.add(Secure.ANDROID_ID);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001400 MOVED_TO_SECURE.add(Secure.HTTP_PROXY);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001401 MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED);
Danielle Millett925a7d82012-03-19 18:02:20 -04001402 MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS);
Amith Yamasani156c4352010-03-05 17:10:03 -08001403 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED);
1404 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE);
1405 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001406 MOVED_TO_SECURE.add(Secure.LOGGING_ID);
1407 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED);
1408 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE);
1409 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL);
1410 MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001411 MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL);
1412 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON);
1413 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY);
1414 MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT);
1415 MOVED_TO_SECURE.add(Secure.WIFI_ON);
1416 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE);
1417 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT);
1418 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS);
1419 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED);
1420 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS);
1421 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT);
1422 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS);
1423 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON);
1424 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT);
1425 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS);
1426 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS);
Christopher Tateaa036a22014-05-19 16:33:27 -07001427
1428 // At one time in System, then Global, but now back in Secure
1429 MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001430 }
1431
Christopher Tate06efb532012-08-24 15:29:27 -07001432 private static final HashSet<String> MOVED_TO_GLOBAL;
Christopher Tate66488d62012-10-02 11:58:01 -07001433 private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL;
Christopher Tate06efb532012-08-24 15:29:27 -07001434 static {
1435 MOVED_TO_GLOBAL = new HashSet<String>();
Christopher Tate66488d62012-10-02 11:58:01 -07001436 MOVED_TO_SECURE_THEN_GLOBAL = new HashSet<String>();
1437
Christopher Tate92198742012-09-07 12:00:13 -07001438 // these were originally in system but migrated to secure in the past,
1439 // so are duplicated in the Secure.* namespace
Christopher Tate66488d62012-10-02 11:58:01 -07001440 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.ADB_ENABLED);
1441 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.BLUETOOTH_ON);
1442 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DATA_ROAMING);
1443 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DEVICE_PROVISIONED);
Christopher Tate66488d62012-10-02 11:58:01 -07001444 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED);
1445 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.HTTP_PROXY);
Christopher Tate06efb532012-08-24 15:29:27 -07001446
Christopher Tate92198742012-09-07 12:00:13 -07001447 // these are moving directly from system to global
Christopher Tate06efb532012-08-24 15:29:27 -07001448 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON);
1449 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS);
1450 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS);
1451 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME);
1452 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE);
1453 MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND);
1454 MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND);
1455 MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND);
1456 MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND);
1457 MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED);
1458 MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND);
1459 MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND);
1460 MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND);
1461 MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED);
1462 MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN);
1463 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY);
Eric Laurentbc0fab1f2012-09-19 11:24:41 -07001464 MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER);
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07001465 MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE);
1466 MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE);
1467 MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE);
1468 MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS);
1469 MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE);
1470 MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE);
1471 MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY);
1472 MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP);
1473 MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER);
1474 MOVED_TO_GLOBAL.add(Settings.Global.SHOW_PROCESSES);
1475 MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES);
Geremy Condraa0735112013-03-26 21:49:26 -07001476 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_CONTENT_URL);
1477 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_METADATA_URL);
1478 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_CONTENT_URL);
1479 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_METADATA_URL);
1480 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL);
1481 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL);
1482 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_CONTENT_URL);
1483 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL);
Christopher Tate06efb532012-08-24 15:29:27 -07001484 }
1485
Svetoslav683914b2015-01-15 14:22:26 -08001486 private static final Validator sBooleanValidator =
1487 new DiscreteValueValidator(new String[] {"0", "1"});
1488
1489 private static final Validator sNonNegativeIntegerValidator = new Validator() {
1490 @Override
1491 public boolean validate(String value) {
1492 try {
1493 return Integer.parseInt(value) >= 0;
1494 } catch (NumberFormatException e) {
1495 return false;
1496 }
1497 }
1498 };
1499
Svetoslav683914b2015-01-15 14:22:26 -08001500 private static final Validator sUriValidator = new Validator() {
1501 @Override
1502 public boolean validate(String value) {
1503 try {
1504 Uri.decode(value);
1505 return true;
1506 } catch (IllegalArgumentException e) {
1507 return false;
1508 }
1509 }
1510 };
1511
1512 private static final Validator sLenientIpAddressValidator = new Validator() {
1513 private static final int MAX_IPV6_LENGTH = 45;
1514
1515 @Override
1516 public boolean validate(String value) {
1517 return value.length() <= MAX_IPV6_LENGTH;
1518 }
1519 };
1520
Christopher Tate66488d62012-10-02 11:58:01 -07001521 /** @hide */
Svetoslav683914b2015-01-15 14:22:26 -08001522 public static void getMovedToGlobalSettings(Set<String> outKeySet) {
Christopher Tate66488d62012-10-02 11:58:01 -07001523 outKeySet.addAll(MOVED_TO_GLOBAL);
1524 outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL);
1525 }
1526
1527 /** @hide */
Svetoslav683914b2015-01-15 14:22:26 -08001528 public static void getMovedToSecureSettings(Set<String> outKeySet) {
1529 outKeySet.addAll(MOVED_TO_SECURE);
1530 }
1531
1532 /** @hide */
Christopher Tate66488d62012-10-02 11:58:01 -07001533 public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) {
1534 outKeySet.addAll(MOVED_TO_GLOBAL);
1535 }
1536
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001537 /**
1538 * Look up a name in the database.
1539 * @param resolver to access the database with
1540 * @param name to look up in the table
1541 * @return the corresponding value, or null if not present
1542 */
Dianne Hackborn139748f2012-09-24 11:36:57 -07001543 public static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07001544 return getStringForUser(resolver, name, UserHandle.myUserId());
1545 }
1546
1547 /** @hide */
Dianne Hackborn139748f2012-09-24 11:36:57 -07001548 public static String getStringForUser(ContentResolver resolver, String name,
Christopher Tate06efb532012-08-24 15:29:27 -07001549 int userHandle) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001550 if (MOVED_TO_SECURE.contains(name)) {
1551 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1552 + " to android.provider.Settings.Secure, returning read-only value.");
Christopher Tate06efb532012-08-24 15:29:27 -07001553 return Secure.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001554 }
Christopher Tate66488d62012-10-02 11:58:01 -07001555 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Christopher Tate06efb532012-08-24 15:29:27 -07001556 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1557 + " to android.provider.Settings.Global, returning read-only value.");
1558 return Global.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001559 }
Christopher Tate06efb532012-08-24 15:29:27 -07001560 return sNameValueCache.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001561 }
1562
1563 /**
1564 * Store a name/value pair into the database.
1565 * @param resolver to access the database with
1566 * @param name to store
1567 * @param value to associate with the name
1568 * @return true if the value was set, false on database errors
1569 */
1570 public static boolean putString(ContentResolver resolver, String name, String value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001571 return putStringForUser(resolver, name, value, UserHandle.myUserId());
1572 }
1573
1574 /** @hide */
1575 public static boolean putStringForUser(ContentResolver resolver, String name, String value,
1576 int userHandle) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001577 if (MOVED_TO_SECURE.contains(name)) {
1578 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1579 + " to android.provider.Settings.Secure, value is unchanged.");
1580 return false;
1581 }
Christopher Tate66488d62012-10-02 11:58:01 -07001582 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Christopher Tate06efb532012-08-24 15:29:27 -07001583 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1584 + " to android.provider.Settings.Global, value is unchanged.");
1585 return false;
1586 }
Christopher Tate06efb532012-08-24 15:29:27 -07001587 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001588 }
1589
1590 /**
1591 * Construct the content URI for a particular name/value pair,
1592 * useful for monitoring changes with a ContentObserver.
1593 * @param name to look up in the table
1594 * @return the corresponding content URI, or null if not present
1595 */
1596 public static Uri getUriFor(String name) {
1597 if (MOVED_TO_SECURE.contains(name)) {
1598 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1599 + " to android.provider.Settings.Secure, returning Secure URI.");
1600 return Secure.getUriFor(Secure.CONTENT_URI, name);
1601 }
Christopher Tate66488d62012-10-02 11:58:01 -07001602 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Christopher Tate06efb532012-08-24 15:29:27 -07001603 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1604 + " to android.provider.Settings.Global, returning read-only global URI.");
1605 return Global.getUriFor(Global.CONTENT_URI, name);
1606 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001607 return getUriFor(CONTENT_URI, name);
1608 }
1609
1610 /**
1611 * Convenience function for retrieving a single system settings value
1612 * as an integer. Note that internally setting values are always
1613 * stored as strings; this function converts the string to an integer
1614 * for you. The default value will be returned if the setting is
1615 * not defined or not an integer.
1616 *
1617 * @param cr The ContentResolver to access.
1618 * @param name The name of the setting to retrieve.
1619 * @param def Value to return if the setting is not defined.
1620 *
1621 * @return The setting's current value, or 'def' if it is not defined
1622 * or not a valid integer.
1623 */
1624 public static int getInt(ContentResolver cr, String name, int def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001625 return getIntForUser(cr, name, def, UserHandle.myUserId());
1626 }
1627
1628 /** @hide */
1629 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
1630 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001631 try {
1632 return v != null ? Integer.parseInt(v) : def;
1633 } catch (NumberFormatException e) {
1634 return def;
1635 }
1636 }
1637
1638 /**
1639 * Convenience function for retrieving a single system settings value
1640 * as an integer. Note that internally setting values are always
1641 * stored as strings; this function converts the string to an integer
1642 * for you.
1643 * <p>
1644 * This version does not take a default value. If the setting has not
1645 * been set, or the string value is not a number,
1646 * it throws {@link SettingNotFoundException}.
1647 *
1648 * @param cr The ContentResolver to access.
1649 * @param name The name of the setting to retrieve.
1650 *
1651 * @throws SettingNotFoundException Thrown if a setting by the given
1652 * name can't be found or the setting value is not an integer.
1653 *
1654 * @return The setting's current value.
1655 */
1656 public static int getInt(ContentResolver cr, String name)
1657 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001658 return getIntForUser(cr, name, UserHandle.myUserId());
1659 }
1660
1661 /** @hide */
1662 public static int getIntForUser(ContentResolver cr, String name, int userHandle)
1663 throws SettingNotFoundException {
1664 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001665 try {
1666 return Integer.parseInt(v);
1667 } catch (NumberFormatException e) {
1668 throw new SettingNotFoundException(name);
1669 }
1670 }
1671
1672 /**
1673 * Convenience function for updating a single settings value as an
1674 * integer. This will either create a new entry in the table if the
1675 * given name does not exist, or modify the value of the existing row
1676 * with that name. Note that internally setting values are always
1677 * stored as strings, so this function converts the given value to a
1678 * string before storing it.
1679 *
1680 * @param cr The ContentResolver to access.
1681 * @param name The name of the setting to modify.
1682 * @param value The new value for the setting.
1683 * @return true if the value was set, false on database errors
1684 */
1685 public static boolean putInt(ContentResolver cr, String name, int value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001686 return putIntForUser(cr, name, value, UserHandle.myUserId());
1687 }
1688
1689 /** @hide */
1690 public static boolean putIntForUser(ContentResolver cr, String name, int value,
1691 int userHandle) {
1692 return putStringForUser(cr, name, Integer.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001693 }
1694
1695 /**
1696 * Convenience function for retrieving a single system settings value
1697 * as a {@code long}. Note that internally setting values are always
1698 * stored as strings; this function converts the string to a {@code long}
1699 * for you. The default value will be returned if the setting is
1700 * not defined or not a {@code long}.
1701 *
1702 * @param cr The ContentResolver to access.
1703 * @param name The name of the setting to retrieve.
1704 * @param def Value to return if the setting is not defined.
1705 *
1706 * @return The setting's current value, or 'def' if it is not defined
1707 * or not a valid {@code long}.
1708 */
1709 public static long getLong(ContentResolver cr, String name, long def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001710 return getLongForUser(cr, name, def, UserHandle.myUserId());
1711 }
1712
1713 /** @hide */
1714 public static long getLongForUser(ContentResolver cr, String name, long def,
1715 int userHandle) {
1716 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001717 long value;
1718 try {
1719 value = valString != null ? Long.parseLong(valString) : def;
1720 } catch (NumberFormatException e) {
1721 value = def;
1722 }
1723 return value;
1724 }
1725
1726 /**
1727 * Convenience function for retrieving a single system settings value
1728 * as a {@code long}. Note that internally setting values are always
1729 * stored as strings; this function converts the string to a {@code long}
1730 * for you.
1731 * <p>
1732 * This version does not take a default value. If the setting has not
1733 * been set, or the string value is not a number,
1734 * it throws {@link SettingNotFoundException}.
1735 *
1736 * @param cr The ContentResolver to access.
1737 * @param name The name of the setting to retrieve.
1738 *
1739 * @return The setting's current value.
1740 * @throws SettingNotFoundException Thrown if a setting by the given
1741 * name can't be found or the setting value is not an integer.
1742 */
1743 public static long getLong(ContentResolver cr, String name)
1744 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001745 return getLongForUser(cr, name, UserHandle.myUserId());
1746 }
1747
1748 /** @hide */
1749 public static long getLongForUser(ContentResolver cr, String name, int userHandle)
1750 throws SettingNotFoundException {
1751 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001752 try {
1753 return Long.parseLong(valString);
1754 } catch (NumberFormatException e) {
1755 throw new SettingNotFoundException(name);
1756 }
1757 }
1758
1759 /**
1760 * Convenience function for updating a single settings value as a long
1761 * integer. This will either create a new entry in the table if the
1762 * given name does not exist, or modify the value of the existing row
1763 * with that name. Note that internally setting values are always
1764 * stored as strings, so this function converts the given value to a
1765 * string before storing it.
1766 *
1767 * @param cr The ContentResolver to access.
1768 * @param name The name of the setting to modify.
1769 * @param value The new value for the setting.
1770 * @return true if the value was set, false on database errors
1771 */
1772 public static boolean putLong(ContentResolver cr, String name, long value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001773 return putLongForUser(cr, name, value, UserHandle.myUserId());
1774 }
1775
1776 /** @hide */
1777 public static boolean putLongForUser(ContentResolver cr, String name, long value,
1778 int userHandle) {
1779 return putStringForUser(cr, name, Long.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001780 }
1781
1782 /**
1783 * Convenience function for retrieving a single system settings value
1784 * as a floating point number. Note that internally setting values are
1785 * always stored as strings; this function converts the string to an
1786 * float for you. The default value will be returned if the setting
1787 * is not defined or not a valid float.
1788 *
1789 * @param cr The ContentResolver to access.
1790 * @param name The name of the setting to retrieve.
1791 * @param def Value to return if the setting is not defined.
1792 *
1793 * @return The setting's current value, or 'def' if it is not defined
1794 * or not a valid float.
1795 */
1796 public static float getFloat(ContentResolver cr, String name, float def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001797 return getFloatForUser(cr, name, def, UserHandle.myUserId());
1798 }
1799
1800 /** @hide */
1801 public static float getFloatForUser(ContentResolver cr, String name, float def,
1802 int userHandle) {
1803 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001804 try {
1805 return v != null ? Float.parseFloat(v) : def;
1806 } catch (NumberFormatException e) {
1807 return def;
1808 }
1809 }
1810
1811 /**
1812 * Convenience function for retrieving a single system settings value
1813 * as a float. Note that internally setting values are always
1814 * stored as strings; this function converts the string to a float
1815 * for you.
1816 * <p>
1817 * This version does not take a default value. If the setting has not
1818 * been set, or the string value is not a number,
1819 * it throws {@link SettingNotFoundException}.
1820 *
1821 * @param cr The ContentResolver to access.
1822 * @param name The name of the setting to retrieve.
1823 *
1824 * @throws SettingNotFoundException Thrown if a setting by the given
1825 * name can't be found or the setting value is not a float.
1826 *
1827 * @return The setting's current value.
1828 */
1829 public static float getFloat(ContentResolver cr, String name)
1830 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001831 return getFloatForUser(cr, name, UserHandle.myUserId());
1832 }
1833
1834 /** @hide */
1835 public static float getFloatForUser(ContentResolver cr, String name, int userHandle)
1836 throws SettingNotFoundException {
1837 String v = getStringForUser(cr, name, userHandle);
Brian Muramatsue1d46982010-12-06 17:34:20 -08001838 if (v == null) {
1839 throw new SettingNotFoundException(name);
1840 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001841 try {
1842 return Float.parseFloat(v);
1843 } catch (NumberFormatException e) {
1844 throw new SettingNotFoundException(name);
1845 }
1846 }
1847
1848 /**
1849 * Convenience function for updating a single settings value as a
1850 * floating point number. This will either create a new entry in the
1851 * table if the given name does not exist, or modify the value of the
1852 * existing row with that name. Note that internally setting values
1853 * are always stored as strings, so this function converts the given
1854 * value to a string before storing it.
1855 *
1856 * @param cr The ContentResolver to access.
1857 * @param name The name of the setting to modify.
1858 * @param value The new value for the setting.
1859 * @return true if the value was set, false on database errors
1860 */
1861 public static boolean putFloat(ContentResolver cr, String name, float value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001862 return putFloatForUser(cr, name, value, UserHandle.myUserId());
1863 }
1864
1865 /** @hide */
1866 public static boolean putFloatForUser(ContentResolver cr, String name, float value,
1867 int userHandle) {
1868 return putStringForUser(cr, name, Float.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001869 }
1870
1871 /**
1872 * Convenience function to read all of the current
1873 * configuration-related settings into a
1874 * {@link Configuration} object.
1875 *
1876 * @param cr The ContentResolver to access.
1877 * @param outConfig Where to place the configuration settings.
1878 */
1879 public static void getConfiguration(ContentResolver cr, Configuration outConfig) {
Christopher Tate06efb532012-08-24 15:29:27 -07001880 getConfigurationForUser(cr, outConfig, UserHandle.myUserId());
1881 }
1882
1883 /** @hide */
1884 public static void getConfigurationForUser(ContentResolver cr, Configuration outConfig,
1885 int userHandle) {
1886 outConfig.fontScale = Settings.System.getFloatForUser(
1887 cr, FONT_SCALE, outConfig.fontScale, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001888 if (outConfig.fontScale < 0) {
1889 outConfig.fontScale = 1;
1890 }
1891 }
1892
1893 /**
Dianne Hackborn31ca8542011-07-19 14:58:28 -07001894 * @hide Erase the fields in the Configuration that should be applied
1895 * by the settings.
1896 */
1897 public static void clearConfiguration(Configuration inoutConfig) {
1898 inoutConfig.fontScale = 0;
1899 }
Narayan Kamath6d632962011-08-24 11:51:37 +01001900
Dianne Hackborn31ca8542011-07-19 14:58:28 -07001901 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001902 * Convenience function to write a batch of configuration-related
1903 * settings from a {@link Configuration} object.
1904 *
1905 * @param cr The ContentResolver to access.
1906 * @param config The settings to write.
1907 * @return true if the values were set, false on database errors
1908 */
1909 public static boolean putConfiguration(ContentResolver cr, Configuration config) {
Christopher Tate06efb532012-08-24 15:29:27 -07001910 return putConfigurationForUser(cr, config, UserHandle.myUserId());
1911 }
1912
1913 /** @hide */
1914 public static boolean putConfigurationForUser(ContentResolver cr, Configuration config,
1915 int userHandle) {
1916 return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001917 }
1918
Dianne Hackbornb8b11a02010-03-10 15:53:11 -08001919 /** @hide */
1920 public static boolean hasInterestingConfigurationChanges(int changes) {
1921 return (changes&ActivityInfo.CONFIG_FONT_SCALE) != 0;
1922 }
Jaikumar Ganesh545e6702010-06-04 10:23:03 -07001923
Christopher Tate06efb532012-08-24 15:29:27 -07001924 /** @deprecated - Do not use */
1925 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001926 public static boolean getShowGTalkServiceStatus(ContentResolver cr) {
Christopher Tate06efb532012-08-24 15:29:27 -07001927 return getShowGTalkServiceStatusForUser(cr, UserHandle.myUserId());
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001928 }
1929
Christopher Tate06efb532012-08-24 15:29:27 -07001930 /**
1931 * @hide
1932 * @deprecated - Do not use
1933 */
1934 public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr,
1935 int userHandle) {
1936 return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0;
1937 }
1938
1939 /** @deprecated - Do not use */
1940 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001941 public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) {
Christopher Tatec8c08382012-09-19 17:18:18 -07001942 setShowGTalkServiceStatusForUser(cr, flag, UserHandle.myUserId());
Christopher Tate06efb532012-08-24 15:29:27 -07001943 }
1944
1945 /**
1946 * @hide
1947 * @deprecated - Do not use
1948 */
1949 @Deprecated
1950 public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag,
1951 int userHandle) {
1952 putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001953 }
1954
Svetoslav683914b2015-01-15 14:22:26 -08001955 private static final class DiscreteValueValidator implements Validator {
1956 private final String[] mValues;
1957
1958 public DiscreteValueValidator(String[] values) {
1959 mValues = values;
1960 }
1961
Svetoslav1b71ea92015-02-17 18:20:29 -08001962 @Override
Svetoslav683914b2015-01-15 14:22:26 -08001963 public boolean validate(String value) {
1964 return ArrayUtils.contains(mValues, value);
1965 }
1966 }
1967
1968 private static final class InclusiveIntegerRangeValidator implements Validator {
1969 private final int mMin;
1970 private final int mMax;
1971
1972 public InclusiveIntegerRangeValidator(int min, int max) {
1973 mMin = min;
1974 mMax = max;
1975 }
1976
Svetoslav1b71ea92015-02-17 18:20:29 -08001977 @Override
Svetoslav683914b2015-01-15 14:22:26 -08001978 public boolean validate(String value) {
1979 try {
1980 final int intValue = Integer.parseInt(value);
1981 return intValue >= mMin && intValue <= mMax;
1982 } catch (NumberFormatException e) {
1983 return false;
1984 }
1985 }
1986 }
1987
1988 private static final class InclusiveFloatRangeValidator implements Validator {
1989 private final float mMin;
1990 private final float mMax;
1991
1992 public InclusiveFloatRangeValidator(float min, float max) {
1993 mMin = min;
1994 mMax = max;
1995 }
1996
Svetoslav1b71ea92015-02-17 18:20:29 -08001997 @Override
Svetoslav683914b2015-01-15 14:22:26 -08001998 public boolean validate(String value) {
1999 try {
2000 final float floatValue = Float.parseFloat(value);
2001 return floatValue >= mMin && floatValue <= mMax;
2002 } catch (NumberFormatException e) {
2003 return false;
2004 }
2005 }
2006 }
2007
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002008 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002009 * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002010 */
Christopher Tate06efb532012-08-24 15:29:27 -07002011 @Deprecated
2012 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 -08002013
2014 /**
2015 * What happens when the user presses the end call button if they're not
2016 * on a call.<br/>
2017 * <b>Values:</b><br/>
2018 * 0 - The end button does nothing.<br/>
2019 * 1 - The end button goes to the home screen.<br/>
2020 * 2 - The end button puts the device to sleep and locks the keyguard.<br/>
2021 * 3 - The end button goes to the home screen. If the user is already on the
2022 * home screen, it puts the device to sleep.
2023 */
2024 public static final String END_BUTTON_BEHAVIOR = "end_button_behavior";
2025
Svetoslav683914b2015-01-15 14:22:26 -08002026 private static final Validator END_BUTTON_BEHAVIOR_VALIDATOR =
2027 new InclusiveIntegerRangeValidator(0, 3);
2028
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002029 /**
David Brown458e8062010-03-08 21:52:11 -08002030 * END_BUTTON_BEHAVIOR value for "go home".
2031 * @hide
2032 */
2033 public static final int END_BUTTON_BEHAVIOR_HOME = 0x1;
2034
2035 /**
2036 * END_BUTTON_BEHAVIOR value for "go to sleep".
2037 * @hide
2038 */
2039 public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2;
2040
2041 /**
2042 * END_BUTTON_BEHAVIOR default value.
2043 * @hide
2044 */
2045 public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP;
2046
2047 /**
Joe Onorato9cdffa12011-04-06 18:27:27 -07002048 * Is advanced settings mode turned on. 0 == no, 1 == yes
2049 * @hide
2050 */
2051 public static final String ADVANCED_SETTINGS = "advanced_settings";
2052
Svetoslav683914b2015-01-15 14:22:26 -08002053 private static final Validator ADVANCED_SETTINGS_VALIDATOR = sBooleanValidator;
2054
Joe Onorato9cdffa12011-04-06 18:27:27 -07002055 /**
2056 * ADVANCED_SETTINGS default value.
2057 * @hide
2058 */
2059 public static final int ADVANCED_SETTINGS_DEFAULT = 0;
2060
2061 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002062 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002063 */
Christopher Tate06efb532012-08-24 15:29:27 -07002064 @Deprecated
2065 public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002066
2067 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002068 * @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002069 */
Christopher Tate06efb532012-08-24 15:29:27 -07002070 @Deprecated
2071 public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002072
2073 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002074 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002075 */
Christopher Tate06efb532012-08-24 15:29:27 -07002076 @Deprecated
2077 public static final String RADIO_WIFI = Global.RADIO_WIFI;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002078
Robert Greenwalt8588e472011-11-08 10:12:25 -08002079 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002080 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead
Robert Greenwalt8588e472011-11-08 10:12:25 -08002081 * {@hide}
2082 */
Christopher Tate06efb532012-08-24 15:29:27 -07002083 @Deprecated
2084 public static final String RADIO_WIMAX = Global.RADIO_WIMAX;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002085
2086 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002087 * @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead
Nick Pelly8d32a012011-08-09 07:03:49 -07002088 */
Christopher Tate06efb532012-08-24 15:29:27 -07002089 @Deprecated
2090 public static final String RADIO_CELL = Global.RADIO_CELL;
Nick Pelly8d32a012011-08-09 07:03:49 -07002091
2092 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002093 * @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002094 */
Christopher Tate06efb532012-08-24 15:29:27 -07002095 @Deprecated
2096 public static final String RADIO_NFC = Global.RADIO_NFC;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002097
2098 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002099 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead
2100 */
2101 @Deprecated
2102 public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS;
2103
2104 /**
2105 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead
Mike Lockwoodbd5ddf02009-07-29 21:37:14 -07002106 *
2107 * {@hide}
2108 */
Christopher Tate06efb532012-08-24 15:29:27 -07002109 @Deprecated
2110 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS =
2111 Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS;
Mike Lockwoodbd5ddf02009-07-29 21:37:14 -07002112
2113 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002114 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002115 */
Christopher Tate06efb532012-08-24 15:29:27 -07002116 @Deprecated
2117 public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002118
2119 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002120 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002121 */
Christopher Tate06efb532012-08-24 15:29:27 -07002122 @Deprecated
2123 public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002124
2125 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002126 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002127 */
Christopher Tate06efb532012-08-24 15:29:27 -07002128 @Deprecated
2129 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED =
2130 Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002131
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002132 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002133 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002134 */
Christopher Tate06efb532012-08-24 15:29:27 -07002135 @Deprecated
2136 public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002137
Eric Laurentbc0fab1f2012-09-19 11:24:41 -07002138 /**
2139 * @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead
2140 */
2141 @Deprecated
2142 public static final String MODE_RINGER = Global.MODE_RINGER;
2143
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002144 /**
2145 * Whether to use static IP and other static network attributes.
2146 * <p>
2147 * Set to 1 for true and 0 for false.
Jeff Sharkey625239a2012-09-26 22:03:49 -07002148 *
2149 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002150 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002151 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002152 public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip";
2153
Svetoslav683914b2015-01-15 14:22:26 -08002154 private static final Validator WIFI_USE_STATIC_IP_VALIDATOR = sBooleanValidator;
2155
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002156 /**
2157 * The static IP address.
2158 * <p>
2159 * Example: "192.168.1.51"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002160 *
2161 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002162 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002163 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002164 public static final String WIFI_STATIC_IP = "wifi_static_ip";
2165
Svetoslav683914b2015-01-15 14:22:26 -08002166 private static final Validator WIFI_STATIC_IP_VALIDATOR = sLenientIpAddressValidator;
2167
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002168 /**
2169 * If using static IP, the gateway's IP address.
2170 * <p>
2171 * Example: "192.168.1.1"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002172 *
2173 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002174 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002175 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002176 public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway";
2177
Svetoslav683914b2015-01-15 14:22:26 -08002178 private static final Validator WIFI_STATIC_GATEWAY_VALIDATOR = sLenientIpAddressValidator;
2179
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002180 /**
2181 * If using static IP, the net mask.
2182 * <p>
2183 * Example: "255.255.255.0"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002184 *
2185 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002186 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002187 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002188 public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask";
2189
Svetoslav683914b2015-01-15 14:22:26 -08002190 private static final Validator WIFI_STATIC_NETMASK_VALIDATOR = sLenientIpAddressValidator;
2191
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002192 /**
2193 * If using static IP, the primary DNS's IP address.
2194 * <p>
2195 * Example: "192.168.1.1"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002196 *
2197 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002198 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002199 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002200 public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1";
2201
Svetoslav683914b2015-01-15 14:22:26 -08002202 private static final Validator WIFI_STATIC_DNS1_VALIDATOR = sLenientIpAddressValidator;
2203
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002204 /**
2205 * If using static IP, the secondary DNS's IP address.
2206 * <p>
2207 * Example: "192.168.1.2"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002208 *
2209 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002210 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002211 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002212 public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2";
2213
Svetoslav683914b2015-01-15 14:22:26 -08002214 private static final Validator WIFI_STATIC_DNS2_VALIDATOR = sLenientIpAddressValidator;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002215
2216 /**
2217 * Determines whether remote devices may discover and/or connect to
2218 * this device.
2219 * <P>Type: INT</P>
2220 * 2 -- discoverable and connectable
2221 * 1 -- connectable but not discoverable
2222 * 0 -- neither connectable nor discoverable
2223 */
2224 public static final String BLUETOOTH_DISCOVERABILITY =
2225 "bluetooth_discoverability";
2226
Svetoslav683914b2015-01-15 14:22:26 -08002227 private static final Validator BLUETOOTH_DISCOVERABILITY_VALIDATOR =
2228 new InclusiveIntegerRangeValidator(0, 2);
2229
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002230 /**
2231 * Bluetooth discoverability timeout. If this value is nonzero, then
2232 * Bluetooth becomes discoverable for a certain number of seconds,
2233 * after which is becomes simply connectable. The value is in seconds.
2234 */
2235 public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT =
2236 "bluetooth_discoverability_timeout";
2237
Svetoslav683914b2015-01-15 14:22:26 -08002238 private static final Validator BLUETOOTH_DISCOVERABILITY_TIMEOUT_VALIDATOR =
2239 sNonNegativeIntegerValidator;
2240
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002241 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08002242 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED}
2243 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002244 */
Amith Yamasani156c4352010-03-05 17:10:03 -08002245 @Deprecated
2246 public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002247
2248 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08002249 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE}
2250 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002251 */
Amith Yamasani156c4352010-03-05 17:10:03 -08002252 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002253 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
2254
2255 /**
Jaikumar Ganesh545e6702010-06-04 10:23:03 -07002256 * @deprecated Use
Amith Yamasani156c4352010-03-05 17:10:03 -08002257 * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED}
2258 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002259 */
Amith Yamasani156c4352010-03-05 17:10:03 -08002260 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002261 public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED =
2262 "lock_pattern_tactile_feedback_enabled";
2263
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002264 /**
2265 * A formatted string of the next alarm that is set, or the empty string
2266 * if there is no alarm set.
Adrian Roosc42a1e12014-07-07 23:35:53 +02002267 *
2268 * @deprecated Use {@link android.app.AlarmManager#getNextAlarmClock()}.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002269 */
Adrian Roosc42a1e12014-07-07 23:35:53 +02002270 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002271 public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted";
2272
Svetoslav683914b2015-01-15 14:22:26 -08002273 private static final Validator NEXT_ALARM_FORMATTED_VALIDATOR = new Validator() {
2274 private static final int MAX_LENGTH = 1000;
Svetoslav1b71ea92015-02-17 18:20:29 -08002275
Svetoslav683914b2015-01-15 14:22:26 -08002276 @Override
2277 public boolean validate(String value) {
2278 // TODO: No idea what the correct format is.
Svetoslav64d6e9c2015-02-12 11:30:36 -08002279 return value == null || value.length() < MAX_LENGTH;
Svetoslav683914b2015-01-15 14:22:26 -08002280 }
2281 };
2282
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002283 /**
2284 * Scaling factor for fonts, float.
2285 */
2286 public static final String FONT_SCALE = "font_scale";
2287
Svetoslav683914b2015-01-15 14:22:26 -08002288 private static final Validator FONT_SCALE_VALIDATOR = new Validator() {
2289 @Override
2290 public boolean validate(String value) {
2291 try {
2292 return Float.parseFloat(value) >= 0;
2293 } catch (NumberFormatException e) {
2294 return false;
2295 }
2296 }
2297 };
2298
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002299 /**
2300 * Name of an application package to be debugged.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002301 *
2302 * @deprecated Use {@link Global#DEBUG_APP} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002303 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002304 @Deprecated
2305 public static final String DEBUG_APP = Global.DEBUG_APP;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002306
2307 /**
2308 * If 1, when launching DEBUG_APP it will wait for the debugger before
2309 * starting user code. If 0, it will run normally.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002310 *
2311 * @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002312 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002313 @Deprecated
2314 public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002315
2316 /**
2317 * Whether or not to dim the screen. 0=no 1=yes
Jeff Brown96307042012-07-27 15:51:34 -07002318 * @deprecated This setting is no longer used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002319 */
Jeff Brown96307042012-07-27 15:51:34 -07002320 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002321 public static final String DIM_SCREEN = "dim_screen";
2322
Svetoslav683914b2015-01-15 14:22:26 -08002323 private static final Validator DIM_SCREEN_VALIDATOR = sBooleanValidator;
2324
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002325 /**
Jeff Brown05af6ad2014-09-30 20:54:30 -07002326 * The amount of time in milliseconds before the device goes to sleep or begins
2327 * to dream after a period of inactivity. This value is also known as the
2328 * user activity timeout period since the screen isn't necessarily turned off
2329 * when it expires.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002330 */
2331 public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout";
2332
Svetoslav683914b2015-01-15 14:22:26 -08002333 private static final Validator SCREEN_OFF_TIMEOUT_VALIDATOR = sNonNegativeIntegerValidator;
2334
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002335 /**
2336 * The screen backlight brightness between 0 and 255.
2337 */
2338 public static final String SCREEN_BRIGHTNESS = "screen_brightness";
2339
Svetoslav683914b2015-01-15 14:22:26 -08002340 private static final Validator SCREEN_BRIGHTNESS_VALIDATOR =
2341 new InclusiveIntegerRangeValidator(0, 255);
2342
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002343 /**
Dan Murphy951764b2009-08-27 14:59:03 -05002344 * Control whether to enable automatic brightness mode.
Dan Murphy951764b2009-08-27 14:59:03 -05002345 */
2346 public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode";
2347
Svetoslav683914b2015-01-15 14:22:26 -08002348 private static final Validator SCREEN_BRIGHTNESS_MODE_VALIDATOR = sBooleanValidator;
2349
Dan Murphy951764b2009-08-27 14:59:03 -05002350 /**
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08002351 * Adjustment to auto-brightness to make it generally more (>0.0 <1.0)
2352 * or less (<0.0 >-1.0) bright.
Dianne Hackborn518a3d82012-05-09 16:30:49 -07002353 * @hide
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08002354 */
2355 public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj";
2356
Svetoslav683914b2015-01-15 14:22:26 -08002357 private static final Validator SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR =
2358 new InclusiveFloatRangeValidator(-1, 1);
2359
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08002360 /**
Mike Lockwooddc3494e2009-10-14 21:17:09 -07002361 * SCREEN_BRIGHTNESS_MODE value for manual mode.
Mike Lockwooddc3494e2009-10-14 21:17:09 -07002362 */
2363 public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0;
2364
2365 /**
Scott Main52bfc242012-02-09 10:09:14 -08002366 * SCREEN_BRIGHTNESS_MODE value for automatic mode.
Mike Lockwooddc3494e2009-10-14 21:17:09 -07002367 */
2368 public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1;
2369
2370 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002371 * Control whether the process CPU usage meter should be shown.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002372 *
2373 * @deprecated Use {@link Global#SHOW_PROCESSES} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002374 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002375 @Deprecated
2376 public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002377
2378 /**
2379 * If 1, the activity manager will aggressively finish activities and
2380 * processes as soon as they are no longer needed. If 0, the normal
2381 * extended lifetime is used.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002382 *
2383 * @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002384 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002385 @Deprecated
2386 public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002387
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002388 /**
2389 * Determines which streams are affected by ringer mode changes. The
2390 * stream type's bit should be set to 1 if it should be muted when going
2391 * into an inaudible ringer mode.
2392 */
2393 public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected";
2394
Svetoslav683914b2015-01-15 14:22:26 -08002395 private static final Validator MODE_RINGER_STREAMS_AFFECTED_VALIDATOR =
2396 sNonNegativeIntegerValidator;
2397
2398 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002399 * Determines which streams are affected by mute. The
2400 * stream type's bit should be set to 1 if it should be muted when a mute request
2401 * is received.
2402 */
Svetoslav683914b2015-01-15 14:22:26 -08002403 public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected";
2404
2405 private static final Validator MUTE_STREAMS_AFFECTED_VALIDATOR =
2406 sNonNegativeIntegerValidator;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002407
2408 /**
2409 * Whether vibrate is on for different events. This is used internally,
2410 * changing this value will not change the vibrate. See AudioManager.
2411 */
2412 public static final String VIBRATE_ON = "vibrate_on";
2413
Svetoslav683914b2015-01-15 14:22:26 -08002414 private static final Validator VIBRATE_ON_VALIDATOR = sBooleanValidator;
2415
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002416 /**
Jeff Brown7f6c2312012-04-13 20:38:38 -07002417 * If 1, redirects the system vibrator to all currently attached input devices
2418 * that support vibration. If there are no such input devices, then the system
2419 * vibrator is used instead.
2420 * If 0, does not register the system vibrator.
2421 *
2422 * This setting is mainly intended to provide a compatibility mechanism for
2423 * applications that only know about the system vibrator and do not use the
2424 * input device vibrator API.
2425 *
2426 * @hide
2427 */
2428 public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices";
2429
Svetoslav683914b2015-01-15 14:22:26 -08002430 private static final Validator VIBRATE_INPUT_DEVICES_VALIDATOR = sBooleanValidator;
2431
Jeff Brown7f6c2312012-04-13 20:38:38 -07002432 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002433 * Ringer volume. This is used internally, changing this value will not
2434 * change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002435 *
2436 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002437 */
2438 public static final String VOLUME_RING = "volume_ring";
2439
2440 /**
2441 * System/notifications volume. This is used internally, changing this
2442 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002443 *
2444 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002445 */
2446 public static final String VOLUME_SYSTEM = "volume_system";
2447
2448 /**
2449 * Voice call volume. This is used internally, changing this value will
2450 * not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002451 *
2452 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002453 */
2454 public static final String VOLUME_VOICE = "volume_voice";
2455
2456 /**
2457 * Music/media/gaming volume. This is used internally, changing this
2458 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002459 *
2460 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002461 */
2462 public static final String VOLUME_MUSIC = "volume_music";
2463
2464 /**
2465 * Alarm volume. This is used internally, changing this
2466 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002467 *
2468 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002469 */
2470 public static final String VOLUME_ALARM = "volume_alarm";
2471
2472 /**
2473 * Notification volume. This is used internally, changing this
2474 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002475 *
2476 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002477 */
2478 public static final String VOLUME_NOTIFICATION = "volume_notification";
2479
2480 /**
Eric Laurent484d2882009-12-08 09:05:45 -08002481 * Bluetooth Headset volume. This is used internally, changing this value will
2482 * not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002483 *
2484 * @removed Not used by anything since API 2.
Eric Laurent484d2882009-12-08 09:05:45 -08002485 */
2486 public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco";
2487
2488 /**
Mike Lockwood8517e462011-10-25 14:47:19 -04002489 * Master volume (float in the range 0.0f to 1.0f).
Svetoslavdbbeeb32015-02-18 19:16:25 -08002490 *
Mike Lockwood8517e462011-10-25 14:47:19 -04002491 * @hide
2492 */
2493 public static final String VOLUME_MASTER = "volume_master";
2494
2495 /**
Justin Koh57978ed2012-04-03 17:37:58 -07002496 * Master volume mute (int 1 = mute, 0 = not muted).
2497 *
2498 * @hide
2499 */
2500 public static final String VOLUME_MASTER_MUTE = "volume_master_mute";
2501
Svetoslav683914b2015-01-15 14:22:26 -08002502 private static final Validator VOLUME_MASTER_MUTE_VALIDATOR = sBooleanValidator;
2503
Justin Koh57978ed2012-04-03 17:37:58 -07002504 /**
Julia Reynoldsb53453f2014-08-22 11:42:43 -04002505 * Microphone mute (int 1 = mute, 0 = not muted).
2506 *
2507 * @hide
2508 */
2509 public static final String MICROPHONE_MUTE = "microphone_mute";
2510
Svetoslav683914b2015-01-15 14:22:26 -08002511 private static final Validator MICROPHONE_MUTE_VALIDATOR = sBooleanValidator;
2512
Julia Reynoldsb53453f2014-08-22 11:42:43 -04002513 /**
Justin Koh57978ed2012-04-03 17:37:58 -07002514 * Whether the notifications should use the ring volume (value of 1) or
2515 * a separate notification volume (value of 0). In most cases, users
2516 * will have this enabled so the notification and ringer volumes will be
2517 * the same. However, power users can disable this and use the separate
2518 * notification volume control.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002519 * <p>
Justin Koh57978ed2012-04-03 17:37:58 -07002520 * Note: This is a one-off setting that will be removed in the future
2521 * when there is profile support. For this reason, it is kept hidden
2522 * from the public APIs.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002523 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002524 * @hide
Amith Yamasani42722bf2011-07-22 10:34:27 -07002525 * @deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002526 */
Gilles Debunnee90bed12011-08-30 14:28:27 -07002527 @Deprecated
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002528 public static final String NOTIFICATIONS_USE_RING_VOLUME =
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002529 "notifications_use_ring_volume";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002530
Svetoslav683914b2015-01-15 14:22:26 -08002531 private static final Validator NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR = sBooleanValidator;
2532
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002533 /**
Daniel Sandler6329bf72010-02-26 15:17:44 -05002534 * Whether silent mode should allow vibration feedback. This is used
2535 * internally in AudioService and the Sound settings activity to
2536 * coordinate decoupling of vibrate and silent modes. This setting
2537 * will likely be removed in a future release with support for
2538 * audio/vibe feedback profiles.
2539 *
Eric Laurentbffc3d12012-05-07 17:43:49 -07002540 * Not used anymore. On devices with vibrator, the user explicitly selects
2541 * silent or vibrate mode.
2542 * Kept for use by legacy database upgrade code in DatabaseHelper.
Daniel Sandler6329bf72010-02-26 15:17:44 -05002543 * @hide
2544 */
2545 public static final String VIBRATE_IN_SILENT = "vibrate_in_silent";
2546
Svetoslav683914b2015-01-15 14:22:26 -08002547 private static final Validator VIBRATE_IN_SILENT_VALIDATOR = sBooleanValidator;
2548
Daniel Sandler6329bf72010-02-26 15:17:44 -05002549 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002550 * The mapping of stream type (integer) to its setting.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002551 *
2552 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002553 */
2554 public static final String[] VOLUME_SETTINGS = {
2555 VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC,
Eric Laurent484d2882009-12-08 09:05:45 -08002556 VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002557 };
2558
2559 /**
2560 * Appended to various volume related settings to record the previous
2561 * values before they the settings were affected by a silent/vibrate
2562 * ringer mode change.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002563 *
2564 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002565 */
2566 public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible";
2567
2568 /**
2569 * Persistent store for the system-wide default ringtone URI.
2570 * <p>
2571 * If you need to play the default ringtone at any given time, it is recommended
2572 * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve
2573 * to the set default ringtone at the time of playing.
2574 *
2575 * @see #DEFAULT_RINGTONE_URI
2576 */
2577 public static final String RINGTONE = "ringtone";
2578
Svetoslav683914b2015-01-15 14:22:26 -08002579 private static final Validator RINGTONE_VALIDATOR = sUriValidator;
2580
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002581 /**
2582 * A {@link Uri} that will point to the current default ringtone at any
2583 * given time.
2584 * <p>
2585 * If the current default ringtone is in the DRM provider and the caller
2586 * does not have permission, the exception will be a
2587 * FileNotFoundException.
2588 */
2589 public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE);
2590
2591 /**
2592 * Persistent store for the system-wide default notification sound.
2593 *
2594 * @see #RINGTONE
2595 * @see #DEFAULT_NOTIFICATION_URI
2596 */
2597 public static final String NOTIFICATION_SOUND = "notification_sound";
2598
Svetoslav683914b2015-01-15 14:22:26 -08002599 private static final Validator NOTIFICATION_SOUND_VALIDATOR = sUriValidator;
2600
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002601 /**
2602 * A {@link Uri} that will point to the current default notification
2603 * sound at any given time.
2604 *
2605 * @see #DEFAULT_RINGTONE_URI
2606 */
2607 public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND);
2608
2609 /**
Patrick Scott3156bb002009-04-13 09:57:38 -07002610 * Persistent store for the system-wide default alarm alert.
2611 *
2612 * @see #RINGTONE
2613 * @see #DEFAULT_ALARM_ALERT_URI
2614 */
2615 public static final String ALARM_ALERT = "alarm_alert";
2616
Svetoslav683914b2015-01-15 14:22:26 -08002617 private static final Validator ALARM_ALERT_VALIDATOR = sUriValidator;
2618
Patrick Scott3156bb002009-04-13 09:57:38 -07002619 /**
2620 * A {@link Uri} that will point to the current default alarm alert at
2621 * any given time.
2622 *
2623 * @see #DEFAULT_ALARM_ALERT_URI
2624 */
2625 public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT);
2626
2627 /**
Jean-Michel Trivid589fea2011-04-15 11:28:10 -07002628 * Persistent store for the system default media button event receiver.
2629 *
2630 * @hide
2631 */
2632 public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver";
2633
Svetoslav683914b2015-01-15 14:22:26 -08002634 private static final Validator MEDIA_BUTTON_RECEIVER_VALIDATOR = new Validator() {
2635 @Override
2636 public boolean validate(String value) {
2637 try {
2638 ComponentName.unflattenFromString(value);
2639 return true;
2640 } catch (NullPointerException e) {
2641 return false;
2642 }
2643 }
2644 };
2645
Jean-Michel Trivid589fea2011-04-15 11:28:10 -07002646 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002647 * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off
2648 */
2649 public static final String TEXT_AUTO_REPLACE = "auto_replace";
2650
Svetoslav683914b2015-01-15 14:22:26 -08002651 private static final Validator TEXT_AUTO_REPLACE_VALIDATOR = sBooleanValidator;
2652
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002653 /**
2654 * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off
2655 */
2656 public static final String TEXT_AUTO_CAPS = "auto_caps";
2657
Svetoslav683914b2015-01-15 14:22:26 -08002658 private static final Validator TEXT_AUTO_CAPS_VALIDATOR = sBooleanValidator;
2659
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002660 /**
2661 * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This
2662 * feature converts two spaces to a "." and space.
2663 */
2664 public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002665
Svetoslav683914b2015-01-15 14:22:26 -08002666 private static final Validator TEXT_AUTO_PUNCTUATE_VALIDATOR = sBooleanValidator;
2667
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002668 /**
2669 * Setting to showing password characters in text editors. 1 = On, 0 = Off
2670 */
2671 public static final String TEXT_SHOW_PASSWORD = "show_password";
2672
Svetoslav683914b2015-01-15 14:22:26 -08002673 private static final Validator TEXT_SHOW_PASSWORD_VALIDATOR = sBooleanValidator;
2674
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002675 public static final String SHOW_GTALK_SERVICE_STATUS =
2676 "SHOW_GTALK_SERVICE_STATUS";
2677
Svetoslav683914b2015-01-15 14:22:26 -08002678 private static final Validator SHOW_GTALK_SERVICE_STATUS_VALIDATOR = sBooleanValidator;
2679
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002680 /**
2681 * Name of activity to use for wallpaper on the home screen.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002682 *
2683 * @deprecated Use {@link WallpaperManager} instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002684 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002685 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002686 public static final String WALLPAPER_ACTIVITY = "wallpaper_activity";
2687
Svetoslav683914b2015-01-15 14:22:26 -08002688 private static final Validator WALLPAPER_ACTIVITY_VALIDATOR = new Validator() {
2689 private static final int MAX_LENGTH = 1000;
2690
2691 @Override
2692 public boolean validate(String value) {
2693 if (value != null && value.length() > MAX_LENGTH) {
2694 return false;
2695 }
2696 return ComponentName.unflattenFromString(value) != null;
2697 }
2698 };
2699
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002700 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002701 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME}
2702 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002703 */
Christopher Tate06efb532012-08-24 15:29:27 -07002704 @Deprecated
2705 public static final String AUTO_TIME = Global.AUTO_TIME;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002706
2707 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002708 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE}
2709 * instead
Amith Yamasaniad450be2010-09-16 16:47:00 -07002710 */
Christopher Tate06efb532012-08-24 15:29:27 -07002711 @Deprecated
2712 public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE;
Amith Yamasaniad450be2010-09-16 16:47:00 -07002713
2714 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002715 * Display times as 12 or 24 hours
2716 * 12
2717 * 24
2718 */
2719 public static final String TIME_12_24 = "time_12_24";
2720
Svetoslav683914b2015-01-15 14:22:26 -08002721 /** @hide */
2722 public static final Validator TIME_12_24_VALIDATOR =
2723 new DiscreteValueValidator(new String[] {"12", "24"});
2724
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002725 /**
2726 * Date format string
2727 * mm/dd/yyyy
2728 * dd/mm/yyyy
2729 * yyyy/mm/dd
2730 */
2731 public static final String DATE_FORMAT = "date_format";
2732
Svetoslav683914b2015-01-15 14:22:26 -08002733 /** @hide */
2734 public static final Validator DATE_FORMAT_VALIDATOR = new Validator() {
2735 @Override
2736 public boolean validate(String value) {
2737 try {
2738 new SimpleDateFormat(value);
2739 return true;
2740 } catch (IllegalArgumentException e) {
2741 return false;
2742 }
2743 }
2744 };
2745
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002746 /**
2747 * Whether the setup wizard has been run before (on first boot), or if
2748 * it still needs to be run.
2749 *
2750 * nonzero = it has been run in the past
2751 * 0 = it has not been run in the past
2752 */
2753 public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run";
2754
Svetoslav683914b2015-01-15 14:22:26 -08002755 /** @hide */
2756 public static final Validator SETUP_WIZARD_HAS_RUN_VALIDATOR = sBooleanValidator;
2757
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002758 /**
2759 * Scaling factor for normal window animations. Setting to 0 will disable window
2760 * animations.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002761 *
2762 * @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002763 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002764 @Deprecated
2765 public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002766
2767 /**
2768 * Scaling factor for activity transition animations. Setting to 0 will disable window
2769 * animations.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002770 *
2771 * @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002772 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002773 @Deprecated
2774 public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002775
2776 /**
Chet Haasec38fa1f2012-02-01 16:37:46 -08002777 * Scaling factor for Animator-based animations. This affects both the start delay and
2778 * duration of all such animations. Setting to 0 will cause animations to end immediately.
2779 * The default value is 1.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002780 *
2781 * @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead
Chet Haasec38fa1f2012-02-01 16:37:46 -08002782 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002783 @Deprecated
2784 public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002785
2786 /**
2787 * Control whether the accelerometer will be used to change screen
2788 * orientation. If 0, it will not be used unless explicitly requested
2789 * by the application; if 1, it will be used by default unless explicitly
2790 * disabled by the application.
2791 */
2792 public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation";
2793
Svetoslav683914b2015-01-15 14:22:26 -08002794 /** @hide */
2795 public static final Validator ACCELEROMETER_ROTATION_VALIDATOR = sBooleanValidator;
2796
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002797 /**
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002798 * Default screen rotation when no other policy applies.
2799 * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a
2800 * preference, this rotation value will be used. Must be one of the
Brian Muramatsue1d46982010-12-06 17:34:20 -08002801 * {@link android.view.Surface#ROTATION_0 Surface rotation constants}.
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002802 *
Dianne Hackborn16ec0802014-08-15 18:32:33 -07002803 * @see android.view.Display#getRotation
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002804 */
2805 public static final String USER_ROTATION = "user_rotation";
2806
Svetoslav683914b2015-01-15 14:22:26 -08002807 /** @hide */
2808 public static final Validator USER_ROTATION_VALIDATOR =
2809 new InclusiveIntegerRangeValidator(0, 3);
2810
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002811 /**
Jeff Brown207673cd2012-06-05 17:47:11 -07002812 * Control whether the rotation lock toggle in the System UI should be hidden.
2813 * Typically this is done for accessibility purposes to make it harder for
2814 * the user to accidentally toggle the rotation lock while the display rotation
2815 * has been locked for accessibility.
2816 *
2817 * If 0, then rotation lock toggle is not hidden for accessibility (although it may be
2818 * unavailable for other reasons). If 1, then the rotation lock toggle is hidden.
2819 *
2820 * @hide
2821 */
2822 public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY =
2823 "hide_rotation_lock_toggle_for_accessibility";
2824
Svetoslav683914b2015-01-15 14:22:26 -08002825 /** @hide */
2826 public static final Validator HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY_VALIDATOR =
2827 sBooleanValidator;
2828
Jeff Brown207673cd2012-06-05 17:47:11 -07002829 /**
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07002830 * Whether the phone vibrates when it is ringing due to an incoming call. This will
2831 * be used by Phone and Setting apps; it shouldn't affect other apps.
2832 * The value is boolean (1 or 0).
2833 *
2834 * Note: this is not same as "vibrate on ring", which had been available until ICS.
2835 * It was about AudioManager's setting and thus affected all the applications which
2836 * relied on the setting, while this is purely about the vibration setting for incoming
2837 * calls.
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07002838 */
2839 public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
2840
Svetoslav683914b2015-01-15 14:22:26 -08002841 /** @hide */
2842 public static final Validator VIBRATE_WHEN_RINGING_VALIDATOR = sBooleanValidator;
2843
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07002844 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002845 * Whether the audible DTMF tones are played by the dialer when dialing. The value is
2846 * boolean (1 or 0).
2847 */
2848 public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone";
2849
Svetoslav683914b2015-01-15 14:22:26 -08002850 /** @hide */
2851 public static final Validator DTMF_TONE_WHEN_DIALING_VALIDATOR = sBooleanValidator;
2852
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002853 /**
David Kraused0f67152009-06-13 18:01:13 -05002854 * CDMA only settings
2855 * DTMF tone type played by the dialer when dialing.
2856 * 0 = Normal
2857 * 1 = Long
David Kraused0f67152009-06-13 18:01:13 -05002858 */
2859 public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type";
2860
Svetoslav683914b2015-01-15 14:22:26 -08002861 /** @hide */
2862 public static final Validator DTMF_TONE_TYPE_WHEN_DIALING_VALIDATOR = sBooleanValidator;
2863
David Kraused0f67152009-06-13 18:01:13 -05002864 /**
David Kraused0f67152009-06-13 18:01:13 -05002865 * Whether the hearing aid is enabled. The value is
2866 * boolean (1 or 0).
2867 * @hide
2868 */
2869 public static final String HEARING_AID = "hearing_aid";
2870
Svetoslav683914b2015-01-15 14:22:26 -08002871 /** @hide */
2872 public static final Validator HEARING_AID_VALIDATOR = sBooleanValidator;
2873
David Kraused0f67152009-06-13 18:01:13 -05002874 /**
2875 * CDMA only settings
2876 * TTY Mode
2877 * 0 = OFF
2878 * 1 = FULL
2879 * 2 = VCO
2880 * 3 = HCO
2881 * @hide
2882 */
2883 public static final String TTY_MODE = "tty_mode";
2884
Svetoslav683914b2015-01-15 14:22:26 -08002885 /** @hide */
2886 public static final Validator TTY_MODE_VALIDATOR = new InclusiveIntegerRangeValidator(0, 3);
2887
David Kraused0f67152009-06-13 18:01:13 -05002888 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002889 * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is
2890 * boolean (1 or 0).
2891 */
2892 public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002893
Svetoslav683914b2015-01-15 14:22:26 -08002894 /** @hide */
2895 public static final Validator SOUND_EFFECTS_ENABLED_VALIDATOR = sBooleanValidator;
2896
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002897 /**
2898 * Whether the haptic feedback (long presses, ...) are enabled. The value is
2899 * boolean (1 or 0).
2900 */
2901 public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled";
Sanjay Jeyakumar21bf2412009-07-09 13:31:48 -07002902
Svetoslav683914b2015-01-15 14:22:26 -08002903 /** @hide */
2904 public static final Validator HAPTIC_FEEDBACK_ENABLED_VALIDATOR = sBooleanValidator;
2905
Mike LeBeau48603e72009-06-05 00:27:00 +01002906 /**
Bjorn Bringert24abb662010-09-21 12:21:18 +01002907 * @deprecated Each application that shows web suggestions should have its own
2908 * setting for this.
Mike LeBeau48603e72009-06-05 00:27:00 +01002909 */
Bjorn Bringert24abb662010-09-21 12:21:18 +01002910 @Deprecated
Mike LeBeau48603e72009-06-05 00:27:00 +01002911 public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002912
Svetoslav683914b2015-01-15 14:22:26 -08002913 /** @hide */
2914 public static final Validator SHOW_WEB_SUGGESTIONS_VALIDATOR = sBooleanValidator;
2915
-b master501eec92009-07-06 13:53:11 -07002916 /**
Amith Yamasaniae3ed702009-12-01 19:02:05 -08002917 * Whether the notification LED should repeatedly flash when a notification is
2918 * pending. The value is boolean (1 or 0).
2919 * @hide
2920 */
2921 public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse";
2922
Svetoslav683914b2015-01-15 14:22:26 -08002923 /** @hide */
2924 public static final Validator NOTIFICATION_LIGHT_PULSE_VALIDATOR = sBooleanValidator;
2925
Amith Yamasaniae3ed702009-12-01 19:02:05 -08002926 /**
Dianne Hackborn90d2db32010-02-11 22:19:06 -08002927 * Show pointer location on screen?
2928 * 0 = no
2929 * 1 = yes
2930 * @hide
2931 */
2932 public static final String POINTER_LOCATION = "pointer_location";
2933
Svetoslav683914b2015-01-15 14:22:26 -08002934 /** @hide */
2935 public static final Validator POINTER_LOCATION_VALIDATOR = sBooleanValidator;
2936
Dianne Hackborn90d2db32010-02-11 22:19:06 -08002937 /**
Jeff Browndaf4a122011-08-26 17:14:14 -07002938 * Show touch positions on screen?
2939 * 0 = no
2940 * 1 = yes
2941 * @hide
2942 */
2943 public static final String SHOW_TOUCHES = "show_touches";
2944
Svetoslav683914b2015-01-15 14:22:26 -08002945 /** @hide */
2946 public static final Validator SHOW_TOUCHES_VALIDATOR = sBooleanValidator;
2947
Jeff Browndaf4a122011-08-26 17:14:14 -07002948 /**
Dianne Hackborn16ec0802014-08-15 18:32:33 -07002949 * Log raw orientation data from
Jorim Jaggib10e33f2015-02-04 21:57:40 +01002950 * {@link com.android.server.policy.WindowOrientationListener} for use with the
Jeff Brown4519f072011-01-23 13:16:01 -08002951 * orientationplot.py tool.
2952 * 0 = no
2953 * 1 = yes
2954 * @hide
2955 */
2956 public static final String WINDOW_ORIENTATION_LISTENER_LOG =
2957 "window_orientation_listener_log";
2958
Svetoslav683914b2015-01-15 14:22:26 -08002959 /** @hide */
2960 public static final Validator WINDOW_ORIENTATION_LISTENER_LOG_VALIDATOR = sBooleanValidator;
2961
Jeff Brown4519f072011-01-23 13:16:01 -08002962 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002963 * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED}
2964 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002965 * @hide
2966 */
Christopher Tate06efb532012-08-24 15:29:27 -07002967 @Deprecated
2968 public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002969
2970 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002971 * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED}
2972 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002973 * @hide
2974 */
Christopher Tate06efb532012-08-24 15:29:27 -07002975 @Deprecated
2976 public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002977
2978 /**
2979 * Whether to play sounds when the keyguard is shown and dismissed.
2980 * @hide
2981 */
2982 public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled";
2983
Svetoslav683914b2015-01-15 14:22:26 -08002984 /** @hide */
2985 public static final Validator LOCKSCREEN_SOUNDS_ENABLED_VALIDATOR = sBooleanValidator;
2986
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002987 /**
Mike Lockwood7bef7392011-10-20 16:51:53 -04002988 * Whether the lockscreen should be completely disabled.
2989 * @hide
2990 */
2991 public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled";
2992
Svetoslav683914b2015-01-15 14:22:26 -08002993 /** @hide */
2994 public static final Validator LOCKSCREEN_DISABLED_VALIDATOR = sBooleanValidator;
2995
Mike Lockwood7bef7392011-10-20 16:51:53 -04002996 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002997 * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND}
2998 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002999 * @hide
3000 */
Christopher Tate06efb532012-08-24 15:29:27 -07003001 @Deprecated
3002 public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003003
3004 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003005 * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND}
3006 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003007 * @hide
3008 */
Christopher Tate06efb532012-08-24 15:29:27 -07003009 @Deprecated
3010 public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003011
3012 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003013 * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND}
3014 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003015 * @hide
3016 */
Christopher Tate06efb532012-08-24 15:29:27 -07003017 @Deprecated
3018 public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003019
3020 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003021 * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND}
3022 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003023 * @hide
3024 */
Christopher Tate06efb532012-08-24 15:29:27 -07003025 @Deprecated
3026 public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003027
3028 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003029 * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND}
3030 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003031 * @hide
3032 */
Christopher Tate06efb532012-08-24 15:29:27 -07003033 @Deprecated
3034 public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003035
3036 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003037 * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND}
3038 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003039 * @hide
3040 */
Christopher Tate06efb532012-08-24 15:29:27 -07003041 @Deprecated
3042 public static final String LOCK_SOUND = Global.LOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003043
3044 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003045 * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND}
3046 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003047 * @hide
3048 */
Christopher Tate06efb532012-08-24 15:29:27 -07003049 @Deprecated
3050 public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003051
3052 /**
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003053 * Receive incoming SIP calls?
3054 * 0 = no
3055 * 1 = yes
3056 * @hide
3057 */
3058 public static final String SIP_RECEIVE_CALLS = "sip_receive_calls";
3059
Svetoslav683914b2015-01-15 14:22:26 -08003060 /** @hide */
3061 public static final Validator SIP_RECEIVE_CALLS_VALIDATOR = sBooleanValidator;
3062
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003063 /**
3064 * Call Preference String.
3065 * "SIP_ALWAYS" : Always use SIP with network access
3066 * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003067 * @hide
3068 */
3069 public static final String SIP_CALL_OPTIONS = "sip_call_options";
3070
Svetoslav683914b2015-01-15 14:22:26 -08003071 /** @hide */
3072 public static final Validator SIP_CALL_OPTIONS_VALIDATOR = new DiscreteValueValidator(
3073 new String[] {"SIP_ALWAYS", "SIP_ADDRESS_ONLY"});
3074
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003075 /**
3076 * One of the sip call options: Always use SIP with network access.
3077 * @hide
3078 */
3079 public static final String SIP_ALWAYS = "SIP_ALWAYS";
3080
Svetoslav683914b2015-01-15 14:22:26 -08003081 /** @hide */
3082 public static final Validator SIP_ALWAYS_VALIDATOR = sBooleanValidator;
3083
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003084 /**
3085 * One of the sip call options: Only if destination is a SIP address.
3086 * @hide
3087 */
3088 public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY";
3089
Svetoslav683914b2015-01-15 14:22:26 -08003090 /** @hide */
3091 public static final Validator SIP_ADDRESS_ONLY_VALIDATOR = sBooleanValidator;
3092
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003093 /**
Tyler Gunn2c830a22014-09-02 08:39:35 -07003094 * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that
3095 * the user should be prompted each time a call is made whether it should be placed using
3096 * SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with
3097 * SIP_ADDRESS_ONLY.
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003098 * @hide
3099 */
Tyler Gunn2c830a22014-09-02 08:39:35 -07003100 @Deprecated
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003101 public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME";
3102
Svetoslav683914b2015-01-15 14:22:26 -08003103 /** @hide */
3104 public static final Validator SIP_ASK_ME_EACH_TIME_VALIDATOR = sBooleanValidator;
3105
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003106 /**
Jeff Brown1a84fd12011-06-02 01:26:32 -07003107 * Pointer speed setting.
3108 * This is an integer value in a range between -7 and +7, so there are 15 possible values.
3109 * -7 = slowest
3110 * 0 = default speed
3111 * +7 = fastest
3112 * @hide
3113 */
3114 public static final String POINTER_SPEED = "pointer_speed";
3115
Svetoslav683914b2015-01-15 14:22:26 -08003116 /** @hide */
3117 public static final Validator POINTER_SPEED_VALIDATOR =
3118 new InclusiveFloatRangeValidator(-7, 7);
3119
Jeff Brown1a84fd12011-06-02 01:26:32 -07003120 /**
Jason Monk56e09b42014-07-18 10:29:14 -04003121 * Whether lock-to-app will be triggered by long-press on recents.
3122 * @hide
3123 */
3124 public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled";
3125
Svetoslav683914b2015-01-15 14:22:26 -08003126 /** @hide */
3127 public static final Validator LOCK_TO_APP_ENABLED_VALIDATOR = sBooleanValidator;
3128
Jason Monk56e09b42014-07-18 10:29:14 -04003129 /**
Daniel Sandler2fdb68b2013-10-03 00:12:11 -04003130 * I am the lolrus.
3131 * <p>
3132 * Nonzero values indicate that the user has a bukkit.
3133 * Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>.
3134 * @hide
3135 */
3136 public static final String EGG_MODE = "egg_mode";
3137
Svetoslav683914b2015-01-15 14:22:26 -08003138 /** @hide */
Svet Ganovb1918a02015-05-15 09:32:55 -07003139 public static final Validator EGG_MODE_VALIDATOR = new Validator() {
3140 @Override
3141 public boolean validate(String value) {
3142 try {
3143 return Long.parseLong(value) >= 0;
3144 } catch (NumberFormatException e) {
3145 return false;
3146 }
3147 }
3148 };
Svetoslav683914b2015-01-15 14:22:26 -08003149
3150 /**
3151 * IMPORTANT: If you add a new public settings you also have to add it to
3152 * PUBLIC_SETTINGS below. If the new setting is hidden you have to add
3153 * it to PRIVATE_SETTINGS below. Also add a validator that can validate
3154 * the setting value. See an example above.
3155 */
3156
Daniel Sandler2fdb68b2013-10-03 00:12:11 -04003157 /**
-b master501eec92009-07-06 13:53:11 -07003158 * Settings to backup. This is here so that it's in the same place as the settings
3159 * keys and easy to update.
Svetoslav Ganova571a582011-09-20 18:32:20 -07003160 *
3161 * NOTE: Settings are backed up and restored in the order they appear
3162 * in this array. If you have one setting depending on another,
3163 * make sure that they are ordered appropriately.
3164 *
-b master501eec92009-07-06 13:53:11 -07003165 * @hide
3166 */
3167 public static final String[] SETTINGS_TO_BACKUP = {
Christopher Tate66488d62012-10-02 11:58:01 -07003168 STAY_ON_WHILE_PLUGGED_IN, // moved to global
-b master501eec92009-07-06 13:53:11 -07003169 WIFI_USE_STATIC_IP,
3170 WIFI_STATIC_IP,
3171 WIFI_STATIC_GATEWAY,
3172 WIFI_STATIC_NETMASK,
3173 WIFI_STATIC_DNS1,
3174 WIFI_STATIC_DNS2,
3175 BLUETOOTH_DISCOVERABILITY,
3176 BLUETOOTH_DISCOVERABILITY_TIMEOUT,
3177 DIM_SCREEN,
3178 SCREEN_OFF_TIMEOUT,
3179 SCREEN_BRIGHTNESS,
Christopher Tate362aca62009-09-25 15:58:03 -07003180 SCREEN_BRIGHTNESS_MODE,
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08003181 SCREEN_AUTO_BRIGHTNESS_ADJ,
Jeff Brown7f6c2312012-04-13 20:38:38 -07003182 VIBRATE_INPUT_DEVICES,
Amith Yamasani8823c0a82009-07-07 14:30:17 -07003183 MODE_RINGER_STREAMS_AFFECTED,
-b master501eec92009-07-06 13:53:11 -07003184 TEXT_AUTO_REPLACE,
3185 TEXT_AUTO_CAPS,
3186 TEXT_AUTO_PUNCTUATE,
3187 TEXT_SHOW_PASSWORD,
Christopher Tate66488d62012-10-02 11:58:01 -07003188 AUTO_TIME, // moved to global
3189 AUTO_TIME_ZONE, // moved to global
-b master501eec92009-07-06 13:53:11 -07003190 TIME_12_24,
3191 DATE_FORMAT,
-b master501eec92009-07-06 13:53:11 -07003192 DTMF_TONE_WHEN_DIALING,
3193 DTMF_TONE_TYPE_WHEN_DIALING,
-b master501eec92009-07-06 13:53:11 -07003194 HEARING_AID,
3195 TTY_MODE,
3196 SOUND_EFFECTS_ENABLED,
3197 HAPTIC_FEEDBACK_ENABLED,
Christopher Tate66488d62012-10-02 11:58:01 -07003198 POWER_SOUNDS_ENABLED, // moved to global
3199 DOCK_SOUNDS_ENABLED, // moved to global
Christopher Tate14c2d792010-02-25 16:49:44 -08003200 LOCKSCREEN_SOUNDS_ENABLED,
Amith Yamasaniae3ed702009-12-01 19:02:05 -08003201 SHOW_WEB_SUGGESTIONS,
Mike Lockwoodeabe8bf2010-08-31 14:35:23 -04003202 NOTIFICATION_LIGHT_PULSE,
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003203 SIP_CALL_OPTIONS,
Nick Pelly038cabe2010-09-23 16:12:11 -07003204 SIP_RECEIVE_CALLS,
Jeff Brown1a84fd12011-06-02 01:26:32 -07003205 POINTER_SPEED,
Amith Yamasani622bf2222013-09-06 13:54:28 -07003206 VIBRATE_WHEN_RINGING,
3207 RINGTONE,
Jason Monk94cfd9d2014-10-31 13:18:21 -04003208 LOCK_TO_APP_ENABLED,
Amith Yamasani622bf2222013-09-06 13:54:28 -07003209 NOTIFICATION_SOUND
-b master501eec92009-07-06 13:53:11 -07003210 };
3211
Sailesh Nepal1bd78762014-02-11 22:32:21 -08003212 /**
Amith Yamasanib0ff3222015-03-04 09:56:14 -08003213 * These are all public system settings
Svetoslav683914b2015-01-15 14:22:26 -08003214 *
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07003215 * @hide
3216 */
Svetoslav683914b2015-01-15 14:22:26 -08003217 public static final Set<String> PUBLIC_SETTINGS = new ArraySet<>();
3218 static {
3219 PUBLIC_SETTINGS.add(END_BUTTON_BEHAVIOR);
3220 PUBLIC_SETTINGS.add(WIFI_USE_STATIC_IP);
3221 PUBLIC_SETTINGS.add(WIFI_STATIC_IP);
3222 PUBLIC_SETTINGS.add(WIFI_STATIC_GATEWAY);
3223 PUBLIC_SETTINGS.add(WIFI_STATIC_NETMASK);
3224 PUBLIC_SETTINGS.add(WIFI_STATIC_DNS1);
3225 PUBLIC_SETTINGS.add(WIFI_STATIC_DNS2);
3226 PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY);
3227 PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY_TIMEOUT);
3228 PUBLIC_SETTINGS.add(NEXT_ALARM_FORMATTED);
3229 PUBLIC_SETTINGS.add(FONT_SCALE);
3230 PUBLIC_SETTINGS.add(DIM_SCREEN);
3231 PUBLIC_SETTINGS.add(SCREEN_OFF_TIMEOUT);
3232 PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS);
3233 PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_MODE);
3234 PUBLIC_SETTINGS.add(MODE_RINGER_STREAMS_AFFECTED);
3235 PUBLIC_SETTINGS.add(MUTE_STREAMS_AFFECTED);
3236 PUBLIC_SETTINGS.add(VIBRATE_ON);
3237 PUBLIC_SETTINGS.add(VOLUME_RING);
3238 PUBLIC_SETTINGS.add(VOLUME_SYSTEM);
3239 PUBLIC_SETTINGS.add(VOLUME_VOICE);
3240 PUBLIC_SETTINGS.add(VOLUME_MUSIC);
3241 PUBLIC_SETTINGS.add(VOLUME_ALARM);
3242 PUBLIC_SETTINGS.add(VOLUME_NOTIFICATION);
3243 PUBLIC_SETTINGS.add(VOLUME_BLUETOOTH_SCO);
3244 PUBLIC_SETTINGS.add(RINGTONE);
3245 PUBLIC_SETTINGS.add(NOTIFICATION_SOUND);
3246 PUBLIC_SETTINGS.add(ALARM_ALERT);
3247 PUBLIC_SETTINGS.add(TEXT_AUTO_REPLACE);
3248 PUBLIC_SETTINGS.add(TEXT_AUTO_CAPS);
3249 PUBLIC_SETTINGS.add(TEXT_AUTO_PUNCTUATE);
3250 PUBLIC_SETTINGS.add(TEXT_SHOW_PASSWORD);
3251 PUBLIC_SETTINGS.add(SHOW_GTALK_SERVICE_STATUS);
3252 PUBLIC_SETTINGS.add(WALLPAPER_ACTIVITY);
3253 PUBLIC_SETTINGS.add(TIME_12_24);
3254 PUBLIC_SETTINGS.add(DATE_FORMAT);
3255 PUBLIC_SETTINGS.add(SETUP_WIZARD_HAS_RUN);
3256 PUBLIC_SETTINGS.add(ACCELEROMETER_ROTATION);
3257 PUBLIC_SETTINGS.add(USER_ROTATION);
3258 PUBLIC_SETTINGS.add(DTMF_TONE_WHEN_DIALING);
3259 PUBLIC_SETTINGS.add(SOUND_EFFECTS_ENABLED);
3260 PUBLIC_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED);
3261 PUBLIC_SETTINGS.add(SHOW_WEB_SUGGESTIONS);
3262 }
3263
3264 /**
3265 * These are all hidden system settings.
3266 *
3267 * @hide
3268 */
3269 public static final Set<String> PRIVATE_SETTINGS = new ArraySet<>();
3270 static {
3271 PRIVATE_SETTINGS.add(WIFI_USE_STATIC_IP);
3272 PRIVATE_SETTINGS.add(END_BUTTON_BEHAVIOR);
3273 PRIVATE_SETTINGS.add(ADVANCED_SETTINGS);
3274 PRIVATE_SETTINGS.add(SCREEN_AUTO_BRIGHTNESS_ADJ);
3275 PRIVATE_SETTINGS.add(VIBRATE_INPUT_DEVICES);
3276 PRIVATE_SETTINGS.add(VOLUME_MASTER);
3277 PRIVATE_SETTINGS.add(VOLUME_MASTER_MUTE);
3278 PRIVATE_SETTINGS.add(MICROPHONE_MUTE);
3279 PRIVATE_SETTINGS.add(NOTIFICATIONS_USE_RING_VOLUME);
3280 PRIVATE_SETTINGS.add(VIBRATE_IN_SILENT);
3281 PRIVATE_SETTINGS.add(MEDIA_BUTTON_RECEIVER);
3282 PRIVATE_SETTINGS.add(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY);
3283 PRIVATE_SETTINGS.add(VIBRATE_WHEN_RINGING);
3284 PRIVATE_SETTINGS.add(DTMF_TONE_TYPE_WHEN_DIALING);
3285 PRIVATE_SETTINGS.add(HEARING_AID);
3286 PRIVATE_SETTINGS.add(TTY_MODE);
3287 PRIVATE_SETTINGS.add(NOTIFICATION_LIGHT_PULSE);
3288 PRIVATE_SETTINGS.add(POINTER_LOCATION);
3289 PRIVATE_SETTINGS.add(SHOW_TOUCHES);
3290 PRIVATE_SETTINGS.add(WINDOW_ORIENTATION_LISTENER_LOG);
3291 PRIVATE_SETTINGS.add(POWER_SOUNDS_ENABLED);
3292 PRIVATE_SETTINGS.add(DOCK_SOUNDS_ENABLED);
3293 PRIVATE_SETTINGS.add(LOCKSCREEN_SOUNDS_ENABLED);
3294 PRIVATE_SETTINGS.add(LOCKSCREEN_DISABLED);
3295 PRIVATE_SETTINGS.add(LOW_BATTERY_SOUND);
3296 PRIVATE_SETTINGS.add(DESK_DOCK_SOUND);
3297 PRIVATE_SETTINGS.add(DESK_UNDOCK_SOUND);
3298 PRIVATE_SETTINGS.add(CAR_DOCK_SOUND);
3299 PRIVATE_SETTINGS.add(CAR_UNDOCK_SOUND);
3300 PRIVATE_SETTINGS.add(LOCK_SOUND);
3301 PRIVATE_SETTINGS.add(UNLOCK_SOUND);
3302 PRIVATE_SETTINGS.add(SIP_RECEIVE_CALLS);
3303 PRIVATE_SETTINGS.add(SIP_CALL_OPTIONS);
3304 PRIVATE_SETTINGS.add(SIP_ALWAYS);
3305 PRIVATE_SETTINGS.add(SIP_ADDRESS_ONLY);
3306 PRIVATE_SETTINGS.add(SIP_ASK_ME_EACH_TIME);
3307 PRIVATE_SETTINGS.add(POINTER_SPEED);
3308 PRIVATE_SETTINGS.add(LOCK_TO_APP_ENABLED);
3309 PRIVATE_SETTINGS.add(EGG_MODE);
3310 }
3311
3312 /**
Amith Yamasanib0ff3222015-03-04 09:56:14 -08003313 * These are all public system settings
Svetoslav683914b2015-01-15 14:22:26 -08003314 *
3315 * @hide
3316 */
3317 public static final Map<String, Validator> VALIDATORS = new ArrayMap<>();
3318 static {
3319 VALIDATORS.put(END_BUTTON_BEHAVIOR,END_BUTTON_BEHAVIOR_VALIDATOR);
3320 VALIDATORS.put(WIFI_USE_STATIC_IP, WIFI_USE_STATIC_IP_VALIDATOR);
3321 VALIDATORS.put(BLUETOOTH_DISCOVERABILITY, BLUETOOTH_DISCOVERABILITY_VALIDATOR);
3322 VALIDATORS.put(BLUETOOTH_DISCOVERABILITY_TIMEOUT,
3323 BLUETOOTH_DISCOVERABILITY_TIMEOUT_VALIDATOR);
3324 VALIDATORS.put(NEXT_ALARM_FORMATTED, NEXT_ALARM_FORMATTED_VALIDATOR);
3325 VALIDATORS.put(FONT_SCALE, FONT_SCALE_VALIDATOR);
3326 VALIDATORS.put(DIM_SCREEN, DIM_SCREEN_VALIDATOR);
3327 VALIDATORS.put(SCREEN_OFF_TIMEOUT, SCREEN_OFF_TIMEOUT_VALIDATOR);
3328 VALIDATORS.put(SCREEN_BRIGHTNESS, SCREEN_BRIGHTNESS_VALIDATOR);
3329 VALIDATORS.put(SCREEN_BRIGHTNESS_MODE, SCREEN_BRIGHTNESS_MODE_VALIDATOR);
3330 VALIDATORS.put(MODE_RINGER_STREAMS_AFFECTED, MODE_RINGER_STREAMS_AFFECTED_VALIDATOR);
3331 VALIDATORS.put(MUTE_STREAMS_AFFECTED, MUTE_STREAMS_AFFECTED_VALIDATOR);
3332 VALIDATORS.put(VIBRATE_ON, VIBRATE_ON_VALIDATOR);
Svetoslav683914b2015-01-15 14:22:26 -08003333 VALIDATORS.put(RINGTONE, RINGTONE_VALIDATOR);
3334 VALIDATORS.put(NOTIFICATION_SOUND, NOTIFICATION_SOUND_VALIDATOR);
3335 VALIDATORS.put(ALARM_ALERT, ALARM_ALERT_VALIDATOR);
3336 VALIDATORS.put(TEXT_AUTO_REPLACE, TEXT_AUTO_REPLACE_VALIDATOR);
3337 VALIDATORS.put(TEXT_AUTO_CAPS, TEXT_AUTO_CAPS_VALIDATOR);
3338 VALIDATORS.put(TEXT_AUTO_PUNCTUATE, TEXT_AUTO_PUNCTUATE_VALIDATOR);
3339 VALIDATORS.put(TEXT_SHOW_PASSWORD, TEXT_SHOW_PASSWORD_VALIDATOR);
3340 VALIDATORS.put(SHOW_GTALK_SERVICE_STATUS, SHOW_GTALK_SERVICE_STATUS_VALIDATOR);
3341 VALIDATORS.put(WALLPAPER_ACTIVITY, WALLPAPER_ACTIVITY_VALIDATOR);
3342 VALIDATORS.put(TIME_12_24, TIME_12_24_VALIDATOR);
3343 VALIDATORS.put(DATE_FORMAT, DATE_FORMAT_VALIDATOR);
3344 VALIDATORS.put(SETUP_WIZARD_HAS_RUN, SETUP_WIZARD_HAS_RUN_VALIDATOR);
3345 VALIDATORS.put(ACCELEROMETER_ROTATION, ACCELEROMETER_ROTATION_VALIDATOR);
3346 VALIDATORS.put(USER_ROTATION, USER_ROTATION_VALIDATOR);
3347 VALIDATORS.put(DTMF_TONE_WHEN_DIALING, DTMF_TONE_WHEN_DIALING_VALIDATOR);
3348 VALIDATORS.put(SOUND_EFFECTS_ENABLED, SOUND_EFFECTS_ENABLED_VALIDATOR);
3349 VALIDATORS.put(HAPTIC_FEEDBACK_ENABLED, HAPTIC_FEEDBACK_ENABLED_VALIDATOR);
3350 VALIDATORS.put(SHOW_WEB_SUGGESTIONS, SHOW_WEB_SUGGESTIONS_VALIDATOR);
3351 VALIDATORS.put(WIFI_USE_STATIC_IP, WIFI_USE_STATIC_IP_VALIDATOR);
3352 VALIDATORS.put(END_BUTTON_BEHAVIOR, END_BUTTON_BEHAVIOR_VALIDATOR);
3353 VALIDATORS.put(ADVANCED_SETTINGS, ADVANCED_SETTINGS_VALIDATOR);
3354 VALIDATORS.put(SCREEN_AUTO_BRIGHTNESS_ADJ, SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR);
3355 VALIDATORS.put(VIBRATE_INPUT_DEVICES, VIBRATE_INPUT_DEVICES_VALIDATOR);
Svetoslav683914b2015-01-15 14:22:26 -08003356 VALIDATORS.put(VOLUME_MASTER_MUTE, VOLUME_MASTER_MUTE_VALIDATOR);
3357 VALIDATORS.put(MICROPHONE_MUTE, MICROPHONE_MUTE_VALIDATOR);
3358 VALIDATORS.put(NOTIFICATIONS_USE_RING_VOLUME, NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR);
3359 VALIDATORS.put(VIBRATE_IN_SILENT, VIBRATE_IN_SILENT_VALIDATOR);
3360 VALIDATORS.put(MEDIA_BUTTON_RECEIVER, MEDIA_BUTTON_RECEIVER_VALIDATOR);
3361 VALIDATORS.put(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY,
3362 HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY_VALIDATOR);
3363 VALIDATORS.put(VIBRATE_WHEN_RINGING, VIBRATE_WHEN_RINGING_VALIDATOR);
3364 VALIDATORS.put(DTMF_TONE_TYPE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING_VALIDATOR);
3365 VALIDATORS.put(HEARING_AID, HEARING_AID_VALIDATOR);
3366 VALIDATORS.put(TTY_MODE, TTY_MODE_VALIDATOR);
3367 VALIDATORS.put(NOTIFICATION_LIGHT_PULSE, NOTIFICATION_LIGHT_PULSE_VALIDATOR);
3368 VALIDATORS.put(POINTER_LOCATION, POINTER_LOCATION_VALIDATOR);
3369 VALIDATORS.put(SHOW_TOUCHES, SHOW_TOUCHES_VALIDATOR);
3370 VALIDATORS.put(WINDOW_ORIENTATION_LISTENER_LOG,
3371 WINDOW_ORIENTATION_LISTENER_LOG_VALIDATOR);
3372 VALIDATORS.put(LOCKSCREEN_SOUNDS_ENABLED, LOCKSCREEN_SOUNDS_ENABLED_VALIDATOR);
3373 VALIDATORS.put(LOCKSCREEN_DISABLED, LOCKSCREEN_DISABLED_VALIDATOR);
3374 VALIDATORS.put(SIP_RECEIVE_CALLS, SIP_RECEIVE_CALLS_VALIDATOR);
3375 VALIDATORS.put(SIP_CALL_OPTIONS, SIP_CALL_OPTIONS_VALIDATOR);
3376 VALIDATORS.put(SIP_ALWAYS, SIP_ALWAYS_VALIDATOR);
3377 VALIDATORS.put(SIP_ADDRESS_ONLY, SIP_ADDRESS_ONLY_VALIDATOR);
3378 VALIDATORS.put(SIP_ASK_ME_EACH_TIME, SIP_ASK_ME_EACH_TIME_VALIDATOR);
3379 VALIDATORS.put(POINTER_SPEED, POINTER_SPEED_VALIDATOR);
3380 VALIDATORS.put(LOCK_TO_APP_ENABLED, LOCK_TO_APP_ENABLED_VALIDATOR);
3381 VALIDATORS.put(EGG_MODE, EGG_MODE_VALIDATOR);
3382 VALIDATORS.put(WIFI_STATIC_IP, WIFI_STATIC_IP_VALIDATOR);
3383 VALIDATORS.put(WIFI_STATIC_GATEWAY, WIFI_STATIC_GATEWAY_VALIDATOR);
3384 VALIDATORS.put(WIFI_STATIC_NETMASK, WIFI_STATIC_NETMASK_VALIDATOR);
3385 VALIDATORS.put(WIFI_STATIC_DNS1, WIFI_STATIC_DNS1_VALIDATOR);
3386 VALIDATORS.put(WIFI_STATIC_DNS2, WIFI_STATIC_DNS2_VALIDATOR);
3387 }
3388
3389 /**
3390 * These entries are considered common between the personal and the managed profile,
3391 * since the managed profile doesn't get to change them.
3392 */
3393 private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>();
3394 static {
3395 CLONE_TO_MANAGED_PROFILE.add(DATE_FORMAT);
3396 CLONE_TO_MANAGED_PROFILE.add(HAPTIC_FEEDBACK_ENABLED);
3397 CLONE_TO_MANAGED_PROFILE.add(SOUND_EFFECTS_ENABLED);
3398 CLONE_TO_MANAGED_PROFILE.add(TEXT_SHOW_PASSWORD);
3399 CLONE_TO_MANAGED_PROFILE.add(TIME_12_24);
3400 }
3401
3402 /** @hide */
3403 public static void getCloneToManagedProfileSettings(Set<String> outKeySet) {
3404 outKeySet.addAll(CLONE_TO_MANAGED_PROFILE);
3405 }
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07003406
3407 /**
Sailesh Nepal1bd78762014-02-11 22:32:21 -08003408 * When to use Wi-Fi calling
3409 *
3410 * @see android.telephony.TelephonyManager.WifiCallingChoices
3411 * @hide
3412 */
3413 public static final String WHEN_TO_MAKE_WIFI_CALLS = "when_to_make_wifi_calls";
3414
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003415 // Settings moved to Settings.Secure
3416
3417 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003418 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003419 * instead
3420 */
3421 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003422 public static final String ADB_ENABLED = Global.ADB_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003423
3424 /**
3425 * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead
3426 */
3427 @Deprecated
3428 public static final String ANDROID_ID = Secure.ANDROID_ID;
3429
3430 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003431 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003432 */
3433 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003434 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003435
3436 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003437 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003438 */
3439 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003440 public static final String DATA_ROAMING = Global.DATA_ROAMING;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003441
3442 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003443 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003444 */
3445 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003446 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003447
3448 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07003449 * @deprecated Use {@link android.provider.Settings.Global#HTTP_PROXY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003450 */
3451 @Deprecated
Jeff Sharkey625239a2012-09-26 22:03:49 -07003452 public static final String HTTP_PROXY = Global.HTTP_PROXY;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003453
3454 /**
Christopher Tateaa036a22014-05-19 16:33:27 -07003455 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003456 */
3457 @Deprecated
Christopher Tateaa036a22014-05-19 16:33:27 -07003458 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003459
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003460 /**
3461 * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED}
3462 * instead
3463 */
3464 @Deprecated
3465 public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED;
3466
3467 /**
3468 * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead
3469 */
3470 @Deprecated
3471 public static final String LOGGING_ID = Secure.LOGGING_ID;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003472
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003473 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003474 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003475 */
3476 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003477 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003478
3479 /**
3480 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED}
3481 * instead
3482 */
3483 @Deprecated
3484 public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED;
3485
3486 /**
3487 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE}
3488 * instead
3489 */
3490 @Deprecated
3491 public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE;
3492
3493 /**
3494 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL}
3495 * instead
3496 */
3497 @Deprecated
3498 public static final String PARENTAL_CONTROL_REDIRECT_URL =
3499 Secure.PARENTAL_CONTROL_REDIRECT_URL;
3500
3501 /**
3502 * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead
3503 */
3504 @Deprecated
3505 public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME;
3506
3507 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003508 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003509 */
3510 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003511 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003512
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003513 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003514 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003515 */
3516 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003517 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003518
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003519 /**
3520 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003521 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003522 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003523 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003524 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 -08003525
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003526 /**
3527 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003528 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003529 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003530 @Deprecated
3531 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
Christopher Tate06efb532012-08-24 15:29:27 -07003532 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003533
3534 /**
3535 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003536 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003537 */
3538 @Deprecated
3539 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Christopher Tate06efb532012-08-24 15:29:27 -07003540 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003541
3542 /**
3543 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003544 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003545 */
3546 @Deprecated
3547 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
Christopher Tate06efb532012-08-24 15:29:27 -07003548 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003549
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003550 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003551 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003552 * instead
3553 */
3554 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003555 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 -08003556
3557 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003558 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003559 */
3560 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003561 public static final String WIFI_ON = Global.WIFI_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003562
3563 /**
3564 * @deprecated Use
3565 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE}
3566 * instead
3567 */
3568 @Deprecated
3569 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
3570 Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE;
3571
3572 /**
3573 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead
3574 */
3575 @Deprecated
3576 public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT;
3577
3578 /**
3579 * @deprecated Use
3580 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead
3581 */
3582 @Deprecated
3583 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
3584 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003585
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003586 /**
3587 * @deprecated Use
3588 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead
3589 */
3590 @Deprecated
3591 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
3592 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED;
3593
3594 /**
3595 * @deprecated Use
3596 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS}
3597 * instead
3598 */
3599 @Deprecated
3600 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
3601 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS;
3602
3603 /**
3604 * @deprecated Use
3605 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead
3606 */
3607 @Deprecated
3608 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
3609 Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT;
3610
3611 /**
3612 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS}
3613 * instead
3614 */
3615 @Deprecated
3616 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS;
3617
3618 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003619 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003620 */
3621 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003622 public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003623
3624 /**
3625 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead
3626 */
3627 @Deprecated
3628 public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT;
3629
3630 /**
3631 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS}
3632 * instead
3633 */
3634 @Deprecated
3635 public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS;
3636
3637 /**
3638 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS}
3639 * instead
3640 */
3641 @Deprecated
3642 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS =
3643 Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS;
3644 }
3645
3646 /**
3647 * Secure system settings, containing system preferences that applications
3648 * can read but are not allowed to write. These are for preferences that
3649 * the user must explicitly modify through the system UI or specialized
3650 * APIs for those values, not modified directly by applications.
3651 */
3652 public static final class Secure extends NameValueTable {
3653 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
3654
Dianne Hackborn139748f2012-09-24 11:36:57 -07003655 /**
3656 * The content:// style URL for this table
3657 */
3658 public static final Uri CONTENT_URI =
3659 Uri.parse("content://" + AUTHORITY + "/secure");
3660
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08003661 // Populated lazily, guarded by class object:
Dianne Hackborn139748f2012-09-24 11:36:57 -07003662 private static final NameValueCache sNameValueCache = new NameValueCache(
3663 SYS_PROP_SETTING_VERSION,
3664 CONTENT_URI,
3665 CALL_METHOD_GET_SECURE,
3666 CALL_METHOD_PUT_SECURE);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003667
Amith Yamasani52c489c2012-03-28 11:42:42 -07003668 private static ILockSettings sLockSettings = null;
3669
Amith Yamasani7ab8c4a2012-04-06 09:27:12 -07003670 private static boolean sIsSystemProcess;
Amith Yamasani52c489c2012-03-28 11:42:42 -07003671 private static final HashSet<String> MOVED_TO_LOCK_SETTINGS;
Christopher Tate06efb532012-08-24 15:29:27 -07003672 private static final HashSet<String> MOVED_TO_GLOBAL;
Amith Yamasani52c489c2012-03-28 11:42:42 -07003673 static {
3674 MOVED_TO_LOCK_SETTINGS = new HashSet<String>(3);
3675 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED);
3676 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE);
3677 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
Christopher Tate06efb532012-08-24 15:29:27 -07003678
3679 MOVED_TO_GLOBAL = new HashSet<String>();
3680 MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED);
3681 MOVED_TO_GLOBAL.add(Settings.Global.ASSISTED_GPS_ENABLED);
3682 MOVED_TO_GLOBAL.add(Settings.Global.BLUETOOTH_ON);
Christopher Tate58f41ec2013-01-11 15:40:36 -08003683 MOVED_TO_GLOBAL.add(Settings.Global.BUGREPORT_IN_POWER_MENU);
Christopher Tate06efb532012-08-24 15:29:27 -07003684 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_CELL_BROADCAST_SMS);
3685 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_ROAMING_MODE);
3686 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_SUBSCRIPTION_MODE);
3687 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE);
3688 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI);
3689 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ROAMING);
3690 MOVED_TO_GLOBAL.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED);
3691 MOVED_TO_GLOBAL.add(Settings.Global.DEVICE_PROVISIONED);
3692 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_DENSITY_FORCED);
3693 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_SIZE_FORCED);
3694 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE);
3695 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE);
Christopher Tate06efb532012-08-24 15:29:27 -07003696 MOVED_TO_GLOBAL.add(Settings.Global.MOBILE_DATA);
3697 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION);
3698 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_DELETE_AGE);
3699 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES);
3700 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE);
3701 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_ENABLED);
3702 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES);
3703 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_POLL_INTERVAL);
Christopher Tate06efb532012-08-24 15:29:27 -07003704 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_SAMPLE_ENABLED);
3705 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE);
3706 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION);
3707 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_DELETE_AGE);
3708 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES);
3709 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_ROTATE_AGE);
3710 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION);
3711 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE);
3712 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES);
3713 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE);
3714 MOVED_TO_GLOBAL.add(Settings.Global.NETWORK_PREFERENCE);
3715 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_DIFF);
3716 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING);
3717 MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER);
3718 MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT);
3719 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT);
3720 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS);
3721 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT);
3722 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS);
3723 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT);
3724 MOVED_TO_GLOBAL.add(Settings.Global.SAMPLING_PROFILER_MS);
3725 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL);
3726 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST);
3727 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL);
3728 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_APN);
3729 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_REQUIRED);
3730 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_SUPPORTED);
Christopher Tate06efb532012-08-24 15:29:27 -07003731 MOVED_TO_GLOBAL.add(Settings.Global.USB_MASS_STORAGE_ENABLED);
3732 MOVED_TO_GLOBAL.add(Settings.Global.USE_GOOGLE_MAIL);
Robert Greenwalt3ea0c992013-10-03 21:13:49 +00003733 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_COUNTRY_CODE);
Christopher Tate06efb532012-08-24 15:29:27 -07003734 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS);
3735 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FREQUENCY_BAND);
3736 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_IDLE_MS);
3737 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT);
3738 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS);
3739 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON);
3740 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY);
3741 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT);
3742 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON);
3743 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME);
3744 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SAVED_STATE);
3745 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS);
3746 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED);
vandwalle7c3606c2014-03-31 19:12:07 -07003747 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ENHANCED_AUTO_JOIN);
3748 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORK_SHOW_RSSI);
Christopher Tate06efb532012-08-24 15:29:27 -07003749 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_ON);
3750 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED);
Christopher Tate06efb532012-08-24 15:29:27 -07003751 MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON);
Christopher Tatec868b642012-09-12 17:41:04 -07003752 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_ENABLE);
3753 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT);
3754 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE);
3755 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS);
3756 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS);
3757 MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS);
Christopher Tate06efb532012-08-24 15:29:27 -07003758 MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL);
Jeff Sharkey625239a2012-09-26 22:03:49 -07003759 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD);
3760 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_THRESHOLD);
3761 MOVED_TO_GLOBAL.add(Settings.Global.SEND_ACTION_APP_ERROR);
3762 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_AGE_SECONDS);
3763 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_MAX_FILES);
3764 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_KB);
3765 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_PERCENT);
3766 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_RESERVE_PERCENT);
3767 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_TAG_PREFIX);
3768 MOVED_TO_GLOBAL.add(Settings.Global.ERROR_LOGCAT_PREFIX);
3769 MOVED_TO_GLOBAL.add(Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL);
3770 MOVED_TO_GLOBAL.add(Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD);
3771 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE);
3772 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES);
3773 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES);
3774 MOVED_TO_GLOBAL.add(Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS);
3775 MOVED_TO_GLOBAL.add(Settings.Global.CONNECTIVITY_CHANGE_DELAY);
3776 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED);
3777 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_SERVER);
3778 MOVED_TO_GLOBAL.add(Settings.Global.NSD_ON);
3779 MOVED_TO_GLOBAL.add(Settings.Global.SET_INSTALL_LOCATION);
3780 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_INSTALL_LOCATION);
3781 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY);
3782 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY);
3783 MOVED_TO_GLOBAL.add(Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT);
3784 MOVED_TO_GLOBAL.add(Settings.Global.HTTP_PROXY);
3785 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_HOST);
3786 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_PORT);
3787 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST);
3788 MOVED_TO_GLOBAL.add(Settings.Global.SET_GLOBAL_HTTP_PROXY);
3789 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER);
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07003790 MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE);
Hui Shu22671772014-10-01 21:41:07 +00003791 MOVED_TO_GLOBAL.add(Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY);
Christopher Tate06efb532012-08-24 15:29:27 -07003792 }
3793
Christopher Tate66488d62012-10-02 11:58:01 -07003794 /** @hide */
Svetoslav683914b2015-01-15 14:22:26 -08003795 public static void getMovedToGlobalSettings(Set<String> outKeySet) {
Christopher Tate66488d62012-10-02 11:58:01 -07003796 outKeySet.addAll(MOVED_TO_GLOBAL);
3797 }
3798
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003799 /**
3800 * Look up a name in the database.
3801 * @param resolver to access the database with
3802 * @param name to look up in the table
3803 * @return the corresponding value, or null if not present
3804 */
Dianne Hackborn139748f2012-09-24 11:36:57 -07003805 public static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07003806 return getStringForUser(resolver, name, UserHandle.myUserId());
3807 }
3808
3809 /** @hide */
Dianne Hackborn139748f2012-09-24 11:36:57 -07003810 public static String getStringForUser(ContentResolver resolver, String name,
Christopher Tate06efb532012-08-24 15:29:27 -07003811 int userHandle) {
3812 if (MOVED_TO_GLOBAL.contains(name)) {
3813 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure"
3814 + " to android.provider.Settings.Global.");
3815 return Global.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003816 }
Amith Yamasani52c489c2012-03-28 11:42:42 -07003817
Dianne Hackborn139748f2012-09-24 11:36:57 -07003818 if (MOVED_TO_LOCK_SETTINGS.contains(name)) {
3819 synchronized (Secure.class) {
3820 if (sLockSettings == null) {
3821 sLockSettings = ILockSettings.Stub.asInterface(
3822 (IBinder) ServiceManager.getService("lock_settings"));
3823 sIsSystemProcess = Process.myUid() == Process.SYSTEM_UID;
3824 }
3825 }
3826 if (sLockSettings != null && !sIsSystemProcess) {
3827 try {
3828 return sLockSettings.getString(name, "0", userHandle);
3829 } catch (RemoteException re) {
3830 // Fall through
3831 }
Amith Yamasani52c489c2012-03-28 11:42:42 -07003832 }
3833 }
3834
Christopher Tate06efb532012-08-24 15:29:27 -07003835 return sNameValueCache.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003836 }
3837
3838 /**
3839 * Store a name/value pair into the database.
3840 * @param resolver to access the database with
3841 * @param name to store
3842 * @param value to associate with the name
3843 * @return true if the value was set, false on database errors
3844 */
Christopher Tate06efb532012-08-24 15:29:27 -07003845 public static boolean putString(ContentResolver resolver, String name, String value) {
3846 return putStringForUser(resolver, name, value, UserHandle.myUserId());
3847 }
3848
3849 /** @hide */
3850 public static boolean putStringForUser(ContentResolver resolver, String name, String value,
3851 int userHandle) {
Julia Reynolds82735bc2014-09-04 16:43:30 -04003852 if (LOCATION_MODE.equals(name)) {
3853 // HACK ALERT: temporary hack to work around b/10491283.
3854 // TODO: once b/10491283 fixed, remove this hack
3855 return setLocationModeForUser(resolver, Integer.parseInt(value), userHandle);
3856 }
Christopher Tate06efb532012-08-24 15:29:27 -07003857 if (MOVED_TO_GLOBAL.contains(name)) {
3858 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
3859 + " to android.provider.Settings.Global");
3860 return Global.putStringForUser(resolver, name, value, userHandle);
3861 }
Christopher Tate06efb532012-08-24 15:29:27 -07003862 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003863 }
3864
3865 /**
3866 * Construct the content URI for a particular name/value pair,
3867 * useful for monitoring changes with a ContentObserver.
3868 * @param name to look up in the table
3869 * @return the corresponding content URI, or null if not present
3870 */
3871 public static Uri getUriFor(String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07003872 if (MOVED_TO_GLOBAL.contains(name)) {
3873 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure"
3874 + " to android.provider.Settings.Global, returning global URI.");
3875 return Global.getUriFor(Global.CONTENT_URI, name);
3876 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003877 return getUriFor(CONTENT_URI, name);
3878 }
3879
3880 /**
3881 * Convenience function for retrieving a single secure settings value
3882 * as an integer. Note that internally setting values are always
3883 * stored as strings; this function converts the string to an integer
3884 * for you. The default value will be returned if the setting is
3885 * not defined or not an integer.
3886 *
3887 * @param cr The ContentResolver to access.
3888 * @param name The name of the setting to retrieve.
3889 * @param def Value to return if the setting is not defined.
3890 *
3891 * @return The setting's current value, or 'def' if it is not defined
3892 * or not a valid integer.
3893 */
3894 public static int getInt(ContentResolver cr, String name, int def) {
Christopher Tate06efb532012-08-24 15:29:27 -07003895 return getIntForUser(cr, name, def, UserHandle.myUserId());
3896 }
3897
3898 /** @hide */
3899 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
Tom O'Neill7f6f4572013-08-27 10:53:15 -07003900 if (LOCATION_MODE.equals(name)) {
3901 // HACK ALERT: temporary hack to work around b/10491283.
3902 // TODO: once b/10491283 fixed, remove this hack
3903 return getLocationModeForUser(cr, userHandle);
3904 }
Christopher Tate06efb532012-08-24 15:29:27 -07003905 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003906 try {
3907 return v != null ? Integer.parseInt(v) : def;
3908 } catch (NumberFormatException e) {
3909 return def;
3910 }
3911 }
3912
3913 /**
3914 * Convenience function for retrieving a single secure settings value
3915 * as an integer. Note that internally setting values are always
3916 * stored as strings; this function converts the string to an integer
3917 * for you.
3918 * <p>
3919 * This version does not take a default value. If the setting has not
3920 * been set, or the string value is not a number,
3921 * it throws {@link SettingNotFoundException}.
3922 *
3923 * @param cr The ContentResolver to access.
3924 * @param name The name of the setting to retrieve.
3925 *
3926 * @throws SettingNotFoundException Thrown if a setting by the given
3927 * name can't be found or the setting value is not an integer.
3928 *
3929 * @return The setting's current value.
3930 */
3931 public static int getInt(ContentResolver cr, String name)
3932 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07003933 return getIntForUser(cr, name, UserHandle.myUserId());
3934 }
3935
3936 /** @hide */
3937 public static int getIntForUser(ContentResolver cr, String name, int userHandle)
3938 throws SettingNotFoundException {
Tom O'Neill7f6f4572013-08-27 10:53:15 -07003939 if (LOCATION_MODE.equals(name)) {
3940 // HACK ALERT: temporary hack to work around b/10491283.
3941 // TODO: once b/10491283 fixed, remove this hack
3942 return getLocationModeForUser(cr, userHandle);
3943 }
Christopher Tate06efb532012-08-24 15:29:27 -07003944 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003945 try {
3946 return Integer.parseInt(v);
3947 } catch (NumberFormatException e) {
3948 throw new SettingNotFoundException(name);
3949 }
3950 }
3951
3952 /**
3953 * Convenience function for updating a single settings value as an
3954 * integer. This will either create a new entry in the table if the
3955 * given name does not exist, or modify the value of the existing row
3956 * with that name. Note that internally setting values are always
3957 * stored as strings, so this function converts the given value to a
3958 * string before storing it.
3959 *
3960 * @param cr The ContentResolver to access.
3961 * @param name The name of the setting to modify.
3962 * @param value The new value for the setting.
3963 * @return true if the value was set, false on database errors
3964 */
3965 public static boolean putInt(ContentResolver cr, String name, int value) {
Christopher Tate06efb532012-08-24 15:29:27 -07003966 return putIntForUser(cr, name, value, UserHandle.myUserId());
3967 }
3968
3969 /** @hide */
3970 public static boolean putIntForUser(ContentResolver cr, String name, int value,
3971 int userHandle) {
3972 return putStringForUser(cr, name, Integer.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003973 }
3974
3975 /**
3976 * Convenience function for retrieving a single secure settings value
3977 * as a {@code long}. Note that internally setting values are always
3978 * stored as strings; this function converts the string to a {@code long}
3979 * for you. The default value will be returned if the setting is
3980 * not defined or not a {@code long}.
3981 *
3982 * @param cr The ContentResolver to access.
3983 * @param name The name of the setting to retrieve.
3984 * @param def Value to return if the setting is not defined.
3985 *
3986 * @return The setting's current value, or 'def' if it is not defined
3987 * or not a valid {@code long}.
3988 */
3989 public static long getLong(ContentResolver cr, String name, long def) {
Christopher Tate06efb532012-08-24 15:29:27 -07003990 return getLongForUser(cr, name, def, UserHandle.myUserId());
3991 }
3992
3993 /** @hide */
3994 public static long getLongForUser(ContentResolver cr, String name, long def,
3995 int userHandle) {
3996 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003997 long value;
3998 try {
3999 value = valString != null ? Long.parseLong(valString) : def;
4000 } catch (NumberFormatException e) {
4001 value = def;
4002 }
4003 return value;
4004 }
4005
4006 /**
4007 * Convenience function for retrieving a single secure settings value
4008 * as a {@code long}. Note that internally setting values are always
4009 * stored as strings; this function converts the string to a {@code long}
4010 * for you.
4011 * <p>
4012 * This version does not take a default value. If the setting has not
4013 * been set, or the string value is not a number,
4014 * it throws {@link SettingNotFoundException}.
4015 *
4016 * @param cr The ContentResolver to access.
4017 * @param name The name of the setting to retrieve.
4018 *
4019 * @return The setting's current value.
4020 * @throws SettingNotFoundException Thrown if a setting by the given
4021 * name can't be found or the setting value is not an integer.
4022 */
4023 public static long getLong(ContentResolver cr, String name)
4024 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07004025 return getLongForUser(cr, name, UserHandle.myUserId());
4026 }
4027
4028 /** @hide */
4029 public static long getLongForUser(ContentResolver cr, String name, int userHandle)
4030 throws SettingNotFoundException {
4031 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004032 try {
4033 return Long.parseLong(valString);
4034 } catch (NumberFormatException e) {
4035 throw new SettingNotFoundException(name);
4036 }
4037 }
4038
4039 /**
4040 * Convenience function for updating a secure settings value as a long
4041 * integer. This will either create a new entry in the table if the
4042 * given name does not exist, or modify the value of the existing row
4043 * with that name. Note that internally setting values are always
4044 * stored as strings, so this function converts the given value to a
4045 * string before storing it.
4046 *
4047 * @param cr The ContentResolver to access.
4048 * @param name The name of the setting to modify.
4049 * @param value The new value for the setting.
4050 * @return true if the value was set, false on database errors
4051 */
4052 public static boolean putLong(ContentResolver cr, String name, long value) {
Christopher Tate06efb532012-08-24 15:29:27 -07004053 return putLongForUser(cr, name, value, UserHandle.myUserId());
4054 }
4055
4056 /** @hide */
4057 public static boolean putLongForUser(ContentResolver cr, String name, long value,
4058 int userHandle) {
4059 return putStringForUser(cr, name, Long.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004060 }
4061
4062 /**
4063 * Convenience function for retrieving a single secure settings value
4064 * as a floating point number. Note that internally setting values are
4065 * always stored as strings; this function converts the string to an
4066 * float for you. The default value will be returned if the setting
4067 * is not defined or not a valid float.
4068 *
4069 * @param cr The ContentResolver to access.
4070 * @param name The name of the setting to retrieve.
4071 * @param def Value to return if the setting is not defined.
4072 *
4073 * @return The setting's current value, or 'def' if it is not defined
4074 * or not a valid float.
4075 */
4076 public static float getFloat(ContentResolver cr, String name, float def) {
Christopher Tate06efb532012-08-24 15:29:27 -07004077 return getFloatForUser(cr, name, def, UserHandle.myUserId());
4078 }
4079
4080 /** @hide */
4081 public static float getFloatForUser(ContentResolver cr, String name, float def,
4082 int userHandle) {
4083 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004084 try {
4085 return v != null ? Float.parseFloat(v) : def;
4086 } catch (NumberFormatException e) {
4087 return def;
4088 }
4089 }
4090
4091 /**
4092 * Convenience function for retrieving a single secure settings value
4093 * as a float. Note that internally setting values are always
4094 * stored as strings; this function converts the string to a float
4095 * for you.
4096 * <p>
4097 * This version does not take a default value. If the setting has not
4098 * been set, or the string value is not a number,
4099 * it throws {@link SettingNotFoundException}.
4100 *
4101 * @param cr The ContentResolver to access.
4102 * @param name The name of the setting to retrieve.
4103 *
4104 * @throws SettingNotFoundException Thrown if a setting by the given
4105 * name can't be found or the setting value is not a float.
4106 *
4107 * @return The setting's current value.
4108 */
4109 public static float getFloat(ContentResolver cr, String name)
4110 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07004111 return getFloatForUser(cr, name, UserHandle.myUserId());
4112 }
4113
4114 /** @hide */
4115 public static float getFloatForUser(ContentResolver cr, String name, int userHandle)
4116 throws SettingNotFoundException {
4117 String v = getStringForUser(cr, name, userHandle);
Brian Muramatsue1d46982010-12-06 17:34:20 -08004118 if (v == null) {
4119 throw new SettingNotFoundException(name);
4120 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004121 try {
4122 return Float.parseFloat(v);
4123 } catch (NumberFormatException e) {
4124 throw new SettingNotFoundException(name);
4125 }
4126 }
4127
4128 /**
4129 * Convenience function for updating a single settings value as a
4130 * floating point number. This will either create a new entry in the
4131 * table if the given name does not exist, or modify the value of the
4132 * existing row with that name. Note that internally setting values
4133 * are always stored as strings, so this function converts the given
4134 * value to a string before storing it.
4135 *
4136 * @param cr The ContentResolver to access.
4137 * @param name The name of the setting to modify.
4138 * @param value The new value for the setting.
4139 * @return true if the value was set, false on database errors
4140 */
4141 public static boolean putFloat(ContentResolver cr, String name, float value) {
Christopher Tate06efb532012-08-24 15:29:27 -07004142 return putFloatForUser(cr, name, value, UserHandle.myUserId());
4143 }
4144
4145 /** @hide */
4146 public static boolean putFloatForUser(ContentResolver cr, String name, float value,
4147 int userHandle) {
4148 return putStringForUser(cr, name, Float.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004149 }
4150
4151 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004152 * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED}
4153 * instead
Dianne Hackborn895f99e2012-02-02 11:49:12 -08004154 */
Christopher Tate06efb532012-08-24 15:29:27 -07004155 @Deprecated
4156 public static final String DEVELOPMENT_SETTINGS_ENABLED =
4157 Global.DEVELOPMENT_SETTINGS_ENABLED;
Dianne Hackborn895f99e2012-02-02 11:49:12 -08004158
4159 /**
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07004160 * When the user has enable the option to have a "bug report" command
4161 * in the power menu.
Christopher Tate58f41ec2013-01-11 15:40:36 -08004162 * @deprecated Use {@link android.provider.Settings.Global#BUGREPORT_IN_POWER_MENU} instead
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07004163 * @hide
4164 */
Christopher Tate58f41ec2013-01-11 15:40:36 -08004165 @Deprecated
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07004166 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu";
4167
4168 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004169 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004170 */
Christopher Tate06efb532012-08-24 15:29:27 -07004171 @Deprecated
4172 public static final String ADB_ENABLED = Global.ADB_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004173
4174 /**
4175 * Setting to allow mock locations and location provider status to be injected into the
4176 * LocationManager service for testing purposes during application development. These
4177 * locations and status values override actual location and status information generated
4178 * by network, gps, or other location providers.
Svet Ganovf7e9cf42015-05-13 10:40:31 -07004179 *
4180 * @deprecated This settings is not used anymore.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004181 */
Svet Ganovf7e9cf42015-05-13 10:40:31 -07004182 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004183 public static final String ALLOW_MOCK_LOCATION = "mock_location";
4184
4185 /**
Doug Zongkerd8893db2010-01-26 12:29:44 -08004186 * A 64-bit number (as a hex string) that is randomly
Scott Main44895332013-11-12 09:23:13 -08004187 * generated when the user first sets up the device and should remain
4188 * constant for the lifetime of the user's device. The value may
4189 * change if a factory reset is performed on the device.
4190 * <p class="note"><strong>Note:</strong> When a device has <a
4191 * href="{@docRoot}about/versions/android-4.2.html#MultipleUsers">multiple users</a>
4192 * (available on certain devices running Android 4.2 or higher), each user appears as a
4193 * completely separate device, so the {@code ANDROID_ID} value is unique to each
4194 * user.</p>
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004195 */
4196 public static final String ANDROID_ID = "android_id";
4197
4198 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004199 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004200 */
Christopher Tate06efb532012-08-24 15:29:27 -07004201 @Deprecated
4202 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004203
4204 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004205 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004206 */
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07004207 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07004208 public static final String DATA_ROAMING = Global.DATA_ROAMING;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004209
4210 /**
4211 * Setting to record the input method used by default, holding the ID
4212 * of the desired method.
4213 */
4214 public static final String DEFAULT_INPUT_METHOD = "default_input_method";
4215
4216 /**
satokab751aa2010-09-14 19:17:36 +09004217 * Setting to record the input method subtype used by default, holding the ID
4218 * of the desired method.
4219 */
4220 public static final String SELECTED_INPUT_METHOD_SUBTYPE =
4221 "selected_input_method_subtype";
4222
4223 /**
satok723a27e2010-11-11 14:58:11 +09004224 * Setting to record the history of input method subtype, holding the pair of ID of IME
4225 * and its last used subtype.
4226 * @hide
4227 */
4228 public static final String INPUT_METHODS_SUBTYPE_HISTORY =
4229 "input_methods_subtype_history";
4230
4231 /**
satok5c58dfc2010-12-14 21:54:47 +09004232 * Setting to record the visibility of input method selector
4233 */
4234 public static final String INPUT_METHOD_SELECTOR_VISIBILITY =
4235 "input_method_selector_visibility";
4236
4237 /**
Dianne Hackborn91097de2014-04-04 18:02:06 -07004238 * The currently selected voice interaction service flattened ComponentName.
4239 * @hide
4240 */
4241 public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service";
4242
4243 /**
Zhihai Xuaf5971e2013-06-10 20:28:31 -07004244 * bluetooth HCI snoop log configuration
4245 * @hide
4246 */
4247 public static final String BLUETOOTH_HCI_LOG =
4248 "bluetooth_hci_log";
4249
4250 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004251 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004252 */
Christopher Tate06efb532012-08-24 15:29:27 -07004253 @Deprecated
4254 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004255
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004256 /**
Russell Brennerde6ae442012-09-26 20:53:10 -07004257 * Whether the current user has been set up via setup wizard (0 = false, 1 = true)
4258 * @hide
4259 */
4260 public static final String USER_SETUP_COMPLETE = "user_setup_complete";
4261
4262 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004263 * List of input methods that are currently enabled. This is a string
4264 * containing the IDs of all enabled input methods, each ID separated
4265 * by ':'.
4266 */
4267 public static final String ENABLED_INPUT_METHODS = "enabled_input_methods";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004268
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004269 /**
Amith Yamasanie861ec12010-03-24 21:39:27 -07004270 * List of system input methods that are currently disabled. This is a string
4271 * containing the IDs of all disabled input methods, each ID separated
4272 * by ':'.
4273 * @hide
4274 */
4275 public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods";
4276
4277 /**
Michael Wright7b5a96b2014-08-09 19:28:42 -07004278 * Whether to show the IME when a hard keyboard is connected. This is a boolean that
4279 * determines if the IME should be shown when a hard keyboard is attached.
4280 * @hide
4281 */
4282 public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard";
4283
4284 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07004285 * Host name and port for global http proxy. Uses ':' seperator for
4286 * between host and port.
4287 *
4288 * @deprecated Use {@link Global#HTTP_PROXY}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004289 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07004290 @Deprecated
4291 public static final String HTTP_PROXY = Global.HTTP_PROXY;
Robert Greenwalte90aa5e2010-09-01 11:34:05 -07004292
4293 /**
Christopher Tateaa036a22014-05-19 16:33:27 -07004294 * Whether applications can be installed for this user via the system's
4295 * {@link Intent#ACTION_INSTALL_PACKAGE} mechanism.
4296 *
4297 * <p>1 = permit app installation via the system package installer intent
4298 * <p>0 = do not allow use of the package installer
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004299 */
Christopher Tateaa036a22014-05-19 16:33:27 -07004300 public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004301
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004302 /**
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004303 * Comma-separated list of location providers that activities may access. Do not rely on
4304 * this value being present in settings.db or on ContentObserver notifications on the
4305 * corresponding Uri.
Tom O'Neilla324ac72013-08-26 14:40:23 -07004306 *
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004307 * @deprecated use {@link #LOCATION_MODE} and
4308 * {@link LocationManager#MODE_CHANGED_ACTION} (or
4309 * {@link LocationManager#PROVIDERS_CHANGED_ACTION})
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004310 */
Tom O'Neilla324ac72013-08-26 14:40:23 -07004311 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004312 public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004313
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004314 /**
Tom O'Neill7f6f4572013-08-27 10:53:15 -07004315 * The degree of location access enabled by the user.
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004316 * <p>
Tom O'Neill7f6f4572013-08-27 10:53:15 -07004317 * When used with {@link #putInt(ContentResolver, String, int)}, must be one of {@link
4318 * #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, {@link
4319 * #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. When used with {@link
4320 * #getInt(ContentResolver, String)}, the caller must gracefully handle additional location
4321 * modes that might be added in the future.
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004322 * <p>
4323 * Note: do not rely on this value being present in settings.db or on ContentObserver
4324 * notifications for the corresponding Uri. Use {@link LocationManager#MODE_CHANGED_ACTION}
4325 * to receive changes in this value.
Tom O'Neilla324ac72013-08-26 14:40:23 -07004326 */
4327 public static final String LOCATION_MODE = "location_mode";
4328
4329 /**
Tom O'Neill7f6f4572013-08-27 10:53:15 -07004330 * Location access disabled.
Tom O'Neill1f48b782013-08-19 18:14:56 -07004331 */
4332 public static final int LOCATION_MODE_OFF = 0;
4333 /**
4334 * Network Location Provider disabled, but GPS and other sensors enabled.
4335 */
4336 public static final int LOCATION_MODE_SENSORS_ONLY = 1;
4337 /**
Tom O'Neilld5759432013-09-11 11:03:03 -07004338 * Reduced power usage, such as limiting the number of GPS updates per hour. Requests
4339 * with {@link android.location.Criteria#POWER_HIGH} may be downgraded to
4340 * {@link android.location.Criteria#POWER_MEDIUM}.
Tom O'Neill1f48b782013-08-19 18:14:56 -07004341 */
4342 public static final int LOCATION_MODE_BATTERY_SAVING = 2;
4343 /**
4344 * Best-effort location computation allowed.
4345 */
4346 public static final int LOCATION_MODE_HIGH_ACCURACY = 3;
4347
4348 /**
Danielle Millett925a7d82012-03-19 18:02:20 -04004349 * A flag containing settings used for biometric weak
4350 * @hide
4351 */
Adrian Roos230635e2015-01-07 20:50:29 +01004352 @Deprecated
Danielle Millett925a7d82012-03-19 18:02:20 -04004353 public static final String LOCK_BIOMETRIC_WEAK_FLAGS =
4354 "lock_biometric_weak_flags";
4355
4356 /**
Jason Monk94cfd9d2014-10-31 13:18:21 -04004357 * Whether lock-to-app will lock the keyguard when exiting.
4358 * @hide
4359 */
4360 public static final String LOCK_TO_APP_EXIT_LOCKED = "lock_to_app_exit_locked";
4361
4362 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08004363 * Whether autolock is enabled (0 = false, 1 = true)
Adrian Roos9dd16eb2015-01-08 16:20:49 +01004364 *
4365 * @deprecated Use {@link android.app.KeyguardManager} to determine the state and security
4366 * level of the keyguard.
Amith Yamasani156c4352010-03-05 17:10:03 -08004367 */
Adrian Roos9dd16eb2015-01-08 16:20:49 +01004368 @Deprecated
Amith Yamasani156c4352010-03-05 17:10:03 -08004369 public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
4370
4371 /**
4372 * Whether lock pattern is visible as user enters (0 = false, 1 = true)
4373 */
4374 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
4375
4376 /**
Jeff Sharkey5ed9d682012-10-10 14:28:27 -07004377 * Whether lock pattern will vibrate as user enters (0 = false, 1 =
4378 * true)
4379 *
4380 * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the
4381 * lockscreen uses
4382 * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}.
Amith Yamasani156c4352010-03-05 17:10:03 -08004383 */
Jeff Sharkey5ed9d682012-10-10 14:28:27 -07004384 @Deprecated
4385 public static final String
4386 LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
Amith Yamasani156c4352010-03-05 17:10:03 -08004387
4388 /**
Jim Millerbc4603b2010-08-30 21:21:34 -07004389 * This preference allows the device to be locked given time after screen goes off,
4390 * subject to current DeviceAdmin policy limits.
4391 * @hide
4392 */
4393 public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout";
4394
4395
4396 /**
John Spurlock5f050e52012-10-27 10:44:19 -04004397 * This preference contains the string that shows for owner info on LockScreen.
Jim Miller253a5ef2010-10-13 20:57:29 -07004398 * @hide
Jim Miller187ec582013-04-15 18:27:54 -07004399 * @deprecated
Jim Miller253a5ef2010-10-13 20:57:29 -07004400 */
4401 public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info";
4402
4403 /**
John Spurlock5f050e52012-10-27 10:44:19 -04004404 * Ids of the user-selected appwidgets on the lockscreen (comma-delimited).
Jim Millerf229e4d2012-09-12 20:32:50 -07004405 * @hide
4406 */
Adrian Roos230635e2015-01-07 20:50:29 +01004407 @Deprecated
Michael Jurkaaa2859a2012-10-24 12:46:49 -07004408 public static final String LOCK_SCREEN_APPWIDGET_IDS =
4409 "lock_screen_appwidget_ids";
Jim Millerf229e4d2012-09-12 20:32:50 -07004410
4411 /**
Jim Miller51117262012-11-04 17:58:09 -08004412 * Id of the appwidget shown on the lock screen when appwidgets are disabled.
4413 * @hide
4414 */
Adrian Roos230635e2015-01-07 20:50:29 +01004415 @Deprecated
Jim Miller51117262012-11-04 17:58:09 -08004416 public static final String LOCK_SCREEN_FALLBACK_APPWIDGET_ID =
4417 "lock_screen_fallback_appwidget_id";
4418
4419 /**
John Spurlock5f050e52012-10-27 10:44:19 -04004420 * Index of the lockscreen appwidget to restore, -1 if none.
4421 * @hide
4422 */
Adrian Roos230635e2015-01-07 20:50:29 +01004423 @Deprecated
John Spurlock5f050e52012-10-27 10:44:19 -04004424 public static final String LOCK_SCREEN_STICKY_APPWIDGET =
4425 "lock_screen_sticky_appwidget";
4426
4427 /**
4428 * This preference enables showing the owner info on LockScreen.
Jim Miller253a5ef2010-10-13 20:57:29 -07004429 * @hide
Jim Miller187ec582013-04-15 18:27:54 -07004430 * @deprecated
Jim Miller253a5ef2010-10-13 20:57:29 -07004431 */
4432 public static final String LOCK_SCREEN_OWNER_INFO_ENABLED =
4433 "lock_screen_owner_info_enabled";
4434
4435 /**
Dan Sandler5d7c3cc2014-02-18 17:35:15 -05004436 * When set by a user, allows notifications to be shown atop a securely locked screen
4437 * in their full "private" form (same as when the device is unlocked).
Dan Sandlerfd16d562014-02-13 18:43:31 -08004438 * @hide
4439 */
4440 public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS =
4441 "lock_screen_allow_private_notifications";
4442
4443 /**
Chris Wrencd8f4f72014-08-27 18:48:13 -04004444 * Set by the system to track if the user needs to see the call to action for
4445 * the lockscreen notification policy.
4446 * @hide
4447 */
4448 public static final String SHOW_NOTE_ABOUT_NOTIFICATION_HIDING =
4449 "show_note_about_notification_hiding";
4450
4451 /**
Adrian Roos3870d452014-09-05 18:22:28 +02004452 * Set to 1 by the system after trust agents have been initialized.
4453 * @hide
4454 */
4455 public static final String TRUST_AGENTS_INITIALIZED =
4456 "trust_agents_initialized";
4457
4458 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004459 * The Logging ID (a unique 64-bit value) as a hex string.
4460 * Used as a pseudonymous identifier for logging.
4461 * @deprecated This identifier is poorly initialized and has
4462 * many collisions. It should not be used.
4463 */
4464 @Deprecated
4465 public static final String LOGGING_ID = "logging_id";
4466
4467 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004468 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004469 */
Christopher Tate06efb532012-08-24 15:29:27 -07004470 @Deprecated
4471 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004472
4473 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08004474 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004475 */
4476 public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004477
4478 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08004479 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004480 */
4481 public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004482
4483 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08004484 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004485 */
4486 public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004487
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004488 /**
4489 * Settings classname to launch when Settings is clicked from All
4490 * Applications. Needed because of user testing between the old
4491 * and new Settings apps.
4492 */
4493 // TODO: 881807
4494 public static final String SETTINGS_CLASSNAME = "settings_classname";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004495
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004496 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004497 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004498 */
Christopher Tate06efb532012-08-24 15:29:27 -07004499 @Deprecated
4500 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004501
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004502 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004503 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004504 */
Christopher Tate06efb532012-08-24 15:29:27 -07004505 @Deprecated
4506 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004507
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004508 /**
svetoslavganov75986cf2009-05-14 22:28:01 -07004509 * If accessibility is enabled.
4510 */
4511 public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled";
4512
4513 /**
Svetoslav Ganov00aabf72011-07-21 11:35:03 -07004514 * If touch exploration is enabled.
Svetoslav Ganov35bfede2011-07-14 17:57:06 -07004515 */
Svetoslav Ganov00aabf72011-07-21 11:35:03 -07004516 public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled";
Svetoslav Ganov35bfede2011-07-14 17:57:06 -07004517
4518 /**
svetoslavganov75986cf2009-05-14 22:28:01 -07004519 * List of the enabled accessibility providers.
4520 */
4521 public static final String ENABLED_ACCESSIBILITY_SERVICES =
4522 "enabled_accessibility_services";
4523
4524 /**
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07004525 * List of the accessibility services to which the user has granted
Svetoslav Ganov9a4c5cd2012-05-30 14:06:32 -07004526 * permission to put the device into touch exploration mode.
4527 *
4528 * @hide
4529 */
4530 public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES =
4531 "touch_exploration_granted_accessibility_services";
4532
4533 /**
Svetoslav Ganov55f937a2011-12-05 11:42:07 -08004534 * Whether to speak passwords while in accessibility mode.
4535 */
4536 public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
4537
4538 /**
Chris Craikcce47eb2014-07-16 15:12:15 -07004539 * Whether to draw text with high contrast while in accessibility mode.
4540 *
4541 * @hide
4542 */
4543 public static final String ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED =
4544 "high_text_contrast_enabled";
4545
4546 /**
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004547 * If injection of accessibility enhancing JavaScript screen-reader
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004548 * is enabled.
4549 * <p>
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004550 * Note: The JavaScript based screen-reader is served by the
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004551 * Google infrastructure and enable users with disabilities to
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07004552 * efficiently navigate in and explore web content.
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004553 * </p>
4554 * <p>
4555 * This property represents a boolean value.
4556 * </p>
4557 * @hide
4558 */
4559 public static final String ACCESSIBILITY_SCRIPT_INJECTION =
4560 "accessibility_script_injection";
4561
4562 /**
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004563 * The URL for the injected JavaScript based screen-reader used
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07004564 * for providing accessibility of content in WebView.
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004565 * <p>
4566 * Note: The JavaScript based screen-reader is served by the
4567 * Google infrastructure and enable users with disabilities to
4568 * efficiently navigate in and explore web content.
4569 * </p>
4570 * <p>
4571 * This property represents a string value.
4572 * </p>
4573 * @hide
4574 */
4575 public static final String ACCESSIBILITY_SCREEN_READER_URL =
4576 "accessibility_script_injection_url";
4577
4578 /**
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004579 * Key bindings for navigation in built-in accessibility support for web content.
4580 * <p>
4581 * Note: These key bindings are for the built-in accessibility navigation for
4582 * web content which is used as a fall back solution if JavaScript in a WebView
4583 * is not enabled or the user has not opted-in script injection from Google.
4584 * </p>
4585 * <p>
4586 * The bindings are separated by semi-colon. A binding is a mapping from
4587 * a key to a sequence of actions (for more details look at
4588 * android.webkit.AccessibilityInjector). A key is represented as the hexademical
4589 * string representation of an integer obtained from a meta state (optional) shifted
4590 * sixteen times left and bitwise ored with a key code. An action is represented
4591 * as a hexademical string representation of an integer where the first two digits
4592 * are navigation action index, the second, the third, and the fourth digit pairs
4593 * represent the action arguments. The separate actions in a binding are colon
4594 * separated. The key and the action sequence it maps to are separated by equals.
4595 * </p>
4596 * <p>
4597 * For example, the binding below maps the DPAD right button to traverse the
4598 * current navigation axis once without firing an accessibility event and to
4599 * perform the same traversal again but to fire an event:
4600 * <code>
4601 * 0x16=0x01000100:0x01000101;
4602 * </code>
4603 * </p>
4604 * <p>
4605 * The goal of this binding is to enable dynamic rebinding of keys to
4606 * navigation actions for web content without requiring a framework change.
4607 * </p>
4608 * <p>
4609 * This property represents a string value.
4610 * </p>
4611 * @hide
4612 */
4613 public static final String ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS =
4614 "accessibility_web_content_key_bindings";
4615
4616 /**
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -07004617 * Setting that specifies whether the display magnification is enabled.
4618 * Display magnifications allows the user to zoom in the display content
4619 * and is targeted to low vision users. The current magnification scale
4620 * is controlled by {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}.
4621 *
4622 * @hide
4623 */
4624 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED =
4625 "accessibility_display_magnification_enabled";
4626
4627 /**
4628 * Setting that specifies what the display magnification scale is.
4629 * Display magnifications allows the user to zoom in the display
4630 * content and is targeted to low vision users. Whether a display
4631 * magnification is performed is controlled by
4632 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED}
4633 *
4634 * @hide
4635 */
4636 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE =
4637 "accessibility_display_magnification_scale";
4638
4639 /**
4640 * Setting that specifies whether the display magnification should be
4641 * automatically updated. If this fearture is enabled the system will
4642 * exit magnification mode or pan the viewport when a context change
4643 * occurs. For example, on staring a new activity or rotating the screen,
4644 * the system may zoom out so the user can see the new context he is in.
4645 * Another example is on showing a window that is not visible in the
4646 * magnified viewport the system may pan the viewport to make the window
4647 * the has popped up so the user knows that the context has changed.
4648 * Whether a screen magnification is performed is controlled by
4649 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED}
4650 *
4651 * @hide
4652 */
4653 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE =
4654 "accessibility_display_magnification_auto_update";
4655
4656 /**
Alan Viveretteef793802013-07-23 14:15:28 -07004657 * Setting that specifies whether timed text (captions) should be
4658 * displayed in video content. Text display properties are controlled by
4659 * the following settings:
4660 * <ul>
4661 * <li>{@link #ACCESSIBILITY_CAPTIONING_LOCALE}
4662 * <li>{@link #ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR}
4663 * <li>{@link #ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR}
4664 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_COLOR}
4665 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_TYPE}
4666 * <li>{@link #ACCESSIBILITY_CAPTIONING_TYPEFACE}
Alan Viverette69ce69b2013-08-29 12:23:48 -07004667 * <li>{@link #ACCESSIBILITY_CAPTIONING_FONT_SCALE}
Alan Viveretteef793802013-07-23 14:15:28 -07004668 * </ul>
4669 *
4670 * @hide
4671 */
4672 public static final String ACCESSIBILITY_CAPTIONING_ENABLED =
4673 "accessibility_captioning_enabled";
4674
4675 /**
4676 * Setting that specifies the language for captions as a locale string,
4677 * e.g. en_US.
4678 *
4679 * @see java.util.Locale#toString
4680 * @hide
4681 */
4682 public static final String ACCESSIBILITY_CAPTIONING_LOCALE =
4683 "accessibility_captioning_locale";
4684
4685 /**
Alan Viverette43a1e3d2013-08-02 16:45:03 -07004686 * Integer property that specifies the preset style for captions, one
4687 * of:
4688 * <ul>
Alan Viverette69ce69b2013-08-29 12:23:48 -07004689 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESET_CUSTOM}
4690 * <li>a valid index of {@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESETS}
Alan Viverette43a1e3d2013-08-02 16:45:03 -07004691 * </ul>
4692 *
4693 * @see java.util.Locale#toString
4694 * @hide
4695 */
4696 public static final String ACCESSIBILITY_CAPTIONING_PRESET =
4697 "accessibility_captioning_preset";
4698
4699 /**
Alan Viveretteef793802013-07-23 14:15:28 -07004700 * Integer property that specifes the background color for captions as a
4701 * packed 32-bit color.
4702 *
4703 * @see android.graphics.Color#argb
4704 * @hide
4705 */
4706 public static final String ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR =
4707 "accessibility_captioning_background_color";
4708
4709 /**
4710 * Integer property that specifes the foreground color for captions as a
4711 * packed 32-bit color.
4712 *
4713 * @see android.graphics.Color#argb
4714 * @hide
4715 */
4716 public static final String ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR =
4717 "accessibility_captioning_foreground_color";
4718
4719 /**
4720 * Integer property that specifes the edge type for captions, one of:
4721 * <ul>
Alan Viverette69ce69b2013-08-29 12:23:48 -07004722 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_NONE}
4723 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE}
4724 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW}
Alan Viveretteef793802013-07-23 14:15:28 -07004725 * </ul>
4726 *
4727 * @see #ACCESSIBILITY_CAPTIONING_EDGE_COLOR
4728 * @hide
4729 */
4730 public static final String ACCESSIBILITY_CAPTIONING_EDGE_TYPE =
4731 "accessibility_captioning_edge_type";
4732
4733 /**
4734 * Integer property that specifes the edge color for captions as a
4735 * packed 32-bit color.
4736 *
4737 * @see #ACCESSIBILITY_CAPTIONING_EDGE_TYPE
4738 * @see android.graphics.Color#argb
4739 * @hide
4740 */
4741 public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR =
4742 "accessibility_captioning_edge_color";
4743
4744 /**
Alan Viverette55d70622013-12-11 15:22:14 -08004745 * Integer property that specifes the window color for captions as a
4746 * packed 32-bit color.
4747 *
4748 * @see android.graphics.Color#argb
4749 * @hide
4750 */
4751 public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR =
4752 "accessibility_captioning_window_color";
4753
4754 /**
Alan Viveretteef793802013-07-23 14:15:28 -07004755 * String property that specifies the typeface for captions, one of:
4756 * <ul>
4757 * <li>DEFAULT
4758 * <li>MONOSPACE
4759 * <li>SANS_SERIF
4760 * <li>SERIF
4761 * </ul>
4762 *
4763 * @see android.graphics.Typeface
4764 * @hide
4765 */
4766 public static final String ACCESSIBILITY_CAPTIONING_TYPEFACE =
4767 "accessibility_captioning_typeface";
4768
4769 /**
Alan Viverette69ce69b2013-08-29 12:23:48 -07004770 * Floating point property that specifies font scaling for captions.
Alan Viveretteef793802013-07-23 14:15:28 -07004771 *
4772 * @hide
4773 */
Alan Viverette69ce69b2013-08-29 12:23:48 -07004774 public static final String ACCESSIBILITY_CAPTIONING_FONT_SCALE =
4775 "accessibility_captioning_font_scale";
Alan Viveretteef793802013-07-23 14:15:28 -07004776
4777 /**
Alan Viverette410d4e32013-09-30 15:37:38 -07004778 * Setting that specifies whether display color inversion is enabled.
Alan Viverette410d4e32013-09-30 15:37:38 -07004779 */
4780 public static final String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED =
4781 "accessibility_display_inversion_enabled";
4782
4783 /**
Alan Viverette410d4e32013-09-30 15:37:38 -07004784 * Setting that specifies whether display color space adjustment is
4785 * enabled.
4786 *
4787 * @hide
4788 */
4789 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED =
4790 "accessibility_display_daltonizer_enabled";
4791
4792 /**
4793 * Integer property that specifies the type of color space adjustment to
4794 * perform. Valid values are defined in AccessibilityManager.
4795 *
4796 * @hide
4797 */
4798 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER =
4799 "accessibility_display_daltonizer";
4800
4801 /**
Svetoslav Ganov54d068e2011-03-02 12:58:40 -08004802 * The timout for considering a press to be a long press in milliseconds.
4803 * @hide
4804 */
4805 public static final String LONG_PRESS_TIMEOUT = "long_press_timeout";
4806
4807 /**
Svetoslav Ganov6bd20bc2013-09-02 15:24:45 -07004808 * List of the enabled print services.
Svetoslav Ganov4b9a4d12013-06-11 15:20:06 -07004809 * @hide
4810 */
4811 public static final String ENABLED_PRINT_SERVICES =
4812 "enabled_print_services";
4813
4814 /**
Svetoslav Ganov6bd20bc2013-09-02 15:24:45 -07004815 * List of the system print services we enabled on first boot. On
4816 * first boot we enable all system, i.e. bundled print services,
4817 * once, so they work out-of-the-box.
4818 * @hide
4819 */
4820 public static final String ENABLED_ON_FIRST_BOOT_SYSTEM_PRINT_SERVICES =
4821 "enabled_on_first_boot_system_print_services";
4822
4823 /**
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07004824 * Setting to always use the default text-to-speech settings regardless
4825 * of the application settings.
4826 * 1 = override application settings,
4827 * 0 = use application settings (if specified).
Narayan Kamath6d632962011-08-24 11:51:37 +01004828 *
4829 * @deprecated The value of this setting is no longer respected by
4830 * the framework text to speech APIs as of the Ice Cream Sandwich release.
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07004831 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004832 @Deprecated
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07004833 public static final String TTS_USE_DEFAULTS = "tts_use_defaults";
4834
4835 /**
4836 * Default text-to-speech engine speech rate. 100 = 1x
4837 */
4838 public static final String TTS_DEFAULT_RATE = "tts_default_rate";
4839
4840 /**
4841 * Default text-to-speech engine pitch. 100 = 1x
4842 */
4843 public static final String TTS_DEFAULT_PITCH = "tts_default_pitch";
4844
4845 /**
4846 * Default text-to-speech engine.
4847 */
4848 public static final String TTS_DEFAULT_SYNTH = "tts_default_synth";
4849
4850 /**
Jean-Michel Trivif4782672009-06-09 16:22:48 -07004851 * Default text-to-speech language.
Narayan Kamath6d632962011-08-24 11:51:37 +01004852 *
4853 * @deprecated this setting is no longer in use, as of the Ice Cream
4854 * Sandwich release. Apps should never need to read this setting directly,
4855 * instead can query the TextToSpeech framework classes for the default
4856 * locale. {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivif4782672009-06-09 16:22:48 -07004857 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004858 @Deprecated
Jean-Michel Trivif4782672009-06-09 16:22:48 -07004859 public static final String TTS_DEFAULT_LANG = "tts_default_lang";
4860
4861 /**
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004862 * Default text-to-speech country.
Narayan Kamath6d632962011-08-24 11:51:37 +01004863 *
4864 * @deprecated this setting is no longer in use, as of the Ice Cream
4865 * Sandwich release. Apps should never need to read this setting directly,
4866 * instead can query the TextToSpeech framework classes for the default
4867 * locale. {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004868 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004869 @Deprecated
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004870 public static final String TTS_DEFAULT_COUNTRY = "tts_default_country";
4871
4872 /**
4873 * Default text-to-speech locale variant.
Narayan Kamath6d632962011-08-24 11:51:37 +01004874 *
4875 * @deprecated this setting is no longer in use, as of the Ice Cream
4876 * Sandwich release. Apps should never need to read this setting directly,
4877 * instead can query the TextToSpeech framework classes for the
4878 * locale that is in use {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004879 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004880 @Deprecated
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004881 public static final String TTS_DEFAULT_VARIANT = "tts_default_variant";
4882
4883 /**
Narayan Kamathe5b8c4d2011-08-22 15:37:47 +01004884 * Stores the default tts locales on a per engine basis. Stored as
4885 * a comma seperated list of values, each value being of the form
4886 * {@code engine_name:locale} for example,
Narayan Kamath6d632962011-08-24 11:51:37 +01004887 * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This
4888 * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and
4889 * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this
4890 * setting directly, and can query the TextToSpeech framework classes
4891 * for the locale that is in use.
Narayan Kamathe5b8c4d2011-08-22 15:37:47 +01004892 *
4893 * @hide
4894 */
4895 public static final String TTS_DEFAULT_LOCALE = "tts_default_locale";
4896
4897 /**
Charles Chenceffa152010-03-16 21:18:10 -07004898 * Space delimited list of plugin packages that are enabled.
4899 */
4900 public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins";
4901
4902 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004903 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON}
4904 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004905 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004906 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004907 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004908 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004909
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004910 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004911 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY}
4912 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004913 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004914 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004915 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004916 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004917
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004918 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004919 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT}
4920 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004921 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004922 @Deprecated
4923 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT =
4924 Global.WIFI_NUM_OPEN_NETWORKS_KEPT;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004925
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004926 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004927 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON}
4928 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004929 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004930 @Deprecated
4931 public static final String WIFI_ON = Global.WIFI_ON;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004932
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004933 /**
4934 * The acceptable packet loss percentage (range 0 - 100) before trying
4935 * another AP on the same network.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004936 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004937 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004938 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004939 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
4940 "wifi_watchdog_acceptable_packet_loss_percentage";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004941
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004942 /**
4943 * The number of access points required for a network in order for the
4944 * watchdog to monitor it.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004945 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004946 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004947 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004948 public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004949
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004950 /**
4951 * The delay between background checks.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004952 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004953 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004954 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004955 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
4956 "wifi_watchdog_background_check_delay_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004957
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004958 /**
4959 * Whether the Wi-Fi watchdog is enabled for background checking even
4960 * after it thinks the user has connected to a good access point.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004961 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004962 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004963 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004964 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
4965 "wifi_watchdog_background_check_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004966
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004967 /**
4968 * The timeout for a background ping
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004969 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004970 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004971 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004972 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
4973 "wifi_watchdog_background_check_timeout_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004974
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004975 /**
4976 * The number of initial pings to perform that *may* be ignored if they
4977 * fail. Again, if these fail, they will *not* be used in packet loss
4978 * calculation. For example, one network always seemed to time out for
4979 * the first couple pings, so this is set to 3 by default.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004980 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004981 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004982 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004983 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
4984 "wifi_watchdog_initial_ignored_ping_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004985
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004986 /**
4987 * The maximum number of access points (per network) to attempt to test.
4988 * If this number is reached, the watchdog will no longer monitor the
4989 * initial connection state for the network. This is a safeguard for
4990 * networks containing multiple APs whose DNS does not respond to pings.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004991 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004992 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004993 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004994 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004995
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004996 /**
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07004997 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004998 */
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07004999 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005000 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
5001
5002 /**
5003 * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005004 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005005 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07005006 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005007 public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list";
5008
5009 /**
5010 * The number of pings to test if an access point is a good connection.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005011 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005012 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07005013 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005014 public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005015
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005016 /**
5017 * The delay between pings.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005018 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005019 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07005020 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005021 public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005022
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005023 /**
5024 * The timeout per ping.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005025 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005026 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07005027 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005028 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005029
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005030 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005031 * @deprecated Use
5032 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005033 */
Christopher Tate06efb532012-08-24 15:29:27 -07005034 @Deprecated
5035 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005036
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005037 /**
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005038 * @deprecated Use
5039 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005040 */
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07005041 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005042 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005043 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005044
5045 /**
Jeremy Joslin79294842014-12-03 17:15:28 -08005046 * The number of milliseconds to hold on to a PendingIntent based request. This delay gives
5047 * the receivers of the PendingIntent an opportunity to make a new network request before
5048 * the Network satisfying the request is potentially removed.
5049 *
5050 * @hide
5051 */
5052 public static final String CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS =
5053 "connectivity_release_pending_intent_delay_ms";
5054
5055 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07005056 * Whether background data usage is allowed.
5057 *
5058 * @deprecated As of {@link VERSION_CODES#ICE_CREAM_SANDWICH},
5059 * availability of background data depends on several
5060 * combined factors. When background data is unavailable,
5061 * {@link ConnectivityManager#getActiveNetworkInfo()} will
5062 * now appear disconnected.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005063 */
Jeff Sharkey3a844fc2011-08-16 14:37:57 -07005064 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005065 public static final String BACKGROUND_DATA = "background_data";
Wink Saville04e71b32009-04-02 11:00:54 -07005066
5067 /**
Bjorn Bringert98bfa392010-03-24 10:59:48 +00005068 * Origins for which browsers should allow geolocation by default.
5069 * The value is a space-separated list of origins.
5070 */
5071 public static final String ALLOWED_GEOLOCATION_ORIGINS
5072 = "allowed_geolocation_origins";
5073
5074 /**
Wink Savillee9b06d72009-05-18 21:47:50 -07005075 * The preferred TTY mode 0 = TTy Off, CDMA default
5076 * 1 = TTY Full
5077 * 2 = TTY HCO
5078 * 3 = TTY VCO
5079 * @hide
5080 */
5081 public static final String PREFERRED_TTY_MODE =
5082 "preferred_tty_mode";
5083
Wink Saville04e71b32009-04-02 11:00:54 -07005084 /**
Wink Saville04e71b32009-04-02 11:00:54 -07005085 * Whether the enhanced voice privacy mode is enabled.
5086 * 0 = normal voice privacy
5087 * 1 = enhanced voice privacy
5088 * @hide
5089 */
5090 public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled";
5091
5092 /**
5093 * Whether the TTY mode mode is enabled.
5094 * 0 = disabled
5095 * 1 = enabled
5096 * @hide
5097 */
5098 public static final String TTY_MODE_ENABLED = "tty_mode_enabled";
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005099
5100 /**
Christopher Tate8031a3d2009-07-06 16:36:05 -07005101 * Controls whether settings backup is enabled.
Dianne Hackborncf098292009-07-01 19:55:20 -07005102 * Type: int ( 0 = disabled, 1 = enabled )
5103 * @hide
5104 */
5105 public static final String BACKUP_ENABLED = "backup_enabled";
5106
5107 /**
Christopher Tatecce9da52010-02-03 15:11:15 -08005108 * Controls whether application data is automatically restored from backup
5109 * at install time.
5110 * Type: int ( 0 = disabled, 1 = enabled )
5111 * @hide
5112 */
5113 public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore";
5114
5115 /**
Christopher Tate8031a3d2009-07-06 16:36:05 -07005116 * Indicates whether settings backup has been fully provisioned.
5117 * Type: int ( 0 = unprovisioned, 1 = fully provisioned )
5118 * @hide
5119 */
5120 public static final String BACKUP_PROVISIONED = "backup_provisioned";
5121
5122 /**
Dianne Hackborncf098292009-07-01 19:55:20 -07005123 * Component of the transport to use for backup/restore.
5124 * @hide
5125 */
5126 public static final String BACKUP_TRANSPORT = "backup_transport";
Sanjay Jeyakumar21bf2412009-07-09 13:31:48 -07005127
Dianne Hackbornd7cd29d2009-07-01 11:22:45 -07005128 /**
5129 * Version for which the setup wizard was last shown. Bumped for
5130 * each release when there is new setup information to show.
5131 * @hide
5132 */
5133 public static final String LAST_SETUP_SHOWN = "last_setup_shown";
Dianne Hackborncf098292009-07-01 19:55:20 -07005134
5135 /**
Doug Zongker43866e02010-01-07 12:09:54 -08005136 * The interval in milliseconds after which Wi-Fi is considered idle.
5137 * When idle, it is possible for the device to be switched from Wi-Fi to
5138 * the mobile data network.
5139 * @hide
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005140 * @deprecated Use {@link android.provider.Settings.Global#WIFI_IDLE_MS}
5141 * instead.
Doug Zongker43866e02010-01-07 12:09:54 -08005142 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07005143 @Deprecated
5144 public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS;
Doug Zongker43866e02010-01-07 12:09:54 -08005145
5146 /**
Narayan Kamathee69ff42011-06-28 12:07:18 +01005147 * The global search provider chosen by the user (if multiple global
5148 * search providers are installed). This will be the provider returned
5149 * by {@link SearchManager#getGlobalSearchActivity()} if it's still
5150 * installed. This setting is stored as a flattened component name as
5151 * per {@link ComponentName#flattenToString()}.
5152 *
5153 * @hide
5154 */
5155 public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY =
5156 "search_global_search_activity";
5157
5158 /**
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08005159 * The number of promoted sources in GlobalSearch.
5160 * @hide
5161 */
5162 public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources";
5163 /**
5164 * The maximum number of suggestions returned by GlobalSearch.
5165 * @hide
5166 */
5167 public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display";
5168 /**
5169 * The number of suggestions GlobalSearch will ask each non-web search source for.
5170 * @hide
5171 */
5172 public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source";
5173 /**
5174 * The number of suggestions the GlobalSearch will ask the web search source for.
5175 * @hide
5176 */
5177 public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT =
5178 "search_web_results_override_limit";
5179 /**
5180 * The number of milliseconds that GlobalSearch will wait for suggestions from
5181 * promoted sources before continuing with all other sources.
5182 * @hide
5183 */
5184 public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS =
5185 "search_promoted_source_deadline_millis";
5186 /**
5187 * The number of milliseconds before GlobalSearch aborts search suggesiton queries.
5188 * @hide
5189 */
5190 public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis";
5191 /**
5192 * The maximum number of milliseconds that GlobalSearch shows the previous results
5193 * after receiving a new query.
5194 * @hide
5195 */
5196 public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis";
5197 /**
5198 * The maximum age of log data used for shortcuts in GlobalSearch.
5199 * @hide
5200 */
5201 public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis";
5202 /**
5203 * The maximum age of log data used for source ranking in GlobalSearch.
5204 * @hide
5205 */
5206 public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS =
5207 "search_max_source_event_age_millis";
5208 /**
5209 * The minimum number of impressions needed to rank a source in GlobalSearch.
5210 * @hide
5211 */
5212 public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING =
5213 "search_min_impressions_for_source_ranking";
5214 /**
5215 * The minimum number of clicks needed to rank a source in GlobalSearch.
5216 * @hide
5217 */
5218 public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING =
5219 "search_min_clicks_for_source_ranking";
5220 /**
5221 * The maximum number of shortcuts shown by GlobalSearch.
5222 * @hide
5223 */
5224 public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned";
5225 /**
5226 * The size of the core thread pool for suggestion queries in GlobalSearch.
5227 * @hide
5228 */
5229 public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE =
5230 "search_query_thread_core_pool_size";
5231 /**
5232 * The maximum size of the thread pool for suggestion queries in GlobalSearch.
5233 * @hide
5234 */
5235 public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE =
5236 "search_query_thread_max_pool_size";
5237 /**
5238 * The size of the core thread pool for shortcut refreshing in GlobalSearch.
5239 * @hide
5240 */
5241 public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE =
5242 "search_shortcut_refresh_core_pool_size";
5243 /**
5244 * The maximum size of the thread pool for shortcut refreshing in GlobalSearch.
5245 * @hide
5246 */
5247 public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE =
5248 "search_shortcut_refresh_max_pool_size";
5249 /**
5250 * The maximun time that excess threads in the GlobalSeach thread pools will
5251 * wait before terminating.
5252 * @hide
5253 */
5254 public static final String SEARCH_THREAD_KEEPALIVE_SECONDS =
5255 "search_thread_keepalive_seconds";
5256 /**
5257 * The maximum number of concurrent suggestion queries to each source.
5258 * @hide
5259 */
5260 public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT =
5261 "search_per_source_concurrent_query_limit";
5262
San Mehat87734d32010-01-08 12:53:06 -08005263 /**
5264 * Whether or not alert sounds are played on MountService events. (0 = false, 1 = true)
5265 * @hide
5266 */
5267 public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd";
5268
5269 /**
5270 * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true)
5271 * @hide
5272 */
5273 public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart";
5274
5275 /**
5276 * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true)
5277 * @hide
5278 */
5279 public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt";
5280
5281 /**
5282 * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true)
5283 * @hide
5284 */
5285 public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled";
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08005286
Dan Egnor42471dd2010-01-07 17:25:22 -08005287 /**
5288 * If nonzero, ANRs in invisible background processes bring up a dialog.
5289 * Otherwise, the process will be silently killed.
5290 * @hide
5291 */
5292 public static final String ANR_SHOW_BACKGROUND = "anr_show_background";
Erikeebc8e22010-02-18 13:27:19 -08005293
Mike LeBeau5d34e9b2010-02-10 19:34:56 -08005294 /**
5295 * The {@link ComponentName} string of the service to be used as the voice recognition
5296 * service.
Erikeebc8e22010-02-18 13:27:19 -08005297 *
Mike LeBeau5d34e9b2010-02-10 19:34:56 -08005298 * @hide
5299 */
5300 public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";
Dan Egnor42471dd2010-01-07 17:25:22 -08005301
William Luh623a4282013-06-24 12:14:18 -07005302 /**
5303 * Stores whether an user has consented to have apps verified through PAM.
5304 * The value is boolean (1 or 0).
5305 *
5306 * @hide
5307 */
5308 public static final String PACKAGE_VERIFIER_USER_CONSENT =
5309 "package_verifier_user_consent";
satok988323c2011-06-22 16:38:13 +09005310
5311 /**
satokada8c4e2011-08-23 14:56:56 +09005312 * The {@link ComponentName} string of the selected spell checker service which is
5313 * one of the services managed by the text service manager.
5314 *
5315 * @hide
5316 */
5317 public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker";
5318
5319 /**
5320 * The {@link ComponentName} string of the selected subtype of the selected spell checker
satok988323c2011-06-22 16:38:13 +09005321 * service which is one of the services managed by the text service manager.
5322 *
5323 * @hide
5324 */
satokada8c4e2011-08-23 14:56:56 +09005325 public static final String SELECTED_SPELL_CHECKER_SUBTYPE =
5326 "selected_spell_checker_subtype";
satok988323c2011-06-22 16:38:13 +09005327
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08005328 /**
satoka33c4fc2011-08-25 16:50:11 +09005329 * The {@link ComponentName} string whether spell checker is enabled or not.
5330 *
5331 * @hide
5332 */
5333 public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled";
5334
5335 /**
David Brown458e8062010-03-08 21:52:11 -08005336 * What happens when the user presses the Power button while in-call
5337 * and the screen is on.<br/>
5338 * <b>Values:</b><br/>
5339 * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/>
5340 * 2 - The Power button hangs up the current call.<br/>
5341 *
5342 * @hide
5343 */
5344 public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior";
5345
5346 /**
5347 * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen".
5348 * @hide
5349 */
5350 public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1;
5351
5352 /**
5353 * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up".
5354 * @hide
5355 */
5356 public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2;
5357
5358 /**
5359 * INCALL_POWER_BUTTON_BEHAVIOR default value.
5360 * @hide
5361 */
5362 public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT =
5363 INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF;
5364
5365 /**
Jeff Browna20dda42014-05-27 20:57:24 -07005366 * Whether the device should wake when the wake gesture sensor detects motion.
5367 * @hide
5368 */
5369 public static final String WAKE_GESTURE_ENABLED = "wake_gesture_enabled";
5370
5371 /**
John Spurlocka4215ce2014-08-04 14:50:38 -04005372 * Whether the device should doze if configured.
5373 * @hide
5374 */
5375 public static final String DOZE_ENABLED = "doze_enabled";
5376
5377 /**
Dianne Hackborn2ccda4d2010-03-22 21:49:15 -07005378 * The current night mode that has been selected by the user. Owned
5379 * and controlled by UiModeManagerService. Constants are as per
5380 * UiModeManager.
5381 * @hide
5382 */
5383 public static final String UI_NIGHT_MODE = "ui_night_mode";
Suchi Amalapurapu40e47252010-04-07 16:15:50 -07005384
5385 /**
John Spurlock1a868b72012-08-22 09:56:51 -04005386 * Whether screensavers are enabled.
Daniel Sandler0601eb72011-04-13 01:01:32 -04005387 * @hide
5388 */
Daniel Sandler2d545362011-11-17 10:38:37 -08005389 public static final String SCREENSAVER_ENABLED = "screensaver_enabled";
Daniel Sandler0601eb72011-04-13 01:01:32 -04005390
5391 /**
John Spurlock1a868b72012-08-22 09:56:51 -04005392 * The user's chosen screensaver components.
Daniel Sandler2d545362011-11-17 10:38:37 -08005393 *
John Spurlock1a868b72012-08-22 09:56:51 -04005394 * These will be launched by the PhoneWindowManager after a timeout when not on
Daniel Sandler2d545362011-11-17 10:38:37 -08005395 * battery, or upon dock insertion (if SCREENSAVER_ACTIVATE_ON_DOCK is set to 1).
Daniel Sandler0601eb72011-04-13 01:01:32 -04005396 * @hide
5397 */
John Spurlock1a868b72012-08-22 09:56:51 -04005398 public static final String SCREENSAVER_COMPONENTS = "screensaver_components";
Daniel Sandler2d545362011-11-17 10:38:37 -08005399
5400 /**
John Spurlock1a868b72012-08-22 09:56:51 -04005401 * If screensavers are enabled, whether the screensaver should be automatically launched
5402 * when the device is inserted into a (desk) dock.
Daniel Sandler2d545362011-11-17 10:38:37 -08005403 * @hide
5404 */
5405 public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock";
Daniel Sandler0601eb72011-04-13 01:01:32 -04005406
John Spurlock1a868b72012-08-22 09:56:51 -04005407 /**
5408 * If screensavers are enabled, whether the screensaver should be automatically launched
5409 * when the screen times out when not on battery.
5410 * @hide
5411 */
5412 public static final String SCREENSAVER_ACTIVATE_ON_SLEEP = "screensaver_activate_on_sleep";
5413
5414 /**
5415 * If screensavers are enabled, the default screensaver component.
5416 * @hide
5417 */
5418 public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component";
5419
Daniel Sandler0601eb72011-04-13 01:01:32 -04005420 /**
Martijn Coenena7397882013-07-30 20:07:47 -07005421 * The default NFC payment component
5422 * @hide
5423 */
5424 public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component";
5425
5426 /**
Martijn Coenen2f6f3a012014-04-25 17:00:21 -07005427 * Whether NFC payment is handled by the foreground application or a default.
5428 * @hide
5429 */
5430 public static final String NFC_PAYMENT_FOREGROUND = "nfc_payment_foreground";
5431
5432 /**
David Braunf5d83192013-09-16 13:43:51 -07005433 * Specifies the package name currently configured to be the primary sms application
5434 * @hide
5435 */
5436 public static final String SMS_DEFAULT_APPLICATION = "sms_default_application";
5437
5438 /**
Yorke Lee014de022015-04-21 17:15:47 -07005439 * Specifies the package name currently configured to be the default dialer application
5440 * @hide
5441 */
5442 public static final String DIALER_DEFAULT_APPLICATION = "dialer_default_application";
5443
5444 /**
Adrian Roos943eb862015-03-26 12:31:16 -07005445 * Specifies the package name currently configured to be the emergency assistance application
5446 *
5447 * @see android.telephony.TelephonyManager#ACTION_EMERGENCY_ASSISTANCE
5448 *
5449 * @hide
5450 */
5451 public static final String EMERGENCY_ASSISTANCE_APPLICATION = "emergency_assistance_application";
5452
5453 /**
Jorim Jaggi9d910832015-05-18 17:35:26 -07005454 * Specifies whether the current app context on scren (assist data) will be sent to the
5455 * assist application (active voice interaction service).
5456 *
5457 * @hide
5458 */
5459 public static final String ASSIST_STRUCTURE_ENABLED = "assist_structure_enabled";
5460
5461 /**
Jorim Jaggia133f0b2015-06-26 16:40:00 -07005462 * Specifies whether a screenshot of the screen contents will be sent to the assist
5463 * application (active voice interaction service).
5464 *
5465 * @hide
5466 */
5467 public static final String ASSIST_SCREENSHOT_ENABLED = "assist_screenshot_enabled";
5468
5469 /**
John Spurlock7c74f782015-06-04 13:01:42 -04005470 * Names of the service components that the current user has explicitly allowed to
Chris Wren8326a8a2014-10-22 14:13:32 -04005471 * see all of the user's notifications, separated by ':'.
Daniel Sandler4b749ef2013-03-18 21:53:04 -04005472 *
5473 * @hide
5474 */
5475 public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners";
5476
John Spurlock7340fc82014-04-24 18:50:12 -04005477 /**
John Spurlock7c74f782015-06-04 13:01:42 -04005478 * Names of the packages that the current user has explicitly allowed to
5479 * manage notification policy configuration, separated by ':'.
5480 *
5481 * @hide
5482 */
5483 public static final String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES =
5484 "enabled_notification_policy_access_packages";
5485
5486 /**
John Spurlock7340fc82014-04-24 18:50:12 -04005487 * @hide
5488 */
5489 public static final String ENABLED_CONDITION_PROVIDERS = "enabled_condition_providers";
5490
John Spurlock5c454122013-06-17 07:35:46 -04005491 /** @hide */
5492 public static final String BAR_SERVICE_COMPONENT = "bar_service_component";
5493
John Spurlockd67ec252013-09-05 11:31:54 -04005494 /** @hide */
John Spurlockcdb57ae2015-02-11 19:04:11 -05005495 public static final String VOLUME_CONTROLLER_SERVICE_COMPONENT
5496 = "volume_controller_service_component";
5497
5498 /** @hide */
John Spurlockf1a36642013-10-12 17:50:42 -04005499 public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations";
John Spurlockd67ec252013-09-05 11:31:54 -04005500
Yorke Lee647f8f32013-05-07 10:49:44 -07005501 /**
Svetoslavf43e8512013-09-30 17:33:05 -07005502 * This is the query URI for finding a print service to install.
5503 *
5504 * @hide
5505 */
5506 public static final String PRINT_SERVICE_SEARCH_URI = "print_service_search_uri";
5507
5508 /**
5509 * This is the query URI for finding a NFC payment service to install.
5510 *
5511 * @hide
5512 */
5513 public static final String PAYMENT_SERVICE_SEARCH_URI = "payment_service_search_uri";
5514
5515 /**
Amith Yamasani1e9c2182014-06-11 17:25:51 -07005516 * If enabled, apps should try to skip any introductory hints on first launch. This might
Amith Yamasani0c416392014-06-13 15:54:39 -07005517 * apply to users that are already familiar with the environment or temporary users.
Amith Yamasani1e9c2182014-06-11 17:25:51 -07005518 * <p>
5519 * Type : int (0 to show hints, 1 to skip showing hints)
Amith Yamasani1e9c2182014-06-11 17:25:51 -07005520 */
5521 public static final String SKIP_FIRST_USE_HINTS = "skip_first_use_hints";
5522
5523 /**
John Spurlockaa5ee4d2014-07-25 13:05:12 -04005524 * Persisted playback time after a user confirmation of an unsafe volume level.
5525 *
5526 * @hide
5527 */
5528 public static final String UNSAFE_VOLUME_MUSIC_ACTIVE_MS = "unsafe_volume_music_active_ms";
5529
5530 /**
Dan Sandler52e5701e2014-07-22 23:14:54 -04005531 * This preference enables notification display on the lockscreen.
5532 * @hide
5533 */
5534 public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS =
5535 "lock_screen_show_notifications";
5536
5537 /**
Dongwon Kang4d933a02014-08-07 22:51:47 -07005538 * List of TV inputs that are currently hidden. This is a string
Jaewan Kimf0e530e2014-08-22 00:43:31 +09005539 * containing the IDs of all hidden TV inputs. Each ID is encoded by
5540 * {@link android.net.Uri#encode(String)} and separated by ':'.
Dongwon Kang4d933a02014-08-07 22:51:47 -07005541 * @hide
5542 */
5543 public static final String TV_INPUT_HIDDEN_INPUTS = "tv_input_hidden_inputs";
5544
5545 /**
5546 * List of custom TV input labels. This is a string containing <TV input id, custom name>
Jaewan Kimf0e530e2014-08-22 00:43:31 +09005547 * pairs. TV input id and custom name are encoded by {@link android.net.Uri#encode(String)}
5548 * and separated by ','. Each pair is separated by ':'.
Dongwon Kang4d933a02014-08-07 22:51:47 -07005549 * @hide
5550 */
5551 public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels";
5552
5553 /**
Glenn Kasten34cc4db2014-08-13 10:56:38 -07005554 * Whether automatic routing of system audio to USB audio peripheral is disabled.
5555 * The value is boolean (1 or 0), where 1 means automatic routing is disabled,
5556 * and 0 means automatic routing is enabled.
5557 *
5558 * @hide
5559 */
5560 public static final String USB_AUDIO_AUTOMATIC_ROUTING_DISABLED =
5561 "usb_audio_automatic_routing_disabled";
5562
5563 /**
Jeff Brown05af6ad2014-09-30 20:54:30 -07005564 * The timeout in milliseconds before the device fully goes to sleep after
5565 * a period of inactivity. This value sets an upper bound on how long the device
5566 * will stay awake or dreaming without user activity. It should generally
Dianne Hackbornad6a99b2014-11-18 10:11:10 -08005567 * be longer than {@link Settings.System#SCREEN_OFF_TIMEOUT} as otherwise the device
Jeff Brown05af6ad2014-09-30 20:54:30 -07005568 * will sleep before it ever has a chance to dream.
5569 * <p>
5570 * Use -1 to disable this timeout.
5571 * </p>
5572 *
5573 * @hide
5574 */
5575 public static final String SLEEP_TIMEOUT = "sleep_timeout";
5576
5577 /**
Jason Monk27bbb2d2015-03-31 16:46:39 -04005578 * Controls whether double tap to wake is enabled.
5579 * @hide
5580 */
5581 public static final String DOUBLE_TAP_TO_WAKE = "double_tap_to_wake";
5582
5583 /**
Xiyuan Xiae6de8b92015-06-06 22:18:05 -07005584 * The current assistant component. It could be a voice interaction service,
5585 * or an activity that handles ACTION_ASSIST, or empty which means using the default
5586 * handling.
5587 *
5588 * @hide
5589 */
5590 public static final String ASSISTANT = "assistant";
5591
5592 /**
Svetoslav Ganova571a582011-09-20 18:32:20 -07005593 * This are the settings to be backed up.
5594 *
5595 * NOTE: Settings are backed up and restored in the order they appear
5596 * in this array. If you have one setting depending on another,
5597 * make sure that they are ordered appropriately.
5598 *
-b master501eec92009-07-06 13:53:11 -07005599 * @hide
5600 */
5601 public static final String[] SETTINGS_TO_BACKUP = {
Christopher Tate58f41ec2013-01-11 15:40:36 -08005602 BUGREPORT_IN_POWER_MENU, // moved to global
Amith Yamasani8823c0a82009-07-07 14:30:17 -07005603 ALLOW_MOCK_LOCATION,
-b master501eec92009-07-06 13:53:11 -07005604 PARENTAL_CONTROL_ENABLED,
5605 PARENTAL_CONTROL_REDIRECT_URL,
Christopher Tate66488d62012-10-02 11:58:01 -07005606 USB_MASS_STORAGE_ENABLED, // moved to global
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -07005607 ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
5608 ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
5609 ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE,
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07005610 ACCESSIBILITY_SCRIPT_INJECTION,
Christopher Tate14c2d792010-02-25 16:49:44 -08005611 BACKUP_AUTO_RESTORE,
-b master501eec92009-07-06 13:53:11 -07005612 ENABLED_ACCESSIBILITY_SERVICES,
Christopher Tate6597e342015-02-17 12:15:25 -08005613 ENABLED_NOTIFICATION_LISTENERS,
Christopher Tate7b9a28c2015-03-18 13:06:16 -07005614 ENABLED_INPUT_METHODS,
Svetoslav Ganov9a4c5cd2012-05-30 14:06:32 -07005615 TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES,
Svetoslav Ganova28a16d2011-07-28 11:24:21 -07005616 TOUCH_EXPLORATION_ENABLED,
Svetoslav Ganova571a582011-09-20 18:32:20 -07005617 ACCESSIBILITY_ENABLED,
Svetoslav Ganov55f937a2011-12-05 11:42:07 -08005618 ACCESSIBILITY_SPEAK_PASSWORD,
Chris Craikcce47eb2014-07-16 15:12:15 -07005619 ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED,
Alan Viveretteef793802013-07-23 14:15:28 -07005620 ACCESSIBILITY_CAPTIONING_ENABLED,
5621 ACCESSIBILITY_CAPTIONING_LOCALE,
5622 ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR,
5623 ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR,
5624 ACCESSIBILITY_CAPTIONING_EDGE_TYPE,
5625 ACCESSIBILITY_CAPTIONING_EDGE_COLOR,
5626 ACCESSIBILITY_CAPTIONING_TYPEFACE,
Alan Viverette69ce69b2013-08-29 12:23:48 -07005627 ACCESSIBILITY_CAPTIONING_FONT_SCALE,
-b master501eec92009-07-06 13:53:11 -07005628 TTS_USE_DEFAULTS,
5629 TTS_DEFAULT_RATE,
5630 TTS_DEFAULT_PITCH,
5631 TTS_DEFAULT_SYNTH,
5632 TTS_DEFAULT_LANG,
5633 TTS_DEFAULT_COUNTRY,
Charles Chenceffa152010-03-16 21:18:10 -07005634 TTS_ENABLED_PLUGINS,
Narayan Kamath6d632962011-08-24 11:51:37 +01005635 TTS_DEFAULT_LOCALE,
Christopher Tate66488d62012-10-02 11:58:01 -07005636 WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, // moved to global
5637 WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, // moved to global
5638 WIFI_NUM_OPEN_NETWORKS_KEPT, // moved to global
Christopher Tate06cbadd2015-03-16 18:29:42 -07005639 SELECTED_SPELL_CHECKER,
5640 SELECTED_SPELL_CHECKER_SUBTYPE,
5641 SPELL_CHECKER_ENABLED,
San Mehat87734d32010-01-08 12:53:06 -08005642 MOUNT_PLAY_NOTIFICATION_SND,
5643 MOUNT_UMS_AUTOSTART,
5644 MOUNT_UMS_PROMPT,
Dianne Hackborn2ccda4d2010-03-22 21:49:15 -07005645 MOUNT_UMS_NOTIFY_ENABLED,
Jeff Brown05af6ad2014-09-30 20:54:30 -07005646 UI_NIGHT_MODE,
Jason Monk27bbb2d2015-03-31 16:46:39 -04005647 SLEEP_TIMEOUT,
5648 DOUBLE_TAP_TO_WAKE,
-b master501eec92009-07-06 13:53:11 -07005649 };
5650
5651 /**
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07005652 * These entries are considered common between the personal and the managed profile,
5653 * since the managed profile doesn't get to change them.
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07005654 */
Svetoslav683914b2015-01-15 14:22:26 -08005655 private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>();
Amith Yamasanib0ff3222015-03-04 09:56:14 -08005656
Svetoslav683914b2015-01-15 14:22:26 -08005657 static {
5658 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_ENABLED);
5659 CLONE_TO_MANAGED_PROFILE.add(ALLOW_MOCK_LOCATION);
5660 CLONE_TO_MANAGED_PROFILE.add(ALLOWED_GEOLOCATION_ORIGINS);
5661 CLONE_TO_MANAGED_PROFILE.add(DEFAULT_INPUT_METHOD);
5662 CLONE_TO_MANAGED_PROFILE.add(ENABLED_ACCESSIBILITY_SERVICES);
5663 CLONE_TO_MANAGED_PROFILE.add(ENABLED_INPUT_METHODS);
5664 CLONE_TO_MANAGED_PROFILE.add(LOCATION_MODE);
5665 CLONE_TO_MANAGED_PROFILE.add(LOCATION_PROVIDERS_ALLOWED);
5666 CLONE_TO_MANAGED_PROFILE.add(LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS);
5667 CLONE_TO_MANAGED_PROFILE.add(SELECTED_INPUT_METHOD_SUBTYPE);
5668 CLONE_TO_MANAGED_PROFILE.add(SELECTED_SPELL_CHECKER);
5669 CLONE_TO_MANAGED_PROFILE.add(SELECTED_SPELL_CHECKER_SUBTYPE);
5670 }
5671
5672 /** @hide */
5673 public static void getCloneToManagedProfileSettings(Set<String> outKeySet) {
5674 outKeySet.addAll(CLONE_TO_MANAGED_PROFILE);
5675 }
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07005676
5677 /**
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005678 * Helper method for determining if a location provider is enabled.
Tom O'Neilld5759432013-09-11 11:03:03 -07005679 *
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005680 * @param cr the content resolver to use
5681 * @param provider the location provider to query
5682 * @return true if the provider is enabled
Tom O'Neilld5759432013-09-11 11:03:03 -07005683 *
5684 * @deprecated use {@link #LOCATION_MODE} or
5685 * {@link LocationManager#isProviderEnabled(String)}
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005686 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005687 @Deprecated
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005688 public static final boolean isLocationProviderEnabled(ContentResolver cr, String provider) {
Victoria Leaseb711d572012-10-02 13:14:11 -07005689 return isLocationProviderEnabledForUser(cr, provider, UserHandle.myUserId());
5690 }
5691
5692 /**
5693 * Helper method for determining if a location provider is enabled.
5694 * @param cr the content resolver to use
5695 * @param provider the location provider to query
5696 * @param userId the userId to query
5697 * @return true if the provider is enabled
Tom O'Neilld5759432013-09-11 11:03:03 -07005698 * @deprecated use {@link #LOCATION_MODE} or
5699 * {@link LocationManager#isProviderEnabled(String)}
Victoria Leaseb711d572012-10-02 13:14:11 -07005700 * @hide
5701 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005702 @Deprecated
Victoria Leaseb711d572012-10-02 13:14:11 -07005703 public static final boolean isLocationProviderEnabledForUser(ContentResolver cr, String provider, int userId) {
5704 String allowedProviders = Settings.Secure.getStringForUser(cr,
5705 LOCATION_PROVIDERS_ALLOWED, userId);
Brad Fitzpatrick11fe1812010-09-10 16:07:52 -07005706 return TextUtils.delimitedStringContains(allowedProviders, ',', provider);
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005707 }
5708
5709 /**
5710 * Thread-safe method for enabling or disabling a single location provider.
5711 * @param cr the content resolver to use
5712 * @param provider the location provider to enable or disable
5713 * @param enabled true if the provider should be enabled
Tom O'Neilla324ac72013-08-26 14:40:23 -07005714 * @deprecated use {@link #putInt(ContentResolver, String, int)} and {@link #LOCATION_MODE}
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005715 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005716 @Deprecated
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005717 public static final void setLocationProviderEnabled(ContentResolver cr,
5718 String provider, boolean enabled) {
Victoria Leaseb711d572012-10-02 13:14:11 -07005719 setLocationProviderEnabledForUser(cr, provider, enabled, UserHandle.myUserId());
5720 }
5721
5722 /**
5723 * Thread-safe method for enabling or disabling a single location provider.
Tom O'Neilla324ac72013-08-26 14:40:23 -07005724 *
Victoria Leaseb711d572012-10-02 13:14:11 -07005725 * @param cr the content resolver to use
5726 * @param provider the location provider to enable or disable
5727 * @param enabled true if the provider should be enabled
5728 * @param userId the userId for which to enable/disable providers
Tom O'Neilla324ac72013-08-26 14:40:23 -07005729 * @return true if the value was set, false on database errors
5730 * @deprecated use {@link #putIntForUser(ContentResolver, String, int, int)} and
5731 * {@link #LOCATION_MODE}
Victoria Leaseb711d572012-10-02 13:14:11 -07005732 * @hide
5733 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005734 @Deprecated
Tom O'Neilla324ac72013-08-26 14:40:23 -07005735 public static final boolean setLocationProviderEnabledForUser(ContentResolver cr,
Victoria Leaseb711d572012-10-02 13:14:11 -07005736 String provider, boolean enabled, int userId) {
David Christie3f7b6522013-08-06 19:19:08 -07005737 synchronized (mLocationSettingsLock) {
5738 // to ensure thread safety, we write the provider name with a '+' or '-'
5739 // and let the SettingsProvider handle it rather than reading and modifying
5740 // the list of enabled providers.
5741 if (enabled) {
5742 provider = "+" + provider;
5743 } else {
5744 provider = "-" + provider;
5745 }
Tom O'Neilla324ac72013-08-26 14:40:23 -07005746 return putStringForUser(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider,
David Christie3f7b6522013-08-06 19:19:08 -07005747 userId);
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005748 }
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005749 }
Tom O'Neill1f48b782013-08-19 18:14:56 -07005750
5751 /**
5752 * Thread-safe method for setting the location mode to one of
5753 * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY},
5754 * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}.
5755 *
Tom O'Neill1f48b782013-08-19 18:14:56 -07005756 * @param cr the content resolver to use
5757 * @param mode such as {@link #LOCATION_MODE_HIGH_ACCURACY}
5758 * @param userId the userId for which to change mode
Tom O'Neilla324ac72013-08-26 14:40:23 -07005759 * @return true if the value was set, false on database errors
Tom O'Neill1f48b782013-08-19 18:14:56 -07005760 *
5761 * @throws IllegalArgumentException if mode is not one of the supported values
5762 */
Tom O'Neill7f6f4572013-08-27 10:53:15 -07005763 private static final boolean setLocationModeForUser(ContentResolver cr, int mode,
5764 int userId) {
Tom O'Neill1f48b782013-08-19 18:14:56 -07005765 synchronized (mLocationSettingsLock) {
5766 boolean gps = false;
5767 boolean network = false;
5768 switch (mode) {
5769 case LOCATION_MODE_OFF:
5770 break;
5771 case LOCATION_MODE_SENSORS_ONLY:
5772 gps = true;
5773 break;
5774 case LOCATION_MODE_BATTERY_SAVING:
5775 network = true;
5776 break;
5777 case LOCATION_MODE_HIGH_ACCURACY:
5778 gps = true;
5779 network = true;
5780 break;
5781 default:
5782 throw new IllegalArgumentException("Invalid location mode: " + mode);
5783 }
Tom O'Neill7731a992014-10-09 11:30:49 -07005784 // Note it's important that we set the NLP mode first. The Google implementation
5785 // of NLP clears its NLP consent setting any time it receives a
5786 // LocationManager.PROVIDERS_CHANGED_ACTION broadcast and NLP is disabled. Also,
5787 // it shows an NLP consent dialog any time it receives the broadcast, NLP is
5788 // enabled, and the NLP consent is not set. If 1) we were to enable GPS first,
5789 // 2) a setup wizard has its own NLP consent UI that sets the NLP consent setting,
5790 // and 3) the receiver happened to complete before we enabled NLP, then the Google
5791 // NLP would detect the attempt to enable NLP and show a redundant NLP consent
5792 // dialog. Then the people who wrote the setup wizard would be sad.
Tom O'Neilla324ac72013-08-26 14:40:23 -07005793 boolean nlpSuccess = Settings.Secure.setLocationProviderEnabledForUser(
Tom O'Neill1f48b782013-08-19 18:14:56 -07005794 cr, LocationManager.NETWORK_PROVIDER, network, userId);
Tom O'Neill7731a992014-10-09 11:30:49 -07005795 boolean gpsSuccess = Settings.Secure.setLocationProviderEnabledForUser(
5796 cr, LocationManager.GPS_PROVIDER, gps, userId);
Tom O'Neilla324ac72013-08-26 14:40:23 -07005797 return gpsSuccess && nlpSuccess;
Tom O'Neill1f48b782013-08-19 18:14:56 -07005798 }
5799 }
5800
5801 /**
Tom O'Neill1f48b782013-08-19 18:14:56 -07005802 * Thread-safe method for reading the location mode, returns one of
5803 * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY},
5804 * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}.
5805 *
5806 * @param cr the content resolver to use
5807 * @param userId the userId for which to read the mode
5808 * @return the location mode
5809 */
Tom O'Neill7f6f4572013-08-27 10:53:15 -07005810 private static final int getLocationModeForUser(ContentResolver cr, int userId) {
Tom O'Neill1f48b782013-08-19 18:14:56 -07005811 synchronized (mLocationSettingsLock) {
5812 boolean gpsEnabled = Settings.Secure.isLocationProviderEnabledForUser(
5813 cr, LocationManager.GPS_PROVIDER, userId);
5814 boolean networkEnabled = Settings.Secure.isLocationProviderEnabledForUser(
5815 cr, LocationManager.NETWORK_PROVIDER, userId);
5816 if (gpsEnabled && networkEnabled) {
5817 return LOCATION_MODE_HIGH_ACCURACY;
5818 } else if (gpsEnabled) {
5819 return LOCATION_MODE_SENSORS_ONLY;
5820 } else if (networkEnabled) {
5821 return LOCATION_MODE_BATTERY_SAVING;
5822 } else {
5823 return LOCATION_MODE_OFF;
5824 }
5825 }
5826 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005827 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005828
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005829 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005830 * Global system settings, containing preferences that always apply identically
5831 * to all defined users. Applications can read these but are not allowed to write;
5832 * like the "Secure" settings, these are for preferences that the user must
5833 * explicitly modify through the system UI or specialized APIs for those values.
5834 */
5835 public static final class Global extends NameValueTable {
5836 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_global_version";
5837
5838 /**
5839 * The content:// style URL for global secure settings items. Not public.
5840 */
5841 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global");
5842
5843 /**
Amith Yamasani23a0f052014-07-25 12:26:53 -07005844 * Whether users are allowed to add more users or guest from lockscreen.
5845 * <p>
5846 * Type: int
5847 * @hide
5848 */
5849 public static final String ADD_USERS_WHEN_LOCKED = "add_users_when_locked";
5850
5851 /**
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07005852 * Setting whether the global gesture for enabling accessibility is enabled.
5853 * If this gesture is enabled the user will be able to perfrom it to enable
5854 * the accessibility state without visiting the settings app.
5855 * @hide
5856 */
5857 public static final String ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED =
5858 "enable_accessibility_global_gesture_enabled";
5859
5860 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005861 * Whether Airplane Mode is on.
5862 */
5863 public static final String AIRPLANE_MODE_ON = "airplane_mode_on";
5864
5865 /**
Bryce Lee584a4452014-10-21 15:55:55 -07005866 * Whether Theater Mode is on.
5867 * {@hide}
5868 */
Bryce Leecdfebd62015-02-02 08:19:11 -08005869 @SystemApi
Bryce Lee584a4452014-10-21 15:55:55 -07005870 public static final String THEATER_MODE_ON = "theater_mode_on";
5871
5872 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005873 * Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.
5874 */
5875 public static final String RADIO_BLUETOOTH = "bluetooth";
5876
5877 /**
5878 * Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio.
5879 */
5880 public static final String RADIO_WIFI = "wifi";
5881
5882 /**
5883 * {@hide}
5884 */
5885 public static final String RADIO_WIMAX = "wimax";
5886 /**
5887 * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.
5888 */
5889 public static final String RADIO_CELL = "cell";
5890
5891 /**
5892 * Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio.
5893 */
5894 public static final String RADIO_NFC = "nfc";
5895
5896 /**
5897 * A comma separated list of radios that need to be disabled when airplane mode
5898 * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are
5899 * included in the comma separated list.
5900 */
5901 public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios";
5902
5903 /**
5904 * A comma separated list of radios that should to be disabled when airplane mode
5905 * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is
5906 * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi
5907 * will be turned off when entering airplane mode, but the user will be able to reenable
5908 * Wifi in the Settings app.
5909 *
5910 * {@hide}
5911 */
5912 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios";
5913
5914 /**
5915 * The policy for deciding when Wi-Fi should go to sleep (which will in
5916 * turn switch to using the mobile data as an Internet connection).
5917 * <p>
5918 * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT},
5919 * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or
5920 * {@link #WIFI_SLEEP_POLICY_NEVER}.
5921 */
5922 public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy";
5923
5924 /**
5925 * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep
5926 * policy, which is to sleep shortly after the turning off
5927 * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting.
5928 */
5929 public static final int WIFI_SLEEP_POLICY_DEFAULT = 0;
5930
5931 /**
5932 * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when
5933 * the device is on battery, and never go to sleep when the device is
5934 * plugged in.
5935 */
5936 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1;
5937
5938 /**
5939 * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep.
5940 */
5941 public static final int WIFI_SLEEP_POLICY_NEVER = 2;
5942
5943 /**
5944 * Value to specify if the user prefers the date, time and time zone
5945 * to be automatically fetched from the network (NITZ). 1=yes, 0=no
5946 */
5947 public static final String AUTO_TIME = "auto_time";
5948
5949 /**
5950 * Value to specify if the user prefers the time zone
5951 * to be automatically fetched from the network (NITZ). 1=yes, 0=no
5952 */
5953 public static final String AUTO_TIME_ZONE = "auto_time_zone";
5954
5955 /**
5956 * URI for the car dock "in" event sound.
5957 * @hide
5958 */
5959 public static final String CAR_DOCK_SOUND = "car_dock_sound";
5960
5961 /**
5962 * URI for the car dock "out" event sound.
5963 * @hide
5964 */
5965 public static final String CAR_UNDOCK_SOUND = "car_undock_sound";
5966
5967 /**
5968 * URI for the desk dock "in" event sound.
5969 * @hide
5970 */
5971 public static final String DESK_DOCK_SOUND = "desk_dock_sound";
5972
5973 /**
5974 * URI for the desk dock "out" event sound.
5975 * @hide
5976 */
5977 public static final String DESK_UNDOCK_SOUND = "desk_undock_sound";
5978
5979 /**
5980 * Whether to play a sound for dock events.
5981 * @hide
5982 */
5983 public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled";
5984
5985 /**
5986 * URI for the "device locked" (keyguard shown) sound.
5987 * @hide
5988 */
5989 public static final String LOCK_SOUND = "lock_sound";
5990
5991 /**
5992 * URI for the "device unlocked" sound.
5993 * @hide
5994 */
5995 public static final String UNLOCK_SOUND = "unlock_sound";
5996
5997 /**
Adrian Roos49e057d2014-08-13 17:14:51 +02005998 * URI for the "device is trusted" sound, which is played when the device enters the trusted
5999 * state without unlocking.
6000 * @hide
6001 */
6002 public static final String TRUSTED_SOUND = "trusted_sound";
6003
6004 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006005 * URI for the low battery sound file.
6006 * @hide
6007 */
6008 public static final String LOW_BATTERY_SOUND = "low_battery_sound";
6009
6010 /**
6011 * Whether to play a sound for low-battery alerts.
6012 * @hide
6013 */
6014 public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled";
6015
6016 /**
Jeff Brown84e27562012-12-07 13:56:34 -08006017 * URI for the "wireless charging started" sound.
6018 * @hide
6019 */
6020 public static final String WIRELESS_CHARGING_STARTED_SOUND =
6021 "wireless_charging_started_sound";
6022
6023 /**
John Spurlock51a871d2015-05-06 17:41:30 -04006024 * Whether to play a sound for charging events.
6025 * @hide
6026 */
6027 public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled";
6028
6029 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006030 * Whether we keep the device on while the device is plugged in.
6031 * Supported values are:
6032 * <ul>
6033 * <li>{@code 0} to never stay on while plugged in</li>
6034 * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li>
6035 * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li>
6036 * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li>
6037 * </ul>
6038 * These values can be OR-ed together.
6039 */
6040 public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in";
6041
6042 /**
Christopher Tate58f41ec2013-01-11 15:40:36 -08006043 * When the user has enable the option to have a "bug report" command
6044 * in the power menu.
6045 * @hide
6046 */
6047 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu";
6048
6049 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006050 * Whether ADB is enabled.
6051 */
6052 public static final String ADB_ENABLED = "adb_enabled";
6053
6054 /**
Jon Miranda836c0a82014-08-11 12:32:26 -07006055 * Whether Views are allowed to save their attribute data.
6056 * @hide
6057 */
6058 public static final String DEBUG_VIEW_ATTRIBUTES = "debug_view_attributes";
6059
6060 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006061 * Whether assisted GPS should be enabled or not.
6062 * @hide
6063 */
6064 public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled";
6065
6066 /**
6067 * Whether bluetooth is enabled/disabled
6068 * 0=disabled. 1=enabled.
6069 */
6070 public static final String BLUETOOTH_ON = "bluetooth_on";
6071
6072 /**
6073 * CDMA Cell Broadcast SMS
6074 * 0 = CDMA Cell Broadcast SMS disabled
6075 * 1 = CDMA Cell Broadcast SMS enabled
6076 * @hide
6077 */
6078 public static final String CDMA_CELL_BROADCAST_SMS =
6079 "cdma_cell_broadcast_sms";
6080
6081 /**
6082 * The CDMA roaming mode 0 = Home Networks, CDMA default
6083 * 1 = Roaming on Affiliated networks
6084 * 2 = Roaming on any networks
6085 * @hide
6086 */
6087 public static final String CDMA_ROAMING_MODE = "roaming_settings";
6088
6089 /**
6090 * The CDMA subscription mode 0 = RUIM/SIM (default)
6091 * 1 = NV
6092 * @hide
6093 */
6094 public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode";
6095
6096 /** Inactivity timeout to track mobile data activity.
6097 *
6098 * If set to a positive integer, it indicates the inactivity timeout value in seconds to
6099 * infer the data activity of mobile network. After a period of no activity on mobile
6100 * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE}
6101 * intent is fired to indicate a transition of network status from "active" to "idle". Any
6102 * subsequent activity on mobile networks triggers the firing of {@code
6103 * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active".
6104 *
6105 * Network activity refers to transmitting or receiving data on the network interfaces.
6106 *
6107 * Tracking is disabled if set to zero or negative value.
6108 *
6109 * @hide
6110 */
6111 public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile";
6112
6113 /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE}
6114 * but for Wifi network.
6115 * @hide
6116 */
6117 public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi";
6118
6119 /**
6120 * Whether or not data roaming is enabled. (0 = false, 1 = true)
6121 */
6122 public static final String DATA_ROAMING = "data_roaming";
6123
6124 /**
Wink Saville75c1e692013-03-20 17:06:50 -07006125 * The value passed to a Mobile DataConnection via bringUp which defines the
6126 * number of retries to preform when setting up the initial connection. The default
6127 * value defined in DataConnectionTrackerBase#DEFAULT_MDC_INITIAL_RETRY is currently 1.
6128 * @hide
6129 */
6130 public static final String MDC_INITIAL_MAX_RETRY = "mdc_initial_max_retry";
6131
6132 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006133 * Whether user has enabled development settings.
6134 */
6135 public static final String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
6136
6137 /**
6138 * Whether the device has been provisioned (0 = false, 1 = true)
6139 */
6140 public static final String DEVICE_PROVISIONED = "device_provisioned";
6141
6142 /**
6143 * The saved value for WindowManagerService.setForcedDisplayDensity().
6144 * One integer in dpi. If unset, then use the real display density.
6145 * @hide
6146 */
6147 public static final String DISPLAY_DENSITY_FORCED = "display_density_forced";
6148
6149 /**
6150 * The saved value for WindowManagerService.setForcedDisplaySize().
6151 * Two integers separated by a comma. If unset, then use the real display size.
6152 * @hide
6153 */
6154 public static final String DISPLAY_SIZE_FORCED = "display_size_forced";
6155
6156 /**
Jeff Brownd46747a2015-04-15 19:02:36 -07006157 * The saved value for WindowManagerService.setForcedDisplayScalingMode().
6158 * 0 or unset if scaling is automatic, 1 if scaling is disabled.
6159 * @hide
6160 */
6161 public static final String DISPLAY_SCALING_FORCE = "display_scaling_force";
6162
6163 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006164 * The maximum size, in bytes, of a download that the download manager will transfer over
6165 * a non-wifi connection.
6166 * @hide
6167 */
6168 public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE =
6169 "download_manager_max_bytes_over_mobile";
6170
6171 /**
6172 * The recommended maximum size, in bytes, of a download that the download manager should
6173 * transfer over a non-wifi connection. Over this size, the use will be warned, but will
6174 * have the option to start the download over the mobile connection anyway.
6175 * @hide
6176 */
6177 public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE =
6178 "download_manager_recommended_max_bytes_over_mobile";
6179
6180 /**
Christopher Tateaa036a22014-05-19 16:33:27 -07006181 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead
Christopher Tate06efb532012-08-24 15:29:27 -07006182 */
Christopher Tateaa036a22014-05-19 16:33:27 -07006183 @Deprecated
6184 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS;
Christopher Tate06efb532012-08-24 15:29:27 -07006185
6186 /**
Jinsuk Kimb3d91772014-07-10 12:48:54 +09006187 * Whether HDMI control shall be enabled. If disabled, no CEC/MHL command will be
6188 * sent or processed. (0 = false, 1 = true)
6189 * @hide
6190 */
6191 public static final String HDMI_CONTROL_ENABLED = "hdmi_control_enabled";
6192
6193 /**
6194 * Whether HDMI system audio is enabled. If enabled, TV internal speaker is muted,
6195 * and the output is redirected to AV Receiver connected via
6196 * {@Global#HDMI_SYSTEM_AUDIO_OUTPUT}.
6197 * @hide
6198 */
6199 public static final String HDMI_SYSTEM_AUDIO_ENABLED = "hdmi_system_audio_enabled";
6200
6201 /**
Jinsuk Kimb3d91772014-07-10 12:48:54 +09006202 * Whether TV will automatically turn on upon reception of the CEC command
6203 * &lt;Text View On&gt; or &lt;Image View On&gt;. (0 = false, 1 = true)
6204 * @hide
6205 */
6206 public static final String HDMI_CONTROL_AUTO_WAKEUP_ENABLED =
6207 "hdmi_control_auto_wakeup_enabled";
6208
6209 /**
6210 * Whether TV will also turn off other CEC devices when it goes to standby mode.
6211 * (0 = false, 1 = true)
6212 * @hide
6213 */
6214 public static final String HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED =
6215 "hdmi_control_auto_device_off_enabled";
6216
6217 /**
Lorenzo Colitti06d7e532015-03-16 23:46:24 +09006218 * Whether to use the DHCP client from Lollipop and earlier instead of the newer Android DHCP
6219 * client.
6220 * (0 = false, 1 = true)
6221 * @hide
6222 */
6223 public static final String LEGACY_DHCP_CLIENT = "legacy_dhcp_client";
6224
6225 /**
Jinsuk Kimb3d91772014-07-10 12:48:54 +09006226 * Whether TV will switch to MHL port when a mobile device is plugged in.
6227 * (0 = false, 1 = true)
6228 * @hide
6229 */
6230 public static final String MHL_INPUT_SWITCHING_ENABLED = "mhl_input_switching_enabled";
6231
6232 /**
6233 * Whether TV will charge the mobile device connected at MHL port. (0 = false, 1 = true)
6234 * @hide
6235 */
6236 public static final String MHL_POWER_CHARGE_ENABLED = "mhl_power_charge_enabled";
6237
6238 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006239 * Whether mobile data connections are allowed by the user. See
6240 * ConnectivityManager for more info.
6241 * @hide
6242 */
6243 public static final String MOBILE_DATA = "mobile_data";
6244
Erik Klineda4bfa82015-04-30 12:58:40 +09006245 /**
6246 * Whether the mobile data connection should remain active even when higher
6247 * priority networks like WiFi are active, to help make network switching faster.
6248 *
6249 * See ConnectivityService for more info.
6250 *
6251 * (0 = disabled, 1 = enabled)
6252 * @hide
6253 */
6254 public static final String MOBILE_DATA_ALWAYS_ON = "mobile_data_always_on";
6255
Christopher Tate06efb532012-08-24 15:29:27 -07006256 /** {@hide} */
6257 public static final String NETSTATS_ENABLED = "netstats_enabled";
6258 /** {@hide} */
6259 public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval";
6260 /** {@hide} */
6261 public static final String NETSTATS_TIME_CACHE_MAX_AGE = "netstats_time_cache_max_age";
6262 /** {@hide} */
6263 public static final String NETSTATS_GLOBAL_ALERT_BYTES = "netstats_global_alert_bytes";
6264 /** {@hide} */
6265 public static final String NETSTATS_SAMPLE_ENABLED = "netstats_sample_enabled";
Christopher Tate06efb532012-08-24 15:29:27 -07006266
6267 /** {@hide} */
6268 public static final String NETSTATS_DEV_BUCKET_DURATION = "netstats_dev_bucket_duration";
6269 /** {@hide} */
6270 public static final String NETSTATS_DEV_PERSIST_BYTES = "netstats_dev_persist_bytes";
6271 /** {@hide} */
6272 public static final String NETSTATS_DEV_ROTATE_AGE = "netstats_dev_rotate_age";
6273 /** {@hide} */
6274 public static final String NETSTATS_DEV_DELETE_AGE = "netstats_dev_delete_age";
6275
6276 /** {@hide} */
6277 public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration";
6278 /** {@hide} */
6279 public static final String NETSTATS_UID_PERSIST_BYTES = "netstats_uid_persist_bytes";
6280 /** {@hide} */
6281 public static final String NETSTATS_UID_ROTATE_AGE = "netstats_uid_rotate_age";
6282 /** {@hide} */
6283 public static final String NETSTATS_UID_DELETE_AGE = "netstats_uid_delete_age";
6284
6285 /** {@hide} */
6286 public static final String NETSTATS_UID_TAG_BUCKET_DURATION = "netstats_uid_tag_bucket_duration";
6287 /** {@hide} */
6288 public static final String NETSTATS_UID_TAG_PERSIST_BYTES = "netstats_uid_tag_persist_bytes";
6289 /** {@hide} */
6290 public static final String NETSTATS_UID_TAG_ROTATE_AGE = "netstats_uid_tag_rotate_age";
6291 /** {@hide} */
6292 public static final String NETSTATS_UID_TAG_DELETE_AGE = "netstats_uid_tag_delete_age";
6293
6294 /**
6295 * User preference for which network(s) should be used. Only the
6296 * connectivity service should touch this.
6297 */
6298 public static final String NETWORK_PREFERENCE = "network_preference";
6299
6300 /**
Jeff Davidsondd6fd1e2014-04-14 15:14:30 -07006301 * Which package name to use for network scoring. If null, or if the package is not a valid
6302 * scorer app, external network scores will neither be requested nor accepted.
6303 * @hide
6304 */
6305 public static final String NETWORK_SCORER_APP = "network_scorer_app";
6306
6307 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006308 * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
6309 * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
6310 * exceeded.
6311 * @hide
6312 */
6313 public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
6314
6315 /**
6316 * The length of time in milli-seconds that automatic small adjustments to
6317 * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
6318 * @hide
6319 */
6320 public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
6321
6322 /** Preferred NTP server. {@hide} */
6323 public static final String NTP_SERVER = "ntp_server";
6324 /** Timeout in milliseconds to wait for NTP server. {@hide} */
6325 public static final String NTP_TIMEOUT = "ntp_timeout";
6326
Jeff Sharkeye8a4b662015-06-27 15:43:45 -07006327 /** {@hide} */
6328 public static final String STORAGE_BENCHMARK_INTERVAL = "storage_benchmark_interval";
6329
Christopher Tate06efb532012-08-24 15:29:27 -07006330 /**
rich cannings4d8fc792012-09-07 14:43:43 -07006331 * Whether the package manager should send package verification broadcasts for verifiers to
6332 * review apps prior to installation.
6333 * 1 = request apps to be verified prior to installation, if a verifier exists.
6334 * 0 = do not verify apps before installation
rich cannings4e5753f2012-09-19 16:03:56 -07006335 * @hide
rich cannings4d8fc792012-09-07 14:43:43 -07006336 */
6337 public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable";
6338
6339 /** Timeout for package verification.
rich cannings4e5753f2012-09-19 16:03:56 -07006340 * @hide */
rich cannings4d8fc792012-09-07 14:43:43 -07006341 public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout";
6342
6343 /** Default response code for package verification.
rich cannings4e5753f2012-09-19 16:03:56 -07006344 * @hide */
rich cannings4d8fc792012-09-07 14:43:43 -07006345 public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response";
6346
rich cannings4e5753f2012-09-19 16:03:56 -07006347 /**
6348 * Show package verification setting in the Settings app.
rich canningse6686b32012-09-16 14:02:20 -07006349 * 1 = show (default)
6350 * 0 = hide
rich cannings4e5753f2012-09-19 16:03:56 -07006351 * @hide
rich canningse6686b32012-09-16 14:02:20 -07006352 */
6353 public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible";
6354
rich cannings4d8fc792012-09-07 14:43:43 -07006355 /**
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -08006356 * Run package verification on apps installed through ADB/ADT/USB
rich cannings4e5753f2012-09-19 16:03:56 -07006357 * 1 = perform package verification on ADB installs (default)
6358 * 0 = bypass package verification on ADB installs
6359 * @hide
6360 */
6361 public static final String PACKAGE_VERIFIER_INCLUDE_ADB = "verifier_verify_adb_installs";
6362
6363 /**
Christopher Tate7265abe2014-11-21 13:54:45 -08006364 * Time since last fstrim (milliseconds) after which we force one to happen
6365 * during device startup. If unset, the default is 3 days.
6366 * @hide
6367 */
6368 public static final String FSTRIM_MANDATORY_INTERVAL = "fstrim_mandatory_interval";
6369
6370 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006371 * The interval in milliseconds at which to check packet counts on the
6372 * mobile data interface when screen is on, to detect possible data
6373 * connection problems.
6374 * @hide
6375 */
6376 public static final String PDP_WATCHDOG_POLL_INTERVAL_MS =
6377 "pdp_watchdog_poll_interval_ms";
6378
6379 /**
6380 * The interval in milliseconds at which to check packet counts on the
6381 * mobile data interface when screen is off, to detect possible data
6382 * connection problems.
6383 * @hide
6384 */
6385 public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS =
6386 "pdp_watchdog_long_poll_interval_ms";
6387
6388 /**
6389 * The interval in milliseconds at which to check packet counts on the
6390 * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT}
6391 * outgoing packets has been reached without incoming packets.
6392 * @hide
6393 */
6394 public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS =
6395 "pdp_watchdog_error_poll_interval_ms";
6396
6397 /**
6398 * The number of outgoing packets sent without seeing an incoming packet
6399 * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT}
6400 * device is logged to the event log
6401 * @hide
6402 */
6403 public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT =
6404 "pdp_watchdog_trigger_packet_count";
6405
6406 /**
6407 * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS})
6408 * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before
6409 * attempting data connection recovery.
6410 * @hide
6411 */
6412 public static final String PDP_WATCHDOG_ERROR_POLL_COUNT =
6413 "pdp_watchdog_error_poll_count";
6414
6415 /**
6416 * The number of failed PDP reset attempts before moving to something more
6417 * drastic: re-registering to the network.
6418 * @hide
6419 */
6420 public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT =
6421 "pdp_watchdog_max_pdp_reset_fail_count";
6422
6423 /**
6424 * A positive value indicates how often the SamplingProfiler
6425 * should take snapshots. Zero value means SamplingProfiler
6426 * is disabled.
6427 *
6428 * @hide
6429 */
6430 public static final String SAMPLING_PROFILER_MS = "sampling_profiler_ms";
6431
6432 /**
6433 * URL to open browser on to allow user to manage a prepay account
6434 * @hide
6435 */
6436 public static final String SETUP_PREPAID_DATA_SERVICE_URL =
6437 "setup_prepaid_data_service_url";
6438
6439 /**
6440 * URL to attempt a GET on to see if this is a prepay device
6441 * @hide
6442 */
6443 public static final String SETUP_PREPAID_DETECTION_TARGET_URL =
6444 "setup_prepaid_detection_target_url";
6445
6446 /**
6447 * Host to check for a redirect to after an attempt to GET
6448 * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there,
6449 * this is a prepaid device with zero balance.)
6450 * @hide
6451 */
6452 public static final String SETUP_PREPAID_DETECTION_REDIR_HOST =
6453 "setup_prepaid_detection_redir_host";
6454
6455 /**
Jake Hamby76a61422012-09-06 17:40:21 -07006456 * The interval in milliseconds at which to check the number of SMS sent out without asking
6457 * for use permit, to limit the un-authorized SMS usage.
6458 *
6459 * @hide
6460 */
6461 public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
6462 "sms_outgoing_check_interval_ms";
6463
6464 /**
6465 * The number of outgoing SMS sent without asking for user permit (of {@link
6466 * #SMS_OUTGOING_CHECK_INTERVAL_MS}
6467 *
6468 * @hide
6469 */
6470 public static final String SMS_OUTGOING_CHECK_MAX_COUNT =
6471 "sms_outgoing_check_max_count";
6472
6473 /**
6474 * Used to disable SMS short code confirmation - defaults to true.
Robert Greenwalt026efcc2012-09-24 10:03:21 -07006475 * True indcates we will do the check, etc. Set to false to disable.
Jake Hamby76a61422012-09-06 17:40:21 -07006476 * @see com.android.internal.telephony.SmsUsageMonitor
6477 * @hide
6478 */
6479 public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation";
6480
Robert Greenwalt026efcc2012-09-24 10:03:21 -07006481 /**
6482 * Used to select which country we use to determine premium sms codes.
6483 * One of com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_SIM,
6484 * com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_NETWORK,
6485 * or com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_BOTH.
6486 * @hide
6487 */
6488 public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule";
6489
Jake Hamby76a61422012-09-06 17:40:21 -07006490 /**
JP Abgrall32d1ac4d2014-02-21 12:05:20 -08006491 * Used to select TCP's default initial receiver window size in segments - defaults to a build config value
6492 * @hide
6493 */
6494 public static final String TCP_DEFAULT_INIT_RWND = "tcp_default_init_rwnd";
6495
6496 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006497 * Used to disable Tethering on a device - defaults to true
6498 * @hide
6499 */
6500 public static final String TETHER_SUPPORTED = "tether_supported";
6501
6502 /**
6503 * Used to require DUN APN on the device or not - defaults to a build config value
6504 * which defaults to false
6505 * @hide
6506 */
6507 public static final String TETHER_DUN_REQUIRED = "tether_dun_required";
6508
6509 /**
6510 * Used to hold a gservices-provisioned apn value for DUN. If set, or the
6511 * corresponding build config values are set it will override the APN DB
6512 * values.
6513 * Consists of a comma seperated list of strings:
6514 * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
6515 * note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN"
6516 * @hide
6517 */
6518 public static final String TETHER_DUN_APN = "tether_dun_apn";
6519
6520 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006521 * USB Mass Storage Enabled
6522 */
6523 public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
6524
6525 /**
6526 * If this setting is set (to anything), then all references
6527 * to Gmail on the device must change to Google Mail.
6528 */
6529 public static final String USE_GOOGLE_MAIL = "use_google_mail";
6530
Hui Shu22671772014-10-01 21:41:07 +00006531 /**
6532 * Webview Data reduction proxy key.
6533 * @hide
6534 */
6535 public static final String WEBVIEW_DATA_REDUCTION_PROXY_KEY =
6536 "webview_data_reduction_proxy_key";
6537
Christopher Tate06efb532012-08-24 15:29:27 -07006538 /**
Jeff Brown89d55462012-09-19 11:33:42 -07006539 * Whether Wifi display is enabled/disabled
6540 * 0=disabled. 1=enabled.
6541 * @hide
6542 */
6543 public static final String WIFI_DISPLAY_ON = "wifi_display_on";
6544
6545 /**
Chong Zhang1f3ecaa2013-05-03 15:55:36 -07006546 * Whether Wifi display certification mode is enabled/disabled
6547 * 0=disabled. 1=enabled.
6548 * @hide
6549 */
6550 public static final String WIFI_DISPLAY_CERTIFICATION_ON =
6551 "wifi_display_certification_on";
6552
6553 /**
Chong Zhange38af812013-08-29 17:25:17 -07006554 * WPS Configuration method used by Wifi display, this setting only
6555 * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled).
6556 *
6557 * Possible values are:
6558 *
6559 * WpsInfo.INVALID: use default WPS method chosen by framework
6560 * WpsInfo.PBC : use Push button
6561 * WpsInfo.KEYPAD : use Keypad
6562 * WpsInfo.DISPLAY: use Display
6563 * @hide
6564 */
6565 public static final String WIFI_DISPLAY_WPS_CONFIG =
6566 "wifi_display_wps_config";
6567
6568 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006569 * Whether to notify the user of open networks.
6570 * <p>
6571 * If not connected and the scan results have an open network, we will
6572 * put this notification up. If we attempt to connect to a network or
6573 * the open network(s) disappear, we remove the notification. When we
6574 * show the notification, we will not show it again for
6575 * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time.
6576 */
6577 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
6578 "wifi_networks_available_notification_on";
6579 /**
6580 * {@hide}
6581 */
6582 public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON =
6583 "wimax_networks_available_notification_on";
6584
6585 /**
6586 * Delay (in seconds) before repeating the Wi-Fi networks available notification.
6587 * Connecting to a network will reset the timer.
6588 */
6589 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
6590 "wifi_networks_available_repeat_delay";
6591
6592 /**
Robert Greenwalt3ea0c992013-10-03 21:13:49 +00006593 * 802.11 country code in ISO 3166 format
6594 * @hide
6595 */
6596 public static final String WIFI_COUNTRY_CODE = "wifi_country_code";
6597
6598 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006599 * The interval in milliseconds to issue wake up scans when wifi needs
6600 * to connect. This is necessary to connect to an access point when
6601 * device is on the move and the screen is off.
6602 * @hide
6603 */
6604 public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS =
6605 "wifi_framework_scan_interval_ms";
6606
6607 /**
6608 * The interval in milliseconds after which Wi-Fi is considered idle.
6609 * When idle, it is possible for the device to be switched from Wi-Fi to
6610 * the mobile data network.
6611 * @hide
6612 */
6613 public static final String WIFI_IDLE_MS = "wifi_idle_ms";
6614
6615 /**
6616 * When the number of open networks exceeds this number, the
6617 * least-recently-used excess networks will be removed.
6618 */
6619 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept";
6620
6621 /**
6622 * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this.
6623 */
6624 public static final String WIFI_ON = "wifi_on";
6625
6626 /**
Irfan Sheriff11aefad2013-03-06 07:57:41 -08006627 * Setting to allow scans to be enabled even wifi is turned off for connectivity.
6628 * @hide
6629 */
6630 public static final String WIFI_SCAN_ALWAYS_AVAILABLE =
6631 "wifi_scan_always_enabled";
6632
6633 /**
Wei Wangd91f1932015-03-19 15:09:56 -07006634 * Settings to allow BLE scans to be enabled even when Bluetooth is turned off for
6635 * connectivity.
6636 * @hide
6637 */
6638 public static final String BLE_SCAN_ALWAYS_AVAILABLE =
6639 "ble_scan_always_enabled";
6640
6641 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006642 * Used to save the Wifi_ON state prior to tethering.
6643 * This state will be checked to restore Wifi after
6644 * the user turns off tethering.
6645 *
6646 * @hide
6647 */
6648 public static final String WIFI_SAVED_STATE = "wifi_saved_state";
6649
6650 /**
6651 * The interval in milliseconds to scan as used by the wifi supplicant
6652 * @hide
6653 */
6654 public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS =
6655 "wifi_supplicant_scan_interval_ms";
6656
vandwalle7c3606c2014-03-31 19:12:07 -07006657 /**
6658 * whether frameworks handles wifi auto-join
6659 * @hide
6660 */
6661 public static final String WIFI_ENHANCED_AUTO_JOIN =
6662 "wifi_enhanced_auto_join";
6663
6664 /**
6665 * whether settings show RSSI
6666 * @hide
6667 */
6668 public static final String WIFI_NETWORK_SHOW_RSSI =
6669 "wifi_network_show_rssi";
6670
6671 /**
Irfan Sheriff3809f502012-09-17 16:04:57 -07006672 * The interval in milliseconds to scan at supplicant when p2p is connected
6673 * @hide
6674 */
6675 public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS =
6676 "wifi_scan_interval_p2p_connected_ms";
6677
6678 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006679 * Whether the Wi-Fi watchdog is enabled.
6680 */
6681 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
6682
6683 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006684 * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and
6685 * the setting needs to be set to 0 to disable it.
6686 * @hide
6687 */
6688 public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED =
6689 "wifi_watchdog_poor_network_test_enabled";
6690
6691 /**
6692 * Setting to turn on suspend optimizations at screen off on Wi-Fi. Enabled by default and
6693 * needs to be set to 0 to disable it.
6694 * @hide
6695 */
6696 public static final String WIFI_SUSPEND_OPTIMIZATIONS_ENABLED =
6697 "wifi_suspend_optimizations_enabled";
6698
6699 /**
6700 * The maximum number of times we will retry a connection to an access
6701 * point for which we have failed in acquiring an IP address from DHCP.
6702 * A value of N means that we will make N+1 connection attempts in all.
6703 */
6704 public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
6705
6706 /**
6707 * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile
6708 * data connectivity to be established after a disconnect from Wi-Fi.
6709 */
6710 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
6711 "wifi_mobile_data_transition_wakelock_timeout_ms";
6712
6713 /**
Zoltan Szatmary-Ban4045d242015-05-27 12:42:39 +01006714 * This setting controls whether WiFi configurations created by a Device Owner app
6715 * should be locked down (that is, be editable or removable only by the Device Owner App,
6716 * not even by Settings app).
6717 * This setting takes integer values. Non-zero values mean DO created configurations
6718 * are locked down. Value of zero means they are not. Default value in the absence of
6719 * actual value to this setting is 0.
6720 */
6721 public static final String WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN =
6722 "wifi_device_owner_configs_lockdown";
6723
6724 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006725 * The operational wifi frequency band
6726 * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO},
6727 * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or
6728 * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ}
6729 *
6730 * @hide
6731 */
6732 public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band";
6733
6734 /**
6735 * The Wi-Fi peer-to-peer device name
6736 * @hide
6737 */
6738 public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name";
6739
6740 /**
Robert Greenwaltc12783a2013-05-16 12:48:20 -07006741 * The min time between wifi disable and wifi enable
6742 * @hide
6743 */
6744 public static final String WIFI_REENABLE_DELAY_MS = "wifi_reenable_delay";
6745
6746 /**
Jeff Davidsona20ca67d2014-12-16 11:48:54 -08006747 * Timeout for ephemeral networks when all known BSSIDs go out of range. We will disconnect
6748 * from an ephemeral network if there is no BSSID for that network with a non-null score that
6749 * has been seen in this time period.
6750 *
6751 * If this is less than or equal to zero, we use a more conservative behavior and only check
6752 * for a non-null score from the currently connected or target BSSID.
6753 * @hide
6754 */
6755 public static final String WIFI_EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS =
6756 "wifi_ephemeral_out_of_range_timeout_ms";
6757
6758 /**
Christopher Tatec868b642012-09-12 17:41:04 -07006759 * The number of milliseconds to delay when checking for data stalls during
6760 * non-aggressive detection. (screen is turned off.)
6761 * @hide
6762 */
6763 public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
6764 "data_stall_alarm_non_aggressive_delay_in_ms";
6765
6766 /**
6767 * The number of milliseconds to delay when checking for data stalls during
6768 * aggressive detection. (screen on or suspected data stall)
6769 * @hide
6770 */
6771 public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
6772 "data_stall_alarm_aggressive_delay_in_ms";
6773
6774 /**
Wink Savillece1e3792013-09-03 16:41:44 -07006775 * The number of milliseconds to allow the provisioning apn to remain active
6776 * @hide
6777 */
6778 public static final String PROVISIONING_APN_ALARM_DELAY_IN_MS =
6779 "provisioning_apn_alarm_delay_in_ms";
6780
6781 /**
Christopher Tatec868b642012-09-12 17:41:04 -07006782 * The interval in milliseconds at which to check gprs registration
6783 * after the first registration mismatch of gprs and voice service,
6784 * to detect possible data network registration problems.
6785 *
6786 * @hide
6787 */
6788 public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
6789 "gprs_register_check_period_ms";
6790
6791 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006792 * Nonzero causes Log.wtf() to crash.
6793 * @hide
6794 */
6795 public static final String WTF_IS_FATAL = "wtf_is_fatal";
6796
Eric Laurentbc0fab1f2012-09-19 11:24:41 -07006797 /**
6798 * Ringer mode. This is used internally, changing this value will not
6799 * change the ringer mode. See AudioManager.
6800 */
6801 public static final String MODE_RINGER = "mode_ringer";
Christopher Tate06efb532012-08-24 15:29:27 -07006802
Jeff Brownd4935962012-09-25 13:27:20 -07006803 /**
6804 * Overlay display devices setting.
6805 * The associated value is a specially formatted string that describes the
6806 * size and density of simulated secondary display devices.
6807 * <p>
6808 * Format: {width}x{height}/{dpi};...
6809 * </p><p>
6810 * Example:
6811 * <ul>
6812 * <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li>
6813 * <li><code>1920x1080/320;1280x720/213</code>: make two overlays, the first
6814 * at 1080p and the second at 720p.</li>
6815 * <li>If the value is empty, then no overlay display devices are created.</li>
6816 * </ul></p>
6817 *
6818 * @hide
6819 */
6820 public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices";
Christopher Tate06efb532012-08-24 15:29:27 -07006821
Jeff Sharkey625239a2012-09-26 22:03:49 -07006822 /**
6823 * Threshold values for the duration and level of a discharge cycle,
6824 * under which we log discharge cycle info.
6825 *
6826 * @hide
6827 */
6828 public static final String
6829 BATTERY_DISCHARGE_DURATION_THRESHOLD = "battery_discharge_duration_threshold";
6830
6831 /** @hide */
6832 public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold";
6833
6834 /**
6835 * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR
6836 * intents on application crashes and ANRs. If this is disabled, the
6837 * crash/ANR dialog will never display the "Report" button.
6838 * <p>
6839 * Type: int (0 = disallow, 1 = allow)
6840 *
6841 * @hide
6842 */
6843 public static final String SEND_ACTION_APP_ERROR = "send_action_app_error";
6844
6845 /**
6846 * Maximum age of entries kept by {@link DropBoxManager}.
6847 *
6848 * @hide
6849 */
6850 public static final String DROPBOX_AGE_SECONDS = "dropbox_age_seconds";
6851
6852 /**
6853 * Maximum number of entry files which {@link DropBoxManager} will keep
6854 * around.
6855 *
6856 * @hide
6857 */
6858 public static final String DROPBOX_MAX_FILES = "dropbox_max_files";
6859
6860 /**
6861 * Maximum amount of disk space used by {@link DropBoxManager} no matter
6862 * what.
6863 *
6864 * @hide
6865 */
6866 public static final String DROPBOX_QUOTA_KB = "dropbox_quota_kb";
6867
6868 /**
6869 * Percent of free disk (excluding reserve) which {@link DropBoxManager}
6870 * will use.
6871 *
6872 * @hide
6873 */
6874 public static final String DROPBOX_QUOTA_PERCENT = "dropbox_quota_percent";
6875
6876 /**
6877 * Percent of total disk which {@link DropBoxManager} will never dip
6878 * into.
6879 *
6880 * @hide
6881 */
6882 public static final String DROPBOX_RESERVE_PERCENT = "dropbox_reserve_percent";
6883
6884 /**
6885 * Prefix for per-tag dropbox disable/enable settings.
6886 *
6887 * @hide
6888 */
6889 public static final String DROPBOX_TAG_PREFIX = "dropbox:";
6890
6891 /**
6892 * Lines of logcat to include with system crash/ANR/etc. reports, as a
6893 * prefix of the dropbox tag of the report type. For example,
6894 * "logcat_for_system_server_anr" controls the lines of logcat captured
6895 * with system server ANR reports. 0 to disable.
6896 *
6897 * @hide
6898 */
6899 public static final String ERROR_LOGCAT_PREFIX = "logcat_for_";
6900
6901 /**
6902 * The interval in minutes after which the amount of free storage left
6903 * on the device is logged to the event log
6904 *
6905 * @hide
6906 */
6907 public static final String SYS_FREE_STORAGE_LOG_INTERVAL = "sys_free_storage_log_interval";
6908
6909 /**
6910 * Threshold for the amount of change in disk free space required to
6911 * report the amount of free space. Used to prevent spamming the logs
6912 * when the disk free space isn't changing frequently.
6913 *
6914 * @hide
6915 */
6916 public static final String
6917 DISK_FREE_CHANGE_REPORTING_THRESHOLD = "disk_free_change_reporting_threshold";
6918
6919 /**
6920 * Minimum percentage of free storage on the device that is used to
6921 * determine if the device is running low on storage. The default is 10.
6922 * <p>
6923 * Say this value is set to 10, the device is considered running low on
6924 * storage if 90% or more of the device storage is filled up.
6925 *
6926 * @hide
6927 */
6928 public static final String
6929 SYS_STORAGE_THRESHOLD_PERCENTAGE = "sys_storage_threshold_percentage";
6930
6931 /**
6932 * Maximum byte size of the low storage threshold. This is to ensure
6933 * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in an
6934 * overly large threshold for large storage devices. Currently this must
6935 * be less than 2GB. This default is 500MB.
6936 *
6937 * @hide
6938 */
6939 public static final String
6940 SYS_STORAGE_THRESHOLD_MAX_BYTES = "sys_storage_threshold_max_bytes";
6941
6942 /**
6943 * Minimum bytes of free storage on the device before the data partition
6944 * is considered full. By default, 1 MB is reserved to avoid system-wide
6945 * SQLite disk full exceptions.
6946 *
6947 * @hide
6948 */
6949 public static final String
6950 SYS_STORAGE_FULL_THRESHOLD_BYTES = "sys_storage_full_threshold_bytes";
6951
6952 /**
6953 * The maximum reconnect delay for short network outages or when the
6954 * network is suspended due to phone use.
6955 *
6956 * @hide
6957 */
6958 public static final String
6959 SYNC_MAX_RETRY_DELAY_IN_SECONDS = "sync_max_retry_delay_in_seconds";
6960
6961 /**
6962 * The number of milliseconds to delay before sending out
Erik Kline8f29dcf2014-12-08 16:25:20 +09006963 * {@link ConnectivityManager#CONNECTIVITY_ACTION} broadcasts. Ignored.
Jeff Sharkey625239a2012-09-26 22:03:49 -07006964 *
6965 * @hide
6966 */
6967 public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay";
6968
Vinit Deshapnde1f12cb52013-08-21 13:09:01 -07006969
6970 /**
6971 * Network sampling interval, in seconds. We'll generate link information
6972 * about bytes/packets sent and error rates based on data sampled in this interval
6973 *
6974 * @hide
6975 */
6976
6977 public static final String CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS =
6978 "connectivity_sampling_interval_in_seconds";
6979
Jeff Sharkey625239a2012-09-26 22:03:49 -07006980 /**
Jason Monk602b2322013-07-03 17:04:33 -04006981 * The series of successively longer delays used in retrying to download PAC file.
6982 * Last delay is used between successful PAC downloads.
6983 *
6984 * @hide
6985 */
6986 public static final String PAC_CHANGE_DELAY = "pac_change_delay";
6987
6988 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07006989 * Setting to turn off captive portal detection. Feature is enabled by
6990 * default and the setting needs to be set to 0 to disable it.
6991 *
6992 * @hide
6993 */
6994 public static final String
6995 CAPTIVE_PORTAL_DETECTION_ENABLED = "captive_portal_detection_enabled";
6996
6997 /**
6998 * The server used for captive portal detection upon a new conection. A
6999 * 204 response code from the server is used for validation.
7000 *
7001 * @hide
7002 */
7003 public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server";
7004
7005 /**
7006 * Whether network service discovery is enabled.
7007 *
7008 * @hide
7009 */
7010 public static final String NSD_ON = "nsd_on";
7011
7012 /**
7013 * Let user pick default install location.
7014 *
7015 * @hide
7016 */
7017 public static final String SET_INSTALL_LOCATION = "set_install_location";
7018
7019 /**
7020 * Default install location value.
7021 * 0 = auto, let system decide
7022 * 1 = internal
7023 * 2 = sdcard
7024 * @hide
7025 */
7026 public static final String DEFAULT_INSTALL_LOCATION = "default_install_location";
7027
7028 /**
7029 * ms during which to consume extra events related to Inet connection
7030 * condition after a transtion to fully-connected
7031 *
7032 * @hide
7033 */
7034 public static final String
7035 INET_CONDITION_DEBOUNCE_UP_DELAY = "inet_condition_debounce_up_delay";
7036
7037 /**
7038 * ms during which to consume extra events related to Inet connection
7039 * condtion after a transtion to partly-connected
7040 *
7041 * @hide
7042 */
7043 public static final String
7044 INET_CONDITION_DEBOUNCE_DOWN_DELAY = "inet_condition_debounce_down_delay";
7045
7046 /** {@hide} */
7047 public static final String
7048 READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default";
7049
7050 /**
7051 * Host name and port for global http proxy. Uses ':' seperator for
7052 * between host and port.
7053 */
7054 public static final String HTTP_PROXY = "http_proxy";
7055
7056 /**
7057 * Host name for global http proxy. Set via ConnectivityManager.
7058 *
7059 * @hide
7060 */
7061 public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host";
7062
7063 /**
7064 * Integer host port for global http proxy. Set via ConnectivityManager.
7065 *
7066 * @hide
7067 */
7068 public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port";
7069
7070 /**
7071 * Exclusion list for global proxy. This string contains a list of
7072 * comma-separated domains where the global proxy does not apply.
7073 * Domains should be listed in a comma- separated list. Example of
7074 * acceptable formats: ".domain1.com,my.domain2.com" Use
7075 * ConnectivityManager to set/get.
7076 *
7077 * @hide
7078 */
7079 public static final String
7080 GLOBAL_HTTP_PROXY_EXCLUSION_LIST = "global_http_proxy_exclusion_list";
7081
7082 /**
Jason Monk602b2322013-07-03 17:04:33 -04007083 * The location PAC File for the proxy.
7084 * @hide
7085 */
7086 public static final String
7087 GLOBAL_HTTP_PROXY_PAC = "global_proxy_pac_url";
7088
7089 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07007090 * Enables the UI setting to allow the user to specify the global HTTP
7091 * proxy and associated exclusion list.
7092 *
7093 * @hide
7094 */
7095 public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy";
7096
7097 /**
7098 * Setting for default DNS in case nobody suggests one
7099 *
7100 * @hide
7101 */
7102 public static final String DEFAULT_DNS_SERVER = "default_dns_server";
7103
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007104 /** {@hide} */
7105 public static final String
7106 BLUETOOTH_HEADSET_PRIORITY_PREFIX = "bluetooth_headset_priority_";
7107 /** {@hide} */
7108 public static final String
7109 BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX = "bluetooth_a2dp_sink_priority_";
7110 /** {@hide} */
7111 public static final String
7112 BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX = "bluetooth_input_device_priority_";
Kim Schulz0d376052013-08-22 11:18:02 +02007113 /** {@hide} */
7114 public static final String
7115 BLUETOOTH_MAP_PRIORITY_PREFIX = "bluetooth_map_priority_";
Casper Bonde2a5f6082015-03-19 10:36:45 +01007116 /** {@hide} */
7117 public static final String
7118 BLUETOOTH_SAP_PRIORITY_PREFIX = "bluetooth_sap_priority_";
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007119
7120 /**
Adam Lesinski31c05d12015-06-09 17:34:04 -07007121 * Device Idle (Doze) specific settings.
7122 * This is encoded as a key=value list, separated by commas. Ex:
7123 *
7124 * "inactive_timeout=60000,sensing_timeout=400000"
7125 *
7126 * The following keys are supported:
7127 *
7128 * <pre>
7129 * inactive_to (long)
7130 * sensing_to (long)
7131 * motion_inactive_to (long)
7132 * idle_after_inactive_to (long)
7133 * idle_pending_to (long)
7134 * max_idle_pending_to (long)
7135 * idle_pending_factor (float)
7136 * idle_to (long)
7137 * max_idle_to (long)
7138 * idle_factor (float)
7139 * min_time_to_alarm (long)
7140 * max_temp_app_whitelist_duration (long)
7141 * </pre>
7142 *
7143 * <p>
7144 * Type: string
7145 * @hide
7146 * @see com.android.server.DeviceIdleController.Constants
7147 */
7148 public static final String DEVICE_IDLE_CONSTANTS = "device_idle_constants";
7149
7150 /**
Adam Lesinskia6232df2015-06-11 18:16:41 -07007151 * App standby (app idle) specific settings.
7152 * This is encoded as a key=value list, separated by commas. Ex:
7153 *
7154 * "idle_duration=5000,parole_interval=4500"
7155 *
7156 * The following keys are supported:
7157 *
7158 * <pre>
7159 * idle_duration (long)
7160 * wallclock_threshold (long)
7161 * parole_interval (long)
7162 * parole_duration (long)
7163 * </pre>
7164 *
7165 * <p>
7166 * Type: string
7167 * @hide
7168 * @see com.android.server.usage.UsageStatsService.SettingsObserver
7169 */
7170 public static final String APP_IDLE_CONSTANTS = "app_idle_constants";
7171
7172 /**
Dianne Hackborna750a632015-06-16 17:18:23 -07007173 * Alarm manager specific settings.
7174 * This is encoded as a key=value list, separated by commas. Ex:
7175 *
7176 * "min_futurity=5000,allow_while_idle_short_time=4500"
7177 *
7178 * The following keys are supported:
7179 *
7180 * <pre>
7181 * min_futurity (long)
7182 * min_interval (long)
7183 * allow_while_idle_short_time (long)
7184 * allow_while_idle_long_time (long)
7185 * allow_while_idle_whitelist_duration (long)
7186 * </pre>
7187 *
7188 * <p>
7189 * Type: string
7190 * @hide
7191 * @see com.android.server.AlarmManagerService.Constants
7192 */
7193 public static final String ALARM_MANAGER_CONSTANTS = "alarm_manager_constants";
7194
7195 /**
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007196 * Get the key that retrieves a bluetooth headset's priority.
7197 * @hide
7198 */
7199 public static final String getBluetoothHeadsetPriorityKey(String address) {
Elliott Hughescb64d432013-08-02 10:00:44 -07007200 return BLUETOOTH_HEADSET_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007201 }
7202
7203 /**
7204 * Get the key that retrieves a bluetooth a2dp sink's priority.
7205 * @hide
7206 */
7207 public static final String getBluetoothA2dpSinkPriorityKey(String address) {
Elliott Hughescb64d432013-08-02 10:00:44 -07007208 return BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007209 }
7210
7211 /**
7212 * Get the key that retrieves a bluetooth Input Device's priority.
7213 * @hide
7214 */
7215 public static final String getBluetoothInputDevicePriorityKey(String address) {
Elliott Hughescb64d432013-08-02 10:00:44 -07007216 return BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007217 }
7218
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007219 /**
Kim Schulz0d376052013-08-22 11:18:02 +02007220 * Get the key that retrieves a bluetooth map priority.
7221 * @hide
7222 */
7223 public static final String getBluetoothMapPriorityKey(String address) {
7224 return BLUETOOTH_MAP_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
7225 }
Casper Bonde2a5f6082015-03-19 10:36:45 +01007226
7227 /**
7228 * Get the key that retrieves a bluetooth map priority.
7229 * @hide
7230 */
7231 public static final String getBluetoothSapPriorityKey(String address) {
7232 return BLUETOOTH_SAP_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
7233 }
7234
Kim Schulz0d376052013-08-22 11:18:02 +02007235 /**
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007236 * Scaling factor for normal window animations. Setting to 0 will
7237 * disable window animations.
7238 */
7239 public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale";
7240
7241 /**
7242 * Scaling factor for activity transition animations. Setting to 0 will
7243 * disable window animations.
7244 */
7245 public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale";
7246
7247 /**
7248 * Scaling factor for Animator-based animations. This affects both the
7249 * start delay and duration of all such animations. Setting to 0 will
7250 * cause animations to end immediately. The default value is 1.
7251 */
7252 public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale";
7253
7254 /**
7255 * Scaling factor for normal window animations. Setting to 0 will
7256 * disable window animations.
7257 *
7258 * @hide
7259 */
7260 public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations";
7261
7262 /**
7263 * If 0, the compatibility mode is off for all applications.
7264 * If 1, older applications run under compatibility mode.
7265 * TODO: remove this settings before code freeze (bug/1907571)
7266 * @hide
7267 */
7268 public static final String COMPATIBILITY_MODE = "compatibility_mode";
7269
7270 /**
7271 * CDMA only settings
7272 * Emergency Tone 0 = Off
7273 * 1 = Alert
7274 * 2 = Vibrate
7275 * @hide
7276 */
7277 public static final String EMERGENCY_TONE = "emergency_tone";
7278
7279 /**
7280 * CDMA only settings
7281 * Whether the auto retry is enabled. The value is
7282 * boolean (1 or 0).
7283 * @hide
7284 */
7285 public static final String CALL_AUTO_RETRY = "call_auto_retry";
7286
7287 /**
Sungmin Choie099ab12014-06-09 14:45:51 +09007288 * See RIL_PreferredNetworkType in ril.h
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007289 * @hide
7290 */
7291 public static final String PREFERRED_NETWORK_MODE =
7292 "preferred_network_mode";
7293
7294 /**
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007295 * Name of an application package to be debugged.
7296 */
7297 public static final String DEBUG_APP = "debug_app";
7298
7299 /**
7300 * If 1, when launching DEBUG_APP it will wait for the debugger before
7301 * starting user code. If 0, it will run normally.
7302 */
7303 public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger";
7304
7305 /**
7306 * Control whether the process CPU usage meter should be shown.
7307 */
7308 public static final String SHOW_PROCESSES = "show_processes";
7309
7310 /**
Ruchi Kandoi62b8a492014-04-17 18:01:40 -07007311 * If 1 low power mode is enabled.
7312 * @hide
7313 */
7314 public static final String LOW_POWER_MODE = "low_power";
7315
John Spurlockf8f524c2014-06-10 14:47:29 -04007316 /**
7317 * Battery level [1-99] at which low power mode automatically turns on.
Dianne Hackborn14272302014-06-10 23:13:02 -07007318 * If 0, it will not automatically turn on.
John Spurlockf8f524c2014-06-10 14:47:29 -04007319 * @hide
7320 */
7321 public static final String LOW_POWER_MODE_TRIGGER_LEVEL = "low_power_trigger_level";
7322
Ruchi Kandoi62b8a492014-04-17 18:01:40 -07007323 /**
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007324 * If 1, the activity manager will aggressively finish activities and
7325 * processes as soon as they are no longer needed. If 0, the normal
7326 * extended lifetime is used.
7327 */
Dianne Hackborn89ad4562014-08-24 16:45:38 -07007328 public static final String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities";
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007329
Christopher Tate66488d62012-10-02 11:58:01 -07007330 /**
Eric Laurent7ee1e4f2012-10-26 18:11:21 -07007331 * Use Dock audio output for media:
7332 * 0 = disabled
7333 * 1 = enabled
7334 * @hide
7335 */
7336 public static final String DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled";
7337
7338 /**
Eric Laurent05274f32012-11-29 12:48:18 -08007339 * Persisted safe headphone volume management state by AudioService
7340 * @hide
7341 */
7342 public static final String AUDIO_SAFE_VOLUME_STATE = "audio_safe_volume_state";
7343
7344 /**
Geremy Condraa0735112013-03-26 21:49:26 -07007345 * URL for tzinfo (time zone) updates
7346 * @hide
7347 */
7348 public static final String TZINFO_UPDATE_CONTENT_URL = "tzinfo_content_url";
7349
7350 /**
7351 * URL for tzinfo (time zone) update metadata
7352 * @hide
7353 */
7354 public static final String TZINFO_UPDATE_METADATA_URL = "tzinfo_metadata_url";
7355
7356 /**
7357 * URL for selinux (mandatory access control) updates
7358 * @hide
7359 */
7360 public static final String SELINUX_UPDATE_CONTENT_URL = "selinux_content_url";
7361
7362 /**
7363 * URL for selinux (mandatory access control) update metadata
7364 * @hide
7365 */
7366 public static final String SELINUX_UPDATE_METADATA_URL = "selinux_metadata_url";
7367
7368 /**
7369 * URL for sms short code updates
7370 * @hide
7371 */
7372 public static final String SMS_SHORT_CODES_UPDATE_CONTENT_URL =
7373 "sms_short_codes_content_url";
7374
7375 /**
7376 * URL for sms short code update metadata
7377 * @hide
7378 */
7379 public static final String SMS_SHORT_CODES_UPDATE_METADATA_URL =
7380 "sms_short_codes_metadata_url";
7381
7382 /**
7383 * URL for cert pinlist updates
7384 * @hide
7385 */
7386 public static final String CERT_PIN_UPDATE_CONTENT_URL = "cert_pin_content_url";
7387
7388 /**
7389 * URL for cert pinlist updates
7390 * @hide
7391 */
7392 public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url";
7393
Geremy Condra757ee522013-03-29 16:39:45 -07007394 /**
Ben Gruver633dc9b2013-04-04 12:05:49 -07007395 * URL for intent firewall updates
7396 * @hide
7397 */
7398 public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL =
7399 "intent_firewall_content_url";
7400
7401 /**
7402 * URL for intent firewall update metadata
7403 * @hide
7404 */
7405 public static final String INTENT_FIREWALL_UPDATE_METADATA_URL =
7406 "intent_firewall_metadata_url";
7407
7408 /**
Geremy Condra4e7f7e82013-03-26 21:09:01 -07007409 * SELinux enforcement status. If 0, permissive; if 1, enforcing.
7410 * @hide
7411 */
7412 public static final String SELINUX_STATUS = "selinux_status";
7413
Geremy Condraa0735112013-03-26 21:49:26 -07007414 /**
Amith Yamasanid8415f42013-08-07 20:15:10 -07007415 * Developer setting to force RTL layout.
7416 * @hide
7417 */
7418 public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl";
7419
7420 /**
Daniel Sandlerdea64622013-09-23 16:05:57 -04007421 * Milliseconds after screen-off after which low battery sounds will be silenced.
7422 *
7423 * If zero, battery sounds will always play.
7424 * Defaults to @integer/def_low_battery_sound_timeout in SettingsProvider.
7425 *
7426 * @hide
7427 */
7428 public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout";
7429
7430 /**
Evan Charltoncc7b0432014-01-14 14:47:11 -08007431 * Milliseconds to wait before bouncing Wi-Fi after settings is restored. Note that after
Dianne Hackborna3fb40d2014-08-12 15:06:50 -07007432 * the caller is done with this, they should call {@link ContentResolver#delete} to
Evan Charltoncc7b0432014-01-14 14:47:11 -08007433 * clean up any value that they may have written.
7434 *
7435 * @hide
7436 */
7437 public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms";
7438
John Spurlockc6d1c602014-01-17 15:22:06 -05007439 /**
7440 * Defines global runtime overrides to window policy.
7441 *
Jorim Jaggib10e33f2015-02-04 21:57:40 +01007442 * See {@link com.android.server.policy.PolicyControl} for value format.
John Spurlockc6d1c602014-01-17 15:22:06 -05007443 *
7444 * @hide
7445 */
7446 public static final String POLICY_CONTROL = "policy_control";
Evan Charltoncc7b0432014-01-14 14:47:11 -08007447
7448 /**
John Spurlockae641c92014-06-30 18:11:40 -04007449 * Defines global zen mode. ZEN_MODE_OFF, ZEN_MODE_IMPORTANT_INTERRUPTIONS,
7450 * or ZEN_MODE_NO_INTERRUPTIONS.
John Spurlocke677d712014-02-13 12:52:19 -05007451 *
7452 * @hide
7453 */
7454 public static final String ZEN_MODE = "zen_mode";
7455
7456 /** @hide */ public static final int ZEN_MODE_OFF = 0;
John Spurlockae641c92014-06-30 18:11:40 -04007457 /** @hide */ public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
7458 /** @hide */ public static final int ZEN_MODE_NO_INTERRUPTIONS = 2;
John Spurlock4f1163c2015-04-02 17:41:21 -04007459 /** @hide */ public static final int ZEN_MODE_ALARMS = 3;
John Spurlocke677d712014-02-13 12:52:19 -05007460
7461 /** @hide */ public static String zenModeToString(int mode) {
John Spurlockae641c92014-06-30 18:11:40 -04007462 if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS";
John Spurlock4f1163c2015-04-02 17:41:21 -04007463 if (mode == ZEN_MODE_ALARMS) return "ZEN_MODE_ALARMS";
John Spurlockae641c92014-06-30 18:11:40 -04007464 if (mode == ZEN_MODE_NO_INTERRUPTIONS) return "ZEN_MODE_NO_INTERRUPTIONS";
7465 return "ZEN_MODE_OFF";
John Spurlocke677d712014-02-13 12:52:19 -05007466 }
7467
John Spurlockb2278d62015-04-07 12:47:12 -04007468 /** @hide */ public static boolean isValidZenMode(int value) {
7469 switch (value) {
7470 case Global.ZEN_MODE_OFF:
7471 case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
7472 case Global.ZEN_MODE_ALARMS:
7473 case Global.ZEN_MODE_NO_INTERRUPTIONS:
7474 return true;
7475 default:
7476 return false;
7477 }
7478 }
7479
John Spurlocke677d712014-02-13 12:52:19 -05007480 /**
John Spurlock056c5192014-04-20 21:52:01 -04007481 * Opaque value, changes when persisted zen mode configuration changes.
7482 *
7483 * @hide
7484 */
7485 public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag";
7486
7487 /**
Chris Wren7bd241232014-02-28 16:25:05 -05007488 * Defines global heads up toggle. One of HEADS_UP_OFF, HEADS_UP_ON.
7489 *
7490 * @hide
7491 */
Chris Wren10d82df2014-03-01 10:34:51 -05007492 public static final String HEADS_UP_NOTIFICATIONS_ENABLED =
7493 "heads_up_notifications_enabled";
Chris Wren7bd241232014-02-28 16:25:05 -05007494
7495 /** @hide */ public static final int HEADS_UP_OFF = 0;
7496 /** @hide */ public static final int HEADS_UP_ON = 1;
7497
7498 /**
Jerome Poichet147b4d72014-05-12 18:13:27 -07007499 * The name of the device
7500 *
7501 * @hide
7502 */
7503 public static final String DEVICE_NAME = "device_name";
7504
7505 /**
Amith Yamasani1e9c2182014-06-11 17:25:51 -07007506 * Whether it should be possible to create a guest user on the device.
7507 * <p>
7508 * Type: int (0 for disabled, 1 for enabled)
7509 * @hide
7510 */
7511 public static final String GUEST_USER_ENABLED = "guest_user_enabled";
7512
7513 /**
Jeff Davidson56f9f732014-08-14 16:47:23 -07007514 * Whether the NetworkScoringService has been first initialized.
7515 * <p>
7516 * Type: int (0 for false, 1 for true)
7517 * @hide
7518 */
7519 public static final String NETWORK_SCORING_PROVISIONED = "network_scoring_provisioned";
7520
7521 /**
Jim Miller6848dc82014-10-13 18:51:53 -07007522 * Whether the user wants to be prompted for password to decrypt the device on boot.
7523 * This only matters if the storage is encrypted.
7524 * <p>
7525 * Type: int (0 for false, 1 for true)
7526 * @hide
7527 */
7528 public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt";
7529
7530 /**
Libin.Tang@motorola.com0499bb52014-10-10 14:55:57 -05007531 * Whether the Volte/VT is enabled
7532 * <p>
7533 * Type: int (0 for false, 1 for true)
7534 * @hide
7535 */
Etan Cohene41a9cf2014-10-22 10:50:46 -07007536 public static final String ENHANCED_4G_MODE_ENABLED = "volte_vt_enabled";
Libin.Tang@motorola.com0499bb52014-10-10 14:55:57 -05007537
7538 /**
Etan Cohen9c8f21b2014-12-23 15:02:19 -08007539 * Whether WFC is enabled
7540 * <p>
7541 * Type: int (0 for false, 1 for true)
7542 *
7543 * @hide
7544 */
7545 public static final String WFC_IMS_ENABLED = "wfc_ims_enabled";
7546
7547 /**
7548 * WFC Mode.
7549 * <p>
7550 * Type: int - 2=Wi-Fi preferred, 1=Cellular preferred, 0=Wi-Fi only
7551 *
7552 * @hide
7553 */
7554 public static final String WFC_IMS_MODE = "wfc_ims_mode";
7555
7556 /**
7557 * Whether WFC roaming is enabled
7558 * <p>
7559 * Type: int (0 for false, 1 for true)
7560 *
7561 * @hide
7562 */
7563 public static final String WFC_IMS_ROAMING_ENABLED = "wfc_ims_roaming_enabled";
7564
7565 /**
Etan Cohen7ab0ad12014-11-24 11:18:01 -08007566 * Global override to disable VoLTE (independent of user setting)
7567 * <p>
7568 * Type: int (1 for disable VoLTE, 0 to use user configuration)
7569 * @hide
7570 */
7571 public static final String VOLTE_FEATURE_DISABLED = "volte_feature_disabled";
7572
7573 /**
Amit Mahajan4fea0922014-11-18 12:56:28 -08007574 * Whether user can enable/disable LTE as a preferred network. A carrier might control
7575 * this via gservices, OMA-DM, carrier app, etc.
7576 * <p>
7577 * Type: int (0 for false, 1 for true)
7578 * @hide
7579 */
7580 public static final String LTE_SERVICE_FORCED = "lte_service_forced";
7581
7582 /**
Christopher Tate66488d62012-10-02 11:58:01 -07007583 * Settings to backup. This is here so that it's in the same place as the settings
7584 * keys and easy to update.
7585 *
7586 * These keys may be mentioned in the SETTINGS_TO_BACKUP arrays in System
7587 * and Secure as well. This is because those tables drive both backup and
7588 * restore, and restore needs to properly whitelist keys that used to live
7589 * in those namespaces. The keys will only actually be backed up / restored
7590 * if they are also mentioned in this table (Global.SETTINGS_TO_BACKUP).
7591 *
7592 * NOTE: Settings are backed up and restored in the order they appear
7593 * in this array. If you have one setting depending on another,
7594 * make sure that they are ordered appropriately.
7595 *
7596 * @hide
7597 */
7598 public static final String[] SETTINGS_TO_BACKUP = {
Christopher Tate58f41ec2013-01-11 15:40:36 -08007599 BUGREPORT_IN_POWER_MENU,
Christopher Tate66488d62012-10-02 11:58:01 -07007600 STAY_ON_WHILE_PLUGGED_IN,
Christopher Tate66488d62012-10-02 11:58:01 -07007601 AUTO_TIME,
7602 AUTO_TIME_ZONE,
7603 POWER_SOUNDS_ENABLED,
7604 DOCK_SOUNDS_ENABLED,
7605 USB_MASS_STORAGE_ENABLED,
7606 ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED,
7607 WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
7608 WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
Christopher Tate16eb7cd2012-10-09 15:26:30 -07007609 WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED,
Christopher Tate66488d62012-10-02 11:58:01 -07007610 WIFI_NUM_OPEN_NETWORKS_KEPT,
7611 EMERGENCY_TONE,
7612 CALL_AUTO_RETRY,
Amith Yamasani94005242014-10-31 11:35:13 -07007613 DOCK_AUDIO_MEDIA_ENABLED,
7614 LOW_POWER_MODE_TRIGGER_LEVEL
Christopher Tate66488d62012-10-02 11:58:01 -07007615 };
7616
Christopher Tate06efb532012-08-24 15:29:27 -07007617 // Populated lazily, guarded by class object:
Dianne Hackborn139748f2012-09-24 11:36:57 -07007618 private static NameValueCache sNameValueCache = new NameValueCache(
7619 SYS_PROP_SETTING_VERSION,
7620 CONTENT_URI,
7621 CALL_METHOD_GET_GLOBAL,
7622 CALL_METHOD_PUT_GLOBAL);
Christopher Tate06efb532012-08-24 15:29:27 -07007623
Christopher Tateaa036a22014-05-19 16:33:27 -07007624 // Certain settings have been moved from global to the per-user secure namespace
7625 private static final HashSet<String> MOVED_TO_SECURE;
7626 static {
7627 MOVED_TO_SECURE = new HashSet<String>(1);
7628 MOVED_TO_SECURE.add(Settings.Global.INSTALL_NON_MARKET_APPS);
7629 }
7630
Svetoslav683914b2015-01-15 14:22:26 -08007631 /** @hide */
7632 public static void getMovedToSecureSettings(Set<String> outKeySet) {
7633 outKeySet.addAll(MOVED_TO_SECURE);
7634 }
7635
Christopher Tate06efb532012-08-24 15:29:27 -07007636 /**
7637 * Look up a name in the database.
7638 * @param resolver to access the database with
7639 * @param name to look up in the table
7640 * @return the corresponding value, or null if not present
7641 */
Dianne Hackborn139748f2012-09-24 11:36:57 -07007642 public static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07007643 return getStringForUser(resolver, name, UserHandle.myUserId());
7644 }
7645
7646 /** @hide */
Dianne Hackborn139748f2012-09-24 11:36:57 -07007647 public static String getStringForUser(ContentResolver resolver, String name,
Christopher Tate06efb532012-08-24 15:29:27 -07007648 int userHandle) {
Christopher Tateaa036a22014-05-19 16:33:27 -07007649 if (MOVED_TO_SECURE.contains(name)) {
7650 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global"
7651 + " to android.provider.Settings.Secure, returning read-only value.");
7652 return Secure.getStringForUser(resolver, name, userHandle);
7653 }
Christopher Tate06efb532012-08-24 15:29:27 -07007654 return sNameValueCache.getStringForUser(resolver, name, userHandle);
7655 }
7656
7657 /**
7658 * Store a name/value pair into the database.
7659 * @param resolver to access the database with
7660 * @param name to store
7661 * @param value to associate with the name
7662 * @return true if the value was set, false on database errors
7663 */
7664 public static boolean putString(ContentResolver resolver,
7665 String name, String value) {
7666 return putStringForUser(resolver, name, value, UserHandle.myUserId());
7667 }
7668
7669 /** @hide */
7670 public static boolean putStringForUser(ContentResolver resolver,
7671 String name, String value, int userHandle) {
Christopher Tate06efb532012-08-24 15:29:27 -07007672 if (LOCAL_LOGV) {
7673 Log.v(TAG, "Global.putString(name=" + name + ", value=" + value
7674 + " for " + userHandle);
7675 }
Christopher Tateaa036a22014-05-19 16:33:27 -07007676 // Global and Secure have the same access policy so we can forward writes
7677 if (MOVED_TO_SECURE.contains(name)) {
7678 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global"
7679 + " to android.provider.Settings.Secure, value is unchanged.");
7680 return Secure.putStringForUser(resolver, name, value, userHandle);
7681 }
Christopher Tate06efb532012-08-24 15:29:27 -07007682 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
7683 }
7684
7685 /**
7686 * Construct the content URI for a particular name/value pair,
7687 * useful for monitoring changes with a ContentObserver.
7688 * @param name to look up in the table
7689 * @return the corresponding content URI, or null if not present
7690 */
7691 public static Uri getUriFor(String name) {
7692 return getUriFor(CONTENT_URI, name);
7693 }
7694
7695 /**
7696 * Convenience function for retrieving a single secure settings value
7697 * as an integer. Note that internally setting values are always
7698 * stored as strings; this function converts the string to an integer
7699 * for you. The default value will be returned if the setting is
7700 * not defined or not an integer.
7701 *
7702 * @param cr The ContentResolver to access.
7703 * @param name The name of the setting to retrieve.
7704 * @param def Value to return if the setting is not defined.
7705 *
7706 * @return The setting's current value, or 'def' if it is not defined
7707 * or not a valid integer.
7708 */
7709 public static int getInt(ContentResolver cr, String name, int def) {
7710 String v = getString(cr, name);
7711 try {
7712 return v != null ? Integer.parseInt(v) : def;
7713 } catch (NumberFormatException e) {
7714 return def;
7715 }
7716 }
7717
7718 /**
7719 * Convenience function for retrieving a single secure settings value
7720 * as an integer. Note that internally setting values are always
7721 * stored as strings; this function converts the string to an integer
7722 * for you.
7723 * <p>
7724 * This version does not take a default value. If the setting has not
7725 * been set, or the string value is not a number,
7726 * it throws {@link SettingNotFoundException}.
7727 *
7728 * @param cr The ContentResolver to access.
7729 * @param name The name of the setting to retrieve.
7730 *
7731 * @throws SettingNotFoundException Thrown if a setting by the given
7732 * name can't be found or the setting value is not an integer.
7733 *
7734 * @return The setting's current value.
7735 */
7736 public static int getInt(ContentResolver cr, String name)
7737 throws SettingNotFoundException {
7738 String v = getString(cr, name);
7739 try {
7740 return Integer.parseInt(v);
7741 } catch (NumberFormatException e) {
7742 throw new SettingNotFoundException(name);
7743 }
7744 }
7745
7746 /**
7747 * Convenience function for updating a single settings value as an
7748 * integer. This will either create a new entry in the table if the
7749 * given name does not exist, or modify the value of the existing row
7750 * with that name. Note that internally setting values are always
7751 * stored as strings, so this function converts the given value to a
7752 * string before storing it.
7753 *
7754 * @param cr The ContentResolver to access.
7755 * @param name The name of the setting to modify.
7756 * @param value The new value for the setting.
7757 * @return true if the value was set, false on database errors
7758 */
7759 public static boolean putInt(ContentResolver cr, String name, int value) {
7760 return putString(cr, name, Integer.toString(value));
7761 }
7762
7763 /**
7764 * Convenience function for retrieving a single secure settings value
7765 * as a {@code long}. Note that internally setting values are always
7766 * stored as strings; this function converts the string to a {@code long}
7767 * for you. The default value will be returned if the setting is
7768 * not defined or not a {@code long}.
7769 *
7770 * @param cr The ContentResolver to access.
7771 * @param name The name of the setting to retrieve.
7772 * @param def Value to return if the setting is not defined.
7773 *
7774 * @return The setting's current value, or 'def' if it is not defined
7775 * or not a valid {@code long}.
7776 */
7777 public static long getLong(ContentResolver cr, String name, long def) {
7778 String valString = getString(cr, name);
7779 long value;
7780 try {
7781 value = valString != null ? Long.parseLong(valString) : def;
7782 } catch (NumberFormatException e) {
7783 value = def;
7784 }
7785 return value;
7786 }
7787
7788 /**
7789 * Convenience function for retrieving a single secure settings value
7790 * as a {@code long}. Note that internally setting values are always
7791 * stored as strings; this function converts the string to a {@code long}
7792 * for you.
7793 * <p>
7794 * This version does not take a default value. If the setting has not
7795 * been set, or the string value is not a number,
7796 * it throws {@link SettingNotFoundException}.
7797 *
7798 * @param cr The ContentResolver to access.
7799 * @param name The name of the setting to retrieve.
7800 *
7801 * @return The setting's current value.
7802 * @throws SettingNotFoundException Thrown if a setting by the given
7803 * name can't be found or the setting value is not an integer.
7804 */
7805 public static long getLong(ContentResolver cr, String name)
7806 throws SettingNotFoundException {
7807 String valString = getString(cr, name);
7808 try {
7809 return Long.parseLong(valString);
7810 } catch (NumberFormatException e) {
7811 throw new SettingNotFoundException(name);
7812 }
7813 }
7814
7815 /**
7816 * Convenience function for updating a secure settings value as a long
7817 * integer. This will either create a new entry in the table if the
7818 * given name does not exist, or modify the value of the existing row
7819 * with that name. Note that internally setting values are always
7820 * stored as strings, so this function converts the given value to a
7821 * string before storing it.
7822 *
7823 * @param cr The ContentResolver to access.
7824 * @param name The name of the setting to modify.
7825 * @param value The new value for the setting.
7826 * @return true if the value was set, false on database errors
7827 */
7828 public static boolean putLong(ContentResolver cr, String name, long value) {
7829 return putString(cr, name, Long.toString(value));
7830 }
7831
7832 /**
7833 * Convenience function for retrieving a single secure settings value
7834 * as a floating point number. Note that internally setting values are
7835 * always stored as strings; this function converts the string to an
7836 * float for you. The default value will be returned if the setting
7837 * is not defined or not a valid float.
7838 *
7839 * @param cr The ContentResolver to access.
7840 * @param name The name of the setting to retrieve.
7841 * @param def Value to return if the setting is not defined.
7842 *
7843 * @return The setting's current value, or 'def' if it is not defined
7844 * or not a valid float.
7845 */
7846 public static float getFloat(ContentResolver cr, String name, float def) {
7847 String v = getString(cr, name);
7848 try {
7849 return v != null ? Float.parseFloat(v) : def;
7850 } catch (NumberFormatException e) {
7851 return def;
7852 }
7853 }
7854
7855 /**
7856 * Convenience function for retrieving a single secure settings value
7857 * as a float. Note that internally setting values are always
7858 * stored as strings; this function converts the string to a float
7859 * for you.
7860 * <p>
7861 * This version does not take a default value. If the setting has not
7862 * been set, or the string value is not a number,
7863 * it throws {@link SettingNotFoundException}.
7864 *
7865 * @param cr The ContentResolver to access.
7866 * @param name The name of the setting to retrieve.
7867 *
7868 * @throws SettingNotFoundException Thrown if a setting by the given
7869 * name can't be found or the setting value is not a float.
7870 *
7871 * @return The setting's current value.
7872 */
7873 public static float getFloat(ContentResolver cr, String name)
7874 throws SettingNotFoundException {
7875 String v = getString(cr, name);
7876 if (v == null) {
7877 throw new SettingNotFoundException(name);
7878 }
7879 try {
7880 return Float.parseFloat(v);
7881 } catch (NumberFormatException e) {
7882 throw new SettingNotFoundException(name);
7883 }
7884 }
7885
7886 /**
7887 * Convenience function for updating a single settings value as a
7888 * floating point number. This will either create a new entry in the
7889 * table if the given name does not exist, or modify the value of the
7890 * existing row with that name. Note that internally setting values
7891 * are always stored as strings, so this function converts the given
7892 * value to a string before storing it.
7893 *
7894 * @param cr The ContentResolver to access.
7895 * @param name The name of the setting to modify.
7896 * @param value The new value for the setting.
7897 * @return true if the value was set, false on database errors
7898 */
7899 public static boolean putFloat(ContentResolver cr, String name, float value) {
7900 return putString(cr, name, Float.toString(value));
7901 }
Wink Savillefb40dd42014-06-12 17:02:31 -07007902
7903
7904 /**
7905 * Subscription to be used for voice call on a multi sim device. The supported values
7906 * are 0 = SUB1, 1 = SUB2 and etc.
7907 * @hide
7908 */
7909 public static final String MULTI_SIM_VOICE_CALL_SUBSCRIPTION = "multi_sim_voice_call";
7910
7911 /**
7912 * Used to provide option to user to select subscription during dial.
7913 * The supported values are 0 = disable or 1 = enable prompt.
7914 * @hide
7915 */
7916 public static final String MULTI_SIM_VOICE_PROMPT = "multi_sim_voice_prompt";
7917
7918 /**
7919 * Subscription to be used for data call on a multi sim device. The supported values
7920 * are 0 = SUB1, 1 = SUB2 and etc.
7921 * @hide
7922 */
7923 public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call";
7924
7925 /**
7926 * Subscription to be used for SMS on a multi sim device. The supported values
7927 * are 0 = SUB1, 1 = SUB2 and etc.
7928 * @hide
7929 */
7930 public static final String MULTI_SIM_SMS_SUBSCRIPTION = "multi_sim_sms";
7931
7932 /**
7933 * Used to provide option to user to select subscription during send SMS.
7934 * The value 1 - enable, 0 - disable
7935 * @hide
7936 */
7937 public static final String MULTI_SIM_SMS_PROMPT = "multi_sim_sms_prompt";
7938
7939
7940
7941 /** User preferred subscriptions setting.
7942 * This holds the details of the user selected subscription from the card and
7943 * the activation status. Each settings string have the coma separated values
7944 * iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index
7945 * @hide
7946 */
7947 public static final String[] MULTI_SIM_USER_PREFERRED_SUBS = {"user_preferred_sub1",
7948 "user_preferred_sub2","user_preferred_sub3"};
Zheng Fub218ff42015-04-13 16:31:16 -07007949
7950 /**
7951 * Whether to enable new contacts aggregator or not.
7952 * The value 1 - enable, 0 - disable
7953 * @hide
7954 */
7955 public static final String NEW_CONTACT_AGGREGATOR = "new_contact_aggregator";
Zheng Fu31ce78c2015-04-15 16:57:53 -07007956
7957 /**
7958 * Whether to enable contacts metadata syncing or not
7959 * The value 1 - enable, 0 - disable
7960 * @hide
7961 */
7962 public static final String CONTACT_METADATA_SYNC = "contact_metadata_sync";
Christopher Tate06efb532012-08-24 15:29:27 -07007963 }
7964
7965 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08007966 * User-defined bookmarks and shortcuts. The target of each bookmark is an
7967 * Intent URL, allowing it to be either a web page or a particular
7968 * application activity.
7969 *
7970 * @hide
7971 */
7972 public static final class Bookmarks implements BaseColumns
7973 {
7974 private static final String TAG = "Bookmarks";
7975
7976 /**
7977 * The content:// style URL for this table
7978 */
7979 public static final Uri CONTENT_URI =
7980 Uri.parse("content://" + AUTHORITY + "/bookmarks");
7981
7982 /**
7983 * The row ID.
7984 * <p>Type: INTEGER</p>
7985 */
7986 public static final String ID = "_id";
7987
7988 /**
7989 * Descriptive name of the bookmark that can be displayed to the user.
7990 * If this is empty, the title should be resolved at display time (use
7991 * {@link #getTitle(Context, Cursor)} any time you want to display the
7992 * title of a bookmark.)
7993 * <P>
7994 * Type: TEXT
7995 * </P>
7996 */
7997 public static final String TITLE = "title";
7998
7999 /**
8000 * Arbitrary string (displayed to the user) that allows bookmarks to be
8001 * organized into categories. There are some special names for
8002 * standard folders, which all start with '@'. The label displayed for
8003 * the folder changes with the locale (via {@link #getLabelForFolder}) but
8004 * the folder name does not change so you can consistently query for
8005 * the folder regardless of the current locale.
8006 *
8007 * <P>Type: TEXT</P>
8008 *
8009 */
8010 public static final String FOLDER = "folder";
8011
8012 /**
8013 * The Intent URL of the bookmark, describing what it points to. This
8014 * value is given to {@link android.content.Intent#getIntent} to create
8015 * an Intent that can be launched.
8016 * <P>Type: TEXT</P>
8017 */
8018 public static final String INTENT = "intent";
8019
8020 /**
8021 * Optional shortcut character associated with this bookmark.
8022 * <P>Type: INTEGER</P>
8023 */
8024 public static final String SHORTCUT = "shortcut";
8025
8026 /**
8027 * The order in which the bookmark should be displayed
8028 * <P>Type: INTEGER</P>
8029 */
8030 public static final String ORDERING = "ordering";
8031
8032 private static final String[] sIntentProjection = { INTENT };
8033 private static final String[] sShortcutProjection = { ID, SHORTCUT };
8034 private static final String sShortcutSelection = SHORTCUT + "=?";
8035
8036 /**
8037 * Convenience function to retrieve the bookmarked Intent for a
8038 * particular shortcut key.
8039 *
8040 * @param cr The ContentResolver to query.
8041 * @param shortcut The shortcut key.
8042 *
8043 * @return Intent The bookmarked URL, or null if there is no bookmark
8044 * matching the given shortcut.
8045 */
8046 public static Intent getIntentForShortcut(ContentResolver cr, char shortcut)
8047 {
8048 Intent intent = null;
8049
8050 Cursor c = cr.query(CONTENT_URI,
8051 sIntentProjection, sShortcutSelection,
8052 new String[] { String.valueOf((int) shortcut) }, ORDERING);
8053 // Keep trying until we find a valid shortcut
8054 try {
8055 while (intent == null && c.moveToNext()) {
8056 try {
8057 String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT));
Christian Mehlmauera34d2c92010-05-25 19:04:20 +02008058 intent = Intent.parseUri(intentURI, 0);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008059 } catch (java.net.URISyntaxException e) {
8060 // The stored URL is bad... ignore it.
8061 } catch (IllegalArgumentException e) {
8062 // Column not found
Dianne Hackborna33e3f72009-09-29 17:28:24 -07008063 Log.w(TAG, "Intent column not found", e);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008064 }
8065 }
8066 } finally {
8067 if (c != null) c.close();
8068 }
8069
8070 return intent;
8071 }
8072
8073 /**
8074 * Add a new bookmark to the system.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008075 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008076 * @param cr The ContentResolver to query.
8077 * @param intent The desired target of the bookmark.
8078 * @param title Bookmark title that is shown to the user; null if none
8079 * or it should be resolved to the intent's title.
8080 * @param folder Folder in which to place the bookmark; null if none.
8081 * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If
8082 * this is non-zero and there is an existing bookmark entry
8083 * with this same shortcut, then that existing shortcut is
8084 * cleared (the bookmark is not removed).
8085 * @return The unique content URL for the new bookmark entry.
8086 */
8087 public static Uri add(ContentResolver cr,
8088 Intent intent,
8089 String title,
8090 String folder,
8091 char shortcut,
8092 int ordering)
8093 {
8094 // If a shortcut is supplied, and it is already defined for
8095 // another bookmark, then remove the old definition.
8096 if (shortcut != 0) {
Jeff Hamilton7cd51ef2010-05-12 17:30:27 -05008097 cr.delete(CONTENT_URI, sShortcutSelection,
8098 new String[] { String.valueOf((int) shortcut) });
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008099 }
8100
8101 ContentValues values = new ContentValues();
8102 if (title != null) values.put(TITLE, title);
8103 if (folder != null) values.put(FOLDER, folder);
Jean-Baptiste Queru3b9f0a32010-06-21 13:46:59 -07008104 values.put(INTENT, intent.toUri(0));
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008105 if (shortcut != 0) values.put(SHORTCUT, (int) shortcut);
8106 values.put(ORDERING, ordering);
8107 return cr.insert(CONTENT_URI, values);
8108 }
8109
8110 /**
8111 * Return the folder name as it should be displayed to the user. This
8112 * takes care of localizing special folders.
8113 *
8114 * @param r Resources object for current locale; only need access to
8115 * system resources.
8116 * @param folder The value found in the {@link #FOLDER} column.
8117 *
8118 * @return CharSequence The label for this folder that should be shown
8119 * to the user.
8120 */
8121 public static CharSequence getLabelForFolder(Resources r, String folder) {
8122 return folder;
8123 }
8124
8125 /**
8126 * Return the title as it should be displayed to the user. This takes
8127 * care of localizing bookmarks that point to activities.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008128 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008129 * @param context A context.
8130 * @param cursor A cursor pointing to the row whose title should be
8131 * returned. The cursor must contain at least the {@link #TITLE}
8132 * and {@link #INTENT} columns.
8133 * @return A title that is localized and can be displayed to the user,
8134 * or the empty string if one could not be found.
8135 */
8136 public static CharSequence getTitle(Context context, Cursor cursor) {
8137 int titleColumn = cursor.getColumnIndex(TITLE);
8138 int intentColumn = cursor.getColumnIndex(INTENT);
8139 if (titleColumn == -1 || intentColumn == -1) {
8140 throw new IllegalArgumentException(
8141 "The cursor must contain the TITLE and INTENT columns.");
8142 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008143
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008144 String title = cursor.getString(titleColumn);
8145 if (!TextUtils.isEmpty(title)) {
8146 return title;
8147 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008148
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008149 String intentUri = cursor.getString(intentColumn);
8150 if (TextUtils.isEmpty(intentUri)) {
8151 return "";
8152 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008153
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008154 Intent intent;
8155 try {
Christian Mehlmauera34d2c92010-05-25 19:04:20 +02008156 intent = Intent.parseUri(intentUri, 0);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008157 } catch (URISyntaxException e) {
8158 return "";
8159 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008160
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008161 PackageManager packageManager = context.getPackageManager();
8162 ResolveInfo info = packageManager.resolveActivity(intent, 0);
8163 return info != null ? info.loadLabel(packageManager) : "";
8164 }
8165 }
8166
8167 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008168 * Returns the device ID that we should use when connecting to the mobile gtalk server.
8169 * This is a string like "android-0x1242", where the hex string is the Android ID obtained
8170 * from the GoogleLoginService.
8171 *
8172 * @param androidId The Android ID for this device.
8173 * @return The device ID that should be used when connecting to the mobile gtalk server.
8174 * @hide
8175 */
8176 public static String getGTalkDeviceId(long androidId) {
8177 return "android-" + Long.toHexString(androidId);
8178 }
8179}