Remove getTimer() reference except from PointerTracker

Change-Id: I142eb5b61b932e60452b9b3514d6ddca3d21ec9d
main
Tadashi G. Takaoka 2013-08-01 16:22:53 +09:00
parent c83da06939
commit 5433ce64c0
2 changed files with 15 additions and 3 deletions

View File

@ -273,7 +273,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
public void startDoubleTapShiftKeyTimer() { public void startDoubleTapShiftKeyTimer() {
final MainKeyboardView keyboardView = getMainKeyboardView(); final MainKeyboardView keyboardView = getMainKeyboardView();
if (keyboardView != null) { if (keyboardView != null) {
keyboardView.getTimerProxy().startDoubleTapShiftKeyTimer(); keyboardView.startDoubleTapShiftKeyTimer();
} }
} }
@ -282,7 +282,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
public void cancelDoubleTapShiftKeyTimer() { public void cancelDoubleTapShiftKeyTimer() {
final MainKeyboardView keyboardView = getMainKeyboardView(); final MainKeyboardView keyboardView = getMainKeyboardView();
if (keyboardView != null) { if (keyboardView != null) {
keyboardView.getTimerProxy().cancelDoubleTapShiftKeyTimer(); keyboardView.cancelDoubleTapShiftKeyTimer();
} }
} }
@ -290,7 +290,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
@Override @Override
public boolean isInDoubleTapShiftKeyTimeout() { public boolean isInDoubleTapShiftKeyTimeout() {
final MainKeyboardView keyboardView = getMainKeyboardView(); final MainKeyboardView keyboardView = getMainKeyboardView();
return keyboardView != null && keyboardView.getTimerProxy().isInDoubleTapShiftKeyTimeout(); return keyboardView != null && keyboardView.isInDoubleTapShiftKeyTimeout();
} }
/** /**

View File

@ -1007,6 +1007,18 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
} }
} }
public void startDoubleTapShiftKeyTimer() {
mKeyTimerHandler.startDoubleTapShiftKeyTimer();
}
public void cancelDoubleTapShiftKeyTimer() {
mKeyTimerHandler.cancelDoubleTapShiftKeyTimer();
}
public boolean isInDoubleTapShiftKeyTimeout() {
return mKeyTimerHandler.isInDoubleTapShiftKeyTimeout();
}
@Override @Override
public boolean dispatchTouchEvent(MotionEvent event) { public boolean dispatchTouchEvent(MotionEvent event) {
if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) { if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {