fix NullPointerException in Animator:callOnList
summary:(Animator$AnimatorCaller$$ExternalSyntheticLambda1.call)java.lang.NullPointerException--Attempt to invoke interface method 'void android.animation.Animator$AnimatorListener.onAnimationEnd(android.animation.Animator, boolean)' on a null object reference det:versionName:20240724.0, versionCode:202407240 java.lang.NullPointerException: Attempt to invoke interface method 'void android.animation.Animator$AnimatorListener.onAnimationEnd(android.animation.Animator, boolean)' on a null object reference at android.animation.Animator$AnimatorCaller$$ExternalSyntheticLambda1.call(D8$$SyntheticClass:0) at android.animation.Animator.callOnList(Animator.java:666) at android.animation.Animator.notifyListeners(Animator.java:609) at android.animation.Animator.notifyEndListeners(Animator.java:634) at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1306) at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1566) at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:344) at android.animation.AnimationHandler.-$$Nest$mdoAnimationFrame(Unknown Source:0) at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:87) at android.view.Choreographer$CallbackRecord.ru Test:UAT Change-Id: I135eac97787a6d3b820a2336908bf1412d2ed218 Signed-off-by: xiangshuangxi <xiangshuangxi@xiaomi.com> Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
@@ -739,7 +739,7 @@ public abstract class Animator implements Cloneable {
|
||||
for (int i = 0; i < size; i++) {
|
||||
//noinspection unchecked
|
||||
T item = (T) array[i];
|
||||
call.call(item, animator, isReverse);
|
||||
if (item != null) call.call(item, animator, isReverse);
|
||||
array[i] = null;
|
||||
}
|
||||
// Store it for the next call so we can reuse this array, if needed.
|
||||
|
||||
Reference in New Issue
Block a user