diff options
author | 2012-03-15 14:40:45 +0900 | |
---|---|---|
committer | 2012-03-15 14:48:47 +0900 | |
commit | 4e746588836474b87960f392c716852f3b373c86 (patch) | |
tree | 0eb8dac6b2554fba1870ca8256921ee15f567bb2 /java/src | |
parent | 123407261cdab5d3eced0b18eaa7a1d59d6ae887 (diff) | |
download | latinime-4e746588836474b87960f392c716852f3b373c86.tar.gz latinime-4e746588836474b87960f392c716852f3b373c86.tar.xz latinime-4e746588836474b87960f392c716852f3b373c86.zip |
Optimization
All calls to this methods are made with an actual String. No sense
beating ourselves with an interface stick.
Change-Id: I6ef98286be6f81f73864b04f3a17e68f36a6e542
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 6 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 82cfbbf17..09eac4910 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -121,21 +121,21 @@ public class SuggestedWords { public static class SuggestedWordInfo { public final CharSequence mWord; - private final CharSequence mDebugString; + private final String mDebugString; public SuggestedWordInfo(final CharSequence word) { mWord = word; mDebugString = ""; } - public SuggestedWordInfo(final CharSequence word, final CharSequence debugString) { + public SuggestedWordInfo(final CharSequence word, final String debugString) { mWord = word; if (null == debugString) throw new NullPointerException(""); mDebugString = debugString; } public String getDebugString() { - return mDebugString.toString(); + return mDebugString; } @Override diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java index b8f92e40f..a4f0cf5df 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java @@ -502,11 +502,11 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, hintView, 1.0f - mCenterSuggestionWeight, ViewGroup.LayoutParams.MATCH_PARENT); } - private static CharSequence getDebugInfo(SuggestedWords suggestions, int pos) { + private static String getDebugInfo(SuggestedWords suggestions, int pos) { if (DBG && pos < suggestions.size()) { final SuggestedWordInfo wordInfo = suggestions.getInfo(pos); if (wordInfo != null) { - final CharSequence debugInfo = wordInfo.getDebugString(); + final String debugInfo = wordInfo.getDebugString(); if (!TextUtils.isEmpty(debugInfo)) { return debugInfo; } |