Reject --new-display for Android <= 10

Fail explicitly if a new virtual display is requested on an Android
version lower than 10.

PR #5370 <https://github.com/Genymobile/scrcpy/pull/5370>
This commit is contained in:
Romain Vimont 2024-10-12 09:23:31 +02:00
parent 98ed5eb643
commit 408a388fc5

View File

@ -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;