You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read the log in #2325 (comment), and it seems that the characters are committed by RichInputConnection, but don't arrive in the right place / at the right time. My guess is that RichInputConnection.isConnected returns false.
The (I guess) relevant lines for the not working attempt (found twice):
2026-02-27 14:17:11.733355 D emoji-search: IME opened in onGloballyPositioned
2026-02-27 14:17:13.105313 I LatinIME: onFinishInputView
2026-02-27 14:17:13.106004 I LatinIME: onFinishInput
2026-02-27 14:17:13.108393 I LatinIME: Starting input. Cursor position = -1,-1
2026-02-27 14:17:13.109006 D LatinIME: editorInfo: inputType: 0x00000000, imeOptions: 0x12000000
2026-02-27 14:17:13.109308 D LatinIME: All caps: false, sentence caps: false, word caps: false
2026-02-27 14:17:13.109877 I InputAttributes: InputType.TYPE_NULL is specified
2026-02-27 14:17:13.110094 I Settings: loadSettings
2026-02-27 14:17:13.143731 D KeyboardState: setAlphabetKeyboard: [keyboard=UNSHIFTED shift=RELEASING symbol=RELEASING switch=ALPHA] autoCapsFlags=none recapitalizeMode=null
2026-02-27 14:17:13.178923 I LatinIME: hideWindow
2026-02-27 14:17:13.183428 I LatinIME: onFinishInputView
2026-02-27 14:17:13.183889 I LatinIME: onWindowHidden
2026-02-27 14:17:13.430482 D emoji-search: search ending. Selected emoji: 🐅. imeClosed: false
2026-02-27 14:17:13.493233 D emoji-search: after activity closing. isEmojiSearch: false. Intent: Intent { act=EMOJI_SEARCH_DONE cmp=helium314.keyboard.debug/helium314.keyboard.latin.LatinIME (has extras) }. imeClosed: false. selected emoji: 🐅
2026-02-27 14:17:13.495013 D RichInputConnection: committing 2 characters
2026-02-27 14:17:13.626279 D InputLogic: performUpdateSuggestionStripSync()
2026-02-27 14:17:14.522903 I LatinIME: Starting input. Cursor position = 0,0
When it works (I assume):
2026-02-27 14:16:00.083677 D emoji-search: IME opened in onGloballyPositioned
2026-02-27 14:16:01.646077 D RichInputConnection: setting composing text of length 1
2026-02-27 14:16:01.696309 I LatinIME: onUpdateSelection: oss=0, ose=0, nss=1, nse=1, cs=0, ce=1
2026-02-27 14:16:01.796667 D InputLogic: performUpdateSuggestionStripSync()
2026-02-27 14:16:01.918446 D InputLogic: performUpdateSuggestionStripSync() : 122 ms to finish
2026-02-27 14:16:01.920518 D RichInputConnection: setting composing text of length 2
2026-02-27 14:16:01.998230 I LatinIME: onUpdateSelection: oss=1, ose=1, nss=2, nse=2, cs=0, ce=2
2026-02-27 14:16:02.000472 D RichInputConnection: setting composing text of length 3
2026-02-27 14:16:02.097115 I LatinIME: onUpdateSelection: oss=2, ose=2, nss=3, nse=3, cs=0, ce=3
2026-02-27 14:16:02.109710 D InputLogic: performUpdateSuggestionStripSync()
2026-02-27 14:16:02.205011 D InputLogic: performUpdateSuggestionStripSync() : 95 ms to finish
2026-02-27 14:16:03.023616 I LatinIME: onFinishInputView
2026-02-27 14:16:03.024082 I LatinIME: onFinishInput
2026-02-27 14:16:03.026048 I LatinIME: Starting input. Cursor position = 0,0
2026-02-27 14:16:03.026517 D LatinIME: editorInfo: inputType: 0x00008001, imeOptions: 0x02000003
2026-02-27 14:16:03.026681 D LatinIME: All caps: false, sentence caps: false, word caps: false
2026-02-27 14:16:03.027238 I Settings: loadSettings
2026-02-27 14:16:03.036154 D KeyboardState: setAlphabetKeyboard: [keyboard=UNSHIFTED shift=RELEASING symbol=RELEASING switch=ALPHA] autoCapsFlags=none recapitalizeMode=null
2026-02-27 14:16:03.339588 D emoji-search: search ending. Selected emoji: 😼. imeClosed: false
2026-02-27 14:16:03.446947 D emoji-search: after activity closing. isEmojiSearch: false. Intent: Intent { act=EMOJI_SEARCH_DONE cmp=helium314.keyboard.debug/helium314.keyboard.latin.LatinIME (has extras) }. imeClosed: false. selected emoji: 😼
2026-02-27 14:16:03.447930 D RichInputConnection: committing 2 characters
2026-02-27 14:16:03.569243 I LatinIME: onUpdateSelection: oss=0, ose=0, nss=2, nse=2, cs=-1, ce=-1
The differences I see are that hideWindow is called and finished before EmojiSearchActivity.onStop.
In the working attempt, LatinIME.onStartInputViewInternal is called before EmojiSearchActivity.onStop, in the not working attempt it's called after onStop.
Ugly but possibly working: Maybe if instead of using onTextInput in onStartCommand you could put the emoji string in the EmojiSearchActivity companion object and read / input it at the end of onStartInputViewInternal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added logging around emoji search ending, to try to figure out #2325 item 7.