summaryrefslogtreecommitdiffstats
path: root/telephony/java/com
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-04-24 00:55:26 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-04-24 00:55:26 -0700
commit96a98d61d7a8360e7a70c91281a9d608837a6056 (patch)
tree3fcbebceffa45e185ea2b8ce888b0e4970368955 /telephony/java/com
parentdcac00d4d2f656887d2b48d0f314e6cf56b7c68b (diff)
parent3de6da1f9699da8f3d221444195fe599c4233998 (diff)
downloadframeworks_base-96a98d61d7a8360e7a70c91281a9d608837a6056.zip
frameworks_base-96a98d61d7a8360e7a70c91281a9d608837a6056.tar.gz
frameworks_base-96a98d61d7a8360e7a70c91281a9d608837a6056.tar.bz2
Merge change 402 into donut
* changes: remove seemingly now unnecessary workaround path
Diffstat (limited to 'telephony/java/com')
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java75
1 files changed, 27 insertions, 48 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 71ffe74..9e6ebc4 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -836,57 +836,38 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
return;
}
+ if (state == State.CONNECTED) {
+ // The way things are supposed to work, the PDP list
+ // should not contain the CID after it disconnects.
+ // However, the way things really work, sometimes the PDP
+ // context is still listed with active = false, which
+ // makes it hard to distinguish an activating context from
+ // an activated-and-then deactivated one.
+ if (!pdpStatesHasCID(pdpStates, cidActive)) {
+ // It looks like the PDP context has deactivated.
+ // Tear everything down and try to reconnect.
+
+ Log.i(LOG_TAG, "PDP connection has dropped. Reconnecting");
+
+ // Add an event log when the network drops PDP
+ int cid = -1;
+ GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
+ if (loc != null) cid = loc.getCid();
+ EventLog.List val = new EventLog.List(cid,
+ TelephonyManager.getDefault().getNetworkType());
+ EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_PDP_NETWORK_DROP, val);
- // This is how things are supposed to work:
- // The PDP list is supposed to be empty of the CID
- // when it disconnects
-
- if (state == State.CONNECTED
- && !pdpStatesHasCID(pdpStates, cidActive)) {
-
- // It looks like the PDP context has deactivated
- // Tear everything down and try to reconnect
-
- Log.i(LOG_TAG, "PDP connection has dropped. Reconnecting");
-
- // Add an event log when the network drops PDP
- int cid = -1;
- GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
- if (loc != null) cid = loc.getCid();
-
- EventLog.List val = new EventLog.List(cid,
- TelephonyManager.getDefault().getNetworkType());
-
- EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_PDP_NETWORK_DROP, val);
-
- cleanUpConnection(true, null);
-
- return;
- }
-
- if (true) {
- //
- // Workaround for issue #655426
- //
-
- // --------------------------
-
- // This is how some things work now: the PDP context is still
- // listed with active = false, which makes it hard to
- // distinguish an activating context from an activated-and-then
- // deactivated one.
- //
- // Here, we only consider this authoritative if we asked for the
- // PDP list. If it was an unsolicited response, we poll again
- // to make sure everyone agrees on the initial state
-
- if (state == State.CONNECTED
- && !pdpStatesHasActiveCID(pdpStates, cidActive)) {
+ cleanUpConnection(true, null);
+ return;
+ } else if (!pdpStatesHasActiveCID(pdpStates, cidActive)) {
+ // Here, we only consider this authoritative if we asked for the
+ // PDP list. If it was an unsolicited response, we poll again
+ // to make sure everyone agrees on the initial state.
if (!explicitPoll) {
// We think it disconnected but aren't sure...poll from our side
phone.mCM.getPDPContextList(
- this.obtainMessage(EVENT_GET_PDP_LIST_COMPLETE));
+ this.obtainMessage(EVENT_GET_PDP_LIST_COMPLETE));
} else {
Log.i(LOG_TAG, "PDP connection has dropped (active=false case). "
+ " Reconnecting");
@@ -895,10 +876,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
int cid = -1;
GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
if (loc != null) cid = loc.getCid();
-
EventLog.List val = new EventLog.List(cid,
TelephonyManager.getDefault().getNetworkType());
-
EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_PDP_NETWORK_DROP, val);
cleanUpConnection(true, null);