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

Commit 26b49a7d authored by Daniel Sandler's avatar Daniel Sandler Committed by Android (Google) Code Review
Browse files

Merge "Be sure to update the display metrics on config change." into klp-dev

parents caaefaea 7e8ae50e
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();