diff options
author | 2014-06-27 21:38:57 +0900 | |
---|---|---|
committer | 2014-06-30 21:58:52 +0900 | |
commit | 6345562e2b351221a9bc0341f7dbd26095290b64 (patch) | |
tree | 65d551ad9187b4a72cf278c5b02e208f6ebb9fb7 /java/src/com/android/inputmethod/event | |
parent | 3fb5a541a44bc9a82663895fd09c342299f45b56 (diff) | |
download | latinime-6345562e2b351221a9bc0341f7dbd26095290b64.tar.gz latinime-6345562e2b351221a9bc0341f7dbd26095290b64.tar.xz latinime-6345562e2b351221a9bc0341f7dbd26095290b64.zip |
[SD4] Restart suggestions on language change
...otherwise we can't recompute the composition when we
change scripts.
This also fixes when we register that we need to take note
that the current subtype was used. Luckily this is a good
occasion for some cleanup that I've wanted to do for some
time: use InputTransaction for onTextInput (with the goal
to ultimately remove it entirely)
Bug: 15840116
Change-Id: Ie4f4f9157b66b79237eeb3db75535803124d3e19
Diffstat (limited to 'java/src/com/android/inputmethod/event')
-rw-r--r-- | java/src/com/android/inputmethod/event/InputTransaction.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/event/InputTransaction.java b/java/src/com/android/inputmethod/event/InputTransaction.java index 4fe9b403e..cdff265c6 100644 --- a/java/src/com/android/inputmethod/event/InputTransaction.java +++ b/java/src/com/android/inputmethod/event/InputTransaction.java @@ -41,6 +41,7 @@ public class InputTransaction { // Outputs private int mRequiredShiftUpdate = SHIFT_NO_UPDATE; private boolean mRequiresUpdateSuggestions = false; + private boolean mDidAffectContents = false; public InputTransaction(final SettingsValues settingsValues, final Event event, final long timestamp, final int spaceState, final int shiftState) { @@ -81,4 +82,19 @@ public class InputTransaction { public boolean requiresUpdateSuggestions() { return mRequiresUpdateSuggestions; } + + /** + * Indicate that this transaction affected the contents of the editor. + */ + public void setDidAffectContents() { + mDidAffectContents = true; + } + + /** + * Find out whether this transaction affected contents of the editor. + * @return Whether this transaction affected contents of the editor. + */ + public boolean didAffectContents() { + return mDidAffectContents; + } } |