mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-31 06:15:25 +00:00
Push clipboard text only if not null
In practice, it does not change anything (it just avoids a spurious wake-up), but semantically, it makes no sense to call pushClipboardText() with a null value.
This commit is contained in:
@@ -105,7 +105,9 @@ public class Controller {
|
|||||||
break;
|
break;
|
||||||
case ControlMessage.TYPE_GET_CLIPBOARD:
|
case ControlMessage.TYPE_GET_CLIPBOARD:
|
||||||
String clipboardText = device.getClipboardText();
|
String clipboardText = device.getClipboardText();
|
||||||
|
if (clipboardText != null) {
|
||||||
sender.pushClipboardText(clipboardText);
|
sender.pushClipboardText(clipboardText);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ControlMessage.TYPE_SET_CLIPBOARD:
|
case ControlMessage.TYPE_SET_CLIPBOARD:
|
||||||
boolean paste = (msg.getFlags() & ControlMessage.FLAGS_PASTE) != 0;
|
boolean paste = (msg.getFlags() & ControlMessage.FLAGS_PASTE) != 0;
|
||||||
|
Reference in New Issue
Block a user