Loading core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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): Loading services/core/java/com/android/server/UiModeManagerService.java +2 −3 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading
core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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): Loading
services/core/java/com/android/server/UiModeManagerService.java +2 −3 Original line number Diff line number Diff line Loading @@ -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) { Loading