mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-27 07:58:01 +01:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* Android keyboard: a dictation the app hides the keyboard on goes into its field
Why: an app hiding the keyboard (Grok does when you scroll up to read the reply)
threw away a dictation that was recording or transcribing. leaveEditor() called
MicCapture.cancel() on onFinishInputView, onWindowHidden and onFinishInput, and
onStartInput cancelled on every start, even the same field restarting. A tester
on a OnePlus 12 (build 2448) lost what he had dictated each time. Gboard stops
listening at the hide too, but keeps the words already spoken in the field.
What changed:
- Hidden with its field still bound (onFinishInputView(false), onWindowHidden),
a recording stops at once as with ✓ and what was heard is transcribed.
- DictationField (Insertion.kt) numbers the fields Hex starts in; a dictation
keeps the number it was spoken in (MicCapture.start(options, field), handed
back with the text), and commitSpeech types the text only while that number is
current, the editor is connected and the field isn't a password one. It no
longer requires the input view to be shown.
- The same field restarting in place (restarting, same package and fieldId)
keeps its number and its dictation; any other start is a new field.
- A Hex key hold whose touch Android cancels with the keyboard gone finishes
the dictation; a cancel with the keyboard up discards it, as before.
- README and comments (MicCapture.cancel, KeepAwake) say what is now true.
Unchanged: the field going away (onFinishInput, another field or app, Next
keyboard) still cancels everything recording or transcribing, so nothing reaches
another field, app or password field. ✕ still discards. Home and the Quick
Settings sheet are untouched apart from MicCapture's insert callback taking the
field number.
Verified on the Studio: :app:testDebugUnitTest (345 tests, 0 failures, four new
cases in InsertionTest) and :app:assemblePreview. On emulator-5710 (API 36) with
a probe app, a preview build of this branch, hold and hands-free × recording and
transcribing: Hide keyboard puts the text spoken before the hide into the same
field (Last dictation counts it), Clear focus and Focus field 2 leave both fields
empty; the microphone's recording stopped within 0.26 s of each hide (dumpsys
audio). Also: ✕ while recording and transcribing, focus moved to a password
field, another app opening during transcription, the 1-minute stop then a hide,
Labs › Automatic listens for the language choosing Español for a dictation
finished hidden, and the Quick Settings sheet copying its text.
* 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
|
||
| .. | ||
| src | ||
| build.gradle.kts | ||
| proguard-rules.pro | ||