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

Commit 0bd4ed12 authored by Steve Elliott's avatar Steve Elliott Committed by Android (Google) Code Review
Browse files

Merge "Reload bundle header bg colors when reattached" into main

parents 51b138a7 8cf3f4d7
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import com.android.systemui.statusbar.notification.collection.PipelineDumper
import com.android.systemui.statusbar.notification.collection.coordinator.BundleCoordinator.Companion.debugBundleLog
import com.android.systemui.statusbar.notification.icon.IconManager
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.row.ExpandableView
import com.android.systemui.statusbar.notification.row.RowInflaterTask
import com.android.systemui.statusbar.notification.row.RowInflaterTaskLogger
import com.android.systemui.statusbar.notification.row.dagger.BundleRowComponent
@@ -95,7 +96,14 @@ constructor(
            val controller = component.expandableNotificationRowController
            controller.init(bundleEntry)
            keyToControllerMap[bundleEntry.key] = controller
            row.repeatWhenAttached { repeatOnLifecycle(Lifecycle.State.CREATED) { row.reset() } }
            row.repeatWhenAttached {
                repeatOnLifecycle(Lifecycle.State.CREATED) {
                    if (!row.isTransient) {
                        row.updateBackgroundColorsOfSelf()
                        row.reset()
                    }
                }
            }
            initBundleHeaderView(bundleEntry, row)
        }
        debugBundleLog(TAG) { "calling inflate: ${bundleEntry.key}" }
@@ -186,4 +194,7 @@ private fun HeaderComposeViewContent(
    }
}

private inline val ExpandableView.isTransient
    get() = transientContainer != null

private const val TAG = "BundleBarn"
+1 −1
Original line number Diff line number Diff line
@@ -738,7 +738,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        Trace.endSection();
    }

    private void updateBackgroundColorsOfSelf() {
    public void updateBackgroundColorsOfSelf() {
        super.updateBackgroundColors();
        if (mColorUpdateLogger.isEnabled()) {
            mColorUpdateLogger.logNotificationEvent("ENR.updateBackgroundColorsOfSelf()",