docs: events, automator
This commit is contained in:
@@ -111,13 +111,8 @@ module.exports = function(runtime, global){
|
||||
|
||||
global.auto = function(mode){
|
||||
if(mode){
|
||||
if(typeof(mode) !== "string"){
|
||||
throw new TypeError("mode should be a string");
|
||||
}
|
||||
mode = modes[mode.toLowerCase()];
|
||||
global.auto.setMode(mode);
|
||||
}
|
||||
mode = mode || 0;
|
||||
runtime.accessibilityBridge.setMode(mode);
|
||||
runtime.accessibilityBridge.ensureServiceEnabled();
|
||||
}
|
||||
|
||||
@@ -125,6 +120,14 @@ module.exports = function(runtime, global){
|
||||
runtime.accessibilityBridge.waitForServiceEnabled();
|
||||
}
|
||||
|
||||
global.auto.setMode = function(mode){
|
||||
if(typeof(mode) !== "string"){
|
||||
throw new TypeError("mode should be a string");
|
||||
}
|
||||
mode = modes[mode.toLowerCase()] || 0;
|
||||
runtime.accessibilityBridge.setMode(mode);
|
||||
}
|
||||
|
||||
|
||||
global.__asGlobal__(runtime.automator, ['back', 'home', 'powerDialog', 'notifications', 'quickSettings', 'recents', 'splitScreen']);
|
||||
global.__asGlobal__(automator, ['click', 'longClick', 'press', 'swipe', 'gesture', 'gestures', 'gestureAsync', 'gesturesAsync', 'scrollDown', 'scrollUp', 'input', 'setText']);
|
||||
|
||||
Reference in New Issue
Block a user