[Mobile] Log the visibilities received by icon views.

Bug: 291031862
Test: toggle SIM on/off and toggle airplane mode on/off -> verify
`adb shell dumpsys activity service
com.android.systemui/.SystemUIService VerboseMobileViewLog` logs
visibility changes

Change-Id: Ib1c78ab49b8a20748dbbf794350eaaf5943aad52
This commit is contained in:
Caitlin Shkuratov
2023-07-28 19:44:34 +00:00
parent 076a75f35c
commit 546220dde0
2 changed files with 23 additions and 1 deletions

View File

@@ -38,6 +38,19 @@ class VerboseMobileViewLogger
constructor(
@VerboseMobileViewLog private val buffer: LogBuffer,
) {
fun logBinderReceivedVisibility(parentView: View, subId: Int, visibility: Boolean) {
buffer.log(
TAG,
LogLevel.VERBOSE,
{
str1 = parentView.getIdForLogging()
int1 = subId
bool1 = visibility
},
{ "Binder[subId=$int1, viewId=$str1] received visibility: $bool1" },
)
}
fun logBinderReceivedSignalIcon(parentView: View, subId: Int, icon: SignalIconModel) {
buffer.log(
TAG,

View File

@@ -99,7 +99,16 @@ object MobileIconBinder {
}
}
launch { viewModel.isVisible.collect { isVisible -> view.isVisible = isVisible } }
launch {
viewModel.isVisible.collect { isVisible ->
viewModel.verboseLogger?.logBinderReceivedVisibility(
view,
viewModel.subscriptionId,
isVisible
)
view.isVisible = isVisible
}
}
// Set the icon for the triangle
launch {