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

Commit fc447969 authored by Jerry Chang's avatar Jerry Chang Committed by Android (Google) Code Review
Browse files

Merge "Consider screen insets when setting smallestWidthDp" into tm-dev

parents 392aca75 89956285
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -532,7 +532,9 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
    }
    }


    private int getSmallestWidthDp(Rect bounds) {
    private int getSmallestWidthDp(Rect bounds) {
        final int minWidth = Math.min(bounds.width(), bounds.height());
        mTempRect.set(bounds);
        mTempRect.inset(getDisplayInsets(mContext));
        final int minWidth = Math.min(mTempRect.width(), mTempRect.height());
        final float density = mContext.getResources().getDisplayMetrics().density;
        final float density = mContext.getResources().getDisplayMetrics().density;
        return (int) (minWidth / density);
        return (int) (minWidth / density);
    }
    }