aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-06-14 14:49:21 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-14 14:49:21 -0700
commitbe82f2974bff90ddf3c3bcf9c2cf0dae59c8cf58 (patch)
tree2b67f4bce32a43952d74e197117916c7ca6ffadc /java/src
parent42ecf39d04df9eb02e57cf29e63552bc04092857 (diff)
parent7cbd0478cfb66f406bb04c3b5c79da37b2263d66 (diff)
downloadlatinime-be82f2974bff90ddf3c3bcf9c2cf0dae59c8cf58.tar.gz
latinime-be82f2974bff90ddf3c3bcf9c2cf0dae59c8cf58.tar.xz
latinime-be82f2974bff90ddf3c3bcf9c2cf0dae59c8cf58.zip
am 7cbd0478: Merge "Do not display punctuation suggestions when bigrams are on." into jb-dev
* commit '7cbd0478cfb66f406bb04c3b5c79da37b2263d66': Do not display punctuation suggestions when bigrams are on.
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/suggestions/SuggestionsView.java2
2 files changed, 7 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 1f2982aed..97e898af9 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2053,12 +2053,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// showSuggestions will retrieve the word near the cursor, we don't want that here)
showSuggestions(suggestedWords, "");
} else {
- if (!isShowingPunctuationList()) setPunctuationSuggestions();
+ clearSuggestions();
}
}
public void setPunctuationSuggestions() {
- setSuggestions(mSettingsValues.mSuggestPuncList, false);
+ if (mSettingsValues.mBigramPredictionEnabled) {
+ clearSuggestions();
+ } else {
+ setSuggestions(mSettingsValues.mSuggestPuncList, false);
+ }
setAutoCorrectionIndicator(false);
setSuggestionStripShown(isSuggestionsStripVisible());
}
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
index 40e54a474..e86390b11 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
@@ -670,7 +670,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
}
public void setSuggestions(SuggestedWords suggestedWords) {
- if (suggestedWords == null || suggestedWords.size() == 0)
+ if (suggestedWords == null)
return;
clear();