Use ActivityManagerService global lock in dumpHeap

Bug: 187013484
Test: adb shell am dumpheap
Change-Id: I1d3d8016f228c1ee9aa82edee7550ba3e50843ae
This commit is contained in:
Jing Ji
2021-05-03 23:48:41 -07:00
parent 748c3a8040
commit 175d114eda

View File

@@ -14831,7 +14831,7 @@ public class ActivityManagerService extends IActivityManager.Stub
throw new IllegalArgumentException("null fd");
}
synchronized (mProcLock) {
synchronized (this) {
ProcessRecord proc = findProcessLOSP(process, userId, "dumpHeap");
IApplicationThread thread;
if (proc == null || (thread = proc.getThread()) == null) {