diff options
| author | 2024-11-05 19:58:05 +0000 | |
|---|---|---|
| committer | 2024-11-05 19:59:52 +0000 | |
| commit | f2bd615ea92c274434085ea18406052ceb52f59d (patch) | |
| tree | 1cca2b7d54e87ce13cb6346e6ed4d03f62f7e752 | |
| parent | 577d21e106be89d351a32ddf7ed2e22df5b9b37f (diff) | |
Revert^2 "[SB][Notifs] Make notification chips icon-only for now."
This reverts commit c74d1b01f914de3bfe40e044db38d30f077f6b48.
Reason for revert: Resubmitting and fixing test failure
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: Ie2ed7e40ca503e59ab693e3e8d78b007be6a0f8c
2 files changed, 4 insertions, 10 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt index 32f4164d509f..1b4132910555 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt @@ -97,7 +97,7 @@ class NotifChipsViewModelTest : SysuiTestCase() { assertThat(latest).hasSize(1) val chip = latest!![0] - assertThat(chip).isInstanceOf(OngoingActivityChipModel.Shown.ShortTimeDelta::class.java) + assertThat(chip).isInstanceOf(OngoingActivityChipModel.Shown.IconOnly::class.java) assertThat(chip.icon).isEqualTo(OngoingActivityChipModel.ChipIcon.StatusBarView(icon)) } @@ -168,8 +168,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)) } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModel.kt index c8d3f339b3e9..752674854e2d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModel.kt @@ -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 |