Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6a78a8c authored by Collin Fijalkovich's avatar Collin Fijalkovich
Browse files

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
parent 35a5c150
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;
@@ -12834,6 +12835,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 {