Merge "Handle SystemGestureRegion in TaskbarDragLayer" into main

This commit is contained in:
Jagrut Desai
2024-02-22 17:55:28 +00:00
committed by Android (Google) Code Review
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