Linkproperties update via unsol data call state change.
Handles the scenario of radio technology handover with IP continuity.
Once RIL/Modem finished a handover operation, an unsol data call state
change will be send up to FW notifying all link propertes changes.
FW will then re-configure the device with new link properties
including iptable used by Tethering.
Change-Id: I05e29f66ac3db8ba4274d3662642607742ba1d12
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 9bc7a9f..f88b188 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -1391,6 +1391,12 @@
} else {
addPrivateDnsRoutes(mNetTrackers[netType]);
}
+
+ /** Notify TetheringService if interface name has been changed. */
+ if (TextUtils.equals(mNetTrackers[netType].getNetworkInfo().getReason(),
+ Phone.REASON_LINK_PROPERTIES_CHANGED)) {
+ handleTetherIfaceChange(netType);
+ }
} else {
if (mNetConfigs[netType].isDefault()) {
removeDefaultRoute(mNetTrackers[netType]);
@@ -2203,6 +2209,14 @@
}
}
+ private void handleTetherIfaceChange(int type) {
+ String iface = mNetTrackers[type].getLinkProperties().getInterfaceName();
+
+ if (isTetheringSupported()) {
+ mTethering.handleTetherIfaceChange(iface);
+ }
+ }
+
private void log(String s) {
Slog.d(TAG, s);
}