Loading services/java/com/android/server/ConnectivityService.java +4 −1 Original line number Diff line number Diff line Loading @@ -849,7 +849,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS; } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) { usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL; } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN)) { } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN) || TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN_ALWAYS)) { usedNetworkType = ConnectivityManager.TYPE_MOBILE_DUN; } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) { usedNetworkType = ConnectivityManager.TYPE_MOBILE_HIPRI; Loading @@ -870,6 +871,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { return 1; } callTeardown = true; } else { if (DBG) log("not a known feature - dropping"); } } if (DBG) log("Doing network teardown"); Loading services/java/com/android/server/connectivity/Tethering.java +4 −3 Original line number Diff line number Diff line Loading @@ -1165,7 +1165,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { IConnectivityManager.Stub.asInterface(b); try { service.stopUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE, (mDunRequired? Phone.FEATURE_ENABLE_DUN : (mDunRequired? Phone.FEATURE_ENABLE_DUN_ALWAYS : Phone.FEATURE_ENABLE_HIPRI)); } catch (Exception e) { return false; Loading Loading @@ -1354,10 +1354,11 @@ public class Tethering extends INetworkManagementEventObserver.Stub { } class TetherModeAliveState extends TetherMasterUtilState { boolean mTryCell = WAIT_FOR_NETWORK_TO_SETTLE; boolean mTryCell = !WAIT_FOR_NETWORK_TO_SETTLE; @Override public void enter() { mTryCell = WAIT_FOR_NETWORK_TO_SETTLE; // first pass lets just see what we have. mTryCell = !WAIT_FOR_NETWORK_TO_SETTLE; // better try something first pass // or crazy tests cases will fail chooseUpstreamType(mTryCell); mTryCell = !mTryCell; turnOnMasterTetherSettings(); // may transition us out Loading telephony/java/com/android/internal/telephony/DataConnectionTracker.java +1 −1 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ public abstract class DataConnectionTracker extends Handler { return new ArrayList<DataConnection>(mDataConnections.values()); } protected boolean isApnTypeActive(String type) { public boolean isApnTypeActive(String type) { // TODO: support simultaneous with List instead return mActiveApn != null && mActiveApn.canHandleType(type); } Loading telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java +2 −1 Original line number Diff line number Diff line Loading @@ -610,7 +610,8 @@ public class CDMAPhone extends PhoneBase { // If we're out of service, open TCP sockets may still work // but no data will flow ret = DataState.DISCONNECTED; } else if (mDataConnection.isApnTypeEnabled(apnType) == false) { } else if (mDataConnection.isApnTypeEnabled(apnType) == false || mDataConnection.isApnTypeActive(apnType) == false) { ret = DataState.DISCONNECTED; } else { switch (mDataConnection.getState()) { Loading telephony/java/com/android/internal/telephony/gsm/GSMPhone.java +2 −1 Original line number Diff line number Diff line Loading @@ -300,7 +300,8 @@ public class GSMPhone extends PhoneBase { // If we're out of service, open TCP sockets may still work // but no data will flow ret = DataState.DISCONNECTED; } else if (mDataConnection.isApnTypeEnabled(apnType) == false) { } else if (mDataConnection.isApnTypeEnabled(apnType) == false || mDataConnection.isApnTypeActive(apnType) == false) { ret = DataState.DISCONNECTED; } else { /* mSST.gprsState == ServiceState.STATE_IN_SERVICE */ switch (mDataConnection.getState()) { Loading Loading
services/java/com/android/server/ConnectivityService.java +4 −1 Original line number Diff line number Diff line Loading @@ -849,7 +849,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS; } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) { usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL; } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN)) { } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN) || TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN_ALWAYS)) { usedNetworkType = ConnectivityManager.TYPE_MOBILE_DUN; } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) { usedNetworkType = ConnectivityManager.TYPE_MOBILE_HIPRI; Loading @@ -870,6 +871,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { return 1; } callTeardown = true; } else { if (DBG) log("not a known feature - dropping"); } } if (DBG) log("Doing network teardown"); Loading
services/java/com/android/server/connectivity/Tethering.java +4 −3 Original line number Diff line number Diff line Loading @@ -1165,7 +1165,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { IConnectivityManager.Stub.asInterface(b); try { service.stopUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE, (mDunRequired? Phone.FEATURE_ENABLE_DUN : (mDunRequired? Phone.FEATURE_ENABLE_DUN_ALWAYS : Phone.FEATURE_ENABLE_HIPRI)); } catch (Exception e) { return false; Loading Loading @@ -1354,10 +1354,11 @@ public class Tethering extends INetworkManagementEventObserver.Stub { } class TetherModeAliveState extends TetherMasterUtilState { boolean mTryCell = WAIT_FOR_NETWORK_TO_SETTLE; boolean mTryCell = !WAIT_FOR_NETWORK_TO_SETTLE; @Override public void enter() { mTryCell = WAIT_FOR_NETWORK_TO_SETTLE; // first pass lets just see what we have. mTryCell = !WAIT_FOR_NETWORK_TO_SETTLE; // better try something first pass // or crazy tests cases will fail chooseUpstreamType(mTryCell); mTryCell = !mTryCell; turnOnMasterTetherSettings(); // may transition us out Loading
telephony/java/com/android/internal/telephony/DataConnectionTracker.java +1 −1 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ public abstract class DataConnectionTracker extends Handler { return new ArrayList<DataConnection>(mDataConnections.values()); } protected boolean isApnTypeActive(String type) { public boolean isApnTypeActive(String type) { // TODO: support simultaneous with List instead return mActiveApn != null && mActiveApn.canHandleType(type); } Loading
telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java +2 −1 Original line number Diff line number Diff line Loading @@ -610,7 +610,8 @@ public class CDMAPhone extends PhoneBase { // If we're out of service, open TCP sockets may still work // but no data will flow ret = DataState.DISCONNECTED; } else if (mDataConnection.isApnTypeEnabled(apnType) == false) { } else if (mDataConnection.isApnTypeEnabled(apnType) == false || mDataConnection.isApnTypeActive(apnType) == false) { ret = DataState.DISCONNECTED; } else { switch (mDataConnection.getState()) { Loading
telephony/java/com/android/internal/telephony/gsm/GSMPhone.java +2 −1 Original line number Diff line number Diff line Loading @@ -300,7 +300,8 @@ public class GSMPhone extends PhoneBase { // If we're out of service, open TCP sockets may still work // but no data will flow ret = DataState.DISCONNECTED; } else if (mDataConnection.isApnTypeEnabled(apnType) == false) { } else if (mDataConnection.isApnTypeEnabled(apnType) == false || mDataConnection.isApnTypeActive(apnType) == false) { ret = DataState.DISCONNECTED; } else { /* mSST.gprsState == ServiceState.STATE_IN_SERVICE */ switch (mDataConnection.getState()) { Loading