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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user