diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2011-01-04 11:17:51 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-04 11:17:51 -0800 |
commit | 2247ac858e4ad77a20b764b0fdb2f771bc0e9cc8 (patch) | |
tree | b572cc9af1941c8a645bbf4e64b7199424b95a9d | |
parent | 18e80648c5f5406a6477661d8a53a4db2b9a01d2 (diff) | |
parent | e32e812b11520b244374371ee49eaed20c84a6e3 (diff) | |
download | frameworks_base-2247ac858e4ad77a20b764b0fdb2f771bc0e9cc8.zip frameworks_base-2247ac858e4ad77a20b764b0fdb2f771bc0e9cc8.tar.gz frameworks_base-2247ac858e4ad77a20b764b0fdb2f771bc0e9cc8.tar.bz2 |
Merge "Always file DUN requests for tethering."
3 files changed, 10 insertions, 4 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index 5eb42e7..eeaeadc 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -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; @@ -712,7 +713,11 @@ public class ConnectivityService extends IConnectivityManager.Stub { if (ni.isAvailable() == false) { if (DBG) log("special network not available"); - return Phone.APN_TYPE_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) { diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java index a562e1f..fc1b2c4 100644 --- a/services/java/com/android/server/connectivity/Tethering.java +++ b/services/java/com/android/server/connectivity/Tethering.java @@ -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) { diff --git a/telephony/java/com/android/internal/telephony/Phone.java b/telephony/java/com/android/internal/telephony/Phone.java index 25ad48d..d0b5540 100644 --- a/telephony/java/com/android/internal/telephony/Phone.java +++ b/telephony/java/com/android/internal/telephony/Phone.java @@ -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> |