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

Commit 8979052a authored by Jonathon Axford's avatar Jonathon Axford Committed by Android (Google) Code Review
Browse files

Merge "Reduce lockscreen bottom area on small landscape screens" into main

parents ac4ff0ba 80cb13f8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -88,4 +88,7 @@
         overlaid -->
    <dimen name="global_actions_button_size">72dp</dimen>
    <dimen name="global_actions_button_padding">26dp</dimen>

    <dimen name="keyguard_indication_margin_bottom">8dp</dimen>
    <dimen name="lock_icon_margin_bottom">24dp</dimen>
</resources>
+0 −2
Original line number Diff line number Diff line
@@ -134,8 +134,6 @@ public class LockIconView extends FrameLayout implements Dumpable {
        mLockIcon.setPadding(mLockIconPadding, mLockIconPadding, mLockIconPadding,
                mLockIconPadding);

        // mSensorProps coordinates assume portrait mode which is OK b/c the keyguard is always in
        // portrait.
        mSensorRect.set(mLockIconCenter.x - mRadius,
                mLockIconCenter.y - mRadius,
                mLockIconCenter.x + mRadius,
+7 −1
Original line number Diff line number Diff line
@@ -73,7 +73,13 @@ constructor(
        val mBottomPaddingPx =
            context.resources.getDimensionPixelSize(R.dimen.lock_icon_margin_bottom)
        val bounds = windowManager.currentWindowMetrics.bounds
        val widthPixels = bounds.right.toFloat()
        val insets = windowManager.currentWindowMetrics.windowInsets
        var widthPixels = bounds.right.toFloat()
        if (featureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE)) {
            // Assumed to be initially neglected as there are no left or right insets in portrait.
            // However, on landscape, these insets need to included when calculating the midpoint.
            widthPixels -= (insets.systemWindowInsetLeft + insets.systemWindowInsetRight).toFloat()
        }
        val heightPixels = bounds.bottom.toFloat()
        val defaultDensity =
            DisplayMetrics.DENSITY_DEVICE_STABLE.toFloat() /