Skip to content

Commit 645c806

Browse files
author
Robert Greenwalt
committed
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
1 parent 88f10c6 commit 645c806

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

telephony/java/com/android/internal/telephony/DataConnection.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,10 @@ public boolean processMessage(Message msg) {
699699
break;
700700

701701
case EVENT_DISCONNECT:
702-
if (DBG) log("DcDefaultState: msg.what=EVENT_DISCONNECT");
703-
notifyDisconnectCompleted((DisconnectParams) msg.obj);
702+
if (DBG) {
703+
log("DcDefaultState deferring msg.what=EVENT_DISCONNECT" + mRefCount);
704+
}
705+
deferMessage(msg);
704706
break;
705707

706708
case EVENT_RIL_CONNECTED:
@@ -807,6 +809,12 @@ public boolean processMessage(Message msg) {
807809
retVal = HANDLED;
808810
break;
809811

812+
case EVENT_DISCONNECT:
813+
if (DBG) log("DcInactiveState: msg.what=EVENT_DISCONNECT");
814+
notifyDisconnectCompleted((DisconnectParams)msg.obj);
815+
retVal = HANDLED;
816+
break;
817+
810818
default:
811819
if (VDBG) {
812820
log("DcInactiveState nothandled msg.what=0x" +
@@ -831,13 +839,6 @@ public boolean processMessage(Message msg) {
831839
ConnectionParams cp;
832840

833841
switch (msg.what) {
834-
case EVENT_DISCONNECT:
835-
if (DBG) log("DcActivatingState deferring msg.what=EVENT_DISCONNECT"
836-
+ mRefCount);
837-
deferMessage(msg);
838-
retVal = HANDLED;
839-
break;
840-
841842
case EVENT_CONNECT:
842843
if (DBG) log("DcActivatingState deferring msg.what=EVENT_CONNECT refCount = "
843844
+ mRefCount);

0 commit comments

Comments
 (0)