Merge "Remove unused MoreKeysPanel argument from Controller interface"
commit
8204078a84
|
@ -700,12 +700,12 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCancelMoreKeysPanel(final MoreKeysPanel panel) {
|
public void onCancelMoreKeysPanel() {
|
||||||
PointerTracker.dismissAllMoreKeysPanels();
|
PointerTracker.dismissAllMoreKeysPanels();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDismissMoreKeysPanel(final MoreKeysPanel panel) {
|
public void onDismissMoreKeysPanel() {
|
||||||
dimEntireKeyboard(false /* dimmed */);
|
dimEntireKeyboard(false /* dimmed */);
|
||||||
if (isShowingMoreKeysPanel()) {
|
if (isShowingMoreKeysPanel()) {
|
||||||
mMoreKeysPanel.removeFromParent();
|
mMoreKeysPanel.removeFromParent();
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
|
||||||
onMoveKeyInternal(x, y, pointerId);
|
onMoveKeyInternal(x, y, pointerId);
|
||||||
if (hasOldKey && mCurrentKey == null) {
|
if (hasOldKey && mCurrentKey == null) {
|
||||||
// If the pointer has moved too far away from any target then cancel the panel.
|
// If the pointer has moved too far away from any target then cancel the panel.
|
||||||
mController.onCancelMoreKeysPanel(this);
|
mController.onCancelMoreKeysPanel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
|
||||||
if (!isShowingInParent()) {
|
if (!isShowingInParent()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mController.onDismissMoreKeysPanel(this);
|
mController.onDismissMoreKeysPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -29,26 +29,22 @@ public interface MoreKeysPanel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the current {@link MoreKeysPanel} from the target view.
|
* Remove the current {@link MoreKeysPanel} from the target view.
|
||||||
* @param panel the panel to be dismissed.
|
|
||||||
*/
|
*/
|
||||||
// TODO: Remove unused {@link MoreKeysPanel} argument.
|
public void onDismissMoreKeysPanel();
|
||||||
public void onDismissMoreKeysPanel(final MoreKeysPanel panel);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instructs the parent to cancel the panel (e.g., when entering a different input mode).
|
* Instructs the parent to cancel the panel (e.g., when entering a different input mode).
|
||||||
* @param panel the panel to be canceled.
|
|
||||||
*/
|
*/
|
||||||
// TODO: Remove unused {@link MoreKeysPanel} argument.
|
public void onCancelMoreKeysPanel();
|
||||||
public void onCancelMoreKeysPanel(final MoreKeysPanel panel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Controller EMPTY_CONTROLLER = new Controller() {
|
public static final Controller EMPTY_CONTROLLER = new Controller() {
|
||||||
@Override
|
@Override
|
||||||
public void onShowMoreKeysPanel(final MoreKeysPanel panel) {}
|
public void onShowMoreKeysPanel(final MoreKeysPanel panel) {}
|
||||||
@Override
|
@Override
|
||||||
public void onDismissMoreKeysPanel(final MoreKeysPanel panel) {}
|
public void onDismissMoreKeysPanel() {}
|
||||||
@Override
|
@Override
|
||||||
public void onCancelMoreKeysPanel(final MoreKeysPanel panel) {}
|
public void onCancelMoreKeysPanel() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -280,8 +280,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
private final MoreKeysPanel.Controller mMoreSuggestionsController =
|
private final MoreKeysPanel.Controller mMoreSuggestionsController =
|
||||||
new MoreKeysPanel.Controller() {
|
new MoreKeysPanel.Controller() {
|
||||||
@Override
|
@Override
|
||||||
public void onDismissMoreKeysPanel(final MoreKeysPanel panel) {
|
public void onDismissMoreKeysPanel() {
|
||||||
mMainKeyboardView.onDismissMoreKeysPanel(panel);
|
mMainKeyboardView.onDismissMoreKeysPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -290,7 +290,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCancelMoreKeysPanel(final MoreKeysPanel panel) {
|
public void onCancelMoreKeysPanel() {
|
||||||
dismissMoreSuggestionsPanel();
|
dismissMoreSuggestionsPanel();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -321,8 +321,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
}
|
}
|
||||||
// Dismiss another {@link MoreKeysPanel} that may be being showed, for example
|
// Dismiss another {@link MoreKeysPanel} that may be being showed, for example
|
||||||
// {@link MoreKeysKeyboardView}.
|
// {@link MoreKeysKeyboardView}.
|
||||||
// TODO: Remove unused null argument.
|
mMainKeyboardView.onDismissMoreKeysPanel();
|
||||||
mMainKeyboardView.onDismissMoreKeysPanel(null /* unused */);
|
|
||||||
// Dismiss all key previews and sliding key input preview that may be being showed.
|
// Dismiss all key previews and sliding key input preview that may be being showed.
|
||||||
mMainKeyboardView.dismissAllKeyPreviews();
|
mMainKeyboardView.dismissAllKeyPreviews();
|
||||||
mMainKeyboardView.dismissSlidingKeyInputPreview();
|
mMainKeyboardView.dismissSlidingKeyInputPreview();
|
||||||
|
|
Loading…
Reference in New Issue