Commit 7b05c367 authored by Shubham Ajmera's avatar Shubham Ajmera
Browse files

Set warnings for unbuffered I/O

The change introduces a new BlockGuard policy to track unbuffered
I/O. Policy can be set in the following way:
     StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
        .detectUnbufferedIO().build());

IoTracker generates warnings for unbuffered I/O if the operation
could be replaced with a buffered I/O.

The change also removes IoTrace class which was called each time an I/O
operation was invoked.

Bug: 3018772

Change-Id: I18d42c3b3ceaf0b4b98cf15914716b20a48e50c8
parent 26a19274
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment