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

Commit 1ca41c72 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Restricting UiModeManager#setNightMode"

parents 035d2912 c5aaf45b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -906,7 +906,7 @@
    <!--  Control whether to lock day/night mode change from normal application. When it is
          true, day / night mode change is only allowed to apps with MODIFY_DAY_NIGHT_MODE
          permission. -->
    <bool name="config_lockDayNightMode">false</bool>
    <bool name="config_lockDayNightMode">true</bool>

    <!-- Control the default night mode to use when there is no other mode override set.
         One of the following values (see UiModeManager.java):
+2 −3
Original line number Diff line number Diff line
@@ -303,8 +303,7 @@ final class UiModeManagerService extends SystemService {
            if (isNightModeLocked() && (getContext().checkCallingOrSelfPermission(
                    android.Manifest.permission.MODIFY_DAY_NIGHT_MODE)
                    != PackageManager.PERMISSION_GRANTED)) {
                Slog.e(TAG,
                        "Night mode locked, requires MODIFY_DAY_NIGHT_MODE permission");
                Slog.e(TAG, "Night mode locked, requires MODIFY_DAY_NIGHT_MODE permission");
                return;
            }
            switch (mode) {