This commit is contained in:
2021-12-09 18:03:00 +01:00
parent 0008642044
commit 391479b164
12 changed files with 134 additions and 74 deletions

View File

@ -5,6 +5,7 @@ import android.os.AsyncTask;
import android.util.Log;
import android.widget.Toast;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.methods.HttpGet;
import java.util.ArrayList;
@ -429,7 +430,10 @@ public class Action
case turnScreenOnOrOff:
if(getParameter1())
{
Actions.wakeupDevice(Long.parseLong(this.getParameter2()));
if(StringUtils.isNumeric(this.getParameter2()))
Actions.wakeupDevice(Long.parseLong(this.getParameter2()));
else
Actions.wakeupDevice((long)1000);
// wakeupDevice() will create a separate thread. That'll take some time, we wait 100ms.
try
{