summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2011-01-10 11:58:31 -0800
committerRobert Greenwalt <rgreenwalt@google.com>2011-01-12 15:52:10 -0800
commit19b9ab46a9faee6031aaf6c78748401943fea117 (patch)
treea1ea2b76d2b2958f8028a7d0f39d1201391e4617 /telephony
parent7a8f01abf98b6212358ea0e0401879093d2c0f93 (diff)
downloadframeworks_base-19b9ab46a9faee6031aaf6c78748401943fea117.zip
frameworks_base-19b9ab46a9faee6031aaf6c78748401943fea117.tar.gz
frameworks_base-19b9ab46a9faee6031aaf6c78748401943fea117.tar.bz2
Turn off DUN connection after tethering.
Use matching feature type when turning tethering off or the request is ignored. Also, turn on DUN apn right away so that we don't fail aggressive test cases. Also don't report connections for enabled apn's that we're no longer connected to. bug:3332880 bug:3338033 Change-Id: I7db2dfd4879f03465bc9f6d39488c078570dcaf3
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/DataConnectionTracker.java2
-rwxr-xr-xtelephony/java/com/android/internal/telephony/cdma/CDMAPhone.java3
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GSMPhone.java3
3 files changed, 5 insertions, 3 deletions
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
index 737342f..2343dd8 100644
--- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
@@ -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);
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
index 1e77589..a1d5121 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
@@ -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()) {
diff --git a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
index 628f11a..e8ad0f2 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java
@@ -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()) {