mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-29 12:19:15 +00:00
Rename max length constant for text injection
To avoid confusion with the max text size for clipboard, rename the constant limiting the text injection length.
This commit is contained in:
parent
95fa1a69e4
commit
270d0bf639
5 changed files with 11 additions and 10 deletions
|
@ -13,8 +13,8 @@ public class ControlMessageReader {
|
|||
static final int INJECT_SCROLL_EVENT_PAYLOAD_LENGTH = 20;
|
||||
static final int SET_SCREEN_POWER_MODE_PAYLOAD_LENGTH = 1;
|
||||
|
||||
public static final int TEXT_MAX_LENGTH = 300;
|
||||
public static final int CLIPBOARD_TEXT_MAX_LENGTH = 4093;
|
||||
public static final int INJECT_TEXT_MAX_LENGTH = 300;
|
||||
private static final int RAW_BUFFER_SIZE = 1024;
|
||||
|
||||
private final byte[] rawBuffer = new byte[RAW_BUFFER_SIZE];
|
||||
|
|
|
@ -66,7 +66,7 @@ public class ControlMessageReaderTest {
|
|||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
DataOutputStream dos = new DataOutputStream(bos);
|
||||
dos.writeByte(ControlMessage.TYPE_INJECT_TEXT);
|
||||
byte[] text = new byte[ControlMessageReader.TEXT_MAX_LENGTH];
|
||||
byte[] text = new byte[ControlMessageReader.INJECT_TEXT_MAX_LENGTH];
|
||||
Arrays.fill(text, (byte) 'a');
|
||||
dos.writeShort(text.length);
|
||||
dos.write(text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue