Move crash reporting listener to the server
Summary: Changelog: Move crash watcher to the server. Add 'device-crash' event. Add 'device-start-crash-watcher', 'device-stop-crash-watcher' commands. Add 'onDeviceCrash' method to Plugin Client. Reviewed By: mweststrate Differential Revision: D33089810 fbshipit-source-id: ed62ee7c1129e5e25af18b444744b0796f567b72
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9fd45b96d2
commit
731749b41f
@@ -17,6 +17,7 @@ import {dirname, join} from 'path';
|
||||
import {DeviceSpec} from 'flipper-common';
|
||||
import {ServerDevice} from '../ServerDevice';
|
||||
import {FlipperServerImpl} from '../../FlipperServerImpl';
|
||||
import {startAndroidCrashWatcher} from './AndroidCrashUtils';
|
||||
|
||||
const DEVICE_RECORDING_DIR = '/sdcard/flipper_recorder';
|
||||
|
||||
@@ -49,6 +50,7 @@ export default class AndroidDevice extends ServerDevice {
|
||||
this.adb = adb;
|
||||
}
|
||||
|
||||
// TODO: Prevent starting logging multiple times
|
||||
startLogging() {
|
||||
this.adb
|
||||
.openLogcat(this.serial, {clear: true})
|
||||
@@ -112,6 +114,10 @@ export default class AndroidDevice extends ServerDevice {
|
||||
this.reader = undefined;
|
||||
}
|
||||
|
||||
protected startCrashWatcherImpl(): () => void {
|
||||
return startAndroidCrashWatcher(this);
|
||||
}
|
||||
|
||||
reverse(ports: number[]): Promise<void> {
|
||||
return Promise.all(
|
||||
ports.map((port) =>
|
||||
|
||||
Reference in New Issue
Block a user