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

Commit 61b00bcd authored by Marin Shalamanov's avatar Marin Shalamanov
Browse files

Fix dump of active config

Currently x-dpi and y-dpi appear as invalid characters in
dumpsys. This CL formats them as strings.

Test: adb shell dump SurfaceFlinger
Change-Id: I0332cc4634db5594e0cd406fe656e5eb9a96a144
parent bbf0b4d9
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -4824,9 +4824,10 @@ void SurfaceFlinger::dumpAllLocked(const DumpArgs& args, std::string& result) co
        const auto activeConfig = getHwComposer().getActiveConfig(*displayId);
        std::string fps, xDpi, yDpi;
        if (activeConfig) {
            fps = std::to_string(1e9 / getHwComposer().getDisplayVsyncPeriod(*displayId)) + " fps";
            xDpi = activeConfig->getDpiX();
            yDpi = activeConfig->getDpiY();
            fps = base::StringPrintf("%.2f Hz",
                                     1e9f / getHwComposer().getDisplayVsyncPeriod(*displayId));
            xDpi = base::StringPrintf("%.2f", activeConfig->getDpiX());
            yDpi = base::StringPrintf("%.2f", activeConfig->getDpiY());
        } else {
            fps = "unknown";
            xDpi = "unknown";