summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2017-06-19 23:02:32 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-06-19 23:02:32 +0000
commit6c50244785117663bbb542eb8564304c81542865 (patch)
tree8add79b6d0195c43da7c6a858d70e8e105c360af
parentfa6eef921ddba760d1b9395c82f8ad02eab78167 (diff)
parentefa2dbaccc31f4ad416d627d2fa480b390bf400a (diff)
downloadpackages_apps_PhoneCommon-6c50244785117663bbb542eb8564304c81542865.tar.gz
packages_apps_PhoneCommon-6c50244785117663bbb542eb8564304c81542865.tar.bz2
packages_apps_PhoneCommon-6c50244785117663bbb542eb8564304c81542865.zip
Ensure single-click action occurs when long-click in accessibility mode.
am: efa2dbaccc Change-Id: I2305fa424f9cfc40556e723a5ce018e7c100967c
-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();