Clear the promise flag once the restore animation is run

and no more restore related tasks are pending

issue: 17214102

Change-Id: I54c486ff001d74b4961f85947f41848cf92243a3
This commit is contained in:
Sunny Goyal committed 2014-08-27 17:13:05 -07:00
1 parent d5058a534e
commit 4f88bfb7af
2 files changed
+8 -4

No files matched your search

@@ -189,10 +189,11 @@ class PreloadIconDrawable extends Drawable {
/**
* Runs the finish animation if it is has not been run after last level change.
* @return true if the animation was run.
*/
public void maybePerformFinishedAnimation() {
public boolean maybePerformFinishedAnimation() {
if (mAnimationProgress > ANIMATION_PROGRESS_STOPPED) {
return;
return false;
}
if (mAnimator != null) {
mAnimator.cancel();
@@ -201,6 +202,7 @@ class PreloadIconDrawable extends Drawable {
mAnimator = ObjectAnimator.ofFloat(this, "animationProgress",
ANIMATION_PROGRESS_STARTED, ANIMATION_PROGRESS_COMPLETED);
mAnimator.start();
return true;
}
public void setAnimationProgress(float progress) {