forked from jens/Automation
Rework
This commit is contained in:
@ -36,8 +36,7 @@ public class Action
|
||||
enableScreenRotation,disableScreenRotation,
|
||||
startOtherActivity,
|
||||
waitBeforeNextAction,
|
||||
wakeupDevice,
|
||||
turnScreenOnOrOff,
|
||||
turnScreenOnOrOff,
|
||||
setAirplaneMode,
|
||||
setDataConnection,
|
||||
speakText,
|
||||
@ -91,8 +90,6 @@ public class Action
|
||||
return context.getResources().getString(R.string.startOtherActivity);
|
||||
case waitBeforeNextAction:
|
||||
return context.getResources().getString(R.string.waitBeforeNextAction);
|
||||
case wakeupDevice:
|
||||
return context.getResources().getString(R.string.wakeupDevice);
|
||||
case turnScreenOnOrOff:
|
||||
return context.getResources().getString(R.string.turnScreenOnOrOff);
|
||||
case vibrate:
|
||||
@ -233,10 +230,6 @@ public class Action
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.sendTextMessage));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.wakeupDevice))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.wakeupDevice));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.turnScreenOnOrOff))
|
||||
{
|
||||
if(getParameter1())
|
||||
@ -415,18 +408,6 @@ public class Action
|
||||
case waitBeforeNextAction:
|
||||
Actions.waitBeforeNextAction(Long.parseLong(this.getParameter2()));
|
||||
break;
|
||||
case wakeupDevice:
|
||||
Actions.wakeupDevice(Long.parseLong(this.getParameter2()));
|
||||
// wakeupDevice() will create a separate thread. That'll take some time, we wait 100ms.
|
||||
try
|
||||
{
|
||||
Thread.sleep(100);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
case turnScreenOnOrOff:
|
||||
if(getParameter1())
|
||||
{
|
||||
|
Reference in New Issue
Block a user