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

Commit c14893bf authored by Nimrod Gileadi's avatar Nimrod Gileadi Committed by Android (Google) Code Review
Browse files

Merge "Close InputStream in BatteryStatsHelper" into nyc-dev

parents 0d26fdb6 e9be5da6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -754,8 +754,7 @@ public final class BatteryStatsHelper {
        try {
            ParcelFileDescriptor pfd = service.getStatisticsStream();
            if (pfd != null) {
                FileInputStream fis = new ParcelFileDescriptor.AutoCloseInputStream(pfd);
                try {
                try (FileInputStream fis = new ParcelFileDescriptor.AutoCloseInputStream(pfd)) {
                    byte[] data = readFully(fis, MemoryFile.getSize(pfd.getFileDescriptor()));
                    Parcel parcel = Parcel.obtain();
                    parcel.unmarshall(data, 0, data.length);