From 68eb3b22b06477e5a229714f802cbc48e8486937 Mon Sep 17 00:00:00 2001 From: Ye Ouyang Date: Tue, 4 Aug 2015 10:40:57 -0500 Subject: animateNoDamage failed to remove from current frame list runRemainingAnimations is used to animate the available animation handle which were not yet run, it actually animate those animation handle and removes from the list by notifyAnimationsRan(). In case if these animation handles are not removed, it leads to the Fatal Assert of runRemainingAnimations. Some usecases causes the addition of animation handle when there is no animators, in these cases this check prevents execution of notifyAnimationsRan() leads to Fatal Assert crash of runRemainingAnimations. Allowing the animation to happen irrespective of animators solves the problem. Change-Id: Ifa72286cdc6ff785fcc999f3b951dd787e7003e9 --- libs/hwui/AnimatorManager.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/hwui/AnimatorManager.cpp b/libs/hwui/AnimatorManager.cpp index c28fb88a0361..9dacce49b232 100644 --- a/libs/hwui/AnimatorManager.cpp +++ b/libs/hwui/AnimatorManager.cpp @@ -123,8 +123,6 @@ uint32_t AnimatorManager::animate(TreeInfo& info) { } void AnimatorManager::animateNoDamage(TreeInfo& info) { - if (!mAnimators.size()) return; - animateCommon(info); } @@ -167,7 +165,7 @@ private: }; void AnimatorManager::endAllActiveAnimators() { - ALOGD("endAllStagingAnimators on %p (%s) with handle %p", + ALOGD("endAllActiveAnimators on %p (%s) with handle %p", &mParent, mParent.getName(), mAnimationHandle); EndActiveAnimatorsFunctor functor(mAnimationHandle->context()); for_each(mAnimators.begin(), mAnimators.end(), functor); -- cgit v1.2.3-59-g8ed1b