Skip to content

Commit

Permalink
Attempt to fix crash in processUpdateSuggestionStrip
Browse files Browse the repository at this point in the history
  • Loading branch information
abb128 committed Jul 24, 2024
1 parent bdfa736 commit e0bd7b2
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,19 +237,21 @@ public class LanguageModelFacilitator(

computationSemaphore.acquire()

inputLogic.mWordComposer.setAutoCorrection(null)
try {
inputLogic.mWordComposer.setAutoCorrection(null)

if(values.composedData.mTypedWord.length > BinaryDictionary.DICTIONARY_MAX_WORD_LENGTH) {
inputLogic.mSuggestionStripViewAccessor.setNeutralSuggestionStrip()
}
if(values.composedData.mTypedWord.length > BinaryDictionary.DICTIONARY_MAX_WORD_LENGTH) {
inputLogic.mSuggestionStripViewAccessor.setNeutralSuggestionStrip()
return
}

try {
var transformerWeight = context.getSetting(BinaryDictTransformerWeightSetting)

val holder = AsyncResultHolder<SuggestedWords?>("Suggest")

inputLogic.getSuggestedWords(
settings.current,
keyboardSwitcher.keyboard,
keyboardSwitcher.keyboard ?: return,
keyboardSwitcher.keyboardShiftMode,
values.inputStyle,
SuggestedWords.NOT_A_SEQUENCE_NUMBER
Expand Down

0 comments on commit e0bd7b2

Please sign in to comment.