Fix a bug where changing auto-shift would cancel autorepeat.
Bug: 12453966 Change-Id: Idd65f732e2de0a7309e08315893c28cca63732c5
This commit is contained in:
parent
e5cdcaff65
commit
5cbda70956
2 changed files with 3 additions and 3 deletions
|
@ -424,8 +424,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setKeyboard(final Keyboard keyboard) {
|
public void setKeyboard(final Keyboard keyboard) {
|
||||||
// Remove any pending messages.
|
// Remove any pending messages, except dismissing preview and key repeat.
|
||||||
mKeyTimerHandler.cancelAllKeyTimers();
|
mKeyTimerHandler.cancelLongPressTimers();
|
||||||
super.setKeyboard(keyboard);
|
super.setKeyboard(keyboard);
|
||||||
mKeyDetector.setKeyboard(
|
mKeyDetector.setKeyboard(
|
||||||
keyboard, -getPaddingLeft(), -getPaddingTop() + getVerticalCorrection());
|
keyboard, -getPaddingLeft(), -getPaddingTop() + getVerticalCorrection());
|
||||||
|
|
|
@ -126,7 +126,7 @@ public final class TimerHandler extends LeakGuardHandlerWrapper<Callbacks> imple
|
||||||
removeMessages(MSG_LONGPRESS_SHIFT_KEY);
|
removeMessages(MSG_LONGPRESS_SHIFT_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cancelLongPressTimers() {
|
public void cancelLongPressTimers() {
|
||||||
removeMessages(MSG_LONGPRESS_KEY);
|
removeMessages(MSG_LONGPRESS_KEY);
|
||||||
removeMessages(MSG_LONGPRESS_SHIFT_KEY);
|
removeMessages(MSG_LONGPRESS_SHIFT_KEY);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue