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

Commit 70d75ade authored by “Longbo's avatar “Longbo Committed by Longbo Wei
Browse files

autoclick: Prevent reverting to left click when panel is hovered

Video:
 - Before: http://shortn/_J5i4H45bjh
 - After:  http://shortn/_FFx0wkOLqY

Bug: b/427254354
Test: atest
Flag: com.android.server.accessibility.enable_autoclick_indicator
Change-Id: I404e408b35462f5fca9666f5e513633c56f97a65
parent 946af159
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -915,8 +915,9 @@ public class AutoclickController extends BaseEventStreamTransformation {
            boolean inScrollMode =
                    mActiveClickType == AUTOCLICK_TYPE_SCROLL && mAutoclickScrollPanel != null
                            && mAutoclickScrollPanel.isVisible();
            // Only reset if the user is not dragging and is not in scroll mode.
            if (!stillDragging && !inScrollMode) {
            // Reset only if the user is not dragging, not in scroll mode, and not hovering over
            // the panel.
            if (!stillDragging && !inScrollMode && !mHoveredState) {
                resetSelectedClickTypeIfNecessary();
            }
        }