Fix for multi-apn MMS access.
Mark cellular variants with the same availability, regardless of which are currently in use. Availability just means the radio is enabled and sees the network, but has no guarantees that we could connect to an APN if requested. Fix the requestRouteToHost logic to support apn switches without WIFI. bug:2093841
This commit is contained in:
@@ -131,7 +131,7 @@ public class NetworkInfo implements Parcelable {
|
|||||||
mSubtypeName = subtypeName;
|
mSubtypeName = subtypeName;
|
||||||
setDetailedState(DetailedState.IDLE, null, null);
|
setDetailedState(DetailedState.IDLE, null, null);
|
||||||
mState = State.UNKNOWN;
|
mState = State.UNKNOWN;
|
||||||
mIsAvailable = true;
|
mIsAvailable = false; // until we're told otherwise, assume unavailable
|
||||||
mIsRoaming = false;
|
mIsRoaming = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -640,20 +640,14 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
NetworkStateTracker tracker = mNetTrackers[networkType];
|
NetworkStateTracker tracker = mNetTrackers[networkType];
|
||||||
/*
|
|
||||||
* If there's only one connected network, and it's the one requested,
|
if (!tracker.getNetworkInfo().isConnected() || tracker.isTeardownRequested()) {
|
||||||
* then we don't have to do anything - the requested route already
|
if (DBG) {
|
||||||
* exists. If it's not the requested network, then it's not possible
|
Log.d(TAG, "requestRouteToHost on down network (" + networkType + " - dropped");
|
||||||
* 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());
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return tracker.requestRouteToHost(hostAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user