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

Commit 6238b409 authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Use new StateMachine apis to check if a message is pending

Bug: 23067429
Change-Id: Ic64a749eee6c13d3619549d4dd5e07307e2cfac0
parent 10aac5c0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1785,8 +1785,10 @@ public final class DataConnection extends StateMachine {

            boolean createNetworkAgent = true;
            // If a disconnect is already pending, avoid notifying all of connected
            if (DataConnection.this.getHandler().hasMessages(EVENT_DISCONNECT) ||
                    DataConnection.this.getHandler().hasMessages(EVENT_DISCONNECT_ALL)) {
            if (hasMessages(EVENT_DISCONNECT) ||
                    hasMessages(EVENT_DISCONNECT_ALL) ||
                    hasDeferredMessages(EVENT_DISCONNECT) ||
                    hasDeferredMessages(EVENT_DISCONNECT_ALL)) {
                log("DcActiveState: skipping notifyAllOfConnected()");
                createNetworkAgent = false;
            } else {