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

Commit bd0a77a7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix unit test failures when bundles ui flag is off" into main

parents afe1c010 fd47c27d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import com.android.systemui.statusbar.notification.headsup.HeadsUpManager
import com.android.systemui.statusbar.notification.people.PeopleNotificationIdentifier
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRowController.BUBBLES_SETTING_URI
import com.android.systemui.statusbar.notification.row.icon.NotificationIconStyleProvider
import com.android.systemui.statusbar.notification.shared.NotificationBundleUi
import com.android.systemui.statusbar.notification.stack.NotificationChildrenContainer
import com.android.systemui.statusbar.notification.stack.NotificationChildrenContainerLogger
import com.android.systemui.statusbar.notification.stack.NotificationListContainer
@@ -318,7 +319,7 @@ class ExpandableNotificationRowControllerTest : SysuiTestCase() {
        val notification = Notification.Builder(mContext).build()
        val sbn =
            SbnBuilder().setNotification(notification).setUser(UserHandle.of(USER_ALL)).build()
        whenever(view.entry)
        whenever(view.entryLegacy)
            .thenReturn(
                NotificationEntryBuilder().setSbn(sbn).setUser(UserHandle.of(USER_ALL)).build()
            )
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ class StackScrollAlgorithmTest(flags: FlagsParameterization) : SysuiTestCase() {
        whenever(notificationShelf.viewState).thenReturn(ExpandableViewState())
        whenever(notificationRow.key).thenReturn("key")
        whenever(notificationRow.viewState).thenReturn(ExpandableViewState())
        whenever(notificationRow.entry).thenReturn(notificationEntry)
        whenever(notificationRow.entryLegacy).thenReturn(notificationEntry)
        whenever(notificationRow.entryAdapter).thenReturn(notificationEntryAdapter)
        whenever(notificationRow.roundableState)
            .thenReturn(RoundableState(notificationRow, notificationRow, 0f))
+6 −0
Original line number Diff line number Diff line
@@ -221,6 +221,7 @@ public class StatusBarRemoteInputCallbackTest extends SysuiTestCase {

        when(enr.getPrivateLayout()).thenReturn(privateLayout);
        when(enr.getEntry()).thenReturn(enrEntry);
        when(enr.getEntryLegacy()).thenReturn(enrEntry);
        when(enr.getEntryAdapter()).thenReturn(enrEntryAdapter);
        when(enr.isChildInGroup()).thenReturn(true);
        when(enr.areChildrenExpanded()).thenReturn(false);
@@ -251,6 +252,7 @@ public class StatusBarRemoteInputCallbackTest extends SysuiTestCase {

        when(enr.getPrivateLayout()).thenReturn(privateLayout);
        when(enr.getEntry()).thenReturn(enrEntry);
        when(enr.getEntryLegacy()).thenReturn(enrEntry);
        when(enr.isChildInGroup()).thenReturn(true);
        when(enr.areChildrenExpanded()).thenReturn(true);

@@ -277,6 +279,7 @@ public class StatusBarRemoteInputCallbackTest extends SysuiTestCase {

        when(enr.getPrivateLayout()).thenReturn(privateLayout);
        when(enr.getEntry()).thenReturn(enrEntry);
        when(enr.getEntryLegacy()).thenReturn(enrEntry);
        when(enr.isChildInGroup()).thenReturn(false);
        when(enr.isPinned()).thenReturn(false);
        when(enr.isExpanded()).thenReturn(false);
@@ -305,6 +308,7 @@ public class StatusBarRemoteInputCallbackTest extends SysuiTestCase {

        when(enr.getPrivateLayout()).thenReturn(privateLayout);
        when(enr.getEntry()).thenReturn(enrEntry);
        when(enr.getEntryLegacy()).thenReturn(enrEntry);
        when(enr.isChildInGroup()).thenReturn(false);
        when(enr.isPinned()).thenReturn(false);
        when(enr.isExpanded()).thenReturn(true);
@@ -333,6 +337,7 @@ public class StatusBarRemoteInputCallbackTest extends SysuiTestCase {

        when(enr.getPrivateLayout()).thenReturn(privateLayout);
        when(enr.getEntry()).thenReturn(enrEntry);
        when(enr.getEntryLegacy()).thenReturn(enrEntry);
        when(enr.isChildInGroup()).thenReturn(false);
        when(enr.isPinned()).thenReturn(true);
        when(enr.isPinnedAndExpanded()).thenReturn(false);
@@ -361,6 +366,7 @@ public class StatusBarRemoteInputCallbackTest extends SysuiTestCase {

        when(enr.getPrivateLayout()).thenReturn(privateLayout);
        when(enr.getEntry()).thenReturn(enrEntry);
        when(enr.getEntryLegacy()).thenReturn(enrEntry);
        when(enr.isChildInGroup()).thenReturn(false);
        when(enr.isPinned()).thenReturn(true);
        when(enr.isPinnedAndExpanded()).thenReturn(true);
+5 −0
Original line number Diff line number Diff line
@@ -734,6 +734,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        ExpandableNotificationRow row = mock(ExpandableNotificationRow.class);
        NotificationEntry entry = mock(NotificationEntry.class);
        when(row.getEntry()).thenReturn(entry);
        when(row.getEntryLegacy()).thenReturn(entry);
        when(entry.isAmbient()).thenReturn(false);
        EntryAdapter entryAdapter = mock(EntryAdapter.class);
        when(entryAdapter.isAmbient()).thenReturn(false);
@@ -753,6 +754,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        ExpandableNotificationRow row = mock(ExpandableNotificationRow.class);
        NotificationEntry entry = mock(NotificationEntry.class);
        when(row.getEntry()).thenReturn(entry);
        when(row.getEntryLegacy()).thenReturn(entry);
        when(entry.isAmbient()).thenReturn(true);
        EntryAdapter entryAdapter = mock(EntryAdapter.class);
        when(entryAdapter.isAmbient()).thenReturn(true);
@@ -772,6 +774,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        ExpandableNotificationRow row = mock(ExpandableNotificationRow.class);
        NotificationEntry entry = mock(NotificationEntry.class);
        when(row.getEntry()).thenReturn(entry);
        when(row.getEntryLegacy()).thenReturn(entry);
        when(entry.isAmbient()).thenReturn(false);
        EntryAdapter entryAdapter = mock(EntryAdapter.class);
        when(entryAdapter.isAmbient()).thenReturn(false);
@@ -1384,6 +1387,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        NotificationEntry entry = mock(NotificationEntry.class);
        when(entry.isSeenInShade()).thenReturn(true);
        ExpandableNotificationRow row = mock(ExpandableNotificationRow.class);
        when(row.getEntryLegacy()).thenReturn(entry);
        when(row.getEntry()).thenReturn(entry);

        // WHEN we generate an add event
@@ -1440,6 +1444,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        NotificationEntry entry = mock(NotificationEntry.class);
        when(row.canViewBeCleared()).thenReturn(true);
        when(row.getEntry()).thenReturn(entry);
        when(row.getEntryLegacy()).thenReturn(entry);
        when(entry.isClearable()).thenReturn(true);
        EntryAdapter entryAdapter = mock(EntryAdapter.class);
        when(entryAdapter.isClearable()).thenReturn(true);