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

Commit b2fb674c authored by Christian Göllner's avatar Christian Göllner Committed by Christian Göllner
Browse files

SystemBarAttributesListener: log appearance as String instead of integer

The appearance flag int is composed by bits. To make it easier to read
logs, convert the flag to a String representation.

Test: adb shell dumpsys and read the output
Bug: 260554575
Change-Id: If0082fe112b64403aff31925e63a06ac7e78d1f7
Merged-In: If0082fe112b64403aff31925e63a06ac7e78d1f7
parent ee0c2b11
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -16,7 +16,9 @@

package com.android.systemui.statusbar.phone

import android.view.InsetsFlags
import android.view.InsetsVisibilities
import android.view.ViewDebug
import android.view.WindowInsetsController.Appearance
import android.view.WindowInsetsController.Behavior
import com.android.internal.statusbar.LetterboxDetails
@@ -148,4 +150,20 @@ private data class SystemBarAttributesParams(
) {
    val letterboxesArray = letterboxes.toTypedArray()
    val appearanceRegionsArray = appearanceRegions.toTypedArray()
    override fun toString(): String {
        val appearanceToString =
                ViewDebug.flagsToString(InsetsFlags::class.java, "appearance", appearance)
        return """SystemBarAttributesParams(
            displayId=$displayId,
            appearance=$appearanceToString,
            appearanceRegions=$appearanceRegions,
            navbarColorManagedByIme=$navbarColorManagedByIme,
            behavior=$behavior,
            requestedVisibilities=$requestedVisibilities,
            packageName='$packageName',
            letterboxes=$letterboxes,
            letterboxesArray=${letterboxesArray.contentToString()},
            appearanceRegionsArray=${appearanceRegionsArray.contentToString()}
            )""".trimMargin()
    }
}