From db38d5cf632e6e20178ca3bc1603eabd71c74d41 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 4 Mar 2014 16:46:42 +0900 Subject: [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 --- java/src/com/android/inputmethod/event/InputTransaction.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/event/InputTransaction.java') 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; -- cgit v1.2.3-83-g751a