diff options
| author | 2024-01-17 17:54:05 +0000 | |
|---|---|---|
| committer | 2024-01-17 17:54:05 +0000 | |
| commit | 6b77321ebfcacc390d2f35934f1c064ad99b69a3 (patch) | |
| tree | 0b34aba900f3c14ee1265b672bcba8f98b8bf107 | |
| parent | 92378739a0314a7ccc5ba4ca179f116a8f5351e3 (diff) | |
| parent | 94ddf1f02540a130e88698c7cc3f2045a3246b94 (diff) | |
Merge "Protect against possible NPE" into main
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java index e48732801094..bb0dd95b042f 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java @@ -769,8 +769,10 @@ public class StackAnimationController extends boolean swapped = false; for (int newIndex = 0; newIndex < bubbleViews.size(); newIndex++) { View view = bubbleViews.get(newIndex); - final int oldIndex = mLayout.indexOfChild(view); - swapped |= animateSwap(view, oldIndex, newIndex, updateAllIcons, after); + if (view != null) { + final int oldIndex = mLayout.indexOfChild(view); + swapped |= animateSwap(view, oldIndex, newIndex, updateAllIcons, after); + } } if (!swapped) { // All bubbles were at the right position. Make sure badges and z order is correct. |