Merge "Prevent animation length from going negative"
diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java
index 9a1577a..4efc4db 100644
--- a/src/com/android/dialer/list/PhoneFavoriteTileView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java
@@ -135,6 +135,7 @@
             // favorite removal view to the foreground to ask user to confirm removal.
             int animationLength = (int) ((1 - Math.abs(mFavoriteContactCard.getTranslationX()) /
                     getWidth()) * ANIMATION_LENGTH);
+            animationLength = Math.max(0, animationLength);
             final ObjectAnimator fadeOut = ObjectAnimator.ofFloat(mFavoriteContactCard, "alpha",
                     0.f).setDuration(animationLength);
             final ObjectAnimator moveAway = ObjectAnimator.ofFloat(mFavoriteContactCard,