From 6cff8e2c2b2f8607dd3285a4d82e42df6327d572 Mon Sep 17 00:00:00 2001 From: Kumar Kartikeya <49616171+kartik1o@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:09:43 +0530 Subject: [PATCH] Enable video record through screenrecord binary on Genymotion devices (#854) * record video on genymotion devices * variable naming --------- Co-authored-by: Anton Malinskiy --- .../com/malinskiy/marathon/android/BaseAndroidDevice.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vendor/vendor-android/src/main/kotlin/com/malinskiy/marathon/android/BaseAndroidDevice.kt b/vendor/vendor-android/src/main/kotlin/com/malinskiy/marathon/android/BaseAndroidDevice.kt index a403347b5..d4c502f90 100644 --- a/vendor/vendor-android/src/main/kotlin/com/malinskiy/marathon/android/BaseAndroidDevice.kt +++ b/vendor/vendor-android/src/main/kotlin/com/malinskiy/marathon/android/BaseAndroidDevice.kt @@ -174,16 +174,15 @@ abstract class BaseAndroidDevice( } private suspend fun detectFeatures(): List { - val hasScreenRecord = when { + val screenRecordSupport = when { !version.isGreaterOrEqualThan(19) -> false else -> hasBinary("/system/bin/screenrecord") } - val videoSupport = hasScreenRecord && manufacturer != "Genymotion" val screenshotSupport = version.isGreaterOrEqualThan(AndroidVersion.VersionCodes.JELLY_BEAN) val features = mutableListOf() - if (videoSupport) features.add(DeviceFeature.VIDEO) + if (screenRecordSupport) features.add(DeviceFeature.VIDEO) if (screenshotSupport) features.add(DeviceFeature.SCREENSHOT) return features }