aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/event/InputTransaction.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-03-04 16:46:42 +0900
committerJean Chalard <jchalard@google.com>2014-03-06 14:20:37 +0900
commitdb38d5cf632e6e20178ca3bc1603eabd71c74d41 (patch)
treea0b58bc26257ace56b33d0eeaa1d5f5bb0499d0d /java/src/com/android/inputmethod/event/InputTransaction.java
parent505453093443ce60ee4366e1343098a0e3244d36 (diff)
downloadlatinime-db38d5cf632e6e20178ca3bc1603eabd71c74d41.tar.gz
latinime-db38d5cf632e6e20178ca3bc1603eabd71c74d41.tar.xz
latinime-db38d5cf632e6e20178ca3bc1603eabd71c74d41.zip
[IL123] Put the settings values inside the transaction
A transaction should always operate with a consistent set of settings. It's better to have it reference them than to always pass them along. Bug: 8636060 Change-Id: I3c642dfea6be30712fc6cbb279c64f3185895791
Diffstat (limited to 'java/src/com/android/inputmethod/event/InputTransaction.java')
-rw-r--r--java/src/com/android/inputmethod/event/InputTransaction.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/event/InputTransaction.java b/java/src/com/android/inputmethod/event/InputTransaction.java
index d770c5af4..3f709a674 100644
--- a/java/src/com/android/inputmethod/event/InputTransaction.java
+++ b/java/src/com/android/inputmethod/event/InputTransaction.java
@@ -16,6 +16,8 @@
package com.android.inputmethod.event;
+import com.android.inputmethod.latin.settings.SettingsValues;
+
/**
* An object encapsulating a single transaction for input.
*/
@@ -30,6 +32,7 @@ public class InputTransaction {
public static final int SHIFT_UPDATE_LATER = 2;
// Initial conditions
+ public final SettingsValues mSettingsValues;
// If the key inserts a code point, mKeyCode is always equal to the code points. Otherwise,
// it's always a code that may not be a code point, typically a negative number.
public final int mKeyCode;
@@ -42,8 +45,10 @@ public class InputTransaction {
// Outputs
private int mRequiredShiftUpdate = SHIFT_NO_UPDATE;
- public InputTransaction(final int keyCode, final int x, final int y, final long timestamp,
- final int spaceState, final int shiftState) {
+ public InputTransaction(final SettingsValues settingsValues, final int keyCode,
+ final int x, final int y, final long timestamp, final int spaceState,
+ final int shiftState) {
+ mSettingsValues = settingsValues;
mKeyCode = keyCode;
mX = x;
mY = y;