Merge "Allow the host to send empty clipboards to the guest" am: d20bc58ae9 am: 7bdece286a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2415825

Change-Id: I927717f13df3294a6d1243a900b9aef96f31d29a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Roman Kiryanov
2023-02-02 02:55:19 +00:00
committed by Automerger Merge Worker

View File

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