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

Commit adaeb93

Browse files
committed
Fix Java null pointer exception
1 parent fd13af5 commit adaeb93

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ private boolean handleEventImpl(
368368
output.physicalKey = physicalKey;
369369
output.character = character;
370370
output.synthesized = false;
371+
output.deviceType = KeyData.DeviceType.kKeyboard;
371372

372373
sendKeyEvent(output, onKeyEventHandledCallback);
373374
for (final Runnable postSyncEvent : postSynchronizeEvents) {
@@ -384,6 +385,7 @@ private void synthesizeEvent(boolean isDown, Long logicalKey, Long physicalKey,
384385
output.physicalKey = physicalKey;
385386
output.character = null;
386387
output.synthesized = true;
388+
output.deviceType = KeyData.DeviceType.kKeyboard;
387389
if (physicalKey != 0 && logicalKey != 0) {
388390
updatePressingState(physicalKey, isDown ? logicalKey : null);
389391
}

0 commit comments

Comments
 (0)