[Android] Dismiss refresh spinner when showing the repost warn dialog
commitc3ef01071c3a6c2b0550a016d0ad901689ffe947
authorjdduke <jdduke@chromium.org>
Thu, 7 May 2015 21:00:38 +0000 (7 14:00 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 7 May 2015 21:01:08 +0000 (7 21:01 +0000)
tree67db1945c429971afe68361de6d37b6cda1e19cc
parent03619407b9ec7b47b0d96e265f2574dc8b369b1c
[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}
chrome/android/java/src/org/chromium/chrome/browser/SwipeRefreshHandler.java
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
third_party/android_swipe_refresh/java/src/org/chromium/third_party/android/swiperefresh/MaterialProgressDrawable.java