Handle SystemGestureRegion in TaskbarDragLayer

- Currently user can tap on taskbar icons when in persitent mode when a popup is visible on screen.
we are making it so that touch event is not performed at view level and get dismissed before at drag layer.

Test: Presubmit, Manual
Bug: 320229858
Flag: NONE
Change-Id: I9a76faa0e282317d808ba0f55b49741dc7b750a3
This commit is contained in:
Jagrut Desai
2024-02-14 16:11:07 -08:00
parent 4638d4c8b4
commit c8a5176bfc
2 changed files with 14 additions and 4 deletions

View File

@@ -146,6 +146,15 @@ public class TaskbarDragLayer extends BaseDragLayer<TaskbarActivityContext> {
onDestroy(true);
}
@Override
protected boolean isEventWithinSystemGestureRegion(MotionEvent ev) {
final float x = ev.getX();
final float y = ev.getY();
return x >= mSystemGestureRegion.left && x < getWidth() - mSystemGestureRegion.right
&& y >= mSystemGestureRegion.top;
}
@Override
protected boolean canFindActiveController() {
// Unlike super class, we want to be able to find controllers when touches occur in the