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
This commit is contained in:
Keun young Park
2020-08-18 17:25:19 -07:00
parent 2343e72b2d
commit 1a68753611

View File

@@ -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(),