Clear adb logcat when clearing Flipper logs
Summary: When using "Clear logs" in Flipper, also flush the native Android buffer. Reviewed By: jknoxville Differential Revision: D14225722 fbshipit-source-id: f41ff9013b95fc3271d3ae44910da18023708d2d
This commit is contained in:
committed by
Facebook Github Bot
parent
ea03aa36b7
commit
edbe2555fc
@@ -9,6 +9,7 @@ import type {DeviceType, DeviceShell} from './BaseDevice.js';
|
||||
|
||||
import {Priority} from 'adbkit-logcat-fb';
|
||||
import child_process from 'child_process';
|
||||
import child_process_promise from 'child-process-es6-promise';
|
||||
import BaseDevice from './BaseDevice.js';
|
||||
|
||||
type ADBClient = any;
|
||||
@@ -80,4 +81,8 @@ export default class AndroidDevice extends BaseDevice {
|
||||
spawnShell(): ?DeviceShell {
|
||||
return child_process.spawn('adb', ['-s', this.serial, 'shell', '-t', '-t']);
|
||||
}
|
||||
|
||||
clearLogs(): Promise<void> {
|
||||
return child_process_promise.spawn('adb', ['logcat', '-c']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user