Avoid TransferPipe for local dumpCacheInfo calls

Make a process-local call to PropertyInvalidatedCache instead of dumping
cache state through a TransferPipe to avoid blocking when the pipe
buffer fills.

Bug: 180051995
Test: Ran dumpsys cacheinfo and validated output
Merged-In: I1e4ab8e1d09b98b379d81079fd26ff2129b5b65a
Change-Id: Ib0df61ec1a30c016d1534ba483ebba919e279ed1
This commit is contained in:
Collin Fijalkovich
2021-02-25 21:41:44 +00:00
parent ad312a6c1d
commit 71ef23213f

View File

@@ -183,6 +183,7 @@ import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.ProcessMemoryState;
import android.app.ProfilerInfo;
import android.app.PropertyInvalidatedCache;
import android.app.WaitResult;
import android.app.backup.IBackupManager;
import android.app.usage.UsageEvents;
@@ -12833,6 +12834,10 @@ public class ActivityManagerService extends IActivityManager.Stub
if (r.thread != null) {
pw.println("\n\n** Cache info for pid " + r.pid + " [" + r.processName + "] **");
pw.flush();
if (r.pid == MY_PID) {
PropertyInvalidatedCache.dumpCacheInfo(fd, args);
continue;
}
try {
TransferPipe tp = new TransferPipe();
try {