diff options
| author | Jules Aguillon | 2026-04-10 19:04:03 +0200 |
|---|---|---|
| committer | GitHub | 2026-04-10 19:04:03 +0200 |
| commit | 8921de7f02570ba03816ebb4025f2c95bc131707 (patch) | |
| tree | d585021568978f3ce32b8c38ff02f73a98ddd43d /srcs/juloo.keyboard2/suggestions | |
| parent | afa7c0187a3027e5ec826f4b19449c97e4419618 (diff) | |
| download | unexpected-keyboard-8921de7f02570ba03816ebb4025f2c95bc131707.tar.gz unexpected-keyboard-8921de7f02570ba03816ebb4025f2c95bc131707.zip | |
Handle Google Keep bug (#1230)
The Google Keep text area sends contradictory flags to keyboards,
resulting in the suggestions to be disabled.
This seems to be a bug in Google Keep.
Diffstat (limited to 'srcs/juloo.keyboard2/suggestions')
| -rw-r--r-- | srcs/juloo.keyboard2/suggestions/CandidatesView.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/suggestions/CandidatesView.java b/srcs/juloo.keyboard2/suggestions/CandidatesView.java index b41177f..1768a52 100644 --- a/srcs/juloo.keyboard2/suggestions/CandidatesView.java +++ b/srcs/juloo.keyboard2/suggestions/CandidatesView.java @@ -148,8 +148,15 @@ public class CandidatesView extends LinearLayout case InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD: return false; default: - if ((flags & InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS) != 0) - return false; // Editor requested that we don't show suggestions + /* Editor requested that we don't show suggestions. Enable + suggestions anyway when the flags [NO_SUGGESTIONS] and + [AUTO_CORRECT] are present at the same time. This happens with + Google Keep. */ + if ((flags & + (InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS + | InputType.TYPE_TEXT_FLAG_AUTO_CORRECT)) + == InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS) + return false; return true; } case InputType.TYPE_CLASS_NUMBER: |
