Merge "Work around instability of Display.getRotation()." into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8c890f8a69
@@ -451,6 +451,7 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
|
filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
|
||||||
filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
|
filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
|
||||||
filter.addAction(Intent.ACTION_SCREEN_OFF);
|
filter.addAction(Intent.ACTION_SCREEN_OFF);
|
||||||
|
filter.addAction(Intent.ACTION_SCREEN_ON);
|
||||||
context.registerReceiver(mBroadcastReceiver, filter);
|
context.registerReceiver(mBroadcastReceiver, filter);
|
||||||
|
|
||||||
return mStatusBarView;
|
return mStatusBarView;
|
||||||
@@ -788,11 +789,6 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
setAreThereNotifications();
|
setAreThereNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onConfigurationChanged(Configuration newConfig) {
|
|
||||||
updateShowSearchHoldoff();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateShowSearchHoldoff() {
|
private void updateShowSearchHoldoff() {
|
||||||
mShowSearchHoldoff = mContext.getResources().getInteger(
|
mShowSearchHoldoff = mContext.getResources().getInteger(
|
||||||
R.integer.config_show_search_delay);
|
R.integer.config_show_search_delay);
|
||||||
@@ -1804,9 +1800,17 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
makeExpandedInvisible();
|
makeExpandedInvisible();
|
||||||
}
|
}
|
||||||
else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
|
else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
|
||||||
|
if (DEBUG) {
|
||||||
|
Slog.v(TAG, "configuration changed: " + mContext.getResources().getConfiguration());
|
||||||
|
}
|
||||||
updateResources();
|
updateResources();
|
||||||
repositionNavigationBar();
|
repositionNavigationBar();
|
||||||
updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
|
updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
|
||||||
|
updateShowSearchHoldoff();
|
||||||
|
}
|
||||||
|
else if (Intent.ACTION_SCREEN_ON.equals(action)) {
|
||||||
|
// work around problem where mDisplay.getRotation() is not stable while screen is off (bug 7086018)
|
||||||
|
repositionNavigationBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user