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

Commit f7eeb100 authored by Huan Song's avatar Huan Song
Browse files

Respect dpi from Emulator

Bug: 196986384

Test: run resizable and phone emulator.
      dumpsys SurfaceFlinger|grep -i dpi.
      dumpsys display|grep -i dpi.
      check launcher and apps display correctly

Change-Id: If9f3c05b62fb937ac55e0d1d16e47569d2b15e86
parent bc9e42db
Loading
Loading
Loading
Loading
+2 −7
Original line number Original line Diff line number Diff line
@@ -993,13 +993,8 @@ status_t SurfaceFlinger::getDynamicDisplayInfo(const sp<IBinder>& displayToken,


        outMode.resolution = ui::Size(width, height);
        outMode.resolution = ui::Size(width, height);


        if (mEmulatedDisplayDensity) {
            outMode.xDpi = mEmulatedDisplayDensity;
            outMode.yDpi = mEmulatedDisplayDensity;
        } else {
        outMode.xDpi = xDpi;
        outMode.xDpi = xDpi;
        outMode.yDpi = yDpi;
        outMode.yDpi = yDpi;
        }


        const nsecs_t period = mode->getVsyncPeriod();
        const nsecs_t period = mode->getVsyncPeriod();
        outMode.refreshRate = Fps::fromPeriodNsecs(period).getValue();
        outMode.refreshRate = Fps::fromPeriodNsecs(period).getValue();