aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-08-19 18:20:09 +0900
committerTadashi G. Takaoka <takaoka@google.com>2010-08-20 11:42:28 +0900
commitf95e94722345ef291adc5833103c1e9210f67fc9 (patch)
tree014dc68350cd44de5d2b24c32401b2308008cad3 /java/src/com/android/inputmethod/latin/LatinKeyboardView.java
parent103634dd8ddf8d6e893e94125e2108c61af2b7e5 (diff)
downloadlatinime-f95e94722345ef291adc5833103c1e9210f67fc9.tar.gz
latinime-f95e94722345ef291adc5833103c1e9210f67fc9.tar.xz
latinime-f95e94722345ef291adc5833103c1e9210f67fc9.zip
Refactor shift state and caps lock state handling code.
Move setShifted and setShifLocked methods to KeyboardSwitcher, then delegate to LatinKeyboardView. Bug: 2910379 Change-Id: I5dba70ec0dfc7a1ed67f1e05d54a2bd92252ed24
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardView.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinKeyboardView.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
index bce2cde25..38d9cefb1 100644
--- a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
@@ -124,6 +124,16 @@ public class LatinKeyboardView extends LatinKeyboardBaseView {
return label;
}
+ public boolean setShiftLocked(boolean shiftLocked) {
+ Keyboard keyboard = getKeyboard();
+ if (keyboard != null && keyboard instanceof LatinKeyboard) {
+ ((LatinKeyboard)keyboard).setShiftLocked(shiftLocked);
+ invalidateAllKeys();
+ return true;
+ }
+ return false;
+ }
+
/**
* This function checks to see if we need to handle any sudden jumps in the pointer location
* that could be due to a multi-touch being treated as a move by the firmware or hardware.