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

Commit 564268f7 authored by John Spurlock's avatar John Spurlock Committed by Android Git Automerger
Browse files

am a91047ff: Merge "NavBar: Don\'t resize in portrait docks when HDMI connected." into jb-dev

* commit 'a91047ff':
  NavBar: Don't resize in portrait docks when HDMI connected.
parents c383b407 a91047ff
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2278,7 +2278,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                // It's a system nav bar or a portrait screen; nav bar goes on bottom.
                int top = displayHeight - mNavigationBarHeightForRotation[displayRotation];
                if (mHdmiPlugged) {
                    if (top > mExternalDisplayHeight) {
                    // Move the nav bar up if the external display is the same aspect ratio
                    // but shorter.  This avoids clipping on the external display.
                    boolean sameAspect = mExternalDisplayHeight > 0 && displayHeight > 0
                        && ((float) mExternalDisplayWidth / mExternalDisplayHeight > 1)
                        == ((float) displayWidth / displayHeight > 1);
                    if (sameAspect && top > mExternalDisplayHeight) {
                        top = mExternalDisplayHeight;
                    }
                }