summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2013-03-15 17:34:12 -0700
committerAlan Viverette <alanv@google.com>2013-03-15 17:34:12 -0700
commitf547de18f8c47703d647ac1728a219fdabca76ff (patch)
tree48d4802191a49331157d5d722e7b641cd7f6d8b5 /src
parent4a0ae0bdce4747ca497f5ce0a6120844a5d119f3 (diff)
Ensure simulated A11y clicks in Dialer correctly send click events.
Bug: 8369906 Change-Id: Ibdf8a4d43d0898429333af03e98a9aa494e5c819
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/dialpad/DialpadImageButton.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadImageButton.java b/src/com/android/dialer/dialpad/DialpadImageButton.java
index 68fba1a56..8f9ea4d69 100644
--- a/src/com/android/dialer/dialpad/DialpadImageButton.java
+++ b/src/com/android/dialer/dialpad/DialpadImageButton.java
@@ -22,6 +22,7 @@ import android.os.Bundle;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.ImageButton;
@@ -126,6 +127,11 @@ public class DialpadImageButton extends ImageButton {
}
setPressed(true);
+
+ // Stay consistent with performClick() by sending the event after
+ // setting the pressed state but before performing the action.
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
+
setPressed(false);
}
}