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

Commit bda5f6b3 authored by vadimt's avatar vadimt
Browse files

Moving away from obsolete Display#getRealSize().

Step 2 (final): stopping using old API

Bug: 202567877, 227307209
Test: presubmit
Change-Id: Ic32740723a517b28f92dbdd32fc53e27831441cc
parent fe43ca95
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -1650,16 +1650,10 @@ public final class LauncherInstrumentation {
    }

    Point getRealDisplaySize() {
        final Point size = new Point();
        getContext().getSystemService(WindowManager.class).getDefaultDisplay().getRealSize(size);
        final Rect winMetricsHeight = getContext().getSystemService(WindowManager.class)
        final Rect displayBounds = getContext().getSystemService(WindowManager.class)
                .getMaximumWindowMetrics()
                .getBounds();
        final Point winMetricsSize = new Point(winMetricsHeight.width(), winMetricsHeight.height());
        if (!winMetricsSize.equals(size)) {
            fail("Display size mismatch: " + size + " vs " + winMetricsSize);
        }
        return size;
        return new Point(displayBounds.width(), displayBounds.height());
    }

    public void enableDebugTracing() {