aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusheel nyamala <snyamala@codeaurora.org>2015-01-14 23:41:12 +0530
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-04-08 22:54:53 +0000
commit52a9b6921b72072e61b58e49d31eeed300a2aa6f (patch)
treeead4866187e8a3e0af2d8804f66e939f6fdfb81a
parente35e025f0de83586dad5f1caee17a2a4536276cb (diff)
downloadandroid_frameworks_opt_telephony-52a9b6921b72072e61b58e49d31eeed300a2aa6f.tar.gz
android_frameworks_opt_telephony-52a9b6921b72072e61b58e49d31eeed300a2aa6f.tar.bz2
android_frameworks_opt_telephony-52a9b6921b72072e61b58e49d31eeed300a2aa6f.zip
Deactivate default APN only on network-agent disconnection
For default apn if ConnectivityService has disabled this network, stop trying to bring it up, but do not tear it down, ConnectivityService will do that directly by talking with the DataConnection. Change-Id: I2573616e7c1ebd5c1285aa1cf5d4e58de0341cc8 CRs-Fixed: 782442
-rwxr-xr-xsrc/java/com/android/internal/telephony/dataconnection/DcTracker.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
index 5b0eaecdf..5ac79a238 100755
--- a/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
+++ b/src/java/com/android/internal/telephony/dataconnection/DcTracker.java
@@ -2058,7 +2058,21 @@ public final class DcTracker extends DcTrackerBase {
}
} else if (met) {
apnContext.setReason(Phone.REASON_DATA_DISABLED);
-
+ // If ConnectivityService has disabled this network, stop trying to bring
+ // it up, but do not tear it down - ConnectivityService will do that
+ // directly by talking with the DataConnection.
+ //
+ // This doesn't apply to DUN, however. Those connections have special
+ // requirements from carriers and we need stop using them when the dun
+ // request goes away. This applies to both CDMA and GSM because they both
+ // can declare the DUN APN sharable by default traffic, thus still satisfying
+ // those requests and not torn down organically.
+ if ((apnContext.getApnType() == PhoneConstants.APN_TYPE_DUN && teardownForDun()) ||
+ (apnContext.getApnType() == PhoneConstants.APN_TYPE_MMS)) {
+ cleanup = true;
+ } else {
+ cleanup = false;
+ }
} else {
apnContext.setReason(Phone.REASON_DATA_DEPENDENCY_UNMET);
}