diff options
| author | 2020-08-18 17:25:19 -0700 | |
|---|---|---|
| committer | 2020-08-26 17:55:13 -0700 | |
| commit | 1a6875361138391e09759af1b0641aa3114ad47d (patch) | |
| tree | 75e44e9697fc9ed2ef03e0eba1ac5a8ca760571b | |
| parent | 2343e72b2d1912a5e1ab30020987e89ae3b49bae (diff) | |
Do not update nightmode from settings for car mode
- Storing is disabled, so restoration should be disabled as well.
- The old behavior is problematic in device like car as car should
stay in night mode even if there is a user switching.
Bug: 155167849
Test: run user switching and confirm no night mode change in car
Change-Id: I03a4649ef0848d14b2af3da43178c0dfe3f26a32
| -rw-r--r-- | services/core/java/com/android/server/UiModeManagerService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/UiModeManagerService.java b/services/core/java/com/android/server/UiModeManagerService.java index 6dbb1e922f60..dbdcc8729eea 100644 --- a/services/core/java/com/android/server/UiModeManagerService.java +++ b/services/core/java/com/android/server/UiModeManagerService.java @@ -489,6 +489,9 @@ final class UiModeManagerService extends SystemService { * @return True if the new value is different from the old value. False otherwise. */ private boolean updateNightModeFromSettingsLocked(Context context, Resources res, int userId) { + if (mCarModeEnabled) { + return false; + } int oldNightMode = mNightMode; if (mSetupWizardComplete) { mNightMode = Secure.getIntForUser(context.getContentResolver(), |