Skip to content

Commit b32e221

Browse files
Jeff BrownAndroid (Google) Code Review
authored andcommitted
Merge changes I332f020f,I632648ac into jb-mr1-dev
* changes: Update references to migrated global settings. Handle user switched for settings changes.
2 parents 0a52088 + bf6f6f9 commit b32e221

27 files changed

+253
-187
lines changed

api/current.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18907,7 +18907,7 @@ package android.provider {
1890718907
field public static final deprecated java.lang.String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
1890818908
field public static final deprecated java.lang.String USE_GOOGLE_MAIL = "use_google_mail";
1890918909
field public static final deprecated java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
18910-
field public static final java.lang.String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = "wifi_mobile_data_transition_wakelock_timeout_ms";
18910+
field public static final deprecated java.lang.String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = "wifi_mobile_data_transition_wakelock_timeout_ms";
1891118911
field public static final deprecated java.lang.String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = "wifi_networks_available_notification_on";
1891218912
field public static final deprecated java.lang.String WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY = "wifi_networks_available_repeat_delay";
1891318913
field public static final deprecated java.lang.String WIFI_NUM_OPEN_NETWORKS_KEPT = "wifi_num_open_networks_kept";

core/java/android/app/DownloadManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,8 +1098,8 @@ public void restartDownload(long... ids) {
10981098
*/
10991099
public static Long getMaxBytesOverMobile(Context context) {
11001100
try {
1101-
return Settings.Secure.getLong(context.getContentResolver(),
1102-
Settings.Secure.DOWNLOAD_MAX_BYTES_OVER_MOBILE);
1101+
return Settings.Global.getLong(context.getContentResolver(),
1102+
Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE);
11031103
} catch (SettingNotFoundException exc) {
11041104
return null;
11051105
}
@@ -1116,8 +1116,8 @@ public static Long getMaxBytesOverMobile(Context context) {
11161116
*/
11171117
public static Long getRecommendedMaxBytesOverMobile(Context context) {
11181118
try {
1119-
return Settings.Secure.getLong(context.getContentResolver(),
1120-
Settings.Secure.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE);
1119+
return Settings.Global.getLong(context.getContentResolver(),
1120+
Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE);
11211121
} catch (SettingNotFoundException exc) {
11221122
return null;
11231123
}

core/java/android/provider/Settings.java

Lines changed: 70 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3563,7 +3563,8 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
35633563
public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
35643564
Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON;
35653565
/**
3566-
* @deprecated Moved to Global namespace
3566+
* @deprecated Use {@link android.provider.Settings.Global#WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON}
3567+
* instead.
35673568
* {@hide}
35683569
*/
35693570
@Deprecated
@@ -3608,7 +3609,8 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
36083609
* the user turns off tethering.
36093610
*
36103611
* @hide
3611-
* @deprecated moved to Global
3612+
* @deprecated Use {@link android.provider.Settings.Global#WIFI_SAVED_STATE}
3613+
* instead.
36123614
*/
36133615
@Deprecated
36143616
public static final String WIFI_SAVED_STATE = Global.WIFI_SAVED_STATE;
@@ -3637,6 +3639,7 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
36373639
/**
36383640
* The acceptable packet loss percentage (range 0 - 100) before trying
36393641
* another AP on the same network.
3642+
* @deprecated This setting is not used.
36403643
*/
36413644
@Deprecated
36423645
public static final String WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE =
@@ -3645,12 +3648,14 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
36453648
/**
36463649
* The number of access points required for a network in order for the
36473650
* watchdog to monitor it.
3651+
* @deprecated This setting is not used.
36483652
*/
36493653
@Deprecated
36503654
public static final String WIFI_WATCHDOG_AP_COUNT = "wifi_watchdog_ap_count";
36513655

36523656
/**
36533657
* The delay between background checks.
3658+
* @deprecated This setting is not used.
36543659
*/
36553660
@Deprecated
36563661
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS =
@@ -3659,13 +3664,15 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
36593664
/**
36603665
* Whether the Wi-Fi watchdog is enabled for background checking even
36613666
* after it thinks the user has connected to a good access point.
3667+
* @deprecated This setting is not used.
36623668
*/
36633669
@Deprecated
36643670
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED =
36653671
"wifi_watchdog_background_check_enabled";
36663672

36673673
/**
36683674
* The timeout for a background ping
3675+
* @deprecated This setting is not used.
36693676
*/
36703677
@Deprecated
36713678
public static final String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS =
@@ -3676,6 +3683,7 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
36763683
* fail. Again, if these fail, they will *not* be used in packet loss
36773684
* calculation. For example, one network always seemed to time out for
36783685
* the first couple pings, so this is set to 3 by default.
3686+
* @deprecated This setting is not used.
36793687
*/
36803688
@Deprecated
36813689
public static final String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT =
@@ -3686,6 +3694,7 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
36863694
* If this number is reached, the watchdog will no longer monitor the
36873695
* initial connection state for the network. This is a safeguard for
36883696
* networks containing multiple APs whose DNS does not respond to pings.
3697+
* @deprecated This setting is not used.
36893698
*/
36903699
@Deprecated
36913700
public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks";
@@ -3697,60 +3706,73 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
36973706

36983707
/**
36993708
* A comma-separated list of SSIDs for which the Wi-Fi watchdog should be enabled.
3709+
* @deprecated This setting is not used.
37003710
*/
37013711
@Deprecated
37023712
public static final String WIFI_WATCHDOG_WATCH_LIST = "wifi_watchdog_watch_list";
37033713

37043714
/**
37053715
* The number of pings to test if an access point is a good connection.
3716+
* @deprecated This setting is not used.
37063717
*/
37073718
@Deprecated
37083719
public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
37093720

37103721
/**
37113722
* The delay between pings.
3723+
* @deprecated This setting is not used.
37123724
*/
37133725
@Deprecated
37143726
public static final String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms";
37153727

37163728
/**
37173729
* The timeout per ping.
3730+
* @deprecated This setting is not used.
37183731
*/
37193732
@Deprecated
37203733
public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms";
37213734

37223735
/**
37233736
* ms delay before rechecking an 'online' wifi connection when it is thought to be unstable.
3737+
* @deprecated This setting is not used.
37243738
* @hide
37253739
*/
3740+
@Deprecated
37263741
public static final String WIFI_WATCHDOG_ARP_CHECK_INTERVAL_MS =
37273742
"wifi_watchdog_arp_interval_ms";
37283743

37293744
/**
37303745
* ms delay interval between rssi polling when the signal is known to be weak
3746+
* @deprecated This setting is not used.
37313747
* @hide
37323748
*/
3749+
@Deprecated
37333750
public static final String WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS =
37343751
"wifi_watchdog_rssi_fetch_interval_ms";
37353752

3736-
37373753
/**
37383754
* Number of ARP pings per check.
3755+
* @deprecated This setting is not used.
37393756
* @hide
37403757
*/
3758+
@Deprecated
37413759
public static final String WIFI_WATCHDOG_NUM_ARP_PINGS = "wifi_watchdog_num_arp_pings";
37423760

37433761
/**
37443762
* Minimum number of responses to the arp pings to consider the test 'successful'.
3763+
* @deprecated This setting is not used.
37453764
* @hide
37463765
*/
3766+
@Deprecated
37473767
public static final String WIFI_WATCHDOG_MIN_ARP_RESPONSES =
37483768
"wifi_watchdog_min_arp_responses";
37493769

37503770
/**
37513771
* Timeout on ARP pings
3772+
* @deprecated This setting is not used.
37523773
* @hide
37533774
*/
3775+
@Deprecated
37543776
public static final String WIFI_WATCHDOG_ARP_PING_TIMEOUT_MS =
37553777
"wifi_watchdog_arp_ping_timeout_ms";
37563778

@@ -3809,11 +3831,11 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
38093831
public static final String CAPTIVE_PORTAL_SERVER = "captive_portal_server";
38103832

38113833
/**
3812-
* Maximum amount of time in milliseconds to hold a wakelock while waiting for mobile
3813-
* data connectivity to be established after a disconnect from Wi-Fi.
3834+
* @deprecated Use
3835+
* {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead
38143836
*/
38153837
public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS =
3816-
"wifi_mobile_data_transition_wakelock_timeout_ms";
3838+
Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS;
38173839

38183840
/**
38193841
* Whether network service discovery is enabled.
@@ -4158,16 +4180,6 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
41584180
public static final String ERROR_LOGCAT_PREFIX =
41594181
"logcat_for_";
41604182

4161-
4162-
/**
4163-
* Screen timeout in milliseconds corresponding to the
4164-
* PowerManager's POKE_LOCK_SHORT_TIMEOUT flag (i.e. the fastest
4165-
* possible screen timeout behavior.)
4166-
* @hide
4167-
*/
4168-
public static final String SHORT_KEYLIGHT_DELAY_MS =
4169-
"short_keylight_delay_ms";
4170-
41714183
/**
41724184
* The interval in minutes after which the amount of free storage left on the
41734185
* device is logged to the event log
@@ -4220,7 +4232,8 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
42204232
* When idle, it is possible for the device to be switched from Wi-Fi to
42214233
* the mobile data network.
42224234
* @hide
4223-
* @deprecated Moved to Global
4235+
* @deprecated Use {@link android.provider.Settings.Global#WIFI_IDLE_MS}
4236+
* instead.
42244237
*/
42254238
@Deprecated
42264239
public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS;
@@ -4230,7 +4243,8 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
42304243
* to connect. This is necessary to connect to an access point when
42314244
* device is on the move and the screen is off.
42324245
* @hide
4233-
* @deprecated Moved to Global
4246+
* @deprecated Use {@link android.provider.Settings.Global#WIFI_FRAMEWORK_SCAN_INTERVAL_MS}
4247+
* instead.
42344248
*/
42354249
@Deprecated
42364250
public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS =
@@ -4239,78 +4253,88 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
42394253
/**
42404254
* The interval in milliseconds to scan as used by the wifi supplicant
42414255
* @hide
4242-
* @deprecated Moved to Global
4256+
* @deprecated Use {@link android.provider.Settings.Global#WIFI_SUPPLICANT_SCAN_INTERVAL_MS}
4257+
* instead.
42434258
*/
42444259
@Deprecated
42454260
public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS =
42464261
Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS;
42474262

42484263
/**
4249-
* @deprecated Moved to Settings.Global
4264+
* @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_POLL_INTERVAL_MS}
4265+
* instead.
42504266
* @hide
42514267
*/
42524268
@Deprecated
42534269
public static final String PDP_WATCHDOG_POLL_INTERVAL_MS =
42544270
Global.PDP_WATCHDOG_POLL_INTERVAL_MS;
42554271

42564272
/**
4257-
* @deprecated Moved to Settings.Global
4273+
* @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_LONG_POLL_INTERVAL_MS}
4274+
* instead.
42584275
* @hide
42594276
*/
42604277
@Deprecated
42614278
public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS =
42624279
Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS;
42634280

42644281
/**
4265-
* @deprecated Moved to Settings.Global
4282+
* @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS}
4283+
* instead.
42664284
* @hide
42674285
*/
42684286
@Deprecated
42694287
public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS =
42704288
Global.PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS;
42714289

42724290
/**
4273-
* @deprecated Moved to Settings.Global
4291+
* @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_TRIGGER_PACKET_COUNT}
4292+
* instead.
42744293
* @hide
42754294
*/
42764295
@Deprecated
42774296
public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT =
42784297
Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT;
42794298

42804299
/**
4281-
* @deprecated Moved to Settings.Global
4300+
* @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_ERROR_POLL_COUNT}
4301+
* instead.
42824302
* @hide
42834303
*/
42844304
@Deprecated
42854305
public static final String PDP_WATCHDOG_ERROR_POLL_COUNT =
42864306
Global.PDP_WATCHDOG_ERROR_POLL_COUNT;
42874307

42884308
/**
4289-
* @deprecated Moved to Settings.Global
4309+
* @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT}
4310+
* instead.
42904311
* @hide
42914312
*/
42924313
@Deprecated
42934314
public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT =
42944315
Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT;
42954316

42964317
/**
4297-
* @deprecated Moved to Settings.Global
4318+
* @deprecated Use {@link android.provider.Settings.Global#DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS}
4319+
* instead.
42984320
* @hide
42994321
*/
43004322
@Deprecated
43014323
public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS =
43024324
Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS;
43034325

43044326
/**
4305-
* @deprecated Moved to Settings.Global
4327+
* @deprecated Use {@link android.provider.Settings.Global#DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS}
4328+
* instead.
43064329
* @hide
43074330
*/
43084331
@Deprecated
43094332
public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS =
43104333
Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS;
43114334

43124335
/**
4313-
* @deprecated Moved to Settings.Global
4336+
* @deprecated Use {@link android.provider.Settings.Global#GPRS_REGISTER_CHECK_PERIOD_MS}
4337+
* instead.
43144338
* @hide
43154339
*/
43164340
@Deprecated
@@ -4850,25 +4874,6 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
48504874
public static final String CONTACTS_PREAUTH_URI_EXPIRATION =
48514875
"contacts_preauth_uri_expiration";
48524876

4853-
/**
4854-
* Overlay display devices setting.
4855-
* The associated value is a specially formatted string that describes the
4856-
* size and density of simulated secondary display devices.
4857-
* <p>
4858-
* Format: {width}x{height}/{dpi};...
4859-
* </p><p>
4860-
* Example:
4861-
* <ul>
4862-
* <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li>
4863-
* <li><code>1920x1080/320;1280x720/213</code>: make two overlays, the first
4864-
* at 1080p and the second at 720p.</li>
4865-
* <li>If the value is empty, then no overlay display devices are created.</li>
4866-
* </ul></p>
4867-
*
4868-
* @hide
4869-
*/
4870-
public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices";
4871-
48724877
/**
48734878
* This are the settings to be backed up.
48744879
*
@@ -5741,6 +5746,24 @@ public static final class Global extends NameValueTable {
57415746
*/
57425747
public static final String MODE_RINGER = "mode_ringer";
57435748

5749+
/**
5750+
* Overlay display devices setting.
5751+
* The associated value is a specially formatted string that describes the
5752+
* size and density of simulated secondary display devices.
5753+
* <p>
5754+
* Format: {width}x{height}/{dpi};...
5755+
* </p><p>
5756+
* Example:
5757+
* <ul>
5758+
* <li><code>1280x720/213</code>: make one overlay that is 1280x720 at 213dpi.</li>
5759+
* <li><code>1920x1080/320;1280x720/213</code>: make two overlays, the first
5760+
* at 1080p and the second at 720p.</li>
5761+
* <li>If the value is empty, then no overlay display devices are created.</li>
5762+
* </ul></p>
5763+
*
5764+
* @hide
5765+
*/
5766+
public static final String OVERLAY_DISPLAY_DEVICES = "overlay_display_devices";
57445767

57455768
// Populated lazily, guarded by class object:
57465769
private static NameValueCache sNameValueCache = new NameValueCache(

core/java/android/webkit/JniUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ private static synchronized String getAutofillQueryUrl() {
173173
checkInitialized();
174174
// If the device has not checked in it won't have pulled down the system setting for the
175175
// Autofill Url. In that case we will not make autofill server requests.
176-
return Settings.Secure.getString(sContext.getContentResolver(),
177-
Settings.Secure.WEB_AUTOFILL_QUERY_URL);
176+
return Settings.Global.getString(sContext.getContentResolver(),
177+
Settings.Global.WEB_AUTOFILL_QUERY_URL);
178178
}
179179

180180
private static boolean canSatisfyMemoryAllocation(long bytesRequested) {

0 commit comments

Comments
 (0)