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

Commit dc22b722 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Clean up unused return value"

parents d8835326 96efb125
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -989,16 +989,14 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
    /**
     * Called when a key is long pressed.
     * @param tracker the pointer tracker which pressed the parent key
     * @return true if the long press is handled, false otherwise. Subclasses should call the
     * method on the base class if the subclass doesn't wish to handle the call.
     */
    private boolean onLongPress(final PointerTracker tracker) {
    private void onLongPress(final PointerTracker tracker) {
        if (isShowingMoreKeysPanel()) {
            return false;
            return;
        }
        final Key key = tracker.getKey();
        if (key == null) {
            return false;
            return;
        }
        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
            ResearchLogger.mainKeyboardView_onLongPress();
@@ -1010,17 +1008,17 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
            invokeCodeInput(embeddedCode);
            invokeReleaseKey(code);
            KeyboardSwitcher.getInstance().hapticAndAudioFeedback(code);
            return true;
            return;
        }
        if (code == Constants.CODE_SPACE || code == Constants.CODE_LANGUAGE_SWITCH) {
            // Long pressing the space key invokes IME switcher dialog.
            if (invokeCustomRequest(LatinIME.CODE_SHOW_INPUT_METHOD_PICKER)) {
                tracker.onLongPressed();
                invokeReleaseKey(code);
                return true;
                return;
            }
        }
        return openMoreKeysPanel(key, tracker);
        openMoreKeysPanel(key, tracker);
    }

    private boolean invokeCustomRequest(final int requestCode) {
@@ -1036,10 +1034,10 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
        mKeyboardActionListener.onReleaseKey(code, false);
    }

    private boolean openMoreKeysPanel(final Key key, final PointerTracker tracker) {
    private void openMoreKeysPanel(final Key key, final PointerTracker tracker) {
        final MoreKeysPanel moreKeysPanel = onCreateMoreKeysPanel(key, getContext());
        if (moreKeysPanel == null) {
            return false;
            return;
        }

        final int[] lastCoords = CoordinateUtils.newInstance();
@@ -1061,7 +1059,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
        final int translatedX = moreKeysPanel.translateX(CoordinateUtils.x(lastCoords));
        final int translatedY = moreKeysPanel.translateY(CoordinateUtils.y(lastCoords));
        tracker.onShowMoreKeysPanel(translatedX, translatedY, moreKeysPanel);
        return true;
    }

    public boolean isInSlidingKeyInput() {