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

Commit f181ae1b authored by Dhavalkumar Chaudhary's avatar Dhavalkumar Chaudhary
Browse files

Handled filestream object close() call to release the object

Bug: 440207291

Test: atest PowerStatsTest

Flag: EXEMPT BUG_FIX
Change-Id: I424960e48cb2231194f1bba9e9f1a2a1dd9ada7e
parent 79c374eb
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -264,8 +264,7 @@ public final class PowerStatsLogger extends Handler {
                final byte[] dataCached = new byte[(int) cachedFile.length()];

                // Get the cached data from file.
                try {
                    final FileInputStream fis = new FileInputStream(cachedFile.getPath());
                try (FileInputStream fis = new FileInputStream(cachedFile.getPath())) {
                    fis.read(dataCached);
                } catch (IOException e) {
                    Slog.e(TAG, "Failed to read cached data from file", e);