Merge "Allow the host to send empty clipboards to the guest"

This commit is contained in:
Roman Kiryanov
2023-02-02 01:27:29 +00:00
committed by Gerrit Code Review

View File

@@ -111,7 +111,7 @@ class EmulatorClipboardMonitor implements Consumer<ClipData> {
bb.order(ByteOrder.LITTLE_ENDIAN);
final int msgLen = bb.getInt();
if (msgLen <= 0 || msgLen > MAX_CLIPBOARD_BYTES) {
if (msgLen < 0 || msgLen > MAX_CLIPBOARD_BYTES) {
throw new ProtocolException("Clipboard message length: " + msgLen + " out of bounds.");
}