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

Commit 8cf3f4d7 authored by Steve Elliott's avatar Steve Elliott
Browse files

Reload bundle header bg colors when reattached

Flag: com.android.systemui.notification_bundle_ui
Fixes: 427090431
Test: manual
Change-Id: I3b6239c7b1e65cc776827a35f247fb882134df0b
parent e9aef8e8
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()",