- Show "…" placeholder immediately after debounce so users know the AI
is working (KIND_AI_LOADING_FLAG = 0x20000)
- Skip AI correction in password, URL, and e-mail fields
(mIsGeneralTextInput + mIsPasswordField guards in InputLogic)
- Protect suggestion strip from being cleared while AI suggestion is
visible (mAiSuggestionVisible flag + clearAiSuggestionAndSetNeutral)
- Release Gemma 4 engine on TRIM_MEMORY_RUNNING_CRITICAL
- Long-press on AI suggestion dismisses it (dismissAiSuggestion)
- Warm-up model at IME startup for instant first correction
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Integrates LiteRT-LM (Google) with Gemma 4 E2B-it for on-device
spell/grammar correction in HeliBoard. After sentence-ending punctuation,
the model checks the sentence and shows a correction in the suggestion strip.
Tapping it replaces the original text — fully offline, no cloud API.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>