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

Commit 401fb248 authored by Josh Gao's avatar Josh Gao
Browse files

Close PFD.AutoClose{In,Out}putStream before the PFD itself.

Bug: http://b/118316956
Test: atest ParcelFileDescriptorTest
Test: atest ParcelFileDescriptor_AutoCloseOutputStreamTest
Change-Id: I39c5b15ea8ac5915e4f5e4e42328cd08f65ec9a0
parent a4680e1e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -917,9 +917,9 @@ public class ParcelFileDescriptor implements Parcelable, Closeable {
        @Override
        public void close() throws IOException {
            try {
                mPfd.close();
            } finally {
                super.close();
            } finally {
                mPfd.close();
            }
        }

@@ -968,9 +968,9 @@ public class ParcelFileDescriptor implements Parcelable, Closeable {
        @Override
        public void close() throws IOException {
            try {
                mPfd.close();
            } finally {
                super.close();
            } finally {
                mPfd.close();
            }
        }
    }