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

Commit a30053be authored by Michael Mikhail's avatar Michael Mikhail Committed by Android (Google) Code Review
Browse files

Merge "Add logs when media is attached to host" into main

parents e459c029 d4f901d1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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. */
@@ -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
+4 −0
Original line number Diff line number Diff line
@@ -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" })
    }
}
+3 −1
Original line number Diff line number Diff line
@@ -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
@@ -121,7 +122,8 @@ class MediaHierarchyManagerTest : SysuiTestCase() {
                notifPanelEvents,
                settings,
                fakeHandler,
                ResourcesSplitShadeStateController()
                ResourcesSplitShadeStateController(),
                logger,
            )
        verify(wakefulnessLifecycle).addObserver(wakefullnessObserver.capture())
        verify(statusBarStateController).addCallback(statusBarCallback.capture())