Upon changing the default SIM card, the radio will create a
new connection to the new subscription. If that subscription
works correctly, the stack will prefer it to the old one as
the new subscription will be marked with a Primary policy
flag it its score.
Normally, at this point the old network lingers to give apps
an opportunity to gracefully migrate their connections. But
with some radios, this may have a dramatic effect on the
performance of the new connection.
This patch introduces a flag so that devices with such radios
can be marked. In this case the stack will move to a degraded
mode and eschew the grace delay for apps and give them a hard
break instead, so that the new network can reach a good
performance immediately. Apps with existing connections will
suffer a worse experience.
If there is a request that can only be served by the old
connection, still keep it, as arguably the user still
expects their MMS be sent on the old connection, even if the
new connection doesn't work well until it's done.
Test: new test in this patch, and add relevant tests in both modes
also manually change the value of the flag and run
FrameworksNetTests and CtsNetTestCasesLatestSdk
Bug: 200226979
Change-Id: I4ace82f90e873bf06298cc689bb1d794ed5124bd
140 lines
7.2 KiB
XML
140 lines
7.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
~ Copyright (C) 2021 The Android Open Source Project
|
|
~
|
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
~ you may not use this file except in compliance with the License.
|
|
~ You may obtain a copy of the License at
|
|
~
|
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
~
|
|
~ Unless required by applicable law or agreed to in writing, software
|
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
~ See the License for the specific language governing permissions and
|
|
~ limitations under the License.
|
|
-->
|
|
|
|
<!-- Configuration values for ConnectivityService
|
|
DO NOT EDIT THIS FILE for specific device configuration; instead, use a Runtime Resources
|
|
Overlay package following the overlayable.xml configuration in the same directory:
|
|
https://source.android.com/devices/architecture/rros -->
|
|
<resources>
|
|
|
|
<!-- Configuration hook for the URL returned by ConnectivityManager#getCaptivePortalServerUrl.
|
|
If empty, the returned value is controlled by Settings.Global.CAPTIVE_PORTAL_HTTP_URL,
|
|
and if that value is empty, the framework will use a hard-coded default.
|
|
This is *NOT* a URL that will always be used by the system network validation to detect
|
|
captive portals: NetworkMonitor may use different strategies and will not necessarily use
|
|
this URL. NetworkMonitor behaviour should be configured with NetworkStack resource overlays
|
|
instead. -->
|
|
<!--suppress CheckTagEmptyBody -->
|
|
<string translatable="false" name="config_networkCaptivePortalServerUrl"></string>
|
|
|
|
<!-- The maximum duration (in milliseconds) we expect a network transition to take -->
|
|
<integer name="config_networkTransitionTimeout">60000</integer>
|
|
|
|
<!-- Configuration of network interfaces that support WakeOnLAN -->
|
|
<string-array translatable="false" name="config_wakeonlan_supported_interfaces">
|
|
<!--
|
|
<item>wlan0</item>
|
|
<item>eth0</item>
|
|
-->
|
|
</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>
|
|
|
|
<!-- Default supported concurrent socket keepalive slots per transport type, used by
|
|
ConnectivityManager.createSocketKeepalive() for calculating the number of keepalive
|
|
offload slots that should be reserved for privileged access. This string array should be
|
|
overridden by the device to present the capability of creating socket keepalives. -->
|
|
<!-- An Array of "[NetworkCapabilities.TRANSPORT_*],[supported keepalives] -->
|
|
<string-array translatable="false" name="config_networkSupportedKeepaliveCount">
|
|
<item>0,1</item>
|
|
<item>1,3</item>
|
|
</string-array>
|
|
|
|
<!-- Reserved privileged keepalive slots per transport. -->
|
|
<integer translatable="false" name="config_reservedPrivilegedKeepaliveSlots">2</integer>
|
|
|
|
<!-- Allowed unprivileged keepalive slots per uid. -->
|
|
<integer translatable="false" name="config_allowedUnprivilegedKeepalivePerUid">2</integer>
|
|
|
|
<!-- Default value for ConnectivityManager.getMultipathPreference() on metered networks. Actual
|
|
device behaviour is controlled by the metered multipath preference in
|
|
ConnectivitySettingsManager. This is the default value of that setting. -->
|
|
<integer translatable="false" name="config_networkMeteredMultipathPreference">0</integer>
|
|
|
|
<!-- Whether the device should automatically switch away from Wi-Fi networks that lose
|
|
Internet access. Actual device behaviour is controlled by
|
|
Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
|
|
<integer translatable="false" name="config_networkAvoidBadWifi">1</integer>
|
|
|
|
<!-- Array of ConnectivityManager.TYPE_xxxx constants for networks that may only
|
|
be controlled by systemOrSignature apps. -->
|
|
<integer-array translatable="false" name="config_protectedNetworks">
|
|
<item>10</item>
|
|
<item>11</item>
|
|
<item>12</item>
|
|
<item>14</item>
|
|
<item>15</item>
|
|
</integer-array>
|
|
|
|
<!-- Whether the internal vehicle network should remain active even when no
|
|
apps requested it. -->
|
|
<bool name="config_vehicleInternalNetworkAlwaysRequested">false</bool>
|
|
|
|
|
|
<!-- If the hardware supports specially marking packets that caused a wakeup of the
|
|
main CPU, set this value to the mark used. -->
|
|
<integer name="config_networkWakeupPacketMark">0</integer>
|
|
|
|
<!-- Mask to use when checking skb mark defined in config_networkWakeupPacketMark above. -->
|
|
<integer name="config_networkWakeupPacketMask">0</integer>
|
|
|
|
<!-- Whether/how to notify the user on network switches. See LingerMonitor.java. -->
|
|
<integer translatable="false" name="config_networkNotifySwitchType">0</integer>
|
|
|
|
<!-- What types of network switches to notify. See LingerMonitor.java. -->
|
|
<string-array translatable="false" name="config_networkNotifySwitches">
|
|
</string-array>
|
|
|
|
<!-- Whether to use an ongoing notification for signing in to captive portals, instead of a
|
|
notification that can be dismissed. -->
|
|
<bool name="config_ongoingSignInNotification">false</bool>
|
|
|
|
<!-- Whether to cancel network notifications automatically when tapped -->
|
|
<bool name="config_autoCancelNetworkNotifications">true</bool>
|
|
|
|
<!-- When no internet or partial connectivity is detected on a network, and a high priority
|
|
(heads up) notification would be shown due to the network being explicitly selected,
|
|
directly show the dialog that would normally be shown when tapping the notification
|
|
instead of showing the notification. -->
|
|
<bool name="config_notifyNoInternetAsDialogWhenHighPriority">false</bool>
|
|
|
|
<!-- When showing notifications indicating partial connectivity, display the same notifications
|
|
as no connectivity instead. This may be easier to understand for users but offers less
|
|
details on what is happening. -->
|
|
<bool name="config_partialConnectivityNotifiedAsNoInternet">false</bool>
|
|
|
|
<!-- Whether the cell radio of the device is capable of timesharing.
|
|
|
|
Whether the cell radio is capable of timesharing between two different networks
|
|
even for a few seconds. When this is false, the networking stack will ask telephony
|
|
networks to disconnect immediately, instead of lingering, when outscored by some
|
|
other telephony network (typically on another subscription). This deprives apps
|
|
of a chance to gracefully migrate to the new network and degrades the experience
|
|
for apps, so it should only be set to false when timesharing on the cell radio has
|
|
extreme adverse effects on performance of the new network.
|
|
-->
|
|
<bool translatable="false" name="config_cellular_radio_timesharing_capable">true</bool>
|
|
</resources>
|