Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 967d6073 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Disable popup preview and long press on disabled key

Bug: 4268147
Change-Id: Ibcb54791ef78737dd09d8a594b5a53b0909609d6
parent b5d17e52
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -379,7 +379,7 @@ public class Key {
     * @see android.graphics.drawable.StateListDrawable#setState(int[])
     */
    public int[] getCurrentDrawableState() {
        final boolean pressed = mEnabled && mPressed;
        final boolean pressed = mPressed;
        if (!mSticky && mFunctional) {
            if (pressed) {
                return KEY_STATE_FUNCTIONAL_PRESSED;
+5 −0
Original line number Diff line number Diff line
@@ -546,6 +546,9 @@ public class PointerTracker {
    }

    private void showKeyPreviewAndUpdateKeyGraphics(int keyIndex) {
        final Key key = getKey(keyIndex);
        if (key != null && !key.mEnabled)
            return;
        updateKeyGraphics(keyIndex);
        // The modifier key, such as shift key, should not be shown as preview when multi-touch is
        // supported. On the other hand, if multi-touch is not supported, the modifier key should
@@ -565,6 +568,8 @@ public class PointerTracker {
            return;
        }
        Key key = getKey(keyIndex);
        if (!key.mEnabled)
            return;
        if (key.mCode == Keyboard.CODE_SHIFT) {
            mHandler.startLongPressShiftTimer(mLongPressShiftKeyTimeout, keyIndex, this);
        } else if (key.mManualTemporaryUpperCaseCode != Keyboard.CODE_DUMMY