Merge "[AMS][Bugfix] Fix hang when dumping local cache info." am: 4e52496e7d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2450065 Change-Id: I5066cbaa5e6e5345574425c80dae1849afde4761 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -10812,6 +10812,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