Added: Record with root permission

This commit is contained in:
hyb1996
2017-03-08 16:52:08 +08:00
parent 38c22646e0
commit a211d208d0
41 changed files with 776 additions and 391 deletions

View File

@@ -159,7 +159,10 @@ var Tap = function(x, y){
return shell("input tap " + x + " " + y, true).code == 1;
}
var Swipe = function(x1, y1, x2, y2){
var Swipe = function(x1, y1, x2, y2, duration){
if(arguments.length == 5){
return shell("input swipe " + x1 + " " + y1 + " " + x2 + " " + y2 + " " + duration, true).code == 1;
}
return shell("input swipe " + x1 + " " + y1 + " " + x2 + " " + y2, true).code == 1;
}
@@ -219,6 +222,8 @@ var Text = function(text){
return shell("input text " + text, true).code == 1;
}
__importClassOld__(com.stardust.scriptdroid.droid.runtime.Shell);
/*
importClass("com.stardust.scriptdroid.service.AccessibilityDelegate");

View File

@@ -2,7 +2,7 @@
importClass("com.afollestad.materialdialogs.MaterialDialog");
new ThemeColorMaterialDialogBuilder(activity)
new MaterialDialog.Builder(activity)
.title("简单计算器")
.input("请输入算式", "1+1", function(dialog, input){
eval("var ans = (" + input + ")");