Do not trigger a disk write violation during dumpsys gfxinfo
Writing to a pipe FD here is okay because it doesn't write to the physical disk. Bug: 203682422 Test: dumpsys gfxinfo Change-Id: Ibb484f0d466d13e55d2c8059a5af964641281110
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user