Skip to content

Commit f21bea2

Browse files
sganovAndroid (Google) Code Review
authored andcommitted
Merge "CheckBox should not populate AccessibilityEvent with text."
2 parents ed4995d + 1728c07 commit f21bea2

File tree

3 files changed

+0
-44
lines changed

3 files changed

+0
-44
lines changed

core/java/android/widget/CheckBox.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import android.view.accessibility.AccessibilityEvent;
2222
import android.view.accessibility.AccessibilityNodeInfo;
2323

24-
import com.android.internal.R;
25-
2624

2725
/**
2826
* <p>
@@ -70,16 +68,6 @@ public CheckBox(Context context, AttributeSet attrs, int defStyle) {
7068
super(context, attrs, defStyle);
7169
}
7270

73-
@Override
74-
public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
75-
super.onPopulateAccessibilityEvent(event);
76-
if (isChecked()) {
77-
event.getText().add(mContext.getString(R.string.checkbox_checked));
78-
} else {
79-
event.getText().add(mContext.getString(R.string.checkbox_not_checked));
80-
}
81-
}
82-
8371
@Override
8472
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
8573
super.onInitializeAccessibilityEvent(event);

core/res/res/values/public.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,6 @@
400400
<java-symbol type="string" name="cfTemplateNotForwarded" />
401401
<java-symbol type="string" name="cfTemplateRegistered" />
402402
<java-symbol type="string" name="cfTemplateRegisteredTime" />
403-
<java-symbol type="string" name="checkbox_checked" />
404-
<java-symbol type="string" name="checkbox_not_checked" />
405403
<java-symbol type="string" name="chooseActivity" />
406404
<java-symbol type="string" name="config_default_dns_server" />
407405
<java-symbol type="string" name="config_ethernet_iface_regex" />
@@ -701,8 +699,6 @@
701699
<java-symbol type="string" name="preposition_for_time" />
702700
<java-symbol type="string" name="progress_erasing" />
703701
<java-symbol type="string" name="progress_unmounting" />
704-
<java-symbol type="string" name="radiobutton_not_selected" />
705-
<java-symbol type="string" name="radiobutton_selected" />
706702
<java-symbol type="string" name="relationTypeAssistant" />
707703
<java-symbol type="string" name="relationTypeBrother" />
708704
<java-symbol type="string" name="relationTypeChild" />
@@ -797,8 +793,6 @@
797793
<java-symbol type="string" name="sms_control_title" />
798794
<java-symbol type="string" name="sms_control_yes" />
799795
<java-symbol type="string" name="submit" />
800-
<java-symbol type="string" name="switch_off" />
801-
<java-symbol type="string" name="switch_on" />
802796
<java-symbol type="string" name="sync_binding_label" />
803797
<java-symbol type="string" name="sync_do_nothing" />
804798
<java-symbol type="string" name="sync_really_delete" />
@@ -820,8 +814,6 @@
820814
<java-symbol type="string" name="time_wday" />
821815
<java-symbol type="string" name="time_wday_date" />
822816
<java-symbol type="string" name="today" />
823-
<java-symbol type="string" name="togglebutton_not_pressed" />
824-
<java-symbol type="string" name="togglebutton_pressed" />
825817
<java-symbol type="string" name="tomorrow" />
826818
<java-symbol type="string" name="twelve_hour_time_format" />
827819
<java-symbol type="string" name="twenty_four_hour_time_format" />

core/res/res/values/strings.xml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3241,30 +3241,6 @@
32413241
<!-- Description of the button to decrease the DatePicker's year value. [CHAR LIMIT=NONE] -->
32423242
<string name="date_picker_decrement_year_button">Decrease year</string>
32433243

3244-
<!-- CheckBox - accessibility support -->
3245-
<!-- Description of the checked state of a CheckBox. [CHAR LIMIT=NONE] -->
3246-
<string name="checkbox_checked">checked</string>
3247-
<!-- Description of the not checked state of a CheckBox. [CHAR LIMIT=NONE] -->
3248-
<string name="checkbox_not_checked">not checked</string>
3249-
3250-
<!-- RadioButton/CheckedTextView - accessibility support -->
3251-
<!-- Description of the selected state of a RadioButton. [CHAR LIMIT=NONE] -->
3252-
<string name="radiobutton_selected">selected</string>
3253-
<!-- Description of the not selected state of a RadioButton. [CHAR LIMIT=NONE] -->
3254-
<string name="radiobutton_not_selected">not selected</string>
3255-
3256-
<!-- Switch - accessibility support -->
3257-
<!-- Description of the on state of a Switch. [CHAR LIMIT=NONE] -->
3258-
<string name="switch_on">on</string>
3259-
<!-- Description of the off state of a Switch. [CHAR LIMIT=NONE] -->
3260-
<string name="switch_off">off</string>
3261-
3262-
<!-- ToggleButton - accessibility support -->
3263-
<!-- Description of the pressed state of a ToggleButton. [CHAR LIMIT=NONE] -->
3264-
<string name="togglebutton_pressed">pressed</string>
3265-
<!-- Description of the not pressed state of a ToggleButton. [CHAR LIMIT=NONE] -->
3266-
<string name="togglebutton_not_pressed">not pressed</string>
3267-
32683244
<!-- KeyboardView - accessibility support -->
32693245
<!-- Description of the Alt button in a KeyboardView. [CHAR LIMIT=NONE] -->
32703246
<string name="keyboardview_keycode_alt">Alt</string>

0 commit comments

Comments
 (0)