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

Commit 31a37dc0 authored by Filip Gruszczynski's avatar Filip Gruszczynski Committed by Android Git Automerger
Browse files

am 95198b91: am 39f0e7da: Merge "Using outset bottom from theme as bottom...

am 95198b91: am 39f0e7da: Merge "Using outset bottom from theme as bottom inset on circular screens." into klp-modular-dev

* commit '95198b91':
  Using outset bottom from theme as bottom inset on circular screens.
parents 9d32507a 95198b91
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -2270,6 +2270,22 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            return super.dispatchGenericMotionEvent(event);
        }

        @Override
        public WindowInsets dispatchApplyWindowInsets(WindowInsets insets) {
            if (mOutsetBottom != null) {
                final DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();
                int bottom = (int) mOutsetBottom.getDimension(metrics);
                WindowInsets newInsets = insets.replaceSystemWindowInsets(
                        insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(),
                        insets.getSystemWindowInsetRight(),
                        insets.getSystemWindowInsetBottom() + bottom);
                return super.dispatchApplyWindowInsets(newInsets);
            } else {
                return super.dispatchApplyWindowInsets(insets);
            }
        }


        @Override
        public boolean onTouchEvent(MotionEvent event) {
            return onInterceptTouchEvent(event);