Loading services/java/com/android/server/ConnectivityService.java +7 −2 Original line number Diff line number Diff line Loading @@ -697,7 +697,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 @@ -712,7 +713,11 @@ public class ConnectivityService extends IConnectivityManager.Stub { if (ni.isAvailable() == false) { if (DBG) log("special network not available"); if (!TextUtils.equals(feature,Phone.FEATURE_ENABLE_DUN_ALWAYS)) { return Phone.APN_TYPE_NOT_AVAILABLE; } else { // else make the attempt anyway - probably giving REQUEST_STARTED below } } synchronized(this) { Loading services/java/com/android/server/connectivity/Tethering.java +2 −2 Original line number Diff line number Diff line Loading @@ -1138,8 +1138,8 @@ public class Tethering extends INetworkManagementEventObserver.Stub { int result = Phone.APN_REQUEST_FAILED; try { result = service.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE, (mDunRequired ? Phone.FEATURE_ENABLE_DUN : Phone.FEATURE_ENABLE_HIPRI), new Binder()); (mDunRequired ? Phone.FEATURE_ENABLE_DUN_ALWAYS : Phone.FEATURE_ENABLE_HIPRI), new Binder()); } catch (Exception e) { } switch (result) { Loading telephony/java/com/android/internal/telephony/Phone.java +1 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,7 @@ public interface Phone { static final String FEATURE_ENABLE_SUPL = "enableSUPL"; static final String FEATURE_ENABLE_DUN = "enableDUN"; static final String FEATURE_ENABLE_HIPRI = "enableHIPRI"; static final String FEATURE_ENABLE_DUN_ALWAYS = "enableDUNAlways"; /** * Return codes for <code>enableApnType()</code> Loading Loading
services/java/com/android/server/ConnectivityService.java +7 −2 Original line number Diff line number Diff line Loading @@ -697,7 +697,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 @@ -712,7 +713,11 @@ public class ConnectivityService extends IConnectivityManager.Stub { if (ni.isAvailable() == false) { if (DBG) log("special network not available"); if (!TextUtils.equals(feature,Phone.FEATURE_ENABLE_DUN_ALWAYS)) { return Phone.APN_TYPE_NOT_AVAILABLE; } else { // else make the attempt anyway - probably giving REQUEST_STARTED below } } synchronized(this) { Loading
services/java/com/android/server/connectivity/Tethering.java +2 −2 Original line number Diff line number Diff line Loading @@ -1138,8 +1138,8 @@ public class Tethering extends INetworkManagementEventObserver.Stub { int result = Phone.APN_REQUEST_FAILED; try { result = service.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE, (mDunRequired ? Phone.FEATURE_ENABLE_DUN : Phone.FEATURE_ENABLE_HIPRI), new Binder()); (mDunRequired ? Phone.FEATURE_ENABLE_DUN_ALWAYS : Phone.FEATURE_ENABLE_HIPRI), new Binder()); } catch (Exception e) { } switch (result) { Loading
telephony/java/com/android/internal/telephony/Phone.java +1 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,7 @@ public interface Phone { static final String FEATURE_ENABLE_SUPL = "enableSUPL"; static final String FEATURE_ENABLE_DUN = "enableDUN"; static final String FEATURE_ENABLE_HIPRI = "enableHIPRI"; static final String FEATURE_ENABLE_DUN_ALWAYS = "enableDUNAlways"; /** * Return codes for <code>enableApnType()</code> Loading