aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-18 09:54:32 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-18 09:54:33 +0000
commit783dabb812d983a7c56dbb1071145c5e58da9ff1 (patch)
tree00813ef8bb786a72819d336e130e9ad0f5bc17da /java/src
parent266c8c5b1dbccbc4252fb79f042a4a5660c62763 (diff)
parent63be066544f19928d6a29c58c028cce7c95fa457 (diff)
downloadlatinime-783dabb812d983a7c56dbb1071145c5e58da9ff1.tar.gz
latinime-783dabb812d983a7c56dbb1071145c5e58da9ff1.tar.xz
latinime-783dabb812d983a7c56dbb1071145c5e58da9ff1.zip
Merge "Cleanup."
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java8
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java13
2 files changed, 3 insertions, 18 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index efc37c189..75ba24d75 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1307,12 +1307,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Nothing to do so far.
}
- // TODO: remove this, read this directly from mInputLogic or something in the tests
- @UsedForTesting
- public boolean isShowingPunctuationList() {
- return mInputLogic.isShowingPunctuationList(mSettings.getCurrent());
- }
-
// TODO[IL]: Define a clear interface for this
public boolean isSuggestionStripVisible() {
if (!hasSuggestionStripView()) {
@@ -1690,7 +1684,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// TODO: can this be removed somehow without breaking the tests?
@UsedForTesting
- /* package for test */ SuggestedWords getSuggestedWords() {
+ /* package for test */ SuggestedWords getSuggestedWordsForTest() {
// You may not use this method for anything else than debug
return DEBUG ? mInputLogic.mSuggestedWords : null;
}
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 9bf9d1f45..3fc2cf8fd 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -198,7 +198,7 @@ public final class InputLogic {
final SuggestedWords suggestedWords = mSuggestedWords;
final String suggestion = suggestionInfo.mWord;
// If this is a punctuation picked from the suggestion strip, pass it to onCodeInput
- if (suggestion.length() == 1 && isShowingPunctuationList(settingsValues)) {
+ if (suggestion.length() == 1 && suggestedWords.isPunctuationSuggestions()) {
// Word separators are suggested before the user inputs something.
// So, LatinImeLogger logs "" as a user's input.
LatinImeLogger.logOnManualSuggestion("", suggestion, index, suggestedWords);
@@ -821,7 +821,7 @@ public final class InputLogic {
if (maybeDoubleSpacePeriod(settingsValues, handler)) {
keyboardSwitcher.updateShiftState();
mSpaceState = SpaceState.DOUBLE;
- } else if (!isShowingPunctuationList(settingsValues)) {
+ } else if (!mSuggestedWords.isPunctuationSuggestions()) {
mSpaceState = SpaceState.WEAK;
}
}
@@ -1456,15 +1456,6 @@ public final class InputLogic {
}
/**
- * Find out if the punctuation list is shown in the suggestion strip.
- * @return whether the current suggestions are the punctuation list.
- */
- // TODO: make this private. It's used through LatinIME for tests.
- public boolean isShowingPunctuationList(final SettingsValues settingsValues) {
- return settingsValues.mSpacingAndPunctuations.mSuggestPuncList == mSuggestedWords;
- }
-
- /**
* Factor in auto-caps and manual caps and compute the current caps mode.
* @param settingsValues the current settings values.
* @param keyboardShiftMode the current shift mode of the keyboard. See