From 3fb3d7c4e756bd32d5abde0abca9ab52d559bc84 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Fri, 22 Apr 2011 17:08:55 -0700 Subject: 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 --- core/java/android/widget/CompoundButton.java | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'core/java/android/widget/CompoundButton.java') 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 -- cgit v1.2.3