aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-07-05 12:05:07 +0900
committerJean Chalard <jchalard@google.com>2012-07-06 13:07:48 +0900
commit746e014eb54f0d6278b948868dff4863bfe85ad8 (patch)
treec1543945051a59b1945efe2dd79621de95db5b0c /java/src
parent0e9e7e337defe97d4ede8c59d0e925f5401f9292 (diff)
downloadlatinime-746e014eb54f0d6278b948868dff4863bfe85ad8.tar.gz
latinime-746e014eb54f0d6278b948868dff4863bfe85ad8.tar.xz
latinime-746e014eb54f0d6278b948868dff4863bfe85ad8.zip
Show predictions in the right cases (A58)
After reverting an auto-correct we always have a separator after the previously inserted word, and the cursor is never touching a word. Showing predictions is the right thing to do, while calling postUpdateSuggestions will invariably yield an invariably blank suggestion strip, which is not very helpful. Likewise, after we pick a suggestion, we should be showing the predictions unless showing the addToDictionary hint. There was a bug here in the corner case that the word would be a candidate for user dictionary, but the user dictionary provider is not available: in this case we should be showing predictions, but we were showing an unhelpful empty suggestion bar. Change-Id: I287bb5eb4af762bd5a433e85e185fab6d203e91a
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 90e4fcf89..62c7bbda7 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1874,7 +1874,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mSuggestionsView.showAddToDictionaryHint(
suggestion, mCurrentSettings.mHintToSaveText);
} else {
- mHandler.postUpdateSuggestions();
+ // Here we just manually picked a suggestion. We should be showing the predictions!
+ mHandler.postUpdateBigramPredictions();
}
}
}
@@ -2011,7 +2012,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Don't restart suggestion yet. We'll restart if the user deletes the
// separator.
mLastComposedWord = LastComposedWord.NOT_A_COMPOSED_WORD;
- mHandler.postUpdateSuggestions();
+ // We have a separator between the word and the cursor: we should show predictions.
+ mHandler.postUpdateBigramPredictions();
}
public boolean isWordSeparator(int code) {