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
This commit is contained in:
Robert Greenwalt
2011-11-29 17:41:31 -08:00
parent 88f10c6ce5
commit 645c80654f

View File

@@ -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);