Merge "[AMS][Bugfix] Fix hang when dumping local cache info." am: 4e52496e7d am: 5d682d6ce3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2450065 Change-Id: Idc0b27466636bc8ef6592c674550f4c5ae64b764 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -10822,6 +10822,13 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
pw.println("\n\n** Cache info for pid " + pid + " [" + r.processName + "] **");
|
||||
pw.flush();
|
||||
try {
|
||||
if (pid == Process.myPid()) {
|
||||
// Directly dump to target fd for local dump to avoid hang.
|
||||
try (ParcelFileDescriptor pfd = ParcelFileDescriptor.fromFd(fd.getInt$())) {
|
||||
thread.dumpCacheInfo(pfd, args);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
TransferPipe tp = new TransferPipe();
|
||||
try {
|
||||
thread.dumpCacheInfo(tp.getWriteFd(), args);
|
||||
|
||||
Reference in New Issue
Block a user