From 1757a1815072a5f740f71cca0a69770d8dfe2d73 Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Mon, 22 Apr 2024 07:04:05 -0700 Subject: [PATCH] Get device by serial Summary: Introduce a new API to obtain devices by serial, if any. Reviewed By: antonk52 Differential Revision: D55797515 fbshipit-source-id: a341d08f75e6f7ed9f989acee809c7066212932b --- desktop/flipper-server/src/FlipperServerImpl.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop/flipper-server/src/FlipperServerImpl.tsx b/desktop/flipper-server/src/FlipperServerImpl.tsx index 292843d70b2..867800b943a 100644 --- a/desktop/flipper-server/src/FlipperServerImpl.tsx +++ b/desktop/flipper-server/src/FlipperServerImpl.tsx @@ -727,6 +727,10 @@ export class FlipperServerImpl implements FlipperServer { } } + getDeviceWithSerial(serial: string): ServerDevice | undefined { + return this.devices.get(serial); + } + getDeviceSerials(): string[] { return Array.from(this.devices.keys()); }