Set and clear the default network.

Change-Id: I305951e0c4735d708804baa597cc2d9b10f501c0
This commit is contained in:
Sreeram Ramachandran
2014-04-15 16:35:19 -07:00
committed by Lorenzo Colitti
parent e54dc09048
commit a5c33ff4f2

View File

@@ -2120,6 +2120,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
log("tryFailover: set mActiveDefaultNetwork=-1, prevNetType=" + prevNetType);
}
mActiveDefaultNetwork = -1;
try {
mNetd.clearDefaultNetId();
} catch (Exception e) {
loge("Exception clearing default network :" + e);
}
}
// don't signal a reconnect for anything lower or equal priority than our
@@ -2423,6 +2428,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
}
mActiveDefaultNetwork = newNetType;
try {
mNetd.setDefaultNetId(thisNetId);
} catch (Exception e) {
loge("Exception setting default network :" + e);
}
// this will cause us to come up initially as unconnected and switching
// to connected after our normal pause unless somebody reports us as reall
// disconnected