diff options
author | 2013-06-25 17:03:05 +0900 | |
---|---|---|
committer | 2013-06-25 17:09:12 +0900 | |
commit | 03118a276014cd44d44d0d46f4f39622765e8e0c (patch) | |
tree | a111d9338181b849192b85838760ce8dd679c604 /java/src/com/android/inputmethod/latin | |
parent | 10585620bdfad418f6c093ab4bfd8efaa2d84abf (diff) | |
download | latinime-03118a276014cd44d44d0d46f4f39622765e8e0c.tar.gz latinime-03118a276014cd44d44d0d46f4f39622765e8e0c.tar.xz latinime-03118a276014cd44d44d0d46f4f39622765e8e0c.zip |
Cleanup under the utils package
Change-Id: If2f7bd1346cc5085bf57645830f0faac44d017e4
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r-- | java/src/com/android/inputmethod/latin/RichInputConnection.java | 6 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/SubtypeLocale.java | 4 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/utils/DebugLogUtils.java (renamed from java/src/com/android/inputmethod/latin/utils/LogUtils.java) | 4 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/utils/Utils.java | 14 |
4 files changed, 7 insertions, 21 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index dc3aaaa9b..6e3e7b218 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -28,7 +28,7 @@ import android.view.inputmethod.InputConnection; import com.android.inputmethod.latin.define.ProductionFlag; import com.android.inputmethod.latin.utils.CapsModeUtils; -import com.android.inputmethod.latin.utils.LogUtils; +import com.android.inputmethod.latin.utils.DebugLogUtils; import com.android.inputmethod.latin.utils.StringUtils; import com.android.inputmethod.research.ResearchLogger; @@ -107,7 +107,7 @@ public final class RichInputConnection { + "\nActual text = " + reference.length() + " " + reference; ((LatinIME)mParent).debugDumpStateAndCrashWithException(context); } else { - Log.e(TAG, LogUtils.getStackTrace(2)); + Log.e(TAG, DebugLogUtils.getStackTrace(2)); Log.e(TAG, "Exp <> Actual : " + mCurrentCursorPosition + " <> " + et.selectionStart); } } @@ -156,7 +156,7 @@ public final class RichInputConnection { if (mNestLevel != 1) { // TODO: exception instead Log.e(TAG, "Batch edit level incorrect : " + mNestLevel); - Log.e(TAG, LogUtils.getStackTrace(4)); + Log.e(TAG, DebugLogUtils.getStackTrace(4)); } } diff --git a/java/src/com/android/inputmethod/latin/SubtypeLocale.java b/java/src/com/android/inputmethod/latin/SubtypeLocale.java index 3f94aca3a..30df2eb4e 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeLocale.java +++ b/java/src/com/android/inputmethod/latin/SubtypeLocale.java @@ -26,9 +26,9 @@ import android.util.Log; import android.view.inputmethod.InputMethodSubtype; import com.android.inputmethod.latin.utils.CollectionUtils; +import com.android.inputmethod.latin.utils.DebugLogUtils; import com.android.inputmethod.latin.utils.LocaleUtils; import com.android.inputmethod.latin.utils.LocaleUtils.RunInLocale; -import com.android.inputmethod.latin.utils.LogUtils; import com.android.inputmethod.latin.utils.StringUtils; import java.util.HashMap; @@ -242,7 +242,7 @@ public final class SubtypeLocale { + " nameResId=" + subtype.getNameResId() + " locale=" + subtype.getLocale() + " extra=" + subtype.getExtraValue() - + "\n" + LogUtils.getStackTrace()); + + "\n" + DebugLogUtils.getStackTrace()); return ""; } } diff --git a/java/src/com/android/inputmethod/latin/utils/LogUtils.java b/java/src/com/android/inputmethod/latin/utils/DebugLogUtils.java index a0d2e0495..c4ead0ad1 100644 --- a/java/src/com/android/inputmethod/latin/utils/LogUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/DebugLogUtils.java @@ -23,8 +23,8 @@ import com.android.inputmethod.latin.LatinImeLogger; /** * A class for logging and debugging utility methods. */ -public final class LogUtils { - private final static String TAG = LogUtils.class.getSimpleName(); +public final class DebugLogUtils { + private final static String TAG = DebugLogUtils.class.getSimpleName(); private final static boolean sDBG = LatinImeLogger.sDBG; /** diff --git a/java/src/com/android/inputmethod/latin/utils/Utils.java b/java/src/com/android/inputmethod/latin/utils/Utils.java index 390d306c8..8070a6ea4 100644 --- a/java/src/com/android/inputmethod/latin/utils/Utils.java +++ b/java/src/com/android/inputmethod/latin/utils/Utils.java @@ -63,20 +63,6 @@ public final class Utils { // This utility class is not publicly instantiable. } - /** - * Cancel an {@link AsyncTask}. - * - * @param mayInterruptIfRunning <tt>true</tt> if the thread executing this - * task should be interrupted; otherwise, in-progress tasks are allowed - * to complete. - */ - public static void cancelTask(final AsyncTask<?, ?, ?> task, - final boolean mayInterruptIfRunning) { - if (task != null && task.getStatus() != AsyncTask.Status.FINISHED) { - task.cancel(mayInterruptIfRunning); - } - } - // TODO: Make this an external class public /* for test */ static final class RingCharBuffer { public /* for test */ static final int BUFSIZE = 20; |