hex/android/app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel cf661235b5 Android keyboard: any start of input ends a dictation, a restart included
Why: #2820's first commit kept a dictation when onStartInput came with
restarting = true for the same package and fieldId, taking that for the same
field restarting in place. Chrome, a WebView and Compose move between their
inputs by restarting one view: on emulator-5710 (debug log of acaa7aba4), two web
inputs and a textarea in Chrome and in a WebView, and Hex's own Compose
feedback form, all reported restarting = true, the same package, fieldId -1, and
for the two web inputs the same inputType 0xc0a1, imeOptions, selection 0,0,
no hint, label or extras, and empty text either side. A dictation spoken in web
input A went into input B when the person tapped B or the page called b.focus(),
while recording and while transcribing; in Compose, into the message field. The
old cancel prevented that.

What changed: onStartInput always starts a new field and cancels, as before
#2820. DictationField.started() takes no arguments. A hide still finishes the
recording and types into the same field: Back or an app hiding the keyboard
sends no onStartInput in a native EditText, Chrome or Compose.

Removed: the restart rule. A native app restarting input on the same field
during a dictation (setText, restartInput: restarting = true too) discards it
again, as before #2820. Matching the EditorInfo and the text around the cursor
was weighed and rejected: two empty web or Compose fields look identical.

Verified: :app:testDebugUnitTest (345 tests, 0 failures; InsertionTest's cases
now say any start is another field) and :app:assemblePreview on the Studio. On
emulator-5710 with build 9451: Chrome and WebView, tap B or b.focus() while
recording or transcribing: nothing in A, B or C; clearing A from script (no
restart) keeps the text in A, as Gboard does; Compose, tap the other field while
transcribing: nothing in either. Back while recording or transcribing in
Chrome, Compose and a native EditText, and the probe's Hide keyboard: the text
goes into the field it was spoken in.
2026-11-25 03:53:09 -05:00
..
src Android keyboard: any start of input ends a dictation, a restart included 2026-11-25 03:53:09 -05:00
build.gradle.kts Android: Hex words files (Word replacements, review sheet, export) (#2781) 2026-11-24 19:42:04 -05:00
proguard-rules.pro Android: faster English dictation (Labs) (#2704) 2026-11-24 13:36:38 -05:00