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

Commit 9f3a22ea authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Start migrating tests from helpers to kosmos" into main

parents 84976417 4d2e9357
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import android.content.Context;
import android.testing.TestableLooper;
import android.testing.TestableLooper.RunWithLooper;

import androidx.core.animation.ObjectAnimator;
@@ -31,10 +30,9 @@ import androidx.test.filters.SmallTest;

import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.animation.AnimatorTestRule;
import com.android.systemui.flags.FakeFeatureFlagsClassic;
import com.android.systemui.kosmos.KosmosJavaAdapter;
import com.android.systemui.media.NotificationMediaManager;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.NotificationTestHelper;

import org.junit.Before;
import org.junit.Rule;
@@ -49,10 +47,10 @@ public class ExpandHelperTest extends SysuiTestCase {
    @Rule
    public final AnimatorTestRule mAnimatorTestRule = new AnimatorTestRule(this);

    private final FakeFeatureFlagsClassic mFeatureFlags = new FakeFeatureFlagsClassic();
    private ExpandableNotificationRow mRow;
    private ExpandHelper mExpandHelper;
    private ExpandHelper.Callback mCallback;
    private final KosmosJavaAdapter mKosmos = new KosmosJavaAdapter(this);

    @Before
    public void setUp() throws Exception {
@@ -60,12 +58,7 @@ public class ExpandHelperTest extends SysuiTestCase {
        mDependency.injectMockDependency(NotificationMediaManager.class);
        allowTestableLooperAsMainThread();
        Context context = getContext();
        NotificationTestHelper helper = new NotificationTestHelper(
                mContext,
                mDependency,
                TestableLooper.get(this),
                mFeatureFlags);
        mRow = helper.createRow();
        mRow = mKosmos.createRow();
        mCallback = mock(ExpandHelper.Callback.class);
        mExpandHelper = new ExpandHelper(context, mCallback, 10, 100);
    }
+13 −20
Original line number Diff line number Diff line
@@ -25,13 +25,13 @@ import com.android.systemui.res.R
import com.android.systemui.statusbar.notification.collection.BundleEntry
import com.android.systemui.statusbar.notification.collection.EntryAdapterFactory
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.row.NotificationTestHelper
import com.android.systemui.statusbar.notification.row.createRow
import com.android.systemui.statusbar.notification.row.createRowWithNotif
import com.android.systemui.statusbar.notification.row.data.repository.TEST_BUNDLE_SPEC
import com.android.systemui.statusbar.notification.row.entryAdapterFactory
import com.android.systemui.statusbar.notification.shared.NotificationBundleUi
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito.mock
@@ -46,7 +46,6 @@ class NotificationGroupingUtilTest(flags: FlagsParameterization) : SysuiTestCase
    private lateinit var underTest: NotificationGroupingUtil

    private val factory: EntryAdapterFactory = kosmos.entryAdapterFactory
    private lateinit var testHelper: NotificationTestHelper

    companion object {
        @JvmStatic
@@ -60,23 +59,16 @@ class NotificationGroupingUtilTest(flags: FlagsParameterization) : SysuiTestCase
        mSetFlagsRule.setFlagsParameterization(flags)
    }

    @Before
    fun setup() {
        testHelper = NotificationTestHelper(mContext, mDependency)
    }

    @Test
    fun showsTime() {
        val row = testHelper.createRow()

        var row = kosmos.createRow()
        underTest = NotificationGroupingUtil(row)
        assertThat(underTest.showsTime(row)).isTrue()
    }

    @Test
    fun iconExtractor_extractsSbn_notification() {
        val row = testHelper.createRow()

        var row = kosmos.createRow()
        underTest = NotificationGroupingUtil(row)

        assertThat(NotificationGroupingUtil.ICON_EXTRACTOR.extractData(row))
@@ -97,17 +89,20 @@ class NotificationGroupingUtilTest(flags: FlagsParameterization) : SysuiTestCase

    @Test
    fun iconComparator_sameNotificationIcon() {
        val n1 = NotificationGroupingUtil.ICON_EXTRACTOR.extractData(testHelper.createRow())
        val n2 = NotificationGroupingUtil.ICON_EXTRACTOR.extractData(testHelper.createRow())
        var row = kosmos.createRow()
        val n1 = NotificationGroupingUtil.ICON_EXTRACTOR.extractData(row)
        val n2 = NotificationGroupingUtil.ICON_EXTRACTOR.extractData(row)

        assertThat(NotificationGroupingUtil.IconComparator().hasSameIcon(n1, n2)).isTrue()
    }

    @Test
    fun iconComparator_differentNotificationIcon() {
        var row = kosmos.createRow()
        val notif = Notification.Builder(mContext, "").setSmallIcon(R.drawable.ic_menu).build()
        val n1 = NotificationGroupingUtil.ICON_EXTRACTOR.extractData(testHelper.createRow(notif))
        val n2 = NotificationGroupingUtil.ICON_EXTRACTOR.extractData(testHelper.createRow())
        val n1 =
            NotificationGroupingUtil.ICON_EXTRACTOR.extractData(kosmos.createRowWithNotif(notif))
        val n2 = NotificationGroupingUtil.ICON_EXTRACTOR.extractData(row)

        assertThat(NotificationGroupingUtil.IconComparator().hasSameIcon(n1, n2)).isFalse()
    }
@@ -115,12 +110,10 @@ class NotificationGroupingUtilTest(flags: FlagsParameterization) : SysuiTestCase
    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    fun iconComparator_bundleNotification() {
        var row = kosmos.createRow()
        assertThat(
                NotificationGroupingUtil.IconComparator()
                    .hasSameIcon(
                        null,
                        NotificationGroupingUtil.ICON_EXTRACTOR.extractData(testHelper.createRow()),
                    )
                    .hasSameIcon(null, NotificationGroupingUtil.ICON_EXTRACTOR.extractData(row))
            )
            .isFalse()
    }
+4 −8
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;

import com.android.systemui.SysuiTestCase;
import com.android.systemui.kosmos.KosmosJavaAdapter;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.NotificationTestHelper;

@@ -42,22 +43,18 @@ public class AboveShelfObserverTest extends SysuiTestCase {

    private AboveShelfObserver mObserver;
    private FrameLayout mHostLayout;
    private NotificationTestHelper mNotificationTestHelper;
    private AboveShelfObserver.HasViewAboveShelfChangedListener mListener;
    private final KosmosJavaAdapter mKosmos = new KosmosJavaAdapter(this);

    @Before
    public void setUp() throws Exception {
        allowTestableLooperAsMainThread();
        mNotificationTestHelper = new NotificationTestHelper(
                mContext,
                mDependency,
                TestableLooper.get(this));
        mHostLayout = new FrameLayout(getContext());
        mObserver = new AboveShelfObserver(mHostLayout);
        ExpandableNotificationRow row = mNotificationTestHelper.createRow();
        ExpandableNotificationRow row = mKosmos.createRow();
        row.setAboveShelfChangedListener(mObserver);
        mHostLayout.addView(row);
        row = mNotificationTestHelper.createRow();
        row = mKosmos.createRow();
        row.setAboveShelfChangedListener(mObserver);
        mHostLayout.addView(row);
        mListener = mock(AboveShelfObserver.HasViewAboveShelfChangedListener.class);
@@ -91,4 +88,3 @@ public class AboveShelfObserverTest extends SysuiTestCase {
                mObserver.hasViewsAboveShelf());
    }
}
+16 −7
Original line number Diff line number Diff line
@@ -189,7 +189,9 @@ class ColorizedFgsCoordinatorTest : SysuiTestCase() {
            // GIVEN a screen record event + screen record notif that has a status bar chip
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )
            val screenRecordEntry =
                buildNotificationEntry(tag = "screenRecord", promoted = false) {
                    setImportance(NotificationManager.IMPORTANCE_DEFAULT)
@@ -202,7 +204,7 @@ class ColorizedFgsCoordinatorTest : SysuiTestCase() {
                collectLastValue(promotedNotificationsInteractor.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|screenRecord|0")
                .containsExactly("0|com.android.systemui.tests|0|screenRecord|0")
                .inOrder()

            // THEN the entry is in the fgs section
@@ -216,7 +218,9 @@ class ColorizedFgsCoordinatorTest : SysuiTestCase() {
            // GIVEN a screen record event + screen record notif that has a status bar chip
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )
            val screenRecordEntry =
                buildNotificationEntry(tag = "screenRecord", promoted = false) {
                    setImportance(NotificationManager.IMPORTANCE_MIN)
@@ -229,7 +233,7 @@ class ColorizedFgsCoordinatorTest : SysuiTestCase() {
                collectLastValue(promotedNotificationsInteractor.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|screenRecord|0")
                .containsExactly("0|com.android.systemui.tests|0|screenRecord|0")
                .inOrder()

            // THEN the entry is NOT in the fgs section
@@ -243,7 +247,9 @@ class ColorizedFgsCoordinatorTest : SysuiTestCase() {
            // GIVEN a screen record event + screen record notif that has a status bar chip
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )
            val screenRecordEntry =
                buildNotificationEntry(tag = "screenRecord", promoted = false) {
                    setImportance(NotificationManager.IMPORTANCE_DEFAULT)
@@ -256,7 +262,7 @@ class ColorizedFgsCoordinatorTest : SysuiTestCase() {
                collectLastValue(promotedNotificationsInteractor.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|screenRecord|0")
                .containsExactly("0|com.android.systemui.tests|0|screenRecord|0")
                .inOrder()

            // THEN the entry is NOT in the fgs section
@@ -315,7 +321,10 @@ class ColorizedFgsCoordinatorTest : SysuiTestCase() {

            // THEN the order of the notification keys should be the call then the RON
            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|call|0", "0|test_pkg|0|ron|0")
                .containsExactly(
                    "0|com.android.systemui.tests|0|call|0",
                    "0|com.android.systemui.tests|0|ron|0",
                )

            // VERIFY that the comparator puts the call before the ron
            assertThat(sectioner.comparator!!.compare(callEntry, ronEntry)).isLessThan(0)
+64 −34
Original line number Diff line number Diff line
@@ -85,7 +85,8 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.orderedChipNotificationKeys)

            // THEN the call shouldn't be in the list
            assertThat(orderedChipNotificationKeys).containsExactly("0|test_pkg|0|ron|0")
            assertThat(orderedChipNotificationKeys).containsExactly(
                "0|com.android.systemui.tests|0|ron|0")
        }

    @Test
@@ -105,7 +106,10 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {

            // THEN the order of the notification keys should be the call then the RON
            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|call|0", "0|test_pkg|0|ron|0")
                .containsExactly(
                    "0|com.android.systemui.tests|0|call|0",
                    "0|com.android.systemui.tests|0|ron|0",
                )
                .inOrder()
        }

@@ -114,7 +118,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )

            renderNotificationListInteractor.setRenderedList(emptyList())

@@ -146,7 +152,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )

            val screenRecordEntry = buildNotificationEntry(tag = "record", promoted = true)
            renderNotificationListInteractor.setRenderedList(listOf(screenRecordEntry))
@@ -155,7 +163,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|record|0")
                .containsExactly("0|com.android.systemui.tests|0|record|0")
                .inOrder()
        }

@@ -164,7 +172,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )

            val screenRecordEntry =
                buildNotificationEntry(tag = "record", promoted = false) {
@@ -176,7 +186,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|record|0")
                .containsExactly("0|com.android.systemui.tests|0|record|0")
                .inOrder()
        }

@@ -185,7 +195,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )

            val screenRecordEntry =
                buildNotificationEntry(tag = "record", promoted = false) {
@@ -197,7 +209,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|record|0")
                .containsExactly("0|com.android.systemui.tests|0|record|0")
                .inOrder()
        }

@@ -206,7 +218,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )

            val screenRecordEntry =
                buildNotificationEntry(tag = "record", promoted = false) {
@@ -226,7 +240,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )

            val fgsEntry =
                buildNotificationEntry(tag = "recordFgs", promoted = false) {
@@ -242,7 +258,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|recordFgs|0")
                .containsExactly("0|com.android.systemui.tests|0|recordFgs|0")
                .inOrder()
        }

@@ -251,7 +267,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )

            val ongoingEntry =
                buildNotificationEntry(tag = "recordOngoing", promoted = false) {
@@ -267,7 +285,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|recordOngoing|0")
                .containsExactly("0|com.android.systemui.tests|0|recordOngoing|0")
                .inOrder()
        }

@@ -276,7 +294,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )

            val ongoingAndFgsEntry =
                buildNotificationEntry(tag = "recordBoth", promoted = false) {
@@ -301,7 +321,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|recordBoth|0")
                .containsExactly("0|com.android.systemui.tests|0|recordBoth|0")
                .inOrder()
        }

@@ -310,7 +330,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            screenRecordRepository.screenRecordState.value = ScreenRecordModel.Recording
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.EntireScreen(hostPackage = "test_pkg")
                MediaProjectionState.Projecting.EntireScreen(
                    hostPackage = "com.android.systemui.tests"
                )

            val entry1 =
                buildNotificationEntry(tag = "entry1", promoted = false) {
@@ -333,7 +355,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.SingleTask(
                    hostPackage = "test_pkg",
                    hostPackage = "com.android.systemui.tests",
                    hostDeviceName = null,
                    createTask(taskId = 1),
                )
@@ -351,7 +373,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.SingleTask(
                    hostPackage = "test_pkg",
                    hostPackage = "com.android.systemui.tests",
                    hostDeviceName = null,
                    createTask(taskId = 1),
                )
@@ -362,7 +384,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
            val orderedChipNotificationKeys by
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys).containsExactly("0|test_pkg|0|proj|0").inOrder()
            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|com.android.systemui.tests|0|proj|0")
                .inOrder()
        }

    @Test
@@ -370,7 +394,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.SingleTask(
                    hostPackage = "test_pkg",
                    hostPackage = "com.android.systemui.tests",
                    hostDeviceName = null,
                    createTask(taskId = 1),
                )
@@ -384,7 +408,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
            val orderedChipNotificationKeys by
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys).containsExactly("0|test_pkg|0|proj|0").inOrder()
            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|com.android.systemui.tests|0|proj|0")
                .inOrder()
        }

    @Test
