diff options
| author | 2023-06-16 18:53:43 +0000 | |
|---|---|---|
| committer | 2023-06-16 18:53:43 +0000 | |
| commit | a57a7086eb8fa639ecc528002ac06df398d3bb7b (patch) | |
| tree | 4ff5cf27d885e0dc8dfac38203718bb83787a69b | |
| parent | dcc6a56dc9d5c9765399e692ae2b30f25090f9bb (diff) | |
| parent | f0c64c33b3ffd77b0fd4a590eaf23927dbf2f164 (diff) | |
Merge "Fix potential NPE when looking up view tags for animating" into udc-dev
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/PhysicsAnimationLayout.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/PhysicsAnimationLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/PhysicsAnimationLayout.java index 55052e614458..beb1c5fa6c10 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/PhysicsAnimationLayout.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/PhysicsAnimationLayout.java @@ -523,6 +523,7 @@ public class PhysicsAnimationLayout extends FrameLayout { */ @Nullable private SpringAnimation getSpringAnimationFromView( DynamicAnimation.ViewProperty property, View view) { + if (view == null) return null; return (SpringAnimation) view.getTag(getTagIdForProperty(property)); } @@ -531,11 +532,13 @@ public class PhysicsAnimationLayout extends FrameLayout { * system. */ @Nullable private ViewPropertyAnimator getViewPropertyAnimatorFromView(View view) { + if (view == null) return null; return (ViewPropertyAnimator) view.getTag(R.id.reorder_animator_tag); } /** Retrieves the target animator from the view via the view tag system. */ @Nullable private ObjectAnimator getTargetAnimatorFromView(View view) { + if (view == null) return null; return (ObjectAnimator) view.getTag(R.id.target_animator_tag); } |