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,6 +242,8 @@ public class Keyboard2View extends View
{ {
if (!changed) if (!changed)
return; return;
if (VERSION.SDK_INT >= 29)
{
// Disable the back-gesture on the keyboard area // Disable the back-gesture on the keyboard area
Rect keyboard_area = new Rect( Rect keyboard_area = new Rect(
left + (int)_config.horizontalMargin, left + (int)_config.horizontalMargin,
@ -250,6 +252,7 @@ public class Keyboard2View extends View
bottom - (int)_config.marginBottom); bottom - (int)_config.marginBottom);
setSystemGestureExclusionRects(Arrays.asList(keyboard_area)); setSystemGestureExclusionRects(Arrays.asList(keyboard_area));
} }
}
@Override @Override
protected void onDraw(Canvas canvas) protected void onDraw(Canvas canvas)