mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 7a800e79
: Merge "Avoid leaking AssetFileDescriptor."
* commit '7a800e7982ff607aa339f44742de935033f38cfe': Avoid leaking AssetFileDescriptor.
This commit is contained in:
commit
238748d57c
@ -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
Block a user