Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c87f870 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a bug where systemui could crash

Because the shelf could be the only visible view
and an animation happened, it could crash.

Test: Add a notification and remove it while the yTranslation changes
Change-Id: Icf47e91075437f129ad9fd7c3f206e864178a753
Fixes: 33484955
parent a7d4f82c
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -253,7 +253,13 @@ public class StackStateAnimator {
                    View viewAfterChangingView = noNextView
                            ? mHostLayout.getLastChildNotGone()
                            : event.viewAfterChangingView;

                    if (viewAfterChangingView == null) {
                        // This can happen when the last view in the list is removed.
                        // Since the shelf is still around and the only view, the code still goes
                        // in here and tries to calculate the delay for it when case its properties
                        // have changed.
                        continue;
                    }
                    int nextIndex = finalState
                            .getViewStateForView(viewAfterChangingView).notGoneIndex;
                    if (ownIndex >= nextIndex) {