am 238748d5: am 7a800e79: Merge "Avoid leaking AssetFileDescriptor."
* commit '238748d57c8ba770be4c3e34fa6d704893de3d07': Avoid leaking AssetFileDescriptor.main
commit
f892099b3e
|
@ -95,8 +95,16 @@ final class BinaryDictionaryGetter {
|
|||
+ fallbackResId);
|
||||
return null;
|
||||
}
|
||||
return AssetFileAddress.makeFromFileNameAndOffset(
|
||||
context.getApplicationInfo().sourceDir, afd.getStartOffset(), afd.getLength());
|
||||
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