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

* commit '238748d57c8ba770be4c3e34fa6d704893de3d07':
  Avoid leaking AssetFileDescriptor.
This commit is contained in:
Jeff Sharkey 2013-05-15 11:17:59 -07:00 committed by Android Git Automerger
commit f892099b3e

View file

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