Always use non-empty arguments

The client passes parameters to the server via "adb shell" arguments.

Use "-" instead of "" when no crop is specified to avoid empty
arguments, which are not handled the same way on all devices.

Fixed <https://github.com/Genymobile/scrcpy/issues/337>.
This commit is contained in:
Romain Vimont 2018-11-16 18:36:17 +01:00
commit 1e22ebcac2
2 changed files with 2 additions and 2 deletions

View file

@ -71,7 +71,7 @@ public final class Server {
}
private static Rect parseCrop(String crop) {
if (crop.isEmpty()) {
if ("-".equals(crop)) {
return null;
}
// input format: "width:height:x:y"