diff options
| -rw-r--r-- | services/core/java/com/android/server/display/color/ColorDisplayService.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/display/color/ColorDisplayService.java b/services/core/java/com/android/server/display/color/ColorDisplayService.java index b1e5510b3adc..23117760f45f 100644 --- a/services/core/java/com/android/server/display/color/ColorDisplayService.java +++ b/services/core/java/com/android/server/display/color/ColorDisplayService.java @@ -1276,11 +1276,17 @@ public final class ColorDisplayService extends SystemService { } boolean isActivatedSetting() { + if (mCurrentUser == UserHandle.USER_NULL) { + return false; + } return Secure.getIntForUser(getContext().getContentResolver(), Secure.NIGHT_DISPLAY_ACTIVATED, 0, mCurrentUser) == 1; } int getColorTemperatureSetting() { + if (mCurrentUser == UserHandle.USER_NULL) { + return NOT_SET; + } return clampNightDisplayColorTemperature(Secure.getIntForUser( getContext().getContentResolver(), Secure.NIGHT_DISPLAY_COLOR_TEMPERATURE, NOT_SET, |