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

Commit a33db84

Browse files
wip
1 parent 7d9865c commit a33db84

File tree

6 files changed

+386
-459
lines changed

6 files changed

+386
-459
lines changed

shell/platform/android/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ android_java_sources = [
216216
"io/flutter/plugin/editing/FlutterTextUtils.java",
217217
"io/flutter/plugin/editing/ImeSyncDeferringInsetsCallback.java",
218218
"io/flutter/plugin/editing/InputConnectionAdaptor.java",
219+
"io/flutter/plugin/editing/ListenableEditingState.java",
219220
"io/flutter/plugin/editing/TextInputPlugin.java",
220221
"io/flutter/plugin/localization/LocalizationPlugin.java",
221222
"io/flutter/plugin/mouse/MouseCursorPlugin.java",

shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,14 @@ public TextEditState(
692692
int selectionEnd,
693693
int composingStart,
694694
int composingEnd) {
695+
696+
assert (selectionStart == -1 && selectionEnd == -1)
697+
|| (selectionStart >= 0 && selectionStart <= selectionEnd);
698+
assert (composingStart == -1 && composingEnd == -1)
699+
|| (composingStart >= 0 && composingStart < composingEnd);
700+
assert composingEnd <= text.length();
701+
assert selectionEnd <= text.length();
702+
695703
this.text = text;
696704
this.selectionStart = selectionStart;
697705
this.selectionEnd = selectionEnd;

0 commit comments

Comments
 (0)