Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eeb8fc37 authored by Julia Tuttle's avatar Julia Tuttle
Browse files

Use small icon as conversation icon for call AOD RONs

Bug: 369151941
Flag: com.android.systemui.aod_ui_rich_ongoing
Test: manual
Change-Id: I86ad6c32fb5d75598360e382aa437c8109244626
parent 22c518ac
Loading
Loading
Loading
Loading
+19 −9
Original line number Diff line number Diff line
@@ -165,8 +165,8 @@ private class AODPromotedNotificationViewUpdater(root: View) {
    private var chronometerStub: ViewStub? = root.findViewById(R.id.chronometer)
    private var chronometer: Chronometer? = null
    private val closeButton: View? = root.findViewById(R.id.close_button)
    private val conversationIconContainer: View? =
        root.findViewById(R.id.conversation_icon_container)
    private val conversationIconBadge: View? = root.findViewById(R.id.conversation_icon_badge)
    private val conversationIcon: CachingIconView? = root.findViewById(R.id.conversation_icon)
    private val conversationText: TextView? = root.findViewById(R.id.conversation_text)
    private val expandButton: NotificationExpandButton? = root.findViewById(R.id.expand_button)
    private val headerText: TextView? = root.findViewById(R.id.header_text)
@@ -200,7 +200,7 @@ private class AODPromotedNotificationViewUpdater(root: View) {
        alternateExpandTarget?.visibility = GONE
        bigPicture?.visibility = GONE
        closeButton?.visibility = GONE
        conversationIconContainer?.visibility = GONE
        conversationIconBadge?.visibility = GONE
        expandButton?.visibility = GONE
        leftIcon?.visibility = GONE
        notificationProgressEndIcon?.visibility = GONE
@@ -241,16 +241,11 @@ private class AODPromotedNotificationViewUpdater(root: View) {
        textView: ImageFloatingTextView? = null,
        showOldProgress: Boolean = true,
    ) {
        // Icon binding must be called in this order
        updateImageView(icon, content.smallIcon)
        icon?.setImageLevel(content.iconLevel)
        icon?.setBackgroundColor(Background.colorInt)
        icon?.originalIconColor = PrimaryText.colorInt

        updateHeader(content, hideTitle = true)

        updateTitle(title, content)
        updateText(textView ?: text, content)
        updateSmallIcon(icon, content)
        updateImageView(rightIcon, content.skeletonLargeIcon)

        if (showOldProgress) {
@@ -353,6 +348,8 @@ private class AODPromotedNotificationViewUpdater(root: View) {

        updateImageView(verificationIcon, content.verificationIcon)
        updateTextView(verificationText, content.verificationText)

        updateSmallIcon(conversationIcon, content)
    }

    private fun updateConversationHeaderDividers(
@@ -410,6 +407,19 @@ private class AODPromotedNotificationViewUpdater(root: View) {
        }
    }

    private fun updateSmallIcon(
        smallIconView: CachingIconView?,
        content: PromotedNotificationContentModel,
    ) {
        smallIconView ?: return

        // Icon binding must be called in this order
        updateImageView(smallIconView, content.smallIcon)
        smallIconView.setImageLevel(content.iconLevel)
        smallIconView.setBackgroundColor(Background.colorInt)
        smallIconView.originalIconColor = PrimaryText.colorInt
    }

    private fun inflateChronometer() {
        if (chronometer != null) {
            return