From cffe4d2d0fdd5b1e53f497ac6d44c575a88d33b4 Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Mon, 2 Dec 2013 18:45:32 +0900 Subject: Quit recording LastUserHistoryWriteTime. Change-Id: I0f2b408b4976d8119c932654e23836803d42c568 --- .../android/inputmethod/latin/ExpandableBinaryDictionary.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java') diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java index 7107076cc..056054273 100644 --- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java @@ -53,6 +53,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { /** Whether to print debug output to log */ private static boolean DEBUG = false; + private static final boolean DBG_STRESS_TEST = false; private static final int TIMEOUT_FOR_READ_OPS_IN_MILLISECONDS = 100; @@ -496,6 +497,16 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { + mFilenameDictionaryUpdateController.mLastUpdateRequestTime + " update=" + mFilenameDictionaryUpdateController.mLastUpdateTime); } + if (DBG_STRESS_TEST) { + // Test if this class does not cause problems when it takes long time to load binary + // dictionary. + try { + Log.w(TAG, "Start stress in loading: " + mFilename); + Thread.sleep(15000); + Log.w(TAG, "End stress in loading"); + } catch (InterruptedException e) { + } + } final File file = new File(mContext.getFilesDir(), mFilename + getFileNameExtentionToOpenDict()); -- cgit v1.2.3-83-g751a