Mark corner resize areas as gesture exclusion areas.

Prevent back gesture from triggering when a corner resize is attempted.

Bug: 269661917
Test: Manual, resize desktop mode task to left/right edge of screen,
then attempt to resize again from the edge. Confirm back gesture does
not trigger.

Change-Id: I933b139171fa8049a5c0c98611e8831963236e0e
This commit is contained in:
mattsziklay
2023-03-29 13:44:23 -07:00
parent b6d4f2edfb
commit 0be54555c7

View File

@@ -42,6 +42,9 @@ import android.view.WindowManagerGlobal;
import com.android.internal.view.BaseIWindow;
import java.util.Arrays;
import java.util.List;
/**
* An input event listener registered to InputDispatcher to receive input events on task edges and
* and corners. Converts them to drag resize requests.
@@ -211,6 +214,10 @@ class DragResizeInputListener implements AutoCloseable {
PRIVATE_FLAG_TRUSTED_OVERLAY,
0 /* inputFeatures */,
touchRegion);
List<Rect> cornersList = Arrays.asList(
mLeftTopCornerBounds, mLeftBottomCornerBounds,
mRightTopCornerBounds, mRightBottomCornerBounds);
mWindowSession.reportSystemGestureExclusionChanged(mFakeWindow, cornersList);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}