Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt +2 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,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)) } Loading packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModel.kt +7 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt +2 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,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)) } Loading
packages/SystemUI/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModel.kt +7 −2 Original line number Diff line number Diff line Loading @@ -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 Loading