This commit is contained in:
jens 2021-12-18 13:29:47 +01:00
parent 21b8c6c7ec
commit 3e9590d7d2
3 changed files with 9 additions and 0 deletions

View File

@ -1133,6 +1133,7 @@ public class Actions
{ {
Miscellaneous.logEvent("i", "Actions", "Turning screen off.", 3); Miscellaneous.logEvent("i", "Actions", "Turning screen off.", 3);
/*params.flags |= LayoutParams.FLAG_KEEP_SCREEN_ON; /*params.flags |= LayoutParams.FLAG_KEEP_SCREEN_ON;
params.screenBrightness = 0; params.screenBrightness = 0;
getWindow().setAttributes(params);*/ getWindow().setAttributes(params);*/

View File

@ -550,8 +550,10 @@ public class Miscellaneous extends Service
int mode = context.getResources().getConfiguration().uiMode; int mode = context.getResources().getConfiguration().uiMode;
switch(mode) switch(mode)
{ {
case 33:
case Configuration.UI_MODE_NIGHT_YES: case Configuration.UI_MODE_NIGHT_YES:
return true; return true;
case 17:
case Configuration.UI_MODE_NIGHT_NO: case Configuration.UI_MODE_NIGHT_NO:
case Configuration.UI_MODE_NIGHT_UNDEFINED: case Configuration.UI_MODE_NIGHT_UNDEFINED:
default: default:

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<device-admin xmlns:android="http://schemas.android.com/apk/res/android" >
<uses-policies>
<force-lock />
</uses-policies>
</device-admin>