From 8206ff30c23c76851bebc8d72a65e65b0f7f9a29 Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Thu, 10 Sep 2009 15:06:20 -0700 Subject: 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 --- core/java/android/net/MobileDataStateTracker.java | 8 +++++--- core/java/android/net/NetworkInfo.java | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'core/java') diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java index f88fcdc..d8db4c1 100644 --- a/core/java/android/net/MobileDataStateTracker.java +++ b/core/java/android/net/MobileDataStateTracker.java @@ -145,12 +145,14 @@ public class MobileDataStateTracker extends NetworkStateTracker { if (DBG) Log.d(TAG, mApnType + " Received " + intent.getAction() + " broadcast - state = " + state + ", oldstate = " + mMobileDataState + ", unavailable = " + unavailable + ", reason = " + - (reason == null ? "(unspecified)" : reason)); + (reason == null ? "(unspecified)" : reason) + + ", apnTypeList = " + apnTypeList); + // set this regardless of the apnTypeList. It's all the same radio/network + // underneath + mNetworkInfo.setIsAvailable(!unavailable); if (isApnTypeIncluded(apnTypeList)) { - // set this even if the apn isn't Enabled - mNetworkInfo.setIsAvailable(!unavailable); if (mEnabled == false) { // if we're not enabled but the APN Type is supported by this connection // we should record the interface name if one's provided. If the user diff --git a/core/java/android/net/NetworkInfo.java b/core/java/android/net/NetworkInfo.java index 9f53937..649cb8c 100644 --- a/core/java/android/net/NetworkInfo.java +++ b/core/java/android/net/NetworkInfo.java @@ -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; } -- cgit v1.1