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

Commit e7f34ea6 authored by Adnan Begovic's avatar Adnan Begovic Committed by Gerrit Code Review
Browse files

SystemUI: Handle possible NPE on task.group during layout.

Change-Id: Idcc12617e139ab8911873284a02911c8ab47c768
TICKET: YAM-124
parent 9ccd0254
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -142,11 +142,13 @@ public class TaskStackViewLayoutAlgorithm {

            if (i < (taskCount - 1)) {
                // Increment the peek height
                if (task.group != null) {
                    float pPeek = task.group.isFrontMostTask(task) ?
                            pBetweenAffiliateOffset : pWithinAffiliateOffset;
                    pAtFrontMostCardTop += pPeek;
                }
            }
        }

        mMaxScrollP = pAtFrontMostCardTop - ((1f - pTaskHeightOffset - pNavBarOffset));
        mMinScrollP = tasks.size() == 1 ? Math.max(mMaxScrollP, 0f) : 0f;