Loading packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt +3 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,8 @@ constructor( panelEventsEvents: ShadeStateEvents, private val secureSettings: SecureSettings, @Main private val handler: Handler, private val splitShadeStateController: SplitShadeStateController private val splitShadeStateController: SplitShadeStateController, private val logger: MediaViewLogger, ) { /** Track the media player setting status on lock screen. */ Loading Loading @@ -1057,6 +1058,7 @@ constructor( // that and directly set the mediaFrame's bounds within the premeasured host. targetHost.addView(mediaFrame) } logger.logMediaHostAttachment(currentAttachmentLocation) if (isCrossFadeAnimatorRunning) { // When cross-fading with an animation, we only notify the media carousel of the // location change, once the view is reattached to the new place and not Loading packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaViewLogger.kt +4 −0 Original line number Diff line number Diff line Loading @@ -52,4 +52,8 @@ class MediaViewLogger @Inject constructor(@MediaViewLog private val buffer: LogB { "location ($str1): $int1 -> $int2" } ) } fun logMediaHostAttachment(host: Int) { buffer.log(TAG, LogLevel.DEBUG, { int1 = host }, { "Host (updateHostAttachment): $int1" }) } } packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt +3 −1 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ class MediaHierarchyManagerTest : SysuiTestCase() { @Mock private lateinit var mediaDataManager: MediaDataManager @Mock private lateinit var uniqueObjectHostView: UniqueObjectHostView @Mock private lateinit var dreamOverlayStateController: DreamOverlayStateController @Mock lateinit var logger: MediaViewLogger @Captor private lateinit var wakefullnessObserver: ArgumentCaptor<(WakefulnessLifecycle.Observer)> @Captor Loading Loading @@ -121,7 +122,8 @@ class MediaHierarchyManagerTest : SysuiTestCase() { notifPanelEvents, settings, fakeHandler, ResourcesSplitShadeStateController() ResourcesSplitShadeStateController(), logger, ) verify(wakefulnessLifecycle).addObserver(wakefullnessObserver.capture()) verify(statusBarStateController).addCallback(statusBarCallback.capture()) Loading Loading
packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt +3 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,8 @@ constructor( panelEventsEvents: ShadeStateEvents, private val secureSettings: SecureSettings, @Main private val handler: Handler, private val splitShadeStateController: SplitShadeStateController private val splitShadeStateController: SplitShadeStateController, private val logger: MediaViewLogger, ) { /** Track the media player setting status on lock screen. */ Loading Loading @@ -1057,6 +1058,7 @@ constructor( // that and directly set the mediaFrame's bounds within the premeasured host. targetHost.addView(mediaFrame) } logger.logMediaHostAttachment(currentAttachmentLocation) if (isCrossFadeAnimatorRunning) { // When cross-fading with an animation, we only notify the media carousel of the // location change, once the view is reattached to the new place and not Loading
packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaViewLogger.kt +4 −0 Original line number Diff line number Diff line Loading @@ -52,4 +52,8 @@ class MediaViewLogger @Inject constructor(@MediaViewLog private val buffer: LogB { "location ($str1): $int1 -> $int2" } ) } fun logMediaHostAttachment(host: Int) { buffer.log(TAG, LogLevel.DEBUG, { int1 = host }, { "Host (updateHostAttachment): $int1" }) } }
packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt +3 −1 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ class MediaHierarchyManagerTest : SysuiTestCase() { @Mock private lateinit var mediaDataManager: MediaDataManager @Mock private lateinit var uniqueObjectHostView: UniqueObjectHostView @Mock private lateinit var dreamOverlayStateController: DreamOverlayStateController @Mock lateinit var logger: MediaViewLogger @Captor private lateinit var wakefullnessObserver: ArgumentCaptor<(WakefulnessLifecycle.Observer)> @Captor Loading Loading @@ -121,7 +122,8 @@ class MediaHierarchyManagerTest : SysuiTestCase() { notifPanelEvents, settings, fakeHandler, ResourcesSplitShadeStateController() ResourcesSplitShadeStateController(), logger, ) verify(wakefulnessLifecycle).addObserver(wakefullnessObserver.capture()) verify(statusBarStateController).addCallback(statusBarCallback.capture()) Loading