aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/event/InputTransaction.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/event/InputTransaction.java')
-rw-r--r--java/src/com/android/inputmethod/event/InputTransaction.java16
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;
+ }
}