Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2937)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java

Issue 1108653002: Prevent a negative duration animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java b/chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java
index 7bd6d878eb8e9efff4dbee1808354dc4aaeeac3a..373533560da5bd181e5df64f06a932c9fa8b7825 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java
@@ -653,7 +653,7 @@ public abstract class SwipableOverlayView extends ScrollView {
PropertyValuesHolder.ofFloat("translationY", getTranslationY(), y));
mCurrentAnimation = new AnimatorSet();
- mCurrentAnimation.setDuration(duration);
+ mCurrentAnimation.setDuration(Math.max(duration, 0));
mCurrentAnimation.playTogether(alphaAnimator, translationXAnimator, translationYAnimator);
mCurrentAnimation.addListener(mAnimatorListenerAdapter);
mCurrentAnimation.setInterpolator(mInterpolator);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698