Remove unused MoreKeysPanel argument from Controller interface

Bug: 13204690
Change-Id: Ife438e78d9bbbf796df20f95c2da7a4d50e5a035
main
Tadashi G. Takaoka 2014-03-03 21:02:35 +09:00
parent c451b4dee8
commit 1f215a58c9
4 changed files with 12 additions and 17 deletions

View File

@ -700,12 +700,12 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
}
@Override
public void onCancelMoreKeysPanel(final MoreKeysPanel panel) {
public void onCancelMoreKeysPanel() {
PointerTracker.dismissAllMoreKeysPanels();
}
@Override
public void onDismissMoreKeysPanel(final MoreKeysPanel panel) {
public void onDismissMoreKeysPanel() {
dimEntireKeyboard(false /* dimmed */);
if (isShowingMoreKeysPanel()) {
mMoreKeysPanel.removeFromParent();

View File

@ -122,7 +122,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
onMoveKeyInternal(x, y, pointerId);
if (hasOldKey && mCurrentKey == null) {
// 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()) {
return;
}
mController.onDismissMoreKeysPanel(this);
mController.onDismissMoreKeysPanel();
}
@Override

View File

@ -29,26 +29,22 @@ public interface MoreKeysPanel {
/**
* 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(final MoreKeysPanel panel);
public void onDismissMoreKeysPanel();
/**
* 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(final MoreKeysPanel panel);
public void onCancelMoreKeysPanel();
}
public static final Controller EMPTY_CONTROLLER = new Controller() {
@Override
public void onShowMoreKeysPanel(final MoreKeysPanel panel) {}
@Override
public void onDismissMoreKeysPanel(final MoreKeysPanel panel) {}
public void onDismissMoreKeysPanel() {}
@Override
public void onCancelMoreKeysPanel(final MoreKeysPanel panel) {}
public void onCancelMoreKeysPanel() {}
};
/**

View File

@ -280,8 +280,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
private final MoreKeysPanel.Controller mMoreSuggestionsController =
new MoreKeysPanel.Controller() {
@Override
public void onDismissMoreKeysPanel(final MoreKeysPanel panel) {
mMainKeyboardView.onDismissMoreKeysPanel(panel);
public void onDismissMoreKeysPanel() {
mMainKeyboardView.onDismissMoreKeysPanel();
}
@Override
@ -290,7 +290,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
}
@Override
public void onCancelMoreKeysPanel(final MoreKeysPanel panel) {
public void onCancelMoreKeysPanel() {
dismissMoreSuggestionsPanel();
}
};
@ -321,8 +321,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
}
// Dismiss another {@link MoreKeysPanel} that may be being showed, for example
// {@link MoreKeysKeyboardView}.
// TODO: Remove unused null argument.
mMainKeyboardView.onDismissMoreKeysPanel(null /* unused */);
mMainKeyboardView.onDismissMoreKeysPanel();
// Dismiss all key previews and sliding key input preview that may be being showed.
mMainKeyboardView.dismissAllKeyPreviews();
mMainKeyboardView.dismissSlidingKeyInputPreview();