summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-07-31 22:05:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-07-31 22:05:20 +0000
commit0fb95f01f5b17ac3e19f2b336c1d8e69e513edc0 (patch)
tree22d2931c945c841cef6de3e7a7c8a283db0085e8 /src
parentc3766338b312f9c8a6bdb2facaf4b0a4bd199de4 (diff)
parent11a9968c65835512ae9b79b9c029042b9a304ebf (diff)
Merge "Prevent animation length from going negative"
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/list/PhoneFavoriteTileView.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java
index 9a1577a27..4efc4dbb9 100644
--- a/src/com/android/dialer/list/PhoneFavoriteTileView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java
@@ -135,6 +135,7 @@ public abstract class PhoneFavoriteTileView extends ContactTileView {
// 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,