diff options
| author | 2024-11-05 19:52:21 +0000 | |
|---|---|---|
| committer | 2024-11-05 19:52:21 +0000 | |
| commit | c74d1b01f914de3bfe40e044db38d30f077f6b48 (patch) | |
| tree | 248b3a43308281424419ec95ca91c432b186ad80 | |
| parent | 3b8a4b193e2e980e854fb55b641417b61ab74e87 (diff) | |
Revert "[SB][Notifs] Make notification chips icon-only for now."
This reverts commit 3b8a4b193e2e980e854fb55b641417b61ab74e87.
Reason for revert: Droidmonitor created revert due to b/377497458. Will be verifying through ABTD before submission.
Change-Id: I2a73b6e216cd9df4bc589d39a99a31b5e77dcf9f
2 files changed, 9 insertions, 3 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 3cd01073020c..6e190965d08b 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 @@ -138,7 +138,8 @@ class NotifChipsViewModelTest : SysuiTestCase() { companion object { fun assertIsNotifChip(latest: OngoingActivityChipModel?, expectedIcon: StatusBarIconView) { - assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown.IconOnly::class.java) + assertThat(latest) + .isInstanceOf(OngoingActivityChipModel.Shown.ShortTimeDelta::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 752674854e2d..c8d3f339b3e9 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,8 +68,13 @@ constructor( notifChipsInteractor.onPromotedNotificationChipTapped(this@toChipModel.key) } } - return OngoingActivityChipModel.Shown.IconOnly(icon, colors, onClickListener) - // TODO(b/364653005): Use Notification.showWhen to determine if we should show the time. + return OngoingActivityChipModel.Shown.ShortTimeDelta( + icon, + colors, + time = this.whenTime, + onClickListener, + ) + // TODO(b/364653005): If Notification.showWhen = false, don't show the time delta. // 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 |