Set device features on device initialization
Summary: 1. Identify if device supports screenshots/screen recording when it is created. 2. Disable screen recording/screenshot buttons when they are not supported Reviewed By: passy Differential Revision: D34611133 fbshipit-source-id: 82ad2d67e4af482d9becf7995187667b5d99bc36
This commit is contained in:
committed by
Facebook GitHub Bot
parent
04e7c7282b
commit
6c74f2dd18
@@ -333,14 +333,6 @@ export class FlipperServerImpl implements FlipperServer {
|
||||
'device-list': async () => {
|
||||
return Array.from(this.devices.values()).map((d) => d.info);
|
||||
},
|
||||
'device-supports-screenshot': async (serial: string) =>
|
||||
this.devices.has(serial)
|
||||
? this.getDevice(serial).screenshotAvailable()
|
||||
: false,
|
||||
'device-supports-screencapture': async (serial: string) =>
|
||||
this.devices.has(serial)
|
||||
? this.getDevice(serial).screenCaptureAvailable()
|
||||
: false,
|
||||
'device-take-screenshot': async (serial: string) =>
|
||||
Base64.fromUint8Array(await this.getDevice(serial).screenshot()),
|
||||
'device-start-screencapture': async (serial, destination) =>
|
||||
|
||||
Reference in New Issue
Block a user