summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2017-06-19 23:08:03 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-06-19 23:08:03 +0000
commitfbf2d4ce937d1975d9f53dcbf0f8c27cb59441d4 (patch)
tree9470ae5aaf91a7d0d1964307c0c00e8fe4a920ff
parent1c8f56402cf2b14e7975e3e84a7d7168e110fe0b (diff)
parent6c50244785117663bbb542eb8564304c81542865 (diff)
downloadpackages_apps_PhoneCommon-fbf2d4ce937d1975d9f53dcbf0f8c27cb59441d4.tar.gz
packages_apps_PhoneCommon-fbf2d4ce937d1975d9f53dcbf0f8c27cb59441d4.tar.bz2
packages_apps_PhoneCommon-fbf2d4ce937d1975d9f53dcbf0f8c27cb59441d4.zip
Ensure single-click action occurs when long-click in accessibility mode. am: efa2dbaccc
am: 6c50244785 Change-Id: I54b67b2d1ca38868ff8c1a1d887e55ec88ccacf0
-rw-r--r--src/com/android/phone/common/dialpad/DialpadKeyButton.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/phone/common/dialpad/DialpadKeyButton.java b/src/com/android/phone/common/dialpad/DialpadKeyButton.java
index 8762914..f2458cc 100644
--- a/src/com/android/phone/common/dialpad/DialpadKeyButton.java
+++ b/src/com/android/phone/common/dialpad/DialpadKeyButton.java
@@ -171,6 +171,10 @@ public class DialpadKeyButton extends FrameLayout {
case MotionEvent.ACTION_HOVER_EXIT:
if (mHoverBounds.contains(event.getX(), event.getY())) {
if (mLongHovered) {
+ // In accessibility mode the long press will not automatically cause
+ // the short press to fire for the button, so we will fire it now to
+ // emulate the same behavior (this is important for the 0 button).
+ simulateClickForAccessibility();
performLongClick();
} else {
simulateClickForAccessibility();