Loading packages/SystemUI/tests/src/com/android/systemui/media/MediaHierarchyManagerTest.kt +6 −1 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading @@ -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( Loading Loading @@ -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) } Loading Loading
packages/SystemUI/tests/src/com/android/systemui/media/MediaHierarchyManagerTest.kt +6 −1 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 Loading @@ -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( Loading Loading @@ -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) } Loading