diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2011-11-29 17:41:31 -0800 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2011-11-30 15:07:30 -0800 |
commit | 645c80654ff55f129a7d87873ee2ad7cf3350678 (patch) | |
tree | 381a9ef95946877f96da512e965c87deae5b557d /telephony/java | |
parent | 88f10c6ce5a97b1990934148deb8ed6aa6ef7a48 (diff) | |
download | frameworks_base-645c80654ff55f129a7d87873ee2ad7cf3350678.zip frameworks_base-645c80654ff55f129a7d87873ee2ad7cf3350678.tar.gz frameworks_base-645c80654ff55f129a7d87873ee2ad7cf3350678.tar.bz2 |
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
Diffstat (limited to 'telephony/java')
-rw-r--r-- | telephony/java/com/android/internal/telephony/DataConnection.java | 19 |
1 files 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); |