Align the system gesture swipe threshold when reporting insets

he swipe threshold in SystemGesturesPointerEventListener is changed from
(status bar size + threshold) to max(status bar size, cutout size + threshold).

We should also align this change when reporting gesture insets to app.

Bug: 205230536
Test: atest WindowInsetsBehaviorTests
Change-Id: I3c51f5447e469c832693b27169894d636b1c250b
This commit is contained in:
shawnlin
2021-11-05 14:23:24 +08:00
parent 8daeeb7e85
commit 3032d73338

View File

@@ -1077,7 +1077,8 @@ public class DisplayPolicy {
if (cutout != null) {
final Rect top = cutout.getBoundingRectTop();
if (!top.isEmpty()) {
rect.bottom = rect.bottom + mDisplayCutoutTouchableRegionSize;
rect.bottom = Math.max(rect.bottom,
top.bottom + mDisplayCutoutTouchableRegionSize);
}
}
};