Loading packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/binder/OngoingActivityChipBinder.kt +7 −2 Original line number Diff line number Diff line Loading @@ -242,8 +242,9 @@ object OngoingActivityChipBinder { chipTimeView: ChipChronometer, chipShortTimeDeltaView: DateTimeView, ) { if (chipModel.icon != null) { if (chipModel.icon is OngoingActivityChipModel.ChipIcon.StatusBarView) { val icon = chipModel.icon if (icon != null) { if (iconRequiresEmbeddedPadding(icon)) { // If the icon is a custom [StatusBarIconView], then it should've come from // `Notification.smallIcon`, which is required to embed its own paddings. We need to // adjust the other paddings to make everything look good :) Loading @@ -265,6 +266,10 @@ object OngoingActivityChipBinder { } } private fun iconRequiresEmbeddedPadding(icon: OngoingActivityChipModel.ChipIcon) = icon is OngoingActivityChipModel.ChipIcon.StatusBarView || icon is OngoingActivityChipModel.ChipIcon.StatusBarNotificationIcon private fun View.setTextPaddingForEmbeddedPaddingIcon() { val newPaddingEnd = context.resources.getDimensionPixelSize( Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/binder/OngoingActivityChipBinder.kt +7 −2 Original line number Diff line number Diff line Loading @@ -242,8 +242,9 @@ object OngoingActivityChipBinder { chipTimeView: ChipChronometer, chipShortTimeDeltaView: DateTimeView, ) { if (chipModel.icon != null) { if (chipModel.icon is OngoingActivityChipModel.ChipIcon.StatusBarView) { val icon = chipModel.icon if (icon != null) { if (iconRequiresEmbeddedPadding(icon)) { // If the icon is a custom [StatusBarIconView], then it should've come from // `Notification.smallIcon`, which is required to embed its own paddings. We need to // adjust the other paddings to make everything look good :) Loading @@ -265,6 +266,10 @@ object OngoingActivityChipBinder { } } private fun iconRequiresEmbeddedPadding(icon: OngoingActivityChipModel.ChipIcon) = icon is OngoingActivityChipModel.ChipIcon.StatusBarView || icon is OngoingActivityChipModel.ChipIcon.StatusBarNotificationIcon private fun View.setTextPaddingForEmbeddedPaddingIcon() { val newPaddingEnd = context.resources.getDimensionPixelSize( Loading