From 65e4970026fd0e7964796c0e252b6d71632b634c Mon Sep 17 00:00:00 2001 From: Yuichiro Hanada Date: Tue, 18 Sep 2012 14:06:12 +0900 Subject: [PATCH] Fix hackCanUseDictionaryFile. Bug: 7169473 Change-Id: I575aaa350042af076a8da5756993cdae9e73422c --- .../com/android/inputmethod/latin/BinaryDictionaryGetter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java index 9a888ade4..487315c0e 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java @@ -28,6 +28,7 @@ import android.util.Log; import java.io.File; import java.io.FileInputStream; import java.io.IOException; +import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.util.ArrayList; @@ -382,6 +383,8 @@ class BinaryDictionaryGetter { return false; } catch (NumberFormatException e) { return false; + } catch (BufferUnderflowException e) { + return false; } finally { if (inStream != null) { try {