am 238748d5: am 7a800e79: Merge "Avoid leaking AssetFileDescriptor."

* commit '238748d57c8ba770be4c3e34fa6d704893de3d07':
  Avoid leaking AssetFileDescriptor.
main
Jeff Sharkey 2013-05-15 11:17:59 -07:00 committed by Android Git Automerger
commit f892099b3e
1 changed files with 10 additions and 2 deletions

View File

@ -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 {