am d3e78fc5: Merge "Fix a bug where changing auto-shift would cancel autorepeat."

* commit 'd3e78fc5ce8be694bd97e6580d761f3e4ec6e519':
  Fix a bug where changing auto-shift would cancel autorepeat.
main
Jean Chalard 2014-01-08 20:56:20 -08:00 committed by Android Git Automerger
commit 738807fdc5
2 changed files with 3 additions and 3 deletions

View File

@ -424,8 +424,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
*/
@Override
public void setKeyboard(final Keyboard keyboard) {
// Remove any pending messages.
mKeyTimerHandler.cancelAllKeyTimers();
// Remove any pending messages, except dismissing preview and key repeat.
mKeyTimerHandler.cancelLongPressTimers();
super.setKeyboard(keyboard);
mKeyDetector.setKeyboard(
keyboard, -getPaddingLeft(), -getPaddingTop() + getVerticalCorrection());

View File

@ -126,7 +126,7 @@ public final class TimerHandler extends LeakGuardHandlerWrapper<Callbacks> imple
removeMessages(MSG_LONGPRESS_SHIFT_KEY);
}
private void cancelLongPressTimers() {
public void cancelLongPressTimers() {
removeMessages(MSG_LONGPRESS_KEY);
removeMessages(MSG_LONGPRESS_SHIFT_KEY);
}