Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a61a2087 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Amit Mahajan
Browse files

Let some messages get processed in emergency state

Some pings and infrastructure events were getting defered in
emergency mode.  This led to hung processes.

bug:24097705
Change-Id: I5415ae69bcf17a293d5af9ae093d7346b1dc076f
parent c46de7cd
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -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;