diff options
author | 2010-10-25 18:34:19 +0900 | |
---|---|---|
committer | 2010-10-25 19:55:06 +0900 | |
commit | 29ff343f77365e8a11a9b26a0e16a9dc5b7d72d7 (patch) | |
tree | d247d185388960535dee68626d7600cd248c6663 /java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java | |
parent | 55952c9868e5bdd61c7356f0ccf9168b36a4e9d6 (diff) | |
download | latinime-29ff343f77365e8a11a9b26a0e16a9dc5b7d72d7.tar.gz latinime-29ff343f77365e8a11a9b26a0e16a9dc5b7d72d7.tar.xz latinime-29ff343f77365e8a11a9b26a0e16a9dc5b7d72d7.zip |
Remove LatinKeyboardBaseView.isShifted() and setShifted() for refactoring
Change-Id: I9a1106b679a9ffb3ae959d90377eef096e5af842
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java index 2bf70bf82..b2635ad9c 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java @@ -639,34 +639,6 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx } /** - * Sets the state of the shift key of the keyboard, if any. - * @param shifted whether or not to enable the state of the shift key - * @return true if the shift key state changed, false if there was no change - */ - public boolean setShifted(boolean shifted) { - if (mKeyboard != null) { - if (mKeyboard.setShifted(shifted)) { - // The whole keyboard probably needs to be redrawn - invalidateAllKeys(); - return true; - } - } - return false; - } - - /** - * Returns the state of the shift key of the keyboard, if any. - * @return true if the shift is in a pressed state, false otherwise. If there is - * no shift key on the keyboard or there is no keyboard attached, it returns false. - */ - public boolean isShifted() { - if (mKeyboard != null) { - return mKeyboard.isShifted(); - } - return false; - } - - /** * Enables or disables the key feedback popup. This is a popup that shows a magnified * version of the depressed key. By default the preview is enabled. * @param previewEnabled whether or not to enable the key feedback popup @@ -1247,7 +1219,12 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx mMiniKeyboardOriginX = adjustedX + container.getPaddingLeft() - mWindowOffset[0]; mMiniKeyboardOriginY = y + container.getPaddingTop() - mWindowOffset[1]; mMiniKeyboard.setPopupOffset(adjustedX, y); - mMiniKeyboard.setShifted(isShifted()); + // TODO: change the below line to use getLatinKeyboard() instead of getKeyboard() + BaseKeyboard baseMiniKeyboard = mMiniKeyboard.getKeyboard(); + if (baseMiniKeyboard != null && baseMiniKeyboard.setShifted(mKeyboard == null + ? false : mKeyboard.isShifted())) { + mMiniKeyboard.invalidateAllKeys(); + } // Mini keyboard needs no pop-up key preview displayed. mMiniKeyboard.setPreviewEnabled(false); mMiniKeyboardPopup.setContentView(container); |