Added: Record with root permission
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -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 + ")");
|
||||
|
||||
Reference in New Issue
Block a user