From 408a388fc5115483248c3444062d52565fd1f906 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sat, 12 Oct 2024 09:23:31 +0200 Subject: [PATCH] Reject --new-display for Android <= 10 Fail explicitly if a new virtual display is requested on an Android version lower than 10. PR #5370 --- server/src/main/java/com/genymobile/scrcpy/Server.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/main/java/com/genymobile/scrcpy/Server.java b/server/src/main/java/com/genymobile/scrcpy/Server.java index fd854e06..68f3c4ee 100644 --- a/server/src/main/java/com/genymobile/scrcpy/Server.java +++ b/server/src/main/java/com/genymobile/scrcpy/Server.java @@ -127,6 +127,11 @@ public final class Server { throw new ConfigurationException("Camera mirroring is not supported"); } + if (Build.VERSION.SDK_INT < AndroidVersions.API_29_ANDROID_10 && options.getNewDisplay() != null) { + Ln.e("New virtual display is not supported before Android 10"); + throw new ConfigurationException("New virtual display is not supported"); + } + CleanUp cleanUp = null; Thread initThread = null;