am dc22b722: Merge "Clean up unused return value"
* commit 'dc22b7226a61bb7fa5adbecee23999f8cbf902e3': Clean up unused return valuemain
commit
37c2f94b59
|
@ -989,16 +989,14 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
/**
|
/**
|
||||||
* Called when a key is long pressed.
|
* Called when a key is long pressed.
|
||||||
* @param tracker the pointer tracker which pressed the parent key
|
* @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()) {
|
if (isShowingMoreKeysPanel()) {
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
final Key key = tracker.getKey();
|
final Key key = tracker.getKey();
|
||||||
if (key == null) {
|
if (key == null) {
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
||||||
ResearchLogger.mainKeyboardView_onLongPress();
|
ResearchLogger.mainKeyboardView_onLongPress();
|
||||||
|
@ -1010,17 +1008,17 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
invokeCodeInput(embeddedCode);
|
invokeCodeInput(embeddedCode);
|
||||||
invokeReleaseKey(code);
|
invokeReleaseKey(code);
|
||||||
KeyboardSwitcher.getInstance().hapticAndAudioFeedback(code);
|
KeyboardSwitcher.getInstance().hapticAndAudioFeedback(code);
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
if (code == Constants.CODE_SPACE || code == Constants.CODE_LANGUAGE_SWITCH) {
|
if (code == Constants.CODE_SPACE || code == Constants.CODE_LANGUAGE_SWITCH) {
|
||||||
// Long pressing the space key invokes IME switcher dialog.
|
// Long pressing the space key invokes IME switcher dialog.
|
||||||
if (invokeCustomRequest(LatinIME.CODE_SHOW_INPUT_METHOD_PICKER)) {
|
if (invokeCustomRequest(LatinIME.CODE_SHOW_INPUT_METHOD_PICKER)) {
|
||||||
tracker.onLongPressed();
|
tracker.onLongPressed();
|
||||||
invokeReleaseKey(code);
|
invokeReleaseKey(code);
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return openMoreKeysPanel(key, tracker);
|
openMoreKeysPanel(key, tracker);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean invokeCustomRequest(final int requestCode) {
|
private boolean invokeCustomRequest(final int requestCode) {
|
||||||
|
@ -1036,10 +1034,10 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
mKeyboardActionListener.onReleaseKey(code, false);
|
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());
|
final MoreKeysPanel moreKeysPanel = onCreateMoreKeysPanel(key, getContext());
|
||||||
if (moreKeysPanel == null) {
|
if (moreKeysPanel == null) {
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final int[] lastCoords = CoordinateUtils.newInstance();
|
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 translatedX = moreKeysPanel.translateX(CoordinateUtils.x(lastCoords));
|
||||||
final int translatedY = moreKeysPanel.translateY(CoordinateUtils.y(lastCoords));
|
final int translatedY = moreKeysPanel.translateY(CoordinateUtils.y(lastCoords));
|
||||||
tracker.onShowMoreKeysPanel(translatedX, translatedY, moreKeysPanel);
|
tracker.onShowMoreKeysPanel(translatedX, translatedY, moreKeysPanel);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInSlidingKeyInput() {
|
public boolean isInSlidingKeyInput() {
|
||||||
|
|
Loading…
Reference in New Issue