From 3a34041f8027bf15cb2653c1a46146b605dbb702 Mon Sep 17 00:00:00 2001 From: Kazuhiro Ondo Date: Sat, 30 Apr 2011 20:10:57 -0500 Subject: [PATCH] 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 --- .../com/android/server/ConnectivityService.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index 9bc7a9f568..f88b1888db 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -1391,6 +1391,12 @@ public class ConnectivityService extends IConnectivityManager.Stub { } 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 @@ public class ConnectivityService extends IConnectivityManager.Stub { } } + 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); }