Check if headless system user for UI mode test

- When getting night mode, headless system user mode needs to be
considered as well as automotive mode.

Bug: 160632739
Test: atest android.app.cts.UiModeManagerTest
Change-Id: If9d16793bb56c145ed12dd53fa33af2ad8dc7240
Merged-In: If9d16793bb56c145ed12dd53fa33af2ad8dc7240
(cherry picked from commit 7bb69b14ee09cb68cb7ee42ca5e12510f0632404)
3 files changed