Fix various issues found when testing Mms.
Fix some race conditions (check isTeardownRequested). Fix the passing of mInterfaceName to subtypes (mms, etc). Fix the generation of CONNECTED message to already active subtypes. Fix the enabling of Data in DataConnectionTracker. bug: 2065037
This commit is contained in:
@@ -513,7 +513,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
mNetRequestersPids[usedNetworkType].add(currentPid);
|
||||
}
|
||||
|
||||
if (ni.isConnectedOrConnecting() == true) {
|
||||
if ((ni.isConnectedOrConnecting() == true) &&
|
||||
!network.isTeardownRequested()) {
|
||||
if (ni.isConnected() == true) {
|
||||
// add the pid-specific dns
|
||||
handleDnsConfigurationChange();
|
||||
@@ -686,6 +687,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
++numConnectedNets;
|
||||
}
|
||||
}
|
||||
if (DBG) Log.d(TAG, "numConnectedNets returning "+numConnectedNets);
|
||||
return numConnectedNets;
|
||||
}
|
||||
|
||||
@@ -792,7 +794,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
if (newNet.isAvailable()) {
|
||||
NetworkInfo switchTo = newNet.getNetworkInfo();
|
||||
switchTo.setFailover(true);
|
||||
if (!switchTo.isConnectedOrConnecting()) {
|
||||
if (!switchTo.isConnectedOrConnecting() ||
|
||||
newNet.isTeardownRequested()) {
|
||||
newNet.reconnect();
|
||||
}
|
||||
if (DBG) {
|
||||
|
||||
Reference in New Issue
Block a user