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 --- .../src/com/android/inputmethod/latin/KeyboardSwitcher.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'java/src/com/android/inputmethod/latin/KeyboardSwitcher.java') diff --git a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java index ed6adce9e..d04930303 100644 --- a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java @@ -24,6 +24,7 @@ import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; import android.content.res.Resources; +import android.inputmethodservice.Keyboard; import android.preference.PreferenceManager; import android.view.InflateException; @@ -343,6 +344,18 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha return false; } + void setShifted(boolean shifted) { + if (mInputView != null) { + mInputView.setShifted(shifted); + } + } + + void setShiftLocked(boolean shiftLocked) { + if (mInputView != null) { + mInputView.setShiftLocked(shiftLocked); + } + } + void toggleShift() { if (mCurrentId.equals(mSymbolsId)) { LatinKeyboard symbolsKeyboard = getKeyboard(mSymbolsId); -- cgit v1.2.3-83-g751a