Add LogcatApplyFiltersMessage.

This commit is contained in:
Simo Kinnunen
2014-02-07 00:58:39 +09:00
parent e4c76e1793
commit a8fe5f6613
2 changed files with 29 additions and 0 deletions

View File

@@ -401,6 +401,12 @@ module.exports = function(options) {
log.error('keyPress failed', err.stack)
})
})
.on(wire.LogcatApplyFiltersMessage, function(channel, message) {
services.logcat.resetFilters().excludeAll()
message.filters.forEach(function(filter) {
services.logcat.include(filter.tag, filter.priority)
})
})
.on(wire.ShellCommandMessage, function(channel, message) {
log.info('Running shell command "%s"', message.command.join(' '))
adb.shellAsync(options.serial, message.command)