Add transient night mode in car mode when targeting Q
To support Android Auto, make UiModeManager.setNightMode transient when the device is in car mode. The manager will update the current visible night mode, but will not persist the setting. When exiting car mode, night mode is restored from the previous persisted setting.
If the user explicitly toggles night mode from settings, it will flip the visible mode and persisted setting, ignoring the transient behavior. This is handled in ag/6191550.
Bug: 117346726
Test: manual test app
Test: atest UiModeManagerTest CTS test in ag/6190842
Change-Id: I795f9b64a4d00bd3ecf47787e11aeb9331a64643
2 files changed