mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 00:53:27 +02:00
Revert "Use 'am stopservice' to stop the input service."
This reverts commit d97a10de0ace793a06a15bfdd6b667b7517e655e.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user