@@ -392,7 +418,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.SingleTask(
                    hostPackage = "test_pkg",
                    hostPackage = "com.android.systemui.tests",
                    hostDeviceName = null,
                    createTask(taskId = 1),
                )
@@ -406,7 +432,9 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
            val orderedChipNotificationKeys by
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys).containsExactly("0|test_pkg|0|proj|0").inOrder()
            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|com.android.systemui.tests|0|proj|0")
                .inOrder()
        }

    @Test
@@ -414,7 +442,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.SingleTask(
                    hostPackage = "test_pkg",
                    hostPackage = "com.android.systemui.tests",
                    hostDeviceName = null,
                    createTask(taskId = 1),
                )
@@ -437,7 +465,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.SingleTask(
                    hostPackage = "test_pkg",
                    hostPackage = "com.android.systemui.tests",
                    hostDeviceName = null,
                    createTask(taskId = 1),
                )
@@ -456,7 +484,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|projFgs|0")
                .containsExactly("0|com.android.systemui.tests|0|projFgs|0")
                .inOrder()
        }

@@ -465,7 +493,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.SingleTask(
                    hostPackage = "test_pkg",
                    hostPackage = "com.android.systemui.tests",
                    hostDeviceName = null,
                    createTask(taskId = 1),
                )
@@ -484,7 +512,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|projOngoing|0")
                .containsExactly("0|com.android.systemui.tests|0|projOngoing|0")
                .inOrder()
        }

