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

Commit 3b8a4b19 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[SB][Notifs] Make notification chips icon-only for now.

There's a lot of work still to do on the text shown in the status bar
notification chips. Since we want to start teamfooding with it ASAP,
remove the text for now and just show the icon.

Bug: 364653005
Flag: com.android.systemui.status_bar_notification_chips
Test: Verify notification chips in status bar only ever show icon
Test: atest NotifChipsViewModelTest

Change-Id: I92eb15765977b94a3ed183013a968909d58f03fc
parent b81e388d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -138,8 +138,7 @@ class NotifChipsViewModelTest : SysuiTestCase() {

    companion object {
        fun assertIsNotifChip(latest: OngoingActivityChipModel?, expectedIcon: StatusBarIconView) {
            assertThat(latest)
                .isInstanceOf(OngoingActivityChipModel.Shown.ShortTimeDelta::class.java)
            assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown.IconOnly::class.java)
            assertThat((latest as OngoingActivityChipModel.Shown).icon)
                .isEqualTo(OngoingActivityChipModel.ChipIcon.StatusBarView(expectedIcon))
        }
+2 −7
Original line number Diff line number Diff line
@@ -68,13 +68,8 @@ constructor(
                    notifChipsInteractor.onPromotedNotificationChipTapped(this@toChipModel.key)
                }
            }
        return OngoingActivityChipModel.Shown.ShortTimeDelta(
            icon,
            colors,
            time = this.whenTime,
            onClickListener,
        )
        // TODO(b/364653005): If Notification.showWhen = false, don't show the time delta.
        return OngoingActivityChipModel.Shown.IconOnly(icon, colors, onClickListener)
        // TODO(b/364653005): Use Notification.showWhen to determine if we should show the time.
        // TODO(b/364653005): If Notification.whenTime is in the past, show "ago" in the text.
        // TODO(b/364653005): If Notification.shortCriticalText is set, use that instead of `when`.
        // TODO(b/364653005): If the app that posted the notification is in the foreground, don't