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

Commit 7a800e79 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Avoid leaking AssetFileDescriptor."

parents ed9ef5a7 c5ebc792
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -95,8 +95,16 @@ final class BinaryDictionaryGetter {
                    + fallbackResId);
            return null;
        }
        try {
            return AssetFileAddress.makeFromFileNameAndOffset(
                    context.getApplicationInfo().sourceDir, afd.getStartOffset(), afd.getLength());
        } finally {
            try {
                afd.close();
            } catch (IOException e) {
                // Ignored
            }
        }
    }

    private static final class DictPackSettings {