Fix dismiss key preview bug introduced by I658a5b16cc
Change-Id: I5248374dfe0504f6e64cc5d994e275d80364ec9d
diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
index 001510d..c6c7315 100644
--- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
@@ -481,9 +481,9 @@
@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());