Skip to content

Commit 8c890f8

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Work around instability of Display.getRotation()." into jb-mr1-dev
2 parents 6beee26 + 7f3cf95 commit 8c890f8

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ public void onSizeChanged(View view, int w, int h, int oldw, int oldh) {
451451
filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
452452
filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
453453
filter.addAction(Intent.ACTION_SCREEN_OFF);
454+
filter.addAction(Intent.ACTION_SCREEN_ON);
454455
context.registerReceiver(mBroadcastReceiver, filter);
455456

456457
return mStatusBarView;
@@ -788,11 +789,6 @@ public void removeNotification(IBinder key) {
788789
setAreThereNotifications();
789790
}
790791

791-
@Override
792-
protected void onConfigurationChanged(Configuration newConfig) {
793-
updateShowSearchHoldoff();
794-
}
795-
796792
private void updateShowSearchHoldoff() {
797793
mShowSearchHoldoff = mContext.getResources().getInteger(
798794
R.integer.config_show_search_delay);
@@ -1804,9 +1800,17 @@ else if (Intent.ACTION_SCREEN_OFF.equals(action)) {
18041800
makeExpandedInvisible();
18051801
}
18061802
else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
1803+
if (DEBUG) {
1804+
Slog.v(TAG, "configuration changed: " + mContext.getResources().getConfiguration());
1805+
}
18071806
updateResources();
18081807
repositionNavigationBar();
18091808
updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
1809+
updateShowSearchHoldoff();
1810+
}
1811+
else if (Intent.ACTION_SCREEN_ON.equals(action)) {
1812+
// work around problem where mDisplay.getRotation() is not stable while screen is off (bug 7086018)
1813+
repositionNavigationBar();
18101814
}
18111815
}
18121816
};

0 commit comments

Comments
 (0)