Merge "Remove test falkiness" into sc-v2-dev am: f4590668aa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16494982 Change-Id: I6a9dea317314379188d45990c0b6efa2f414c833
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user