Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit d7db7bf

Browse files
committed
Fix field counts in other places
1 parent a25ad01 commit d7db7bf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/ui/window/key_data.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
namespace flutter {
1111

12-
// If this value changes, update the encoding code in the following files:
13-
//
14-
// * KeyData.java (KeyData.FIELD_COUNT)
15-
// * platform_dispatcher.dart (_kKeyDataFieldCount)
12+
// If this value changes, update the encoding code in the following files:
13+
//
14+
// * KeyData.java (KeyData.FIELD_COUNT)
15+
// * platform_dispatcher.dart (_kKeyDataFieldCount)
1616
static constexpr int kKeyDataFieldCount = 6;
1717
static constexpr int kBytesPerKeyField = sizeof(int64_t);
1818

shell/platform/android/io/flutter/embedding/android/KeyData.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ public KeyData(@NonNull ByteBuffer buffer) {
140140

141141
long timestamp;
142142
Type type;
143-
DeviceType deviceType;
144143
long physicalKey;
145144
long logicalKey;
146145
boolean synthesized;
146+
DeviceType deviceType;
147147

148148
/** The character of this key data encoded in UTF-8. */
149149
@Nullable String character;
@@ -173,7 +173,7 @@ ByteBuffer toBytes() {
173173
packet.putLong(physicalKey);
174174
packet.putLong(logicalKey);
175175
packet.putLong(synthesized ? 1L : 0L);
176-
packet.putLong(deviceType);
176+
packet.putLong(deviceType.getValue());
177177
if (charBytes != null) {
178178
packet.put(charBytes);
179179
}

0 commit comments

Comments
 (0)