Let some messages get processed in emergency state rel-24-foster-r2-partner rel-24-foster-r7-partner rel-24-sb-r1-1-partner rel-24-sb-r1-2-partner rel-24-sb-r1-partner
Robert Greenwalt [Fri, 4 Sep 2015 00:09:26 +0000 (17:09 -0700)]
Some pings and infrastructure events were getting defered in
emergency mode.  This led to hung processes.

bug:24097705
Change-Id: I5415ae69bcf17a293d5af9ae093d7346b1dc076f

src/java/com/android/internal/telephony/dataconnection/DcSwitchStateMachine.java

index 68d3f50..ae2d2ff 100644 (file)
@@ -170,11 +170,25 @@ public class DcSwitchStateMachine extends StateMachine {
                     break;
                 }
 
-                default: {
+                // explicitly call out the messages we must defer
+                // anything not listed falls through to the default state
+                case DcSwitchAsyncChannel.REQ_CONNECT:
+                case DcSwitchAsyncChannel.REQ_RETRY_CONNECT:
+                case DcSwitchAsyncChannel.REQ_DISCONNECT_ALL:
+                case DcSwitchAsyncChannel.EVENT_DATA_ATTACHED:
+                case DcSwitchAsyncChannel.EVENT_DATA_DETACHED: {
                     log("EmergencyState: deferMessage msg.what=0x" + Integer.toHexString(msg.what));
                     deferMessage(msg);
                     break;
                 }
+
+                default: {
+                    if (VDBG) {
+                        log("EmergencyState: nothandled msg.what=0x" +
+                                Integer.toHexString(msg.what));
+                    }
+                    return NOT_HANDLED;
+                }
             }
 
             return HANDLED;