Prevent receive extra callbacks from AnimatorListener.
There will receive another onAnimationStart/onAnimationEnd callback when calling ValueAnimator#end if the animation is not running, which is not necessary if the animation was finished already. Bug: 195736656 Test: atest SplashscreenTests Change-Id: Ifbbf2f799e3e69624626b16e08f40b562fe483a8
This commit is contained in:
@@ -314,7 +314,7 @@ public class SplashscreenIconDrawableFactory {
|
||||
|
||||
@Override
|
||||
public void stopAnimation() {
|
||||
if (mIconAnimator != null) {
|
||||
if (mIconAnimator != null && mIconAnimator.isRunning()) {
|
||||
mIconAnimator.end();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user