summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Peter_Liang <peterliang@google.com> 2021-05-14 15:09:18 +0800
committer Peter_Liang <peterliang@google.com> 2021-05-14 15:09:18 +0800
commitfecbe17f74257c1853e5eccc2c20d610fe030a05 (patch)
tree2b9f358a18c99aee875565cd50c6303f7ca00fa0
parent094d6c52f1cc6dd63630ca123b110de6f1e3b7fa (diff)
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
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/AccessibilityFloatingMenuView.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/AccessibilityFloatingMenuView.java b/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/AccessibilityFloatingMenuView.java
index 55f398196c8d..e85bd885c88a 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/AccessibilityFloatingMenuView.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/AccessibilityFloatingMenuView.java
@@ -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;