@@ -493,7 +521,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.SingleTask(
                    hostPackage = "test_pkg",
                    hostPackage = "com.android.systemui.tests",
                    hostDeviceName = null,
                    createTask(taskId = 1),
                )
@@ -521,7 +549,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.orderedChipNotificationKeys)

            assertThat(orderedChipNotificationKeys)
                .containsExactly("0|test_pkg|0|projBoth|0")
                .containsExactly("0|com.android.systemui.tests|0|projBoth|0")
                .inOrder()
        }

@@ -530,7 +558,7 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
        kosmos.runTest {
            fakeMediaProjectionRepository.mediaProjectionState.value =
                MediaProjectionState.Projecting.SingleTask(
                    hostPackage = "test_pkg",
                    hostPackage = "com.android.systemui.tests",
                    hostDeviceName = null,
                    createTask(taskId = 1),
                )
@@ -639,7 +667,8 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.aodPromotedNotification)

            // THEN the ron is first because the call has no content
            assertThat(topPromotedNotificationContent?.key).isEqualTo("0|test_pkg|0|ron|0")
            assertThat(topPromotedNotificationContent?.key)
                .isEqualTo("0|com.android.systemui.tests|0|ron|0")
        }

    @Test
@@ -658,7 +687,8 @@ class PromotedNotificationsInteractorTest : SysuiTestCase() {
                collectLastValue(underTest.aodPromotedNotification)

            // THEN the call is the top notification
            assertThat(topPromotedNotificationContent?.key).isEqualTo("0|test_pkg|0|call|0")
            assertThat(topPromotedNotificationContent?.key)
                .isEqualTo("0|com.android.systemui.tests|0|call|0")
        }

    @Test
Loading