Make crash reporter plugin device only

Summary: Makes a crash reporter plugin as a device plugin

Reviewed By: passy

Differential Revision: D13203954

fbshipit-source-id: 02ef2aff05d5a240eaff588f9b515d3d610fc182
This commit is contained in:
Pritesh Nandgaonkar
2018-11-29 06:57:22 -08:00
committed by Facebook Github Bot
parent 7ffdb36cc5
commit 14431e6b76
5 changed files with 35 additions and 22 deletions

View File

@@ -6,7 +6,7 @@
* @flow
*/
import {FlipperPlugin} from 'flipper';
import {FlipperDevicePlugin, Device} from 'flipper';
import type {Notification} from '../../plugin';
type Crash = {|
@@ -19,7 +19,7 @@ type PersistedState = {|
crashes: Array<Crash>,
|};
export default class extends FlipperPlugin {
export default class CrashReporterPlugin extends FlipperDevicePlugin {
static title = 'Crash Reporter';
static id = 'CrashReporter';
static icon = 'apps';
@@ -28,6 +28,9 @@ export default class extends FlipperPlugin {
crashes: [],
};
static supportsDevice(device: Device) {
return device.os === 'iOS' || device.os === 'Android';
}
/*
* Reducer to process incoming "send" messages from the mobile counterpart.
*/