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

Commit e7150afb authored by Lucas Dupin's avatar Lucas Dupin Committed by Automerger Merge Worker
Browse files

Merge "Remove test falkiness" into sc-v2-dev am: f4590668 am: a6b14edb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16494982

Change-Id: I6782afc640d19ef39f779508fe91afa6c7eb726d
parents 671d7c25 a6b14edb
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.testing.TestableLooper
import android.view.ViewGroup
import android.widget.FrameLayout
import androidx.test.filters.SmallTest
import com.android.systemui.R
import com.android.systemui.SysuiTestCase
import com.android.systemui.controls.controller.ControlsControllerImplTest.Companion.eq
import com.android.systemui.keyguard.WakefulnessLifecycle
@@ -82,6 +83,8 @@ class MediaHierarchyManagerTest : SysuiTestCase() {
    private lateinit var statusBarKeyguardViewManager: StatusBarKeyguardViewManager
    @Mock
    private lateinit var configurationController: ConfigurationController
    @Mock
    private lateinit var uniqueObjectHostView: UniqueObjectHostView
    @Captor
    private lateinit var wakefullnessObserver: ArgumentCaptor<(WakefulnessLifecycle.Observer)>
    @Captor
@@ -94,6 +97,8 @@ class MediaHierarchyManagerTest : SysuiTestCase() {

    @Before
    fun setup() {
        context.getOrCreateTestableResources().addOverride(
                R.bool.config_use_split_notification_shade, false)
        mediaFrame = FrameLayout(context)
        `when`(mediaCarouselController.mediaFrame).thenReturn(mediaFrame)
        mediaHiearchyManager = MediaHierarchyManager(
@@ -124,7 +129,7 @@ class MediaHierarchyManagerTest : SysuiTestCase() {
    private fun setupHost(host: MediaHost, location: Int) {
        `when`(host.location).thenReturn(location)
        `when`(host.currentBounds).thenReturn(Rect())
        `when`(host.hostView).thenReturn(UniqueObjectHostView(context))
        `when`(host.hostView).thenReturn(uniqueObjectHostView)
        `when`(host.visible).thenReturn(true)
        mediaHiearchyManager.register(host)
    }