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

Commit 8daf2a47 authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Make desk mode work again.

Bug: 2564612
Change-Id: I858a86d14a6840f5f587343a64c5d0c4bc5d5263
parent 3fe1708d
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -383,7 +383,7 @@ class UiModeManagerService extends IUiModeManager.Stub {
    }

    final void updateConfigurationLocked(boolean sendIt) {
        int uiMode = 0;
        int uiMode = Configuration.UI_MODE_TYPE_NORMAL;
        if (mCarModeEnabled) {
            uiMode = Configuration.UI_MODE_TYPE_CAR;
        } else if (mDockState == Intent.EXTRA_DOCK_STATE_DESK) {
@@ -399,8 +399,15 @@ class UiModeManagerService extends IUiModeManager.Stub {
            }
        } else {
            // Disabling the car mode clears the night mode.
            uiMode = Configuration.UI_MODE_TYPE_NORMAL |
                    Configuration.UI_MODE_NIGHT_NO;
            uiMode = (uiMode & ~Configuration.UI_MODE_NIGHT_MASK) | Configuration.UI_MODE_NIGHT_NO;
        }

        if (LOG) {
            Slog.d(TAG, 
                "updateConfigurationLocked: mDockState=" + mDockState 
                + "; mCarMode=" + mCarModeEnabled
                + "; mNightMode=" + mNightMode
                + "; uiMode=" + uiMode);
        }

        mCurUiMode = uiMode;