Fix onInlineSuggestionsResponse crash (#1700)

This commit is contained in:
Eran Leshem 2025-06-11 22:59:36 +03:00 committed by GitHub
parent f2ec441f45
commit 79726f1a9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1386,6 +1386,10 @@ public class LatinIME extends InputMethodService implements
@RequiresApi(api = Build.VERSION_CODES.R)
public boolean onInlineSuggestionsResponse(InlineSuggestionsResponse response) {
Log.d(TAG,"onInlineSuggestionsResponse called");
if (Settings.getValues().mSuggestionStripHiddenPerUserSettings) {
return false;
}
final List<InlineSuggestion> inlineSuggestions = response.getInlineSuggestions();
if (inlineSuggestions.isEmpty()) {
return false;