forked from aiselp/AutoX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hyb1996
committed
Mar 8, 2017
1 parent
38c2264
commit a211d20
Showing
41 changed files
with
776 additions
and
391 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
app/src/main/java/com/stardust/scriptdroid/droid/runtime/Shell.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package com.stardust.scriptdroid.droid.runtime; | ||
|
||
/** | ||
* Created by Stardust on 2017/3/7. | ||
*/ | ||
|
||
public class Shell extends com.stardust.scriptdroid.tool.Shell { | ||
|
||
public Shell(boolean root) { | ||
super(root); | ||
} | ||
|
||
public void Tap(int x, int y) { | ||
execute("input tap " + x + " " + y); | ||
} | ||
|
||
public void Swipe(int x1, int y1, int x2, int y2) { | ||
execute("input swipe " + x1 + " " + y1 + " " + x2 + " " + y2); | ||
} | ||
|
||
public void Swipe(int x1, int y1, int x2, int y2, long duration) { | ||
execute("input swipe " + x1 + " " + y1 + " " + x2 + " " + y2 + " " + duration); | ||
} | ||
|
||
public void KeyCode(int keyCode) { | ||
execute("input keyevent " + keyCode); | ||
} | ||
|
||
public void KeyCode(String keyCode) { | ||
execute("input keyevent " + keyCode); | ||
} | ||
|
||
public void Home() { | ||
KeyCode(3); | ||
} | ||
|
||
public void Back() { | ||
KeyCode(4); | ||
} | ||
|
||
public void Power() { | ||
KeyCode(26); | ||
} | ||
|
||
public void Up() { | ||
KeyCode(19); | ||
} | ||
|
||
public void Down() { | ||
KeyCode(20); | ||
} | ||
|
||
public void Left() { | ||
KeyCode(21); | ||
} | ||
|
||
public void Right() { | ||
KeyCode(22); | ||
} | ||
|
||
public void OK() { | ||
KeyCode(23); | ||
} | ||
|
||
public void VolumeUp() { | ||
KeyCode(24); | ||
} | ||
|
||
public void VolumeDown() { | ||
KeyCode(25); | ||
} | ||
|
||
public void Menu() { | ||
KeyCode(1); | ||
} | ||
|
||
public void Camera() { | ||
KeyCode(27); | ||
} | ||
|
||
public void Text(String text) { | ||
execute("input text " + text); | ||
} | ||
|
||
} |
55 changes: 0 additions & 55 deletions
55
app/src/main/java/com/stardust/scriptdroid/droid/runtime/api/IDroidRuntime.java
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
app/src/main/java/com/stardust/scriptdroid/droid/script/DuktapeJavaScriptEngine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.