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

Commit c6d18dc3 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

Only call NotifEntry#getPromotedNotifContentModel when flag enabled.

NotificationEntry#getPromotedNotificationContentModel does a Log.wtf if the flag isn't enabled, but RenderNotificationListInteractor was accidentally calling #getPromotedNotificationContentModel even if the flag was disabled.

Bug: 369151941
Change-Id: Ie1ac8c963177ca5d6dc2601def3e88169274a312
Test: No WTF logs
Flag: android.app.ui_rich_ongoing
Flag: com.android.systemui.status_bar_notification_chips
parent 5ed6634e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -152,6 +152,13 @@ private class ActiveNotificationsStoreBuilder(
            } else {
                null
            }
        val promotedContent =
            if (PromotedNotificationContentModel.featureFlagEnabled()) {
                promotedNotificationContentModel
            } else {
                null
            }

        return existingModels.createOrReuse(
            key = key,
            groupKey = sbn.groupKey,
@@ -174,7 +181,7 @@ private class ActiveNotificationsStoreBuilder(
            isGroupSummary = sbn.notification.isGroupSummary,
            bucket = bucket,
            callType = sbn.toCallType(),
            promotedContent = promotedNotificationContentModel,
            promotedContent = promotedContent,
        )
    }
}