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

Commit 4773ce89 authored by Lyn Han's avatar Lyn Han Committed by Android (Google) Code Review
Browse files

Merge changes from topic "bundle-pipeline-core" into main

* changes:
  Fix NPEs after ENRController initializes bundle row
  Bind PipelineEntry to ENRController
  Bundle and inflate rows for notif
parents 8c68933c 5bebc823
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder
import com.android.systemui.statusbar.notification.collection.render.BundleBarn
import com.android.systemui.statusbar.notification.collection.render.NodeController
import com.google.common.truth.Truth.assertThat
import org.junit.Before
@@ -44,6 +45,7 @@ class BundleCoordinatorTest : SysuiTestCase() {
    @Mock private lateinit var socialController: NodeController
    @Mock private lateinit var recsController: NodeController
    @Mock private lateinit var promoController: NodeController
    @Mock private lateinit var bundleBarn: BundleBarn

    private lateinit var coordinator: BundleCoordinator

@@ -55,7 +57,8 @@ class BundleCoordinatorTest : SysuiTestCase() {
                newsController,
                socialController,
                recsController,
                promoController
                promoController,
                bundleBarn
            )
    }

+2 −1
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ class NodeSpecBuilderTest : SysuiTestCase() {
    private val sectionsFeatureManager: NotificationSectionsFeatureManager = mock()
    private val sectionHeaderVisibilityProvider: SectionHeaderVisibilityProvider = mock()
    private val viewBarn: NotifViewBarn = mock()
    private val bundleBarn: BundleBarn = mock()
    private val logger = NodeSpecBuilderLogger(mock(), logcatLogBuffer())

    private var rootController: NodeController = buildFakeController("rootController")
@@ -81,7 +82,7 @@ class NodeSpecBuilderTest : SysuiTestCase() {
        }

        specBuilder = NodeSpecBuilder(mediaContainerController, sectionsFeatureManager,
                sectionHeaderVisibilityProvider, viewBarn, logger)
                sectionHeaderVisibilityProvider, viewBarn, bundleBarn, logger)
    }

    @Test
+1 −5
Original line number Diff line number Diff line
@@ -78,9 +78,6 @@ import org.mockito.kotlin.atLeastOnce
@TestableLooper.RunWithLooper
class ExpandableNotificationRowControllerTest : SysuiTestCase() {

    private val appName = "MyApp"
    private val notifKey = "MyNotifKey"

    private val kosmos = testKosmos()

    private lateinit var entry: NotificationEntry
@@ -143,8 +140,7 @@ class ExpandableNotificationRowControllerTest : SysuiTestCase() {
            smartReplyController,
            pluginManager,
            systemClock,
            appName,
            notifKey,
            context,
            keyguardBypassController,
            groupMembershipManager,
            groupExpansionManager,
+4 −0
Original line number Diff line number Diff line
@@ -690,6 +690,10 @@ public class NotificationShelf extends ActivatableNotificationView {
        StatusBarIconView icon = NotificationBundleUi.isEnabled()
                ? row.getEntryAdapter().getIcons().getShelfIcon()
                : row.getEntryLegacy().getIcons().getShelfIcon();
        if (icon == null) {
            // TODO(b/399736937) remove this when adding bundle icon implementation
            return;
        }
        boolean needsContinuousClipping = ViewState.isAnimatingY(icon) && !mAmbientState.isDozing();
        boolean isContinuousClipping = icon.getTag(TAG_CONTINUOUS_CLIPPING) != null;
        if (needsContinuousClipping && !isContinuousClipping) {
+4 −0
Original line number Diff line number Diff line
@@ -43,6 +43,10 @@ class BundleEntry(spec: BundleSpec) : PipelineEntry(spec.key) {
        _children.add(child)
    }

    fun removeChild(child: ListEntry) {
        _children.remove(child)
    }

    fun clearChildren() {
        _children.clear()
    }
Loading