Remove usage of networkAttributes

networkAttributes is a legacy configuration that is now only used to
configure which legacy type networks are supported, and what the restore
timer is for that network type, for the deprecated
startUsingNetworkFeature API.

Use a dedicated resource for the restore timers, and build supported
legacy network types using hasSystemFeature for wifi, wifi p2p,
bluetooth, proxy types, and TelephonyManager.isDataCapable for the
mobile types.

Bug: 146206136
Test: atest FrameworksNetTests
Change-Id: I3a771d3de6c5e912f18d2834e3a50af797ac4991
This commit is contained in:
Remi NGUYEN VAN 2021-03-09 13:35:25 +09:00
commit 5f161d22cd
2 changed files with 11 additions and 1 deletions

View file

@ -42,4 +42,14 @@
-->
</string-array>
<string-array translatable="false" name="config_legacy_networktype_restore_timers">
<item>2,60000</item><!-- mobile_mms -->
<item>3,60000</item><!-- mobile_supl -->
<item>4,60000</item><!-- mobile_dun -->
<item>5,60000</item><!-- mobile_hipri -->
<item>10,60000</item><!-- mobile_fota -->
<item>11,60000</item><!-- mobile_ims -->
<item>12,60000</item><!-- mobile_cbs -->
</string-array>
</resources>

View file

@ -17,11 +17,11 @@
<overlayable name="ServiceConnectivityResourcesConfig">
<policy type="product|system|vendor">
<!-- Configuration values for ConnectivityService -->
<item type="array" name="config_legacy_networktype_restore_timers"/>
<item type="string" name="config_networkCaptivePortalServerUrl"/>
<item type="integer" name="config_networkTransitionTimeout"/>
<item type="array" name="config_wakeonlan_supported_interfaces"/>
</policy>
</overlayable>
</resources>