Fix and re-apply "[flipper] Automatically set Android devices into the permissive mode"

Summary: Reverts D36263724 (0ee8f09fe5) and fixes the underlying crash by setting only physical devices in the permissive mode

Reviewed By: passy

Differential Revision: D36275055

fbshipit-source-id: 25a691e9c07e20a3341630db508795c133a9bd81
This commit is contained in:
Andrey Goncharov
2022-05-10 08:42:58 -07:00
committed by Facebook GitHub Bot
parent 56ea2fc782
commit 754afd0d2d
3 changed files with 42 additions and 0 deletions

View File

@@ -87,6 +87,16 @@ export class AndroidDeviceManager {
});
}
// Remote simulators connected via SSH tunnels
const isRemoteDevice = device.id.startsWith('localhost');
if (
androidLikeDevice instanceof AndroidDevice &&
type === 'physical' &&
!isRemoteDevice
) {
await androidLikeDevice.setIntoPermissiveMode();
}
// The default way of capturing screenshots through adb does not seem to work
// There is a way of getting a screenshot through KaiOS dev tools though
if (androidLikeDevice instanceof AndroidDevice) {