Revert "Use 'am stopservice' to stop the input service."

This reverts commit d97a10de0ace793a06a15bfdd6b667b7517e655e.
This commit is contained in:
Simo Kinnunen
2014-03-24 11:20:25 +09:00
parent 2683f36390
commit a9f7e0dd0d

View File

@@ -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) {