Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/AODPromotedNotification.kt +15 −8 Original line number Diff line number Diff line Loading @@ -294,7 +294,7 @@ private class AODPromotedNotificationViewUpdater(root: View) { private val largeIconSizePx: Int = root.context.resources.getDimensionPixelSize(R.dimen.notification_right_icon_size) private val endMarginPx: Int = private val marginPx: Int = if (notificationsRedesignTemplates()) { root.context.resources.getDimensionPixelSize(R.dimen.notification_2025_margin) } else { Loading @@ -304,14 +304,14 @@ private class AODPromotedNotificationViewUpdater(root: View) { } private val imageEndMarginPx: Int get() = largeIconSizePx + 2 * endMarginPx get() = largeIconSizePx + 2 * marginPx private val PromotedNotificationContentModel.imageEndMarginPxIfHasLargeIcon: Int get() = if (!skeletonLargeIcon.isNullOrEmpty()) { imageEndMarginPx } else { endMarginPx marginPx } private data class SmallIconSavedState(val background: Drawable?, val padding: Rect) Loading @@ -338,11 +338,11 @@ private class AODPromotedNotificationViewUpdater(root: View) { rightIcon?.setRightIconState( width = largeIconSizePx, height = largeIconSizePx, marginEnd = endMarginPx, marginEnd = marginPx, ) bigText?.setImageEndMargin(largeIconSizePx + endMarginPx) text?.setImageEndMargin(largeIconSizePx + endMarginPx) bigText?.setImageEndMargin(largeIconSizePx + marginPx) text?.setImageEndMargin(largeIconSizePx + marginPx) setTextViewColor(appNameDivider, SecondaryText) setTextViewColor(headerTextDivider, SecondaryText) Loading Loading @@ -502,8 +502,7 @@ private class AODPromotedNotificationViewUpdater(root: View) { updateConversationHeaderDividers(content, hideTitle = true, hideAppName = collapsed) updateTopLine(content) updateNotifIcon(conversationIcon, content.skeletonNotifIcon, content.iconLevel) updateConversationIcon(content) updateTitle(conversationText, content) } Loading Loading @@ -531,6 +530,14 @@ private class AODPromotedNotificationViewUpdater(root: View) { verificationDivider?.isVisible = showDividerBeforeVerification } private fun updateConversationIcon(content: PromotedNotificationContentModel) { updateNotifIcon(conversationIcon, content.skeletonNotifIcon, content.iconLevel) (conversationIcon?.layoutParams as? MarginLayoutParams)?.let { it.bottomMargin = marginPx conversationIcon?.layoutParams = it } } private fun updateAppName(content: PromotedNotificationContentModel, forceHide: Boolean) { updateTextView(appNameText, content.appName?.takeUnless { forceHide }) } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/AODPromotedNotification.kt +15 −8 Original line number Diff line number Diff line Loading @@ -294,7 +294,7 @@ private class AODPromotedNotificationViewUpdater(root: View) { private val largeIconSizePx: Int = root.context.resources.getDimensionPixelSize(R.dimen.notification_right_icon_size) private val endMarginPx: Int = private val marginPx: Int = if (notificationsRedesignTemplates()) { root.context.resources.getDimensionPixelSize(R.dimen.notification_2025_margin) } else { Loading @@ -304,14 +304,14 @@ private class AODPromotedNotificationViewUpdater(root: View) { } private val imageEndMarginPx: Int get() = largeIconSizePx + 2 * endMarginPx get() = largeIconSizePx + 2 * marginPx private val PromotedNotificationContentModel.imageEndMarginPxIfHasLargeIcon: Int get() = if (!skeletonLargeIcon.isNullOrEmpty()) { imageEndMarginPx } else { endMarginPx marginPx } private data class SmallIconSavedState(val background: Drawable?, val padding: Rect) Loading @@ -338,11 +338,11 @@ private class AODPromotedNotificationViewUpdater(root: View) { rightIcon?.setRightIconState( width = largeIconSizePx, height = largeIconSizePx, marginEnd = endMarginPx, marginEnd = marginPx, ) bigText?.setImageEndMargin(largeIconSizePx + endMarginPx) text?.setImageEndMargin(largeIconSizePx + endMarginPx) bigText?.setImageEndMargin(largeIconSizePx + marginPx) text?.setImageEndMargin(largeIconSizePx + marginPx) setTextViewColor(appNameDivider, SecondaryText) setTextViewColor(headerTextDivider, SecondaryText) Loading Loading @@ -502,8 +502,7 @@ private class AODPromotedNotificationViewUpdater(root: View) { updateConversationHeaderDividers(content, hideTitle = true, hideAppName = collapsed) updateTopLine(content) updateNotifIcon(conversationIcon, content.skeletonNotifIcon, content.iconLevel) updateConversationIcon(content) updateTitle(conversationText, content) } Loading Loading @@ -531,6 +530,14 @@ private class AODPromotedNotificationViewUpdater(root: View) { verificationDivider?.isVisible = showDividerBeforeVerification } private fun updateConversationIcon(content: PromotedNotificationContentModel) { updateNotifIcon(conversationIcon, content.skeletonNotifIcon, content.iconLevel) (conversationIcon?.layoutParams as? MarginLayoutParams)?.let { it.bottomMargin = marginPx conversationIcon?.layoutParams = it } } private fun updateAppName(content: PromotedNotificationContentModel, forceHide: Boolean) { updateTextView(appNameText, content.appName?.takeUnless { forceHide }) } Loading