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

Commit 4deec308 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Fix divider animation" into nyc-dev

parents 14810c7e 0cb0f728
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -2777,11 +2777,19 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        int insets = mWindowManagerFuncs.getDockedDividerInsetsLw();

        // If the divider is behind the navigation bar, don't animate.
        if (mNavigationBar != null
        final Rect frame = win.getFrameLw();
        final boolean behindNavBar = mNavigationBar != null
                && ((mNavigationBarOnBottom
                        && win.getFrameLw().top + insets >= mNavigationBar.getFrameLw().top)
                        && frame.top + insets >= mNavigationBar.getFrameLw().top)
                || (!mNavigationBarOnBottom
                        && win.getFrameLw().left + insets >= mNavigationBar.getFrameLw().left))) {
                        && frame.left + insets >= mNavigationBar.getFrameLw().left));
        final boolean landscape = frame.height() > frame.width();
        final boolean offscreenLandscape = landscape && (frame.right - insets <= 0
                || frame.left + insets >= win.getDisplayFrameLw().right);
        final boolean offscreenPortrait = !landscape && (frame.top - insets <= 0
                || frame.bottom + insets >= win.getDisplayFrameLw().bottom);
        final boolean offscreen = offscreenLandscape || offscreenPortrait;
        if (behindNavBar || offscreen) {
            return 0;
        }
        if (transit == TRANSIT_ENTER || transit == TRANSIT_SHOW) {