OSDN Git Service

Do not set waitForDebugger if the process to be debugged already started
authorChong Zhang <chz@google.com>
Tue, 26 Apr 2016 19:24:55 +0000 (12:24 -0700)
committerChong Zhang <chz@google.com>
Tue, 26 Apr 2016 19:29:14 +0000 (12:29 -0700)
commit55c9d73918240c9a56b1a5a0bfccea6b184abbd2
tree0ec22b33018363c461ae2afd787b8f43c1e7ee01
parent5e40748d3f32c0d5843855cac169e82dd15a0904
Do not set waitForDebugger if the process to be debugged already started

For non-persistent debug settings, mDebugApp and mWaitForDebugger flags
will only be restored when we get attachApplication. If the process is
already running, we can't wait for debugger and there will be no
attachApplication calls coming.

We should leave the settings unmodified, otherwise after two such calls,
both mDebugApp and mOrigDebugApp will point to the same app, and the
debug settings can never be restored.

bug: 27931552
Change-Id: Id53e21bbe154f45bf2ca12bb5d7fd56279bae653
services/core/java/com/android/server/am/ActivityStackSupervisor.java