From 7e8ae50efb98ac89ede25a32a3aa9f7f4c200e07 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Thu, 10 Oct 2013 23:38:19 -0400 Subject: [PATCH] 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 --- .../com/android/systemui/statusbar/phone/PhoneStatusBar.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 3ddcb1b03b519..0e52605a6b68c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -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();