Merge "Do not trigger a disk write violation during dumpsys gfxinfo"

This commit is contained in:
TreeHugger Robot
2022-01-07 23:32:16 +00:00
committed by Android (Google) Code Review

View File

@@ -4645,12 +4645,14 @@ public final class ActivityThread extends ClientTransactionHandler
}
private void handleDumpGfxInfo(DumpComponentInfo info) {
final StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskWrites();
try {
ThreadedRenderer.handleDumpGfxInfo(info.fd.getFileDescriptor(), info.args);
} catch (Exception e) {
Log.w(TAG, "Caught exception from dumpGfxInfo()", e);
} finally {
IoUtils.closeQuietly(info.fd);
StrictMode.setThreadPolicy(oldPolicy);
}
}