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

Skip to content
Commit 2fbc21e4 authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

[flexiglass] Respects gesture exclusion regions.

There exists a developer-facing API where apps can specify a region (a
collection of one or more Rects) where system gestures (e.g.
interactions to do with System UI) are ignored, letting those apps take
over those gestures, allowing for example, for games to not quit each
time the player accidentally performs the back navigation gesture. That
API is documented here:
https://developer.android.com/develop/ui/views/touch-and-input/gestures/gesturenav

While gesture back navigation is already set up to respect these
regions, Flexiglass was not. This meant that, even if an app set up a
system gesture exclusion region, dragging down would still expand the
shade, for example.

This CL uses the API provided in the previous CL on this chain to
actually pass in a filterGesture lambda into STL and connects the
implementation of that lambda to the actual gesture exclusion regions as
provided by the WindowManager.

Bug: 367447743
Test: manually verified using the brightness slider in the flexiglass
version of QS which, itself publishes an exlcusion region. With this CL,
starting a drag from the bounds of the brightness slider and moving the
finger up does nothing. Starting the same gesture from above or below
the bounds of the slider works normally.
Test: unit tests added
Flag: com.android.systemui.scene_container

Change-Id: I94dc0d4bf7db66cd4f9d71bb0f470754267e9e35
parent f9a01533
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment