summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamesh Sudini <ramesh.sudini@motorola.com>2011-06-29 11:43:27 -0500
committerWink Saville <wink@google.com>2011-07-07 16:35:52 -0700
commit910e80478dbf2bd1f1b82ae62b12cd250b4ce8f5 (patch)
treec915e8710d6fe3e06c25d652d14add786f5b2436
parent848aa3ab8a00835c5af2ead954c7736e507249b5 (diff)
downloadframeworks_base-910e80478dbf2bd1f1b82ae62b12cd250b4ce8f5.zip
frameworks_base-910e80478dbf2bd1f1b82ae62b12cd250b4ce8f5.tar.gz
frameworks_base-910e80478dbf2bd1f1b82ae62b12cd250b4ce8f5.tar.bz2
Disconnect ApnContexts in INITING state when error.
When DCT tears down a link due to error, the ApnContexts which are in INITING state are not torndown. Due to this the DC refCount does not hit 0, and the Data Link is not torndown. Bug: 4973894 Change-Id: If1263f360d55f6874220235fede294909db4837e
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index fe57d0d..df5898b 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -1055,10 +1055,16 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
}
}
if (!found) {
- // ApnContext does not have dcan reorted in data call list.
+ // ApnContext does not have dcac reported in data call list.
+ // Fetch all the ApnContexts that map to this dcac which are in
+ // INITING state too.
if (DBG) log("onDataStateChanged(ar): Connected apn not found in the list (" +
apnContext.toString() + ")");
- list.add(apnContext);
+ if (apnContext.getDataConnectionAc() != null) {
+ list.addAll(apnContext.getDataConnectionAc().getApnListSync());
+ } else {
+ list.add(apnContext);
+ }
}
}
}
@@ -1110,10 +1116,12 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
Collection<ApnContext> apns = dcac.getApnListSync();
- // filter out ApnContext with "Connected" state.
+ // filter out ApnContext with "Connected/Connecting" state.
ArrayList<ApnContext> connectedApns = new ArrayList<ApnContext>();
for (ApnContext apnContext : apns) {
- if (apnContext.getState() == State.CONNECTED) {
+ if (apnContext.getState() == State.CONNECTED ||
+ apnContext.getState() == State.CONNECTING ||
+ apnContext.getState() == State.INITING) {
connectedApns.add(apnContext);
}
}