Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 893b7d62 authored by yingleiw's avatar yingleiw
Browse files

Change radio button's default state description to "selected", "not selected"

Per partner request.

Fix: 171507541
Test: tested manually with talkback.

Change-Id: I234281fed476e664cd13bf3079fc706564ad1f3d
parent 0583d29f
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -16,10 +16,13 @@


package android.widget;
package android.widget;


import android.annotation.NonNull;
import android.content.Context;
import android.content.Context;
import android.util.AttributeSet;
import android.util.AttributeSet;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeInfo;


import com.android.internal.R;



/**
/**
 * <p>
 * <p>
@@ -98,4 +101,15 @@ public class RadioButton extends CompoundButton {
            }
            }
        }
        }
    }
    }

    /** @hide **/
    @Override
    @NonNull
    protected CharSequence getButtonStateDescription() {
        if (isChecked()) {
            return getResources().getString(R.string.selected);
        } else {
            return getResources().getString(R.string.not_selected);
        }
    }
}
}
+6 −2
Original line number Original line Diff line number Diff line
@@ -3056,10 +3056,14 @@
    <!-- Default text for a button that can be toggled on and off. -->
    <!-- Default text for a button that can be toggled on and off. -->
    <string name="capital_off">OFF</string>
    <string name="capital_off">OFF</string>


    <!-- Default state for CompoundButton for on and off. [CHAR LIMIT=32] -->
    <!-- Default checked text used by accessibility for a button that can be checked or unchecked. [CHAR LIMIT=NONE] -->
    <string name="checked">checked</string>
    <string name="checked">checked</string>
    <!-- Default text for a button that can be toggled on and off. [CHAR LIMIT=32] -->
    <!-- Default not checked text used by accessibility for a button that can be checked or unchecked. [CHAR LIMIT=NONE] -->
    <string name="not_checked">not checked</string>
    <string name="not_checked">not checked</string>
    <!-- Default selected text used by accessibility for an element that can be selected or unselected. [CHAR LIMIT=NONE] -->
    <string name="selected">selected</string>
    <!-- Default not selected text used by accessibility for an element that can be selected or unselected. [CHAR LIMIT=NONE] -->
    <string name="not_selected">not selected</string>


    <!-- Title of intent resolver dialog when selecting an application to run. -->
    <!-- Title of intent resolver dialog when selecting an application to run. -->
    <string name="whichApplication">Complete action using</string>
    <string name="whichApplication">Complete action using</string>
+2 −0
Original line number Original line Diff line number Diff line
@@ -826,6 +826,7 @@
  <java-symbol type="string" name="no_file_chosen" />
  <java-symbol type="string" name="no_file_chosen" />
  <java-symbol type="string" name="no_matches" />
  <java-symbol type="string" name="no_matches" />
  <java-symbol type="string" name="noon" />
  <java-symbol type="string" name="noon" />
  <java-symbol type="string" name="not_selected" />
  <java-symbol type="string" name="number_picker_increment_scroll_action" />
  <java-symbol type="string" name="number_picker_increment_scroll_action" />
  <java-symbol type="string" name="number_picker_increment_scroll_mode" />
  <java-symbol type="string" name="number_picker_increment_scroll_mode" />
  <java-symbol type="string" name="old_app_action" />
  <java-symbol type="string" name="old_app_action" />
@@ -959,6 +960,7 @@
  <java-symbol type="string" name="save_password_never" />
  <java-symbol type="string" name="save_password_never" />
  <java-symbol type="string" name="save_password_notnow" />
  <java-symbol type="string" name="save_password_notnow" />
  <java-symbol type="string" name="save_password_remember" />
  <java-symbol type="string" name="save_password_remember" />
  <java-symbol type="string" name="selected" />
  <java-symbol type="string" name="sendText" />
  <java-symbol type="string" name="sendText" />
  <java-symbol type="string" name="sending" />
  <java-symbol type="string" name="sending" />
  <java-symbol type="string" name="serviceClassData" />
  <java-symbol type="string" name="serviceClassData" />