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

Commit 7e8ae50e authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Be sure to update the display metrics on config change.

Regression of ancient bugs 6955586 & 7086018 (navigation bar
missing buttons since they're stacked up off the screen
along the wrong axis).

Bug: 10341684
Change-Id: I778b085bf256cb20ecceaf38fd229a7de9b75aae
parent 9dc7e12c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode {
    public void start() {
        mDisplay = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE))
                .getDefaultDisplay();
        mDisplay.getSize(mCurrentDisplaySize);
        updateDisplaySize();

        super.start(); // calls createAndAddWindows()

@@ -2304,6 +2304,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode {
    // called by makeStatusbar and also by PhoneStatusBarView
    void updateDisplaySize() {
        mDisplay.getMetrics(mDisplayMetrics);
        mDisplay.getSize(mCurrentDisplaySize);
        if (DEBUG_GESTURES) {
            mGestureRec.tag("display",
                    String.format("%dx%d", mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels));
@@ -2475,7 +2476,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode {
        if (DEBUG) {
            Log.v(TAG, "configuration changed: " + mContext.getResources().getConfiguration());
        }
        mDisplay.getSize(mCurrentDisplaySize);
        updateDisplaySize(); // populates mDisplayMetrics

        updateResources();
        repositionNavigationBar();