diff options
| author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-04-22 16:29:07 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-04-22 16:29:07 -0700 |
| commit | f9fa622cc04028fd7c5f5036ea2e0ccfb80d55f3 (patch) | |
| tree | c9b8ec24bd7601233d3e49373ce5d68f01485567 /core/java/android/widget/CompoundButton.java | |
| parent | d0f650c6c3a123c856bb0adb138ae7cd0deed3d1 (diff) | |
| parent | ac84d3ba81f08036308b17e1ab919e43987a3df5 (diff) | |
Merge "Touch exploration feature, event bubling, refactor"
Diffstat (limited to 'core/java/android/widget/CompoundButton.java')
| -rw-r--r-- | core/java/android/widget/CompoundButton.java | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java index 0df45cca6a65..f050d41e3c55 100644 --- a/core/java/android/widget/CompoundButton.java +++ b/core/java/android/widget/CompoundButton.java @@ -208,22 +208,18 @@ public abstract class CompoundButton extends Button implements Checkable { } @Override - 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); + 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; } - - return populated; + String state = getResources().getString(resourceId); + event.getText().add(state); + event.setChecked(mChecked); } @Override |
