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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user