aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/KeyboardSwitcher.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/KeyboardSwitcher.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/KeyboardSwitcher.java')
-rw-r--r--java/src/com/android/inputmethod/latin/KeyboardSwitcher.java13
1 files changed, 13 insertions, 0 deletions
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);