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

Commit 2c52c315 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Moving away from obsolete Display#getRealSize()." into tm-dev

parents 3a6b7360 bda5f6b3
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() {