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

Commit cf3dc893 authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

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
parent 7bc21e77
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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}")
        }
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -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() {
+2 −1
Original line number Diff line number Diff line
@@ -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());
    }