diff options
author | 2014-08-04 22:07:15 +0900 | |
---|---|---|
committer | 2014-08-05 12:59:55 +0900 | |
commit | dd31a2dedf3259662cacac9baad638ec10a0baeb (patch) | |
tree | 801fbdc9e5f8ba31c0f39559507e24bf293a40ec /java/src/com/android/inputmethod/event/InputTransaction.java | |
parent | a88e95e07e2a67d4fd99c4928f4c2ae09d2ad245 (diff) | |
download | latinime-dd31a2dedf3259662cacac9baad638ec10a0baeb.tar.gz latinime-dd31a2dedf3259662cacac9baad638ec10a0baeb.tar.xz latinime-dd31a2dedf3259662cacac9baad638ec10a0baeb.zip |
[HW14] Cleanup
Do away with the didAutoCorrect local variables which are
unnatural to return out of all these functions.
Change-Id: I22024004d2c489de018beff812c2c589bfd8ca32
Diffstat (limited to 'java/src/com/android/inputmethod/event/InputTransaction.java')
-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 cdff265c6..5bc9111de 100644 --- a/java/src/com/android/inputmethod/event/InputTransaction.java +++ b/java/src/com/android/inputmethod/event/InputTransaction.java @@ -42,6 +42,7 @@ public class InputTransaction { private int mRequiredShiftUpdate = SHIFT_NO_UPDATE; private boolean mRequiresUpdateSuggestions = false; private boolean mDidAffectContents = false; + private boolean mDidAutoCorrect = false; public InputTransaction(final SettingsValues settingsValues, final Event event, final long timestamp, final int spaceState, final int shiftState) { @@ -97,4 +98,19 @@ public class InputTransaction { public boolean didAffectContents() { return mDidAffectContents; } + + /** + * Indicate that this transaction performed an auto-correction. + */ + public void setDidAutoCorrect() { + mDidAutoCorrect = true; + } + + /** + * Find out whether this transaction performed an auto-correction. + * @return Whether this transaction performed an auto-correction. + */ + public boolean didAutoCorrect() { + return mDidAutoCorrect; + } } |