summaryrefslogtreecommitdiff
path: root/core/java/android/widget/CompoundButton.java
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2011-04-22 17:08:55 -0700
committerAdam Powell <adamp@google.com>2011-04-22 17:23:44 -0700
commit3fb3d7c4e756bd32d5abde0abca9ab52d559bc84 (patch)
treea1dcfb8f2cdee81a033b85e27f55129ddb695776 /core/java/android/widget/CompoundButton.java
parent6c079b6819d749fcb72988c5b06becff081c82fd (diff)
Revert "Touch exploration feature, event bubling, refactor"
This reverts commit ac84d3ba81f08036308b17e1ab919e43987a3df5. There seems to be a problem with this API change. Reverting for now to fix the build. Change-Id: Ifa7426b080651b59afbcec2d3ede09a3ec49644c
Diffstat (limited to 'core/java/android/widget/CompoundButton.java')
-rw-r--r--core/java/android/widget/CompoundButton.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java
index f050d41e3c55..0df45cca6a65 100644
--- a/core/java/android/widget/CompoundButton.java
+++ b/core/java/android/widget/CompoundButton.java
@@ -208,18 +208,22 @@ public abstract class CompoundButton extends Button implements Checkable {
}
@Override
- public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
- super.onPopulateAccessibilityEvent(event);
-
- int resourceId = 0;
- if (mChecked) {
- resourceId = R.string.accessibility_compound_button_selected;
- } else {
- resourceId = R.string.accessibility_compound_button_unselected;
+ public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
+ boolean populated = super.dispatchPopulateAccessibilityEvent(event);
+
+ if (!populated) {
+ int resourceId = 0;
+ if (mChecked) {
+ resourceId = R.string.accessibility_compound_button_selected;
+ } else {
+ resourceId = R.string.accessibility_compound_button_unselected;
+ }
+ String state = getResources().getString(resourceId);
+ event.getText().add(state);
+ event.setChecked(mChecked);
}
- String state = getResources().getString(resourceId);
- event.getText().add(state);
- event.setChecked(mChecked);
+
+ return populated;
}
@Override