Add carousel size info to dumpsys

Adds the media size, location, and state to dumpsys. This should help
debugging issues where the carousel doesn't display as expected.

Bug: 198319256
Test: manual - dumpsys activity service SystemUI, verify info
Test: atest QSPanelControllerBaseTest
Change-Id: I76a88d583bd0dbee4a65af20c628ca0bf69671b3
This commit is contained in:
Beth Thibodeau
2022-01-06 18:46:11 -05:00
parent 7bc21e772b
commit cf3dc89317
3 changed files with 9 additions and 1 deletions

View File

@@ -865,6 +865,10 @@ class MediaCarouselController @Inject constructor(
println("playerKeys: ${MediaPlayerData.playerKeys()}")
println("smartspaceMediaData: ${MediaPlayerData.smartspaceMediaData}")
println("shouldPrioritizeSs: ${MediaPlayerData.shouldPrioritizeSs}")
println("current size: $currentCarouselWidth x $currentCarouselHeight")
println("location: $desiredLocation")
println("state: ${desiredHostState?.expansion}, " +
"only active ${desiredHostState?.showsOnlyActiveMedia}")
}
}
}

View File

@@ -391,6 +391,9 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
pw.print(" "); pw.println(record.tileView.toString());
}
}
if (mMediaHost != null) {
pw.println(" media bounds: " + mMediaHost.getCurrentBounds());
}
}
public QSPanel.QSTileLayout getTileLayout() {

View File

@@ -218,7 +218,8 @@ public class QSPanelControllerBaseTest extends SysuiTestCase {
String expected = "TestableQSPanelControllerBase:\n"
+ " Tile records:\n"
+ " " + mockTileString + "\n"
+ " " + mockTileViewString + "\n";
+ " " + mockTileViewString + "\n"
+ " media bounds: null\n";
assertEquals(expected, w.getBuffer().toString());
}