Rework
This commit is contained in:
parent
21b8c6c7ec
commit
3e9590d7d2
@ -1133,6 +1133,7 @@ public class Actions
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Actions", "Turning screen off.", 3);
|
||||
|
||||
|
||||
/*params.flags |= LayoutParams.FLAG_KEEP_SCREEN_ON;
|
||||
params.screenBrightness = 0;
|
||||
getWindow().setAttributes(params);*/
|
||||
|
@ -550,8 +550,10 @@ public class Miscellaneous extends Service
|
||||
int mode = context.getResources().getConfiguration().uiMode;
|
||||
switch(mode)
|
||||
{
|
||||
case 33:
|
||||
case Configuration.UI_MODE_NIGHT_YES:
|
||||
return true;
|
||||
case 17:
|
||||
case Configuration.UI_MODE_NIGHT_NO:
|
||||
case Configuration.UI_MODE_NIGHT_UNDEFINED:
|
||||
default:
|
||||
|
6
app/src/main/res/xml/policies.xml
Normal file
6
app/src/main/res/xml/policies.xml
Normal 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>
|
Loading…
Reference in New Issue
Block a user