From f95e94722345ef291adc5833103c1e9210f67fc9 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 19 Aug 2010 18:20:09 +0900 Subject: 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 --- java/src/com/android/inputmethod/latin/LatinKeyboardView.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardView.java') 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. -- cgit v1.2.3-83-g751a