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

Commit 966f74db authored by Jozef BABJAK's avatar Jozef BABJAK Committed by Steve Kondik
Browse files

Closing stream after class pre-loading.

Change-Id: I409f49717a17adedf9f0a3d07635cad0c0468702
parent 748b1df8
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -277,9 +277,10 @@ public class ZygoteInit {
            runtime.runFinalizationSync();
            Debug.startAllocCounting();

            BufferedReader br = null;

            try {
                BufferedReader br
                    = new BufferedReader(new InputStreamReader(is), 256);
                br = new BufferedReader(new InputStreamReader(is), 256);

                int count = 0;
                String line;
@@ -324,6 +325,11 @@ public class ZygoteInit {
            } catch (IOException e) {
                Log.e(TAG, "Error reading " + PRELOADED_CLASSES + ".", e);
            } finally {
                try {
                    br.close();
                } catch (final IOException e) {
                    Log.w(TAG, "Error closing reader: " + PRELOADED_CLASSES + ".", e);
                }
                // Restore default.
                runtime.setTargetHeapUtilization(defaultUtilization);