Avoid leaking AssetFileDescriptor.
Change-Id: Iac388c8aefc684980cb4c7131fb47319f6073eb3main
parent
2df8e1033b
commit
c5ebc792d6
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue