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

Commit 91b218e1 authored by Beth Thibodeau's avatar Beth Thibodeau Committed by Automerger Merge Worker
Browse files

Merge "Add more logging for carousel state" into tm-qpr-dev am: cc0599f2

parents d262ca6c cc0599f2
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -225,8 +225,10 @@ constructor(
        object : KeyguardUpdateMonitorCallback() {
        object : KeyguardUpdateMonitorCallback() {
            override fun onStrongAuthStateChanged(userId: Int) {
            override fun onStrongAuthStateChanged(userId: Int) {
                if (keyguardUpdateMonitor.isUserInLockdown(userId)) {
                if (keyguardUpdateMonitor.isUserInLockdown(userId)) {
                    debugLogger.logCarouselHidden()
                    hideMediaCarousel()
                    hideMediaCarousel()
                } else if (keyguardUpdateMonitor.isUserUnlocked(userId)) {
                } else if (keyguardUpdateMonitor.isUserUnlocked(userId)) {
                    debugLogger.logCarouselVisible()
                    showMediaCarousel()
                    showMediaCarousel()
                }
                }
            }
            }
@@ -298,7 +300,7 @@ constructor(
                    receivedSmartspaceCardLatency: Int,
                    receivedSmartspaceCardLatency: Int,
                    isSsReactivated: Boolean
                    isSsReactivated: Boolean
                ) {
                ) {
                    debugLogger.logMediaLoaded(key)
                    debugLogger.logMediaLoaded(key, data.active)
                    if (addOrUpdatePlayer(key, oldKey, data, isSsReactivated)) {
                    if (addOrUpdatePlayer(key, oldKey, data, isSsReactivated)) {
                        // Log card received if a new resumable media card is added
                        // Log card received if a new resumable media card is added
                        MediaPlayerData.getMediaPlayer(key)?.let {
                        MediaPlayerData.getMediaPlayer(key)?.let {
+14 −2
Original line number Original line Diff line number Diff line
@@ -42,8 +42,16 @@ constructor(@MediaCarouselControllerLog private val buffer: LogBuffer) {
            }
            }
        )
        )


    fun logMediaLoaded(key: String) =
    fun logMediaLoaded(key: String, active: Boolean) =
        buffer.log(TAG, LogLevel.DEBUG, { str1 = key }, { "add player $str1" })
        buffer.log(
            TAG,
            LogLevel.DEBUG,
            {
                str1 = key
                bool1 = active
            },
            { "add player $str1, active: $bool1" }
        )


    fun logMediaRemoved(key: String) =
    fun logMediaRemoved(key: String) =
        buffer.log(TAG, LogLevel.DEBUG, { str1 = key }, { "removing player $str1" })
        buffer.log(TAG, LogLevel.DEBUG, { str1 = key }, { "removing player $str1" })
@@ -69,6 +77,10 @@ constructor(@MediaCarouselControllerLog private val buffer: LogBuffer) {
            },
            },
            { "removing recommendation $str1, immediate=$bool1" }
            { "removing recommendation $str1, immediate=$bool1" }
        )
        )

    fun logCarouselHidden() = buffer.log(TAG, LogLevel.DEBUG, {}, { "hiding carousel" })

    fun logCarouselVisible() = buffer.log(TAG, LogLevel.DEBUG, {}, { "showing carousel" })
}
}


private const val TAG = "MediaCarouselCtlrLog"
private const val TAG = "MediaCarouselCtlrLog"
+5 −1
Original line number Original line Diff line number Diff line
@@ -619,7 +619,11 @@ constructor(
                        tmpState
                        tmpState
                    )
                    )
            }
            }
            logger.logMediaSize("setCurrentState", result.width, result.height)
            logger.logMediaSize(
                "setCurrentState (progress $transitionProgress)",
                result.width,
                result.height
            )
            layoutController.setState(
            layoutController.setState(
                result,
                result,
                applyImmediately,
                applyImmediately,