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

Commit 136c8438 authored by Liana Kazanova (xWF)'s avatar Liana Kazanova (xWF) Committed by Android (Google) Code Review
Browse files

Merge "Revert "Selectively autoexpand bundles"" into main

parents fb75393c 5df99866
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ private fun ContentScope.BundleHeaderContent(

        ExpansionControl(
            collapsed = collapsed,
            numberToShow = if (collapsed) viewModel.numberOfChildren else null,
            numberToShow = viewModel.numberOfChildren,
            modifier =
                Modifier.padding(start = 8.dp, end = 16.dp).semantics(mergeDescendants = false) {
                    contentDescription = viewModel.numberOfChildrenContentDescription
+7 −1
Original line number Diff line number Diff line
@@ -87,7 +87,13 @@ class RowAlertTimeCoordinatorTest : SysuiTestCase() {
                }
            }
        val expectedTimesSet =
            mapOf(entry1 to 10L, entry2 to 20L, summary to 8L, child1 to 0L, child2 to 8L)
            mapOf(
                entry1 to 10L,
                entry2 to 20L,
                summary to 8L,
                child1 to 0L,
                child2 to 8L,
            )
        assertThat(actualTimesSet).containsExactlyEntriesIn(expectedTimesSet)
    }
}
+2 −4
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ class RenderStageManagerTest : SysuiTestCase() {
            notif(4),
            group(notif(5), notif(6), notif(7)),
            notif(8),
            bundle(group(notif(9)), notif(10)),
            bundle(group(notif(9)), notif(10))
        )

    private class FakeNotifViewRenderer : NotifViewRenderer {
@@ -208,8 +208,6 @@ class RenderStageManagerTest : SysuiTestCase() {

        override fun getRowController(entry: NotificationEntry): NotifRowController = mock()

        override fun getBundleController(entry: BundleEntry): NotifRowController = mock()

        override fun onDispatchComplete() {}
    }

+11 −1
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ import java.util.List;
@SmallTest
@RunWith(AndroidJUnit4.class)
@RunWithLooper
//@DisableFlags(AsyncGroupHeaderViewInflation.FLAG_NAME)
public class NotificationChildrenContainerTest extends SysuiTestCase {

    private ExpandableNotificationRow mGroup;
@@ -134,12 +135,21 @@ public class NotificationChildrenContainerTest extends SysuiTestCase {
        ComposeView headerView = new ComposeView(mContext);
        mChildrenContainer.setBundleHeaderView(headerView);
        mChildrenContainer.setBundleHeaderViewModel(mock(BundleHeaderViewModel.class));
        mChildrenContainer.getContainingNotification().expandNotification();
        mChildrenContainer.setChildrenExpanded(true);
        Assert.assertEquals(mChildrenContainer.getMaxAllowedVisibleChildren(),
                NotificationChildrenContainer.NUMBER_OF_CHILDREN_BUNDLE_EXPANDED);
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testGetMaxAllowedVisibleChildren_bundle_userLocked() {
        ComposeView headerView = new ComposeView(mContext);
        mChildrenContainer.setBundleHeaderView(headerView);
        mChildrenContainer.setBundleHeaderViewModel(mock(BundleHeaderViewModel.class));
        mGroup.setUserLocked(true);
        Assert.assertEquals(mChildrenContainer.getMaxAllowedVisibleChildren(),
                NotificationChildrenContainer.NUMBER_OF_CHILDREN_BUNDLE_EXPANDED);
    }

    @Test
    public void testShowingAsLowPriority_lowPriority() {
+0 −8
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
package com.android.systemui.statusbar.notification.collection

import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.statusbar.notification.collection.listbuilder.OnAfterRenderBundleEntryListener
import com.android.systemui.statusbar.notification.collection.listbuilder.OnAfterRenderEntryListener
import com.android.systemui.statusbar.notification.collection.listbuilder.OnAfterRenderGroupListener
import com.android.systemui.statusbar.notification.collection.listbuilder.OnAfterRenderListListener
@@ -254,13 +253,6 @@ constructor(
        mRenderStageManager.addOnAfterRenderEntryListener(listener)
    }

    /**
     * Called at the end of the pipeline after a bundle entry has been handed off to the view layer.
     */
    fun addOnAfterRenderBundleEntryListener(listener: OnAfterRenderBundleEntryListener) {
        mRenderStageManager.addOnAfterRenderBundleEntryListener(listener)
    }

    /**
     * Get an object which can be used to update a notification (internally to the pipeline) in
     * response to a user action.
Loading