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

Commit 0be36ef4 authored by Steve Elliott's avatar Steve Elliott
Browse files

Fix NPE when resetting bundle header.

Flag: com.android.systemui.notification_bundle_ui
Fixes: 423195640
Test: manual
Change-Id: I71cb72b2fd5650c200dc9b9e2e565e86c316f846
parent 97370356
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -2663,7 +2663,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                mTranslateableViews.get(i).setTranslationX(0);
            }
            invalidateOutline();
            getShelfIcon().setScrollX(0);
            @Nullable final StatusBarIconView shelfIcon = getShelfIcon();
            // TODO(b/416147040): Remove null check, will be unnecessary
            if (shelfIcon != null) {
                shelfIcon.setScrollX(0);
            }
        }

        if (mMenuRow != null) {
@@ -3053,7 +3057,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    }

    @Override
    public @NonNull StatusBarIconView getShelfIcon() {
    public @Nullable StatusBarIconView getShelfIcon() {
        // TODO(b/416147040): Add requireNotNull check and change annotation to @NonNull
        if (NotificationBundleUi.isEnabled()) {
            return getEntryAdapter().getIcons().getShelfIcon();
        } else {