From 645c80654ff55f129a7d87873ee2ad7cf3350678 Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Tue, 29 Nov 2011 17:41:31 -0800 Subject: Fix state synchronization problem. Don't report that we're disconnected immediately if we're disconnecting when another disconnect comes in. Remove this behavior from the default handler and add a catch all "yeah, we're disconnected already" to the inactive state. bug:5568633 Change-Id: Iff7ccde2069b47f8ad8255f3bca0292b80041388 --- .../android/internal/telephony/DataConnection.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/telephony/java/com/android/internal/telephony/DataConnection.java b/telephony/java/com/android/internal/telephony/DataConnection.java index 636646e..4619899 100644 --- a/telephony/java/com/android/internal/telephony/DataConnection.java +++ b/telephony/java/com/android/internal/telephony/DataConnection.java @@ -699,8 +699,10 @@ public abstract class DataConnection extends StateMachine { break; case EVENT_DISCONNECT: - if (DBG) log("DcDefaultState: msg.what=EVENT_DISCONNECT"); - notifyDisconnectCompleted((DisconnectParams) msg.obj); + if (DBG) { + log("DcDefaultState deferring msg.what=EVENT_DISCONNECT" + mRefCount); + } + deferMessage(msg); break; case EVENT_RIL_CONNECTED: @@ -807,6 +809,12 @@ public abstract class DataConnection extends StateMachine { retVal = HANDLED; break; + case EVENT_DISCONNECT: + if (DBG) log("DcInactiveState: msg.what=EVENT_DISCONNECT"); + notifyDisconnectCompleted((DisconnectParams)msg.obj); + retVal = HANDLED; + break; + default: if (VDBG) { log("DcInactiveState nothandled msg.what=0x" + @@ -831,13 +839,6 @@ public abstract class DataConnection extends StateMachine { ConnectionParams cp; switch (msg.what) { - case EVENT_DISCONNECT: - if (DBG) log("DcActivatingState deferring msg.what=EVENT_DISCONNECT" - + mRefCount); - deferMessage(msg); - retVal = HANDLED; - break; - case EVENT_CONNECT: if (DBG) log("DcActivatingState deferring msg.what=EVENT_CONNECT refCount = " + mRefCount); -- cgit v1.1