Add archived device type
Summary:
This diff adds archived device type. This diff solves the following two problems.
- The Plugin which are device plugins and are device plugins will not show up. Look at the video, where the CPU plugin was showed, even though the imported file didn't have any information.
- An icon of 📦 will make much clearer which one is archived device and which isn't
Reviewed By: passy
Differential Revision: D14066399
fbshipit-source-id: 59b740d7fe9532e665d6b1ec6ad0124fb63ac45d
This commit is contained in:
committed by
Facebook Github Bot
parent
9b6db1f482
commit
b9db2411cf
@@ -20,7 +20,13 @@ export default class ArchivedDevice extends BaseDevice {
|
||||
os: OS,
|
||||
logEntries: Array<DeviceLogEntry>,
|
||||
) {
|
||||
super(serial, deviceType, title);
|
||||
let archivedDeviceType = deviceType;
|
||||
if (archivedDeviceType === 'emulator') {
|
||||
archivedDeviceType = 'archivedEmulator';
|
||||
} else if (archivedDeviceType === 'physical') {
|
||||
archivedDeviceType = 'archivedPhysical';
|
||||
}
|
||||
super(serial, archivedDeviceType, title);
|
||||
this.os = os;
|
||||
this.logs = logEntries;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,11 @@ export type DeviceShell = {
|
||||
|
||||
export type DeviceLogListener = (entry: DeviceLogEntry) => void;
|
||||
|
||||
export type DeviceType = 'emulator' | 'physical';
|
||||
export type DeviceType =
|
||||
| 'emulator'
|
||||
| 'physical'
|
||||
| 'archivedEmulator'
|
||||
| 'archivedPhysical';
|
||||
|
||||
export type DeviceExport = {|
|
||||
os: string,
|
||||
|
||||
Reference in New Issue
Block a user