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

Commit 2241a4b6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Restore the correct state of the statusbar, navbar, and keygaurd after an density change"

parents 05bfa30a 75221649
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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();
+8 −0
Original line number Diff line number Diff line
@@ -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() {  }
}
+1 −1
Original line number Diff line number Diff line
@@ -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;