diff options
| author | Jules Aguillon | 2022-11-13 20:59:40 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2022-11-13 20:59:40 +0100 |
| commit | f7e16c03459af3172782d720c6dd8c5b7fe28616 (patch) | |
| tree | 82ba2c38b6261007cdb416cd30d2852aad1951e0 /srcs/juloo.keyboard2 | |
| parent | 64c7c8ce20e2e49b2bf3ee13da9a3def5a57a7d7 (diff) | |
| download | unexpected-keyboard-f7e16c03459af3172782d720c6dd8c5b7fe28616.tar.gz unexpected-keyboard-f7e16c03459af3172782d720c6dd8c5b7fe28616.zip | |
Fix missing version check
setSystemGestureExclusionRects is API 29. Broken since d644d2b, which
almost got into the release!
Diffstat (limited to 'srcs/juloo.keyboard2')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2View.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index 631b363..41d32ef 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -242,13 +242,16 @@ public class Keyboard2View extends View { if (!changed) return; - // Disable the back-gesture on the keyboard area - Rect keyboard_area = new Rect( - left + (int)_config.horizontalMargin, - top + (int)_config.marginTop, - right - (int)_config.horizontalMargin, - bottom - (int)_config.marginBottom); - setSystemGestureExclusionRects(Arrays.asList(keyboard_area)); + if (VERSION.SDK_INT >= 29) + { + // Disable the back-gesture on the keyboard area + Rect keyboard_area = new Rect( + left + (int)_config.horizontalMargin, + top + (int)_config.marginTop, + right - (int)_config.horizontalMargin, + bottom - (int)_config.marginBottom); + setSystemGestureExclusionRects(Arrays.asList(keyboard_area)); + } } @Override |
