fix(autojs): root automator not working on some device

This commit is contained in:
hyb1996
2018-09-15 21:19:15 +08:00
parent a3ae309742
commit b2b2362f71
4 changed files with 166 additions and 65 deletions

View File

@@ -1,6 +1,6 @@
module.exports = function(__runtime__, scope){
function RootAutomator(){
this.__ra__ = Object.create(new com.stardust.autojs.core.inputevent.RootAutomator(scope.context));
function RootAutomator(nonBlockingForReady){
this.__ra__ = Object.create(new com.stardust.autojs.core.inputevent.RootAutomator(scope.context, !nonBlockingForReady));
var methods = ["sendEvent", "touch", "setScreenMetrics", "touchX", "touchY", "sendSync", "sendMtSync", "tap",
"swipe", "press", "longPress", "touchDown", "touchUp", "touchMove", "getDefaultId", "setDefaultId", "exit"];
for(var i = 0; i < methods.length; i++){