From c3ef01071c3a6c2b0550a016d0ad901689ffe947 Mon Sep 17 00:00:00 2001 From: jdduke Date: Thu, 7 May 2015 14:00:38 -0700 Subject: [Android] Dismiss refresh spinner when showing the repost warn dialog If the user cancels a refresh via the report form warning dialog, we never get a callback that the page has been reloaded. Consequently, for gesture-triggered reloads the refresh spinner would continue showing after the reload cancellation. Instead, simply cancel the refresh animation when the repost warning dialog is shown. This avoids any associated callback guarantee issues while also preventing animation jank as the dialog is shown. Also set the MaterialProgressDrawable animation's repeat count back to infinite, instead relying on the SwipeRefreshHandler container to terminate the refresh animation after a reasonable upper limit. BUG=485609 Review URL: https://codereview.chromium.org/1131903003 Cr-Commit-Position: refs/heads/master@{#328825} --- .../third_party/android/swiperefresh/MaterialProgressDrawable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'third_party') diff --git a/third_party/android_swipe_refresh/java/src/org/chromium/third_party/android/swiperefresh/MaterialProgressDrawable.java b/third_party/android_swipe_refresh/java/src/org/chromium/third_party/android/swiperefresh/MaterialProgressDrawable.java index 87df79a..c79d291 100644 --- a/third_party/android_swipe_refresh/java/src/org/chromium/third_party/android/swiperefresh/MaterialProgressDrawable.java +++ b/third_party/android_swipe_refresh/java/src/org/chromium/third_party/android/swiperefresh/MaterialProgressDrawable.java @@ -422,7 +422,7 @@ class MaterialProgressDrawable extends Drawable implements Animatable { } } }; - animation.setRepeatCount(10); + animation.setRepeatCount(Animation.INFINITE); animation.setRepeatMode(Animation.RESTART); animation.setInterpolator(LINEAR_INTERPOLATOR); animation.setAnimationListener(new Animation.AnimationListener() { -- cgit v1.1