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

Commit 744fa287 authored by William Loh's avatar William Loh
Browse files

Close OutputStream after use in ComputerEngine

Bug: 360284894
Test: presubmit
Flag: EXEMPT bug fix
Change-Id: I735c5f2283dc41f2714ef727814074bf7827f027
parent 3beaa244
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3065,10 +3065,9 @@ public class ComputerEngine implements Computer {
            case DumpState.DUMP_PREFERRED_XML:
            {
                pw.flush();
                FileOutputStream fout = new FileOutputStream(fd);
                BufferedOutputStream str = new BufferedOutputStream(fout);
                TypedXmlSerializer serializer = Xml.newFastSerializer();
                try {
                try (BufferedOutputStream str =
                             new BufferedOutputStream(new FileOutputStream(fd))) {
                    serializer.setOutput(str, StandardCharsets.UTF_8.name());
                    serializer.startDocument(null, true);
                    serializer.setFeature(