diff --git a/lib/units/device/plugins/screen/stream.js b/lib/units/device/plugins/screen/stream.js index 94f45289..455c20fb 100644 --- a/lib/units/device/plugins/screen/stream.js +++ b/lib/units/device/plugins/screen/stream.js @@ -375,7 +375,7 @@ module.exports = syrup.serial() } function kindKill() { - return kill('SIGTERM') + return kill('SIGTERM' } function forceKill() { diff --git a/lib/util/devutil.js b/lib/util/devutil.js index 061a2631..33bcba3b 100644 --- a/lib/util/devutil.js +++ b/lib/util/devutil.js @@ -44,27 +44,29 @@ devutil.listPidsByComm = function(adb, serial, comm, bin) { return new Promise(function(resolve) { if ('ps' in commands) { resolve(commands) - } else { + } + else { adb.getProperties(serial) - .then(function (properties) { - version = properties['ro.build.version.release'] - if (version.match(/^8\./) != null) { - commands['ps'] = 'ps -lef' - } else { - commands['ps'] = 'ps' + .then(function(properties) { + var version = properties['ro.build.version.release'] + if (version.match(/^8\./) !== null) { + commands["ps"] = 'ps -lef' + } + else { + commands["ps"] = 'ps' } resolve(commands) }) } }) - .then(function (commands) { - return adb.shell(serial, [commands['ps']]) - .then(function (out) { - return new Promise(function (resolve) { + .then(function(commands) { + return adb.shell(serial, [commands["ps"]]) + .then(function(out) { + return new Promise(function(resolve) { var header = true var pids = [] out.pipe(split()) - .on('data', function (chunk) { + .on('data', function(chunk) { if (header) { header = false } @@ -75,7 +77,7 @@ devutil.listPidsByComm = function(adb, serial, comm, bin) { } } }) - .on('end', function () { + .on('end', function() { resolve(pids) }) })