Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16eaf08f authored by Christine Franks's avatar Christine Franks Committed by Android (Google) Code Review
Browse files

Merge "Prevent querying settings when no active user"

parents b80a06a8 4478261d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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,