diff --git a/lib/roles/device/plugins/input.js b/lib/roles/device/plugins/input.js index 0aae6226..4ce493a8 100644 --- a/lib/roles/device/plugins/input.js +++ b/lib/roles/device/plugins/input.js @@ -85,10 +85,9 @@ module.exports = syrup.serial() ) } - function callService(cmd, intent) { + function callService(intent) { return adb.shell(options.serial, util.format( - 'am %s --user 0 %s' - , cmd + 'am startservice --user 0 %s' , intent )) .then(function(out) { @@ -138,10 +137,7 @@ module.exports = syrup.serial() return devutil.waitForPortToFree(adb, options.serial, service.port) }) .then(function() { - return callService( - 'startservice' - , util.format("-a '%s'", service.startAction) - ) + return callService(util.format("-a '%s'", service.startAction)) }) .then(function() { return devutil.waitForPort(adb, options.serial, service.port) @@ -160,10 +156,7 @@ module.exports = syrup.serial() } function stopService() { - return callService( - 'stopservice' - , util.format("-a '%s'", service.stopAction) - ) + return callService(util.format("-a '%s'", service.stopAction)) } function sendInputEvent(event) {