diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index 001510d2d..c6c731570 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -481,9 +481,9 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack @Override public void dismissKeyPreview(final Key key) { - final KeyPreviewChoreographer keyPreviewChoreographer = mKeyPreviewChoreographer; if (isHardwareAccelerated()) { - keyPreviewChoreographer.dismissKeyPreview(key, true /* withAnimation */); + mKeyPreviewChoreographer.dismissKeyPreview(key, true /* withAnimation */); + return; } // TODO: Implement preference option to control key preview method and duration. mTimerHandler.postDismissKeyPreview(key, mKeyPreviewDrawParams.getLingerTimeout());