commit | 7bdece286a861995d850694748bfc7a5dd4ed8b7 | [log] [tgz] |
---|---|---|
author | Roman Kiryanov <rkir@google.com> | Thu Feb 02 02:00:49 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Feb 02 02:00:49 2023 +0000 |
tree | 8b5401f8a17c9a3275d0775171b2257a2ac580bc | |
parent | 1e9a408dc665db46accef3f9e4bb069c0ea6578e [diff] | |
parent | d20bc58ae9f327dda75f0457ef73eba23f99d7a1 [diff] |
Merge "Allow the host to send empty clipboards to the guest" am: d20bc58ae9 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2415825 Change-Id: I8b6ec791f558933f3111006d26e6d651785267eb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/services/core/java/com/android/server/clipboard/EmulatorClipboardMonitor.java b/services/core/java/com/android/server/clipboard/EmulatorClipboardMonitor.java index dce1c96..39c649b 100644 --- a/services/core/java/com/android/server/clipboard/EmulatorClipboardMonitor.java +++ b/services/core/java/com/android/server/clipboard/EmulatorClipboardMonitor.java
@@ -111,7 +111,7 @@ 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."); }