Merge "Correctly close the gzip stream"

This commit is contained in:
Jean Chalard 2012-03-21 01:32:07 -07:00 committed by Android (Google) Code Review
commit 32aac4777f

View File

@ -196,8 +196,8 @@ public class BinaryDictionaryFileDumper {
} finally { } finally {
// Ignore exceptions while closing files. // Ignore exceptions while closing files.
try { try {
// afd.close() will close inputStream, we should not call inputStream.close(). // inputStream.close() will close afd, we should not call afd.close().
if (null != afd) afd.close(); if (null != inputStream) inputStream.close();
} catch (Exception e) { } catch (Exception e) {
Log.e(TAG, "Exception while closing a cross-process file descriptor : " + e); Log.e(TAG, "Exception while closing a cross-process file descriptor : " + e);
} }