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

Commit 0801a618 authored by Fabien Sanglard's avatar Fabien Sanglard
Browse files

Ensure WAIT packet upon HELO in --suspend mode

Upon suspending the app, we don't set mWaiting like we do in
waitingForDebugger. This is an error because this state is checked
upon handling HELO in DdmHandleHello chunk handler.

Mimicking what is done in waitingForDebugger ensure that WAIT is
sent and DDM client receive the event.

Bug: 266232837
Test: Manual
Change-Id: I3b8bc9af6f017f3a16c33ac38df7a9248c939a1a
parent ac92461d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1006,12 +1006,15 @@ public final class Debug
        // been replaced with an implementation that will suspendAll and
        // send VM_START.
        System.out.println("Waiting for debugger first packet");

        mWaiting = true;
        while (!isDebuggerConnected()) {
            try {
                Thread.sleep(100);
            } catch (InterruptedException ie) {
            }
        }
        mWaiting = false;

        System.out.println("Debug.suspendAllAndSentVmStart");
        VMDebug.suspendAllAndSendVmStart();