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
commitabd4b9781ae655f97393ba2a5fc8bd10e54c18a5 (patch)
tree9470ae5aaf91a7d0d1964307c0c00e8fe4a920ff
parent1c8f56402cf2b14e7975e3e84a7d7168e110fe0b (diff)
parentefa2dbaccc31f4ad416d627d2fa480b390bf400a (diff)
downloadpackages_apps_PhoneCommon-abd4b9781ae655f97393ba2a5fc8bd10e54c18a5.tar.gz
packages_apps_PhoneCommon-abd4b9781ae655f97393ba2a5fc8bd10e54c18a5.tar.bz2
packages_apps_PhoneCommon-abd4b9781ae655f97393ba2a5fc8bd10e54c18a5.zip
Ensure single-click action occurs when long-click in accessibility mode.
am: efa2dbaccc Change-Id: I4bac1c6531ef0a3b304293fd025418d3aab3d6c7
-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();