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

Commit c6928575 authored by Michael Mikhail's avatar Michael Mikhail
Browse files

Disable tests using legacy code to run when flexi is on

Ran both tests with flexi turned on and off.

Flag: com.android.systemui.scene_container
Bug: 410078024
Test: atest MediaCarouselControllerTest
Test: atest MediaViewControllerTest
Change-Id: If5883241640fa64dfbbb301fff8b795736b0b817
parent 01ed9301
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -399,6 +399,7 @@ class MediaCarouselControllerTest : SysuiTestCase() {
        )
    }

    @DisableSceneContainer
    @Test
    fun testSwipeDismiss_logged() {
        mediaCarouselController.mediaCarouselScrollHandler.dismissCallback.invoke()
@@ -521,11 +522,13 @@ class MediaCarouselControllerTest : SysuiTestCase() {
        verify(pageIndicator).alpha = floatThat { abs(it - 1.0F) < delta }
    }

    @DisableSceneContainer
    @Test
    fun testOnConfigChanged_playersAreAddedBack() {
        testConfigurationChange { configListener.value.onConfigChanged(Configuration()) }
    }

    @DisableSceneContainer
    @Test
    fun testOnUiModeChanged_playersAreAddedBack() {
        testConfigurationChange(configListener.value::onUiModeChanged)
@@ -535,6 +538,7 @@ class MediaCarouselControllerTest : SysuiTestCase() {
        verify(pageIndicator, times(2)).setNumPages(any())
    }

    @DisableSceneContainer
    @Test
    fun testOnDensityOrFontScaleChanged_playersAreAddedBack() {
        testConfigurationChange(configListener.value::onDensityOrFontScaleChanged)
@@ -545,6 +549,7 @@ class MediaCarouselControllerTest : SysuiTestCase() {
        verify(pageIndicator, times(4)).setNumPages(any())
    }

    @DisableSceneContainer
    @Test
    fun testOnThemeChanged_playersAreAddedBack() {
        testConfigurationChange(configListener.value::onThemeChanged)
@@ -554,6 +559,7 @@ class MediaCarouselControllerTest : SysuiTestCase() {
        verify(pageIndicator, times(2)).setNumPages(any())
    }

    @DisableSceneContainer
    @Test
    fun testOnLocaleListChanged_playersAreAddedBack() {
        context.resources.configuration.setLocales(LocaleList(Locale.US, Locale.UK, Locale.CANADA))
@@ -790,6 +796,7 @@ class MediaCarouselControllerTest : SysuiTestCase() {
        }
    }

    @DisableSceneContainer
    @Test
    fun testInvisibleToUserAndExpanded_playersNotListening() {
        // Add players to carousel.
@@ -811,6 +818,7 @@ class MediaCarouselControllerTest : SysuiTestCase() {
        verify(panel, times(MediaPlayerData.players().size)).listening = false
    }

    @DisableSceneContainer
    @Test
    fun testVisibleToUserAndExpanded_playersListening() {
        // Add players to carousel.
@@ -825,6 +833,7 @@ class MediaCarouselControllerTest : SysuiTestCase() {
        verify(panel, times(MediaPlayerData.players().size)).listening = true
    }

    @DisableSceneContainer
    @Test
    fun testUMOCollapsed_playersNotListening() {
        // Add players to carousel.
@@ -857,6 +866,7 @@ class MediaCarouselControllerTest : SysuiTestCase() {
        assertTrue(stateUpdated)
    }

    @DisableSceneContainer
    @Test
    fun testAnimationScaleChanged_mediaControlPanelsNotified() {
        MediaPlayerData.addMediaPlayer("key", DATA, panel, clock)
+2 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import androidx.test.filters.SmallTest
import com.android.internal.widget.CachingIconView
import com.android.systemui.SysuiTestCase
import com.android.systemui.dump.DumpManager
import com.android.systemui.flags.DisableSceneContainer
import com.android.systemui.flags.EnableSceneContainer
import com.android.systemui.media.controls.ui.view.GutsViewHolder
import com.android.systemui.media.controls.ui.view.MediaHost
@@ -174,6 +175,7 @@ class MediaViewControllerTest : SysuiTestCase() {
        }
    }

    @DisableSceneContainer
    @Test
    fun testObtainViewState_applySquishFraction_toPlayerTransitionViewState_height() {
        mediaViewController.attach(player)