Remove graying animation of alt-code keys while typing
Bug: 8727807 Change-Id: Idcc76dade3ceba5649666d795b6e4f94a161d748
This commit is contained in:
parent
df3ca0420b
commit
57372fd3da
2 changed files with 7 additions and 0 deletions
|
@ -94,8 +94,10 @@
|
||||||
<item name="showMoreKeysKeyboardAtTouchedPoint">@bool/config_show_more_keys_keyboard_at_touched_point</item>
|
<item name="showMoreKeysKeyboardAtTouchedPoint">@bool/config_show_more_keys_keyboard_at_touched_point</item>
|
||||||
<item name="languageOnSpacebarFinalAlpha">@integer/config_language_on_spacebar_final_alpha</item>
|
<item name="languageOnSpacebarFinalAlpha">@integer/config_language_on_spacebar_final_alpha</item>
|
||||||
<item name="languageOnSpacebarFadeoutAnimator">@anim/language_on_spacebar_fadeout</item>
|
<item name="languageOnSpacebarFadeoutAnimator">@anim/language_on_spacebar_fadeout</item>
|
||||||
|
<!-- Remove animations for now because it could drain a non-negligible amount of battery while typing.
|
||||||
<item name="altCodeKeyWhileTypingFadeoutAnimator">@anim/alt_code_key_while_typing_fadeout</item>
|
<item name="altCodeKeyWhileTypingFadeoutAnimator">@anim/alt_code_key_while_typing_fadeout</item>
|
||||||
<item name="altCodeKeyWhileTypingFadeinAnimator">@anim/alt_code_key_while_typing_fadein</item>
|
<item name="altCodeKeyWhileTypingFadeinAnimator">@anim/alt_code_key_while_typing_fadein</item>
|
||||||
|
-->
|
||||||
<!-- Common attributes of MainKeyboardView for gesture typing detection and recognition -->
|
<!-- Common attributes of MainKeyboardView for gesture typing detection and recognition -->
|
||||||
<item name="gestureFloatingPreviewTextLingerTimeout">@integer/config_gesture_floating_preview_text_linger_timeout</item>
|
<item name="gestureFloatingPreviewTextLingerTimeout">@integer/config_gesture_floating_preview_text_linger_timeout</item>
|
||||||
<item name="gestureStaticTimeThresholdAfterFastTyping">@integer/config_gesture_static_time_threshold_after_fast_typing</item>
|
<item name="gestureStaticTimeThresholdAfterFastTyping">@integer/config_gesture_static_time_threshold_after_fast_typing</item>
|
||||||
|
|
|
@ -333,6 +333,10 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
|
|
||||||
private static void cancelAndStartAnimators(final ObjectAnimator animatorToCancel,
|
private static void cancelAndStartAnimators(final ObjectAnimator animatorToCancel,
|
||||||
final ObjectAnimator animatorToStart) {
|
final ObjectAnimator animatorToStart) {
|
||||||
|
if (animatorToCancel == null || animatorToStart == null) {
|
||||||
|
// TODO: Stop using null as a no-operation animator.
|
||||||
|
return;
|
||||||
|
}
|
||||||
float startFraction = 0.0f;
|
float startFraction = 0.0f;
|
||||||
if (animatorToCancel.isStarted()) {
|
if (animatorToCancel.isStarted()) {
|
||||||
animatorToCancel.cancel();
|
animatorToCancel.cancel();
|
||||||
|
@ -581,6 +585,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
|
|
||||||
private ObjectAnimator loadObjectAnimator(final int resId, final Object target) {
|
private ObjectAnimator loadObjectAnimator(final int resId, final Object target) {
|
||||||
if (resId == 0) {
|
if (resId == 0) {
|
||||||
|
// TODO: Stop returning null.
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final ObjectAnimator animator = (ObjectAnimator)AnimatorInflater.loadAnimator(
|
final ObjectAnimator animator = (ObjectAnimator)AnimatorInflater.loadAnimator(
|
||||||
|
|
Loading…
Reference in a new issue