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

Commit fecbe17f authored by Peter_Liang's avatar Peter_Liang
Browse files

Fix the menu on the left side should be moved out when clicking the extra touch region.

Root cause:
less one aligment condition when computing extra touch region.

Solution:
Change the size of the extra touch region to the same as menu size.

Bug: 188123221
Test: manual test
Change-Id: I03862728d094450eca4bf08c4ec9db3df0b9e7b6
parent 094d6c52
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -544,9 +544,8 @@ public class AccessibilityFloatingMenuView extends FrameLayout
        final int currentX = (int) event.getX();
        final int currentY = (int) event.getY();

        final int menuHalfWidth = getLayoutWidth() / 2;
        final Rect touchDelegateBounds =
                new Rect(mMargin, mMargin, mMargin + menuHalfWidth, mMargin + getLayoutHeight());
                new Rect(mMargin, mMargin, mMargin + getLayoutWidth(), mMargin + getLayoutHeight());
        if (action == MotionEvent.ACTION_DOWN
                && touchDelegateBounds.contains(currentX, currentY)) {
            mIsDownInEnlargedTouchArea = true;