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

Commit 8610de5c authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Fix NPE that can occur on uiMode change if a group has a single child.

Note that the ternary null check inside init is not necessary given the other change, but seems prudent.

Fixes: 173777455
Fixes: 173650635
Test: manual -- use go/notify-apk to post a group of 2, dismiss 1, change font size.  Observe SystemUI no longer crashes.
Change-Id: I71a820a1ed2ac7ec71c4d9f78855ff264c5d5051
parent b00728fd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ public class NotificationGroupingUtil {
     */
    public void updateChildrenAppearance() {
        List<ExpandableNotificationRow> notificationChildren = mRow.getAttachedChildren();
        if (notificationChildren == null) {
        if (notificationChildren == null || !mRow.isSummaryWithChildren()) {
            return;
        }
        // Initialize the processors
@@ -256,8 +256,8 @@ public class NotificationGroupingUtil {
        }

        public void init() {
            mParentView = mParentRow.getNotificationViewWrapper().getNotificationHeader()
                    .findViewById(mId);
            View header = mParentRow.getNotificationViewWrapper().getNotificationHeader();
            mParentView = header == null ? null : header.findViewById(mId);
            mParentData = mExtractor == null ? null : mExtractor.extractData(mParentRow);
            mApply = !mComparator.isEmpty(mParentView);
        }