Merge "Do not trigger a disk write violation during dumpsys gfxinfo"
This commit is contained in:
committed by
Android (Google) Code Review
commit
c28db7a673
@@ -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