Fix for multi-apn MMS access. am: 4666ed0e7e

Original change: undetermined

Change-Id: I8440496ba727b5be5c3128bb683829c4ca3b1347
This commit is contained in:
Robert Greenwalt
2021-05-31 10:26:14 +00:00
committed by Automerger Merge Worker
2 changed files with 8 additions and 14 deletions

View File

@@ -131,7 +131,7 @@ public class NetworkInfo implements Parcelable {
mSubtypeName = subtypeName;
setDetailedState(DetailedState.IDLE, null, null);
mState = State.UNKNOWN;
mIsAvailable = true;
mIsAvailable = false; // until we're told otherwise, assume unavailable
mIsRoaming = false;
}

View File

@@ -640,20 +640,14 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return false;
}
NetworkStateTracker tracker = mNetTrackers[networkType];
/*
* If there's only one connected network, and it's the one requested,
* then we don't have to do anything - the requested route already
* exists. If it's not the requested network, then it's not possible
* to establish the requested route. Finally, if there is more than
* one connected network, then we must insert an entry in the routing
* table.
*/
if (getNumConnectedNetworks() > 1) {
return tracker.requestRouteToHost(hostAddress);
} else {
return (mNetAttributes[networkType].isDefault() &&
tracker.getNetworkInfo().isConnected());
if (!tracker.getNetworkInfo().isConnected() || tracker.isTeardownRequested()) {
if (DBG) {
Log.d(TAG, "requestRouteToHost on down network (" + networkType + " - dropped");
}
return false;
}
return tracker.requestRouteToHost(hostAddress);
}
/**