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

Commit 24a7d468 authored by Brandon Liu's avatar Brandon Liu Committed by Android (Google) Code Review
Browse files

Merge "Override close() to fix LEAKED_CLOSABLE"

parents 23d0880b 19b15032
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -280,6 +280,12 @@ public class AssetFileDescriptor implements Parcelable, Closeable {
        public FileChannel getChannel() {
            return mDelegateInputStream.getChannel();
        }
        @Override
        public void close() throws IOException {
            // Make the mDelegateInputStream own file descriptor and super.close()
            // is not needed here to avoid double close the file descriptor.
            mDelegateInputStream.close();
        }
    }

    /**