Merge "Restore the correct state of the statusbar, navbar, and keygaurd after an density change"
This commit is contained in:
committed by
Android (Google) Code Review
commit
2241a4b673
@@ -161,6 +161,11 @@ public class CarStatusBar extends StatusBar implements
|
||||
}
|
||||
|
||||
buildNavBarContent();
|
||||
// If the UI was rebuilt (day/night change) while the keyguard was up we need to
|
||||
// correctly respect that state.
|
||||
if (mIsKeyguard) {
|
||||
updateNavBarForKeyguardContent();
|
||||
}
|
||||
}
|
||||
|
||||
private void addTemperatureViewToController(View v) {
|
||||
@@ -211,6 +216,13 @@ public class CarStatusBar extends StatusBar implements
|
||||
@Override
|
||||
public void showKeyguard() {
|
||||
super.showKeyguard();
|
||||
updateNavBarForKeyguardContent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch to the keyguard applicable content contained in the nav bars
|
||||
*/
|
||||
private void updateNavBarForKeyguardContent() {
|
||||
getComponent(NotificationsUI.class).closeCarNotifications(0);
|
||||
if (mNavigationBarView != null) {
|
||||
mNavigationBarView.showKeyguardButtons();
|
||||
|
||||
@@ -64,4 +64,12 @@ public class CarStatusBarKeyguardViewManager extends StatusBarKeyguardViewManage
|
||||
CarStatusBar statusBar = (CarStatusBar) mStatusBar;
|
||||
statusBar.showUserSwitcher();
|
||||
}
|
||||
|
||||
/**
|
||||
* Do nothing on this change.
|
||||
* The base class hides the keyguard which for automotive we want to avoid b/c this would happen
|
||||
* on a configuration change due to day/night (headlight state).
|
||||
*/
|
||||
@Override
|
||||
public void onDensityOrFontScaleChanged() { }
|
||||
}
|
||||
|
||||
@@ -538,7 +538,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
private BatteryController mBatteryController;
|
||||
protected boolean mPanelExpanded;
|
||||
private UiModeManager mUiModeManager;
|
||||
private boolean mIsKeyguard;
|
||||
protected boolean mIsKeyguard;
|
||||
private LogMaker mStatusBarStateLog;
|
||||
protected NotificationIconAreaController mNotificationIconAreaController;
|
||||
@Nullable private View mAmbientIndicationContainer;
|
||||
|
||||
Reference in New Issue
Block a user