diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinKeyboardView.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java index 22d39f7aa..f3d045bec 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java @@ -16,11 +16,11 @@ package com.android.inputmethod.latin; +import com.android.inputmethod.latin.BaseKeyboard.Key; + import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; -import android.inputmethodservice.Keyboard; -import android.inputmethodservice.Keyboard.Key; import android.os.Handler; import android.os.Message; import android.os.SystemClock; @@ -39,7 +39,7 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { static final int KEYCODE_NEXT_LANGUAGE = -104; static final int KEYCODE_PREV_LANGUAGE = -105; - private Keyboard mPhoneKeyboard; + private BaseKeyboard mPhoneKeyboard; /** Whether we've started dropping move events because we found a big jump */ private boolean mDroppingEvents; @@ -61,7 +61,7 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { super(context, attrs, defStyle); } - public void setPhoneKeyboard(Keyboard phoneKeyboard) { + public void setPhoneKeyboard(BaseKeyboard phoneKeyboard) { mPhoneKeyboard = phoneKeyboard; } @@ -76,7 +76,7 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { } @Override - public void setKeyboard(Keyboard k) { + public void setKeyboard(BaseKeyboard k) { super.setKeyboard(k); // One-seventh of the keyboard width seems like a reasonable threshold mJumpThresholdSquare = k.getMinWidth() / 7; @@ -108,10 +108,10 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { @Override protected CharSequence adjustCase(CharSequence label) { - Keyboard keyboard = getKeyboard(); - if (keyboard.isShifted() - && keyboard instanceof LatinKeyboard + BaseKeyboard keyboard = getKeyboard(); + if (keyboard instanceof LatinKeyboard && ((LatinKeyboard) keyboard).isAlphaKeyboard() + && keyboard.isShifted() && !TextUtils.isEmpty(label) && label.length() < 3 && Character.isLowerCase(label.charAt(0))) { label = label.toString().toUpperCase(); @@ -120,7 +120,7 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { } public boolean setShiftLocked(boolean shiftLocked) { - Keyboard keyboard = getKeyboard(); + BaseKeyboard keyboard = getKeyboard(); if (keyboard instanceof LatinKeyboard) { ((LatinKeyboard)keyboard).setShiftLocked(shiftLocked); invalidateAllKeys(); @@ -257,7 +257,7 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { private int mLastY; private Paint mPaint; - private void setKeyboardLocal(Keyboard k) { + private void setKeyboardLocal(BaseKeyboard k) { if (DEBUG_AUTO_PLAY) { findKeys(); if (mHandler2 == null) { |