Fix missing version check

setSystemGestureExclusionRects is API 29. Broken since d644d2b, which
almost got into the release!
This commit is contained in:
Jules Aguillon 2022-11-13 20:59:40 +01:00
parent 64c7c8ce20
commit f7e16c0345

View File

@ -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