aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-04-15 02:24:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-04-15 02:24:41 +0000
commit82d3a56b094557514bffc2a3f22d08b58c495cba (patch)
tree29674a73f05d0a7653820ad80f5fd93ccedde9a6 /tests/src
parent751dc070bf5cbf2534eb86f5dbc05ec38fcffbee (diff)
parentddc163988a7e2e910ff3cac26ed580bac123fda0 (diff)
downloadlatinime-82d3a56b094557514bffc2a3f22d08b58c495cba.tar.gz
latinime-82d3a56b094557514bffc2a3f22d08b58c495cba.tar.xz
latinime-82d3a56b094557514bffc2a3f22d08b58c495cba.zip
Merge "[IL134] Add an alternative path to getCurrentAutoCapsState"
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/keyboard/internal/MockKeyboardSwitcher.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/MockKeyboardSwitcher.java b/tests/src/com/android/inputmethod/keyboard/internal/MockKeyboardSwitcher.java
index 6e3e37add..7b1a2355c 100644
--- a/tests/src/com/android/inputmethod/keyboard/internal/MockKeyboardSwitcher.java
+++ b/tests/src/com/android/inputmethod/keyboard/internal/MockKeyboardSwitcher.java
@@ -130,6 +130,12 @@ public class MockKeyboardSwitcher implements KeyboardState.SwitchActions {
}
@Override
+ public void requestUpdatingShiftState(final int currentAutoCapsState,
+ final int currentRecapitalizeState) {
+ mState.onUpdateShiftState(currentAutoCapsState, currentRecapitalizeState);
+ }
+
+ @Override
public void startDoubleTapShiftKeyTimer() {
mIsInDoubleTapShiftKeyTimeout = true;
}
@@ -161,7 +167,12 @@ public class MockKeyboardSwitcher implements KeyboardState.SwitchActions {
}
public void onReleaseKey(final int code, final boolean withSliding) {
- mState.onReleaseKey(code, withSliding);
+ onReleaseKey(code, withSliding, mAutoCapsState, RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE);
+ }
+
+ public void onReleaseKey(final int code, final boolean withSliding,
+ final int currentAutoCapsState, final int currentRecapitalizeState) {
+ mState.onReleaseKey(code, withSliding, currentAutoCapsState, currentRecapitalizeState);
if (mLongPressTimeoutCode == code) {
mLongPressTimeoutCode = 0;
}