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

Skip to content
Commit a235c040 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Treat HOVER_EXIT as continuation of existing gesture

Before this CL, the HOVER_EXIT events used to get treated the same way
as the HOVER_ENTER or HOVER_MOVE events. However, that's not quite
correct. These events can end gestures, but it never makes sense to use
these for starting a new gesture.

In this CL, we move the handling of HOVER_EXIT to Case 2 instead of Case
1 inside findTouchedWindowTargetsLocked.

Now, both hovering and touching pointers will be considered there.

This also means that we should modify the requirement of "at least 1
foreground window", because the gesture needs to be ended correctly
even if there's no foreground window present. For example, the window
might no longer be foreground, but it already started receiving touch.

The foreground check is replaced by an explicit check for empty or
exclusively ACTION_OUTSIDE targets.

Bug: 273376858
Test: atest inputflinger_tests:InputDispatcherTest.HoverWhileWindowAppears
Change-Id: Ib7562ae65ee505debaed92e04aea972221af255d
parent 3f8b4626
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