blob: cc569690cecd6836019a549dbee194366f330fed [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.provider;
18
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080019import android.annotation.SdkConstant;
20import android.annotation.SdkConstant.SdkConstantType;
Bryce Leecdfebd62015-02-02 08:19:11 -080021import android.annotation.SystemApi;
Narayan Kamathee69ff42011-06-28 12:07:18 +010022import android.app.SearchManager;
Jeff Sharkey6e2bee72012-10-01 13:39:08 -070023import android.app.WallpaperManager;
Mike LeBeau5d34e9b2010-02-10 19:34:56 -080024import android.content.ComponentName;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080025import android.content.ContentResolver;
26import android.content.ContentValues;
27import android.content.Context;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -080028import android.content.IContentProvider;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080029import android.content.Intent;
Dianne Hackbornb8b11a02010-03-10 15:53:11 -080030import android.content.pm.ActivityInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080031import android.content.pm.PackageManager;
32import android.content.pm.ResolveInfo;
33import android.content.res.Configuration;
34import android.content.res.Resources;
35import android.database.Cursor;
36import android.database.SQLException;
David Christie3f7b6522013-08-06 19:19:08 -070037import android.location.LocationManager;
Jeff Sharkey625239a2012-09-26 22:03:49 -070038import android.net.ConnectivityManager;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080039import android.net.Uri;
Irfan Sheriff36f74132010-11-04 16:57:37 -070040import android.net.wifi.WifiManager;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070041import android.os.BatteryManager;
42import android.os.Bundle;
Jeff Sharkey625239a2012-09-26 22:03:49 -070043import android.os.DropBoxManager;
Amith Yamasani52c489c2012-03-28 11:42:42 -070044import android.os.IBinder;
Amith Yamasani7ab8c4a2012-04-06 09:27:12 -070045import android.os.Process;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070046import android.os.RemoteException;
Amith Yamasani52c489c2012-03-28 11:42:42 -070047import android.os.ServiceManager;
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -070048import android.os.SystemProperties;
Dianne Hackbornf02b60a2012-08-16 10:48:27 -070049import android.os.UserHandle;
Jeff Sharkey625239a2012-09-26 22:03:49 -070050import android.os.Build.VERSION_CODES;
Narayan Kamath6d632962011-08-24 11:51:37 +010051import android.speech.tts.TextToSpeech;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080052import android.text.TextUtils;
53import android.util.AndroidException;
Svetoslav683914b2015-01-15 14:22:26 -080054import android.util.ArrayMap;
55import android.util.ArraySet;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080056import android.util.Log;
57
Svetoslav683914b2015-01-15 14:22:26 -080058import com.android.internal.util.ArrayUtils;
Amith Yamasani52c489c2012-03-28 11:42:42 -070059import com.android.internal.widget.ILockSettings;
60
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080061import java.net.URISyntaxException;
Svetoslav683914b2015-01-15 14:22:26 -080062import java.text.SimpleDateFormat;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080063import java.util.HashMap;
64import java.util.HashSet;
Elliott Hughescb64d432013-08-02 10:00:44 -070065import java.util.Locale;
Svetoslav683914b2015-01-15 14:22:26 -080066import java.util.Map;
67import java.util.Set;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080068
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080069/**
70 * The Settings provider contains global system-level device preferences.
71 */
72public final class Settings {
73
74 // Intent actions for Settings
75
76 /**
77 * Activity Action: Show system settings.
78 * <p>
79 * Input: Nothing.
80 * <p>
Gilles Debunnee90bed12011-08-30 14:28:27 -070081 * Output: Nothing.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080082 */
83 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
84 public static final String ACTION_SETTINGS = "android.settings.SETTINGS";
85
86 /**
87 * Activity Action: Show settings to allow configuration of APNs.
88 * <p>
89 * Input: Nothing.
90 * <p>
Gilles Debunnee90bed12011-08-30 14:28:27 -070091 * Output: Nothing.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080092 */
93 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
94 public static final String ACTION_APN_SETTINGS = "android.settings.APN_SETTINGS";
95
96 /**
97 * Activity Action: Show settings to allow configuration of current location
98 * sources.
99 * <p>
100 * In some cases, a matching Activity may not exist, so ensure you
101 * safeguard against this.
102 * <p>
103 * Input: Nothing.
104 * <p>
105 * Output: Nothing.
106 */
107 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
108 public static final String ACTION_LOCATION_SOURCE_SETTINGS =
109 "android.settings.LOCATION_SOURCE_SETTINGS";
110
111 /**
112 * Activity Action: Show settings to allow configuration of wireless controls
113 * such as Wi-Fi, Bluetooth and Mobile networks.
114 * <p>
115 * In some cases, a matching Activity may not exist, so ensure you
116 * safeguard against this.
117 * <p>
118 * Input: Nothing.
119 * <p>
120 * Output: Nothing.
121 */
122 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
123 public static final String ACTION_WIRELESS_SETTINGS =
124 "android.settings.WIRELESS_SETTINGS";
125
126 /**
127 * Activity Action: Show settings to allow entering/exiting airplane mode.
128 * <p>
129 * In some cases, a matching Activity may not exist, so ensure you
130 * safeguard against this.
131 * <p>
132 * Input: Nothing.
133 * <p>
134 * Output: Nothing.
135 */
136 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
137 public static final String ACTION_AIRPLANE_MODE_SETTINGS =
138 "android.settings.AIRPLANE_MODE_SETTINGS";
139
140 /**
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700141 * Activity Action: Modify Airplane mode settings using a voice command.
Barnaby James48f35522014-07-16 14:27:39 -0700142 * <p>
143 * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
144 * <p>
145 * This intent MUST be started using
146 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
147 * startVoiceActivity}.
148 * <p>
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700149 * Note: The activity implementing this intent MUST verify that
Barnaby James48f35522014-07-16 14:27:39 -0700150 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before
151 * modifying the setting.
152 * <p>
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700153 * Input: To tell which state airplane mode should be set to, add the
154 * {@link #EXTRA_AIRPLANE_MODE_ENABLED} extra to this Intent with the state specified.
155 * If the extra is not included, no changes will be made.
Barnaby James48f35522014-07-16 14:27:39 -0700156 * <p>
157 * Output: Nothing.
158 */
159 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
160 public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE =
161 "android.settings.VOICE_CONTROL_AIRPLANE_MODE";
162
163 /**
Dianne Hackborndd9b82c2009-09-03 00:18:47 -0700164 * Activity Action: Show settings for accessibility modules.
165 * <p>
166 * In some cases, a matching Activity may not exist, so ensure you
167 * safeguard against this.
168 * <p>
169 * Input: Nothing.
170 * <p>
171 * Output: Nothing.
172 */
173 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
174 public static final String ACTION_ACCESSIBILITY_SETTINGS =
175 "android.settings.ACCESSIBILITY_SETTINGS";
176
177 /**
Dianne Hackborna3fb40d2014-08-12 15:06:50 -0700178 * Activity Action: Show settings to control access to usage information.
179 * <p>
180 * In some cases, a matching Activity may not exist, so ensure you
181 * safeguard against this.
182 * <p>
183 * Input: Nothing.
184 * <p>
185 * Output: Nothing.
186 */
187 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
188 public static final String ACTION_USAGE_ACCESS_SETTINGS =
189 "android.settings.USAGE_ACCESS_SETTINGS";
190
191 /**
Jason Monk6f909782015-04-17 14:30:25 -0400192 * Activity Category: Show application settings related to usage access.
193 * <p>
194 * An activity that provides a user interface for adjusting usage access related
195 * preferences for its containing application. Optional but recommended for apps that
196 * use {@link android.Manifest.permission#PACKAGE_USAGE_STATS}.
197 * <p>
198 * The activity may define meta-data to describe what usage access is
199 * used for within their app with {@link #METADATA_USAGE_ACCESS_REASON}, which
200 * will be displayed in Settings.
201 * <p>
202 * Input: Nothing.
203 * <p>
204 * Output: Nothing.
205 */
206 @SdkConstant(SdkConstantType.INTENT_CATEGORY)
207 public static final String INTENT_CATEGORY_USAGE_ACCESS_CONFIG =
208 "android.intent.category.USAGE_ACCESS_CONFIG";
209
210 /**
211 * Metadata key: Reason for needing usage access.
212 * <p>
213 * A key for metadata attached to an activity that receives action
214 * {@link #INTENT_CATEGORY_USAGE_ACCESS_CONFIG}, shown to the
215 * user as description of how the app uses usage access.
216 * <p>
217 */
218 public static final String METADATA_USAGE_ACCESS_REASON =
219 "android.settings.metadata.USAGE_ACCESS_REASON";
220
221 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800222 * Activity Action: Show settings to allow configuration of security and
223 * location privacy.
224 * <p>
225 * In some cases, a matching Activity may not exist, so ensure you
226 * safeguard against this.
227 * <p>
228 * Input: Nothing.
229 * <p>
230 * Output: Nothing.
231 */
232 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
233 public static final String ACTION_SECURITY_SETTINGS =
234 "android.settings.SECURITY_SETTINGS";
235
236 /**
Maggie Benthall0469f412013-09-05 15:30:26 -0400237 * Activity Action: Show trusted credentials settings, opening to the user tab,
238 * to allow management of installed credentials.
239 * <p>
240 * In some cases, a matching Activity may not exist, so ensure you
241 * safeguard against this.
242 * <p>
243 * Input: Nothing.
244 * <p>
245 * Output: Nothing.
246 * @hide
247 */
248 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
249 public static final String ACTION_TRUSTED_CREDENTIALS_USER =
250 "com.android.settings.TRUSTED_CREDENTIALS_USER";
251
252 /**
253 * Activity Action: Show dialog explaining that an installed CA cert may enable
254 * monitoring of encrypted network traffic.
255 * <p>
256 * In some cases, a matching Activity may not exist, so ensure you
257 * safeguard against this.
258 * <p>
259 * Input: Nothing.
260 * <p>
261 * Output: Nothing.
262 * @hide
263 */
264 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
265 public static final String ACTION_MONITORING_CERT_INFO =
266 "com.android.settings.MONITORING_CERT_INFO";
267
268 /**
Amith Yamasanic15255a2009-09-23 15:33:19 -0700269 * Activity Action: Show settings to allow configuration of privacy options.
270 * <p>
271 * In some cases, a matching Activity may not exist, so ensure you
272 * safeguard against this.
273 * <p>
274 * Input: Nothing.
275 * <p>
276 * Output: Nothing.
277 */
278 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
279 public static final String ACTION_PRIVACY_SETTINGS =
280 "android.settings.PRIVACY_SETTINGS";
281
282 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800283 * Activity Action: Show settings to allow configuration of Wi-Fi.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800284 * <p>
285 * In some cases, a matching Activity may not exist, so ensure you
286 * safeguard against this.
287 * <p>
288 * Input: Nothing.
289 * <p>
290 * Output: Nothing.
291
292 */
293 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
294 public static final String ACTION_WIFI_SETTINGS =
295 "android.settings.WIFI_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700296
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800297 /**
298 * Activity Action: Show settings to allow configuration of a static IP
299 * address for Wi-Fi.
300 * <p>
301 * In some cases, a matching Activity may not exist, so ensure you safeguard
302 * against this.
303 * <p>
304 * Input: Nothing.
305 * <p>
306 * Output: Nothing.
307 */
308 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
309 public static final String ACTION_WIFI_IP_SETTINGS =
310 "android.settings.WIFI_IP_SETTINGS";
311
312 /**
313 * Activity Action: Show settings to allow configuration of Bluetooth.
314 * <p>
315 * In some cases, a matching Activity may not exist, so ensure you
316 * safeguard against this.
317 * <p>
318 * Input: Nothing.
319 * <p>
320 * Output: Nothing.
321 */
322 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
323 public static final String ACTION_BLUETOOTH_SETTINGS =
324 "android.settings.BLUETOOTH_SETTINGS";
325
326 /**
Jeff Brownc05c1ae2015-05-05 13:46:30 -0700327 * Activity Action: Show settings to allow configuration of cast endpoints.
Jeff Brown1a937b02014-07-01 22:13:04 -0700328 * <p>
329 * In some cases, a matching Activity may not exist, so ensure you
330 * safeguard against this.
331 * <p>
332 * Input: Nothing.
333 * <p>
334 * Output: Nothing.
335 */
336 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
337 public static final String ACTION_CAST_SETTINGS =
338 "android.settings.CAST_SETTINGS";
339
340 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800341 * Activity Action: Show settings to allow configuration of date and time.
342 * <p>
343 * In some cases, a matching Activity may not exist, so ensure you
344 * safeguard against this.
345 * <p>
346 * Input: Nothing.
347 * <p>
348 * Output: Nothing.
349 */
350 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
351 public static final String ACTION_DATE_SETTINGS =
352 "android.settings.DATE_SETTINGS";
353
354 /**
355 * Activity Action: Show settings to allow configuration of sound and volume.
356 * <p>
357 * In some cases, a matching Activity may not exist, so ensure you
358 * safeguard against this.
359 * <p>
360 * Input: Nothing.
361 * <p>
362 * Output: Nothing.
363 */
364 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
365 public static final String ACTION_SOUND_SETTINGS =
366 "android.settings.SOUND_SETTINGS";
367
368 /**
369 * Activity Action: Show settings to allow configuration of display.
370 * <p>
371 * In some cases, a matching Activity may not exist, so ensure you
372 * safeguard against this.
373 * <p>
374 * Input: Nothing.
375 * <p>
376 * Output: Nothing.
377 */
378 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
379 public static final String ACTION_DISPLAY_SETTINGS =
380 "android.settings.DISPLAY_SETTINGS";
381
382 /**
383 * Activity Action: Show settings to allow configuration of locale.
384 * <p>
385 * In some cases, a matching Activity may not exist, so ensure you
386 * safeguard against this.
387 * <p>
388 * Input: Nothing.
389 * <p>
390 * Output: Nothing.
391 */
392 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
393 public static final String ACTION_LOCALE_SETTINGS =
394 "android.settings.LOCALE_SETTINGS";
395
396 /**
397 * Activity Action: Show settings to configure input methods, in particular
398 * allowing the user to enable input methods.
399 * <p>
400 * In some cases, a matching Activity may not exist, so ensure you
401 * safeguard against this.
402 * <p>
403 * Input: Nothing.
404 * <p>
405 * Output: Nothing.
406 */
407 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
Dianne Hackborna3fb40d2014-08-12 15:06:50 -0700408 public static final String ACTION_VOICE_INPUT_SETTINGS =
409 "android.settings.VOICE_INPUT_SETTINGS";
410
411 /**
412 * Activity Action: Show settings to configure input methods, in particular
413 * allowing the user to enable input methods.
414 * <p>
415 * In some cases, a matching Activity may not exist, so ensure you
416 * safeguard against this.
417 * <p>
418 * Input: Nothing.
419 * <p>
420 * Output: Nothing.
421 */
422 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800423 public static final String ACTION_INPUT_METHOD_SETTINGS =
424 "android.settings.INPUT_METHOD_SETTINGS";
425
426 /**
Tadashi G. Takaokaf49688f2011-01-20 17:56:13 +0900427 * Activity Action: Show settings to enable/disable input method subtypes.
satok86417ea2010-10-27 14:11:03 +0900428 * <p>
429 * In some cases, a matching Activity may not exist, so ensure you
430 * safeguard against this.
431 * <p>
Tadashi G. Takaoka25480202011-01-20 23:13:02 +0900432 * To tell which input method's subtypes are displayed in the settings, add
433 * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id.
434 * If there is no extra in this Intent, subtypes from all installed input methods
435 * will be displayed in the settings.
436 *
437 * @see android.view.inputmethod.InputMethodInfo#getId
438 * <p>
satok86417ea2010-10-27 14:11:03 +0900439 * Input: Nothing.
440 * <p>
441 * Output: Nothing.
442 */
443 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
Tadashi G. Takaokaf49688f2011-01-20 17:56:13 +0900444 public static final String ACTION_INPUT_METHOD_SUBTYPE_SETTINGS =
445 "android.settings.INPUT_METHOD_SUBTYPE_SETTINGS";
satok86417ea2010-10-27 14:11:03 +0900446
447 /**
satok7cfc0ed2011-06-20 21:29:36 +0900448 * Activity Action: Show a dialog to select input method.
449 * <p>
450 * In some cases, a matching Activity may not exist, so ensure you
451 * safeguard against this.
452 * <p>
453 * Input: Nothing.
454 * <p>
455 * Output: Nothing.
456 * @hide
457 */
458 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
459 public static final String ACTION_SHOW_INPUT_METHOD_PICKER =
460 "android.settings.SHOW_INPUT_METHOD_PICKER";
461
462 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800463 * Activity Action: Show settings to manage the user input dictionary.
464 * <p>
Chet Haasee8222dd2013-09-05 07:44:18 -0700465 * Starting with {@link android.os.Build.VERSION_CODES#KITKAT},
Satoshi Kataoka2aa2bc52013-07-30 14:25:11 +0900466 * it is guaranteed there will always be an appropriate implementation for this Intent action.
467 * In prior releases of the platform this was optional, so ensure you safeguard against it.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800468 * <p>
469 * Input: Nothing.
470 * <p>
471 * Output: Nothing.
472 */
473 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
474 public static final String ACTION_USER_DICTIONARY_SETTINGS =
475 "android.settings.USER_DICTIONARY_SETTINGS";
476
477 /**
Gilles Debunnee90bed12011-08-30 14:28:27 -0700478 * Activity Action: Adds a word to the user dictionary.
479 * <p>
480 * In some cases, a matching Activity may not exist, so ensure you
481 * safeguard against this.
482 * <p>
483 * Input: An extra with key <code>word</code> that contains the word
484 * that should be added to the dictionary.
485 * <p>
486 * Output: Nothing.
487 *
488 * @hide
489 */
490 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
491 public static final String ACTION_USER_DICTIONARY_INSERT =
492 "com.android.settings.USER_DICTIONARY_INSERT";
493
494 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800495 * Activity Action: Show settings to allow configuration of application-related settings.
496 * <p>
497 * In some cases, a matching Activity may not exist, so ensure you
498 * safeguard against this.
499 * <p>
500 * Input: Nothing.
501 * <p>
502 * Output: Nothing.
503 */
504 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
505 public static final String ACTION_APPLICATION_SETTINGS =
506 "android.settings.APPLICATION_SETTINGS";
507
508 /**
509 * Activity Action: Show settings to allow configuration of application
Dianne Hackborn8d866e52012-10-10 18:39:45 -0700510 * development-related settings. As of
511 * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is
512 * a required part of the platform.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800513 * <p>
514 * Input: Nothing.
515 * <p>
516 * Output: Nothing.
517 */
518 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
519 public static final String ACTION_APPLICATION_DEVELOPMENT_SETTINGS =
520 "android.settings.APPLICATION_DEVELOPMENT_SETTINGS";
521
522 /**
523 * Activity Action: Show settings to allow configuration of quick launch shortcuts.
524 * <p>
525 * In some cases, a matching Activity may not exist, so ensure you
526 * safeguard against this.
527 * <p>
528 * Input: Nothing.
529 * <p>
530 * Output: Nothing.
531 */
532 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
533 public static final String ACTION_QUICK_LAUNCH_SETTINGS =
534 "android.settings.QUICK_LAUNCH_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700535
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800536 /**
537 * Activity Action: Show settings to manage installed applications.
538 * <p>
539 * In some cases, a matching Activity may not exist, so ensure you
540 * safeguard against this.
541 * <p>
542 * Input: Nothing.
543 * <p>
544 * Output: Nothing.
545 */
546 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
547 public static final String ACTION_MANAGE_APPLICATIONS_SETTINGS =
548 "android.settings.MANAGE_APPLICATIONS_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700549
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800550 /**
Winson Chung44e8ff92010-09-27 14:36:52 -0700551 * Activity Action: Show settings to manage all applications.
552 * <p>
553 * In some cases, a matching Activity may not exist, so ensure you
554 * safeguard against this.
555 * <p>
556 * Input: Nothing.
557 * <p>
558 * Output: Nothing.
559 */
560 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
561 public static final String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS =
562 "android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS";
563
564 /**
Dianne Hackbornb7bb3b32010-06-06 22:47:50 -0700565 * Activity Action: Show screen of details about a particular application.
566 * <p>
567 * In some cases, a matching Activity may not exist, so ensure you
568 * safeguard against this.
569 * <p>
570 * Input: The Intent's data URI specifies the application package name
571 * to be shown, with the "package" scheme. That is "package:com.my.app".
572 * <p>
573 * Output: Nothing.
574 */
575 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
576 public static final String ACTION_APPLICATION_DETAILS_SETTINGS =
577 "android.settings.APPLICATION_DETAILS_SETTINGS";
578
579 /**
Jason Monk287b8892015-06-10 10:39:23 -0400580 * Activity Action: Show screen for controlling which apps can ignore battery optimizations.
581 * <p>
Dianne Hackborn1958e5e2015-06-12 18:11:41 -0700582 * Input: Optionally, the Intent's data URI specifies the application package name
Jason Monk287b8892015-06-10 10:39:23 -0400583 * to be shown, with the "package" scheme. That is "package:com.my.app".
584 * <p>
585 * Output: Nothing.
Dianne Hackborn1958e5e2015-06-12 18:11:41 -0700586 * <p>
587 * You can use {@link android.os.PowerManager#isIgnoringBatteryOptimizations
588 * PowerManager.isIgnoringBatteryOptimizations()} to determine if an application is
589 * already ignoring optimizations.
Jason Monk287b8892015-06-10 10:39:23 -0400590 */
591 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
592 public static final String ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS =
593 "android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS";
594
595 /**
Dianne Hackborn35654b62013-01-14 17:38:02 -0800596 * @hide
597 * Activity Action: Show the "app ops" settings screen.
598 * <p>
599 * Input: Nothing.
600 * <p>
601 * Output: Nothing.
602 */
603 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
604 public static final String ACTION_APP_OPS_SETTINGS =
605 "android.settings.APP_OPS_SETTINGS";
606
607 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800608 * Activity Action: Show settings for system update functionality.
609 * <p>
610 * In some cases, a matching Activity may not exist, so ensure you
611 * safeguard against this.
612 * <p>
613 * Input: Nothing.
614 * <p>
615 * Output: Nothing.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700616 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800617 * @hide
618 */
619 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
620 public static final String ACTION_SYSTEM_UPDATE_SETTINGS =
621 "android.settings.SYSTEM_UPDATE_SETTINGS";
622
623 /**
624 * Activity Action: Show settings to allow configuration of sync settings.
625 * <p>
626 * In some cases, a matching Activity may not exist, so ensure you
627 * safeguard against this.
628 * <p>
Erikeebc8e22010-02-18 13:27:19 -0800629 * The account types available to add via the add account button may be restricted by adding an
630 * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's
631 * authorities. Only account types which can sync with that content provider will be offered to
632 * the user.
633 * <p>
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800634 * Input: Nothing.
635 * <p>
636 * Output: Nothing.
637 */
638 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
639 public static final String ACTION_SYNC_SETTINGS =
640 "android.settings.SYNC_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700641
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800642 /**
Erikeebc8e22010-02-18 13:27:19 -0800643 * Activity Action: Show add account screen for creating a new account.
644 * <p>
645 * In some cases, a matching Activity may not exist, so ensure you
646 * safeguard against this.
647 * <p>
648 * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES}
649 * extra to the Intent with one or more syncable content provider's authorities. Only account
650 * types which can sync with that content provider will be offered to the user.
651 * <p>
Alon Albert50359c22013-02-26 14:47:48 -0800652 * Account types can also be filtered by adding an {@link #EXTRA_ACCOUNT_TYPES} extra to the
653 * Intent with one or more account types.
654 * <p>
Erikeebc8e22010-02-18 13:27:19 -0800655 * Input: Nothing.
656 * <p>
657 * Output: Nothing.
658 */
659 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
660 public static final String ACTION_ADD_ACCOUNT =
661 "android.settings.ADD_ACCOUNT_SETTINGS";
662
663 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800664 * Activity Action: Show settings for selecting the network operator.
665 * <p>
666 * In some cases, a matching Activity may not exist, so ensure you
667 * safeguard against this.
668 * <p>
669 * Input: Nothing.
670 * <p>
671 * Output: Nothing.
672 */
673 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
674 public static final String ACTION_NETWORK_OPERATOR_SETTINGS =
675 "android.settings.NETWORK_OPERATOR_SETTINGS";
676
677 /**
678 * Activity Action: Show settings for selection of 2G/3G.
679 * <p>
680 * In some cases, a matching Activity may not exist, so ensure you
681 * safeguard against this.
682 * <p>
683 * Input: Nothing.
684 * <p>
685 * Output: Nothing.
686 */
687 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
688 public static final String ACTION_DATA_ROAMING_SETTINGS =
689 "android.settings.DATA_ROAMING_SETTINGS";
690
691 /**
692 * Activity Action: Show settings for internal storage.
693 * <p>
694 * In some cases, a matching Activity may not exist, so ensure you
695 * safeguard against this.
696 * <p>
697 * Input: Nothing.
698 * <p>
699 * Output: Nothing.
700 */
701 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
702 public static final String ACTION_INTERNAL_STORAGE_SETTINGS =
703 "android.settings.INTERNAL_STORAGE_SETTINGS";
704 /**
705 * Activity Action: Show settings for memory card storage.
706 * <p>
707 * In some cases, a matching Activity may not exist, so ensure you
708 * safeguard against this.
709 * <p>
710 * Input: Nothing.
711 * <p>
712 * Output: Nothing.
713 */
714 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
715 public static final String ACTION_MEMORY_CARD_SETTINGS =
716 "android.settings.MEMORY_CARD_SETTINGS";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -0700717
Justin Mattsonef340352010-01-13 21:05:46 -0800718 /**
719 * Activity Action: Show settings for global search.
720 * <p>
721 * In some cases, a matching Activity may not exist, so ensure you
722 * safeguard against this.
723 * <p>
724 * Input: Nothing.
725 * <p>
726 * Output: Nothing
727 */
728 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
729 public static final String ACTION_SEARCH_SETTINGS =
730 "android.search.action.SEARCH_SETTINGS";
731
Daniel Sandler9d8b8762010-01-22 20:50:15 -0500732 /**
733 * Activity Action: Show general device information settings (serial
734 * number, software version, phone number, etc.).
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_DEVICE_INFO_SETTINGS =
745 "android.settings.DEVICE_INFO_SETTINGS";
746
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500747 /**
Nick Pellycccf01d2011-10-31 14:49:40 -0700748 * Activity Action: Show NFC settings.
749 * <p>
750 * This shows UI that allows NFC to be turned on or off.
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500751 * <p>
752 * In some cases, a matching Activity may not exist, so ensure you
753 * safeguard against this.
754 * <p>
755 * Input: Nothing.
756 * <p>
757 * Output: Nothing
Nick Pellycccf01d2011-10-31 14:49:40 -0700758 * @see android.nfc.NfcAdapter#isEnabled()
759 */
760 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
761 public static final String ACTION_NFC_SETTINGS = "android.settings.NFC_SETTINGS";
762
763 /**
764 * Activity Action: Show NFC Sharing settings.
765 * <p>
766 * This shows UI that allows NDEF Push (Android Beam) to be turned on or
767 * off.
768 * <p>
769 * In some cases, a matching Activity may not exist, so ensure you
770 * safeguard against this.
771 * <p>
772 * Input: Nothing.
773 * <p>
774 * Output: Nothing
775 * @see android.nfc.NfcAdapter#isNdefPushEnabled()
Martijn Coenen9b3c83f2011-07-28 11:21:39 -0500776 */
777 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
778 public static final String ACTION_NFCSHARING_SETTINGS =
779 "android.settings.NFCSHARING_SETTINGS";
780
Daniel Sandlerc08cd022012-11-27 22:47:37 -0500781 /**
Martijn Coenen62c196a2013-08-09 13:43:34 -0700782 * Activity Action: Show NFC Tap & Pay settings
783 * <p>
784 * This shows UI that allows the user to configure Tap&Pay
785 * settings.
786 * <p>
787 * In some cases, a matching Activity may not exist, so ensure you
788 * safeguard against this.
789 * <p>
790 * Input: Nothing.
791 * <p>
792 * Output: Nothing
793 */
794 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
795 public static final String ACTION_NFC_PAYMENT_SETTINGS =
796 "android.settings.NFC_PAYMENT_SETTINGS";
797
798 /**
Daniel Sandlerc08cd022012-11-27 22:47:37 -0500799 * Activity Action: Show Daydream settings.
800 * <p>
801 * In some cases, a matching Activity may not exist, so ensure you
802 * safeguard against this.
803 * <p>
804 * Input: Nothing.
805 * <p>
806 * Output: Nothing.
807 * @see android.service.dreams.DreamService
Daniel Sandlerc08cd022012-11-27 22:47:37 -0500808 */
809 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
810 public static final String ACTION_DREAM_SETTINGS = "android.settings.DREAM_SETTINGS";
811
Daniel Sandler5feceeb2013-03-22 18:29:23 -0700812 /**
813 * Activity Action: Show Notification listener settings.
814 * <p>
815 * In some cases, a matching Activity may not exist, so ensure you
816 * safeguard against this.
817 * <p>
818 * Input: Nothing.
819 * <p>
820 * Output: Nothing.
821 * @see android.service.notification.NotificationListenerService
Daniel Sandler5feceeb2013-03-22 18:29:23 -0700822 */
823 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
824 public static final String ACTION_NOTIFICATION_LISTENER_SETTINGS
Chris Wren8326a8a2014-10-22 14:13:32 -0400825 = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS";
Daniel Sandler5feceeb2013-03-22 18:29:23 -0700826
Alan Viverette69ce69b2013-08-29 12:23:48 -0700827 /**
John Spurlock80774932015-05-07 17:38:50 -0400828 * Activity Action: Show Do Not Disturb access settings.
829 * <p>
John Spurlock7c74f782015-06-04 13:01:42 -0400830 * Users can grant and deny access to Do Not Disturb configuration from here.
831 * See {@link android.app.NotificationManager#isNotificationPolicyAccessGranted()} for more
832 * details.
John Spurlock80774932015-05-07 17:38:50 -0400833 * <p>
834 * Input: Nothing.
835 * <p>
836 * Output: Nothing.
837 */
838 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
John Spurlock7c74f782015-06-04 13:01:42 -0400839 public static final String ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS
840 = "android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS";
John Spurlock80774932015-05-07 17:38:50 -0400841
842 /**
John Spurlock7340fc82014-04-24 18:50:12 -0400843 * @hide
844 */
845 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
846 public static final String ACTION_CONDITION_PROVIDER_SETTINGS
847 = "android.settings.ACTION_CONDITION_PROVIDER_SETTINGS";
848
849 /**
Alan Viverette69ce69b2013-08-29 12:23:48 -0700850 * Activity Action: Show settings for video captioning.
851 * <p>
852 * In some cases, a matching Activity may not exist, so ensure you safeguard
853 * against this.
854 * <p>
855 * Input: Nothing.
856 * <p>
857 * Output: Nothing.
858 */
859 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
860 public static final String ACTION_CAPTIONING_SETTINGS = "android.settings.CAPTIONING_SETTINGS";
861
Svetoslav773f54d2013-09-03 14:01:43 -0700862 /**
863 * Activity Action: Show the top level print settings.
864 * <p>
865 * In some cases, a matching Activity may not exist, so ensure you
866 * safeguard against this.
867 * <p>
868 * Input: Nothing.
869 * <p>
870 * Output: Nothing.
871 */
872 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
873 public static final String ACTION_PRINT_SETTINGS =
874 "android.settings.ACTION_PRINT_SETTINGS";
875
John Spurlockde547002014-02-28 17:50:39 -0500876 /**
877 * Activity Action: Show Zen Mode configuration settings.
878 *
879 * @hide
880 */
881 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
882 public static final String ACTION_ZEN_MODE_SETTINGS = "android.settings.ZEN_MODE_SETTINGS";
883
Santos Cordona4c75242014-07-09 12:07:51 -0700884 /**
John Spurlockfc746f82015-04-03 13:47:14 -0400885 * Activity Action: Show Zen Mode priority configuration settings.
886 *
887 * @hide
888 */
889 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
890 public static final String ACTION_ZEN_MODE_PRIORITY_SETTINGS
891 = "android.settings.ZEN_MODE_PRIORITY_SETTINGS";
892
893 /**
John Spurlock7af10182015-04-03 15:10:31 -0400894 * Activity Action: Show Zen Mode automation configuration settings.
895 *
896 * @hide
897 */
898 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
899 public static final String ACTION_ZEN_MODE_AUTOMATION_SETTINGS
900 = "android.settings.ZEN_MODE_AUTOMATION_SETTINGS";
901
902 /**
Barnaby Jamesb3006d32015-04-02 17:49:54 -0700903 * Activity Action: Modify do not disturb mode settings.
904 * <p>
905 * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
906 * <p>
907 * This intent MUST be started using
908 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
909 * startVoiceActivity}.
910 * <p>
911 * Note: The Activity implementing this intent MUST verify that
912 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction}.
913 * returns true before modifying the setting.
914 * <p>
915 * Input: The optional {@link #EXTRA_DO_NOT_DISTURB_MODE_MINUTES} extra can be used to indicate
916 * how long the user wishes to avoid interruptions for. The optional
917 * {@link #EXTRA_DO_NOT_DISTURB_MODE_ENABLED} extra can be to indicate if the user is
918 * enabling or disabling do not disturb mode. If either extra is not included, the
919 * user maybe asked to provide the value.
920 * <p>
921 * Output: Nothing.
922 */
923 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
924 public static final String ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE =
925 "android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE";
926
927 /**
John Spurlockb2278d62015-04-07 12:47:12 -0400928 * Activity Action: Show Zen Mode schedule rule configuration settings.
929 *
930 * @hide
931 */
932 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
933 public static final String ACTION_ZEN_MODE_SCHEDULE_RULE_SETTINGS
934 = "android.settings.ZEN_MODE_SCHEDULE_RULE_SETTINGS";
935
936 /**
John Spurlockd60258f2015-04-30 09:30:52 -0400937 * Activity Action: Show Zen Mode event rule configuration settings.
938 *
939 * @hide
940 */
941 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
942 public static final String ACTION_ZEN_MODE_EVENT_RULE_SETTINGS
943 = "android.settings.ZEN_MODE_EVENT_RULE_SETTINGS";
944
945 /**
John Spurlock39581cc2015-04-10 11:59:01 -0400946 * Activity Action: Show Zen Mode external rule configuration settings.
947 *
948 * @hide
949 */
950 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
951 public static final String ACTION_ZEN_MODE_EXTERNAL_RULE_SETTINGS
952 = "android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS";
953
954 /**
Santos Cordona4c75242014-07-09 12:07:51 -0700955 * Activity Action: Show the regulatory information screen for the device.
956 * <p>
957 * In some cases, a matching Activity may not exist, so ensure you safeguard
958 * against this.
959 * <p>
960 * Input: Nothing.
961 * <p>
962 * Output: Nothing.
963 */
Jeff Sharkeydd77fda2014-04-16 17:23:08 -0700964 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
965 public static final String
966 ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO";
967
Jerome Poichet7974cb32014-05-14 12:04:43 -0700968 /**
969 * Activity Action: Show Device Name Settings.
970 * <p>
971 * In some cases, a matching Activity may not exist, so ensure you safeguard
Tim Kilbourn87cd0dc2014-04-14 15:37:51 -0700972 * against this.
Jerome Poichet7974cb32014-05-14 12:04:43 -0700973 *
974 * @hide
975 */
976 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
977 public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME";
978
Tim Kilbourn87cd0dc2014-04-14 15:37:51 -0700979 /**
980 * Activity Action: Show pairing settings.
981 * <p>
982 * In some cases, a matching Activity may not exist, so ensure you safeguard
983 * against this.
984 *
985 * @hide
986 */
987 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
988 public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS";
989
John Spurlockf8f524c2014-06-10 14:47:29 -0400990 /**
991 * Activity Action: Show battery saver settings.
John Spurlock73466662014-10-30 13:42:05 -0400992 * <p>
993 * In some cases, a matching Activity may not exist, so ensure you safeguard
994 * against this.
John Spurlockf8f524c2014-06-10 14:47:29 -0400995 */
996 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
997 public static final String ACTION_BATTERY_SAVER_SETTINGS
998 = "android.settings.BATTERY_SAVER_SETTINGS";
999
Amith Yamasanieb7b94a2014-07-14 18:02:08 -07001000 /**
Barnaby Jamesb3006d32015-04-02 17:49:54 -07001001 * Activity Action: Modify Battery Saver mode setting using a voice command.
1002 * <p>
1003 * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
1004 * <p>
1005 * This intent MUST be started using
1006 * {@link android.service.voice.VoiceInteractionSession#startVoiceActivity
1007 * startVoiceActivity}.
1008 * <p>
1009 * Note: The activity implementing this intent MUST verify that
1010 * {@link android.app.Activity#isVoiceInteraction isVoiceInteraction} returns true before
1011 * modifying the setting.
1012 * <p>
1013 * Input: To tell which state batter saver mode should be set to, add the
1014 * {@link #EXTRA_BATTERY_SAVER_MODE_ENABLED} extra to this Intent with the state specified.
1015 * If the extra is not included, no changes will be made.
1016 * <p>
1017 * Output: Nothing.
1018 */
1019 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1020 public static final String ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE =
1021 "android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE";
1022
1023 /**
Amith Yamasanieb7b94a2014-07-14 18:02:08 -07001024 * Activity Action: Show Home selection settings. If there are multiple activities
1025 * that can satisfy the {@link Intent#CATEGORY_HOME} intent, this screen allows you
1026 * to pick your preferred activity.
1027 */
1028 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1029 public static final String ACTION_HOME_SETTINGS
1030 = "android.settings.HOME_SETTINGS";
1031
John Spurlock2b0e09c2014-07-27 13:27:47 -04001032 /**
1033 * Activity Action: Show notification settings.
1034 *
1035 * @hide
1036 */
1037 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1038 public static final String ACTION_NOTIFICATION_SETTINGS
1039 = "android.settings.NOTIFICATION_SETTINGS";
1040
1041 /**
1042 * Activity Action: Show notification settings for a single app.
1043 *
1044 * @hide
1045 */
1046 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1047 public static final String ACTION_APP_NOTIFICATION_SETTINGS
1048 = "android.settings.APP_NOTIFICATION_SETTINGS";
1049
Chris Wrencd8f4f72014-08-27 18:48:13 -04001050 /**
1051 * Activity Action: Show notification redaction settings.
1052 *
1053 * @hide
1054 */
1055 @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
1056 public static final String ACTION_APP_NOTIFICATION_REDACTION
1057 = "android.settings.ACTION_APP_NOTIFICATION_REDACTION";
1058
John Spurlock2b0e09c2014-07-27 13:27:47 -04001059 /** @hide */ public static final String EXTRA_APP_UID = "app_uid";
1060 /** @hide */ public static final String EXTRA_APP_PACKAGE = "app_package";
1061
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001062 // End of Intent actions for Settings
1063
Erikeebc8e22010-02-18 13:27:19 -08001064 /**
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001065 * @hide - Private call() method on SettingsProvider to read from 'system' table.
1066 */
1067 public static final String CALL_METHOD_GET_SYSTEM = "GET_system";
1068
1069 /**
1070 * @hide - Private call() method on SettingsProvider to read from 'secure' table.
1071 */
1072 public static final String CALL_METHOD_GET_SECURE = "GET_secure";
1073
1074 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001075 * @hide - Private call() method on SettingsProvider to read from 'global' table.
1076 */
1077 public static final String CALL_METHOD_GET_GLOBAL = "GET_global";
1078
1079 /**
1080 * @hide - User handle argument extra to the fast-path call()-based requests
1081 */
1082 public static final String CALL_METHOD_USER_KEY = "_user";
1083
1084 /** @hide - Private call() method to write to 'system' table */
1085 public static final String CALL_METHOD_PUT_SYSTEM = "PUT_system";
1086
1087 /** @hide - Private call() method to write to 'secure' table */
1088 public static final String CALL_METHOD_PUT_SECURE = "PUT_secure";
1089
1090 /** @hide - Private call() method to write to 'global' table */
1091 public static final String CALL_METHOD_PUT_GLOBAL= "PUT_global";
1092
1093 /**
Erikeebc8e22010-02-18 13:27:19 -08001094 * Activity Extra: Limit available options in launched activity based on the given authority.
1095 * <p>
1096 * This can be passed as an extra field in an Activity Intent with one or more syncable content
1097 * provider's authorities as a String[]. This field is used by some intents to alter the
1098 * behavior of the called activity.
1099 * <p>
1100 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based
1101 * on the authority given.
1102 */
Alon Albert50359c22013-02-26 14:47:48 -08001103 public static final String EXTRA_AUTHORITIES = "authorities";
1104
Alon Albertd35bf1f2013-04-18 14:26:51 -07001105 /**
1106 * Activity Extra: Limit available options in launched activity based on the given account
1107 * types.
1108 * <p>
1109 * This can be passed as an extra field in an Activity Intent with one or more account types
1110 * as a String[]. This field is used by some intents to alter the behavior of the called
1111 * activity.
1112 * <p>
1113 * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types to the specified
1114 * list.
1115 */
Alon Albert50359c22013-02-26 14:47:48 -08001116 public static final String EXTRA_ACCOUNT_TYPES = "account_types";
Erikeebc8e22010-02-18 13:27:19 -08001117
Tadashi G. Takaoka25480202011-01-20 23:13:02 +09001118 public static final String EXTRA_INPUT_METHOD_ID = "input_method_id";
1119
Barnaby James48f35522014-07-16 14:27:39 -07001120 /**
Michael Wrightc93fbd12014-09-22 20:07:59 -07001121 * Activity Extra: The device identifier to act upon.
1122 * <p>
1123 * This can be passed as an extra field in an Activity Intent with a single
1124 * InputDeviceIdentifier. This field is used by some activities to jump straight into the
1125 * settings for the given device.
1126 * <p>
Dianne Hackbornad6a99b2014-11-18 10:11:10 -08001127 * Example: The {@link #ACTION_INPUT_METHOD_SETTINGS} intent opens the keyboard layout
1128 * dialog for the given device.
Michael Wrightc93fbd12014-09-22 20:07:59 -07001129 * @hide
1130 */
1131 public static final String EXTRA_INPUT_DEVICE_IDENTIFIER = "input_device_identifier";
1132
1133 /**
Barnaby James48f35522014-07-16 14:27:39 -07001134 * Activity Extra: Enable or disable Airplane Mode.
1135 * <p>
1136 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE}
Barnaby Jamesb3006d32015-04-02 17:49:54 -07001137 * intent as a boolean to indicate if it should be enabled.
Barnaby James48f35522014-07-16 14:27:39 -07001138 */
1139 public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled";
1140
Barnaby Jamesb3006d32015-04-02 17:49:54 -07001141 /**
1142 * Activity Extra: Enable or disable Battery saver mode.
1143 * <p>
1144 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE}
1145 * intent as a boolean to indicate if it should be enabled.
1146 */
1147 public static final String EXTRA_BATTERY_SAVER_MODE_ENABLED =
1148 "android.settings.extra.battery_saver_mode_enabled";
1149
1150 /**
1151 * Activity Extra: Enable or disable Do Not Disturb mode.
1152 * <p>
1153 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE}
1154 * intent as a boolean to indicate if it should be enabled.
1155 */
1156 public static final String EXTRA_DO_NOT_DISTURB_MODE_ENABLED =
1157 "android.settings.extra.do_not_disturb_mode_enabled";
1158
1159 /**
1160 * Activity Extra: How many minutes to enable do not disturb mode for.
1161 * <p>
1162 * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_DO_NOT_DISTURB_MODE}
1163 * intent to indicate how long do not disturb mode should be enabled for.
1164 */
1165 public static final String EXTRA_DO_NOT_DISTURB_MODE_MINUTES =
1166 "android.settings.extra.do_not_disturb_mode_minutes";
1167
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001168 private static final String JID_RESOURCE_PREFIX = "android";
1169
1170 public static final String AUTHORITY = "settings";
1171
1172 private static final String TAG = "Settings";
Christopher Tate06efb532012-08-24 15:29:27 -07001173 private static final boolean LOCAL_LOGV = false;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001174
David Christie3f7b6522013-08-06 19:19:08 -07001175 // Lock ensures that when enabling/disabling the master location switch, we don't end up
1176 // with a partial enable/disable state in multi-threaded situations.
1177 private static final Object mLocationSettingsLock = new Object();
1178
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001179 public static class SettingNotFoundException extends AndroidException {
1180 public SettingNotFoundException(String msg) {
1181 super(msg);
1182 }
1183 }
1184
1185 /**
1186 * Common base for tables of name/value settings.
1187 */
1188 public static class NameValueTable implements BaseColumns {
1189 public static final String NAME = "name";
1190 public static final String VALUE = "value";
1191
1192 protected static boolean putString(ContentResolver resolver, Uri uri,
1193 String name, String value) {
1194 // The database will take care of replacing duplicates.
1195 try {
1196 ContentValues values = new ContentValues();
1197 values.put(NAME, name);
1198 values.put(VALUE, value);
1199 resolver.insert(uri, values);
1200 return true;
1201 } catch (SQLException e) {
Dianne Hackborna33e3f72009-09-29 17:28:24 -07001202 Log.w(TAG, "Can't set key " + name + " in " + uri, e);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001203 return false;
1204 }
1205 }
1206
1207 public static Uri getUriFor(Uri uri, String name) {
1208 return Uri.withAppendedPath(uri, name);
1209 }
1210 }
1211
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001212 // Thread-safe.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001213 private static class NameValueCache {
1214 private final String mVersionSystemProperty;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001215 private final Uri mUri;
1216
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001217 private static final String[] SELECT_VALUE =
1218 new String[] { Settings.NameValueTable.VALUE };
1219 private static final String NAME_EQ_PLACEHOLDER = "name=?";
1220
1221 // Must synchronize on 'this' to access mValues and mValuesVersion.
Dan Egnor799f7212009-11-24 16:24:44 -08001222 private final HashMap<String, String> mValues = new HashMap<String, String>();
1223 private long mValuesVersion = 0;
1224
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001225 // Initially null; set lazily and held forever. Synchronized on 'this'.
1226 private IContentProvider mContentProvider = null;
1227
1228 // The method we'll call (or null, to not use) on the provider
1229 // for the fast path of retrieving settings.
Christopher Tate06efb532012-08-24 15:29:27 -07001230 private final String mCallGetCommand;
1231 private final String mCallSetCommand;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001232
Christopher Tate06efb532012-08-24 15:29:27 -07001233 public NameValueCache(String versionSystemProperty, Uri uri,
1234 String getCommand, String setCommand) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001235 mVersionSystemProperty = versionSystemProperty;
1236 mUri = uri;
Christopher Tate06efb532012-08-24 15:29:27 -07001237 mCallGetCommand = getCommand;
1238 mCallSetCommand = setCommand;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001239 }
1240
Christopher Tate06efb532012-08-24 15:29:27 -07001241 private IContentProvider lazyGetProvider(ContentResolver cr) {
1242 IContentProvider cp = null;
1243 synchronized (this) {
1244 cp = mContentProvider;
1245 if (cp == null) {
1246 cp = mContentProvider = cr.acquireProvider(mUri.getAuthority());
1247 }
1248 }
1249 return cp;
1250 }
1251
1252 public boolean putStringForUser(ContentResolver cr, String name, String value,
1253 final int userHandle) {
1254 try {
1255 Bundle arg = new Bundle();
1256 arg.putString(Settings.NameValueTable.VALUE, value);
Christopher Tated5fe1472012-09-10 15:48:38 -07001257 arg.putInt(CALL_METHOD_USER_KEY, userHandle);
Christopher Tate06efb532012-08-24 15:29:27 -07001258 IContentProvider cp = lazyGetProvider(cr);
Dianne Hackborn35654b62013-01-14 17:38:02 -08001259 cp.call(cr.getPackageName(), mCallSetCommand, name, arg);
Christopher Tate06efb532012-08-24 15:29:27 -07001260 } catch (RemoteException e) {
1261 Log.w(TAG, "Can't set key " + name + " in " + mUri, e);
1262 return false;
1263 }
1264 return true;
1265 }
1266
Christopher Tate06efb532012-08-24 15:29:27 -07001267 public String getStringForUser(ContentResolver cr, String name, final int userHandle) {
Christopher Tate78d2a662012-09-13 16:19:44 -07001268 final boolean isSelf = (userHandle == UserHandle.myUserId());
1269 if (isSelf) {
1270 long newValuesVersion = SystemProperties.getLong(mVersionSystemProperty, 0);
Dan Egnor799f7212009-11-24 16:24:44 -08001271
Christopher Tate78d2a662012-09-13 16:19:44 -07001272 // Our own user's settings data uses a client-side cache
1273 synchronized (this) {
1274 if (mValuesVersion != newValuesVersion) {
1275 if (LOCAL_LOGV || false) {
1276 Log.v(TAG, "invalidate [" + mUri.getLastPathSegment() + "]: current "
1277 + newValuesVersion + " != cached " + mValuesVersion);
1278 }
1279
1280 mValues.clear();
1281 mValuesVersion = newValuesVersion;
Dan Egnor799f7212009-11-24 16:24:44 -08001282 }
1283
Christopher Tate78d2a662012-09-13 16:19:44 -07001284 if (mValues.containsKey(name)) {
1285 return mValues.get(name); // Could be null, that's OK -- negative caching
1286 }
Dan Egnor799f7212009-11-24 16:24:44 -08001287 }
Christopher Tate78d2a662012-09-13 16:19:44 -07001288 } else {
1289 if (LOCAL_LOGV) Log.v(TAG, "get setting for user " + userHandle
1290 + " by user " + UserHandle.myUserId() + " so skipping cache");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001291 }
Dan Egnor799f7212009-11-24 16:24:44 -08001292
Christopher Tate06efb532012-08-24 15:29:27 -07001293 IContentProvider cp = lazyGetProvider(cr);
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001294
1295 // Try the fast path first, not using query(). If this
1296 // fails (alternate Settings provider that doesn't support
1297 // this interface?) then we fall back to the query/table
1298 // interface.
Christopher Tate06efb532012-08-24 15:29:27 -07001299 if (mCallGetCommand != null) {
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001300 try {
Christopher Tate06efb532012-08-24 15:29:27 -07001301 Bundle args = null;
Christopher Tate5e08af02012-09-21 17:17:22 -07001302 if (!isSelf) {
Christopher Tate06efb532012-08-24 15:29:27 -07001303 args = new Bundle();
1304 args.putInt(CALL_METHOD_USER_KEY, userHandle);
1305 }
Dianne Hackborn35654b62013-01-14 17:38:02 -08001306 Bundle b = cp.call(cr.getPackageName(), mCallGetCommand, name, args);
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001307 if (b != null) {
1308 String value = b.getPairValue();
Christopher Tate78d2a662012-09-13 16:19:44 -07001309 // Don't update our cache for reads of other users' data
1310 if (isSelf) {
1311 synchronized (this) {
1312 mValues.put(name, value);
1313 }
1314 } else {
1315 if (LOCAL_LOGV) Log.i(TAG, "call-query of user " + userHandle
1316 + " by " + UserHandle.myUserId()
1317 + " so not updating cache");
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001318 }
1319 return value;
1320 }
1321 // If the response Bundle is null, we fall through
1322 // to the query interface below.
1323 } catch (RemoteException e) {
1324 // Not supported by the remote side? Fall through
1325 // to query().
1326 }
1327 }
1328
Dan Egnor799f7212009-11-24 16:24:44 -08001329 Cursor c = null;
1330 try {
Dianne Hackborn35654b62013-01-14 17:38:02 -08001331 c = cp.query(cr.getPackageName(), mUri, SELECT_VALUE, NAME_EQ_PLACEHOLDER,
Jeff Brown75ea64f2012-01-25 19:37:13 -08001332 new String[]{name}, null, null);
Dan Egnor799f7212009-11-24 16:24:44 -08001333 if (c == null) {
1334 Log.w(TAG, "Can't get key " + name + " from " + mUri);
1335 return null;
1336 }
1337
1338 String value = c.moveToNext() ? c.getString(0) : null;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001339 synchronized (this) {
Dan Egnor799f7212009-11-24 16:24:44 -08001340 mValues.put(name, value);
1341 }
1342 if (LOCAL_LOGV) {
1343 Log.v(TAG, "cache miss [" + mUri.getLastPathSegment() + "]: " +
1344 name + " = " + (value == null ? "(null)" : value));
1345 }
1346 return value;
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08001347 } catch (RemoteException e) {
Dan Egnor799f7212009-11-24 16:24:44 -08001348 Log.w(TAG, "Can't get key " + name + " from " + mUri, e);
1349 return null; // Return null, but don't cache it.
1350 } finally {
1351 if (c != null) c.close();
1352 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001353 }
1354 }
1355
1356 /**
1357 * System settings, containing miscellaneous system preferences. This
1358 * table holds simple name/value pairs. There are convenience
1359 * functions for accessing individual settings entries.
1360 */
1361 public static final class System extends NameValueTable {
1362 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_system_version";
1363
Svetoslav683914b2015-01-15 14:22:26 -08001364 /** @hide */
1365 public static interface Validator {
1366 public boolean validate(String value);
1367 }
1368
Dianne Hackborn139748f2012-09-24 11:36:57 -07001369 /**
1370 * The content:// style URL for this table
1371 */
1372 public static final Uri CONTENT_URI =
1373 Uri.parse("content://" + AUTHORITY + "/system");
1374
1375 private static final NameValueCache sNameValueCache = new NameValueCache(
1376 SYS_PROP_SETTING_VERSION,
1377 CONTENT_URI,
1378 CALL_METHOD_GET_SYSTEM,
1379 CALL_METHOD_PUT_SYSTEM);
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07001380
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001381 private static final HashSet<String> MOVED_TO_SECURE;
1382 static {
1383 MOVED_TO_SECURE = new HashSet<String>(30);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001384 MOVED_TO_SECURE.add(Secure.ANDROID_ID);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001385 MOVED_TO_SECURE.add(Secure.HTTP_PROXY);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001386 MOVED_TO_SECURE.add(Secure.LOCATION_PROVIDERS_ALLOWED);
Danielle Millett925a7d82012-03-19 18:02:20 -04001387 MOVED_TO_SECURE.add(Secure.LOCK_BIOMETRIC_WEAK_FLAGS);
Amith Yamasani156c4352010-03-05 17:10:03 -08001388 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_ENABLED);
1389 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_VISIBLE);
1390 MOVED_TO_SECURE.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001391 MOVED_TO_SECURE.add(Secure.LOGGING_ID);
1392 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_ENABLED);
1393 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_LAST_UPDATE);
1394 MOVED_TO_SECURE.add(Secure.PARENTAL_CONTROL_REDIRECT_URL);
1395 MOVED_TO_SECURE.add(Secure.SETTINGS_CLASSNAME);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001396 MOVED_TO_SECURE.add(Secure.USE_GOOGLE_MAIL);
1397 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON);
1398 MOVED_TO_SECURE.add(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY);
1399 MOVED_TO_SECURE.add(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT);
1400 MOVED_TO_SECURE.add(Secure.WIFI_ON);
1401 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE);
1402 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_AP_COUNT);
1403 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS);
1404 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED);
1405 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS);
1406 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT);
1407 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_MAX_AP_CHECKS);
1408 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_ON);
1409 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_COUNT);
1410 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_DELAY_MS);
1411 MOVED_TO_SECURE.add(Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS);
Christopher Tateaa036a22014-05-19 16:33:27 -07001412
1413 // At one time in System, then Global, but now back in Secure
1414 MOVED_TO_SECURE.add(Secure.INSTALL_NON_MARKET_APPS);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001415 }
1416
Christopher Tate06efb532012-08-24 15:29:27 -07001417 private static final HashSet<String> MOVED_TO_GLOBAL;
Christopher Tate66488d62012-10-02 11:58:01 -07001418 private static final HashSet<String> MOVED_TO_SECURE_THEN_GLOBAL;
Christopher Tate06efb532012-08-24 15:29:27 -07001419 static {
1420 MOVED_TO_GLOBAL = new HashSet<String>();
Christopher Tate66488d62012-10-02 11:58:01 -07001421 MOVED_TO_SECURE_THEN_GLOBAL = new HashSet<String>();
1422
Christopher Tate92198742012-09-07 12:00:13 -07001423 // these were originally in system but migrated to secure in the past,
1424 // so are duplicated in the Secure.* namespace
Christopher Tate66488d62012-10-02 11:58:01 -07001425 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.ADB_ENABLED);
1426 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.BLUETOOTH_ON);
1427 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DATA_ROAMING);
1428 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.DEVICE_PROVISIONED);
Christopher Tate66488d62012-10-02 11:58:01 -07001429 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.USB_MASS_STORAGE_ENABLED);
1430 MOVED_TO_SECURE_THEN_GLOBAL.add(Global.HTTP_PROXY);
Christopher Tate06efb532012-08-24 15:29:27 -07001431
Christopher Tate92198742012-09-07 12:00:13 -07001432 // these are moving directly from system to global
Christopher Tate06efb532012-08-24 15:29:27 -07001433 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_ON);
1434 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_RADIOS);
1435 MOVED_TO_GLOBAL.add(Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS);
1436 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME);
1437 MOVED_TO_GLOBAL.add(Settings.Global.AUTO_TIME_ZONE);
1438 MOVED_TO_GLOBAL.add(Settings.Global.CAR_DOCK_SOUND);
1439 MOVED_TO_GLOBAL.add(Settings.Global.CAR_UNDOCK_SOUND);
1440 MOVED_TO_GLOBAL.add(Settings.Global.DESK_DOCK_SOUND);
1441 MOVED_TO_GLOBAL.add(Settings.Global.DESK_UNDOCK_SOUND);
1442 MOVED_TO_GLOBAL.add(Settings.Global.DOCK_SOUNDS_ENABLED);
1443 MOVED_TO_GLOBAL.add(Settings.Global.LOCK_SOUND);
1444 MOVED_TO_GLOBAL.add(Settings.Global.UNLOCK_SOUND);
1445 MOVED_TO_GLOBAL.add(Settings.Global.LOW_BATTERY_SOUND);
1446 MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED);
1447 MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN);
1448 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY);
Eric Laurentbc0fab1f2012-09-19 11:24:41 -07001449 MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER);
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07001450 MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE);
1451 MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE);
1452 MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE);
1453 MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS);
1454 MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE);
1455 MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE);
1456 MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY);
1457 MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP);
1458 MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER);
1459 MOVED_TO_GLOBAL.add(Settings.Global.SHOW_PROCESSES);
1460 MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES);
Geremy Condraa0735112013-03-26 21:49:26 -07001461 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_CONTENT_URL);
1462 MOVED_TO_GLOBAL.add(Settings.Global.TZINFO_UPDATE_METADATA_URL);
1463 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_CONTENT_URL);
1464 MOVED_TO_GLOBAL.add(Settings.Global.SELINUX_UPDATE_METADATA_URL);
1465 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL);
1466 MOVED_TO_GLOBAL.add(Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL);
1467 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_CONTENT_URL);
1468 MOVED_TO_GLOBAL.add(Settings.Global.CERT_PIN_UPDATE_METADATA_URL);
Christopher Tate06efb532012-08-24 15:29:27 -07001469 }
1470
Svetoslav683914b2015-01-15 14:22:26 -08001471 private static final Validator sBooleanValidator =
1472 new DiscreteValueValidator(new String[] {"0", "1"});
1473
1474 private static final Validator sNonNegativeIntegerValidator = new Validator() {
1475 @Override
1476 public boolean validate(String value) {
1477 try {
1478 return Integer.parseInt(value) >= 0;
1479 } catch (NumberFormatException e) {
1480 return false;
1481 }
1482 }
1483 };
1484
Svetoslav683914b2015-01-15 14:22:26 -08001485 private static final Validator sUriValidator = new Validator() {
1486 @Override
1487 public boolean validate(String value) {
1488 try {
1489 Uri.decode(value);
1490 return true;
1491 } catch (IllegalArgumentException e) {
1492 return false;
1493 }
1494 }
1495 };
1496
1497 private static final Validator sLenientIpAddressValidator = new Validator() {
1498 private static final int MAX_IPV6_LENGTH = 45;
1499
1500 @Override
1501 public boolean validate(String value) {
1502 return value.length() <= MAX_IPV6_LENGTH;
1503 }
1504 };
1505
Christopher Tate66488d62012-10-02 11:58:01 -07001506 /** @hide */
Svetoslav683914b2015-01-15 14:22:26 -08001507 public static void getMovedToGlobalSettings(Set<String> outKeySet) {
Christopher Tate66488d62012-10-02 11:58:01 -07001508 outKeySet.addAll(MOVED_TO_GLOBAL);
1509 outKeySet.addAll(MOVED_TO_SECURE_THEN_GLOBAL);
1510 }
1511
1512 /** @hide */
Svetoslav683914b2015-01-15 14:22:26 -08001513 public static void getMovedToSecureSettings(Set<String> outKeySet) {
1514 outKeySet.addAll(MOVED_TO_SECURE);
1515 }
1516
1517 /** @hide */
Christopher Tate66488d62012-10-02 11:58:01 -07001518 public static void getNonLegacyMovedKeys(HashSet<String> outKeySet) {
1519 outKeySet.addAll(MOVED_TO_GLOBAL);
1520 }
1521
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001522 /**
1523 * Look up a name in the database.
1524 * @param resolver to access the database with
1525 * @param name to look up in the table
1526 * @return the corresponding value, or null if not present
1527 */
Dianne Hackborn139748f2012-09-24 11:36:57 -07001528 public static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07001529 return getStringForUser(resolver, name, UserHandle.myUserId());
1530 }
1531
1532 /** @hide */
Dianne Hackborn139748f2012-09-24 11:36:57 -07001533 public static String getStringForUser(ContentResolver resolver, String name,
Christopher Tate06efb532012-08-24 15:29:27 -07001534 int userHandle) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001535 if (MOVED_TO_SECURE.contains(name)) {
1536 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1537 + " to android.provider.Settings.Secure, returning read-only value.");
Christopher Tate06efb532012-08-24 15:29:27 -07001538 return Secure.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001539 }
Christopher Tate66488d62012-10-02 11:58:01 -07001540 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Christopher Tate06efb532012-08-24 15:29:27 -07001541 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1542 + " to android.provider.Settings.Global, returning read-only value.");
1543 return Global.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001544 }
Christopher Tate06efb532012-08-24 15:29:27 -07001545 return sNameValueCache.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001546 }
1547
1548 /**
1549 * Store a name/value pair into the database.
1550 * @param resolver to access the database with
1551 * @param name to store
1552 * @param value to associate with the name
1553 * @return true if the value was set, false on database errors
1554 */
1555 public static boolean putString(ContentResolver resolver, String name, String value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001556 return putStringForUser(resolver, name, value, UserHandle.myUserId());
1557 }
1558
1559 /** @hide */
1560 public static boolean putStringForUser(ContentResolver resolver, String name, String value,
1561 int userHandle) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001562 if (MOVED_TO_SECURE.contains(name)) {
1563 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1564 + " to android.provider.Settings.Secure, value is unchanged.");
1565 return false;
1566 }
Christopher Tate66488d62012-10-02 11:58:01 -07001567 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Christopher Tate06efb532012-08-24 15:29:27 -07001568 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1569 + " to android.provider.Settings.Global, value is unchanged.");
1570 return false;
1571 }
Christopher Tate06efb532012-08-24 15:29:27 -07001572 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001573 }
1574
1575 /**
1576 * Construct the content URI for a particular name/value pair,
1577 * useful for monitoring changes with a ContentObserver.
1578 * @param name to look up in the table
1579 * @return the corresponding content URI, or null if not present
1580 */
1581 public static Uri getUriFor(String name) {
1582 if (MOVED_TO_SECURE.contains(name)) {
1583 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1584 + " to android.provider.Settings.Secure, returning Secure URI.");
1585 return Secure.getUriFor(Secure.CONTENT_URI, name);
1586 }
Christopher Tate66488d62012-10-02 11:58:01 -07001587 if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Christopher Tate06efb532012-08-24 15:29:27 -07001588 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
1589 + " to android.provider.Settings.Global, returning read-only global URI.");
1590 return Global.getUriFor(Global.CONTENT_URI, name);
1591 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001592 return getUriFor(CONTENT_URI, name);
1593 }
1594
1595 /**
1596 * Convenience function for retrieving a single system settings value
1597 * as an integer. Note that internally setting values are always
1598 * stored as strings; this function converts the string to an integer
1599 * for you. The default value will be returned if the setting is
1600 * not defined or not an integer.
1601 *
1602 * @param cr The ContentResolver to access.
1603 * @param name The name of the setting to retrieve.
1604 * @param def Value to return if the setting is not defined.
1605 *
1606 * @return The setting's current value, or 'def' if it is not defined
1607 * or not a valid integer.
1608 */
1609 public static int getInt(ContentResolver cr, String name, int def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001610 return getIntForUser(cr, name, def, UserHandle.myUserId());
1611 }
1612
1613 /** @hide */
1614 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
1615 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001616 try {
1617 return v != null ? Integer.parseInt(v) : def;
1618 } catch (NumberFormatException e) {
1619 return def;
1620 }
1621 }
1622
1623 /**
1624 * Convenience function for retrieving a single system settings value
1625 * as an integer. Note that internally setting values are always
1626 * stored as strings; this function converts the string to an integer
1627 * for you.
1628 * <p>
1629 * This version does not take a default value. If the setting has not
1630 * been set, or the string value is not a number,
1631 * it throws {@link SettingNotFoundException}.
1632 *
1633 * @param cr The ContentResolver to access.
1634 * @param name The name of the setting to retrieve.
1635 *
1636 * @throws SettingNotFoundException Thrown if a setting by the given
1637 * name can't be found or the setting value is not an integer.
1638 *
1639 * @return The setting's current value.
1640 */
1641 public static int getInt(ContentResolver cr, String name)
1642 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001643 return getIntForUser(cr, name, UserHandle.myUserId());
1644 }
1645
1646 /** @hide */
1647 public static int getIntForUser(ContentResolver cr, String name, int userHandle)
1648 throws SettingNotFoundException {
1649 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001650 try {
1651 return Integer.parseInt(v);
1652 } catch (NumberFormatException e) {
1653 throw new SettingNotFoundException(name);
1654 }
1655 }
1656
1657 /**
1658 * Convenience function for updating a single settings value as an
1659 * integer. This will either create a new entry in the table if the
1660 * given name does not exist, or modify the value of the existing row
1661 * with that name. Note that internally setting values are always
1662 * stored as strings, so this function converts the given value to a
1663 * string before storing it.
1664 *
1665 * @param cr The ContentResolver to access.
1666 * @param name The name of the setting to modify.
1667 * @param value The new value for the setting.
1668 * @return true if the value was set, false on database errors
1669 */
1670 public static boolean putInt(ContentResolver cr, String name, int value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001671 return putIntForUser(cr, name, value, UserHandle.myUserId());
1672 }
1673
1674 /** @hide */
1675 public static boolean putIntForUser(ContentResolver cr, String name, int value,
1676 int userHandle) {
1677 return putStringForUser(cr, name, Integer.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001678 }
1679
1680 /**
1681 * Convenience function for retrieving a single system settings value
1682 * as a {@code long}. Note that internally setting values are always
1683 * stored as strings; this function converts the string to a {@code long}
1684 * for you. The default value will be returned if the setting is
1685 * not defined or not a {@code long}.
1686 *
1687 * @param cr The ContentResolver to access.
1688 * @param name The name of the setting to retrieve.
1689 * @param def Value to return if the setting is not defined.
1690 *
1691 * @return The setting's current value, or 'def' if it is not defined
1692 * or not a valid {@code long}.
1693 */
1694 public static long getLong(ContentResolver cr, String name, long def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001695 return getLongForUser(cr, name, def, UserHandle.myUserId());
1696 }
1697
1698 /** @hide */
1699 public static long getLongForUser(ContentResolver cr, String name, long def,
1700 int userHandle) {
1701 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001702 long value;
1703 try {
1704 value = valString != null ? Long.parseLong(valString) : def;
1705 } catch (NumberFormatException e) {
1706 value = def;
1707 }
1708 return value;
1709 }
1710
1711 /**
1712 * Convenience function for retrieving a single system settings value
1713 * as a {@code long}. Note that internally setting values are always
1714 * stored as strings; this function converts the string to a {@code long}
1715 * for you.
1716 * <p>
1717 * This version does not take a default value. If the setting has not
1718 * been set, or the string value is not a number,
1719 * it throws {@link SettingNotFoundException}.
1720 *
1721 * @param cr The ContentResolver to access.
1722 * @param name The name of the setting to retrieve.
1723 *
1724 * @return The setting's current value.
1725 * @throws SettingNotFoundException Thrown if a setting by the given
1726 * name can't be found or the setting value is not an integer.
1727 */
1728 public static long getLong(ContentResolver cr, String name)
1729 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001730 return getLongForUser(cr, name, UserHandle.myUserId());
1731 }
1732
1733 /** @hide */
1734 public static long getLongForUser(ContentResolver cr, String name, int userHandle)
1735 throws SettingNotFoundException {
1736 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001737 try {
1738 return Long.parseLong(valString);
1739 } catch (NumberFormatException e) {
1740 throw new SettingNotFoundException(name);
1741 }
1742 }
1743
1744 /**
1745 * Convenience function for updating a single settings value as a long
1746 * integer. This will either create a new entry in the table if the
1747 * given name does not exist, or modify the value of the existing row
1748 * with that name. Note that internally setting values are always
1749 * stored as strings, so this function converts the given value to a
1750 * string before storing it.
1751 *
1752 * @param cr The ContentResolver to access.
1753 * @param name The name of the setting to modify.
1754 * @param value The new value for the setting.
1755 * @return true if the value was set, false on database errors
1756 */
1757 public static boolean putLong(ContentResolver cr, String name, long value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001758 return putLongForUser(cr, name, value, UserHandle.myUserId());
1759 }
1760
1761 /** @hide */
1762 public static boolean putLongForUser(ContentResolver cr, String name, long value,
1763 int userHandle) {
1764 return putStringForUser(cr, name, Long.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001765 }
1766
1767 /**
1768 * Convenience function for retrieving a single system settings value
1769 * as a floating point number. Note that internally setting values are
1770 * always stored as strings; this function converts the string to an
1771 * float for you. The default value will be returned if the setting
1772 * is not defined or not a valid float.
1773 *
1774 * @param cr The ContentResolver to access.
1775 * @param name The name of the setting to retrieve.
1776 * @param def Value to return if the setting is not defined.
1777 *
1778 * @return The setting's current value, or 'def' if it is not defined
1779 * or not a valid float.
1780 */
1781 public static float getFloat(ContentResolver cr, String name, float def) {
Christopher Tate06efb532012-08-24 15:29:27 -07001782 return getFloatForUser(cr, name, def, UserHandle.myUserId());
1783 }
1784
1785 /** @hide */
1786 public static float getFloatForUser(ContentResolver cr, String name, float def,
1787 int userHandle) {
1788 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001789 try {
1790 return v != null ? Float.parseFloat(v) : def;
1791 } catch (NumberFormatException e) {
1792 return def;
1793 }
1794 }
1795
1796 /**
1797 * Convenience function for retrieving a single system settings value
1798 * as a float. Note that internally setting values are always
1799 * stored as strings; this function converts the string to a float
1800 * for you.
1801 * <p>
1802 * This version does not take a default value. If the setting has not
1803 * been set, or the string value is not a number,
1804 * it throws {@link SettingNotFoundException}.
1805 *
1806 * @param cr The ContentResolver to access.
1807 * @param name The name of the setting to retrieve.
1808 *
1809 * @throws SettingNotFoundException Thrown if a setting by the given
1810 * name can't be found or the setting value is not a float.
1811 *
1812 * @return The setting's current value.
1813 */
1814 public static float getFloat(ContentResolver cr, String name)
1815 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07001816 return getFloatForUser(cr, name, UserHandle.myUserId());
1817 }
1818
1819 /** @hide */
1820 public static float getFloatForUser(ContentResolver cr, String name, int userHandle)
1821 throws SettingNotFoundException {
1822 String v = getStringForUser(cr, name, userHandle);
Brian Muramatsue1d46982010-12-06 17:34:20 -08001823 if (v == null) {
1824 throw new SettingNotFoundException(name);
1825 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001826 try {
1827 return Float.parseFloat(v);
1828 } catch (NumberFormatException e) {
1829 throw new SettingNotFoundException(name);
1830 }
1831 }
1832
1833 /**
1834 * Convenience function for updating a single settings value as a
1835 * floating point number. This will either create a new entry in the
1836 * table if the given name does not exist, or modify the value of the
1837 * existing row with that name. Note that internally setting values
1838 * are always stored as strings, so this function converts the given
1839 * value to a string before storing it.
1840 *
1841 * @param cr The ContentResolver to access.
1842 * @param name The name of the setting to modify.
1843 * @param value The new value for the setting.
1844 * @return true if the value was set, false on database errors
1845 */
1846 public static boolean putFloat(ContentResolver cr, String name, float value) {
Christopher Tate06efb532012-08-24 15:29:27 -07001847 return putFloatForUser(cr, name, value, UserHandle.myUserId());
1848 }
1849
1850 /** @hide */
1851 public static boolean putFloatForUser(ContentResolver cr, String name, float value,
1852 int userHandle) {
1853 return putStringForUser(cr, name, Float.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001854 }
1855
1856 /**
1857 * Convenience function to read all of the current
1858 * configuration-related settings into a
1859 * {@link Configuration} object.
1860 *
1861 * @param cr The ContentResolver to access.
1862 * @param outConfig Where to place the configuration settings.
1863 */
1864 public static void getConfiguration(ContentResolver cr, Configuration outConfig) {
Christopher Tate06efb532012-08-24 15:29:27 -07001865 getConfigurationForUser(cr, outConfig, UserHandle.myUserId());
1866 }
1867
1868 /** @hide */
1869 public static void getConfigurationForUser(ContentResolver cr, Configuration outConfig,
1870 int userHandle) {
1871 outConfig.fontScale = Settings.System.getFloatForUser(
1872 cr, FONT_SCALE, outConfig.fontScale, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001873 if (outConfig.fontScale < 0) {
1874 outConfig.fontScale = 1;
1875 }
1876 }
1877
1878 /**
Dianne Hackborn31ca8542011-07-19 14:58:28 -07001879 * @hide Erase the fields in the Configuration that should be applied
1880 * by the settings.
1881 */
1882 public static void clearConfiguration(Configuration inoutConfig) {
1883 inoutConfig.fontScale = 0;
1884 }
Narayan Kamath6d632962011-08-24 11:51:37 +01001885
Dianne Hackborn31ca8542011-07-19 14:58:28 -07001886 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001887 * Convenience function to write a batch of configuration-related
1888 * settings from a {@link Configuration} object.
1889 *
1890 * @param cr The ContentResolver to access.
1891 * @param config The settings to write.
1892 * @return true if the values were set, false on database errors
1893 */
1894 public static boolean putConfiguration(ContentResolver cr, Configuration config) {
Christopher Tate06efb532012-08-24 15:29:27 -07001895 return putConfigurationForUser(cr, config, UserHandle.myUserId());
1896 }
1897
1898 /** @hide */
1899 public static boolean putConfigurationForUser(ContentResolver cr, Configuration config,
1900 int userHandle) {
1901 return Settings.System.putFloatForUser(cr, FONT_SCALE, config.fontScale, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001902 }
1903
Dianne Hackbornb8b11a02010-03-10 15:53:11 -08001904 /** @hide */
1905 public static boolean hasInterestingConfigurationChanges(int changes) {
1906 return (changes&ActivityInfo.CONFIG_FONT_SCALE) != 0;
1907 }
Jaikumar Ganesh545e6702010-06-04 10:23:03 -07001908
Christopher Tate06efb532012-08-24 15:29:27 -07001909 /** @deprecated - Do not use */
1910 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001911 public static boolean getShowGTalkServiceStatus(ContentResolver cr) {
Christopher Tate06efb532012-08-24 15:29:27 -07001912 return getShowGTalkServiceStatusForUser(cr, UserHandle.myUserId());
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001913 }
1914
Christopher Tate06efb532012-08-24 15:29:27 -07001915 /**
1916 * @hide
1917 * @deprecated - Do not use
1918 */
1919 public static boolean getShowGTalkServiceStatusForUser(ContentResolver cr,
1920 int userHandle) {
1921 return getIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, 0, userHandle) != 0;
1922 }
1923
1924 /** @deprecated - Do not use */
1925 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001926 public static void setShowGTalkServiceStatus(ContentResolver cr, boolean flag) {
Christopher Tatec8c08382012-09-19 17:18:18 -07001927 setShowGTalkServiceStatusForUser(cr, flag, UserHandle.myUserId());
Christopher Tate06efb532012-08-24 15:29:27 -07001928 }
1929
1930 /**
1931 * @hide
1932 * @deprecated - Do not use
1933 */
1934 @Deprecated
1935 public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean flag,
1936 int userHandle) {
1937 putIntForUser(cr, SHOW_GTALK_SERVICE_STATUS, flag ? 1 : 0, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001938 }
1939
Svetoslav683914b2015-01-15 14:22:26 -08001940 private static final class DiscreteValueValidator implements Validator {
1941 private final String[] mValues;
1942
1943 public DiscreteValueValidator(String[] values) {
1944 mValues = values;
1945 }
1946
Svetoslav1b71ea92015-02-17 18:20:29 -08001947 @Override
Svetoslav683914b2015-01-15 14:22:26 -08001948 public boolean validate(String value) {
1949 return ArrayUtils.contains(mValues, value);
1950 }
1951 }
1952
1953 private static final class InclusiveIntegerRangeValidator implements Validator {
1954 private final int mMin;
1955 private final int mMax;
1956
1957 public InclusiveIntegerRangeValidator(int min, int max) {
1958 mMin = min;
1959 mMax = max;
1960 }
1961
Svetoslav1b71ea92015-02-17 18:20:29 -08001962 @Override
Svetoslav683914b2015-01-15 14:22:26 -08001963 public boolean validate(String value) {
1964 try {
1965 final int intValue = Integer.parseInt(value);
1966 return intValue >= mMin && intValue <= mMax;
1967 } catch (NumberFormatException e) {
1968 return false;
1969 }
1970 }
1971 }
1972
1973 private static final class InclusiveFloatRangeValidator implements Validator {
1974 private final float mMin;
1975 private final float mMax;
1976
1977 public InclusiveFloatRangeValidator(float min, float max) {
1978 mMin = min;
1979 mMax = max;
1980 }
1981
Svetoslav1b71ea92015-02-17 18:20:29 -08001982 @Override
Svetoslav683914b2015-01-15 14:22:26 -08001983 public boolean validate(String value) {
1984 try {
1985 final float floatValue = Float.parseFloat(value);
1986 return floatValue >= mMin && floatValue <= mMax;
1987 } catch (NumberFormatException e) {
1988 return false;
1989 }
1990 }
1991 }
1992
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001993 /**
Christopher Tate06efb532012-08-24 15:29:27 -07001994 * @deprecated Use {@link android.provider.Settings.Global#STAY_ON_WHILE_PLUGGED_IN} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001995 */
Christopher Tate06efb532012-08-24 15:29:27 -07001996 @Deprecated
1997 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 -08001998
1999 /**
2000 * What happens when the user presses the end call button if they're not
2001 * on a call.<br/>
2002 * <b>Values:</b><br/>
2003 * 0 - The end button does nothing.<br/>
2004 * 1 - The end button goes to the home screen.<br/>
2005 * 2 - The end button puts the device to sleep and locks the keyguard.<br/>
2006 * 3 - The end button goes to the home screen. If the user is already on the
2007 * home screen, it puts the device to sleep.
2008 */
2009 public static final String END_BUTTON_BEHAVIOR = "end_button_behavior";
2010
Svetoslav683914b2015-01-15 14:22:26 -08002011 private static final Validator END_BUTTON_BEHAVIOR_VALIDATOR =
2012 new InclusiveIntegerRangeValidator(0, 3);
2013
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002014 /**
David Brown458e8062010-03-08 21:52:11 -08002015 * END_BUTTON_BEHAVIOR value for "go home".
2016 * @hide
2017 */
2018 public static final int END_BUTTON_BEHAVIOR_HOME = 0x1;
2019
2020 /**
2021 * END_BUTTON_BEHAVIOR value for "go to sleep".
2022 * @hide
2023 */
2024 public static final int END_BUTTON_BEHAVIOR_SLEEP = 0x2;
2025
2026 /**
2027 * END_BUTTON_BEHAVIOR default value.
2028 * @hide
2029 */
2030 public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP;
2031
2032 /**
Joe Onorato9cdffa12011-04-06 18:27:27 -07002033 * Is advanced settings mode turned on. 0 == no, 1 == yes
2034 * @hide
2035 */
2036 public static final String ADVANCED_SETTINGS = "advanced_settings";
2037
Svetoslav683914b2015-01-15 14:22:26 -08002038 private static final Validator ADVANCED_SETTINGS_VALIDATOR = sBooleanValidator;
2039
Joe Onorato9cdffa12011-04-06 18:27:27 -07002040 /**
2041 * ADVANCED_SETTINGS default value.
2042 * @hide
2043 */
2044 public static final int ADVANCED_SETTINGS_DEFAULT = 0;
2045
2046 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002047 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002048 */
Christopher Tate06efb532012-08-24 15:29:27 -07002049 @Deprecated
2050 public static final String AIRPLANE_MODE_ON = Global.AIRPLANE_MODE_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002051
2052 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002053 * @deprecated Use {@link android.provider.Settings.Global#RADIO_BLUETOOTH} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002054 */
Christopher Tate06efb532012-08-24 15:29:27 -07002055 @Deprecated
2056 public static final String RADIO_BLUETOOTH = Global.RADIO_BLUETOOTH;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002057
2058 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002059 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIFI} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002060 */
Christopher Tate06efb532012-08-24 15:29:27 -07002061 @Deprecated
2062 public static final String RADIO_WIFI = Global.RADIO_WIFI;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002063
Robert Greenwalt8588e472011-11-08 10:12:25 -08002064 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002065 * @deprecated Use {@link android.provider.Settings.Global#RADIO_WIMAX} instead
Robert Greenwalt8588e472011-11-08 10:12:25 -08002066 * {@hide}
2067 */
Christopher Tate06efb532012-08-24 15:29:27 -07002068 @Deprecated
2069 public static final String RADIO_WIMAX = Global.RADIO_WIMAX;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002070
2071 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002072 * @deprecated Use {@link android.provider.Settings.Global#RADIO_CELL} instead
Nick Pelly8d32a012011-08-09 07:03:49 -07002073 */
Christopher Tate06efb532012-08-24 15:29:27 -07002074 @Deprecated
2075 public static final String RADIO_CELL = Global.RADIO_CELL;
Nick Pelly8d32a012011-08-09 07:03:49 -07002076
2077 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002078 * @deprecated Use {@link android.provider.Settings.Global#RADIO_NFC} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002079 */
Christopher Tate06efb532012-08-24 15:29:27 -07002080 @Deprecated
2081 public static final String RADIO_NFC = Global.RADIO_NFC;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002082
2083 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002084 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_RADIOS} instead
2085 */
2086 @Deprecated
2087 public static final String AIRPLANE_MODE_RADIOS = Global.AIRPLANE_MODE_RADIOS;
2088
2089 /**
2090 * @deprecated Use {@link android.provider.Settings.Global#AIRPLANE_MODE_TOGGLEABLE_RADIOS} instead
Mike Lockwoodbd5ddf02009-07-29 21:37:14 -07002091 *
2092 * {@hide}
2093 */
Christopher Tate06efb532012-08-24 15:29:27 -07002094 @Deprecated
2095 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS =
2096 Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS;
Mike Lockwoodbd5ddf02009-07-29 21:37:14 -07002097
2098 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002099 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002100 */
Christopher Tate06efb532012-08-24 15:29:27 -07002101 @Deprecated
2102 public static final String WIFI_SLEEP_POLICY = Global.WIFI_SLEEP_POLICY;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002103
2104 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002105 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_DEFAULT} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002106 */
Christopher Tate06efb532012-08-24 15:29:27 -07002107 @Deprecated
2108 public static final int WIFI_SLEEP_POLICY_DEFAULT = Global.WIFI_SLEEP_POLICY_DEFAULT;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002109
2110 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002111 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002112 */
Christopher Tate06efb532012-08-24 15:29:27 -07002113 @Deprecated
2114 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED =
2115 Global.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002116
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002117 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002118 * @deprecated Use {@link android.provider.Settings.Global#WIFI_SLEEP_POLICY_NEVER} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002119 */
Christopher Tate06efb532012-08-24 15:29:27 -07002120 @Deprecated
2121 public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002122
Eric Laurentbc0fab1f2012-09-19 11:24:41 -07002123 /**
2124 * @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead
2125 */
2126 @Deprecated
2127 public static final String MODE_RINGER = Global.MODE_RINGER;
2128
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002129 /**
2130 * Whether to use static IP and other static network attributes.
2131 * <p>
2132 * Set to 1 for true and 0 for false.
Jeff Sharkey625239a2012-09-26 22:03:49 -07002133 *
2134 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002135 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002136 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002137 public static final String WIFI_USE_STATIC_IP = "wifi_use_static_ip";
2138
Svetoslav683914b2015-01-15 14:22:26 -08002139 private static final Validator WIFI_USE_STATIC_IP_VALIDATOR = sBooleanValidator;
2140
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002141 /**
2142 * The static IP address.
2143 * <p>
2144 * Example: "192.168.1.51"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002145 *
2146 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002147 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002148 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002149 public static final String WIFI_STATIC_IP = "wifi_static_ip";
2150
Svetoslav683914b2015-01-15 14:22:26 -08002151 private static final Validator WIFI_STATIC_IP_VALIDATOR = sLenientIpAddressValidator;
2152
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002153 /**
2154 * If using static IP, the gateway's IP address.
2155 * <p>
2156 * Example: "192.168.1.1"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002157 *
2158 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002159 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002160 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002161 public static final String WIFI_STATIC_GATEWAY = "wifi_static_gateway";
2162
Svetoslav683914b2015-01-15 14:22:26 -08002163 private static final Validator WIFI_STATIC_GATEWAY_VALIDATOR = sLenientIpAddressValidator;
2164
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002165 /**
2166 * If using static IP, the net mask.
2167 * <p>
2168 * Example: "255.255.255.0"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002169 *
2170 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002171 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002172 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002173 public static final String WIFI_STATIC_NETMASK = "wifi_static_netmask";
2174
Svetoslav683914b2015-01-15 14:22:26 -08002175 private static final Validator WIFI_STATIC_NETMASK_VALIDATOR = sLenientIpAddressValidator;
2176
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002177 /**
2178 * If using static IP, the primary DNS's IP address.
2179 * <p>
2180 * Example: "192.168.1.1"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002181 *
2182 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002183 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002184 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002185 public static final String WIFI_STATIC_DNS1 = "wifi_static_dns1";
2186
Svetoslav683914b2015-01-15 14:22:26 -08002187 private static final Validator WIFI_STATIC_DNS1_VALIDATOR = sLenientIpAddressValidator;
2188
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002189 /**
2190 * If using static IP, the secondary DNS's IP address.
2191 * <p>
2192 * Example: "192.168.1.2"
Jeff Sharkey625239a2012-09-26 22:03:49 -07002193 *
2194 * @deprecated Use {@link WifiManager} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002195 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07002196 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002197 public static final String WIFI_STATIC_DNS2 = "wifi_static_dns2";
2198
Svetoslav683914b2015-01-15 14:22:26 -08002199 private static final Validator WIFI_STATIC_DNS2_VALIDATOR = sLenientIpAddressValidator;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002200
2201 /**
2202 * Determines whether remote devices may discover and/or connect to
2203 * this device.
2204 * <P>Type: INT</P>
2205 * 2 -- discoverable and connectable
2206 * 1 -- connectable but not discoverable
2207 * 0 -- neither connectable nor discoverable
2208 */
2209 public static final String BLUETOOTH_DISCOVERABILITY =
2210 "bluetooth_discoverability";
2211
Svetoslav683914b2015-01-15 14:22:26 -08002212 private static final Validator BLUETOOTH_DISCOVERABILITY_VALIDATOR =
2213 new InclusiveIntegerRangeValidator(0, 2);
2214
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002215 /**
2216 * Bluetooth discoverability timeout. If this value is nonzero, then
2217 * Bluetooth becomes discoverable for a certain number of seconds,
2218 * after which is becomes simply connectable. The value is in seconds.
2219 */
2220 public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT =
2221 "bluetooth_discoverability_timeout";
2222
Svetoslav683914b2015-01-15 14:22:26 -08002223 private static final Validator BLUETOOTH_DISCOVERABILITY_TIMEOUT_VALIDATOR =
2224 sNonNegativeIntegerValidator;
2225
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002226 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08002227 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_ENABLED}
2228 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002229 */
Amith Yamasani156c4352010-03-05 17:10:03 -08002230 @Deprecated
2231 public static final String LOCK_PATTERN_ENABLED = Secure.LOCK_PATTERN_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002232
2233 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08002234 * @deprecated Use {@link android.provider.Settings.Secure#LOCK_PATTERN_VISIBLE}
2235 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002236 */
Amith Yamasani156c4352010-03-05 17:10:03 -08002237 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002238 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
2239
2240 /**
Jaikumar Ganesh545e6702010-06-04 10:23:03 -07002241 * @deprecated Use
Amith Yamasani156c4352010-03-05 17:10:03 -08002242 * {@link android.provider.Settings.Secure#LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED}
2243 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002244 */
Amith Yamasani156c4352010-03-05 17:10:03 -08002245 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002246 public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED =
2247 "lock_pattern_tactile_feedback_enabled";
2248
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002249 /**
2250 * A formatted string of the next alarm that is set, or the empty string
2251 * if there is no alarm set.
Adrian Roosc42a1e12014-07-07 23:35:53 +02002252 *
2253 * @deprecated Use {@link android.app.AlarmManager#getNextAlarmClock()}.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002254 */
Adrian Roosc42a1e12014-07-07 23:35:53 +02002255 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002256 public static final String NEXT_ALARM_FORMATTED = "next_alarm_formatted";
2257
Svetoslav683914b2015-01-15 14:22:26 -08002258 private static final Validator NEXT_ALARM_FORMATTED_VALIDATOR = new Validator() {
2259 private static final int MAX_LENGTH = 1000;
Svetoslav1b71ea92015-02-17 18:20:29 -08002260
Svetoslav683914b2015-01-15 14:22:26 -08002261 @Override
2262 public boolean validate(String value) {
2263 // TODO: No idea what the correct format is.
Svetoslav64d6e9c2015-02-12 11:30:36 -08002264 return value == null || value.length() < MAX_LENGTH;
Svetoslav683914b2015-01-15 14:22:26 -08002265 }
2266 };
2267
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002268 /**
2269 * Scaling factor for fonts, float.
2270 */
2271 public static final String FONT_SCALE = "font_scale";
2272
Svetoslav683914b2015-01-15 14:22:26 -08002273 private static final Validator FONT_SCALE_VALIDATOR = new Validator() {
2274 @Override
2275 public boolean validate(String value) {
2276 try {
2277 return Float.parseFloat(value) >= 0;
2278 } catch (NumberFormatException e) {
2279 return false;
2280 }
2281 }
2282 };
2283
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002284 /**
2285 * Name of an application package to be debugged.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002286 *
2287 * @deprecated Use {@link Global#DEBUG_APP} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002288 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002289 @Deprecated
2290 public static final String DEBUG_APP = Global.DEBUG_APP;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002291
2292 /**
2293 * If 1, when launching DEBUG_APP it will wait for the debugger before
2294 * starting user code. If 0, it will run normally.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002295 *
2296 * @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002297 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002298 @Deprecated
2299 public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002300
2301 /**
2302 * Whether or not to dim the screen. 0=no 1=yes
Jeff Brown96307042012-07-27 15:51:34 -07002303 * @deprecated This setting is no longer used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002304 */
Jeff Brown96307042012-07-27 15:51:34 -07002305 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002306 public static final String DIM_SCREEN = "dim_screen";
2307
Svetoslav683914b2015-01-15 14:22:26 -08002308 private static final Validator DIM_SCREEN_VALIDATOR = sBooleanValidator;
2309
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002310 /**
Jeff Brown05af6ad2014-09-30 20:54:30 -07002311 * The amount of time in milliseconds before the device goes to sleep or begins
2312 * to dream after a period of inactivity. This value is also known as the
2313 * user activity timeout period since the screen isn't necessarily turned off
2314 * when it expires.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002315 */
2316 public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout";
2317
Svetoslav683914b2015-01-15 14:22:26 -08002318 private static final Validator SCREEN_OFF_TIMEOUT_VALIDATOR = sNonNegativeIntegerValidator;
2319
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002320 /**
2321 * The screen backlight brightness between 0 and 255.
2322 */
2323 public static final String SCREEN_BRIGHTNESS = "screen_brightness";
2324
Svetoslav683914b2015-01-15 14:22:26 -08002325 private static final Validator SCREEN_BRIGHTNESS_VALIDATOR =
2326 new InclusiveIntegerRangeValidator(0, 255);
2327
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002328 /**
Dan Murphy951764b2009-08-27 14:59:03 -05002329 * Control whether to enable automatic brightness mode.
Dan Murphy951764b2009-08-27 14:59:03 -05002330 */
2331 public static final String SCREEN_BRIGHTNESS_MODE = "screen_brightness_mode";
2332
Svetoslav683914b2015-01-15 14:22:26 -08002333 private static final Validator SCREEN_BRIGHTNESS_MODE_VALIDATOR = sBooleanValidator;
2334
Dan Murphy951764b2009-08-27 14:59:03 -05002335 /**
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08002336 * Adjustment to auto-brightness to make it generally more (>0.0 <1.0)
2337 * or less (<0.0 >-1.0) bright.
Dianne Hackborn518a3d82012-05-09 16:30:49 -07002338 * @hide
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08002339 */
2340 public static final String SCREEN_AUTO_BRIGHTNESS_ADJ = "screen_auto_brightness_adj";
2341
Svetoslav683914b2015-01-15 14:22:26 -08002342 private static final Validator SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR =
2343 new InclusiveFloatRangeValidator(-1, 1);
2344
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08002345 /**
Mike Lockwooddc3494e2009-10-14 21:17:09 -07002346 * SCREEN_BRIGHTNESS_MODE value for manual mode.
Mike Lockwooddc3494e2009-10-14 21:17:09 -07002347 */
2348 public static final int SCREEN_BRIGHTNESS_MODE_MANUAL = 0;
2349
2350 /**
Scott Main52bfc242012-02-09 10:09:14 -08002351 * SCREEN_BRIGHTNESS_MODE value for automatic mode.
Mike Lockwooddc3494e2009-10-14 21:17:09 -07002352 */
2353 public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1;
2354
2355 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002356 * Control whether the process CPU usage meter should be shown.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002357 *
2358 * @deprecated Use {@link Global#SHOW_PROCESSES} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002359 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002360 @Deprecated
2361 public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002362
2363 /**
2364 * If 1, the activity manager will aggressively finish activities and
2365 * processes as soon as they are no longer needed. If 0, the normal
2366 * extended lifetime is used.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002367 *
2368 * @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002369 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002370 @Deprecated
2371 public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002372
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002373 /**
2374 * Determines which streams are affected by ringer mode changes. The
2375 * stream type's bit should be set to 1 if it should be muted when going
2376 * into an inaudible ringer mode.
2377 */
2378 public static final String MODE_RINGER_STREAMS_AFFECTED = "mode_ringer_streams_affected";
2379
Svetoslav683914b2015-01-15 14:22:26 -08002380 private static final Validator MODE_RINGER_STREAMS_AFFECTED_VALIDATOR =
2381 sNonNegativeIntegerValidator;
2382
2383 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002384 * Determines which streams are affected by mute. The
2385 * stream type's bit should be set to 1 if it should be muted when a mute request
2386 * is received.
2387 */
Svetoslav683914b2015-01-15 14:22:26 -08002388 public static final String MUTE_STREAMS_AFFECTED = "mute_streams_affected";
2389
2390 private static final Validator MUTE_STREAMS_AFFECTED_VALIDATOR =
2391 sNonNegativeIntegerValidator;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002392
2393 /**
2394 * Whether vibrate is on for different events. This is used internally,
2395 * changing this value will not change the vibrate. See AudioManager.
2396 */
2397 public static final String VIBRATE_ON = "vibrate_on";
2398
Svetoslav683914b2015-01-15 14:22:26 -08002399 private static final Validator VIBRATE_ON_VALIDATOR = sBooleanValidator;
2400
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002401 /**
Jeff Brown7f6c2312012-04-13 20:38:38 -07002402 * If 1, redirects the system vibrator to all currently attached input devices
2403 * that support vibration. If there are no such input devices, then the system
2404 * vibrator is used instead.
2405 * If 0, does not register the system vibrator.
2406 *
2407 * This setting is mainly intended to provide a compatibility mechanism for
2408 * applications that only know about the system vibrator and do not use the
2409 * input device vibrator API.
2410 *
2411 * @hide
2412 */
2413 public static final String VIBRATE_INPUT_DEVICES = "vibrate_input_devices";
2414
Svetoslav683914b2015-01-15 14:22:26 -08002415 private static final Validator VIBRATE_INPUT_DEVICES_VALIDATOR = sBooleanValidator;
2416
Jeff Brown7f6c2312012-04-13 20:38:38 -07002417 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002418 * Ringer volume. This is used internally, changing this value will not
2419 * change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002420 *
2421 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002422 */
2423 public static final String VOLUME_RING = "volume_ring";
2424
2425 /**
2426 * System/notifications volume. This is used internally, changing this
2427 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002428 *
2429 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002430 */
2431 public static final String VOLUME_SYSTEM = "volume_system";
2432
2433 /**
2434 * Voice call volume. This is used internally, changing this value will
2435 * not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002436 *
2437 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002438 */
2439 public static final String VOLUME_VOICE = "volume_voice";
2440
2441 /**
2442 * Music/media/gaming volume. This is used internally, changing this
2443 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002444 *
2445 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002446 */
2447 public static final String VOLUME_MUSIC = "volume_music";
2448
2449 /**
2450 * Alarm volume. This is used internally, changing this
2451 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002452 *
2453 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002454 */
2455 public static final String VOLUME_ALARM = "volume_alarm";
2456
2457 /**
2458 * Notification volume. This is used internally, changing this
2459 * value will not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002460 *
2461 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002462 */
2463 public static final String VOLUME_NOTIFICATION = "volume_notification";
2464
2465 /**
Eric Laurent484d2882009-12-08 09:05:45 -08002466 * Bluetooth Headset volume. This is used internally, changing this value will
2467 * not change the volume. See AudioManager.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002468 *
2469 * @removed Not used by anything since API 2.
Eric Laurent484d2882009-12-08 09:05:45 -08002470 */
2471 public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco";
2472
2473 /**
Mike Lockwood8517e462011-10-25 14:47:19 -04002474 * Master volume (float in the range 0.0f to 1.0f).
Svetoslavdbbeeb32015-02-18 19:16:25 -08002475 *
Mike Lockwood8517e462011-10-25 14:47:19 -04002476 * @hide
2477 */
2478 public static final String VOLUME_MASTER = "volume_master";
2479
2480 /**
Justin Koh57978ed2012-04-03 17:37:58 -07002481 * Master volume mute (int 1 = mute, 0 = not muted).
2482 *
2483 * @hide
2484 */
2485 public static final String VOLUME_MASTER_MUTE = "volume_master_mute";
2486
Svetoslav683914b2015-01-15 14:22:26 -08002487 private static final Validator VOLUME_MASTER_MUTE_VALIDATOR = sBooleanValidator;
2488
Justin Koh57978ed2012-04-03 17:37:58 -07002489 /**
Julia Reynoldsb53453f2014-08-22 11:42:43 -04002490 * Microphone mute (int 1 = mute, 0 = not muted).
2491 *
2492 * @hide
2493 */
2494 public static final String MICROPHONE_MUTE = "microphone_mute";
2495
Svetoslav683914b2015-01-15 14:22:26 -08002496 private static final Validator MICROPHONE_MUTE_VALIDATOR = sBooleanValidator;
2497
Julia Reynoldsb53453f2014-08-22 11:42:43 -04002498 /**
Justin Koh57978ed2012-04-03 17:37:58 -07002499 * Whether the notifications should use the ring volume (value of 1) or
2500 * a separate notification volume (value of 0). In most cases, users
2501 * will have this enabled so the notification and ringer volumes will be
2502 * the same. However, power users can disable this and use the separate
2503 * notification volume control.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002504 * <p>
Justin Koh57978ed2012-04-03 17:37:58 -07002505 * Note: This is a one-off setting that will be removed in the future
2506 * when there is profile support. For this reason, it is kept hidden
2507 * from the public APIs.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002508 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002509 * @hide
Amith Yamasani42722bf2011-07-22 10:34:27 -07002510 * @deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002511 */
Gilles Debunnee90bed12011-08-30 14:28:27 -07002512 @Deprecated
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002513 public static final String NOTIFICATIONS_USE_RING_VOLUME =
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002514 "notifications_use_ring_volume";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002515
Svetoslav683914b2015-01-15 14:22:26 -08002516 private static final Validator NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR = sBooleanValidator;
2517
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002518 /**
Daniel Sandler6329bf72010-02-26 15:17:44 -05002519 * Whether silent mode should allow vibration feedback. This is used
2520 * internally in AudioService and the Sound settings activity to
2521 * coordinate decoupling of vibrate and silent modes. This setting
2522 * will likely be removed in a future release with support for
2523 * audio/vibe feedback profiles.
2524 *
Eric Laurentbffc3d12012-05-07 17:43:49 -07002525 * Not used anymore. On devices with vibrator, the user explicitly selects
2526 * silent or vibrate mode.
2527 * Kept for use by legacy database upgrade code in DatabaseHelper.
Daniel Sandler6329bf72010-02-26 15:17:44 -05002528 * @hide
2529 */
2530 public static final String VIBRATE_IN_SILENT = "vibrate_in_silent";
2531
Svetoslav683914b2015-01-15 14:22:26 -08002532 private static final Validator VIBRATE_IN_SILENT_VALIDATOR = sBooleanValidator;
2533
Daniel Sandler6329bf72010-02-26 15:17:44 -05002534 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002535 * The mapping of stream type (integer) to its setting.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002536 *
2537 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002538 */
2539 public static final String[] VOLUME_SETTINGS = {
2540 VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC,
Eric Laurent484d2882009-12-08 09:05:45 -08002541 VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002542 };
2543
2544 /**
2545 * Appended to various volume related settings to record the previous
2546 * values before they the settings were affected by a silent/vibrate
2547 * ringer mode change.
Svetoslavdbbeeb32015-02-18 19:16:25 -08002548 *
2549 * @removed Not used by anything since API 2.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002550 */
2551 public static final String APPEND_FOR_LAST_AUDIBLE = "_last_audible";
2552
2553 /**
2554 * Persistent store for the system-wide default ringtone URI.
2555 * <p>
2556 * If you need to play the default ringtone at any given time, it is recommended
2557 * you give {@link #DEFAULT_RINGTONE_URI} to the media player. It will resolve
2558 * to the set default ringtone at the time of playing.
2559 *
2560 * @see #DEFAULT_RINGTONE_URI
2561 */
2562 public static final String RINGTONE = "ringtone";
2563
Svetoslav683914b2015-01-15 14:22:26 -08002564 private static final Validator RINGTONE_VALIDATOR = sUriValidator;
2565
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002566 /**
2567 * A {@link Uri} that will point to the current default ringtone at any
2568 * given time.
2569 * <p>
2570 * If the current default ringtone is in the DRM provider and the caller
2571 * does not have permission, the exception will be a
2572 * FileNotFoundException.
2573 */
2574 public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE);
2575
2576 /**
2577 * Persistent store for the system-wide default notification sound.
2578 *
2579 * @see #RINGTONE
2580 * @see #DEFAULT_NOTIFICATION_URI
2581 */
2582 public static final String NOTIFICATION_SOUND = "notification_sound";
2583
Svetoslav683914b2015-01-15 14:22:26 -08002584 private static final Validator NOTIFICATION_SOUND_VALIDATOR = sUriValidator;
2585
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002586 /**
2587 * A {@link Uri} that will point to the current default notification
2588 * sound at any given time.
2589 *
2590 * @see #DEFAULT_RINGTONE_URI
2591 */
2592 public static final Uri DEFAULT_NOTIFICATION_URI = getUriFor(NOTIFICATION_SOUND);
2593
2594 /**
Patrick Scott3156bb002009-04-13 09:57:38 -07002595 * Persistent store for the system-wide default alarm alert.
2596 *
2597 * @see #RINGTONE
2598 * @see #DEFAULT_ALARM_ALERT_URI
2599 */
2600 public static final String ALARM_ALERT = "alarm_alert";
2601
Svetoslav683914b2015-01-15 14:22:26 -08002602 private static final Validator ALARM_ALERT_VALIDATOR = sUriValidator;
2603
Patrick Scott3156bb002009-04-13 09:57:38 -07002604 /**
2605 * A {@link Uri} that will point to the current default alarm alert at
2606 * any given time.
2607 *
2608 * @see #DEFAULT_ALARM_ALERT_URI
2609 */
2610 public static final Uri DEFAULT_ALARM_ALERT_URI = getUriFor(ALARM_ALERT);
2611
2612 /**
Jean-Michel Trivid589fea2011-04-15 11:28:10 -07002613 * Persistent store for the system default media button event receiver.
2614 *
2615 * @hide
2616 */
2617 public static final String MEDIA_BUTTON_RECEIVER = "media_button_receiver";
2618
Svetoslav683914b2015-01-15 14:22:26 -08002619 private static final Validator MEDIA_BUTTON_RECEIVER_VALIDATOR = new Validator() {
2620 @Override
2621 public boolean validate(String value) {
2622 try {
2623 ComponentName.unflattenFromString(value);
2624 return true;
2625 } catch (NullPointerException e) {
2626 return false;
2627 }
2628 }
2629 };
2630
Jean-Michel Trivid589fea2011-04-15 11:28:10 -07002631 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002632 * Setting to enable Auto Replace (AutoText) in text editors. 1 = On, 0 = Off
2633 */
2634 public static final String TEXT_AUTO_REPLACE = "auto_replace";
2635
Svetoslav683914b2015-01-15 14:22:26 -08002636 private static final Validator TEXT_AUTO_REPLACE_VALIDATOR = sBooleanValidator;
2637
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002638 /**
2639 * Setting to enable Auto Caps in text editors. 1 = On, 0 = Off
2640 */
2641 public static final String TEXT_AUTO_CAPS = "auto_caps";
2642
Svetoslav683914b2015-01-15 14:22:26 -08002643 private static final Validator TEXT_AUTO_CAPS_VALIDATOR = sBooleanValidator;
2644
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002645 /**
2646 * Setting to enable Auto Punctuate in text editors. 1 = On, 0 = Off. This
2647 * feature converts two spaces to a "." and space.
2648 */
2649 public static final String TEXT_AUTO_PUNCTUATE = "auto_punctuate";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002650
Svetoslav683914b2015-01-15 14:22:26 -08002651 private static final Validator TEXT_AUTO_PUNCTUATE_VALIDATOR = sBooleanValidator;
2652
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002653 /**
2654 * Setting to showing password characters in text editors. 1 = On, 0 = Off
2655 */
2656 public static final String TEXT_SHOW_PASSWORD = "show_password";
2657
Svetoslav683914b2015-01-15 14:22:26 -08002658 private static final Validator TEXT_SHOW_PASSWORD_VALIDATOR = sBooleanValidator;
2659
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002660 public static final String SHOW_GTALK_SERVICE_STATUS =
2661 "SHOW_GTALK_SERVICE_STATUS";
2662
Svetoslav683914b2015-01-15 14:22:26 -08002663 private static final Validator SHOW_GTALK_SERVICE_STATUS_VALIDATOR = sBooleanValidator;
2664
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002665 /**
2666 * Name of activity to use for wallpaper on the home screen.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002667 *
2668 * @deprecated Use {@link WallpaperManager} instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002669 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002670 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002671 public static final String WALLPAPER_ACTIVITY = "wallpaper_activity";
2672
Svetoslav683914b2015-01-15 14:22:26 -08002673 private static final Validator WALLPAPER_ACTIVITY_VALIDATOR = new Validator() {
2674 private static final int MAX_LENGTH = 1000;
2675
2676 @Override
2677 public boolean validate(String value) {
2678 if (value != null && value.length() > MAX_LENGTH) {
2679 return false;
2680 }
2681 return ComponentName.unflattenFromString(value) != null;
2682 }
2683 };
2684
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002685 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002686 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME}
2687 * instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002688 */
Christopher Tate06efb532012-08-24 15:29:27 -07002689 @Deprecated
2690 public static final String AUTO_TIME = Global.AUTO_TIME;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002691
2692 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002693 * @deprecated Use {@link android.provider.Settings.Global#AUTO_TIME_ZONE}
2694 * instead
Amith Yamasaniad450be2010-09-16 16:47:00 -07002695 */
Christopher Tate06efb532012-08-24 15:29:27 -07002696 @Deprecated
2697 public static final String AUTO_TIME_ZONE = Global.AUTO_TIME_ZONE;
Amith Yamasaniad450be2010-09-16 16:47:00 -07002698
2699 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002700 * Display times as 12 or 24 hours
2701 * 12
2702 * 24
2703 */
2704 public static final String TIME_12_24 = "time_12_24";
2705
Svetoslav683914b2015-01-15 14:22:26 -08002706 /** @hide */
2707 public static final Validator TIME_12_24_VALIDATOR =
2708 new DiscreteValueValidator(new String[] {"12", "24"});
2709
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002710 /**
2711 * Date format string
2712 * mm/dd/yyyy
2713 * dd/mm/yyyy
2714 * yyyy/mm/dd
2715 */
2716 public static final String DATE_FORMAT = "date_format";
2717
Svetoslav683914b2015-01-15 14:22:26 -08002718 /** @hide */
2719 public static final Validator DATE_FORMAT_VALIDATOR = new Validator() {
2720 @Override
2721 public boolean validate(String value) {
2722 try {
2723 new SimpleDateFormat(value);
2724 return true;
2725 } catch (IllegalArgumentException e) {
2726 return false;
2727 }
2728 }
2729 };
2730
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002731 /**
2732 * Whether the setup wizard has been run before (on first boot), or if
2733 * it still needs to be run.
2734 *
2735 * nonzero = it has been run in the past
2736 * 0 = it has not been run in the past
2737 */
2738 public static final String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run";
2739
Svetoslav683914b2015-01-15 14:22:26 -08002740 /** @hide */
2741 public static final Validator SETUP_WIZARD_HAS_RUN_VALIDATOR = sBooleanValidator;
2742
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002743 /**
2744 * Scaling factor for normal window animations. Setting to 0 will disable window
2745 * animations.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002746 *
2747 * @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002748 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002749 @Deprecated
2750 public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002751
2752 /**
2753 * Scaling factor for activity transition animations. Setting to 0 will disable window
2754 * animations.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002755 *
2756 * @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002757 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002758 @Deprecated
2759 public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002760
2761 /**
Chet Haasec38fa1f2012-02-01 16:37:46 -08002762 * Scaling factor for Animator-based animations. This affects both the start delay and
2763 * duration of all such animations. Setting to 0 will cause animations to end immediately.
2764 * The default value is 1.
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002765 *
2766 * @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead
Chet Haasec38fa1f2012-02-01 16:37:46 -08002767 */
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07002768 @Deprecated
2769 public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002770
2771 /**
2772 * Control whether the accelerometer will be used to change screen
2773 * orientation. If 0, it will not be used unless explicitly requested
2774 * by the application; if 1, it will be used by default unless explicitly
2775 * disabled by the application.
2776 */
2777 public static final String ACCELEROMETER_ROTATION = "accelerometer_rotation";
2778
Svetoslav683914b2015-01-15 14:22:26 -08002779 /** @hide */
2780 public static final Validator ACCELEROMETER_ROTATION_VALIDATOR = sBooleanValidator;
2781
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002782 /**
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002783 * Default screen rotation when no other policy applies.
2784 * When {@link #ACCELEROMETER_ROTATION} is zero and no on-screen Activity expresses a
2785 * preference, this rotation value will be used. Must be one of the
Brian Muramatsue1d46982010-12-06 17:34:20 -08002786 * {@link android.view.Surface#ROTATION_0 Surface rotation constants}.
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002787 *
Dianne Hackborn16ec0802014-08-15 18:32:33 -07002788 * @see android.view.Display#getRotation
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002789 */
2790 public static final String USER_ROTATION = "user_rotation";
2791
Svetoslav683914b2015-01-15 14:22:26 -08002792 /** @hide */
2793 public static final Validator USER_ROTATION_VALIDATOR =
2794 new InclusiveIntegerRangeValidator(0, 3);
2795
Daniel Sandlerb73617d2010-08-17 00:41:00 -04002796 /**
Jeff Brown207673cd2012-06-05 17:47:11 -07002797 * Control whether the rotation lock toggle in the System UI should be hidden.
2798 * Typically this is done for accessibility purposes to make it harder for
2799 * the user to accidentally toggle the rotation lock while the display rotation
2800 * has been locked for accessibility.
2801 *
2802 * If 0, then rotation lock toggle is not hidden for accessibility (although it may be
2803 * unavailable for other reasons). If 1, then the rotation lock toggle is hidden.
2804 *
2805 * @hide
2806 */
2807 public static final String HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY =
2808 "hide_rotation_lock_toggle_for_accessibility";
2809
Svetoslav683914b2015-01-15 14:22:26 -08002810 /** @hide */
2811 public static final Validator HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY_VALIDATOR =
2812 sBooleanValidator;
2813
Jeff Brown207673cd2012-06-05 17:47:11 -07002814 /**
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07002815 * Whether the phone vibrates when it is ringing due to an incoming call. This will
2816 * be used by Phone and Setting apps; it shouldn't affect other apps.
2817 * The value is boolean (1 or 0).
2818 *
2819 * Note: this is not same as "vibrate on ring", which had been available until ICS.
2820 * It was about AudioManager's setting and thus affected all the applications which
2821 * relied on the setting, while this is purely about the vibration setting for incoming
2822 * calls.
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07002823 */
2824 public static final String VIBRATE_WHEN_RINGING = "vibrate_when_ringing";
2825
Svetoslav683914b2015-01-15 14:22:26 -08002826 /** @hide */
2827 public static final Validator VIBRATE_WHEN_RINGING_VALIDATOR = sBooleanValidator;
2828
Daisuke Miyakawa3c60eeb2012-05-08 12:08:25 -07002829 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002830 * Whether the audible DTMF tones are played by the dialer when dialing. The value is
2831 * boolean (1 or 0).
2832 */
2833 public static final String DTMF_TONE_WHEN_DIALING = "dtmf_tone";
2834
Svetoslav683914b2015-01-15 14:22:26 -08002835 /** @hide */
2836 public static final Validator DTMF_TONE_WHEN_DIALING_VALIDATOR = sBooleanValidator;
2837
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002838 /**
David Kraused0f67152009-06-13 18:01:13 -05002839 * CDMA only settings
2840 * DTMF tone type played by the dialer when dialing.
2841 * 0 = Normal
2842 * 1 = Long
David Kraused0f67152009-06-13 18:01:13 -05002843 */
2844 public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type";
2845
Svetoslav683914b2015-01-15 14:22:26 -08002846 /** @hide */
2847 public static final Validator DTMF_TONE_TYPE_WHEN_DIALING_VALIDATOR = sBooleanValidator;
2848
David Kraused0f67152009-06-13 18:01:13 -05002849 /**
David Kraused0f67152009-06-13 18:01:13 -05002850 * Whether the hearing aid is enabled. The value is
2851 * boolean (1 or 0).
2852 * @hide
2853 */
2854 public static final String HEARING_AID = "hearing_aid";
2855
Svetoslav683914b2015-01-15 14:22:26 -08002856 /** @hide */
2857 public static final Validator HEARING_AID_VALIDATOR = sBooleanValidator;
2858
David Kraused0f67152009-06-13 18:01:13 -05002859 /**
2860 * CDMA only settings
2861 * TTY Mode
2862 * 0 = OFF
2863 * 1 = FULL
2864 * 2 = VCO
2865 * 3 = HCO
2866 * @hide
2867 */
2868 public static final String TTY_MODE = "tty_mode";
2869
Svetoslav683914b2015-01-15 14:22:26 -08002870 /** @hide */
2871 public static final Validator TTY_MODE_VALIDATOR = new InclusiveIntegerRangeValidator(0, 3);
2872
David Kraused0f67152009-06-13 18:01:13 -05002873 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002874 * Whether the sounds effects (key clicks, lid open ...) are enabled. The value is
2875 * boolean (1 or 0).
2876 */
2877 public static final String SOUND_EFFECTS_ENABLED = "sound_effects_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002878
Svetoslav683914b2015-01-15 14:22:26 -08002879 /** @hide */
2880 public static final Validator SOUND_EFFECTS_ENABLED_VALIDATOR = sBooleanValidator;
2881
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002882 /**
2883 * Whether the haptic feedback (long presses, ...) are enabled. The value is
2884 * boolean (1 or 0).
2885 */
2886 public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled";
Sanjay Jeyakumar21bf2412009-07-09 13:31:48 -07002887
Svetoslav683914b2015-01-15 14:22:26 -08002888 /** @hide */
2889 public static final Validator HAPTIC_FEEDBACK_ENABLED_VALIDATOR = sBooleanValidator;
2890
Mike LeBeau48603e72009-06-05 00:27:00 +01002891 /**
Bjorn Bringert24abb662010-09-21 12:21:18 +01002892 * @deprecated Each application that shows web suggestions should have its own
2893 * setting for this.
Mike LeBeau48603e72009-06-05 00:27:00 +01002894 */
Bjorn Bringert24abb662010-09-21 12:21:18 +01002895 @Deprecated
Mike LeBeau48603e72009-06-05 00:27:00 +01002896 public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07002897
Svetoslav683914b2015-01-15 14:22:26 -08002898 /** @hide */
2899 public static final Validator SHOW_WEB_SUGGESTIONS_VALIDATOR = sBooleanValidator;
2900
-b master501eec92009-07-06 13:53:11 -07002901 /**
Amith Yamasaniae3ed702009-12-01 19:02:05 -08002902 * Whether the notification LED should repeatedly flash when a notification is
2903 * pending. The value is boolean (1 or 0).
2904 * @hide
2905 */
2906 public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse";
2907
Svetoslav683914b2015-01-15 14:22:26 -08002908 /** @hide */
2909 public static final Validator NOTIFICATION_LIGHT_PULSE_VALIDATOR = sBooleanValidator;
2910
Amith Yamasaniae3ed702009-12-01 19:02:05 -08002911 /**
Dianne Hackborn90d2db32010-02-11 22:19:06 -08002912 * Show pointer location on screen?
2913 * 0 = no
2914 * 1 = yes
2915 * @hide
2916 */
2917 public static final String POINTER_LOCATION = "pointer_location";
2918
Svetoslav683914b2015-01-15 14:22:26 -08002919 /** @hide */
2920 public static final Validator POINTER_LOCATION_VALIDATOR = sBooleanValidator;
2921
Dianne Hackborn90d2db32010-02-11 22:19:06 -08002922 /**
Jeff Browndaf4a122011-08-26 17:14:14 -07002923 * Show touch positions on screen?
2924 * 0 = no
2925 * 1 = yes
2926 * @hide
2927 */
2928 public static final String SHOW_TOUCHES = "show_touches";
2929
Svetoslav683914b2015-01-15 14:22:26 -08002930 /** @hide */
2931 public static final Validator SHOW_TOUCHES_VALIDATOR = sBooleanValidator;
2932
Jeff Browndaf4a122011-08-26 17:14:14 -07002933 /**
Dianne Hackborn16ec0802014-08-15 18:32:33 -07002934 * Log raw orientation data from
Jorim Jaggib10e33f2015-02-04 21:57:40 +01002935 * {@link com.android.server.policy.WindowOrientationListener} for use with the
Jeff Brown4519f072011-01-23 13:16:01 -08002936 * orientationplot.py tool.
2937 * 0 = no
2938 * 1 = yes
2939 * @hide
2940 */
2941 public static final String WINDOW_ORIENTATION_LISTENER_LOG =
2942 "window_orientation_listener_log";
2943
Svetoslav683914b2015-01-15 14:22:26 -08002944 /** @hide */
2945 public static final Validator WINDOW_ORIENTATION_LISTENER_LOG_VALIDATOR = sBooleanValidator;
2946
Jeff Brown4519f072011-01-23 13:16:01 -08002947 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002948 * @deprecated Use {@link android.provider.Settings.Global#POWER_SOUNDS_ENABLED}
2949 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002950 * @hide
2951 */
Christopher Tate06efb532012-08-24 15:29:27 -07002952 @Deprecated
2953 public static final String POWER_SOUNDS_ENABLED = Global.POWER_SOUNDS_ENABLED;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002954
2955 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002956 * @deprecated Use {@link android.provider.Settings.Global#DOCK_SOUNDS_ENABLED}
2957 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002958 * @hide
2959 */
Christopher Tate06efb532012-08-24 15:29:27 -07002960 @Deprecated
2961 public static final String DOCK_SOUNDS_ENABLED = Global.DOCK_SOUNDS_ENABLED;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002962
2963 /**
2964 * Whether to play sounds when the keyguard is shown and dismissed.
2965 * @hide
2966 */
2967 public static final String LOCKSCREEN_SOUNDS_ENABLED = "lockscreen_sounds_enabled";
2968
Svetoslav683914b2015-01-15 14:22:26 -08002969 /** @hide */
2970 public static final Validator LOCKSCREEN_SOUNDS_ENABLED_VALIDATOR = sBooleanValidator;
2971
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002972 /**
Mike Lockwood7bef7392011-10-20 16:51:53 -04002973 * Whether the lockscreen should be completely disabled.
2974 * @hide
2975 */
2976 public static final String LOCKSCREEN_DISABLED = "lockscreen.disabled";
2977
Svetoslav683914b2015-01-15 14:22:26 -08002978 /** @hide */
2979 public static final Validator LOCKSCREEN_DISABLED_VALIDATOR = sBooleanValidator;
2980
Mike Lockwood7bef7392011-10-20 16:51:53 -04002981 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002982 * @deprecated Use {@link android.provider.Settings.Global#LOW_BATTERY_SOUND}
2983 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002984 * @hide
2985 */
Christopher Tate06efb532012-08-24 15:29:27 -07002986 @Deprecated
2987 public static final String LOW_BATTERY_SOUND = Global.LOW_BATTERY_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002988
2989 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002990 * @deprecated Use {@link android.provider.Settings.Global#DESK_DOCK_SOUND}
2991 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002992 * @hide
2993 */
Christopher Tate06efb532012-08-24 15:29:27 -07002994 @Deprecated
2995 public static final String DESK_DOCK_SOUND = Global.DESK_DOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05002996
2997 /**
Christopher Tate06efb532012-08-24 15:29:27 -07002998 * @deprecated Use {@link android.provider.Settings.Global#DESK_UNDOCK_SOUND}
2999 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003000 * @hide
3001 */
Christopher Tate06efb532012-08-24 15:29:27 -07003002 @Deprecated
3003 public static final String DESK_UNDOCK_SOUND = Global.DESK_UNDOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003004
3005 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003006 * @deprecated Use {@link android.provider.Settings.Global#CAR_DOCK_SOUND}
3007 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003008 * @hide
3009 */
Christopher Tate06efb532012-08-24 15:29:27 -07003010 @Deprecated
3011 public static final String CAR_DOCK_SOUND = Global.CAR_DOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003012
3013 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003014 * @deprecated Use {@link android.provider.Settings.Global#CAR_UNDOCK_SOUND}
3015 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003016 * @hide
3017 */
Christopher Tate06efb532012-08-24 15:29:27 -07003018 @Deprecated
3019 public static final String CAR_UNDOCK_SOUND = Global.CAR_UNDOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003020
3021 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003022 * @deprecated Use {@link android.provider.Settings.Global#LOCK_SOUND}
3023 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003024 * @hide
3025 */
Christopher Tate06efb532012-08-24 15:29:27 -07003026 @Deprecated
3027 public static final String LOCK_SOUND = Global.LOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003028
3029 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003030 * @deprecated Use {@link android.provider.Settings.Global#UNLOCK_SOUND}
3031 * instead
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003032 * @hide
3033 */
Christopher Tate06efb532012-08-24 15:29:27 -07003034 @Deprecated
3035 public static final String UNLOCK_SOUND = Global.UNLOCK_SOUND;
Daniel Sandler0e9d2af2010-01-25 11:33:03 -05003036
3037 /**
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003038 * Receive incoming SIP calls?
3039 * 0 = no
3040 * 1 = yes
3041 * @hide
3042 */
3043 public static final String SIP_RECEIVE_CALLS = "sip_receive_calls";
3044
Svetoslav683914b2015-01-15 14:22:26 -08003045 /** @hide */
3046 public static final Validator SIP_RECEIVE_CALLS_VALIDATOR = sBooleanValidator;
3047
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003048 /**
3049 * Call Preference String.
3050 * "SIP_ALWAYS" : Always use SIP with network access
3051 * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003052 * @hide
3053 */
3054 public static final String SIP_CALL_OPTIONS = "sip_call_options";
3055
Svetoslav683914b2015-01-15 14:22:26 -08003056 /** @hide */
3057 public static final Validator SIP_CALL_OPTIONS_VALIDATOR = new DiscreteValueValidator(
3058 new String[] {"SIP_ALWAYS", "SIP_ADDRESS_ONLY"});
3059
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003060 /**
3061 * One of the sip call options: Always use SIP with network access.
3062 * @hide
3063 */
3064 public static final String SIP_ALWAYS = "SIP_ALWAYS";
3065
Svetoslav683914b2015-01-15 14:22:26 -08003066 /** @hide */
3067 public static final Validator SIP_ALWAYS_VALIDATOR = sBooleanValidator;
3068
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003069 /**
3070 * One of the sip call options: Only if destination is a SIP address.
3071 * @hide
3072 */
3073 public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY";
3074
Svetoslav683914b2015-01-15 14:22:26 -08003075 /** @hide */
3076 public static final Validator SIP_ADDRESS_ONLY_VALIDATOR = sBooleanValidator;
3077
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003078 /**
Tyler Gunn2c830a22014-09-02 08:39:35 -07003079 * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead. Formerly used to indicate that
3080 * the user should be prompted each time a call is made whether it should be placed using
3081 * SIP. The {@link com.android.providers.settings.DatabaseHelper} replaces this with
3082 * SIP_ADDRESS_ONLY.
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003083 * @hide
3084 */
Tyler Gunn2c830a22014-09-02 08:39:35 -07003085 @Deprecated
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003086 public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME";
3087
Svetoslav683914b2015-01-15 14:22:26 -08003088 /** @hide */
3089 public static final Validator SIP_ASK_ME_EACH_TIME_VALIDATOR = sBooleanValidator;
3090
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003091 /**
Jeff Brown1a84fd12011-06-02 01:26:32 -07003092 * Pointer speed setting.
3093 * This is an integer value in a range between -7 and +7, so there are 15 possible values.
3094 * -7 = slowest
3095 * 0 = default speed
3096 * +7 = fastest
3097 * @hide
3098 */
3099 public static final String POINTER_SPEED = "pointer_speed";
3100
Svetoslav683914b2015-01-15 14:22:26 -08003101 /** @hide */
3102 public static final Validator POINTER_SPEED_VALIDATOR =
3103 new InclusiveFloatRangeValidator(-7, 7);
3104
Jeff Brown1a84fd12011-06-02 01:26:32 -07003105 /**
Jason Monk56e09b42014-07-18 10:29:14 -04003106 * Whether lock-to-app will be triggered by long-press on recents.
3107 * @hide
3108 */
3109 public static final String LOCK_TO_APP_ENABLED = "lock_to_app_enabled";
3110
Svetoslav683914b2015-01-15 14:22:26 -08003111 /** @hide */
3112 public static final Validator LOCK_TO_APP_ENABLED_VALIDATOR = sBooleanValidator;
3113
Jason Monk56e09b42014-07-18 10:29:14 -04003114 /**
Daniel Sandler2fdb68b2013-10-03 00:12:11 -04003115 * I am the lolrus.
3116 * <p>
3117 * Nonzero values indicate that the user has a bukkit.
3118 * Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>.
3119 * @hide
3120 */
3121 public static final String EGG_MODE = "egg_mode";
3122
Svetoslav683914b2015-01-15 14:22:26 -08003123 /** @hide */
Svet Ganovb1918a02015-05-15 09:32:55 -07003124 public static final Validator EGG_MODE_VALIDATOR = new Validator() {
3125 @Override
3126 public boolean validate(String value) {
3127 try {
3128 return Long.parseLong(value) >= 0;
3129 } catch (NumberFormatException e) {
3130 return false;
3131 }
3132 }
3133 };
Svetoslav683914b2015-01-15 14:22:26 -08003134
3135 /**
3136 * IMPORTANT: If you add a new public settings you also have to add it to
3137 * PUBLIC_SETTINGS below. If the new setting is hidden you have to add
3138 * it to PRIVATE_SETTINGS below. Also add a validator that can validate
3139 * the setting value. See an example above.
3140 */
3141
Daniel Sandler2fdb68b2013-10-03 00:12:11 -04003142 /**
-b master501eec92009-07-06 13:53:11 -07003143 * Settings to backup. This is here so that it's in the same place as the settings
3144 * keys and easy to update.
Svetoslav Ganova571a582011-09-20 18:32:20 -07003145 *
3146 * NOTE: Settings are backed up and restored in the order they appear
3147 * in this array. If you have one setting depending on another,
3148 * make sure that they are ordered appropriately.
3149 *
-b master501eec92009-07-06 13:53:11 -07003150 * @hide
3151 */
3152 public static final String[] SETTINGS_TO_BACKUP = {
Christopher Tate66488d62012-10-02 11:58:01 -07003153 STAY_ON_WHILE_PLUGGED_IN, // moved to global
-b master501eec92009-07-06 13:53:11 -07003154 WIFI_USE_STATIC_IP,
3155 WIFI_STATIC_IP,
3156 WIFI_STATIC_GATEWAY,
3157 WIFI_STATIC_NETMASK,
3158 WIFI_STATIC_DNS1,
3159 WIFI_STATIC_DNS2,
3160 BLUETOOTH_DISCOVERABILITY,
3161 BLUETOOTH_DISCOVERABILITY_TIMEOUT,
3162 DIM_SCREEN,
3163 SCREEN_OFF_TIMEOUT,
3164 SCREEN_BRIGHTNESS,
Christopher Tate362aca62009-09-25 15:58:03 -07003165 SCREEN_BRIGHTNESS_MODE,
Dianne Hackbornd9ea4682012-01-20 18:36:40 -08003166 SCREEN_AUTO_BRIGHTNESS_ADJ,
Jeff Brown7f6c2312012-04-13 20:38:38 -07003167 VIBRATE_INPUT_DEVICES,
Amith Yamasani8823c0a82009-07-07 14:30:17 -07003168 MODE_RINGER_STREAMS_AFFECTED,
-b master501eec92009-07-06 13:53:11 -07003169 TEXT_AUTO_REPLACE,
3170 TEXT_AUTO_CAPS,
3171 TEXT_AUTO_PUNCTUATE,
3172 TEXT_SHOW_PASSWORD,
Christopher Tate66488d62012-10-02 11:58:01 -07003173 AUTO_TIME, // moved to global
3174 AUTO_TIME_ZONE, // moved to global
-b master501eec92009-07-06 13:53:11 -07003175 TIME_12_24,
3176 DATE_FORMAT,
-b master501eec92009-07-06 13:53:11 -07003177 DTMF_TONE_WHEN_DIALING,
3178 DTMF_TONE_TYPE_WHEN_DIALING,
-b master501eec92009-07-06 13:53:11 -07003179 HEARING_AID,
3180 TTY_MODE,
3181 SOUND_EFFECTS_ENABLED,
3182 HAPTIC_FEEDBACK_ENABLED,
Christopher Tate66488d62012-10-02 11:58:01 -07003183 POWER_SOUNDS_ENABLED, // moved to global
3184 DOCK_SOUNDS_ENABLED, // moved to global
Christopher Tate14c2d792010-02-25 16:49:44 -08003185 LOCKSCREEN_SOUNDS_ENABLED,
Amith Yamasaniae3ed702009-12-01 19:02:05 -08003186 SHOW_WEB_SUGGESTIONS,
Mike Lockwoodeabe8bf2010-08-31 14:35:23 -04003187 NOTIFICATION_LIGHT_PULSE,
Chung-yih Wang042e9bd2010-08-31 17:43:39 +08003188 SIP_CALL_OPTIONS,
Nick Pelly038cabe2010-09-23 16:12:11 -07003189 SIP_RECEIVE_CALLS,
Jeff Brown1a84fd12011-06-02 01:26:32 -07003190 POINTER_SPEED,
Amith Yamasani622bf2222013-09-06 13:54:28 -07003191 VIBRATE_WHEN_RINGING,
3192 RINGTONE,
Jason Monk94cfd9d2014-10-31 13:18:21 -04003193 LOCK_TO_APP_ENABLED,
Amith Yamasani622bf2222013-09-06 13:54:28 -07003194 NOTIFICATION_SOUND
-b master501eec92009-07-06 13:53:11 -07003195 };
3196
Sailesh Nepal1bd78762014-02-11 22:32:21 -08003197 /**
Amith Yamasanib0ff3222015-03-04 09:56:14 -08003198 * These are all public system settings
Svetoslav683914b2015-01-15 14:22:26 -08003199 *
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07003200 * @hide
3201 */
Svetoslav683914b2015-01-15 14:22:26 -08003202 public static final Set<String> PUBLIC_SETTINGS = new ArraySet<>();
3203 static {
3204 PUBLIC_SETTINGS.add(END_BUTTON_BEHAVIOR);
3205 PUBLIC_SETTINGS.add(WIFI_USE_STATIC_IP);
3206 PUBLIC_SETTINGS.add(WIFI_STATIC_IP);
3207 PUBLIC_SETTINGS.add(WIFI_STATIC_GATEWAY);
3208 PUBLIC_SETTINGS.add(WIFI_STATIC_NETMASK);
3209 PUBLIC_SETTINGS.add(WIFI_STATIC_DNS1);
3210 PUBLIC_SETTINGS.add(WIFI_STATIC_DNS2);
3211 PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY);
3212 PUBLIC_SETTINGS.add(BLUETOOTH_DISCOVERABILITY_TIMEOUT);
3213 PUBLIC_SETTINGS.add(NEXT_ALARM_FORMATTED);
3214 PUBLIC_SETTINGS.add(FONT_SCALE);
3215 PUBLIC_SETTINGS.add(DIM_SCREEN);
3216 PUBLIC_SETTINGS.add(SCREEN_OFF_TIMEOUT);
3217 PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS);
3218 PUBLIC_SETTINGS.add(SCREEN_BRIGHTNESS_MODE);
3219 PUBLIC_SETTINGS.add(MODE_RINGER_STREAMS_AFFECTED);
3220 PUBLIC_SETTINGS.add(MUTE_STREAMS_AFFECTED);
3221 PUBLIC_SETTINGS.add(VIBRATE_ON);
3222 PUBLIC_SETTINGS.add(VOLUME_RING);
3223 PUBLIC_SETTINGS.add(VOLUME_SYSTEM);
3224 PUBLIC_SETTINGS.add(VOLUME_VOICE);
3225 PUBLIC_SETTINGS.add(VOLUME_MUSIC);
3226 PUBLIC_SETTINGS.add(VOLUME_ALARM);
3227 PUBLIC_SETTINGS.add(VOLUME_NOTIFICATION);
3228 PUBLIC_SETTINGS.add(VOLUME_BLUETOOTH_SCO);
3229 PUBLIC_SETTINGS.add(RINGTONE);
3230 PUBLIC_SETTINGS.add(NOTIFICATION_SOUND);
3231 PUBLIC_SETTINGS.add(ALARM_ALERT);
3232 PUBLIC_SETTINGS.add(TEXT_AUTO_REPLACE);
3233 PUBLIC_SETTINGS.add(TEXT_AUTO_CAPS);
3234 PUBLIC_SETTINGS.add(TEXT_AUTO_PUNCTUATE);
3235 PUBLIC_SETTINGS.add(TEXT_SHOW_PASSWORD);
3236 PUBLIC_SETTINGS.add(SHOW_GTALK_SERVICE_STATUS);
3237 PUBLIC_SETTINGS.add(WALLPAPER_ACTIVITY);
3238 PUBLIC_SETTINGS.add(TIME_12_24);
3239 PUBLIC_SETTINGS.add(DATE_FORMAT);
3240 PUBLIC_SETTINGS.add(SETUP_WIZARD_HAS_RUN);
3241 PUBLIC_SETTINGS.add(ACCELEROMETER_ROTATION);
3242 PUBLIC_SETTINGS.add(USER_ROTATION);
3243 PUBLIC_SETTINGS.add(DTMF_TONE_WHEN_DIALING);
3244 PUBLIC_SETTINGS.add(SOUND_EFFECTS_ENABLED);
3245 PUBLIC_SETTINGS.add(HAPTIC_FEEDBACK_ENABLED);
3246 PUBLIC_SETTINGS.add(SHOW_WEB_SUGGESTIONS);
3247 }
3248
3249 /**
3250 * These are all hidden system settings.
3251 *
3252 * @hide
3253 */
3254 public static final Set<String> PRIVATE_SETTINGS = new ArraySet<>();
3255 static {
3256 PRIVATE_SETTINGS.add(WIFI_USE_STATIC_IP);
3257 PRIVATE_SETTINGS.add(END_BUTTON_BEHAVIOR);
3258 PRIVATE_SETTINGS.add(ADVANCED_SETTINGS);
3259 PRIVATE_SETTINGS.add(SCREEN_AUTO_BRIGHTNESS_ADJ);
3260 PRIVATE_SETTINGS.add(VIBRATE_INPUT_DEVICES);
3261 PRIVATE_SETTINGS.add(VOLUME_MASTER);
3262 PRIVATE_SETTINGS.add(VOLUME_MASTER_MUTE);
3263 PRIVATE_SETTINGS.add(MICROPHONE_MUTE);
3264 PRIVATE_SETTINGS.add(NOTIFICATIONS_USE_RING_VOLUME);
3265 PRIVATE_SETTINGS.add(VIBRATE_IN_SILENT);
3266 PRIVATE_SETTINGS.add(MEDIA_BUTTON_RECEIVER);
3267 PRIVATE_SETTINGS.add(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY);
3268 PRIVATE_SETTINGS.add(VIBRATE_WHEN_RINGING);
3269 PRIVATE_SETTINGS.add(DTMF_TONE_TYPE_WHEN_DIALING);
3270 PRIVATE_SETTINGS.add(HEARING_AID);
3271 PRIVATE_SETTINGS.add(TTY_MODE);
3272 PRIVATE_SETTINGS.add(NOTIFICATION_LIGHT_PULSE);
3273 PRIVATE_SETTINGS.add(POINTER_LOCATION);
3274 PRIVATE_SETTINGS.add(SHOW_TOUCHES);
3275 PRIVATE_SETTINGS.add(WINDOW_ORIENTATION_LISTENER_LOG);
3276 PRIVATE_SETTINGS.add(POWER_SOUNDS_ENABLED);
3277 PRIVATE_SETTINGS.add(DOCK_SOUNDS_ENABLED);
3278 PRIVATE_SETTINGS.add(LOCKSCREEN_SOUNDS_ENABLED);
3279 PRIVATE_SETTINGS.add(LOCKSCREEN_DISABLED);
3280 PRIVATE_SETTINGS.add(LOW_BATTERY_SOUND);
3281 PRIVATE_SETTINGS.add(DESK_DOCK_SOUND);
3282 PRIVATE_SETTINGS.add(DESK_UNDOCK_SOUND);
3283 PRIVATE_SETTINGS.add(CAR_DOCK_SOUND);
3284 PRIVATE_SETTINGS.add(CAR_UNDOCK_SOUND);
3285 PRIVATE_SETTINGS.add(LOCK_SOUND);
3286 PRIVATE_SETTINGS.add(UNLOCK_SOUND);
3287 PRIVATE_SETTINGS.add(SIP_RECEIVE_CALLS);
3288 PRIVATE_SETTINGS.add(SIP_CALL_OPTIONS);
3289 PRIVATE_SETTINGS.add(SIP_ALWAYS);
3290 PRIVATE_SETTINGS.add(SIP_ADDRESS_ONLY);
3291 PRIVATE_SETTINGS.add(SIP_ASK_ME_EACH_TIME);
3292 PRIVATE_SETTINGS.add(POINTER_SPEED);
3293 PRIVATE_SETTINGS.add(LOCK_TO_APP_ENABLED);
3294 PRIVATE_SETTINGS.add(EGG_MODE);
3295 }
3296
3297 /**
Amith Yamasanib0ff3222015-03-04 09:56:14 -08003298 * These are all public system settings
Svetoslav683914b2015-01-15 14:22:26 -08003299 *
3300 * @hide
3301 */
3302 public static final Map<String, Validator> VALIDATORS = new ArrayMap<>();
3303 static {
3304 VALIDATORS.put(END_BUTTON_BEHAVIOR,END_BUTTON_BEHAVIOR_VALIDATOR);
3305 VALIDATORS.put(WIFI_USE_STATIC_IP, WIFI_USE_STATIC_IP_VALIDATOR);
3306 VALIDATORS.put(BLUETOOTH_DISCOVERABILITY, BLUETOOTH_DISCOVERABILITY_VALIDATOR);
3307 VALIDATORS.put(BLUETOOTH_DISCOVERABILITY_TIMEOUT,
3308 BLUETOOTH_DISCOVERABILITY_TIMEOUT_VALIDATOR);
3309 VALIDATORS.put(NEXT_ALARM_FORMATTED, NEXT_ALARM_FORMATTED_VALIDATOR);
3310 VALIDATORS.put(FONT_SCALE, FONT_SCALE_VALIDATOR);
3311 VALIDATORS.put(DIM_SCREEN, DIM_SCREEN_VALIDATOR);
3312 VALIDATORS.put(SCREEN_OFF_TIMEOUT, SCREEN_OFF_TIMEOUT_VALIDATOR);
3313 VALIDATORS.put(SCREEN_BRIGHTNESS, SCREEN_BRIGHTNESS_VALIDATOR);
3314 VALIDATORS.put(SCREEN_BRIGHTNESS_MODE, SCREEN_BRIGHTNESS_MODE_VALIDATOR);
3315 VALIDATORS.put(MODE_RINGER_STREAMS_AFFECTED, MODE_RINGER_STREAMS_AFFECTED_VALIDATOR);
3316 VALIDATORS.put(MUTE_STREAMS_AFFECTED, MUTE_STREAMS_AFFECTED_VALIDATOR);
3317 VALIDATORS.put(VIBRATE_ON, VIBRATE_ON_VALIDATOR);
Svetoslav683914b2015-01-15 14:22:26 -08003318 VALIDATORS.put(RINGTONE, RINGTONE_VALIDATOR);
3319 VALIDATORS.put(NOTIFICATION_SOUND, NOTIFICATION_SOUND_VALIDATOR);
3320 VALIDATORS.put(ALARM_ALERT, ALARM_ALERT_VALIDATOR);
3321 VALIDATORS.put(TEXT_AUTO_REPLACE, TEXT_AUTO_REPLACE_VALIDATOR);
3322 VALIDATORS.put(TEXT_AUTO_CAPS, TEXT_AUTO_CAPS_VALIDATOR);
3323 VALIDATORS.put(TEXT_AUTO_PUNCTUATE, TEXT_AUTO_PUNCTUATE_VALIDATOR);
3324 VALIDATORS.put(TEXT_SHOW_PASSWORD, TEXT_SHOW_PASSWORD_VALIDATOR);
3325 VALIDATORS.put(SHOW_GTALK_SERVICE_STATUS, SHOW_GTALK_SERVICE_STATUS_VALIDATOR);
3326 VALIDATORS.put(WALLPAPER_ACTIVITY, WALLPAPER_ACTIVITY_VALIDATOR);
3327 VALIDATORS.put(TIME_12_24, TIME_12_24_VALIDATOR);
3328 VALIDATORS.put(DATE_FORMAT, DATE_FORMAT_VALIDATOR);
3329 VALIDATORS.put(SETUP_WIZARD_HAS_RUN, SETUP_WIZARD_HAS_RUN_VALIDATOR);
3330 VALIDATORS.put(ACCELEROMETER_ROTATION, ACCELEROMETER_ROTATION_VALIDATOR);
3331 VALIDATORS.put(USER_ROTATION, USER_ROTATION_VALIDATOR);
3332 VALIDATORS.put(DTMF_TONE_WHEN_DIALING, DTMF_TONE_WHEN_DIALING_VALIDATOR);
3333 VALIDATORS.put(SOUND_EFFECTS_ENABLED, SOUND_EFFECTS_ENABLED_VALIDATOR);
3334 VALIDATORS.put(HAPTIC_FEEDBACK_ENABLED, HAPTIC_FEEDBACK_ENABLED_VALIDATOR);
3335 VALIDATORS.put(SHOW_WEB_SUGGESTIONS, SHOW_WEB_SUGGESTIONS_VALIDATOR);
3336 VALIDATORS.put(WIFI_USE_STATIC_IP, WIFI_USE_STATIC_IP_VALIDATOR);
3337 VALIDATORS.put(END_BUTTON_BEHAVIOR, END_BUTTON_BEHAVIOR_VALIDATOR);
3338 VALIDATORS.put(ADVANCED_SETTINGS, ADVANCED_SETTINGS_VALIDATOR);
3339 VALIDATORS.put(SCREEN_AUTO_BRIGHTNESS_ADJ, SCREEN_AUTO_BRIGHTNESS_ADJ_VALIDATOR);
3340 VALIDATORS.put(VIBRATE_INPUT_DEVICES, VIBRATE_INPUT_DEVICES_VALIDATOR);
Svetoslav683914b2015-01-15 14:22:26 -08003341 VALIDATORS.put(VOLUME_MASTER_MUTE, VOLUME_MASTER_MUTE_VALIDATOR);
3342 VALIDATORS.put(MICROPHONE_MUTE, MICROPHONE_MUTE_VALIDATOR);
3343 VALIDATORS.put(NOTIFICATIONS_USE_RING_VOLUME, NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR);
3344 VALIDATORS.put(VIBRATE_IN_SILENT, VIBRATE_IN_SILENT_VALIDATOR);
3345 VALIDATORS.put(MEDIA_BUTTON_RECEIVER, MEDIA_BUTTON_RECEIVER_VALIDATOR);
3346 VALIDATORS.put(HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY,
3347 HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY_VALIDATOR);
3348 VALIDATORS.put(VIBRATE_WHEN_RINGING, VIBRATE_WHEN_RINGING_VALIDATOR);
3349 VALIDATORS.put(DTMF_TONE_TYPE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING_VALIDATOR);
3350 VALIDATORS.put(HEARING_AID, HEARING_AID_VALIDATOR);
3351 VALIDATORS.put(TTY_MODE, TTY_MODE_VALIDATOR);
3352 VALIDATORS.put(NOTIFICATION_LIGHT_PULSE, NOTIFICATION_LIGHT_PULSE_VALIDATOR);
3353 VALIDATORS.put(POINTER_LOCATION, POINTER_LOCATION_VALIDATOR);
3354 VALIDATORS.put(SHOW_TOUCHES, SHOW_TOUCHES_VALIDATOR);
3355 VALIDATORS.put(WINDOW_ORIENTATION_LISTENER_LOG,
3356 WINDOW_ORIENTATION_LISTENER_LOG_VALIDATOR);
3357 VALIDATORS.put(LOCKSCREEN_SOUNDS_ENABLED, LOCKSCREEN_SOUNDS_ENABLED_VALIDATOR);
3358 VALIDATORS.put(LOCKSCREEN_DISABLED, LOCKSCREEN_DISABLED_VALIDATOR);
3359 VALIDATORS.put(SIP_RECEIVE_CALLS, SIP_RECEIVE_CALLS_VALIDATOR);
3360 VALIDATORS.put(SIP_CALL_OPTIONS, SIP_CALL_OPTIONS_VALIDATOR);
3361 VALIDATORS.put(SIP_ALWAYS, SIP_ALWAYS_VALIDATOR);
3362 VALIDATORS.put(SIP_ADDRESS_ONLY, SIP_ADDRESS_ONLY_VALIDATOR);
3363 VALIDATORS.put(SIP_ASK_ME_EACH_TIME, SIP_ASK_ME_EACH_TIME_VALIDATOR);
3364 VALIDATORS.put(POINTER_SPEED, POINTER_SPEED_VALIDATOR);
3365 VALIDATORS.put(LOCK_TO_APP_ENABLED, LOCK_TO_APP_ENABLED_VALIDATOR);
3366 VALIDATORS.put(EGG_MODE, EGG_MODE_VALIDATOR);
3367 VALIDATORS.put(WIFI_STATIC_IP, WIFI_STATIC_IP_VALIDATOR);
3368 VALIDATORS.put(WIFI_STATIC_GATEWAY, WIFI_STATIC_GATEWAY_VALIDATOR);
3369 VALIDATORS.put(WIFI_STATIC_NETMASK, WIFI_STATIC_NETMASK_VALIDATOR);
3370 VALIDATORS.put(WIFI_STATIC_DNS1, WIFI_STATIC_DNS1_VALIDATOR);
3371 VALIDATORS.put(WIFI_STATIC_DNS2, WIFI_STATIC_DNS2_VALIDATOR);
3372 }
3373
3374 /**
3375 * These entries are considered common between the personal and the managed profile,
3376 * since the managed profile doesn't get to change them.
3377 */
3378 private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>();
3379 static {
3380 CLONE_TO_MANAGED_PROFILE.add(DATE_FORMAT);
3381 CLONE_TO_MANAGED_PROFILE.add(HAPTIC_FEEDBACK_ENABLED);
3382 CLONE_TO_MANAGED_PROFILE.add(SOUND_EFFECTS_ENABLED);
3383 CLONE_TO_MANAGED_PROFILE.add(TEXT_SHOW_PASSWORD);
3384 CLONE_TO_MANAGED_PROFILE.add(TIME_12_24);
3385 }
3386
3387 /** @hide */
3388 public static void getCloneToManagedProfileSettings(Set<String> outKeySet) {
3389 outKeySet.addAll(CLONE_TO_MANAGED_PROFILE);
3390 }
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07003391
3392 /**
Sailesh Nepal1bd78762014-02-11 22:32:21 -08003393 * When to use Wi-Fi calling
3394 *
3395 * @see android.telephony.TelephonyManager.WifiCallingChoices
3396 * @hide
3397 */
3398 public static final String WHEN_TO_MAKE_WIFI_CALLS = "when_to_make_wifi_calls";
3399
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003400 // Settings moved to Settings.Secure
3401
3402 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003403 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003404 * instead
3405 */
3406 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003407 public static final String ADB_ENABLED = Global.ADB_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003408
3409 /**
3410 * @deprecated Use {@link android.provider.Settings.Secure#ANDROID_ID} instead
3411 */
3412 @Deprecated
3413 public static final String ANDROID_ID = Secure.ANDROID_ID;
3414
3415 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003416 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003417 */
3418 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003419 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003420
3421 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003422 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003423 */
3424 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003425 public static final String DATA_ROAMING = Global.DATA_ROAMING;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003426
3427 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003428 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003429 */
3430 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003431 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003432
3433 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07003434 * @deprecated Use {@link android.provider.Settings.Global#HTTP_PROXY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003435 */
3436 @Deprecated
Jeff Sharkey625239a2012-09-26 22:03:49 -07003437 public static final String HTTP_PROXY = Global.HTTP_PROXY;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003438
3439 /**
Christopher Tateaa036a22014-05-19 16:33:27 -07003440 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003441 */
3442 @Deprecated
Christopher Tateaa036a22014-05-19 16:33:27 -07003443 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003444
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003445 /**
3446 * @deprecated Use {@link android.provider.Settings.Secure#LOCATION_PROVIDERS_ALLOWED}
3447 * instead
3448 */
3449 @Deprecated
3450 public static final String LOCATION_PROVIDERS_ALLOWED = Secure.LOCATION_PROVIDERS_ALLOWED;
3451
3452 /**
3453 * @deprecated Use {@link android.provider.Settings.Secure#LOGGING_ID} instead
3454 */
3455 @Deprecated
3456 public static final String LOGGING_ID = Secure.LOGGING_ID;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003457
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003458 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003459 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003460 */
3461 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003462 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003463
3464 /**
3465 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_ENABLED}
3466 * instead
3467 */
3468 @Deprecated
3469 public static final String PARENTAL_CONTROL_ENABLED = Secure.PARENTAL_CONTROL_ENABLED;
3470
3471 /**
3472 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_LAST_UPDATE}
3473 * instead
3474 */
3475 @Deprecated
3476 public static final String PARENTAL_CONTROL_LAST_UPDATE = Secure.PARENTAL_CONTROL_LAST_UPDATE;
3477
3478 /**
3479 * @deprecated Use {@link android.provider.Settings.Secure#PARENTAL_CONTROL_REDIRECT_URL}
3480 * instead
3481 */
3482 @Deprecated
3483 public static final String PARENTAL_CONTROL_REDIRECT_URL =
3484 Secure.PARENTAL_CONTROL_REDIRECT_URL;
3485
3486 /**
3487 * @deprecated Use {@link android.provider.Settings.Secure#SETTINGS_CLASSNAME} instead
3488 */
3489 @Deprecated
3490 public static final String SETTINGS_CLASSNAME = Secure.SETTINGS_CLASSNAME;
3491
3492 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003493 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003494 */
3495 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003496 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003497
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003498 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003499 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003500 */
3501 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003502 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003503
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003504 /**
3505 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003506 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003507 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003508 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003509 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 -08003510
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003511 /**
3512 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003513 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead
Dianne Hackborn4a51c202009-08-21 15:14:02 -07003514 */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003515 @Deprecated
3516 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
Christopher Tate06efb532012-08-24 15:29:27 -07003517 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003518
3519 /**
3520 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003521 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003522 */
3523 @Deprecated
3524 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Christopher Tate06efb532012-08-24 15:29:27 -07003525 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003526
3527 /**
3528 * @deprecated Use
Christopher Tate06efb532012-08-24 15:29:27 -07003529 * {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003530 */
3531 @Deprecated
3532 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
Christopher Tate06efb532012-08-24 15:29:27 -07003533 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003534
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003535 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003536 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003537 * instead
3538 */
3539 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003540 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 -08003541
3542 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003543 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003544 */
3545 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003546 public static final String WIFI_ON = Global.WIFI_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003547
3548 /**
3549 * @deprecated Use
3550 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE}
3551 * instead
3552 */
3553 @Deprecated
3554 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
3555 Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE;
3556
3557 /**
3558 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_AP_COUNT} instead
3559 */
3560 @Deprecated
3561 public static final String WIFI_WATCHDOG_AP_COUNT = Secure.WIFI_WATCHDOG_AP_COUNT;
3562
3563 /**
3564 * @deprecated Use
3565 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS} instead
3566 */
3567 @Deprecated
3568 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
3569 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07003570
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003571 /**
3572 * @deprecated Use
3573 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED} instead
3574 */
3575 @Deprecated
3576 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
3577 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED;
3578
3579 /**
3580 * @deprecated Use
3581 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS}
3582 * instead
3583 */
3584 @Deprecated
3585 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
3586 Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS;
3587
3588 /**
3589 * @deprecated Use
3590 * {@link android.provider.Settings.Secure#WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT} instead
3591 */
3592 @Deprecated
3593 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
3594 Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT;
3595
3596 /**
3597 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_MAX_AP_CHECKS}
3598 * instead
3599 */
3600 @Deprecated
3601 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = Secure.WIFI_WATCHDOG_MAX_AP_CHECKS;
3602
3603 /**
Christopher Tate06efb532012-08-24 15:29:27 -07003604 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003605 */
3606 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07003607 public static final String WIFI_WATCHDOG_ON = Global.WIFI_WATCHDOG_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003608
3609 /**
3610 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_COUNT} instead
3611 */
3612 @Deprecated
3613 public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT;
3614
3615 /**
3616 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_DELAY_MS}
3617 * instead
3618 */
3619 @Deprecated
3620 public static final String WIFI_WATCHDOG_PING_DELAY_MS = Secure.WIFI_WATCHDOG_PING_DELAY_MS;
3621
3622 /**
3623 * @deprecated Use {@link android.provider.Settings.Secure#WIFI_WATCHDOG_PING_TIMEOUT_MS}
3624 * instead
3625 */
3626 @Deprecated
3627 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS =
3628 Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS;
3629 }
3630
3631 /**
3632 * Secure system settings, containing system preferences that applications
3633 * can read but are not allowed to write. These are for preferences that
3634 * the user must explicitly modify through the system UI or specialized
3635 * APIs for those values, not modified directly by applications.
3636 */
3637 public static final class Secure extends NameValueTable {
3638 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
3639
Dianne Hackborn139748f2012-09-24 11:36:57 -07003640 /**
3641 * The content:// style URL for this table
3642 */
3643 public static final Uri CONTENT_URI =
3644 Uri.parse("content://" + AUTHORITY + "/secure");
3645
Brad Fitzpatrick1877d012010-03-04 17:48:13 -08003646 // Populated lazily, guarded by class object:
Dianne Hackborn139748f2012-09-24 11:36:57 -07003647 private static final NameValueCache sNameValueCache = new NameValueCache(
3648 SYS_PROP_SETTING_VERSION,
3649 CONTENT_URI,
3650 CALL_METHOD_GET_SECURE,
3651 CALL_METHOD_PUT_SECURE);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003652
Amith Yamasani52c489c2012-03-28 11:42:42 -07003653 private static ILockSettings sLockSettings = null;
3654
Amith Yamasani7ab8c4a2012-04-06 09:27:12 -07003655 private static boolean sIsSystemProcess;
Amith Yamasani52c489c2012-03-28 11:42:42 -07003656 private static final HashSet<String> MOVED_TO_LOCK_SETTINGS;
Christopher Tate06efb532012-08-24 15:29:27 -07003657 private static final HashSet<String> MOVED_TO_GLOBAL;
Amith Yamasani52c489c2012-03-28 11:42:42 -07003658 static {
3659 MOVED_TO_LOCK_SETTINGS = new HashSet<String>(3);
3660 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_ENABLED);
3661 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_VISIBLE);
3662 MOVED_TO_LOCK_SETTINGS.add(Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);
Christopher Tate06efb532012-08-24 15:29:27 -07003663
3664 MOVED_TO_GLOBAL = new HashSet<String>();
3665 MOVED_TO_GLOBAL.add(Settings.Global.ADB_ENABLED);
3666 MOVED_TO_GLOBAL.add(Settings.Global.ASSISTED_GPS_ENABLED);
3667 MOVED_TO_GLOBAL.add(Settings.Global.BLUETOOTH_ON);
Christopher Tate58f41ec2013-01-11 15:40:36 -08003668 MOVED_TO_GLOBAL.add(Settings.Global.BUGREPORT_IN_POWER_MENU);
Christopher Tate06efb532012-08-24 15:29:27 -07003669 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_CELL_BROADCAST_SMS);
3670 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_ROAMING_MODE);
3671 MOVED_TO_GLOBAL.add(Settings.Global.CDMA_SUBSCRIPTION_MODE);
3672 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE);
3673 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI);
3674 MOVED_TO_GLOBAL.add(Settings.Global.DATA_ROAMING);
3675 MOVED_TO_GLOBAL.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED);
3676 MOVED_TO_GLOBAL.add(Settings.Global.DEVICE_PROVISIONED);
3677 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_DENSITY_FORCED);
3678 MOVED_TO_GLOBAL.add(Settings.Global.DISPLAY_SIZE_FORCED);
3679 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE);
3680 MOVED_TO_GLOBAL.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE);
Christopher Tate06efb532012-08-24 15:29:27 -07003681 MOVED_TO_GLOBAL.add(Settings.Global.MOBILE_DATA);
3682 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION);
3683 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_DELETE_AGE);
3684 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES);
3685 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE);
3686 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_ENABLED);
3687 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES);
3688 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_POLL_INTERVAL);
Christopher Tate06efb532012-08-24 15:29:27 -07003689 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_SAMPLE_ENABLED);
3690 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE);
3691 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION);
3692 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_DELETE_AGE);
3693 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES);
3694 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_ROTATE_AGE);
3695 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION);
3696 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE);
3697 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES);
3698 MOVED_TO_GLOBAL.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE);
3699 MOVED_TO_GLOBAL.add(Settings.Global.NETWORK_PREFERENCE);
3700 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_DIFF);
3701 MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING);
3702 MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER);
3703 MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT);
3704 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT);
3705 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS);
3706 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT);
3707 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS);
3708 MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT);
3709 MOVED_TO_GLOBAL.add(Settings.Global.SAMPLING_PROFILER_MS);
3710 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL);
3711 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST);
3712 MOVED_TO_GLOBAL.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL);
3713 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_APN);
3714 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_DUN_REQUIRED);
3715 MOVED_TO_GLOBAL.add(Settings.Global.TETHER_SUPPORTED);
Christopher Tate06efb532012-08-24 15:29:27 -07003716 MOVED_TO_GLOBAL.add(Settings.Global.USB_MASS_STORAGE_ENABLED);
3717 MOVED_TO_GLOBAL.add(Settings.Global.USE_GOOGLE_MAIL);
Robert Greenwalt3ea0c992013-10-03 21:13:49 +00003718 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_COUNTRY_CODE);
Christopher Tate06efb532012-08-24 15:29:27 -07003719 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS);
3720 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_FREQUENCY_BAND);
3721 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_IDLE_MS);
3722 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT);
3723 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS);
3724 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON);
3725 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY);
3726 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT);
3727 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON);
3728 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME);
3729 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SAVED_STATE);
3730 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS);
3731 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED);
vandwalle7c3606c2014-03-31 19:12:07 -07003732 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ENHANCED_AUTO_JOIN);
3733 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_NETWORK_SHOW_RSSI);
Christopher Tate06efb532012-08-24 15:29:27 -07003734 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_ON);
3735 MOVED_TO_GLOBAL.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED);
Christopher Tate06efb532012-08-24 15:29:27 -07003736 MOVED_TO_GLOBAL.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON);
Christopher Tatec868b642012-09-12 17:41:04 -07003737 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_ENABLE);
3738 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT);
3739 MOVED_TO_GLOBAL.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE);
3740 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS);
3741 MOVED_TO_GLOBAL.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS);
3742 MOVED_TO_GLOBAL.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS);
Christopher Tate06efb532012-08-24 15:29:27 -07003743 MOVED_TO_GLOBAL.add(Settings.Global.WTF_IS_FATAL);
Jeff Sharkey625239a2012-09-26 22:03:49 -07003744 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD);
3745 MOVED_TO_GLOBAL.add(Settings.Global.BATTERY_DISCHARGE_THRESHOLD);
3746 MOVED_TO_GLOBAL.add(Settings.Global.SEND_ACTION_APP_ERROR);
3747 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_AGE_SECONDS);
3748 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_MAX_FILES);
3749 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_KB);
3750 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_QUOTA_PERCENT);
3751 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_RESERVE_PERCENT);
3752 MOVED_TO_GLOBAL.add(Settings.Global.DROPBOX_TAG_PREFIX);
3753 MOVED_TO_GLOBAL.add(Settings.Global.ERROR_LOGCAT_PREFIX);
3754 MOVED_TO_GLOBAL.add(Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL);
3755 MOVED_TO_GLOBAL.add(Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD);
3756 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE);
3757 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES);
3758 MOVED_TO_GLOBAL.add(Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES);
3759 MOVED_TO_GLOBAL.add(Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS);
3760 MOVED_TO_GLOBAL.add(Settings.Global.CONNECTIVITY_CHANGE_DELAY);
3761 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED);
3762 MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_SERVER);
3763 MOVED_TO_GLOBAL.add(Settings.Global.NSD_ON);
3764 MOVED_TO_GLOBAL.add(Settings.Global.SET_INSTALL_LOCATION);
3765 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_INSTALL_LOCATION);
3766 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY);
3767 MOVED_TO_GLOBAL.add(Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY);
3768 MOVED_TO_GLOBAL.add(Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT);
3769 MOVED_TO_GLOBAL.add(Settings.Global.HTTP_PROXY);
3770 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_HOST);
3771 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_PORT);
3772 MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST);
3773 MOVED_TO_GLOBAL.add(Settings.Global.SET_GLOBAL_HTTP_PROXY);
3774 MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER);
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07003775 MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE);
Hui Shu22671772014-10-01 21:41:07 +00003776 MOVED_TO_GLOBAL.add(Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY);
Christopher Tate06efb532012-08-24 15:29:27 -07003777 }
3778
Christopher Tate66488d62012-10-02 11:58:01 -07003779 /** @hide */
Svetoslav683914b2015-01-15 14:22:26 -08003780 public static void getMovedToGlobalSettings(Set<String> outKeySet) {
Christopher Tate66488d62012-10-02 11:58:01 -07003781 outKeySet.addAll(MOVED_TO_GLOBAL);
3782 }
3783
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003784 /**
3785 * Look up a name in the database.
3786 * @param resolver to access the database with
3787 * @param name to look up in the table
3788 * @return the corresponding value, or null if not present
3789 */
Dianne Hackborn139748f2012-09-24 11:36:57 -07003790 public static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07003791 return getStringForUser(resolver, name, UserHandle.myUserId());
3792 }
3793
3794 /** @hide */
Dianne Hackborn139748f2012-09-24 11:36:57 -07003795 public static String getStringForUser(ContentResolver resolver, String name,
Christopher Tate06efb532012-08-24 15:29:27 -07003796 int userHandle) {
3797 if (MOVED_TO_GLOBAL.contains(name)) {
3798 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Secure"
3799 + " to android.provider.Settings.Global.");
3800 return Global.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003801 }
Amith Yamasani52c489c2012-03-28 11:42:42 -07003802
Dianne Hackborn139748f2012-09-24 11:36:57 -07003803 if (MOVED_TO_LOCK_SETTINGS.contains(name)) {
3804 synchronized (Secure.class) {
3805 if (sLockSettings == null) {
3806 sLockSettings = ILockSettings.Stub.asInterface(
3807 (IBinder) ServiceManager.getService("lock_settings"));
3808 sIsSystemProcess = Process.myUid() == Process.SYSTEM_UID;
3809 }
3810 }
3811 if (sLockSettings != null && !sIsSystemProcess) {
3812 try {
3813 return sLockSettings.getString(name, "0", userHandle);
3814 } catch (RemoteException re) {
3815 // Fall through
3816 }
Amith Yamasani52c489c2012-03-28 11:42:42 -07003817 }
3818 }
3819
Christopher Tate06efb532012-08-24 15:29:27 -07003820 return sNameValueCache.getStringForUser(resolver, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003821 }
3822
3823 /**
3824 * Store a name/value pair into the database.
3825 * @param resolver to access the database with
3826 * @param name to store
3827 * @param value to associate with the name
3828 * @return true if the value was set, false on database errors
3829 */
Christopher Tate06efb532012-08-24 15:29:27 -07003830 public static boolean putString(ContentResolver resolver, String name, String value) {
3831 return putStringForUser(resolver, name, value, UserHandle.myUserId());
3832 }
3833
3834 /** @hide */
3835 public static boolean putStringForUser(ContentResolver resolver, String name, String value,
3836 int userHandle) {
Julia Reynolds82735bc2014-09-04 16:43:30 -04003837 if (LOCATION_MODE.equals(name)) {
3838 // HACK ALERT: temporary hack to work around b/10491283.
3839 // TODO: once b/10491283 fixed, remove this hack
3840 return setLocationModeForUser(resolver, Integer.parseInt(value), userHandle);
3841 }
Christopher Tate06efb532012-08-24 15:29:27 -07003842 if (MOVED_TO_GLOBAL.contains(name)) {
3843 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
3844 + " to android.provider.Settings.Global");
3845 return Global.putStringForUser(resolver, name, value, userHandle);
3846 }
Christopher Tate06efb532012-08-24 15:29:27 -07003847 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003848 }
3849
3850 /**
3851 * Construct the content URI for a particular name/value pair,
3852 * useful for monitoring changes with a ContentObserver.
3853 * @param name to look up in the table
3854 * @return the corresponding content URI, or null if not present
3855 */
3856 public static Uri getUriFor(String name) {
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.Secure"
3859 + " to android.provider.Settings.Global, returning global URI.");
3860 return Global.getUriFor(Global.CONTENT_URI, name);
3861 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003862 return getUriFor(CONTENT_URI, name);
3863 }
3864
3865 /**
3866 * Convenience function for retrieving a single secure settings value
3867 * as an integer. Note that internally setting values are always
3868 * stored as strings; this function converts the string to an integer
3869 * for you. The default value will be returned if the setting is
3870 * not defined or not an integer.
3871 *
3872 * @param cr The ContentResolver to access.
3873 * @param name The name of the setting to retrieve.
3874 * @param def Value to return if the setting is not defined.
3875 *
3876 * @return The setting's current value, or 'def' if it is not defined
3877 * or not a valid integer.
3878 */
3879 public static int getInt(ContentResolver cr, String name, int def) {
Christopher Tate06efb532012-08-24 15:29:27 -07003880 return getIntForUser(cr, name, def, UserHandle.myUserId());
3881 }
3882
3883 /** @hide */
3884 public static int getIntForUser(ContentResolver cr, String name, int def, int userHandle) {
Tom O'Neill7f6f4572013-08-27 10:53:15 -07003885 if (LOCATION_MODE.equals(name)) {
3886 // HACK ALERT: temporary hack to work around b/10491283.
3887 // TODO: once b/10491283 fixed, remove this hack
3888 return getLocationModeForUser(cr, userHandle);
3889 }
Christopher Tate06efb532012-08-24 15:29:27 -07003890 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003891 try {
3892 return v != null ? Integer.parseInt(v) : def;
3893 } catch (NumberFormatException e) {
3894 return def;
3895 }
3896 }
3897
3898 /**
3899 * Convenience function for retrieving a single secure settings value
3900 * as an integer. Note that internally setting values are always
3901 * stored as strings; this function converts the string to an integer
3902 * for you.
3903 * <p>
3904 * This version does not take a default value. If the setting has not
3905 * been set, or the string value is not a number,
3906 * it throws {@link SettingNotFoundException}.
3907 *
3908 * @param cr The ContentResolver to access.
3909 * @param name The name of the setting to retrieve.
3910 *
3911 * @throws SettingNotFoundException Thrown if a setting by the given
3912 * name can't be found or the setting value is not an integer.
3913 *
3914 * @return The setting's current value.
3915 */
3916 public static int getInt(ContentResolver cr, String name)
3917 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07003918 return getIntForUser(cr, name, UserHandle.myUserId());
3919 }
3920
3921 /** @hide */
3922 public static int getIntForUser(ContentResolver cr, String name, int userHandle)
3923 throws SettingNotFoundException {
Tom O'Neill7f6f4572013-08-27 10:53:15 -07003924 if (LOCATION_MODE.equals(name)) {
3925 // HACK ALERT: temporary hack to work around b/10491283.
3926 // TODO: once b/10491283 fixed, remove this hack
3927 return getLocationModeForUser(cr, userHandle);
3928 }
Christopher Tate06efb532012-08-24 15:29:27 -07003929 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003930 try {
3931 return Integer.parseInt(v);
3932 } catch (NumberFormatException e) {
3933 throw new SettingNotFoundException(name);
3934 }
3935 }
3936
3937 /**
3938 * Convenience function for updating a single settings value as an
3939 * integer. This will either create a new entry in the table if the
3940 * given name does not exist, or modify the value of the existing row
3941 * with that name. Note that internally setting values are always
3942 * stored as strings, so this function converts the given value to a
3943 * string before storing it.
3944 *
3945 * @param cr The ContentResolver to access.
3946 * @param name The name of the setting to modify.
3947 * @param value The new value for the setting.
3948 * @return true if the value was set, false on database errors
3949 */
3950 public static boolean putInt(ContentResolver cr, String name, int value) {
Christopher Tate06efb532012-08-24 15:29:27 -07003951 return putIntForUser(cr, name, value, UserHandle.myUserId());
3952 }
3953
3954 /** @hide */
3955 public static boolean putIntForUser(ContentResolver cr, String name, int value,
3956 int userHandle) {
3957 return putStringForUser(cr, name, Integer.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003958 }
3959
3960 /**
3961 * Convenience function for retrieving a single secure settings value
3962 * as a {@code long}. Note that internally setting values are always
3963 * stored as strings; this function converts the string to a {@code long}
3964 * for you. The default value will be returned if the setting is
3965 * not defined or not a {@code long}.
3966 *
3967 * @param cr The ContentResolver to access.
3968 * @param name The name of the setting to retrieve.
3969 * @param def Value to return if the setting is not defined.
3970 *
3971 * @return The setting's current value, or 'def' if it is not defined
3972 * or not a valid {@code long}.
3973 */
3974 public static long getLong(ContentResolver cr, String name, long def) {
Christopher Tate06efb532012-08-24 15:29:27 -07003975 return getLongForUser(cr, name, def, UserHandle.myUserId());
3976 }
3977
3978 /** @hide */
3979 public static long getLongForUser(ContentResolver cr, String name, long def,
3980 int userHandle) {
3981 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08003982 long value;
3983 try {
3984 value = valString != null ? Long.parseLong(valString) : def;
3985 } catch (NumberFormatException e) {
3986 value = def;
3987 }
3988 return value;
3989 }
3990
3991 /**
3992 * Convenience function for retrieving a single secure settings value
3993 * as a {@code long}. Note that internally setting values are always
3994 * stored as strings; this function converts the string to a {@code long}
3995 * for you.
3996 * <p>
3997 * This version does not take a default value. If the setting has not
3998 * been set, or the string value is not a number,
3999 * it throws {@link SettingNotFoundException}.
4000 *
4001 * @param cr The ContentResolver to access.
4002 * @param name The name of the setting to retrieve.
4003 *
4004 * @return The setting's current value.
4005 * @throws SettingNotFoundException Thrown if a setting by the given
4006 * name can't be found or the setting value is not an integer.
4007 */
4008 public static long getLong(ContentResolver cr, String name)
4009 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07004010 return getLongForUser(cr, name, UserHandle.myUserId());
4011 }
4012
4013 /** @hide */
4014 public static long getLongForUser(ContentResolver cr, String name, int userHandle)
4015 throws SettingNotFoundException {
4016 String valString = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004017 try {
4018 return Long.parseLong(valString);
4019 } catch (NumberFormatException e) {
4020 throw new SettingNotFoundException(name);
4021 }
4022 }
4023
4024 /**
4025 * Convenience function for updating a secure settings value as a long
4026 * integer. This will either create a new entry in the table if the
4027 * given name does not exist, or modify the value of the existing row
4028 * with that name. Note that internally setting values are always
4029 * stored as strings, so this function converts the given value to a
4030 * string before storing it.
4031 *
4032 * @param cr The ContentResolver to access.
4033 * @param name The name of the setting to modify.
4034 * @param value The new value for the setting.
4035 * @return true if the value was set, false on database errors
4036 */
4037 public static boolean putLong(ContentResolver cr, String name, long value) {
Christopher Tate06efb532012-08-24 15:29:27 -07004038 return putLongForUser(cr, name, value, UserHandle.myUserId());
4039 }
4040
4041 /** @hide */
4042 public static boolean putLongForUser(ContentResolver cr, String name, long value,
4043 int userHandle) {
4044 return putStringForUser(cr, name, Long.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004045 }
4046
4047 /**
4048 * Convenience function for retrieving a single secure settings value
4049 * as a floating point number. Note that internally setting values are
4050 * always stored as strings; this function converts the string to an
4051 * float for you. The default value will be returned if the setting
4052 * is not defined or not a valid float.
4053 *
4054 * @param cr The ContentResolver to access.
4055 * @param name The name of the setting to retrieve.
4056 * @param def Value to return if the setting is not defined.
4057 *
4058 * @return The setting's current value, or 'def' if it is not defined
4059 * or not a valid float.
4060 */
4061 public static float getFloat(ContentResolver cr, String name, float def) {
Christopher Tate06efb532012-08-24 15:29:27 -07004062 return getFloatForUser(cr, name, def, UserHandle.myUserId());
4063 }
4064
4065 /** @hide */
4066 public static float getFloatForUser(ContentResolver cr, String name, float def,
4067 int userHandle) {
4068 String v = getStringForUser(cr, name, userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004069 try {
4070 return v != null ? Float.parseFloat(v) : def;
4071 } catch (NumberFormatException e) {
4072 return def;
4073 }
4074 }
4075
4076 /**
4077 * Convenience function for retrieving a single secure settings value
4078 * as a float. Note that internally setting values are always
4079 * stored as strings; this function converts the string to a float
4080 * for you.
4081 * <p>
4082 * This version does not take a default value. If the setting has not
4083 * been set, or the string value is not a number,
4084 * it throws {@link SettingNotFoundException}.
4085 *
4086 * @param cr The ContentResolver to access.
4087 * @param name The name of the setting to retrieve.
4088 *
4089 * @throws SettingNotFoundException Thrown if a setting by the given
4090 * name can't be found or the setting value is not a float.
4091 *
4092 * @return The setting's current value.
4093 */
4094 public static float getFloat(ContentResolver cr, String name)
4095 throws SettingNotFoundException {
Christopher Tate06efb532012-08-24 15:29:27 -07004096 return getFloatForUser(cr, name, UserHandle.myUserId());
4097 }
4098
4099 /** @hide */
4100 public static float getFloatForUser(ContentResolver cr, String name, int userHandle)
4101 throws SettingNotFoundException {
4102 String v = getStringForUser(cr, name, userHandle);
Brian Muramatsue1d46982010-12-06 17:34:20 -08004103 if (v == null) {
4104 throw new SettingNotFoundException(name);
4105 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004106 try {
4107 return Float.parseFloat(v);
4108 } catch (NumberFormatException e) {
4109 throw new SettingNotFoundException(name);
4110 }
4111 }
4112
4113 /**
4114 * Convenience function for updating a single settings value as a
4115 * floating point number. This will either create a new entry in the
4116 * table if the given name does not exist, or modify the value of the
4117 * existing row with that name. Note that internally setting values
4118 * are always stored as strings, so this function converts the given
4119 * value to a string before storing it.
4120 *
4121 * @param cr The ContentResolver to access.
4122 * @param name The name of the setting to modify.
4123 * @param value The new value for the setting.
4124 * @return true if the value was set, false on database errors
4125 */
4126 public static boolean putFloat(ContentResolver cr, String name, float value) {
Christopher Tate06efb532012-08-24 15:29:27 -07004127 return putFloatForUser(cr, name, value, UserHandle.myUserId());
4128 }
4129
4130 /** @hide */
4131 public static boolean putFloatForUser(ContentResolver cr, String name, float value,
4132 int userHandle) {
4133 return putStringForUser(cr, name, Float.toString(value), userHandle);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004134 }
4135
4136 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004137 * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED}
4138 * instead
Dianne Hackborn895f99e2012-02-02 11:49:12 -08004139 */
Christopher Tate06efb532012-08-24 15:29:27 -07004140 @Deprecated
4141 public static final String DEVELOPMENT_SETTINGS_ENABLED =
4142 Global.DEVELOPMENT_SETTINGS_ENABLED;
Dianne Hackborn895f99e2012-02-02 11:49:12 -08004143
4144 /**
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07004145 * When the user has enable the option to have a "bug report" command
4146 * in the power menu.
Christopher Tate58f41ec2013-01-11 15:40:36 -08004147 * @deprecated Use {@link android.provider.Settings.Global#BUGREPORT_IN_POWER_MENU} instead
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07004148 * @hide
4149 */
Christopher Tate58f41ec2013-01-11 15:40:36 -08004150 @Deprecated
Dianne Hackborn5773bfdb2012-07-13 13:24:15 -07004151 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu";
4152
4153 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004154 * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004155 */
Christopher Tate06efb532012-08-24 15:29:27 -07004156 @Deprecated
4157 public static final String ADB_ENABLED = Global.ADB_ENABLED;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004158
4159 /**
4160 * Setting to allow mock locations and location provider status to be injected into the
4161 * LocationManager service for testing purposes during application development. These
4162 * locations and status values override actual location and status information generated
4163 * by network, gps, or other location providers.
Svet Ganovf7e9cf42015-05-13 10:40:31 -07004164 *
4165 * @deprecated This settings is not used anymore.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004166 */
Svet Ganovf7e9cf42015-05-13 10:40:31 -07004167 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004168 public static final String ALLOW_MOCK_LOCATION = "mock_location";
4169
4170 /**
Doug Zongkerd8893db2010-01-26 12:29:44 -08004171 * A 64-bit number (as a hex string) that is randomly
Scott Main44895332013-11-12 09:23:13 -08004172 * generated when the user first sets up the device and should remain
4173 * constant for the lifetime of the user's device. The value may
4174 * change if a factory reset is performed on the device.
4175 * <p class="note"><strong>Note:</strong> When a device has <a
4176 * href="{@docRoot}about/versions/android-4.2.html#MultipleUsers">multiple users</a>
4177 * (available on certain devices running Android 4.2 or higher), each user appears as a
4178 * completely separate device, so the {@code ANDROID_ID} value is unique to each
4179 * user.</p>
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004180 */
4181 public static final String ANDROID_ID = "android_id";
4182
4183 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004184 * @deprecated Use {@link android.provider.Settings.Global#BLUETOOTH_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004185 */
Christopher Tate06efb532012-08-24 15:29:27 -07004186 @Deprecated
4187 public static final String BLUETOOTH_ON = Global.BLUETOOTH_ON;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004188
4189 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004190 * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004191 */
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07004192 @Deprecated
Christopher Tate06efb532012-08-24 15:29:27 -07004193 public static final String DATA_ROAMING = Global.DATA_ROAMING;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004194
4195 /**
4196 * Setting to record the input method used by default, holding the ID
4197 * of the desired method.
4198 */
4199 public static final String DEFAULT_INPUT_METHOD = "default_input_method";
4200
4201 /**
satokab751aa2010-09-14 19:17:36 +09004202 * Setting to record the input method subtype used by default, holding the ID
4203 * of the desired method.
4204 */
4205 public static final String SELECTED_INPUT_METHOD_SUBTYPE =
4206 "selected_input_method_subtype";
4207
4208 /**
satok723a27e2010-11-11 14:58:11 +09004209 * Setting to record the history of input method subtype, holding the pair of ID of IME
4210 * and its last used subtype.
4211 * @hide
4212 */
4213 public static final String INPUT_METHODS_SUBTYPE_HISTORY =
4214 "input_methods_subtype_history";
4215
4216 /**
satok5c58dfc2010-12-14 21:54:47 +09004217 * Setting to record the visibility of input method selector
4218 */
4219 public static final String INPUT_METHOD_SELECTOR_VISIBILITY =
4220 "input_method_selector_visibility";
4221
4222 /**
Dianne Hackborn91097de2014-04-04 18:02:06 -07004223 * The currently selected voice interaction service flattened ComponentName.
4224 * @hide
4225 */
4226 public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service";
4227
4228 /**
Zhihai Xuaf5971e2013-06-10 20:28:31 -07004229 * bluetooth HCI snoop log configuration
4230 * @hide
4231 */
4232 public static final String BLUETOOTH_HCI_LOG =
4233 "bluetooth_hci_log";
4234
4235 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004236 * @deprecated Use {@link android.provider.Settings.Global#DEVICE_PROVISIONED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004237 */
Christopher Tate06efb532012-08-24 15:29:27 -07004238 @Deprecated
4239 public static final String DEVICE_PROVISIONED = Global.DEVICE_PROVISIONED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004240
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004241 /**
Russell Brennerde6ae442012-09-26 20:53:10 -07004242 * Whether the current user has been set up via setup wizard (0 = false, 1 = true)
4243 * @hide
4244 */
4245 public static final String USER_SETUP_COMPLETE = "user_setup_complete";
4246
4247 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004248 * List of input methods that are currently enabled. This is a string
4249 * containing the IDs of all enabled input methods, each ID separated
4250 * by ':'.
4251 */
4252 public static final String ENABLED_INPUT_METHODS = "enabled_input_methods";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004253
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004254 /**
Amith Yamasanie861ec12010-03-24 21:39:27 -07004255 * List of system input methods that are currently disabled. This is a string
4256 * containing the IDs of all disabled input methods, each ID separated
4257 * by ':'.
4258 * @hide
4259 */
4260 public static final String DISABLED_SYSTEM_INPUT_METHODS = "disabled_system_input_methods";
4261
4262 /**
Michael Wright7b5a96b2014-08-09 19:28:42 -07004263 * Whether to show the IME when a hard keyboard is connected. This is a boolean that
4264 * determines if the IME should be shown when a hard keyboard is attached.
4265 * @hide
4266 */
4267 public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard";
4268
4269 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07004270 * Host name and port for global http proxy. Uses ':' seperator for
4271 * between host and port.
4272 *
4273 * @deprecated Use {@link Global#HTTP_PROXY}
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004274 */
Jeff Sharkey625239a2012-09-26 22:03:49 -07004275 @Deprecated
4276 public static final String HTTP_PROXY = Global.HTTP_PROXY;
Robert Greenwalte90aa5e2010-09-01 11:34:05 -07004277
4278 /**
Christopher Tateaa036a22014-05-19 16:33:27 -07004279 * Whether applications can be installed for this user via the system's
4280 * {@link Intent#ACTION_INSTALL_PACKAGE} mechanism.
4281 *
4282 * <p>1 = permit app installation via the system package installer intent
4283 * <p>0 = do not allow use of the package installer
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004284 */
Christopher Tateaa036a22014-05-19 16:33:27 -07004285 public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004286
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004287 /**
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004288 * Comma-separated list of location providers that activities may access. Do not rely on
4289 * this value being present in settings.db or on ContentObserver notifications on the
4290 * corresponding Uri.
Tom O'Neilla324ac72013-08-26 14:40:23 -07004291 *
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004292 * @deprecated use {@link #LOCATION_MODE} and
4293 * {@link LocationManager#MODE_CHANGED_ACTION} (or
4294 * {@link LocationManager#PROVIDERS_CHANGED_ACTION})
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004295 */
Tom O'Neilla324ac72013-08-26 14:40:23 -07004296 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004297 public static final String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004298
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004299 /**
Tom O'Neill7f6f4572013-08-27 10:53:15 -07004300 * The degree of location access enabled by the user.
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004301 * <p>
Tom O'Neill7f6f4572013-08-27 10:53:15 -07004302 * When used with {@link #putInt(ContentResolver, String, int)}, must be one of {@link
4303 * #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY}, {@link
4304 * #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}. When used with {@link
4305 * #getInt(ContentResolver, String)}, the caller must gracefully handle additional location
4306 * modes that might be added in the future.
Tom O'Neill923c0dc2014-03-03 11:07:55 -08004307 * <p>
4308 * Note: do not rely on this value being present in settings.db or on ContentObserver
4309 * notifications for the corresponding Uri. Use {@link LocationManager#MODE_CHANGED_ACTION}
4310 * to receive changes in this value.
Tom O'Neilla324ac72013-08-26 14:40:23 -07004311 */
4312 public static final String LOCATION_MODE = "location_mode";
4313
4314 /**
Tom O'Neill7f6f4572013-08-27 10:53:15 -07004315 * Location access disabled.
Tom O'Neill1f48b782013-08-19 18:14:56 -07004316 */
4317 public static final int LOCATION_MODE_OFF = 0;
4318 /**
4319 * Network Location Provider disabled, but GPS and other sensors enabled.
4320 */
4321 public static final int LOCATION_MODE_SENSORS_ONLY = 1;
4322 /**
Tom O'Neilld5759432013-09-11 11:03:03 -07004323 * Reduced power usage, such as limiting the number of GPS updates per hour. Requests
4324 * with {@link android.location.Criteria#POWER_HIGH} may be downgraded to
4325 * {@link android.location.Criteria#POWER_MEDIUM}.
Tom O'Neill1f48b782013-08-19 18:14:56 -07004326 */
4327 public static final int LOCATION_MODE_BATTERY_SAVING = 2;
4328 /**
4329 * Best-effort location computation allowed.
4330 */
4331 public static final int LOCATION_MODE_HIGH_ACCURACY = 3;
4332
4333 /**
Danielle Millett925a7d82012-03-19 18:02:20 -04004334 * A flag containing settings used for biometric weak
4335 * @hide
4336 */
Adrian Roos230635e2015-01-07 20:50:29 +01004337 @Deprecated
Danielle Millett925a7d82012-03-19 18:02:20 -04004338 public static final String LOCK_BIOMETRIC_WEAK_FLAGS =
4339 "lock_biometric_weak_flags";
4340
4341 /**
Jason Monk94cfd9d2014-10-31 13:18:21 -04004342 * Whether lock-to-app will lock the keyguard when exiting.
4343 * @hide
4344 */
4345 public static final String LOCK_TO_APP_EXIT_LOCKED = "lock_to_app_exit_locked";
4346
4347 /**
Amith Yamasani156c4352010-03-05 17:10:03 -08004348 * Whether autolock is enabled (0 = false, 1 = true)
Adrian Roos9dd16eb2015-01-08 16:20:49 +01004349 *
4350 * @deprecated Use {@link android.app.KeyguardManager} to determine the state and security
4351 * level of the keyguard.
Amith Yamasani156c4352010-03-05 17:10:03 -08004352 */
Adrian Roos9dd16eb2015-01-08 16:20:49 +01004353 @Deprecated
Amith Yamasani156c4352010-03-05 17:10:03 -08004354 public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
4355
4356 /**
4357 * Whether lock pattern is visible as user enters (0 = false, 1 = true)
4358 */
4359 public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
4360
4361 /**
Jeff Sharkey5ed9d682012-10-10 14:28:27 -07004362 * Whether lock pattern will vibrate as user enters (0 = false, 1 =
4363 * true)
4364 *
4365 * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the
4366 * lockscreen uses
4367 * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}.
Amith Yamasani156c4352010-03-05 17:10:03 -08004368 */
Jeff Sharkey5ed9d682012-10-10 14:28:27 -07004369 @Deprecated
4370 public static final String
4371 LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
Amith Yamasani156c4352010-03-05 17:10:03 -08004372
4373 /**
Jim Millerbc4603b2010-08-30 21:21:34 -07004374 * This preference allows the device to be locked given time after screen goes off,
4375 * subject to current DeviceAdmin policy limits.
4376 * @hide
4377 */
4378 public static final String LOCK_SCREEN_LOCK_AFTER_TIMEOUT = "lock_screen_lock_after_timeout";
4379
4380
4381 /**
John Spurlock5f050e52012-10-27 10:44:19 -04004382 * This preference contains the string that shows for owner info on LockScreen.
Jim Miller253a5ef2010-10-13 20:57:29 -07004383 * @hide
Jim Miller187ec582013-04-15 18:27:54 -07004384 * @deprecated
Jim Miller253a5ef2010-10-13 20:57:29 -07004385 */
4386 public static final String LOCK_SCREEN_OWNER_INFO = "lock_screen_owner_info";
4387
4388 /**
John Spurlock5f050e52012-10-27 10:44:19 -04004389 * Ids of the user-selected appwidgets on the lockscreen (comma-delimited).
Jim Millerf229e4d2012-09-12 20:32:50 -07004390 * @hide
4391 */
Adrian Roos230635e2015-01-07 20:50:29 +01004392 @Deprecated
Michael Jurkaaa2859a2012-10-24 12:46:49 -07004393 public static final String LOCK_SCREEN_APPWIDGET_IDS =
4394 "lock_screen_appwidget_ids";
Jim Millerf229e4d2012-09-12 20:32:50 -07004395
4396 /**
Jim Miller51117262012-11-04 17:58:09 -08004397 * Id of the appwidget shown on the lock screen when appwidgets are disabled.
4398 * @hide
4399 */
Adrian Roos230635e2015-01-07 20:50:29 +01004400 @Deprecated
Jim Miller51117262012-11-04 17:58:09 -08004401 public static final String LOCK_SCREEN_FALLBACK_APPWIDGET_ID =
4402 "lock_screen_fallback_appwidget_id";
4403
4404 /**
John Spurlock5f050e52012-10-27 10:44:19 -04004405 * Index of the lockscreen appwidget to restore, -1 if none.
4406 * @hide
4407 */
Adrian Roos230635e2015-01-07 20:50:29 +01004408 @Deprecated
John Spurlock5f050e52012-10-27 10:44:19 -04004409 public static final String LOCK_SCREEN_STICKY_APPWIDGET =
4410 "lock_screen_sticky_appwidget";
4411
4412 /**
4413 * This preference enables showing the owner info on LockScreen.
Jim Miller253a5ef2010-10-13 20:57:29 -07004414 * @hide
Jim Miller187ec582013-04-15 18:27:54 -07004415 * @deprecated
Jim Miller253a5ef2010-10-13 20:57:29 -07004416 */
4417 public static final String LOCK_SCREEN_OWNER_INFO_ENABLED =
4418 "lock_screen_owner_info_enabled";
4419
4420 /**
Dan Sandler5d7c3cc2014-02-18 17:35:15 -05004421 * When set by a user, allows notifications to be shown atop a securely locked screen
4422 * in their full "private" form (same as when the device is unlocked).
Dan Sandlerfd16d562014-02-13 18:43:31 -08004423 * @hide
4424 */
4425 public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS =
4426 "lock_screen_allow_private_notifications";
4427
4428 /**
Chris Wrencd8f4f72014-08-27 18:48:13 -04004429 * Set by the system to track if the user needs to see the call to action for
4430 * the lockscreen notification policy.
4431 * @hide
4432 */
4433 public static final String SHOW_NOTE_ABOUT_NOTIFICATION_HIDING =
4434 "show_note_about_notification_hiding";
4435
4436 /**
Adrian Roos3870d452014-09-05 18:22:28 +02004437 * Set to 1 by the system after trust agents have been initialized.
4438 * @hide
4439 */
4440 public static final String TRUST_AGENTS_INITIALIZED =
4441 "trust_agents_initialized";
4442
4443 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004444 * The Logging ID (a unique 64-bit value) as a hex string.
4445 * Used as a pseudonymous identifier for logging.
4446 * @deprecated This identifier is poorly initialized and has
4447 * many collisions. It should not be used.
4448 */
4449 @Deprecated
4450 public static final String LOGGING_ID = "logging_id";
4451
4452 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004453 * @deprecated Use {@link android.provider.Settings.Global#NETWORK_PREFERENCE} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004454 */
Christopher Tate06efb532012-08-24 15:29:27 -07004455 @Deprecated
4456 public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004457
4458 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08004459 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004460 */
4461 public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004462
4463 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08004464 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004465 */
4466 public static final String PARENTAL_CONTROL_LAST_UPDATE = "parental_control_last_update";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004467
4468 /**
Dan Egnor1c9131c2010-02-13 10:38:55 -08004469 * No longer supported.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004470 */
4471 public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004472
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004473 /**
4474 * Settings classname to launch when Settings is clicked from All
4475 * Applications. Needed because of user testing between the old
4476 * and new Settings apps.
4477 */
4478 // TODO: 881807
4479 public static final String SETTINGS_CLASSNAME = "settings_classname";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004480
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004481 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004482 * @deprecated Use {@link android.provider.Settings.Global#USB_MASS_STORAGE_ENABLED} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004483 */
Christopher Tate06efb532012-08-24 15:29:27 -07004484 @Deprecated
4485 public static final String USB_MASS_STORAGE_ENABLED = Global.USB_MASS_STORAGE_ENABLED;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004486
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004487 /**
Christopher Tate06efb532012-08-24 15:29:27 -07004488 * @deprecated Use {@link android.provider.Settings.Global#USE_GOOGLE_MAIL} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004489 */
Christopher Tate06efb532012-08-24 15:29:27 -07004490 @Deprecated
4491 public static final String USE_GOOGLE_MAIL = Global.USE_GOOGLE_MAIL;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004492
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004493 /**
svetoslavganov75986cf2009-05-14 22:28:01 -07004494 * If accessibility is enabled.
4495 */
4496 public static final String ACCESSIBILITY_ENABLED = "accessibility_enabled";
4497
4498 /**
Svetoslav Ganov00aabf72011-07-21 11:35:03 -07004499 * If touch exploration is enabled.
Svetoslav Ganov35bfede2011-07-14 17:57:06 -07004500 */
Svetoslav Ganov00aabf72011-07-21 11:35:03 -07004501 public static final String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled";
Svetoslav Ganov35bfede2011-07-14 17:57:06 -07004502
4503 /**
svetoslavganov75986cf2009-05-14 22:28:01 -07004504 * List of the enabled accessibility providers.
4505 */
4506 public static final String ENABLED_ACCESSIBILITY_SERVICES =
4507 "enabled_accessibility_services";
4508
4509 /**
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07004510 * List of the accessibility services to which the user has granted
Svetoslav Ganov9a4c5cd2012-05-30 14:06:32 -07004511 * permission to put the device into touch exploration mode.
4512 *
4513 * @hide
4514 */
4515 public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES =
4516 "touch_exploration_granted_accessibility_services";
4517
4518 /**
Svetoslav Ganov55f937a2011-12-05 11:42:07 -08004519 * Whether to speak passwords while in accessibility mode.
4520 */
4521 public static final String ACCESSIBILITY_SPEAK_PASSWORD = "speak_password";
4522
4523 /**
Chris Craikcce47eb2014-07-16 15:12:15 -07004524 * Whether to draw text with high contrast while in accessibility mode.
4525 *
4526 * @hide
4527 */
4528 public static final String ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED =
4529 "high_text_contrast_enabled";
4530
4531 /**
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004532 * If injection of accessibility enhancing JavaScript screen-reader
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004533 * is enabled.
4534 * <p>
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004535 * Note: The JavaScript based screen-reader is served by the
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004536 * Google infrastructure and enable users with disabilities to
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07004537 * efficiently navigate in and explore web content.
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004538 * </p>
4539 * <p>
4540 * This property represents a boolean value.
4541 * </p>
4542 * @hide
4543 */
4544 public static final String ACCESSIBILITY_SCRIPT_INJECTION =
4545 "accessibility_script_injection";
4546
4547 /**
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004548 * The URL for the injected JavaScript based screen-reader used
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07004549 * for providing accessibility of content in WebView.
Svetoslav Ganov3ca5a742011-12-06 15:24:37 -08004550 * <p>
4551 * Note: The JavaScript based screen-reader is served by the
4552 * Google infrastructure and enable users with disabilities to
4553 * efficiently navigate in and explore web content.
4554 * </p>
4555 * <p>
4556 * This property represents a string value.
4557 * </p>
4558 * @hide
4559 */
4560 public static final String ACCESSIBILITY_SCREEN_READER_URL =
4561 "accessibility_script_injection_url";
4562
4563 /**
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07004564 * Key bindings for navigation in built-in accessibility support for web content.
4565 * <p>
4566 * Note: These key bindings are for the built-in accessibility navigation for
4567 * web content which is used as a fall back solution if JavaScript in a WebView
4568 * is not enabled or the user has not opted-in script injection from Google.
4569 * </p>
4570 * <p>
4571 * The bindings are separated by semi-colon. A binding is a mapping from
4572 * a key to a sequence of actions (for more details look at
4573 * android.webkit.AccessibilityInjector). A key is represented as the hexademical
4574 * string representation of an integer obtained from a meta state (optional) shifted
4575 * sixteen times left and bitwise ored with a key code. An action is represented
4576 * as a hexademical string representation of an integer where the first two digits
4577 * are navigation action index, the second, the third, and the fourth digit pairs
4578 * represent the action arguments. The separate actions in a binding are colon
4579 * separated. The key and the action sequence it maps to are separated by equals.
4580 * </p>
4581 * <p>
4582 * For example, the binding below maps the DPAD right button to traverse the
4583 * current navigation axis once without firing an accessibility event and to
4584 * perform the same traversal again but to fire an event:
4585 * <code>
4586 * 0x16=0x01000100:0x01000101;
4587 * </code>
4588 * </p>
4589 * <p>
4590 * The goal of this binding is to enable dynamic rebinding of keys to
4591 * navigation actions for web content without requiring a framework change.
4592 * </p>
4593 * <p>
4594 * This property represents a string value.
4595 * </p>
4596 * @hide
4597 */
4598 public static final String ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS =
4599 "accessibility_web_content_key_bindings";
4600
4601 /**
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -07004602 * Setting that specifies whether the display magnification is enabled.
4603 * Display magnifications allows the user to zoom in the display content
4604 * and is targeted to low vision users. The current magnification scale
4605 * is controlled by {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE}.
4606 *
4607 * @hide
4608 */
4609 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED =
4610 "accessibility_display_magnification_enabled";
4611
4612 /**
4613 * Setting that specifies what the display magnification scale is.
4614 * Display magnifications allows the user to zoom in the display
4615 * content and is targeted to low vision users. Whether a display
4616 * magnification is performed is controlled by
4617 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED}
4618 *
4619 * @hide
4620 */
4621 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE =
4622 "accessibility_display_magnification_scale";
4623
4624 /**
4625 * Setting that specifies whether the display magnification should be
4626 * automatically updated. If this fearture is enabled the system will
4627 * exit magnification mode or pan the viewport when a context change
4628 * occurs. For example, on staring a new activity or rotating the screen,
4629 * the system may zoom out so the user can see the new context he is in.
4630 * Another example is on showing a window that is not visible in the
4631 * magnified viewport the system may pan the viewport to make the window
4632 * the has popped up so the user knows that the context has changed.
4633 * Whether a screen magnification is performed is controlled by
4634 * {@link #ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED}
4635 *
4636 * @hide
4637 */
4638 public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE =
4639 "accessibility_display_magnification_auto_update";
4640
4641 /**
Alan Viveretteef793802013-07-23 14:15:28 -07004642 * Setting that specifies whether timed text (captions) should be
4643 * displayed in video content. Text display properties are controlled by
4644 * the following settings:
4645 * <ul>
4646 * <li>{@link #ACCESSIBILITY_CAPTIONING_LOCALE}
4647 * <li>{@link #ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR}
4648 * <li>{@link #ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR}
4649 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_COLOR}
4650 * <li>{@link #ACCESSIBILITY_CAPTIONING_EDGE_TYPE}
4651 * <li>{@link #ACCESSIBILITY_CAPTIONING_TYPEFACE}
Alan Viverette69ce69b2013-08-29 12:23:48 -07004652 * <li>{@link #ACCESSIBILITY_CAPTIONING_FONT_SCALE}
Alan Viveretteef793802013-07-23 14:15:28 -07004653 * </ul>
4654 *
4655 * @hide
4656 */
4657 public static final String ACCESSIBILITY_CAPTIONING_ENABLED =
4658 "accessibility_captioning_enabled";
4659
4660 /**
4661 * Setting that specifies the language for captions as a locale string,
4662 * e.g. en_US.
4663 *
4664 * @see java.util.Locale#toString
4665 * @hide
4666 */
4667 public static final String ACCESSIBILITY_CAPTIONING_LOCALE =
4668 "accessibility_captioning_locale";
4669
4670 /**
Alan Viverette43a1e3d2013-08-02 16:45:03 -07004671 * Integer property that specifies the preset style for captions, one
4672 * of:
4673 * <ul>
Alan Viverette69ce69b2013-08-29 12:23:48 -07004674 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESET_CUSTOM}
4675 * <li>a valid index of {@link android.view.accessibility.CaptioningManager.CaptionStyle#PRESETS}
Alan Viverette43a1e3d2013-08-02 16:45:03 -07004676 * </ul>
4677 *
4678 * @see java.util.Locale#toString
4679 * @hide
4680 */
4681 public static final String ACCESSIBILITY_CAPTIONING_PRESET =
4682 "accessibility_captioning_preset";
4683
4684 /**
Alan Viveretteef793802013-07-23 14:15:28 -07004685 * Integer property that specifes the background color for captions as a
4686 * packed 32-bit color.
4687 *
4688 * @see android.graphics.Color#argb
4689 * @hide
4690 */
4691 public static final String ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR =
4692 "accessibility_captioning_background_color";
4693
4694 /**
4695 * Integer property that specifes the foreground color for captions as a
4696 * packed 32-bit color.
4697 *
4698 * @see android.graphics.Color#argb
4699 * @hide
4700 */
4701 public static final String ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR =
4702 "accessibility_captioning_foreground_color";
4703
4704 /**
4705 * Integer property that specifes the edge type for captions, one of:
4706 * <ul>
Alan Viverette69ce69b2013-08-29 12:23:48 -07004707 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_NONE}
4708 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE}
4709 * <li>{@link android.view.accessibility.CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW}
Alan Viveretteef793802013-07-23 14:15:28 -07004710 * </ul>
4711 *
4712 * @see #ACCESSIBILITY_CAPTIONING_EDGE_COLOR
4713 * @hide
4714 */
4715 public static final String ACCESSIBILITY_CAPTIONING_EDGE_TYPE =
4716 "accessibility_captioning_edge_type";
4717
4718 /**
4719 * Integer property that specifes the edge color for captions as a
4720 * packed 32-bit color.
4721 *
4722 * @see #ACCESSIBILITY_CAPTIONING_EDGE_TYPE
4723 * @see android.graphics.Color#argb
4724 * @hide
4725 */
4726 public static final String ACCESSIBILITY_CAPTIONING_EDGE_COLOR =
4727 "accessibility_captioning_edge_color";
4728
4729 /**
Alan Viverette55d70622013-12-11 15:22:14 -08004730 * Integer property that specifes the window color for captions as a
4731 * packed 32-bit color.
4732 *
4733 * @see android.graphics.Color#argb
4734 * @hide
4735 */
4736 public static final String ACCESSIBILITY_CAPTIONING_WINDOW_COLOR =
4737 "accessibility_captioning_window_color";
4738
4739 /**
Alan Viveretteef793802013-07-23 14:15:28 -07004740 * String property that specifies the typeface for captions, one of:
4741 * <ul>
4742 * <li>DEFAULT
4743 * <li>MONOSPACE
4744 * <li>SANS_SERIF
4745 * <li>SERIF
4746 * </ul>
4747 *
4748 * @see android.graphics.Typeface
4749 * @hide
4750 */
4751 public static final String ACCESSIBILITY_CAPTIONING_TYPEFACE =
4752 "accessibility_captioning_typeface";
4753
4754 /**
Alan Viverette69ce69b2013-08-29 12:23:48 -07004755 * Floating point property that specifies font scaling for captions.
Alan Viveretteef793802013-07-23 14:15:28 -07004756 *
4757 * @hide
4758 */
Alan Viverette69ce69b2013-08-29 12:23:48 -07004759 public static final String ACCESSIBILITY_CAPTIONING_FONT_SCALE =
4760 "accessibility_captioning_font_scale";
Alan Viveretteef793802013-07-23 14:15:28 -07004761
4762 /**
Alan Viverette410d4e32013-09-30 15:37:38 -07004763 * Setting that specifies whether display color inversion is enabled.
Alan Viverette410d4e32013-09-30 15:37:38 -07004764 */
4765 public static final String ACCESSIBILITY_DISPLAY_INVERSION_ENABLED =
4766 "accessibility_display_inversion_enabled";
4767
4768 /**
Alan Viverette410d4e32013-09-30 15:37:38 -07004769 * Setting that specifies whether display color space adjustment is
4770 * enabled.
4771 *
4772 * @hide
4773 */
4774 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED =
4775 "accessibility_display_daltonizer_enabled";
4776
4777 /**
4778 * Integer property that specifies the type of color space adjustment to
4779 * perform. Valid values are defined in AccessibilityManager.
4780 *
4781 * @hide
4782 */
4783 public static final String ACCESSIBILITY_DISPLAY_DALTONIZER =
4784 "accessibility_display_daltonizer";
4785
4786 /**
Svetoslav Ganov54d068e2011-03-02 12:58:40 -08004787 * The timout for considering a press to be a long press in milliseconds.
4788 * @hide
4789 */
4790 public static final String LONG_PRESS_TIMEOUT = "long_press_timeout";
4791
4792 /**
Svetoslav Ganov6bd20bc2013-09-02 15:24:45 -07004793 * List of the enabled print services.
Svetoslav Ganov4b9a4d12013-06-11 15:20:06 -07004794 * @hide
4795 */
4796 public static final String ENABLED_PRINT_SERVICES =
4797 "enabled_print_services";
4798
4799 /**
Svetoslav Ganov6bd20bc2013-09-02 15:24:45 -07004800 * List of the system print services we enabled on first boot. On
4801 * first boot we enable all system, i.e. bundled print services,
4802 * once, so they work out-of-the-box.
4803 * @hide
4804 */
4805 public static final String ENABLED_ON_FIRST_BOOT_SYSTEM_PRINT_SERVICES =
4806 "enabled_on_first_boot_system_print_services";
4807
4808 /**
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07004809 * Setting to always use the default text-to-speech settings regardless
4810 * of the application settings.
4811 * 1 = override application settings,
4812 * 0 = use application settings (if specified).
Narayan Kamath6d632962011-08-24 11:51:37 +01004813 *
4814 * @deprecated The value of this setting is no longer respected by
4815 * the framework text to speech APIs as of the Ice Cream Sandwich release.
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07004816 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004817 @Deprecated
Jean-Michel Trivif62ba452009-06-04 14:55:24 -07004818 public static final String TTS_USE_DEFAULTS = "tts_use_defaults";
4819
4820 /**
4821 * Default text-to-speech engine speech rate. 100 = 1x
4822 */
4823 public static final String TTS_DEFAULT_RATE = "tts_default_rate";
4824
4825 /**
4826 * Default text-to-speech engine pitch. 100 = 1x
4827 */
4828 public static final String TTS_DEFAULT_PITCH = "tts_default_pitch";
4829
4830 /**
4831 * Default text-to-speech engine.
4832 */
4833 public static final String TTS_DEFAULT_SYNTH = "tts_default_synth";
4834
4835 /**
Jean-Michel Trivif4782672009-06-09 16:22:48 -07004836 * Default text-to-speech language.
Narayan Kamath6d632962011-08-24 11:51:37 +01004837 *
4838 * @deprecated this setting is no longer in use, as of the Ice Cream
4839 * Sandwich release. Apps should never need to read this setting directly,
4840 * instead can query the TextToSpeech framework classes for the default
4841 * locale. {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivif4782672009-06-09 16:22:48 -07004842 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004843 @Deprecated
Jean-Michel Trivif4782672009-06-09 16:22:48 -07004844 public static final String TTS_DEFAULT_LANG = "tts_default_lang";
4845
4846 /**
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004847 * Default text-to-speech country.
Narayan Kamath6d632962011-08-24 11:51:37 +01004848 *
4849 * @deprecated this setting is no longer in use, as of the Ice Cream
4850 * Sandwich release. Apps should never need to read this setting directly,
4851 * instead can query the TextToSpeech framework classes for the default
4852 * locale. {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004853 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004854 @Deprecated
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004855 public static final String TTS_DEFAULT_COUNTRY = "tts_default_country";
4856
4857 /**
4858 * Default text-to-speech locale variant.
Narayan Kamath6d632962011-08-24 11:51:37 +01004859 *
4860 * @deprecated this setting is no longer in use, as of the Ice Cream
4861 * Sandwich release. Apps should never need to read this setting directly,
4862 * instead can query the TextToSpeech framework classes for the
4863 * locale that is in use {@link TextToSpeech#getLanguage()}.
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004864 */
Narayan Kamath6d632962011-08-24 11:51:37 +01004865 @Deprecated
Jean-Michel Trivia6fcc952009-06-19 14:06:01 -07004866 public static final String TTS_DEFAULT_VARIANT = "tts_default_variant";
4867
4868 /**
Narayan Kamathe5b8c4d2011-08-22 15:37:47 +01004869 * Stores the default tts locales on a per engine basis. Stored as
4870 * a comma seperated list of values, each value being of the form
4871 * {@code engine_name:locale} for example,
Narayan Kamath6d632962011-08-24 11:51:37 +01004872 * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This
4873 * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and
4874 * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this
4875 * setting directly, and can query the TextToSpeech framework classes
4876 * for the locale that is in use.
Narayan Kamathe5b8c4d2011-08-22 15:37:47 +01004877 *
4878 * @hide
4879 */
4880 public static final String TTS_DEFAULT_LOCALE = "tts_default_locale";
4881
4882 /**
Charles Chenceffa152010-03-16 21:18:10 -07004883 * Space delimited list of plugin packages that are enabled.
4884 */
4885 public static final String TTS_ENABLED_PLUGINS = "tts_enabled_plugins";
4886
4887 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004888 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON}
4889 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004890 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004891 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004892 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004893 Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004894
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004895 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004896 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY}
4897 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004898 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004899 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004900 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004901 Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004902
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004903 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004904 * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT}
4905 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004906 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004907 @Deprecated
4908 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT =
4909 Global.WIFI_NUM_OPEN_NETWORKS_KEPT;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004910
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004911 /**
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004912 * @deprecated Use {@link android.provider.Settings.Global#WIFI_ON}
4913 * instead.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004914 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07004915 @Deprecated
4916 public static final String WIFI_ON = Global.WIFI_ON;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004917
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004918 /**
4919 * The acceptable packet loss percentage (range 0 - 100) before trying
4920 * another AP on the same network.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004921 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004922 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004923 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004924 public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
4925 "wifi_watchdog_acceptable_packet_loss_percentage";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004926
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004927 /**
4928 * The number of access points required for a network in order for the
4929 * watchdog to monitor it.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004930 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004931 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004932 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004933 public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004934
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004935 /**
4936 * The delay between background checks.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004937 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004938 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004939 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004940 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
4941 "wifi_watchdog_background_check_delay_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004942
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004943 /**
4944 * Whether the Wi-Fi watchdog is enabled for background checking even
4945 * after it thinks the user has connected to a good access point.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004946 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004947 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004948 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004949 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
4950 "wifi_watchdog_background_check_enabled";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004951
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004952 /**
4953 * The timeout for a background ping
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004954 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004955 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004956 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004957 public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
4958 "wifi_watchdog_background_check_timeout_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004959
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004960 /**
4961 * The number of initial pings to perform that *may* be ignored if they
4962 * fail. Again, if these fail, they will *not* be used in packet loss
4963 * calculation. For example, one network always seemed to time out for
4964 * the first couple pings, so this is set to 3 by default.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004965 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004966 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004967 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004968 public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
4969 "wifi_watchdog_initial_ignored_ping_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004970
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004971 /**
4972 * The maximum number of access points (per network) to attempt to test.
4973 * If this number is reached, the watchdog will no longer monitor the
4974 * initial connection state for the network. This is a safeguard for
4975 * networks containing multiple APs whose DNS does not respond to pings.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004976 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004977 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004978 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004979 public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07004980
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004981 /**
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07004982 * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004983 */
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07004984 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004985 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
4986
4987 /**
4988 * A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004989 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004990 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004991 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004992 public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list";
4993
4994 /**
4995 * The number of pings to test if an access point is a good connection.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07004996 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004997 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07004998 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004999 public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005000
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005001 /**
5002 * The delay between pings.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005003 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005004 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07005005 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005006 public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005007
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005008 /**
5009 * The timeout per ping.
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005010 * @deprecated This setting is not used.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005011 */
Isaac Levyd7b3e6a2011-07-20 18:15:30 -07005012 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005013 public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005014
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005015 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005016 * @deprecated Use
5017 * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005018 */
Christopher Tate06efb532012-08-24 15:29:27 -07005019 @Deprecated
5020 public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT;
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005021
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005022 /**
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005023 * @deprecated Use
5024 * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005025 */
Jeff Sharkeybdfce2e2012-09-26 15:54:06 -07005026 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005027 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005028 Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005029
5030 /**
Jeremy Joslin79294842014-12-03 17:15:28 -08005031 * The number of milliseconds to hold on to a PendingIntent based request. This delay gives
5032 * the receivers of the PendingIntent an opportunity to make a new network request before
5033 * the Network satisfying the request is potentially removed.
5034 *
5035 * @hide
5036 */
5037 public static final String CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS =
5038 "connectivity_release_pending_intent_delay_ms";
5039
5040 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07005041 * Whether background data usage is allowed.
5042 *
5043 * @deprecated As of {@link VERSION_CODES#ICE_CREAM_SANDWICH},
5044 * availability of background data depends on several
5045 * combined factors. When background data is unavailable,
5046 * {@link ConnectivityManager#getActiveNetworkInfo()} will
5047 * now appear disconnected.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005048 */
Jeff Sharkey3a844fc2011-08-16 14:37:57 -07005049 @Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005050 public static final String BACKGROUND_DATA = "background_data";
Wink Saville04e71b32009-04-02 11:00:54 -07005051
5052 /**
Bjorn Bringert98bfa392010-03-24 10:59:48 +00005053 * Origins for which browsers should allow geolocation by default.
5054 * The value is a space-separated list of origins.
5055 */
5056 public static final String ALLOWED_GEOLOCATION_ORIGINS
5057 = "allowed_geolocation_origins";
5058
5059 /**
Wink Savillee9b06d72009-05-18 21:47:50 -07005060 * The preferred TTY mode 0 = TTy Off, CDMA default
5061 * 1 = TTY Full
5062 * 2 = TTY HCO
5063 * 3 = TTY VCO
5064 * @hide
5065 */
5066 public static final String PREFERRED_TTY_MODE =
5067 "preferred_tty_mode";
5068
Wink Saville04e71b32009-04-02 11:00:54 -07005069 /**
Wink Saville04e71b32009-04-02 11:00:54 -07005070 * Whether the enhanced voice privacy mode is enabled.
5071 * 0 = normal voice privacy
5072 * 1 = enhanced voice privacy
5073 * @hide
5074 */
5075 public static final String ENHANCED_VOICE_PRIVACY_ENABLED = "enhanced_voice_privacy_enabled";
5076
5077 /**
5078 * Whether the TTY mode mode is enabled.
5079 * 0 = disabled
5080 * 1 = enabled
5081 * @hide
5082 */
5083 public static final String TTY_MODE_ENABLED = "tty_mode_enabled";
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005084
5085 /**
Christopher Tate8031a3d2009-07-06 16:36:05 -07005086 * Controls whether settings backup is enabled.
Dianne Hackborncf098292009-07-01 19:55:20 -07005087 * Type: int ( 0 = disabled, 1 = enabled )
5088 * @hide
5089 */
5090 public static final String BACKUP_ENABLED = "backup_enabled";
5091
5092 /**
Christopher Tatecce9da52010-02-03 15:11:15 -08005093 * Controls whether application data is automatically restored from backup
5094 * at install time.
5095 * Type: int ( 0 = disabled, 1 = enabled )
5096 * @hide
5097 */
5098 public static final String BACKUP_AUTO_RESTORE = "backup_auto_restore";
5099
5100 /**
Christopher Tate8031a3d2009-07-06 16:36:05 -07005101 * Indicates whether settings backup has been fully provisioned.
5102 * Type: int ( 0 = unprovisioned, 1 = fully provisioned )
5103 * @hide
5104 */
5105 public static final String BACKUP_PROVISIONED = "backup_provisioned";
5106
5107 /**
Dianne Hackborncf098292009-07-01 19:55:20 -07005108 * Component of the transport to use for backup/restore.
5109 * @hide
5110 */
5111 public static final String BACKUP_TRANSPORT = "backup_transport";
Sanjay Jeyakumar21bf2412009-07-09 13:31:48 -07005112
Dianne Hackbornd7cd29d2009-07-01 11:22:45 -07005113 /**
5114 * Version for which the setup wizard was last shown. Bumped for
5115 * each release when there is new setup information to show.
5116 * @hide
5117 */
5118 public static final String LAST_SETUP_SHOWN = "last_setup_shown";
Dianne Hackborncf098292009-07-01 19:55:20 -07005119
5120 /**
Doug Zongker43866e02010-01-07 12:09:54 -08005121 * The interval in milliseconds after which Wi-Fi is considered idle.
5122 * When idle, it is possible for the device to be switched from Wi-Fi to
5123 * the mobile data network.
5124 * @hide
Jeff Brownbf6f6f92012-09-25 15:03:20 -07005125 * @deprecated Use {@link android.provider.Settings.Global#WIFI_IDLE_MS}
5126 * instead.
Doug Zongker43866e02010-01-07 12:09:54 -08005127 */
Christopher Tate6f5a9a92012-09-14 17:24:28 -07005128 @Deprecated
5129 public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS;
Doug Zongker43866e02010-01-07 12:09:54 -08005130
5131 /**
Narayan Kamathee69ff42011-06-28 12:07:18 +01005132 * The global search provider chosen by the user (if multiple global
5133 * search providers are installed). This will be the provider returned
5134 * by {@link SearchManager#getGlobalSearchActivity()} if it's still
5135 * installed. This setting is stored as a flattened component name as
5136 * per {@link ComponentName#flattenToString()}.
5137 *
5138 * @hide
5139 */
5140 public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY =
5141 "search_global_search_activity";
5142
5143 /**
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08005144 * The number of promoted sources in GlobalSearch.
5145 * @hide
5146 */
5147 public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources";
5148 /**
5149 * The maximum number of suggestions returned by GlobalSearch.
5150 * @hide
5151 */
5152 public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display";
5153 /**
5154 * The number of suggestions GlobalSearch will ask each non-web search source for.
5155 * @hide
5156 */
5157 public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source";
5158 /**
5159 * The number of suggestions the GlobalSearch will ask the web search source for.
5160 * @hide
5161 */
5162 public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT =
5163 "search_web_results_override_limit";
5164 /**
5165 * The number of milliseconds that GlobalSearch will wait for suggestions from
5166 * promoted sources before continuing with all other sources.
5167 * @hide
5168 */
5169 public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS =
5170 "search_promoted_source_deadline_millis";
5171 /**
5172 * The number of milliseconds before GlobalSearch aborts search suggesiton queries.
5173 * @hide
5174 */
5175 public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis";
5176 /**
5177 * The maximum number of milliseconds that GlobalSearch shows the previous results
5178 * after receiving a new query.
5179 * @hide
5180 */
5181 public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis";
5182 /**
5183 * The maximum age of log data used for shortcuts in GlobalSearch.
5184 * @hide
5185 */
5186 public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis";
5187 /**
5188 * The maximum age of log data used for source ranking in GlobalSearch.
5189 * @hide
5190 */
5191 public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS =
5192 "search_max_source_event_age_millis";
5193 /**
5194 * The minimum number of impressions needed to rank a source in GlobalSearch.
5195 * @hide
5196 */
5197 public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING =
5198 "search_min_impressions_for_source_ranking";
5199 /**
5200 * The minimum number of clicks needed to rank a source in GlobalSearch.
5201 * @hide
5202 */
5203 public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING =
5204 "search_min_clicks_for_source_ranking";
5205 /**
5206 * The maximum number of shortcuts shown by GlobalSearch.
5207 * @hide
5208 */
5209 public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned";
5210 /**
5211 * The size of the core thread pool for suggestion queries in GlobalSearch.
5212 * @hide
5213 */
5214 public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE =
5215 "search_query_thread_core_pool_size";
5216 /**
5217 * The maximum size of the thread pool for suggestion queries in GlobalSearch.
5218 * @hide
5219 */
5220 public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE =
5221 "search_query_thread_max_pool_size";
5222 /**
5223 * The size of the core thread pool for shortcut refreshing in GlobalSearch.
5224 * @hide
5225 */
5226 public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE =
5227 "search_shortcut_refresh_core_pool_size";
5228 /**
5229 * The maximum size of the thread pool for shortcut refreshing in GlobalSearch.
5230 * @hide
5231 */
5232 public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE =
5233 "search_shortcut_refresh_max_pool_size";
5234 /**
5235 * The maximun time that excess threads in the GlobalSeach thread pools will
5236 * wait before terminating.
5237 * @hide
5238 */
5239 public static final String SEARCH_THREAD_KEEPALIVE_SECONDS =
5240 "search_thread_keepalive_seconds";
5241 /**
5242 * The maximum number of concurrent suggestion queries to each source.
5243 * @hide
5244 */
5245 public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT =
5246 "search_per_source_concurrent_query_limit";
5247
San Mehat87734d32010-01-08 12:53:06 -08005248 /**
5249 * Whether or not alert sounds are played on MountService events. (0 = false, 1 = true)
5250 * @hide
5251 */
5252 public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd";
5253
5254 /**
5255 * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true)
5256 * @hide
5257 */
5258 public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart";
5259
5260 /**
5261 * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true)
5262 * @hide
5263 */
5264 public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt";
5265
5266 /**
5267 * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true)
5268 * @hide
5269 */
5270 public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled";
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08005271
Dan Egnor42471dd2010-01-07 17:25:22 -08005272 /**
5273 * If nonzero, ANRs in invisible background processes bring up a dialog.
5274 * Otherwise, the process will be silently killed.
5275 * @hide
5276 */
5277 public static final String ANR_SHOW_BACKGROUND = "anr_show_background";
Erikeebc8e22010-02-18 13:27:19 -08005278
Mike LeBeau5d34e9b2010-02-10 19:34:56 -08005279 /**
5280 * The {@link ComponentName} string of the service to be used as the voice recognition
5281 * service.
Erikeebc8e22010-02-18 13:27:19 -08005282 *
Mike LeBeau5d34e9b2010-02-10 19:34:56 -08005283 * @hide
5284 */
5285 public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";
Dan Egnor42471dd2010-01-07 17:25:22 -08005286
William Luh623a4282013-06-24 12:14:18 -07005287 /**
5288 * Stores whether an user has consented to have apps verified through PAM.
5289 * The value is boolean (1 or 0).
5290 *
5291 * @hide
5292 */
5293 public static final String PACKAGE_VERIFIER_USER_CONSENT =
5294 "package_verifier_user_consent";
satok988323c2011-06-22 16:38:13 +09005295
5296 /**
satokada8c4e2011-08-23 14:56:56 +09005297 * The {@link ComponentName} string of the selected spell checker service which is
5298 * one of the services managed by the text service manager.
5299 *
5300 * @hide
5301 */
5302 public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker";
5303
5304 /**
5305 * The {@link ComponentName} string of the selected subtype of the selected spell checker
satok988323c2011-06-22 16:38:13 +09005306 * service which is one of the services managed by the text service manager.
5307 *
5308 * @hide
5309 */
satokada8c4e2011-08-23 14:56:56 +09005310 public static final String SELECTED_SPELL_CHECKER_SUBTYPE =
5311 "selected_spell_checker_subtype";
satok988323c2011-06-22 16:38:13 +09005312
Doug Zongkeraed8f8e2010-01-07 18:07:50 -08005313 /**
satoka33c4fc2011-08-25 16:50:11 +09005314 * The {@link ComponentName} string whether spell checker is enabled or not.
5315 *
5316 * @hide
5317 */
5318 public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled";
5319
5320 /**
David Brown458e8062010-03-08 21:52:11 -08005321 * What happens when the user presses the Power button while in-call
5322 * and the screen is on.<br/>
5323 * <b>Values:</b><br/>
5324 * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/>
5325 * 2 - The Power button hangs up the current call.<br/>
5326 *
5327 * @hide
5328 */
5329 public static final String INCALL_POWER_BUTTON_BEHAVIOR = "incall_power_button_behavior";
5330
5331 /**
5332 * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen".
5333 * @hide
5334 */
5335 public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1;
5336
5337 /**
5338 * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up".
5339 * @hide
5340 */
5341 public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2;
5342
5343 /**
5344 * INCALL_POWER_BUTTON_BEHAVIOR default value.
5345 * @hide
5346 */
5347 public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT =
5348 INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF;
5349
5350 /**
Jeff Browna20dda42014-05-27 20:57:24 -07005351 * Whether the device should wake when the wake gesture sensor detects motion.
5352 * @hide
5353 */
5354 public static final String WAKE_GESTURE_ENABLED = "wake_gesture_enabled";
5355
5356 /**
John Spurlocka4215ce2014-08-04 14:50:38 -04005357 * Whether the device should doze if configured.
5358 * @hide
5359 */
5360 public static final String DOZE_ENABLED = "doze_enabled";
5361
5362 /**
Dianne Hackborn2ccda4d2010-03-22 21:49:15 -07005363 * The current night mode that has been selected by the user. Owned
5364 * and controlled by UiModeManagerService. Constants are as per
5365 * UiModeManager.
5366 * @hide
5367 */
5368 public static final String UI_NIGHT_MODE = "ui_night_mode";
Suchi Amalapurapu40e47252010-04-07 16:15:50 -07005369
5370 /**
John Spurlock1a868b72012-08-22 09:56:51 -04005371 * Whether screensavers are enabled.
Daniel Sandler0601eb72011-04-13 01:01:32 -04005372 * @hide
5373 */
Daniel Sandler2d545362011-11-17 10:38:37 -08005374 public static final String SCREENSAVER_ENABLED = "screensaver_enabled";
Daniel Sandler0601eb72011-04-13 01:01:32 -04005375
5376 /**
John Spurlock1a868b72012-08-22 09:56:51 -04005377 * The user's chosen screensaver components.
Daniel Sandler2d545362011-11-17 10:38:37 -08005378 *
John Spurlock1a868b72012-08-22 09:56:51 -04005379 * These will be launched by the PhoneWindowManager after a timeout when not on
Daniel Sandler2d545362011-11-17 10:38:37 -08005380 * battery, or upon dock insertion (if SCREENSAVER_ACTIVATE_ON_DOCK is set to 1).
Daniel Sandler0601eb72011-04-13 01:01:32 -04005381 * @hide
5382 */
John Spurlock1a868b72012-08-22 09:56:51 -04005383 public static final String SCREENSAVER_COMPONENTS = "screensaver_components";
Daniel Sandler2d545362011-11-17 10:38:37 -08005384
5385 /**
John Spurlock1a868b72012-08-22 09:56:51 -04005386 * If screensavers are enabled, whether the screensaver should be automatically launched
5387 * when the device is inserted into a (desk) dock.
Daniel Sandler2d545362011-11-17 10:38:37 -08005388 * @hide
5389 */
5390 public static final String SCREENSAVER_ACTIVATE_ON_DOCK = "screensaver_activate_on_dock";
Daniel Sandler0601eb72011-04-13 01:01:32 -04005391
John Spurlock1a868b72012-08-22 09:56:51 -04005392 /**
5393 * If screensavers are enabled, whether the screensaver should be automatically launched
5394 * when the screen times out when not on battery.
5395 * @hide
5396 */
5397 public static final String SCREENSAVER_ACTIVATE_ON_SLEEP = "screensaver_activate_on_sleep";
5398
5399 /**
5400 * If screensavers are enabled, the default screensaver component.
5401 * @hide
5402 */
5403 public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component";
5404
Daniel Sandler0601eb72011-04-13 01:01:32 -04005405 /**
Martijn Coenena7397882013-07-30 20:07:47 -07005406 * The default NFC payment component
5407 * @hide
5408 */
5409 public static final String NFC_PAYMENT_DEFAULT_COMPONENT = "nfc_payment_default_component";
5410
5411 /**
Martijn Coenen2f6f3a012014-04-25 17:00:21 -07005412 * Whether NFC payment is handled by the foreground application or a default.
5413 * @hide
5414 */
5415 public static final String NFC_PAYMENT_FOREGROUND = "nfc_payment_foreground";
5416
5417 /**
David Braunf5d83192013-09-16 13:43:51 -07005418 * Specifies the package name currently configured to be the primary sms application
5419 * @hide
5420 */
5421 public static final String SMS_DEFAULT_APPLICATION = "sms_default_application";
5422
5423 /**
Yorke Lee014de022015-04-21 17:15:47 -07005424 * Specifies the package name currently configured to be the default dialer application
5425 * @hide
5426 */
5427 public static final String DIALER_DEFAULT_APPLICATION = "dialer_default_application";
5428
5429 /**
Adrian Roos943eb862015-03-26 12:31:16 -07005430 * Specifies the package name currently configured to be the emergency assistance application
5431 *
5432 * @see android.telephony.TelephonyManager#ACTION_EMERGENCY_ASSISTANCE
5433 *
5434 * @hide
5435 */
5436 public static final String EMERGENCY_ASSISTANCE_APPLICATION = "emergency_assistance_application";
5437
5438 /**
Jorim Jaggi9d910832015-05-18 17:35:26 -07005439 * Specifies whether the current app context on scren (assist data) will be sent to the
5440 * assist application (active voice interaction service).
5441 *
5442 * @hide
5443 */
5444 public static final String ASSIST_STRUCTURE_ENABLED = "assist_structure_enabled";
5445
5446 /**
Jorim Jaggia133f0b2015-06-26 16:40:00 -07005447 * Specifies whether a screenshot of the screen contents will be sent to the assist
5448 * application (active voice interaction service).
5449 *
5450 * @hide
5451 */
5452 public static final String ASSIST_SCREENSHOT_ENABLED = "assist_screenshot_enabled";
5453
5454 /**
John Spurlock7c74f782015-06-04 13:01:42 -04005455 * Names of the service components that the current user has explicitly allowed to
Chris Wren8326a8a2014-10-22 14:13:32 -04005456 * see all of the user's notifications, separated by ':'.
Daniel Sandler4b749ef2013-03-18 21:53:04 -04005457 *
5458 * @hide
5459 */
5460 public static final String ENABLED_NOTIFICATION_LISTENERS = "enabled_notification_listeners";
5461
John Spurlock7340fc82014-04-24 18:50:12 -04005462 /**
John Spurlock7c74f782015-06-04 13:01:42 -04005463 * Names of the packages that the current user has explicitly allowed to
5464 * manage notification policy configuration, separated by ':'.
5465 *
5466 * @hide
5467 */
5468 public static final String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES =
5469 "enabled_notification_policy_access_packages";
5470
5471 /**
John Spurlock7340fc82014-04-24 18:50:12 -04005472 * @hide
5473 */
5474 public static final String ENABLED_CONDITION_PROVIDERS = "enabled_condition_providers";
5475
John Spurlock5c454122013-06-17 07:35:46 -04005476 /** @hide */
5477 public static final String BAR_SERVICE_COMPONENT = "bar_service_component";
5478
John Spurlockd67ec252013-09-05 11:31:54 -04005479 /** @hide */
John Spurlockcdb57ae2015-02-11 19:04:11 -05005480 public static final String VOLUME_CONTROLLER_SERVICE_COMPONENT
5481 = "volume_controller_service_component";
5482
5483 /** @hide */
John Spurlockf1a36642013-10-12 17:50:42 -04005484 public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations";
John Spurlockd67ec252013-09-05 11:31:54 -04005485
Yorke Lee647f8f32013-05-07 10:49:44 -07005486 /**
Svetoslavf43e8512013-09-30 17:33:05 -07005487 * This is the query URI for finding a print service to install.
5488 *
5489 * @hide
5490 */
5491 public static final String PRINT_SERVICE_SEARCH_URI = "print_service_search_uri";
5492
5493 /**
5494 * This is the query URI for finding a NFC payment service to install.
5495 *
5496 * @hide
5497 */
5498 public static final String PAYMENT_SERVICE_SEARCH_URI = "payment_service_search_uri";
5499
5500 /**
Amith Yamasani1e9c2182014-06-11 17:25:51 -07005501 * If enabled, apps should try to skip any introductory hints on first launch. This might
Amith Yamasani0c416392014-06-13 15:54:39 -07005502 * apply to users that are already familiar with the environment or temporary users.
Amith Yamasani1e9c2182014-06-11 17:25:51 -07005503 * <p>
5504 * Type : int (0 to show hints, 1 to skip showing hints)
Amith Yamasani1e9c2182014-06-11 17:25:51 -07005505 */
5506 public static final String SKIP_FIRST_USE_HINTS = "skip_first_use_hints";
5507
5508 /**
John Spurlockaa5ee4d2014-07-25 13:05:12 -04005509 * Persisted playback time after a user confirmation of an unsafe volume level.
5510 *
5511 * @hide
5512 */
5513 public static final String UNSAFE_VOLUME_MUSIC_ACTIVE_MS = "unsafe_volume_music_active_ms";
5514
5515 /**
Dan Sandler52e5701e2014-07-22 23:14:54 -04005516 * This preference enables notification display on the lockscreen.
5517 * @hide
5518 */
5519 public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS =
5520 "lock_screen_show_notifications";
5521
5522 /**
Dongwon Kang4d933a02014-08-07 22:51:47 -07005523 * List of TV inputs that are currently hidden. This is a string
Jaewan Kimf0e530e2014-08-22 00:43:31 +09005524 * containing the IDs of all hidden TV inputs. Each ID is encoded by
5525 * {@link android.net.Uri#encode(String)} and separated by ':'.
Dongwon Kang4d933a02014-08-07 22:51:47 -07005526 * @hide
5527 */
5528 public static final String TV_INPUT_HIDDEN_INPUTS = "tv_input_hidden_inputs";
5529
5530 /**
5531 * List of custom TV input labels. This is a string containing <TV input id, custom name>
Jaewan Kimf0e530e2014-08-22 00:43:31 +09005532 * pairs. TV input id and custom name are encoded by {@link android.net.Uri#encode(String)}
5533 * and separated by ','. Each pair is separated by ':'.
Dongwon Kang4d933a02014-08-07 22:51:47 -07005534 * @hide
5535 */
5536 public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels";
5537
5538 /**
Glenn Kasten34cc4db2014-08-13 10:56:38 -07005539 * Whether automatic routing of system audio to USB audio peripheral is disabled.
5540 * The value is boolean (1 or 0), where 1 means automatic routing is disabled,
5541 * and 0 means automatic routing is enabled.
5542 *
5543 * @hide
5544 */
5545 public static final String USB_AUDIO_AUTOMATIC_ROUTING_DISABLED =
5546 "usb_audio_automatic_routing_disabled";
5547
5548 /**
Jeff Brown05af6ad2014-09-30 20:54:30 -07005549 * The timeout in milliseconds before the device fully goes to sleep after
5550 * a period of inactivity. This value sets an upper bound on how long the device
5551 * will stay awake or dreaming without user activity. It should generally
Dianne Hackbornad6a99b2014-11-18 10:11:10 -08005552 * be longer than {@link Settings.System#SCREEN_OFF_TIMEOUT} as otherwise the device
Jeff Brown05af6ad2014-09-30 20:54:30 -07005553 * will sleep before it ever has a chance to dream.
5554 * <p>
5555 * Use -1 to disable this timeout.
5556 * </p>
5557 *
5558 * @hide
5559 */
5560 public static final String SLEEP_TIMEOUT = "sleep_timeout";
5561
5562 /**
Jason Monk27bbb2d2015-03-31 16:46:39 -04005563 * Controls whether double tap to wake is enabled.
5564 * @hide
5565 */
5566 public static final String DOUBLE_TAP_TO_WAKE = "double_tap_to_wake";
5567
5568 /**
Xiyuan Xiae6de8b92015-06-06 22:18:05 -07005569 * The current assistant component. It could be a voice interaction service,
5570 * or an activity that handles ACTION_ASSIST, or empty which means using the default
5571 * handling.
5572 *
5573 * @hide
5574 */
5575 public static final String ASSISTANT = "assistant";
5576
5577 /**
Svetoslav Ganova571a582011-09-20 18:32:20 -07005578 * This are the settings to be backed up.
5579 *
5580 * NOTE: Settings are backed up and restored in the order they appear
5581 * in this array. If you have one setting depending on another,
5582 * make sure that they are ordered appropriately.
5583 *
-b master501eec92009-07-06 13:53:11 -07005584 * @hide
5585 */
5586 public static final String[] SETTINGS_TO_BACKUP = {
Christopher Tate58f41ec2013-01-11 15:40:36 -08005587 BUGREPORT_IN_POWER_MENU, // moved to global
Amith Yamasani8823c0a82009-07-07 14:30:17 -07005588 ALLOW_MOCK_LOCATION,
-b master501eec92009-07-06 13:53:11 -07005589 PARENTAL_CONTROL_ENABLED,
5590 PARENTAL_CONTROL_REDIRECT_URL,
Christopher Tate66488d62012-10-02 11:58:01 -07005591 USB_MASS_STORAGE_ENABLED, // moved to global
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -07005592 ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
5593 ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
5594 ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE,
Svetoslav Ganov585f13f8d2010-08-10 07:59:15 -07005595 ACCESSIBILITY_SCRIPT_INJECTION,
Christopher Tate14c2d792010-02-25 16:49:44 -08005596 BACKUP_AUTO_RESTORE,
-b master501eec92009-07-06 13:53:11 -07005597 ENABLED_ACCESSIBILITY_SERVICES,
Christopher Tate6597e342015-02-17 12:15:25 -08005598 ENABLED_NOTIFICATION_LISTENERS,
Christopher Tate7b9a28c2015-03-18 13:06:16 -07005599 ENABLED_INPUT_METHODS,
Svetoslav Ganov9a4c5cd2012-05-30 14:06:32 -07005600 TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES,
Svetoslav Ganova28a16d2011-07-28 11:24:21 -07005601 TOUCH_EXPLORATION_ENABLED,
Svetoslav Ganova571a582011-09-20 18:32:20 -07005602 ACCESSIBILITY_ENABLED,
Svetoslav Ganov55f937a2011-12-05 11:42:07 -08005603 ACCESSIBILITY_SPEAK_PASSWORD,
Chris Craikcce47eb2014-07-16 15:12:15 -07005604 ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED,
Alan Viveretteef793802013-07-23 14:15:28 -07005605 ACCESSIBILITY_CAPTIONING_ENABLED,
5606 ACCESSIBILITY_CAPTIONING_LOCALE,
5607 ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR,
5608 ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR,
5609 ACCESSIBILITY_CAPTIONING_EDGE_TYPE,
5610 ACCESSIBILITY_CAPTIONING_EDGE_COLOR,
5611 ACCESSIBILITY_CAPTIONING_TYPEFACE,
Alan Viverette69ce69b2013-08-29 12:23:48 -07005612 ACCESSIBILITY_CAPTIONING_FONT_SCALE,
-b master501eec92009-07-06 13:53:11 -07005613 TTS_USE_DEFAULTS,
5614 TTS_DEFAULT_RATE,
5615 TTS_DEFAULT_PITCH,
5616 TTS_DEFAULT_SYNTH,
5617 TTS_DEFAULT_LANG,
5618 TTS_DEFAULT_COUNTRY,
Charles Chenceffa152010-03-16 21:18:10 -07005619 TTS_ENABLED_PLUGINS,
Narayan Kamath6d632962011-08-24 11:51:37 +01005620 TTS_DEFAULT_LOCALE,
Christopher Tate66488d62012-10-02 11:58:01 -07005621 WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, // moved to global
5622 WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, // moved to global
5623 WIFI_NUM_OPEN_NETWORKS_KEPT, // moved to global
Christopher Tate06cbadd2015-03-16 18:29:42 -07005624 SELECTED_SPELL_CHECKER,
5625 SELECTED_SPELL_CHECKER_SUBTYPE,
5626 SPELL_CHECKER_ENABLED,
San Mehat87734d32010-01-08 12:53:06 -08005627 MOUNT_PLAY_NOTIFICATION_SND,
5628 MOUNT_UMS_AUTOSTART,
5629 MOUNT_UMS_PROMPT,
Dianne Hackborn2ccda4d2010-03-22 21:49:15 -07005630 MOUNT_UMS_NOTIFY_ENABLED,
Jeff Brown05af6ad2014-09-30 20:54:30 -07005631 UI_NIGHT_MODE,
Jason Monk27bbb2d2015-03-31 16:46:39 -04005632 SLEEP_TIMEOUT,
5633 DOUBLE_TAP_TO_WAKE,
-b master501eec92009-07-06 13:53:11 -07005634 };
5635
5636 /**
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07005637 * These entries are considered common between the personal and the managed profile,
5638 * since the managed profile doesn't get to change them.
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07005639 */
Svetoslav683914b2015-01-15 14:22:26 -08005640 private static final Set<String> CLONE_TO_MANAGED_PROFILE = new ArraySet<>();
Amith Yamasanib0ff3222015-03-04 09:56:14 -08005641
Svetoslav683914b2015-01-15 14:22:26 -08005642 static {
5643 CLONE_TO_MANAGED_PROFILE.add(ACCESSIBILITY_ENABLED);
5644 CLONE_TO_MANAGED_PROFILE.add(ALLOW_MOCK_LOCATION);
5645 CLONE_TO_MANAGED_PROFILE.add(ALLOWED_GEOLOCATION_ORIGINS);
5646 CLONE_TO_MANAGED_PROFILE.add(DEFAULT_INPUT_METHOD);
5647 CLONE_TO_MANAGED_PROFILE.add(ENABLED_ACCESSIBILITY_SERVICES);
5648 CLONE_TO_MANAGED_PROFILE.add(ENABLED_INPUT_METHODS);
5649 CLONE_TO_MANAGED_PROFILE.add(LOCATION_MODE);
5650 CLONE_TO_MANAGED_PROFILE.add(LOCATION_PROVIDERS_ALLOWED);
5651 CLONE_TO_MANAGED_PROFILE.add(LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS);
5652 CLONE_TO_MANAGED_PROFILE.add(SELECTED_INPUT_METHOD_SUBTYPE);
5653 CLONE_TO_MANAGED_PROFILE.add(SELECTED_SPELL_CHECKER);
5654 CLONE_TO_MANAGED_PROFILE.add(SELECTED_SPELL_CHECKER_SUBTYPE);
5655 }
5656
5657 /** @hide */
5658 public static void getCloneToManagedProfileSettings(Set<String> outKeySet) {
5659 outKeySet.addAll(CLONE_TO_MANAGED_PROFILE);
5660 }
Amith Yamasani4f7e2e32014-08-14 18:49:48 -07005661
5662 /**
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005663 * Helper method for determining if a location provider is enabled.
Tom O'Neilld5759432013-09-11 11:03:03 -07005664 *
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005665 * @param cr the content resolver to use
5666 * @param provider the location provider to query
5667 * @return true if the provider is enabled
Tom O'Neilld5759432013-09-11 11:03:03 -07005668 *
5669 * @deprecated use {@link #LOCATION_MODE} or
5670 * {@link LocationManager#isProviderEnabled(String)}
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005671 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005672 @Deprecated
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005673 public static final boolean isLocationProviderEnabled(ContentResolver cr, String provider) {
Victoria Leaseb711d572012-10-02 13:14:11 -07005674 return isLocationProviderEnabledForUser(cr, provider, UserHandle.myUserId());
5675 }
5676
5677 /**
5678 * Helper method for determining if a location provider is enabled.
5679 * @param cr the content resolver to use
5680 * @param provider the location provider to query
5681 * @param userId the userId to query
5682 * @return true if the provider is enabled
Tom O'Neilld5759432013-09-11 11:03:03 -07005683 * @deprecated use {@link #LOCATION_MODE} or
5684 * {@link LocationManager#isProviderEnabled(String)}
Victoria Leaseb711d572012-10-02 13:14:11 -07005685 * @hide
5686 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005687 @Deprecated
Victoria Leaseb711d572012-10-02 13:14:11 -07005688 public static final boolean isLocationProviderEnabledForUser(ContentResolver cr, String provider, int userId) {
5689 String allowedProviders = Settings.Secure.getStringForUser(cr,
5690 LOCATION_PROVIDERS_ALLOWED, userId);
Brad Fitzpatrick11fe1812010-09-10 16:07:52 -07005691 return TextUtils.delimitedStringContains(allowedProviders, ',', provider);
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005692 }
5693
5694 /**
5695 * Thread-safe method for enabling or disabling a single location provider.
5696 * @param cr the content resolver to use
5697 * @param provider the location provider to enable or disable
5698 * @param enabled true if the provider should be enabled
Tom O'Neilla324ac72013-08-26 14:40:23 -07005699 * @deprecated use {@link #putInt(ContentResolver, String, int)} and {@link #LOCATION_MODE}
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005700 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005701 @Deprecated
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005702 public static final void setLocationProviderEnabled(ContentResolver cr,
5703 String provider, boolean enabled) {
Victoria Leaseb711d572012-10-02 13:14:11 -07005704 setLocationProviderEnabledForUser(cr, provider, enabled, UserHandle.myUserId());
5705 }
5706
5707 /**
5708 * Thread-safe method for enabling or disabling a single location provider.
Tom O'Neilla324ac72013-08-26 14:40:23 -07005709 *
Victoria Leaseb711d572012-10-02 13:14:11 -07005710 * @param cr the content resolver to use
5711 * @param provider the location provider to enable or disable
5712 * @param enabled true if the provider should be enabled
5713 * @param userId the userId for which to enable/disable providers
Tom O'Neilla324ac72013-08-26 14:40:23 -07005714 * @return true if the value was set, false on database errors
5715 * @deprecated use {@link #putIntForUser(ContentResolver, String, int, int)} and
5716 * {@link #LOCATION_MODE}
Victoria Leaseb711d572012-10-02 13:14:11 -07005717 * @hide
5718 */
Tom O'Neill1f48b782013-08-19 18:14:56 -07005719 @Deprecated
Tom O'Neilla324ac72013-08-26 14:40:23 -07005720 public static final boolean setLocationProviderEnabledForUser(ContentResolver cr,
Victoria Leaseb711d572012-10-02 13:14:11 -07005721 String provider, boolean enabled, int userId) {
David Christie3f7b6522013-08-06 19:19:08 -07005722 synchronized (mLocationSettingsLock) {
5723 // to ensure thread safety, we write the provider name with a '+' or '-'
5724 // and let the SettingsProvider handle it rather than reading and modifying
5725 // the list of enabled providers.
5726 if (enabled) {
5727 provider = "+" + provider;
5728 } else {
5729 provider = "-" + provider;
5730 }
Tom O'Neilla324ac72013-08-26 14:40:23 -07005731 return putStringForUser(cr, Settings.Secure.LOCATION_PROVIDERS_ALLOWED, provider,
David Christie3f7b6522013-08-06 19:19:08 -07005732 userId);
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005733 }
Mike Lockwoodbd2a7122009-04-02 23:41:33 -07005734 }
Tom O'Neill1f48b782013-08-19 18:14:56 -07005735
5736 /**
5737 * Thread-safe method for setting the location mode to one of
5738 * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY},
5739 * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}.
5740 *
Tom O'Neill1f48b782013-08-19 18:14:56 -07005741 * @param cr the content resolver to use
5742 * @param mode such as {@link #LOCATION_MODE_HIGH_ACCURACY}
5743 * @param userId the userId for which to change mode
Tom O'Neilla324ac72013-08-26 14:40:23 -07005744 * @return true if the value was set, false on database errors
Tom O'Neill1f48b782013-08-19 18:14:56 -07005745 *
5746 * @throws IllegalArgumentException if mode is not one of the supported values
5747 */
Tom O'Neill7f6f4572013-08-27 10:53:15 -07005748 private static final boolean setLocationModeForUser(ContentResolver cr, int mode,
5749 int userId) {
Tom O'Neill1f48b782013-08-19 18:14:56 -07005750 synchronized (mLocationSettingsLock) {
5751 boolean gps = false;
5752 boolean network = false;
5753 switch (mode) {
5754 case LOCATION_MODE_OFF:
5755 break;
5756 case LOCATION_MODE_SENSORS_ONLY:
5757 gps = true;
5758 break;
5759 case LOCATION_MODE_BATTERY_SAVING:
5760 network = true;
5761 break;
5762 case LOCATION_MODE_HIGH_ACCURACY:
5763 gps = true;
5764 network = true;
5765 break;
5766 default:
5767 throw new IllegalArgumentException("Invalid location mode: " + mode);
5768 }
Tom O'Neill7731a992014-10-09 11:30:49 -07005769 // Note it's important that we set the NLP mode first. The Google implementation
5770 // of NLP clears its NLP consent setting any time it receives a
5771 // LocationManager.PROVIDERS_CHANGED_ACTION broadcast and NLP is disabled. Also,
5772 // it shows an NLP consent dialog any time it receives the broadcast, NLP is
5773 // enabled, and the NLP consent is not set. If 1) we were to enable GPS first,
5774 // 2) a setup wizard has its own NLP consent UI that sets the NLP consent setting,
5775 // and 3) the receiver happened to complete before we enabled NLP, then the Google
5776 // NLP would detect the attempt to enable NLP and show a redundant NLP consent
5777 // dialog. Then the people who wrote the setup wizard would be sad.
Tom O'Neilla324ac72013-08-26 14:40:23 -07005778 boolean nlpSuccess = Settings.Secure.setLocationProviderEnabledForUser(
Tom O'Neill1f48b782013-08-19 18:14:56 -07005779 cr, LocationManager.NETWORK_PROVIDER, network, userId);
Tom O'Neill7731a992014-10-09 11:30:49 -07005780 boolean gpsSuccess = Settings.Secure.setLocationProviderEnabledForUser(
5781 cr, LocationManager.GPS_PROVIDER, gps, userId);
Tom O'Neilla324ac72013-08-26 14:40:23 -07005782 return gpsSuccess && nlpSuccess;
Tom O'Neill1f48b782013-08-19 18:14:56 -07005783 }
5784 }
5785
5786 /**
Tom O'Neill1f48b782013-08-19 18:14:56 -07005787 * Thread-safe method for reading the location mode, returns one of
5788 * {@link #LOCATION_MODE_HIGH_ACCURACY}, {@link #LOCATION_MODE_SENSORS_ONLY},
5789 * {@link #LOCATION_MODE_BATTERY_SAVING}, or {@link #LOCATION_MODE_OFF}.
5790 *
5791 * @param cr the content resolver to use
5792 * @param userId the userId for which to read the mode
5793 * @return the location mode
5794 */
Tom O'Neill7f6f4572013-08-27 10:53:15 -07005795 private static final int getLocationModeForUser(ContentResolver cr, int userId) {
Tom O'Neill1f48b782013-08-19 18:14:56 -07005796 synchronized (mLocationSettingsLock) {
5797 boolean gpsEnabled = Settings.Secure.isLocationProviderEnabledForUser(
5798 cr, LocationManager.GPS_PROVIDER, userId);
5799 boolean networkEnabled = Settings.Secure.isLocationProviderEnabledForUser(
5800 cr, LocationManager.NETWORK_PROVIDER, userId);
5801 if (gpsEnabled && networkEnabled) {
5802 return LOCATION_MODE_HIGH_ACCURACY;
5803 } else if (gpsEnabled) {
5804 return LOCATION_MODE_SENSORS_ONLY;
5805 } else if (networkEnabled) {
5806 return LOCATION_MODE_BATTERY_SAVING;
5807 } else {
5808 return LOCATION_MODE_OFF;
5809 }
5810 }
5811 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005812 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07005813
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08005814 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005815 * Global system settings, containing preferences that always apply identically
5816 * to all defined users. Applications can read these but are not allowed to write;
5817 * like the "Secure" settings, these are for preferences that the user must
5818 * explicitly modify through the system UI or specialized APIs for those values.
5819 */
5820 public static final class Global extends NameValueTable {
5821 public static final String SYS_PROP_SETTING_VERSION = "sys.settings_global_version";
5822
5823 /**
5824 * The content:// style URL for global secure settings items. Not public.
5825 */
5826 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/global");
5827
5828 /**
Amith Yamasani23a0f052014-07-25 12:26:53 -07005829 * Whether users are allowed to add more users or guest from lockscreen.
5830 * <p>
5831 * Type: int
5832 * @hide
5833 */
5834 public static final String ADD_USERS_WHEN_LOCKED = "add_users_when_locked";
5835
5836 /**
Svetoslav Ganov7befb7d2012-09-27 16:49:23 -07005837 * Setting whether the global gesture for enabling accessibility is enabled.
5838 * If this gesture is enabled the user will be able to perfrom it to enable
5839 * the accessibility state without visiting the settings app.
5840 * @hide
5841 */
5842 public static final String ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED =
5843 "enable_accessibility_global_gesture_enabled";
5844
5845 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005846 * Whether Airplane Mode is on.
5847 */
5848 public static final String AIRPLANE_MODE_ON = "airplane_mode_on";
5849
5850 /**
Bryce Lee584a4452014-10-21 15:55:55 -07005851 * Whether Theater Mode is on.
5852 * {@hide}
5853 */
Bryce Leecdfebd62015-02-02 08:19:11 -08005854 @SystemApi
Bryce Lee584a4452014-10-21 15:55:55 -07005855 public static final String THEATER_MODE_ON = "theater_mode_on";
5856
5857 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005858 * Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.
5859 */
5860 public static final String RADIO_BLUETOOTH = "bluetooth";
5861
5862 /**
5863 * Constant for use in AIRPLANE_MODE_RADIOS to specify Wi-Fi radio.
5864 */
5865 public static final String RADIO_WIFI = "wifi";
5866
5867 /**
5868 * {@hide}
5869 */
5870 public static final String RADIO_WIMAX = "wimax";
5871 /**
5872 * Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.
5873 */
5874 public static final String RADIO_CELL = "cell";
5875
5876 /**
5877 * Constant for use in AIRPLANE_MODE_RADIOS to specify NFC radio.
5878 */
5879 public static final String RADIO_NFC = "nfc";
5880
5881 /**
5882 * A comma separated list of radios that need to be disabled when airplane mode
5883 * is on. This overrides WIFI_ON and BLUETOOTH_ON, if Wi-Fi and bluetooth are
5884 * included in the comma separated list.
5885 */
5886 public static final String AIRPLANE_MODE_RADIOS = "airplane_mode_radios";
5887
5888 /**
5889 * A comma separated list of radios that should to be disabled when airplane mode
5890 * is on, but can be manually reenabled by the user. For example, if RADIO_WIFI is
5891 * added to both AIRPLANE_MODE_RADIOS and AIRPLANE_MODE_TOGGLEABLE_RADIOS, then Wifi
5892 * will be turned off when entering airplane mode, but the user will be able to reenable
5893 * Wifi in the Settings app.
5894 *
5895 * {@hide}
5896 */
5897 public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios";
5898
5899 /**
5900 * The policy for deciding when Wi-Fi should go to sleep (which will in
5901 * turn switch to using the mobile data as an Internet connection).
5902 * <p>
5903 * Set to one of {@link #WIFI_SLEEP_POLICY_DEFAULT},
5904 * {@link #WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED}, or
5905 * {@link #WIFI_SLEEP_POLICY_NEVER}.
5906 */
5907 public static final String WIFI_SLEEP_POLICY = "wifi_sleep_policy";
5908
5909 /**
5910 * Value for {@link #WIFI_SLEEP_POLICY} to use the default Wi-Fi sleep
5911 * policy, which is to sleep shortly after the turning off
5912 * according to the {@link #STAY_ON_WHILE_PLUGGED_IN} setting.
5913 */
5914 public static final int WIFI_SLEEP_POLICY_DEFAULT = 0;
5915
5916 /**
5917 * Value for {@link #WIFI_SLEEP_POLICY} to use the default policy when
5918 * the device is on battery, and never go to sleep when the device is
5919 * plugged in.
5920 */
5921 public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1;
5922
5923 /**
5924 * Value for {@link #WIFI_SLEEP_POLICY} to never go to sleep.
5925 */
5926 public static final int WIFI_SLEEP_POLICY_NEVER = 2;
5927
5928 /**
5929 * Value to specify if the user prefers the date, time and time zone
5930 * to be automatically fetched from the network (NITZ). 1=yes, 0=no
5931 */
5932 public static final String AUTO_TIME = "auto_time";
5933
5934 /**
5935 * Value to specify if the user prefers the time zone
5936 * to be automatically fetched from the network (NITZ). 1=yes, 0=no
5937 */
5938 public static final String AUTO_TIME_ZONE = "auto_time_zone";
5939
5940 /**
5941 * URI for the car dock "in" event sound.
5942 * @hide
5943 */
5944 public static final String CAR_DOCK_SOUND = "car_dock_sound";
5945
5946 /**
5947 * URI for the car dock "out" event sound.
5948 * @hide
5949 */
5950 public static final String CAR_UNDOCK_SOUND = "car_undock_sound";
5951
5952 /**
5953 * URI for the desk dock "in" event sound.
5954 * @hide
5955 */
5956 public static final String DESK_DOCK_SOUND = "desk_dock_sound";
5957
5958 /**
5959 * URI for the desk dock "out" event sound.
5960 * @hide
5961 */
5962 public static final String DESK_UNDOCK_SOUND = "desk_undock_sound";
5963
5964 /**
5965 * Whether to play a sound for dock events.
5966 * @hide
5967 */
5968 public static final String DOCK_SOUNDS_ENABLED = "dock_sounds_enabled";
5969
5970 /**
5971 * URI for the "device locked" (keyguard shown) sound.
5972 * @hide
5973 */
5974 public static final String LOCK_SOUND = "lock_sound";
5975
5976 /**
5977 * URI for the "device unlocked" sound.
5978 * @hide
5979 */
5980 public static final String UNLOCK_SOUND = "unlock_sound";
5981
5982 /**
Adrian Roos49e057d2014-08-13 17:14:51 +02005983 * URI for the "device is trusted" sound, which is played when the device enters the trusted
5984 * state without unlocking.
5985 * @hide
5986 */
5987 public static final String TRUSTED_SOUND = "trusted_sound";
5988
5989 /**
Christopher Tate06efb532012-08-24 15:29:27 -07005990 * URI for the low battery sound file.
5991 * @hide
5992 */
5993 public static final String LOW_BATTERY_SOUND = "low_battery_sound";
5994
5995 /**
5996 * Whether to play a sound for low-battery alerts.
5997 * @hide
5998 */
5999 public static final String POWER_SOUNDS_ENABLED = "power_sounds_enabled";
6000
6001 /**
Jeff Brown84e27562012-12-07 13:56:34 -08006002 * URI for the "wireless charging started" sound.
6003 * @hide
6004 */
6005 public static final String WIRELESS_CHARGING_STARTED_SOUND =
6006 "wireless_charging_started_sound";
6007
6008 /**
John Spurlock51a871d2015-05-06 17:41:30 -04006009 * Whether to play a sound for charging events.
6010 * @hide
6011 */
6012 public static final String CHARGING_SOUNDS_ENABLED = "charging_sounds_enabled";
6013
6014 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006015 * Whether we keep the device on while the device is plugged in.
6016 * Supported values are:
6017 * <ul>
6018 * <li>{@code 0} to never stay on while plugged in</li>
6019 * <li>{@link BatteryManager#BATTERY_PLUGGED_AC} to stay on for AC charger</li>
6020 * <li>{@link BatteryManager#BATTERY_PLUGGED_USB} to stay on for USB charger</li>
6021 * <li>{@link BatteryManager#BATTERY_PLUGGED_WIRELESS} to stay on for wireless charger</li>
6022 * </ul>
6023 * These values can be OR-ed together.
6024 */
6025 public static final String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in";
6026
6027 /**
Christopher Tate58f41ec2013-01-11 15:40:36 -08006028 * When the user has enable the option to have a "bug report" command
6029 * in the power menu.
6030 * @hide
6031 */
6032 public static final String BUGREPORT_IN_POWER_MENU = "bugreport_in_power_menu";
6033
6034 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006035 * Whether ADB is enabled.
6036 */
6037 public static final String ADB_ENABLED = "adb_enabled";
6038
6039 /**
Jon Miranda836c0a82014-08-11 12:32:26 -07006040 * Whether Views are allowed to save their attribute data.
6041 * @hide
6042 */
6043 public static final String DEBUG_VIEW_ATTRIBUTES = "debug_view_attributes";
6044
6045 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006046 * Whether assisted GPS should be enabled or not.
6047 * @hide
6048 */
6049 public static final String ASSISTED_GPS_ENABLED = "assisted_gps_enabled";
6050
6051 /**
6052 * Whether bluetooth is enabled/disabled
6053 * 0=disabled. 1=enabled.
6054 */
6055 public static final String BLUETOOTH_ON = "bluetooth_on";
6056
6057 /**
6058 * CDMA Cell Broadcast SMS
6059 * 0 = CDMA Cell Broadcast SMS disabled
6060 * 1 = CDMA Cell Broadcast SMS enabled
6061 * @hide
6062 */
6063 public static final String CDMA_CELL_BROADCAST_SMS =
6064 "cdma_cell_broadcast_sms";
6065
6066 /**
6067 * The CDMA roaming mode 0 = Home Networks, CDMA default
6068 * 1 = Roaming on Affiliated networks
6069 * 2 = Roaming on any networks
6070 * @hide
6071 */
6072 public static final String CDMA_ROAMING_MODE = "roaming_settings";
6073
6074 /**
6075 * The CDMA subscription mode 0 = RUIM/SIM (default)
6076 * 1 = NV
6077 * @hide
6078 */
6079 public static final String CDMA_SUBSCRIPTION_MODE = "subscription_mode";
6080
6081 /** Inactivity timeout to track mobile data activity.
6082 *
6083 * If set to a positive integer, it indicates the inactivity timeout value in seconds to
6084 * infer the data activity of mobile network. After a period of no activity on mobile
6085 * networks with length specified by the timeout, an {@code ACTION_DATA_ACTIVITY_CHANGE}
6086 * intent is fired to indicate a transition of network status from "active" to "idle". Any
6087 * subsequent activity on mobile networks triggers the firing of {@code
6088 * ACTION_DATA_ACTIVITY_CHANGE} intent indicating transition from "idle" to "active".
6089 *
6090 * Network activity refers to transmitting or receiving data on the network interfaces.
6091 *
6092 * Tracking is disabled if set to zero or negative value.
6093 *
6094 * @hide
6095 */
6096 public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = "data_activity_timeout_mobile";
6097
6098 /** Timeout to tracking Wifi data activity. Same as {@code DATA_ACTIVITY_TIMEOUT_MOBILE}
6099 * but for Wifi network.
6100 * @hide
6101 */
6102 public static final String DATA_ACTIVITY_TIMEOUT_WIFI = "data_activity_timeout_wifi";
6103
6104 /**
6105 * Whether or not data roaming is enabled. (0 = false, 1 = true)
6106 */
6107 public static final String DATA_ROAMING = "data_roaming";
6108
6109 /**
Wink Saville75c1e692013-03-20 17:06:50 -07006110 * The value passed to a Mobile DataConnection via bringUp which defines the
6111 * number of retries to preform when setting up the initial connection. The default
6112 * value defined in DataConnectionTrackerBase#DEFAULT_MDC_INITIAL_RETRY is currently 1.
6113 * @hide
6114 */
6115 public static final String MDC_INITIAL_MAX_RETRY = "mdc_initial_max_retry";
6116
6117 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006118 * Whether user has enabled development settings.
6119 */
6120 public static final String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled";
6121
6122 /**
6123 * Whether the device has been provisioned (0 = false, 1 = true)
6124 */
6125 public static final String DEVICE_PROVISIONED = "device_provisioned";
6126
6127 /**
6128 * The saved value for WindowManagerService.setForcedDisplayDensity().
6129 * One integer in dpi. If unset, then use the real display density.
6130 * @hide
6131 */
6132 public static final String DISPLAY_DENSITY_FORCED = "display_density_forced";
6133
6134 /**
6135 * The saved value for WindowManagerService.setForcedDisplaySize().
6136 * Two integers separated by a comma. If unset, then use the real display size.
6137 * @hide
6138 */
6139 public static final String DISPLAY_SIZE_FORCED = "display_size_forced";
6140
6141 /**
Jeff Brownd46747a2015-04-15 19:02:36 -07006142 * The saved value for WindowManagerService.setForcedDisplayScalingMode().
6143 * 0 or unset if scaling is automatic, 1 if scaling is disabled.
6144 * @hide
6145 */
6146 public static final String DISPLAY_SCALING_FORCE = "display_scaling_force";
6147
6148 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006149 * The maximum size, in bytes, of a download that the download manager will transfer over
6150 * a non-wifi connection.
6151 * @hide
6152 */
6153 public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE =
6154 "download_manager_max_bytes_over_mobile";
6155
6156 /**
6157 * The recommended maximum size, in bytes, of a download that the download manager should
6158 * transfer over a non-wifi connection. Over this size, the use will be warned, but will
6159 * have the option to start the download over the mobile connection anyway.
6160 * @hide
6161 */
6162 public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE =
6163 "download_manager_recommended_max_bytes_over_mobile";
6164
6165 /**
Christopher Tateaa036a22014-05-19 16:33:27 -07006166 * @deprecated Use {@link android.provider.Settings.Secure#INSTALL_NON_MARKET_APPS} instead
Christopher Tate06efb532012-08-24 15:29:27 -07006167 */
Christopher Tateaa036a22014-05-19 16:33:27 -07006168 @Deprecated
6169 public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS;
Christopher Tate06efb532012-08-24 15:29:27 -07006170
6171 /**
Jinsuk Kimb3d91772014-07-10 12:48:54 +09006172 * Whether HDMI control shall be enabled. If disabled, no CEC/MHL command will be
6173 * sent or processed. (0 = false, 1 = true)
6174 * @hide
6175 */
6176 public static final String HDMI_CONTROL_ENABLED = "hdmi_control_enabled";
6177
6178 /**
6179 * Whether HDMI system audio is enabled. If enabled, TV internal speaker is muted,
6180 * and the output is redirected to AV Receiver connected via
6181 * {@Global#HDMI_SYSTEM_AUDIO_OUTPUT}.
6182 * @hide
6183 */
6184 public static final String HDMI_SYSTEM_AUDIO_ENABLED = "hdmi_system_audio_enabled";
6185
6186 /**
Jinsuk Kimb3d91772014-07-10 12:48:54 +09006187 * Whether TV will automatically turn on upon reception of the CEC command
6188 * &lt;Text View On&gt; or &lt;Image View On&gt;. (0 = false, 1 = true)
6189 * @hide
6190 */
6191 public static final String HDMI_CONTROL_AUTO_WAKEUP_ENABLED =
6192 "hdmi_control_auto_wakeup_enabled";
6193
6194 /**
6195 * Whether TV will also turn off other CEC devices when it goes to standby mode.
6196 * (0 = false, 1 = true)
6197 * @hide
6198 */
6199 public static final String HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED =
6200 "hdmi_control_auto_device_off_enabled";
6201
6202 /**
Lorenzo Colitti06d7e532015-03-16 23:46:24 +09006203 * Whether to use the DHCP client from Lollipop and earlier instead of the newer Android DHCP
6204 * client.
6205 * (0 = false, 1 = true)
6206 * @hide
6207 */
6208 public static final String LEGACY_DHCP_CLIENT = "legacy_dhcp_client";
6209
6210 /**
Jinsuk Kimb3d91772014-07-10 12:48:54 +09006211 * Whether TV will switch to MHL port when a mobile device is plugged in.
6212 * (0 = false, 1 = true)
6213 * @hide
6214 */
6215 public static final String MHL_INPUT_SWITCHING_ENABLED = "mhl_input_switching_enabled";
6216
6217 /**
6218 * Whether TV will charge the mobile device connected at MHL port. (0 = false, 1 = true)
6219 * @hide
6220 */
6221 public static final String MHL_POWER_CHARGE_ENABLED = "mhl_power_charge_enabled";
6222
6223 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006224 * Whether mobile data connections are allowed by the user. See
6225 * ConnectivityManager for more info.
6226 * @hide
6227 */
6228 public static final String MOBILE_DATA = "mobile_data";
6229
Erik Klineda4bfa82015-04-30 12:58:40 +09006230 /**
6231 * Whether the mobile data connection should remain active even when higher
6232 * priority networks like WiFi are active, to help make network switching faster.
6233 *
6234 * See ConnectivityService for more info.
6235 *
6236 * (0 = disabled, 1 = enabled)
6237 * @hide
6238 */
6239 public static final String MOBILE_DATA_ALWAYS_ON = "mobile_data_always_on";
6240
Christopher Tate06efb532012-08-24 15:29:27 -07006241 /** {@hide} */
6242 public static final String NETSTATS_ENABLED = "netstats_enabled";
6243 /** {@hide} */
6244 public static final String NETSTATS_POLL_INTERVAL = "netstats_poll_interval";
6245 /** {@hide} */
6246 public static final String NETSTATS_TIME_CACHE_MAX_AGE = "netstats_time_cache_max_age";
6247 /** {@hide} */
6248 public static final String NETSTATS_GLOBAL_ALERT_BYTES = "netstats_global_alert_bytes";
6249 /** {@hide} */
6250 public static final String NETSTATS_SAMPLE_ENABLED = "netstats_sample_enabled";
Christopher Tate06efb532012-08-24 15:29:27 -07006251
6252 /** {@hide} */
6253 public static final String NETSTATS_DEV_BUCKET_DURATION = "netstats_dev_bucket_duration";
6254 /** {@hide} */
6255 public static final String NETSTATS_DEV_PERSIST_BYTES = "netstats_dev_persist_bytes";
6256 /** {@hide} */
6257 public static final String NETSTATS_DEV_ROTATE_AGE = "netstats_dev_rotate_age";
6258 /** {@hide} */
6259 public static final String NETSTATS_DEV_DELETE_AGE = "netstats_dev_delete_age";
6260
6261 /** {@hide} */
6262 public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration";
6263 /** {@hide} */
6264 public static final String NETSTATS_UID_PERSIST_BYTES = "netstats_uid_persist_bytes";
6265 /** {@hide} */
6266 public static final String NETSTATS_UID_ROTATE_AGE = "netstats_uid_rotate_age";
6267 /** {@hide} */
6268 public static final String NETSTATS_UID_DELETE_AGE = "netstats_uid_delete_age";
6269
6270 /** {@hide} */
6271 public static final String NETSTATS_UID_TAG_BUCKET_DURATION = "netstats_uid_tag_bucket_duration";
6272 /** {@hide} */
6273 public static final String NETSTATS_UID_TAG_PERSIST_BYTES = "netstats_uid_tag_persist_bytes";
6274 /** {@hide} */
6275 public static final String NETSTATS_UID_TAG_ROTATE_AGE = "netstats_uid_tag_rotate_age";
6276 /** {@hide} */
6277 public static final String NETSTATS_UID_TAG_DELETE_AGE = "netstats_uid_tag_delete_age";
6278
6279 /**
6280 * User preference for which network(s) should be used. Only the
6281 * connectivity service should touch this.
6282 */
6283 public static final String NETWORK_PREFERENCE = "network_preference";
6284
6285 /**
Jeff Davidsondd6fd1e2014-04-14 15:14:30 -07006286 * Which package name to use for network scoring. If null, or if the package is not a valid
6287 * scorer app, external network scores will neither be requested nor accepted.
6288 * @hide
6289 */
6290 public static final String NETWORK_SCORER_APP = "network_scorer_app";
6291
6292 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006293 * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
6294 * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
6295 * exceeded.
6296 * @hide
6297 */
6298 public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
6299
6300 /**
6301 * The length of time in milli-seconds that automatic small adjustments to
6302 * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
6303 * @hide
6304 */
6305 public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
6306
6307 /** Preferred NTP server. {@hide} */
6308 public static final String NTP_SERVER = "ntp_server";
6309 /** Timeout in milliseconds to wait for NTP server. {@hide} */
6310 public static final String NTP_TIMEOUT = "ntp_timeout";
6311
6312 /**
rich cannings4d8fc792012-09-07 14:43:43 -07006313 * Whether the package manager should send package verification broadcasts for verifiers to
6314 * review apps prior to installation.
6315 * 1 = request apps to be verified prior to installation, if a verifier exists.
6316 * 0 = do not verify apps before installation
rich cannings4e5753f2012-09-19 16:03:56 -07006317 * @hide
rich cannings4d8fc792012-09-07 14:43:43 -07006318 */
6319 public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable";
6320
6321 /** Timeout for package verification.
rich cannings4e5753f2012-09-19 16:03:56 -07006322 * @hide */
rich cannings4d8fc792012-09-07 14:43:43 -07006323 public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout";
6324
6325 /** Default response code for package verification.
rich cannings4e5753f2012-09-19 16:03:56 -07006326 * @hide */
rich cannings4d8fc792012-09-07 14:43:43 -07006327 public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response";
6328
rich cannings4e5753f2012-09-19 16:03:56 -07006329 /**
6330 * Show package verification setting in the Settings app.
rich canningse6686b32012-09-16 14:02:20 -07006331 * 1 = show (default)
6332 * 0 = hide
rich cannings4e5753f2012-09-19 16:03:56 -07006333 * @hide
rich canningse6686b32012-09-16 14:02:20 -07006334 */
6335 public static final String PACKAGE_VERIFIER_SETTING_VISIBLE = "verifier_setting_visible";
6336
rich cannings4d8fc792012-09-07 14:43:43 -07006337 /**
Fabrice Di Meglio1c1b4712014-11-19 17:12:32 -08006338 * Run package verification on apps installed through ADB/ADT/USB
rich cannings4e5753f2012-09-19 16:03:56 -07006339 * 1 = perform package verification on ADB installs (default)
6340 * 0 = bypass package verification on ADB installs
6341 * @hide
6342 */
6343 public static final String PACKAGE_VERIFIER_INCLUDE_ADB = "verifier_verify_adb_installs";
6344
6345 /**
Christopher Tate7265abe2014-11-21 13:54:45 -08006346 * Time since last fstrim (milliseconds) after which we force one to happen
6347 * during device startup. If unset, the default is 3 days.
6348 * @hide
6349 */
6350 public static final String FSTRIM_MANDATORY_INTERVAL = "fstrim_mandatory_interval";
6351
6352 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006353 * The interval in milliseconds at which to check packet counts on the
6354 * mobile data interface when screen is on, to detect possible data
6355 * connection problems.
6356 * @hide
6357 */
6358 public static final String PDP_WATCHDOG_POLL_INTERVAL_MS =
6359 "pdp_watchdog_poll_interval_ms";
6360
6361 /**
6362 * The interval in milliseconds at which to check packet counts on the
6363 * mobile data interface when screen is off, to detect possible data
6364 * connection problems.
6365 * @hide
6366 */
6367 public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS =
6368 "pdp_watchdog_long_poll_interval_ms";
6369
6370 /**
6371 * The interval in milliseconds at which to check packet counts on the
6372 * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT}
6373 * outgoing packets has been reached without incoming packets.
6374 * @hide
6375 */
6376 public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS =
6377 "pdp_watchdog_error_poll_interval_ms";
6378
6379 /**
6380 * The number of outgoing packets sent without seeing an incoming packet
6381 * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT}
6382 * device is logged to the event log
6383 * @hide
6384 */
6385 public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT =
6386 "pdp_watchdog_trigger_packet_count";
6387
6388 /**
6389 * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS})
6390 * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before
6391 * attempting data connection recovery.
6392 * @hide
6393 */
6394 public static final String PDP_WATCHDOG_ERROR_POLL_COUNT =
6395 "pdp_watchdog_error_poll_count";
6396
6397 /**
6398 * The number of failed PDP reset attempts before moving to something more
6399 * drastic: re-registering to the network.
6400 * @hide
6401 */
6402 public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT =
6403 "pdp_watchdog_max_pdp_reset_fail_count";
6404
6405 /**
6406 * A positive value indicates how often the SamplingProfiler
6407 * should take snapshots. Zero value means SamplingProfiler
6408 * is disabled.
6409 *
6410 * @hide
6411 */
6412 public static final String SAMPLING_PROFILER_MS = "sampling_profiler_ms";
6413
6414 /**
6415 * URL to open browser on to allow user to manage a prepay account
6416 * @hide
6417 */
6418 public static final String SETUP_PREPAID_DATA_SERVICE_URL =
6419 "setup_prepaid_data_service_url";
6420
6421 /**
6422 * URL to attempt a GET on to see if this is a prepay device
6423 * @hide
6424 */
6425 public static final String SETUP_PREPAID_DETECTION_TARGET_URL =
6426 "setup_prepaid_detection_target_url";
6427
6428 /**
6429 * Host to check for a redirect to after an attempt to GET
6430 * SETUP_PREPAID_DETECTION_TARGET_URL. (If we redirected there,
6431 * this is a prepaid device with zero balance.)
6432 * @hide
6433 */
6434 public static final String SETUP_PREPAID_DETECTION_REDIR_HOST =
6435 "setup_prepaid_detection_redir_host";
6436
6437 /**
Jake Hamby76a61422012-09-06 17:40:21 -07006438 * The interval in milliseconds at which to check the number of SMS sent out without asking
6439 * for use permit, to limit the un-authorized SMS usage.
6440 *
6441 * @hide
6442 */
6443 public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
6444 "sms_outgoing_check_interval_ms";
6445
6446 /**
6447 * The number of outgoing SMS sent without asking for user permit (of {@link
6448 * #SMS_OUTGOING_CHECK_INTERVAL_MS}
6449 *
6450 * @hide
6451 */
6452 public static final String SMS_OUTGOING_CHECK_MAX_COUNT =
6453 "sms_outgoing_check_max_count";
6454
6455 /**
6456 * Used to disable SMS short code confirmation - defaults to true.
Robert Greenwalt026efcc2012-09-24 10:03:21 -07006457 * True indcates we will do the check, etc. Set to false to disable.
Jake Hamby76a61422012-09-06 17:40:21 -07006458 * @see com.android.internal.telephony.SmsUsageMonitor
6459 * @hide
6460 */
6461 public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation";
6462
Robert Greenwalt026efcc2012-09-24 10:03:21 -07006463 /**
6464 * Used to select which country we use to determine premium sms codes.
6465 * One of com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_SIM,
6466 * com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_NETWORK,
6467 * or com.android.internal.telephony.SMSDispatcher.PREMIUM_RULE_USE_BOTH.
6468 * @hide
6469 */
6470 public static final String SMS_SHORT_CODE_RULE = "sms_short_code_rule";
6471
Jake Hamby76a61422012-09-06 17:40:21 -07006472 /**
JP Abgrall32d1ac4d2014-02-21 12:05:20 -08006473 * Used to select TCP's default initial receiver window size in segments - defaults to a build config value
6474 * @hide
6475 */
6476 public static final String TCP_DEFAULT_INIT_RWND = "tcp_default_init_rwnd";
6477
6478 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006479 * Used to disable Tethering on a device - defaults to true
6480 * @hide
6481 */
6482 public static final String TETHER_SUPPORTED = "tether_supported";
6483
6484 /**
6485 * Used to require DUN APN on the device or not - defaults to a build config value
6486 * which defaults to false
6487 * @hide
6488 */
6489 public static final String TETHER_DUN_REQUIRED = "tether_dun_required";
6490
6491 /**
6492 * Used to hold a gservices-provisioned apn value for DUN. If set, or the
6493 * corresponding build config values are set it will override the APN DB
6494 * values.
6495 * Consists of a comma seperated list of strings:
6496 * "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
6497 * note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN"
6498 * @hide
6499 */
6500 public static final String TETHER_DUN_APN = "tether_dun_apn";
6501
6502 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006503 * USB Mass Storage Enabled
6504 */
6505 public static final String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
6506
6507 /**
6508 * If this setting is set (to anything), then all references
6509 * to Gmail on the device must change to Google Mail.
6510 */
6511 public static final String USE_GOOGLE_MAIL = "use_google_mail";
6512
Hui Shu22671772014-10-01 21:41:07 +00006513 /**
6514 * Webview Data reduction proxy key.
6515 * @hide
6516 */
6517 public static final String WEBVIEW_DATA_REDUCTION_PROXY_KEY =
6518 "webview_data_reduction_proxy_key";
6519
Christopher Tate06efb532012-08-24 15:29:27 -07006520 /**
Jeff Brown89d55462012-09-19 11:33:42 -07006521 * Whether Wifi display is enabled/disabled
6522 * 0=disabled. 1=enabled.
6523 * @hide
6524 */
6525 public static final String WIFI_DISPLAY_ON = "wifi_display_on";
6526
6527 /**
Chong Zhang1f3ecaa2013-05-03 15:55:36 -07006528 * Whether Wifi display certification mode is enabled/disabled
6529 * 0=disabled. 1=enabled.
6530 * @hide
6531 */
6532 public static final String WIFI_DISPLAY_CERTIFICATION_ON =
6533 "wifi_display_certification_on";
6534
6535 /**
Chong Zhange38af812013-08-29 17:25:17 -07006536 * WPS Configuration method used by Wifi display, this setting only
6537 * takes effect when WIFI_DISPLAY_CERTIFICATION_ON is 1 (enabled).
6538 *
6539 * Possible values are:
6540 *
6541 * WpsInfo.INVALID: use default WPS method chosen by framework
6542 * WpsInfo.PBC : use Push button
6543 * WpsInfo.KEYPAD : use Keypad
6544 * WpsInfo.DISPLAY: use Display
6545 * @hide
6546 */
6547 public static final String WIFI_DISPLAY_WPS_CONFIG =
6548 "wifi_display_wps_config";
6549
6550 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006551 * Whether to notify the user of open networks.
6552 * <p>
6553 * If not connected and the scan results have an open network, we will
6554 * put this notification up. If we attempt to connect to a network or
6555 * the open network(s) disappear, we remove the notification. When we
6556 * show the notification, we will not show it again for
6557 * {@link android.provider.Settings.Secure#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} time.
6558 */
6559 public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
6560 "wifi_networks_available_notification_on";
6561 /**
6562 * {@hide}
6563 */
6564 public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON =
6565 "wimax_networks_available_notification_on";
6566
6567 /**
6568 * Delay (in seconds) before repeating the Wi-Fi networks available notification.
6569 * Connecting to a network will reset the timer.
6570 */
6571 public static final String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY =
6572 "wifi_networks_available_repeat_delay";
6573
6574 /**
Robert Greenwalt3ea0c992013-10-03 21:13:49 +00006575 * 802.11 country code in ISO 3166 format
6576 * @hide
6577 */
6578 public static final String WIFI_COUNTRY_CODE = "wifi_country_code";
6579
6580 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006581 * The interval in milliseconds to issue wake up scans when wifi needs
6582 * to connect. This is necessary to connect to an access point when
6583 * device is on the move and the screen is off.
6584 * @hide
6585 */
6586 public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS =
6587 "wifi_framework_scan_interval_ms";
6588
6589 /**
6590 * The interval in milliseconds after which Wi-Fi is considered idle.
6591 * When idle, it is possible for the device to be switched from Wi-Fi to
6592 * the mobile data network.
6593 * @hide
6594 */
6595 public static final String WIFI_IDLE_MS = "wifi_idle_ms";
6596
6597 /**
6598 * When the number of open networks exceeds this number, the
6599 * least-recently-used excess networks will be removed.
6600 */
6601 public static final String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept";
6602
6603 /**
6604 * Whether the Wi-Fi should be on. Only the Wi-Fi service should touch this.
6605 */
6606 public static final String WIFI_ON = "wifi_on";
6607
6608 /**
Irfan Sheriff11aefad2013-03-06 07:57:41 -08006609 * Setting to allow scans to be enabled even wifi is turned off for connectivity.
6610 * @hide
6611 */
6612 public static final String WIFI_SCAN_ALWAYS_AVAILABLE =
6613 "wifi_scan_always_enabled";
6614
6615 /**
Wei Wangd91f1932015-03-19 15:09:56 -07006616 * Settings to allow BLE scans to be enabled even when Bluetooth is turned off for
6617 * connectivity.
6618 * @hide
6619 */
6620 public static final String BLE_SCAN_ALWAYS_AVAILABLE =
6621 "ble_scan_always_enabled";
6622
6623 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006624 * Used to save the Wifi_ON state prior to tethering.
6625 * This state will be checked to restore Wifi after
6626 * the user turns off tethering.
6627 *
6628 * @hide
6629 */
6630 public static final String WIFI_SAVED_STATE = "wifi_saved_state";
6631
6632 /**
6633 * The interval in milliseconds to scan as used by the wifi supplicant
6634 * @hide
6635 */
6636 public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS =
6637 "wifi_supplicant_scan_interval_ms";
6638
vandwalle7c3606c2014-03-31 19:12:07 -07006639 /**
6640 * whether frameworks handles wifi auto-join
6641 * @hide
6642 */
6643 public static final String WIFI_ENHANCED_AUTO_JOIN =
6644 "wifi_enhanced_auto_join";
6645
6646 /**
6647 * whether settings show RSSI
6648 * @hide
6649 */
6650 public static final String WIFI_NETWORK_SHOW_RSSI =
6651 "wifi_network_show_rssi";
6652
6653 /**
Irfan Sheriff3809f502012-09-17 16:04:57 -07006654 * The interval in milliseconds to scan at supplicant when p2p is connected
6655 * @hide
6656 */
6657 public static final String WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS =
6658 "wifi_scan_interval_p2p_connected_ms";
6659
6660 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006661 * Whether the Wi-Fi watchdog is enabled.
6662 */
6663 public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on";
6664
6665 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006666 * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and
6667 * the setting needs to be set to 0 to disable it.
6668 * @hide
6669 */
6670 public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED =
6671 "wifi_watchdog_poor_network_test_enabled";
6672
6673 /**
6674 * Setting to turn on suspend optimizations at screen off on Wi-Fi. Enabled by default and
6675 * needs to be set to 0 to disable it.
6676 * @hide
6677 */
6678 public static final String WIFI_SUSPEND_OPTIMIZATIONS_ENABLED =
6679 "wifi_suspend_optimizations_enabled";
6680
6681 /**
6682 * The maximum number of times we will retry a connection to an access
6683 * point for which we have failed in acquiring an IP address from DHCP.
6684 * A value of N means that we will make N+1 connection attempts in all.
6685 */
6686 public static final String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
6687
6688 /**
6689 * Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile
6690 * data connectivity to be established after a disconnect from Wi-Fi.
6691 */
6692 public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
6693 "wifi_mobile_data_transition_wakelock_timeout_ms";
6694
6695 /**
Zoltan Szatmary-Ban4045d242015-05-27 12:42:39 +01006696 * This setting controls whether WiFi configurations created by a Device Owner app
6697 * should be locked down (that is, be editable or removable only by the Device Owner App,
6698 * not even by Settings app).
6699 * This setting takes integer values. Non-zero values mean DO created configurations
6700 * are locked down. Value of zero means they are not. Default value in the absence of
6701 * actual value to this setting is 0.
6702 */
6703 public static final String WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN =
6704 "wifi_device_owner_configs_lockdown";
6705
6706 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006707 * The operational wifi frequency band
6708 * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO},
6709 * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or
6710 * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ}
6711 *
6712 * @hide
6713 */
6714 public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band";
6715
6716 /**
6717 * The Wi-Fi peer-to-peer device name
6718 * @hide
6719 */
6720 public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name";
6721
6722 /**
Robert Greenwaltc12783a2013-05-16 12:48:20 -07006723 * The min time between wifi disable and wifi enable
6724 * @hide
6725 */
6726 public static final String WIFI_REENABLE_DELAY_MS = "wifi_reenable_delay";
6727
6728 /**
Jeff Davidsona20ca67d2014-12-16 11:48:54 -08006729 * Timeout for ephemeral networks when all known BSSIDs go out of range. We will disconnect
6730 * from an ephemeral network if there is no BSSID for that network with a non-null score that
6731 * has been seen in this time period.
6732 *
6733 * If this is less than or equal to zero, we use a more conservative behavior and only check
6734 * for a non-null score from the currently connected or target BSSID.
6735 * @hide
6736 */
6737 public static final String WIFI_EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS =
6738 "wifi_ephemeral_out_of_range_timeout_ms";
6739
6740 /**
Christopher Tatec868b642012-09-12 17:41:04 -07006741 * The number of milliseconds to delay when checking for data stalls during
6742 * non-aggressive detection. (screen is turned off.)
6743 * @hide
6744 */
6745 public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
6746 "data_stall_alarm_non_aggressive_delay_in_ms";
6747
6748 /**
6749 * The number of milliseconds to delay when checking for data stalls during
6750 * aggressive detection. (screen on or suspected data stall)
6751 * @hide
6752 */
6753 public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
6754 "data_stall_alarm_aggressive_delay_in_ms";
6755
6756 /**
Wink Savillece1e3792013-09-03 16:41:44 -07006757 * The number of milliseconds to allow the provisioning apn to remain active
6758 * @hide
6759 */
6760 public static final String PROVISIONING_APN_ALARM_DELAY_IN_MS =
6761 "provisioning_apn_alarm_delay_in_ms";
6762
6763 /**
Christopher Tatec868b642012-09-12 17:41:04 -07006764 * The interval in milliseconds at which to check gprs registration
6765 * after the first registration mismatch of gprs and voice service,
6766 * to detect possible data network registration problems.
6767 *
6768 * @hide
6769 */
6770 public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
6771 "gprs_register_check_period_ms";
6772
6773 /**
Christopher Tate06efb532012-08-24 15:29:27 -07006774 * Nonzero causes Log.wtf() to crash.
6775 * @hide
6776 */
6777 public static final String WTF_IS_FATAL = "wtf_is_fatal";
6778
Eric Laurentbc0fab1f2012-09-19 11:24:41 -07006779 /**
6780 * Ringer mode. This is used internally, changing this value will not
6781 * change the ringer mode. See AudioManager.
6782 */
6783 public static final String MODE_RINGER = "mode_ringer";
Christopher Tate06efb532012-08-24 15:29:27 -07006784
Jeff Brownd4935962012-09-25 13:27:20 -07006785 /**
6786 * Overlay display devices setting.
6787 * The associated value is a specially formatted string that describes the
6788 * size and density of simulated secondary display devices.
6789 * <p>
6790 * Format: {width}x{height}/{dpi};...
6791 * </p><p>
6792 * Example:
6793 * <ul>
6794 * <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li>
6795 * <li><code>1920x1080/320;1280x720/213</code>: make two overlays, the first
6796 * at 1080p and the second at 720p.</li>
6797 * <li>If the value is empty, then no overlay display devices are created.</li>
6798 * </ul></p>
6799 *
6800 * @hide
6801 */
6802 public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices";
Christopher Tate06efb532012-08-24 15:29:27 -07006803
Jeff Sharkey625239a2012-09-26 22:03:49 -07006804 /**
6805 * Threshold values for the duration and level of a discharge cycle,
6806 * under which we log discharge cycle info.
6807 *
6808 * @hide
6809 */
6810 public static final String
6811 BATTERY_DISCHARGE_DURATION_THRESHOLD = "battery_discharge_duration_threshold";
6812
6813 /** @hide */
6814 public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold";
6815
6816 /**
6817 * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR
6818 * intents on application crashes and ANRs. If this is disabled, the
6819 * crash/ANR dialog will never display the "Report" button.
6820 * <p>
6821 * Type: int (0 = disallow, 1 = allow)
6822 *
6823 * @hide
6824 */
6825 public static final String SEND_ACTION_APP_ERROR = "send_action_app_error";
6826
6827 /**
6828 * Maximum age of entries kept by {@link DropBoxManager}.
6829 *
6830 * @hide
6831 */
6832 public static final String DROPBOX_AGE_SECONDS = "dropbox_age_seconds";
6833
6834 /**
6835 * Maximum number of entry files which {@link DropBoxManager} will keep
6836 * around.
6837 *
6838 * @hide
6839 */
6840 public static final String DROPBOX_MAX_FILES = "dropbox_max_files";
6841
6842 /**
6843 * Maximum amount of disk space used by {@link DropBoxManager} no matter
6844 * what.
6845 *
6846 * @hide
6847 */
6848 public static final String DROPBOX_QUOTA_KB = "dropbox_quota_kb";
6849
6850 /**
6851 * Percent of free disk (excluding reserve) which {@link DropBoxManager}
6852 * will use.
6853 *
6854 * @hide
6855 */
6856 public static final String DROPBOX_QUOTA_PERCENT = "dropbox_quota_percent";
6857
6858 /**
6859 * Percent of total disk which {@link DropBoxManager} will never dip
6860 * into.
6861 *
6862 * @hide
6863 */
6864 public static final String DROPBOX_RESERVE_PERCENT = "dropbox_reserve_percent";
6865
6866 /**
6867 * Prefix for per-tag dropbox disable/enable settings.
6868 *
6869 * @hide
6870 */
6871 public static final String DROPBOX_TAG_PREFIX = "dropbox:";
6872
6873 /**
6874 * Lines of logcat to include with system crash/ANR/etc. reports, as a
6875 * prefix of the dropbox tag of the report type. For example,
6876 * "logcat_for_system_server_anr" controls the lines of logcat captured
6877 * with system server ANR reports. 0 to disable.
6878 *
6879 * @hide
6880 */
6881 public static final String ERROR_LOGCAT_PREFIX = "logcat_for_";
6882
6883 /**
6884 * The interval in minutes after which the amount of free storage left
6885 * on the device is logged to the event log
6886 *
6887 * @hide
6888 */
6889 public static final String SYS_FREE_STORAGE_LOG_INTERVAL = "sys_free_storage_log_interval";
6890
6891 /**
6892 * Threshold for the amount of change in disk free space required to
6893 * report the amount of free space. Used to prevent spamming the logs
6894 * when the disk free space isn't changing frequently.
6895 *
6896 * @hide
6897 */
6898 public static final String
6899 DISK_FREE_CHANGE_REPORTING_THRESHOLD = "disk_free_change_reporting_threshold";
6900
6901 /**
6902 * Minimum percentage of free storage on the device that is used to
6903 * determine if the device is running low on storage. The default is 10.
6904 * <p>
6905 * Say this value is set to 10, the device is considered running low on
6906 * storage if 90% or more of the device storage is filled up.
6907 *
6908 * @hide
6909 */
6910 public static final String
6911 SYS_STORAGE_THRESHOLD_PERCENTAGE = "sys_storage_threshold_percentage";
6912
6913 /**
6914 * Maximum byte size of the low storage threshold. This is to ensure
6915 * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in an
6916 * overly large threshold for large storage devices. Currently this must
6917 * be less than 2GB. This default is 500MB.
6918 *
6919 * @hide
6920 */
6921 public static final String
6922 SYS_STORAGE_THRESHOLD_MAX_BYTES = "sys_storage_threshold_max_bytes";
6923
6924 /**
6925 * Minimum bytes of free storage on the device before the data partition
6926 * is considered full. By default, 1 MB is reserved to avoid system-wide
6927 * SQLite disk full exceptions.
6928 *
6929 * @hide
6930 */
6931 public static final String
6932 SYS_STORAGE_FULL_THRESHOLD_BYTES = "sys_storage_full_threshold_bytes";
6933
6934 /**
6935 * The maximum reconnect delay for short network outages or when the
6936 * network is suspended due to phone use.
6937 *
6938 * @hide
6939 */
6940 public static final String
6941 SYNC_MAX_RETRY_DELAY_IN_SECONDS = "sync_max_retry_delay_in_seconds";
6942
6943 /**
6944 * The number of milliseconds to delay before sending out
Erik Kline8f29dcf2014-12-08 16:25:20 +09006945 * {@link ConnectivityManager#CONNECTIVITY_ACTION} broadcasts. Ignored.
Jeff Sharkey625239a2012-09-26 22:03:49 -07006946 *
6947 * @hide
6948 */
6949 public static final String CONNECTIVITY_CHANGE_DELAY = "connectivity_change_delay";
6950
Vinit Deshapnde1f12cb52013-08-21 13:09:01 -07006951
6952 /**
6953 * Network sampling interval, in seconds. We'll generate link information
6954 * about bytes/packets sent and error rates based on data sampled in this interval
6955 *
6956 * @hide
6957 */
6958
6959 public static final String CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS =
6960 "connectivity_sampling_interval_in_seconds";
6961
Jeff Sharkey625239a2012-09-26 22:03:49 -07006962 /**
Jason Monk602b2322013-07-03 17:04:33 -04006963 * The series of successively longer delays used in retrying to download PAC file.
6964 * Last delay is used between successful PAC downloads.
6965 *
6966 * @hide
6967 */
6968 public static final String PAC_CHANGE_DELAY = "pac_change_delay";
6969
6970 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07006971 * Setting to turn off captive portal detection. Feature is enabled by
6972 * default and the setting needs to be set to 0 to disable it.
6973 *
6974 * @hide
6975 */
6976 public static final String
6977 CAPTIVE_PORTAL_DETECTION_ENABLED = "captive_portal_detection_enabled";
6978
6979 /**
6980 * The server used for captive portal detection upon a new conection. A
6981 * 204 response code from the server is used for validation.
6982 *
6983 * @hide
6984 */
6985 public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server";
6986
6987 /**
6988 * Whether network service discovery is enabled.
6989 *
6990 * @hide
6991 */
6992 public static final String NSD_ON = "nsd_on";
6993
6994 /**
6995 * Let user pick default install location.
6996 *
6997 * @hide
6998 */
6999 public static final String SET_INSTALL_LOCATION = "set_install_location";
7000
7001 /**
7002 * Default install location value.
7003 * 0 = auto, let system decide
7004 * 1 = internal
7005 * 2 = sdcard
7006 * @hide
7007 */
7008 public static final String DEFAULT_INSTALL_LOCATION = "default_install_location";
7009
7010 /**
7011 * ms during which to consume extra events related to Inet connection
7012 * condition after a transtion to fully-connected
7013 *
7014 * @hide
7015 */
7016 public static final String
7017 INET_CONDITION_DEBOUNCE_UP_DELAY = "inet_condition_debounce_up_delay";
7018
7019 /**
7020 * ms during which to consume extra events related to Inet connection
7021 * condtion after a transtion to partly-connected
7022 *
7023 * @hide
7024 */
7025 public static final String
7026 INET_CONDITION_DEBOUNCE_DOWN_DELAY = "inet_condition_debounce_down_delay";
7027
7028 /** {@hide} */
7029 public static final String
7030 READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default";
7031
7032 /**
7033 * Host name and port for global http proxy. Uses ':' seperator for
7034 * between host and port.
7035 */
7036 public static final String HTTP_PROXY = "http_proxy";
7037
7038 /**
7039 * Host name for global http proxy. Set via ConnectivityManager.
7040 *
7041 * @hide
7042 */
7043 public static final String GLOBAL_HTTP_PROXY_HOST = "global_http_proxy_host";
7044
7045 /**
7046 * Integer host port for global http proxy. Set via ConnectivityManager.
7047 *
7048 * @hide
7049 */
7050 public static final String GLOBAL_HTTP_PROXY_PORT = "global_http_proxy_port";
7051
7052 /**
7053 * Exclusion list for global proxy. This string contains a list of
7054 * comma-separated domains where the global proxy does not apply.
7055 * Domains should be listed in a comma- separated list. Example of
7056 * acceptable formats: ".domain1.com,my.domain2.com" Use
7057 * ConnectivityManager to set/get.
7058 *
7059 * @hide
7060 */
7061 public static final String
7062 GLOBAL_HTTP_PROXY_EXCLUSION_LIST = "global_http_proxy_exclusion_list";
7063
7064 /**
Jason Monk602b2322013-07-03 17:04:33 -04007065 * The location PAC File for the proxy.
7066 * @hide
7067 */
7068 public static final String
7069 GLOBAL_HTTP_PROXY_PAC = "global_proxy_pac_url";
7070
7071 /**
Jeff Sharkey625239a2012-09-26 22:03:49 -07007072 * Enables the UI setting to allow the user to specify the global HTTP
7073 * proxy and associated exclusion list.
7074 *
7075 * @hide
7076 */
7077 public static final String SET_GLOBAL_HTTP_PROXY = "set_global_http_proxy";
7078
7079 /**
7080 * Setting for default DNS in case nobody suggests one
7081 *
7082 * @hide
7083 */
7084 public static final String DEFAULT_DNS_SERVER = "default_dns_server";
7085
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007086 /** {@hide} */
7087 public static final String
7088 BLUETOOTH_HEADSET_PRIORITY_PREFIX = "bluetooth_headset_priority_";
7089 /** {@hide} */
7090 public static final String
7091 BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX = "bluetooth_a2dp_sink_priority_";
7092 /** {@hide} */
7093 public static final String
7094 BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX = "bluetooth_input_device_priority_";
Kim Schulz0d376052013-08-22 11:18:02 +02007095 /** {@hide} */
7096 public static final String
7097 BLUETOOTH_MAP_PRIORITY_PREFIX = "bluetooth_map_priority_";
Casper Bonde2a5f6082015-03-19 10:36:45 +01007098 /** {@hide} */
7099 public static final String
7100 BLUETOOTH_SAP_PRIORITY_PREFIX = "bluetooth_sap_priority_";
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007101
7102 /**
Adam Lesinski31c05d12015-06-09 17:34:04 -07007103 * Device Idle (Doze) specific settings.
7104 * This is encoded as a key=value list, separated by commas. Ex:
7105 *
7106 * "inactive_timeout=60000,sensing_timeout=400000"
7107 *
7108 * The following keys are supported:
7109 *
7110 * <pre>
7111 * inactive_to (long)
7112 * sensing_to (long)
7113 * motion_inactive_to (long)
7114 * idle_after_inactive_to (long)
7115 * idle_pending_to (long)
7116 * max_idle_pending_to (long)
7117 * idle_pending_factor (float)
7118 * idle_to (long)
7119 * max_idle_to (long)
7120 * idle_factor (float)
7121 * min_time_to_alarm (long)
7122 * max_temp_app_whitelist_duration (long)
7123 * </pre>
7124 *
7125 * <p>
7126 * Type: string
7127 * @hide
7128 * @see com.android.server.DeviceIdleController.Constants
7129 */
7130 public static final String DEVICE_IDLE_CONSTANTS = "device_idle_constants";
7131
7132 /**
Adam Lesinskia6232df2015-06-11 18:16:41 -07007133 * App standby (app idle) specific settings.
7134 * This is encoded as a key=value list, separated by commas. Ex:
7135 *
7136 * "idle_duration=5000,parole_interval=4500"
7137 *
7138 * The following keys are supported:
7139 *
7140 * <pre>
7141 * idle_duration (long)
7142 * wallclock_threshold (long)
7143 * parole_interval (long)
7144 * parole_duration (long)
7145 * </pre>
7146 *
7147 * <p>
7148 * Type: string
7149 * @hide
7150 * @see com.android.server.usage.UsageStatsService.SettingsObserver
7151 */
7152 public static final String APP_IDLE_CONSTANTS = "app_idle_constants";
7153
7154 /**
Dianne Hackborna750a632015-06-16 17:18:23 -07007155 * Alarm manager specific settings.
7156 * This is encoded as a key=value list, separated by commas. Ex:
7157 *
7158 * "min_futurity=5000,allow_while_idle_short_time=4500"
7159 *
7160 * The following keys are supported:
7161 *
7162 * <pre>
7163 * min_futurity (long)
7164 * min_interval (long)
7165 * allow_while_idle_short_time (long)
7166 * allow_while_idle_long_time (long)
7167 * allow_while_idle_whitelist_duration (long)
7168 * </pre>
7169 *
7170 * <p>
7171 * Type: string
7172 * @hide
7173 * @see com.android.server.AlarmManagerService.Constants
7174 */
7175 public static final String ALARM_MANAGER_CONSTANTS = "alarm_manager_constants";
7176
7177 /**
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007178 * Get the key that retrieves a bluetooth headset's priority.
7179 * @hide
7180 */
7181 public static final String getBluetoothHeadsetPriorityKey(String address) {
Elliott Hughescb64d432013-08-02 10:00:44 -07007182 return BLUETOOTH_HEADSET_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007183 }
7184
7185 /**
7186 * Get the key that retrieves a bluetooth a2dp sink's priority.
7187 * @hide
7188 */
7189 public static final String getBluetoothA2dpSinkPriorityKey(String address) {
Elliott Hughescb64d432013-08-02 10:00:44 -07007190 return BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007191 }
7192
7193 /**
7194 * Get the key that retrieves a bluetooth Input Device's priority.
7195 * @hide
7196 */
7197 public static final String getBluetoothInputDevicePriorityKey(String address) {
Elliott Hughescb64d432013-08-02 10:00:44 -07007198 return BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
Jeff Sharkey0ac10282012-10-01 12:50:22 -07007199 }
7200
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007201 /**
Kim Schulz0d376052013-08-22 11:18:02 +02007202 * Get the key that retrieves a bluetooth map priority.
7203 * @hide
7204 */
7205 public static final String getBluetoothMapPriorityKey(String address) {
7206 return BLUETOOTH_MAP_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
7207 }
Casper Bonde2a5f6082015-03-19 10:36:45 +01007208
7209 /**
7210 * Get the key that retrieves a bluetooth map priority.
7211 * @hide
7212 */
7213 public static final String getBluetoothSapPriorityKey(String address) {
7214 return BLUETOOTH_SAP_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
7215 }
7216
Kim Schulz0d376052013-08-22 11:18:02 +02007217 /**
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007218 * Scaling factor for normal window animations. Setting to 0 will
7219 * disable window animations.
7220 */
7221 public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale";
7222
7223 /**
7224 * Scaling factor for activity transition animations. Setting to 0 will
7225 * disable window animations.
7226 */
7227 public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale";
7228
7229 /**
7230 * Scaling factor for Animator-based animations. This affects both the
7231 * start delay and duration of all such animations. Setting to 0 will
7232 * cause animations to end immediately. The default value is 1.
7233 */
7234 public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale";
7235
7236 /**
7237 * Scaling factor for normal window animations. Setting to 0 will
7238 * disable window animations.
7239 *
7240 * @hide
7241 */
7242 public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations";
7243
7244 /**
7245 * If 0, the compatibility mode is off for all applications.
7246 * If 1, older applications run under compatibility mode.
7247 * TODO: remove this settings before code freeze (bug/1907571)
7248 * @hide
7249 */
7250 public static final String COMPATIBILITY_MODE = "compatibility_mode";
7251
7252 /**
7253 * CDMA only settings
7254 * Emergency Tone 0 = Off
7255 * 1 = Alert
7256 * 2 = Vibrate
7257 * @hide
7258 */
7259 public static final String EMERGENCY_TONE = "emergency_tone";
7260
7261 /**
7262 * CDMA only settings
7263 * Whether the auto retry is enabled. The value is
7264 * boolean (1 or 0).
7265 * @hide
7266 */
7267 public static final String CALL_AUTO_RETRY = "call_auto_retry";
7268
7269 /**
Sungmin Choie099ab12014-06-09 14:45:51 +09007270 * See RIL_PreferredNetworkType in ril.h
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007271 * @hide
7272 */
7273 public static final String PREFERRED_NETWORK_MODE =
7274 "preferred_network_mode";
7275
7276 /**
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007277 * Name of an application package to be debugged.
7278 */
7279 public static final String DEBUG_APP = "debug_app";
7280
7281 /**
7282 * If 1, when launching DEBUG_APP it will wait for the debugger before
7283 * starting user code. If 0, it will run normally.
7284 */
7285 public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger";
7286
7287 /**
7288 * Control whether the process CPU usage meter should be shown.
7289 */
7290 public static final String SHOW_PROCESSES = "show_processes";
7291
7292 /**
Ruchi Kandoi62b8a492014-04-17 18:01:40 -07007293 * If 1 low power mode is enabled.
7294 * @hide
7295 */
7296 public static final String LOW_POWER_MODE = "low_power";
7297
John Spurlockf8f524c2014-06-10 14:47:29 -04007298 /**
7299 * Battery level [1-99] at which low power mode automatically turns on.
Dianne Hackborn14272302014-06-10 23:13:02 -07007300 * If 0, it will not automatically turn on.
John Spurlockf8f524c2014-06-10 14:47:29 -04007301 * @hide
7302 */
7303 public static final String LOW_POWER_MODE_TRIGGER_LEVEL = "low_power_trigger_level";
7304
Ruchi Kandoi62b8a492014-04-17 18:01:40 -07007305 /**
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007306 * If 1, the activity manager will aggressively finish activities and
7307 * processes as soon as they are no longer needed. If 0, the normal
7308 * extended lifetime is used.
7309 */
Dianne Hackborn89ad4562014-08-24 16:45:38 -07007310 public static final String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities";
Jeff Sharkey6e2bee72012-10-01 13:39:08 -07007311
Christopher Tate66488d62012-10-02 11:58:01 -07007312 /**
Eric Laurent7ee1e4f2012-10-26 18:11:21 -07007313 * Use Dock audio output for media:
7314 * 0 = disabled
7315 * 1 = enabled
7316 * @hide
7317 */
7318 public static final String DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled";
7319
7320 /**
Eric Laurent05274f32012-11-29 12:48:18 -08007321 * Persisted safe headphone volume management state by AudioService
7322 * @hide
7323 */
7324 public static final String AUDIO_SAFE_VOLUME_STATE = "audio_safe_volume_state";
7325
7326 /**
Geremy Condraa0735112013-03-26 21:49:26 -07007327 * URL for tzinfo (time zone) updates
7328 * @hide
7329 */
7330 public static final String TZINFO_UPDATE_CONTENT_URL = "tzinfo_content_url";
7331
7332 /**
7333 * URL for tzinfo (time zone) update metadata
7334 * @hide
7335 */
7336 public static final String TZINFO_UPDATE_METADATA_URL = "tzinfo_metadata_url";
7337
7338 /**
7339 * URL for selinux (mandatory access control) updates
7340 * @hide
7341 */
7342 public static final String SELINUX_UPDATE_CONTENT_URL = "selinux_content_url";
7343
7344 /**
7345 * URL for selinux (mandatory access control) update metadata
7346 * @hide
7347 */
7348 public static final String SELINUX_UPDATE_METADATA_URL = "selinux_metadata_url";
7349
7350 /**
7351 * URL for sms short code updates
7352 * @hide
7353 */
7354 public static final String SMS_SHORT_CODES_UPDATE_CONTENT_URL =
7355 "sms_short_codes_content_url";
7356
7357 /**
7358 * URL for sms short code update metadata
7359 * @hide
7360 */
7361 public static final String SMS_SHORT_CODES_UPDATE_METADATA_URL =
7362 "sms_short_codes_metadata_url";
7363
7364 /**
7365 * URL for cert pinlist updates
7366 * @hide
7367 */
7368 public static final String CERT_PIN_UPDATE_CONTENT_URL = "cert_pin_content_url";
7369
7370 /**
7371 * URL for cert pinlist updates
7372 * @hide
7373 */
7374 public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url";
7375
Geremy Condra757ee522013-03-29 16:39:45 -07007376 /**
Ben Gruver633dc9b2013-04-04 12:05:49 -07007377 * URL for intent firewall updates
7378 * @hide
7379 */
7380 public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL =
7381 "intent_firewall_content_url";
7382
7383 /**
7384 * URL for intent firewall update metadata
7385 * @hide
7386 */
7387 public static final String INTENT_FIREWALL_UPDATE_METADATA_URL =
7388 "intent_firewall_metadata_url";
7389
7390 /**
Geremy Condra4e7f7e82013-03-26 21:09:01 -07007391 * SELinux enforcement status. If 0, permissive; if 1, enforcing.
7392 * @hide
7393 */
7394 public static final String SELINUX_STATUS = "selinux_status";
7395
Geremy Condraa0735112013-03-26 21:49:26 -07007396 /**
Amith Yamasanid8415f42013-08-07 20:15:10 -07007397 * Developer setting to force RTL layout.
7398 * @hide
7399 */
7400 public static final String DEVELOPMENT_FORCE_RTL = "debug.force_rtl";
7401
7402 /**
Daniel Sandlerdea64622013-09-23 16:05:57 -04007403 * Milliseconds after screen-off after which low battery sounds will be silenced.
7404 *
7405 * If zero, battery sounds will always play.
7406 * Defaults to @integer/def_low_battery_sound_timeout in SettingsProvider.
7407 *
7408 * @hide
7409 */
7410 public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout";
7411
7412 /**
Evan Charltoncc7b0432014-01-14 14:47:11 -08007413 * Milliseconds to wait before bouncing Wi-Fi after settings is restored. Note that after
Dianne Hackborna3fb40d2014-08-12 15:06:50 -07007414 * the caller is done with this, they should call {@link ContentResolver#delete} to
Evan Charltoncc7b0432014-01-14 14:47:11 -08007415 * clean up any value that they may have written.
7416 *
7417 * @hide
7418 */
7419 public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms";
7420
John Spurlockc6d1c602014-01-17 15:22:06 -05007421 /**
7422 * Defines global runtime overrides to window policy.
7423 *
Jorim Jaggib10e33f2015-02-04 21:57:40 +01007424 * See {@link com.android.server.policy.PolicyControl} for value format.
John Spurlockc6d1c602014-01-17 15:22:06 -05007425 *
7426 * @hide
7427 */
7428 public static final String POLICY_CONTROL = "policy_control";
Evan Charltoncc7b0432014-01-14 14:47:11 -08007429
7430 /**
John Spurlockae641c92014-06-30 18:11:40 -04007431 * Defines global zen mode. ZEN_MODE_OFF, ZEN_MODE_IMPORTANT_INTERRUPTIONS,
7432 * or ZEN_MODE_NO_INTERRUPTIONS.
John Spurlocke677d712014-02-13 12:52:19 -05007433 *
7434 * @hide
7435 */
7436 public static final String ZEN_MODE = "zen_mode";
7437
7438 /** @hide */ public static final int ZEN_MODE_OFF = 0;
John Spurlockae641c92014-06-30 18:11:40 -04007439 /** @hide */ public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1;
7440 /** @hide */ public static final int ZEN_MODE_NO_INTERRUPTIONS = 2;
John Spurlock4f1163c2015-04-02 17:41:21 -04007441 /** @hide */ public static final int ZEN_MODE_ALARMS = 3;
John Spurlocke677d712014-02-13 12:52:19 -05007442
7443 /** @hide */ public static String zenModeToString(int mode) {
John Spurlockae641c92014-06-30 18:11:40 -04007444 if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS";
John Spurlock4f1163c2015-04-02 17:41:21 -04007445 if (mode == ZEN_MODE_ALARMS) return "ZEN_MODE_ALARMS";
John Spurlockae641c92014-06-30 18:11:40 -04007446 if (mode == ZEN_MODE_NO_INTERRUPTIONS) return "ZEN_MODE_NO_INTERRUPTIONS";
7447 return "ZEN_MODE_OFF";
John Spurlocke677d712014-02-13 12:52:19 -05007448 }
7449
John Spurlockb2278d62015-04-07 12:47:12 -04007450 /** @hide */ public static boolean isValidZenMode(int value) {
7451 switch (value) {
7452 case Global.ZEN_MODE_OFF:
7453 case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
7454 case Global.ZEN_MODE_ALARMS:
7455 case Global.ZEN_MODE_NO_INTERRUPTIONS:
7456 return true;
7457 default:
7458 return false;
7459 }
7460 }
7461
John Spurlocke677d712014-02-13 12:52:19 -05007462 /**
John Spurlock056c5192014-04-20 21:52:01 -04007463 * Opaque value, changes when persisted zen mode configuration changes.
7464 *
7465 * @hide
7466 */
7467 public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag";
7468
7469 /**
Chris Wren7bd241232014-02-28 16:25:05 -05007470 * Defines global heads up toggle. One of HEADS_UP_OFF, HEADS_UP_ON.
7471 *
7472 * @hide
7473 */
Chris Wren10d82df2014-03-01 10:34:51 -05007474 public static final String HEADS_UP_NOTIFICATIONS_ENABLED =
7475 "heads_up_notifications_enabled";
Chris Wren7bd241232014-02-28 16:25:05 -05007476
7477 /** @hide */ public static final int HEADS_UP_OFF = 0;
7478 /** @hide */ public static final int HEADS_UP_ON = 1;
7479
7480 /**
Jerome Poichet147b4d72014-05-12 18:13:27 -07007481 * The name of the device
7482 *
7483 * @hide
7484 */
7485 public static final String DEVICE_NAME = "device_name";
7486
7487 /**
Amith Yamasani1e9c2182014-06-11 17:25:51 -07007488 * Whether it should be possible to create a guest user on the device.
7489 * <p>
7490 * Type: int (0 for disabled, 1 for enabled)
7491 * @hide
7492 */
7493 public static final String GUEST_USER_ENABLED = "guest_user_enabled";
7494
7495 /**
Jeff Davidson56f9f732014-08-14 16:47:23 -07007496 * Whether the NetworkScoringService has been first initialized.
7497 * <p>
7498 * Type: int (0 for false, 1 for true)
7499 * @hide
7500 */
7501 public static final String NETWORK_SCORING_PROVISIONED = "network_scoring_provisioned";
7502
7503 /**
Jim Miller6848dc82014-10-13 18:51:53 -07007504 * Whether the user wants to be prompted for password to decrypt the device on boot.
7505 * This only matters if the storage is encrypted.
7506 * <p>
7507 * Type: int (0 for false, 1 for true)
7508 * @hide
7509 */
7510 public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt";
7511
7512 /**
Libin.Tang@motorola.com0499bb52014-10-10 14:55:57 -05007513 * Whether the Volte/VT is enabled
7514 * <p>
7515 * Type: int (0 for false, 1 for true)
7516 * @hide
7517 */
Etan Cohene41a9cf2014-10-22 10:50:46 -07007518 public static final String ENHANCED_4G_MODE_ENABLED = "volte_vt_enabled";
Libin.Tang@motorola.com0499bb52014-10-10 14:55:57 -05007519
7520 /**
Etan Cohen9c8f21b2014-12-23 15:02:19 -08007521 * Whether WFC is enabled
7522 * <p>
7523 * Type: int (0 for false, 1 for true)
7524 *
7525 * @hide
7526 */
7527 public static final String WFC_IMS_ENABLED = "wfc_ims_enabled";
7528
7529 /**
7530 * WFC Mode.
7531 * <p>
7532 * Type: int - 2=Wi-Fi preferred, 1=Cellular preferred, 0=Wi-Fi only
7533 *
7534 * @hide
7535 */
7536 public static final String WFC_IMS_MODE = "wfc_ims_mode";
7537
7538 /**
7539 * Whether WFC roaming is enabled
7540 * <p>
7541 * Type: int (0 for false, 1 for true)
7542 *
7543 * @hide
7544 */
7545 public static final String WFC_IMS_ROAMING_ENABLED = "wfc_ims_roaming_enabled";
7546
7547 /**
Etan Cohen7ab0ad12014-11-24 11:18:01 -08007548 * Global override to disable VoLTE (independent of user setting)
7549 * <p>
7550 * Type: int (1 for disable VoLTE, 0 to use user configuration)
7551 * @hide
7552 */
7553 public static final String VOLTE_FEATURE_DISABLED = "volte_feature_disabled";
7554
7555 /**
Amit Mahajan4fea0922014-11-18 12:56:28 -08007556 * Whether user can enable/disable LTE as a preferred network. A carrier might control
7557 * this via gservices, OMA-DM, carrier app, etc.
7558 * <p>
7559 * Type: int (0 for false, 1 for true)
7560 * @hide
7561 */
7562 public static final String LTE_SERVICE_FORCED = "lte_service_forced";
7563
7564 /**
Christopher Tate66488d62012-10-02 11:58:01 -07007565 * Settings to backup. This is here so that it's in the same place as the settings
7566 * keys and easy to update.
7567 *
7568 * These keys may be mentioned in the SETTINGS_TO_BACKUP arrays in System
7569 * and Secure as well. This is because those tables drive both backup and
7570 * restore, and restore needs to properly whitelist keys that used to live
7571 * in those namespaces. The keys will only actually be backed up / restored
7572 * if they are also mentioned in this table (Global.SETTINGS_TO_BACKUP).
7573 *
7574 * NOTE: Settings are backed up and restored in the order they appear
7575 * in this array. If you have one setting depending on another,
7576 * make sure that they are ordered appropriately.
7577 *
7578 * @hide
7579 */
7580 public static final String[] SETTINGS_TO_BACKUP = {
Christopher Tate58f41ec2013-01-11 15:40:36 -08007581 BUGREPORT_IN_POWER_MENU,
Christopher Tate66488d62012-10-02 11:58:01 -07007582 STAY_ON_WHILE_PLUGGED_IN,
Christopher Tate66488d62012-10-02 11:58:01 -07007583 AUTO_TIME,
7584 AUTO_TIME_ZONE,
7585 POWER_SOUNDS_ENABLED,
7586 DOCK_SOUNDS_ENABLED,
7587 USB_MASS_STORAGE_ENABLED,
7588 ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED,
7589 WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
7590 WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
Christopher Tate16eb7cd2012-10-09 15:26:30 -07007591 WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED,
Christopher Tate66488d62012-10-02 11:58:01 -07007592 WIFI_NUM_OPEN_NETWORKS_KEPT,
7593 EMERGENCY_TONE,
7594 CALL_AUTO_RETRY,
Amith Yamasani94005242014-10-31 11:35:13 -07007595 DOCK_AUDIO_MEDIA_ENABLED,
7596 LOW_POWER_MODE_TRIGGER_LEVEL
Christopher Tate66488d62012-10-02 11:58:01 -07007597 };
7598
Christopher Tate06efb532012-08-24 15:29:27 -07007599 // Populated lazily, guarded by class object:
Dianne Hackborn139748f2012-09-24 11:36:57 -07007600 private static NameValueCache sNameValueCache = new NameValueCache(
7601 SYS_PROP_SETTING_VERSION,
7602 CONTENT_URI,
7603 CALL_METHOD_GET_GLOBAL,
7604 CALL_METHOD_PUT_GLOBAL);
Christopher Tate06efb532012-08-24 15:29:27 -07007605
Christopher Tateaa036a22014-05-19 16:33:27 -07007606 // Certain settings have been moved from global to the per-user secure namespace
7607 private static final HashSet<String> MOVED_TO_SECURE;
7608 static {
7609 MOVED_TO_SECURE = new HashSet<String>(1);
7610 MOVED_TO_SECURE.add(Settings.Global.INSTALL_NON_MARKET_APPS);
7611 }
7612
Svetoslav683914b2015-01-15 14:22:26 -08007613 /** @hide */
7614 public static void getMovedToSecureSettings(Set<String> outKeySet) {
7615 outKeySet.addAll(MOVED_TO_SECURE);
7616 }
7617
Christopher Tate06efb532012-08-24 15:29:27 -07007618 /**
7619 * Look up a name in the database.
7620 * @param resolver to access the database with
7621 * @param name to look up in the table
7622 * @return the corresponding value, or null if not present
7623 */
Dianne Hackborn139748f2012-09-24 11:36:57 -07007624 public static String getString(ContentResolver resolver, String name) {
Christopher Tate06efb532012-08-24 15:29:27 -07007625 return getStringForUser(resolver, name, UserHandle.myUserId());
7626 }
7627
7628 /** @hide */
Dianne Hackborn139748f2012-09-24 11:36:57 -07007629 public static String getStringForUser(ContentResolver resolver, String name,
Christopher Tate06efb532012-08-24 15:29:27 -07007630 int userHandle) {
Christopher Tateaa036a22014-05-19 16:33:27 -07007631 if (MOVED_TO_SECURE.contains(name)) {
7632 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global"
7633 + " to android.provider.Settings.Secure, returning read-only value.");
7634 return Secure.getStringForUser(resolver, name, userHandle);
7635 }
Christopher Tate06efb532012-08-24 15:29:27 -07007636 return sNameValueCache.getStringForUser(resolver, name, userHandle);
7637 }
7638
7639 /**
7640 * Store a name/value pair into the database.
7641 * @param resolver to access the database with
7642 * @param name to store
7643 * @param value to associate with the name
7644 * @return true if the value was set, false on database errors
7645 */
7646 public static boolean putString(ContentResolver resolver,
7647 String name, String value) {
7648 return putStringForUser(resolver, name, value, UserHandle.myUserId());
7649 }
7650
7651 /** @hide */
7652 public static boolean putStringForUser(ContentResolver resolver,
7653 String name, String value, int userHandle) {
Christopher Tate06efb532012-08-24 15:29:27 -07007654 if (LOCAL_LOGV) {
7655 Log.v(TAG, "Global.putString(name=" + name + ", value=" + value
7656 + " for " + userHandle);
7657 }
Christopher Tateaa036a22014-05-19 16:33:27 -07007658 // Global and Secure have the same access policy so we can forward writes
7659 if (MOVED_TO_SECURE.contains(name)) {
7660 Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.Global"
7661 + " to android.provider.Settings.Secure, value is unchanged.");
7662 return Secure.putStringForUser(resolver, name, value, userHandle);
7663 }
Christopher Tate06efb532012-08-24 15:29:27 -07007664 return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
7665 }
7666
7667 /**
7668 * Construct the content URI for a particular name/value pair,
7669 * useful for monitoring changes with a ContentObserver.
7670 * @param name to look up in the table
7671 * @return the corresponding content URI, or null if not present
7672 */
7673 public static Uri getUriFor(String name) {
7674 return getUriFor(CONTENT_URI, name);
7675 }
7676
7677 /**
7678 * Convenience function for retrieving a single secure settings value
7679 * as an integer. Note that internally setting values are always
7680 * stored as strings; this function converts the string to an integer
7681 * for you. The default value will be returned if the setting is
7682 * not defined or not an integer.
7683 *
7684 * @param cr The ContentResolver to access.
7685 * @param name The name of the setting to retrieve.
7686 * @param def Value to return if the setting is not defined.
7687 *
7688 * @return The setting's current value, or 'def' if it is not defined
7689 * or not a valid integer.
7690 */
7691 public static int getInt(ContentResolver cr, String name, int def) {
7692 String v = getString(cr, name);
7693 try {
7694 return v != null ? Integer.parseInt(v) : def;
7695 } catch (NumberFormatException e) {
7696 return def;
7697 }
7698 }
7699
7700 /**
7701 * Convenience function for retrieving a single secure settings value
7702 * as an integer. Note that internally setting values are always
7703 * stored as strings; this function converts the string to an integer
7704 * for you.
7705 * <p>
7706 * This version does not take a default value. If the setting has not
7707 * been set, or the string value is not a number,
7708 * it throws {@link SettingNotFoundException}.
7709 *
7710 * @param cr The ContentResolver to access.
7711 * @param name The name of the setting to retrieve.
7712 *
7713 * @throws SettingNotFoundException Thrown if a setting by the given
7714 * name can't be found or the setting value is not an integer.
7715 *
7716 * @return The setting's current value.
7717 */
7718 public static int getInt(ContentResolver cr, String name)
7719 throws SettingNotFoundException {
7720 String v = getString(cr, name);
7721 try {
7722 return Integer.parseInt(v);
7723 } catch (NumberFormatException e) {
7724 throw new SettingNotFoundException(name);
7725 }
7726 }
7727
7728 /**
7729 * Convenience function for updating a single settings value as an
7730 * integer. This will either create a new entry in the table if the
7731 * given name does not exist, or modify the value of the existing row
7732 * with that name. Note that internally setting values are always
7733 * stored as strings, so this function converts the given value to a
7734 * string before storing it.
7735 *
7736 * @param cr The ContentResolver to access.
7737 * @param name The name of the setting to modify.
7738 * @param value The new value for the setting.
7739 * @return true if the value was set, false on database errors
7740 */
7741 public static boolean putInt(ContentResolver cr, String name, int value) {
7742 return putString(cr, name, Integer.toString(value));
7743 }
7744
7745 /**
7746 * Convenience function for retrieving a single secure settings value
7747 * as a {@code long}. Note that internally setting values are always
7748 * stored as strings; this function converts the string to a {@code long}
7749 * for you. The default value will be returned if the setting is
7750 * not defined or not a {@code long}.
7751 *
7752 * @param cr The ContentResolver to access.
7753 * @param name The name of the setting to retrieve.
7754 * @param def Value to return if the setting is not defined.
7755 *
7756 * @return The setting's current value, or 'def' if it is not defined
7757 * or not a valid {@code long}.
7758 */
7759 public static long getLong(ContentResolver cr, String name, long def) {
7760 String valString = getString(cr, name);
7761 long value;
7762 try {
7763 value = valString != null ? Long.parseLong(valString) : def;
7764 } catch (NumberFormatException e) {
7765 value = def;
7766 }
7767 return value;
7768 }
7769
7770 /**
7771 * Convenience function for retrieving a single secure settings value
7772 * as a {@code long}. Note that internally setting values are always
7773 * stored as strings; this function converts the string to a {@code long}
7774 * for you.
7775 * <p>
7776 * This version does not take a default value. If the setting has not
7777 * been set, or the string value is not a number,
7778 * it throws {@link SettingNotFoundException}.
7779 *
7780 * @param cr The ContentResolver to access.
7781 * @param name The name of the setting to retrieve.
7782 *
7783 * @return The setting's current value.
7784 * @throws SettingNotFoundException Thrown if a setting by the given
7785 * name can't be found or the setting value is not an integer.
7786 */
7787 public static long getLong(ContentResolver cr, String name)
7788 throws SettingNotFoundException {
7789 String valString = getString(cr, name);
7790 try {
7791 return Long.parseLong(valString);
7792 } catch (NumberFormatException e) {
7793 throw new SettingNotFoundException(name);
7794 }
7795 }
7796
7797 /**
7798 * Convenience function for updating a secure settings value as a long
7799 * integer. This will either create a new entry in the table if the
7800 * given name does not exist, or modify the value of the existing row
7801 * with that name. Note that internally setting values are always
7802 * stored as strings, so this function converts the given value to a
7803 * string before storing it.
7804 *
7805 * @param cr The ContentResolver to access.
7806 * @param name The name of the setting to modify.
7807 * @param value The new value for the setting.
7808 * @return true if the value was set, false on database errors
7809 */
7810 public static boolean putLong(ContentResolver cr, String name, long value) {
7811 return putString(cr, name, Long.toString(value));
7812 }
7813
7814 /**
7815 * Convenience function for retrieving a single secure settings value
7816 * as a floating point number. Note that internally setting values are
7817 * always stored as strings; this function converts the string to an
7818 * float for you. The default value will be returned if the setting
7819 * is not defined or not a valid float.
7820 *
7821 * @param cr The ContentResolver to access.
7822 * @param name The name of the setting to retrieve.
7823 * @param def Value to return if the setting is not defined.
7824 *
7825 * @return The setting's current value, or 'def' if it is not defined
7826 * or not a valid float.
7827 */
7828 public static float getFloat(ContentResolver cr, String name, float def) {
7829 String v = getString(cr, name);
7830 try {
7831 return v != null ? Float.parseFloat(v) : def;
7832 } catch (NumberFormatException e) {
7833 return def;
7834 }
7835 }
7836
7837 /**
7838 * Convenience function for retrieving a single secure settings value
7839 * as a float. Note that internally setting values are always
7840 * stored as strings; this function converts the string to a float
7841 * for you.
7842 * <p>
7843 * This version does not take a default value. If the setting has not
7844 * been set, or the string value is not a number,
7845 * it throws {@link SettingNotFoundException}.
7846 *
7847 * @param cr The ContentResolver to access.
7848 * @param name The name of the setting to retrieve.
7849 *
7850 * @throws SettingNotFoundException Thrown if a setting by the given
7851 * name can't be found or the setting value is not a float.
7852 *
7853 * @return The setting's current value.
7854 */
7855 public static float getFloat(ContentResolver cr, String name)
7856 throws SettingNotFoundException {
7857 String v = getString(cr, name);
7858 if (v == null) {
7859 throw new SettingNotFoundException(name);
7860 }
7861 try {
7862 return Float.parseFloat(v);
7863 } catch (NumberFormatException e) {
7864 throw new SettingNotFoundException(name);
7865 }
7866 }
7867
7868 /**
7869 * Convenience function for updating a single settings value as a
7870 * floating point number. This will either create a new entry in the
7871 * table if the given name does not exist, or modify the value of the
7872 * existing row with that name. Note that internally setting values
7873 * are always stored as strings, so this function converts the given
7874 * value to a string before storing it.
7875 *
7876 * @param cr The ContentResolver to access.
7877 * @param name The name of the setting to modify.
7878 * @param value The new value for the setting.
7879 * @return true if the value was set, false on database errors
7880 */
7881 public static boolean putFloat(ContentResolver cr, String name, float value) {
7882 return putString(cr, name, Float.toString(value));
7883 }
Wink Savillefb40dd42014-06-12 17:02:31 -07007884
7885
7886 /**
7887 * Subscription to be used for voice call on a multi sim device. The supported values
7888 * are 0 = SUB1, 1 = SUB2 and etc.
7889 * @hide
7890 */
7891 public static final String MULTI_SIM_VOICE_CALL_SUBSCRIPTION = "multi_sim_voice_call";
7892
7893 /**
7894 * Used to provide option to user to select subscription during dial.
7895 * The supported values are 0 = disable or 1 = enable prompt.
7896 * @hide
7897 */
7898 public static final String MULTI_SIM_VOICE_PROMPT = "multi_sim_voice_prompt";
7899
7900 /**
7901 * Subscription to be used for data call on a multi sim device. The supported values
7902 * are 0 = SUB1, 1 = SUB2 and etc.
7903 * @hide
7904 */
7905 public static final String MULTI_SIM_DATA_CALL_SUBSCRIPTION = "multi_sim_data_call";
7906
7907 /**
7908 * Subscription to be used for SMS on a multi sim device. The supported values
7909 * are 0 = SUB1, 1 = SUB2 and etc.
7910 * @hide
7911 */
7912 public static final String MULTI_SIM_SMS_SUBSCRIPTION = "multi_sim_sms";
7913
7914 /**
7915 * Used to provide option to user to select subscription during send SMS.
7916 * The value 1 - enable, 0 - disable
7917 * @hide
7918 */
7919 public static final String MULTI_SIM_SMS_PROMPT = "multi_sim_sms_prompt";
7920
7921
7922
7923 /** User preferred subscriptions setting.
7924 * This holds the details of the user selected subscription from the card and
7925 * the activation status. Each settings string have the coma separated values
7926 * iccId,appType,appId,activationStatus,3gppIndex,3gpp2Index
7927 * @hide
7928 */
7929 public static final String[] MULTI_SIM_USER_PREFERRED_SUBS = {"user_preferred_sub1",
7930 "user_preferred_sub2","user_preferred_sub3"};
Zheng Fub218ff42015-04-13 16:31:16 -07007931
7932 /**
7933 * Whether to enable new contacts aggregator or not.
7934 * The value 1 - enable, 0 - disable
7935 * @hide
7936 */
7937 public static final String NEW_CONTACT_AGGREGATOR = "new_contact_aggregator";
Zheng Fu31ce78c2015-04-15 16:57:53 -07007938
7939 /**
7940 * Whether to enable contacts metadata syncing or not
7941 * The value 1 - enable, 0 - disable
7942 * @hide
7943 */
7944 public static final String CONTACT_METADATA_SYNC = "contact_metadata_sync";
Christopher Tate06efb532012-08-24 15:29:27 -07007945 }
7946
7947 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08007948 * User-defined bookmarks and shortcuts. The target of each bookmark is an
7949 * Intent URL, allowing it to be either a web page or a particular
7950 * application activity.
7951 *
7952 * @hide
7953 */
7954 public static final class Bookmarks implements BaseColumns
7955 {
7956 private static final String TAG = "Bookmarks";
7957
7958 /**
7959 * The content:// style URL for this table
7960 */
7961 public static final Uri CONTENT_URI =
7962 Uri.parse("content://" + AUTHORITY + "/bookmarks");
7963
7964 /**
7965 * The row ID.
7966 * <p>Type: INTEGER</p>
7967 */
7968 public static final String ID = "_id";
7969
7970 /**
7971 * Descriptive name of the bookmark that can be displayed to the user.
7972 * If this is empty, the title should be resolved at display time (use
7973 * {@link #getTitle(Context, Cursor)} any time you want to display the
7974 * title of a bookmark.)
7975 * <P>
7976 * Type: TEXT
7977 * </P>
7978 */
7979 public static final String TITLE = "title";
7980
7981 /**
7982 * Arbitrary string (displayed to the user) that allows bookmarks to be
7983 * organized into categories. There are some special names for
7984 * standard folders, which all start with '@'. The label displayed for
7985 * the folder changes with the locale (via {@link #getLabelForFolder}) but
7986 * the folder name does not change so you can consistently query for
7987 * the folder regardless of the current locale.
7988 *
7989 * <P>Type: TEXT</P>
7990 *
7991 */
7992 public static final String FOLDER = "folder";
7993
7994 /**
7995 * The Intent URL of the bookmark, describing what it points to. This
7996 * value is given to {@link android.content.Intent#getIntent} to create
7997 * an Intent that can be launched.
7998 * <P>Type: TEXT</P>
7999 */
8000 public static final String INTENT = "intent";
8001
8002 /**
8003 * Optional shortcut character associated with this bookmark.
8004 * <P>Type: INTEGER</P>
8005 */
8006 public static final String SHORTCUT = "shortcut";
8007
8008 /**
8009 * The order in which the bookmark should be displayed
8010 * <P>Type: INTEGER</P>
8011 */
8012 public static final String ORDERING = "ordering";
8013
8014 private static final String[] sIntentProjection = { INTENT };
8015 private static final String[] sShortcutProjection = { ID, SHORTCUT };
8016 private static final String sShortcutSelection = SHORTCUT + "=?";
8017
8018 /**
8019 * Convenience function to retrieve the bookmarked Intent for a
8020 * particular shortcut key.
8021 *
8022 * @param cr The ContentResolver to query.
8023 * @param shortcut The shortcut key.
8024 *
8025 * @return Intent The bookmarked URL, or null if there is no bookmark
8026 * matching the given shortcut.
8027 */
8028 public static Intent getIntentForShortcut(ContentResolver cr, char shortcut)
8029 {
8030 Intent intent = null;
8031
8032 Cursor c = cr.query(CONTENT_URI,
8033 sIntentProjection, sShortcutSelection,
8034 new String[] { String.valueOf((int) shortcut) }, ORDERING);
8035 // Keep trying until we find a valid shortcut
8036 try {
8037 while (intent == null && c.moveToNext()) {
8038 try {
8039 String intentURI = c.getString(c.getColumnIndexOrThrow(INTENT));
Christian Mehlmauera34d2c92010-05-25 19:04:20 +02008040 intent = Intent.parseUri(intentURI, 0);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008041 } catch (java.net.URISyntaxException e) {
8042 // The stored URL is bad... ignore it.
8043 } catch (IllegalArgumentException e) {
8044 // Column not found
Dianne Hackborna33e3f72009-09-29 17:28:24 -07008045 Log.w(TAG, "Intent column not found", e);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008046 }
8047 }
8048 } finally {
8049 if (c != null) c.close();
8050 }
8051
8052 return intent;
8053 }
8054
8055 /**
8056 * Add a new bookmark to the system.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008057 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008058 * @param cr The ContentResolver to query.
8059 * @param intent The desired target of the bookmark.
8060 * @param title Bookmark title that is shown to the user; null if none
8061 * or it should be resolved to the intent's title.
8062 * @param folder Folder in which to place the bookmark; null if none.
8063 * @param shortcut Shortcut that will invoke the bookmark; 0 if none. If
8064 * this is non-zero and there is an existing bookmark entry
8065 * with this same shortcut, then that existing shortcut is
8066 * cleared (the bookmark is not removed).
8067 * @return The unique content URL for the new bookmark entry.
8068 */
8069 public static Uri add(ContentResolver cr,
8070 Intent intent,
8071 String title,
8072 String folder,
8073 char shortcut,
8074 int ordering)
8075 {
8076 // If a shortcut is supplied, and it is already defined for
8077 // another bookmark, then remove the old definition.
8078 if (shortcut != 0) {
Jeff Hamilton7cd51ef2010-05-12 17:30:27 -05008079 cr.delete(CONTENT_URI, sShortcutSelection,
8080 new String[] { String.valueOf((int) shortcut) });
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008081 }
8082
8083 ContentValues values = new ContentValues();
8084 if (title != null) values.put(TITLE, title);
8085 if (folder != null) values.put(FOLDER, folder);
Jean-Baptiste Queru3b9f0a32010-06-21 13:46:59 -07008086 values.put(INTENT, intent.toUri(0));
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008087 if (shortcut != 0) values.put(SHORTCUT, (int) shortcut);
8088 values.put(ORDERING, ordering);
8089 return cr.insert(CONTENT_URI, values);
8090 }
8091
8092 /**
8093 * Return the folder name as it should be displayed to the user. This
8094 * takes care of localizing special folders.
8095 *
8096 * @param r Resources object for current locale; only need access to
8097 * system resources.
8098 * @param folder The value found in the {@link #FOLDER} column.
8099 *
8100 * @return CharSequence The label for this folder that should be shown
8101 * to the user.
8102 */
8103 public static CharSequence getLabelForFolder(Resources r, String folder) {
8104 return folder;
8105 }
8106
8107 /**
8108 * Return the title as it should be displayed to the user. This takes
8109 * care of localizing bookmarks that point to activities.
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008110 *
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008111 * @param context A context.
8112 * @param cursor A cursor pointing to the row whose title should be
8113 * returned. The cursor must contain at least the {@link #TITLE}
8114 * and {@link #INTENT} columns.
8115 * @return A title that is localized and can be displayed to the user,
8116 * or the empty string if one could not be found.
8117 */
8118 public static CharSequence getTitle(Context context, Cursor cursor) {
8119 int titleColumn = cursor.getColumnIndex(TITLE);
8120 int intentColumn = cursor.getColumnIndex(INTENT);
8121 if (titleColumn == -1 || intentColumn == -1) {
8122 throw new IllegalArgumentException(
8123 "The cursor must contain the TITLE and INTENT columns.");
8124 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008125
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008126 String title = cursor.getString(titleColumn);
8127 if (!TextUtils.isEmpty(title)) {
8128 return title;
8129 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008130
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008131 String intentUri = cursor.getString(intentColumn);
8132 if (TextUtils.isEmpty(intentUri)) {
8133 return "";
8134 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008135
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008136 Intent intent;
8137 try {
Christian Mehlmauera34d2c92010-05-25 19:04:20 +02008138 intent = Intent.parseUri(intentUri, 0);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008139 } catch (URISyntaxException e) {
8140 return "";
8141 }
Jaikumar Ganesh9bfbfbd2009-05-15 12:05:56 -07008142
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008143 PackageManager packageManager = context.getPackageManager();
8144 ResolveInfo info = packageManager.resolveActivity(intent, 0);
8145 return info != null ? info.loadLabel(packageManager) : "";
8146 }
8147 }
8148
8149 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008150 * Returns the device ID that we should use when connecting to the mobile gtalk server.
8151 * This is a string like "android-0x1242", where the hex string is the Android ID obtained
8152 * from the GoogleLoginService.
8153 *
8154 * @param androidId The Android ID for this device.
8155 * @return The device ID that should be used when connecting to the mobile gtalk server.
8156 * @hide
8157 */
8158 public static String getGTalkDeviceId(long androidId) {
8159 return "android-" + Long.toHexString(androidId);
8160 }
8161}