aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-10 18:52:58 +0900
committerJean Chalard <jchalard@google.com>2013-12-11 12:06:05 +0900
commit83c879ad67d49d3639ce4f03bfb6e909e09c373f (patch)
tree167c242a4bc956a4c94273151412b0bb449dffc8 /java/src/com/android/inputmethod
parent3839defc90b8328592256d92caa90102c34a5937 (diff)
downloadlatinime-83c879ad67d49d3639ce4f03bfb6e909e09c373f.tar.gz
latinime-83c879ad67d49d3639ce4f03bfb6e909e09c373f.tar.xz
latinime-83c879ad67d49d3639ce4f03bfb6e909e09c373f.zip
Fix typos.
One of these cost me a day and a half searching for a bug :( Change-Id: I20f0b727f7c02e2754aaaf6a05b74c9cf9e6375e
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r--java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java8
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java6
-rw-r--r--java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java12
3 files changed, 13 insertions, 13 deletions
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
index f53dc3748..5d1c39666 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
@@ -144,7 +144,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
return mBinaryDictionary.isValidDictionary();
}
- protected String getFileNameExtentionToOpenDict() {
+ protected String getFileNameExtensionToOpenDict() {
return "";
}
@@ -265,7 +265,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
// We have 'fileToOpen' in addition to 'file' for the v4 dictionary format
// where 'file' is a directory, and 'fileToOpen' is a normal file.
final File fileToOpen = new File(mContext.getFilesDir(), mFilename
- + getFileNameExtentionToOpenDict());
+ + getFileNameExtensionToOpenDict());
// TODO: Make BinaryDictionary's constructor be able to accept filename
// without extension.
mBinaryDictionary = new BinaryDictionary(
@@ -521,7 +521,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
}
final File file = new File(mContext.getFilesDir(), mFilename
- + getFileNameExtentionToOpenDict());
+ + getFileNameExtensionToOpenDict());
final String filename = file.getAbsolutePath();
final long length = file.length();
@@ -703,7 +703,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
/**
* Generate binary dictionary using DictionaryWriter.
*/
- protected void asyncFlashAllBinaryDictionary() {
+ protected void asyncFlushBinaryDictionary() {
final Runnable newTask = new Runnable() {
@Override
public void run() {
diff --git a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
index 02b09fb0c..faa98963c 100644
--- a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
+++ b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
@@ -84,7 +84,7 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
}
// Flush pending writes.
// TODO: Remove after this class become to use a dynamic binary dictionary.
- asyncFlashAllBinaryDictionary();
+ asyncFlushBinaryDictionary();
}
@Override
@@ -121,7 +121,7 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
}
@Override
- protected String getFileNameExtentionToOpenDict() {
+ protected String getFileNameExtensionToOpenDict() {
// TODO: pass the directory name instead
return "/" + FormatSpec.HEADER_FILE_EXTENSION;
}
@@ -240,7 +240,7 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
// Clear the node structure on memory
clear();
// Then flush the cleared state of the dictionary on disk.
- asyncFlashAllBinaryDictionary();
+ asyncFlushBinaryDictionary();
}
/* package */ void decayIfNeeded() {
diff --git a/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java b/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
index c2e97a36f..d12aad639 100644
--- a/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
+++ b/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
@@ -20,7 +20,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
/**
- * This class is a holder of a result of asynchronous computation.
+ * This class is a holder of the result of an asynchronous computation.
*
* @param <E> the type of the result.
*/
@@ -36,9 +36,9 @@ public class AsyncResultHolder<E> {
}
/**
- * Sets the result value to this holder.
+ * Sets the result value of this holder.
*
- * @param result the value which is set.
+ * @param result the value to set.
*/
public void set(final E result) {
synchronized(mLock) {
@@ -54,12 +54,12 @@ public class AsyncResultHolder<E> {
* Causes the current thread to wait unless the value is set or the specified time is elapsed.
*
* @param defaultValue the default value.
- * @param timeOut the time to wait.
- * @return if the result is set until the time limit then the result, otherwise defaultValue.
+ * @param timeOut the maximum time to wait.
+ * @return if the result is set before the time limit then the result, otherwise defaultValue.
*/
public E get(final E defaultValue, final long timeOut) {
try {
- if(mLatch.await(timeOut, TimeUnit.MILLISECONDS)) {
+ if (mLatch.await(timeOut, TimeUnit.MILLISECONDS)) {
return mResult;
} else {
return defaultValue;