From df1281625aad4a1161120eb2f88678ea620a2fb2 Mon Sep 17 00:00:00 2001 From: MOVZX Date: Fri, 2 Jan 2026 22:25:06 +0700 Subject: [PATCH] fix NullPointerException in Animator:callOnList MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: MOVZX --- core/java/android/animation/Animator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/animation/Animator.java b/core/java/android/animation/Animator.java index e62cd556af9ab..7374e17593a02 100644 --- a/core/java/android/animation/Animator.java +++ b/core/java/android/animation/Animator.java @@ -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.