From 57372fd3da2e879f190e4ccd41a00813774c9019 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Fri, 26 Apr 2013 14:36:43 +0900 Subject: [PATCH] Remove graying animation of alt-code keys while typing Bug: 8727807 Change-Id: Idcc76dade3ceba5649666d795b6e4f94a161d748 --- java/res/values/styles.xml | 2 ++ .../com/android/inputmethod/keyboard/MainKeyboardView.java | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml index 436e080f7..dad7e2064 100644 --- a/java/res/values/styles.xml +++ b/java/res/values/styles.xml @@ -94,8 +94,10 @@ @bool/config_show_more_keys_keyboard_at_touched_point @integer/config_language_on_spacebar_final_alpha @anim/language_on_spacebar_fadeout + @integer/config_gesture_floating_preview_text_linger_timeout @integer/config_gesture_static_time_threshold_after_fast_typing diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index 454469ce7..8d4beeced 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -333,6 +333,10 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack private static void cancelAndStartAnimators(final ObjectAnimator animatorToCancel, final ObjectAnimator animatorToStart) { + if (animatorToCancel == null || animatorToStart == null) { + // TODO: Stop using null as a no-operation animator. + return; + } float startFraction = 0.0f; if (animatorToCancel.isStarted()) { animatorToCancel.cancel(); @@ -581,6 +585,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack private ObjectAnimator loadObjectAnimator(final int resId, final Object target) { if (resId == 0) { + // TODO: Stop returning null. return null; } final ObjectAnimator animator = (ObjectAnimator)AnimatorInflater.loadAnimator(