From 1728c07bfb6ccc8a24defcda07306f353a33e95a Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Thu, 12 Apr 2012 13:59:38 -0700 Subject: [PATCH] CheckBox should not populate AccessibilityEvent with text. 1. Accessibility services are the ones that choose how to announces the checked state of a checkable control, so CheckBox should not add strings for its state to access events. 2. Removed some unused accessibility related strings. bug:6241115 Change-Id: I572b961191da4b3537fb6cad529d9764d39161ec --- core/java/android/widget/CheckBox.java | 12 ------------ core/res/res/values/public.xml | 8 -------- core/res/res/values/strings.xml | 24 ------------------------ 3 files changed, 44 deletions(-) diff --git a/core/java/android/widget/CheckBox.java b/core/java/android/widget/CheckBox.java index 0685eead932b0..858c415d0f083 100644 --- a/core/java/android/widget/CheckBox.java +++ b/core/java/android/widget/CheckBox.java @@ -21,8 +21,6 @@ import android.util.AttributeSet; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityNodeInfo; -import com.android.internal.R; - /** *

@@ -70,16 +68,6 @@ public class CheckBox extends CompoundButton { super(context, attrs, defStyle); } - @Override - public void onPopulateAccessibilityEvent(AccessibilityEvent event) { - super.onPopulateAccessibilityEvent(event); - if (isChecked()) { - event.getText().add(mContext.getString(R.string.checkbox_checked)); - } else { - event.getText().add(mContext.getString(R.string.checkbox_not_checked)); - } - } - @Override public void onInitializeAccessibilityEvent(AccessibilityEvent event) { super.onInitializeAccessibilityEvent(event); diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index ca0e91323e9c6..f79eeeff99140 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -398,8 +398,6 @@ - - @@ -699,8 +697,6 @@ - - @@ -795,8 +791,6 @@ - - @@ -818,8 +812,6 @@ - - diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 44f2ade6e4697..7d660f296c43c 100755 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -3231,30 +3231,6 @@ Decrease year - - - checked - - not checked - - - - selected - - not selected - - - - on - - off - - - - pressed - - not pressed - Alt