Skip to content
Snippets Groups Projects
Commit c5ebc792 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Avoid leaking AssetFileDescriptor.

Change-Id: Iac388c8aefc684980cb4c7131fb47319f6073eb3
parent 2df8e103
No related branches found
No related tags found
No related merge requests found
...@@ -95,8 +95,16 @@ final class BinaryDictionaryGetter { ...@@ -95,8 +95,16 @@ final class BinaryDictionaryGetter {
+ fallbackResId); + fallbackResId);
return null; return null;
} }
return AssetFileAddress.makeFromFileNameAndOffset( try {
context.getApplicationInfo().sourceDir, afd.getStartOffset(), afd.getLength()); return AssetFileAddress.makeFromFileNameAndOffset(
context.getApplicationInfo().sourceDir, afd.getStartOffset(), afd.getLength());
} finally {
try {
afd.close();
} catch (IOException e) {
// Ignored
}
}
} }
private static final class DictPackSettings { private static final class DictPackSettings {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment