Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7b4a4cf authored by Taran Singh's avatar Taran Singh
Browse files

Stylus shouldnt trigger gestures during handwriting

Exclude navbar from stylus gesture when handwriting is in progress.
Layer the input consumer surface for handwriting above so that stylus
touches dont go to gesture navbar or 3-botton navbar while handwriting
is ongoing.
User can still swip to home with finger.

Fix: 240451878
Test: atest StylusHandwritingTest
   and Manually:
   1. build & flash
   2. start a handwriting session
   3. while session is inprogress, attempt to swipe to home with stylus
   4. gesture shouldn't work.
   5. Repeat same with finger and it should work.
Change-Id: I5c7194d45beb4ba0a0f629f3860fc713270815f1
parent 2f1b0110
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -32,11 +32,10 @@ final class HandwritingEventReceiverSurface {
    public static final String TAG = HandwritingEventReceiverSurface.class.getSimpleName();
    static final boolean DEBUG = HandwritingModeController.DEBUG;

    // Place the layer below the highest layer to place it under gesture monitors. If the surface
    // is above gesture monitors, then edge-back and swipe-up gestures won't work when this surface
    // is intercepting.
    // Place the layer at the highest layer so stylus cannot trigger gesture monitors
    // (e.g. navigation bar, edge-back, etc) while handwriting is ongoing.
    // TODO(b/217538817): Specify the ordering in WM by usage.
    private static final int HANDWRITING_SURFACE_LAYER = Integer.MAX_VALUE - 1;
    private static final int HANDWRITING_SURFACE_LAYER = Integer.MAX_VALUE;

    private final InputWindowHandle mWindowHandle;
    private final InputChannel mClientChannel;