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:
Andrey Goncharov
2022-03-04 02:00:23 -08:00
committed by Facebook GitHub Bot
parent 04e7c7282b
commit 6c74f2dd18
19 changed files with 81 additions and 75 deletions

View File

@@ -43,6 +43,10 @@ export type DeviceDescription = {
readonly deviceType: DeviceType;
readonly serial: string;
readonly icon?: string;
readonly features: {
screenshotAvailable: boolean;
screenCaptureAvailable: boolean;
};
// Android specific information
readonly specs?: DeviceSpec[];
readonly abiList?: string[];
@@ -205,8 +209,6 @@ export type FlipperServerCommands = {
'get-config': () => Promise<FlipperServerConfig>;
'get-changelog': () => Promise<string>;
'device-list': () => Promise<DeviceDescription[]>;
'device-supports-screenshot': (serial: string) => Promise<boolean>;
'device-supports-screencapture': (serial: string) => Promise<boolean>;
'device-take-screenshot': (serial: string) => Promise<string>; // base64 encoded buffer
'device-start-screencapture': (
serial: string,