Update inclusive language for Accessibility Settings
Update language to comply with Android's inclusive language guidance See https://source.android.com/setup/contribute/respectful-code for reference Bug: 161896447 Test: robotest & manual Change-Id: I67032d4beb7c8ae6b5a3271ea75ca38be4351484
This commit is contained in:
@@ -18,5 +18,5 @@
|
|||||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<include layout="@layout/restricted_icon"/>
|
<include layout="@layout/restricted_icon"/>
|
||||||
|
|
||||||
<include layout="@layout/preference_widget_master_switch"/>
|
<include layout="@layout/preference_widget_primary_switch"/>
|
||||||
</merge>
|
</merge>
|
@@ -120,8 +120,8 @@
|
|||||||
<!--
|
<!--
|
||||||
<item>com.example.package.first/com.example.class.FirstService</item>
|
<item>com.example.package.first/com.example.class.FirstService</item>
|
||||||
<item>com.example.package.second/com.example.class.SecondService</item>
|
<item>com.example.package.second/com.example.class.SecondService</item>
|
||||||
<item>toggle_master_mono</item>
|
<item>toggle_primary_mono</item>
|
||||||
<item>seekbar_master_balance</item>
|
<item>seekbar_primary_balance</item>
|
||||||
<item>...</item>
|
<item>...</item>
|
||||||
-->
|
-->
|
||||||
</string-array>
|
</string-array>
|
||||||
|
@@ -5045,12 +5045,12 @@
|
|||||||
<string name="accessibility_toggle_large_pointer_icon_title">Large mouse pointer</string>
|
<string name="accessibility_toggle_large_pointer_icon_title">Large mouse pointer</string>
|
||||||
<!-- Title for the accessibility preference for disabling animations. [CHAR LIMIT=35] -->
|
<!-- Title for the accessibility preference for disabling animations. [CHAR LIMIT=35] -->
|
||||||
<string name="accessibility_disable_animations">Remove animations</string>
|
<string name="accessibility_disable_animations">Remove animations</string>
|
||||||
<!-- Title for the accessibility preference for master mono. [CHAR LIMIT=35] -->
|
<!-- Title for the accessibility preference for primary mono. [CHAR LIMIT=35] -->
|
||||||
<string name="accessibility_toggle_master_mono_title">Mono audio</string>
|
<string name="accessibility_toggle_primary_mono_title">Mono audio</string>
|
||||||
<!-- Summary for the accessibility preference for master mono. [CHAR LIMIT=50] -->
|
<!-- Summary for the accessibility preference for primary mono. [CHAR LIMIT=50] -->
|
||||||
<string name="accessibility_toggle_master_mono_summary">Combine channels when playing audio</string>
|
<string name="accessibility_toggle_primary_mono_summary">Combine channels when playing audio</string>
|
||||||
<!-- Title for the accessibility preference for master balance. [CHAR LIMIT=35] -->
|
<!-- Title for the accessibility preference for master balance. [CHAR LIMIT=35] -->
|
||||||
<string name="accessibility_toggle_master_balance_title">Audio balance</string>
|
<string name="accessibility_toggle_primary_balance_title">Audio balance</string>
|
||||||
<!-- 'Left' balance text for the accessibility preference for master balance. [CHAR LIMIT=20] -->
|
<!-- 'Left' balance text for the accessibility preference for master balance. [CHAR LIMIT=20] -->
|
||||||
<string name="accessibility_toggle_master_balance_left_label">Left</string>
|
<string name="accessibility_toggle_master_balance_left_label">Left</string>
|
||||||
<!-- 'Right' balance text for the accessibility preference for master balance. [CHAR LIMIT=20] -->
|
<!-- 'Right' balance text for the accessibility preference for master balance. [CHAR LIMIT=20] -->
|
||||||
@@ -5127,13 +5127,13 @@
|
|||||||
<!-- Used in the accessibility service settings to control turning on/off the service entirely -->
|
<!-- Used in the accessibility service settings to control turning on/off the service entirely -->
|
||||||
<string name="accessibility_service_master_switch_title">Use <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g></string>
|
<string name="accessibility_service_master_switch_title">Use <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g></string>
|
||||||
<!-- Used in the accessibility service settings to open the activity. [CHAR LIMIT=NONE] -->
|
<!-- Used in the accessibility service settings to open the activity. [CHAR LIMIT=NONE] -->
|
||||||
<string name="accessibility_service_master_open_title">Open <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g></string>
|
<string name="accessibility_service_primary_open_title">Open <xliff:g id="accessibility_app_name" example="TalkBack">%1$s</xliff:g></string>
|
||||||
<!-- Used in the Color correction settings screen to control turning on/off the feature entirely -->
|
<!-- Used in the Color correction settings screen to control turning on/off the feature entirely [CHAR LIMIT=60] -->
|
||||||
<string name="accessibility_daltonizer_master_switch_title">Use color correction</string>
|
<string name="accessibility_daltonizer_primary_switch_title">Use color correction</string>
|
||||||
<!-- Title for Captions settings screen to control turning on/off the feature entirely -->
|
<!-- Title for Captions settings screen to control turning on/off the feature entirely [CHAR LIMIT=60] -->
|
||||||
<string name="accessibility_caption_master_switch_title">Show captions</string>
|
<string name="accessibility_caption_primary_switch_title">Show captions</string>
|
||||||
<!-- Summary for Captions settings screen to control turning on/off the feature entirely [CHAR LIMIT=NONE] -->
|
<!-- Summary for Captions settings screen to control turning on/off the feature entirely [CHAR LIMIT=NONE] -->
|
||||||
<string name="accessibility_caption_master_switch_summary">For supported app only</string>
|
<string name="accessibility_caption_primary_switch_summary">For supported app only</string>
|
||||||
<!-- Title for Caption preference settings screen for configuring font style. [CHAR LIMIT=NONE] -->
|
<!-- Title for Caption preference settings screen for configuring font style. [CHAR LIMIT=NONE] -->
|
||||||
<string name="captioning_caption_appearance_title">Caption size and style</string>
|
<string name="captioning_caption_appearance_title">Caption size and style</string>
|
||||||
<!-- Summary for Captions settings, explaining important settings under it. [CHAR LIMIT=NONE] -->
|
<!-- Summary for Captions settings, explaining important settings under it. [CHAR LIMIT=NONE] -->
|
||||||
|
@@ -158,16 +158,16 @@
|
|||||||
settings:controller="com.android.settings.accessibility.LiveCaptionPreferenceController"/>
|
settings:controller="com.android.settings.accessibility.LiveCaptionPreferenceController"/>
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="toggle_master_mono"
|
android:key="toggle_primary_mono"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:summary="@string/accessibility_toggle_master_mono_summary"
|
android:summary="@string/accessibility_toggle_primary_mono_summary"
|
||||||
android:title="@string/accessibility_toggle_master_mono_title"
|
android:title="@string/accessibility_toggle_primary_mono_title"
|
||||||
settings:controller="com.android.settings.accessibility.MasterMonoPreferenceController"/>
|
settings:controller="com.android.settings.accessibility.PrimaryMonoPreferenceController"/>
|
||||||
|
|
||||||
<com.android.settings.accessibility.BalanceSeekBarPreference
|
<com.android.settings.accessibility.BalanceSeekBarPreference
|
||||||
android:key="seekbar_master_balance"
|
android:key="seekbar_primary_balance"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:title="@string/accessibility_toggle_master_balance_title"/>
|
android:title="@string/accessibility_toggle_primary_balance_title"/>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="hearing_aid_preference"
|
android:key="hearing_aid_preference"
|
||||||
|
@@ -33,8 +33,8 @@
|
|||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="captioning_preference_switch"
|
android:key="captioning_preference_switch"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:summary="@string/accessibility_caption_master_switch_summary"
|
android:summary="@string/accessibility_caption_primary_switch_summary"
|
||||||
android:title="@string/accessibility_caption_master_switch_title"
|
android:title="@string/accessibility_caption_primary_switch_title"
|
||||||
settings:allowDividerAbove="true" />
|
settings:allowDividerAbove="true" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
@@ -120,7 +120,7 @@ public class LaunchAccessibilityActivityPreferenceFragment extends
|
|||||||
protected void updateToggleServiceTitle(SwitchPreference switchPreference) {
|
protected void updateToggleServiceTitle(SwitchPreference switchPreference) {
|
||||||
final AccessibilityShortcutInfo info = getAccessibilityShortcutInfo();
|
final AccessibilityShortcutInfo info = getAccessibilityShortcutInfo();
|
||||||
final String switchBarText = (info == null) ? EMPTY_STRING : getString(
|
final String switchBarText = (info == null) ? EMPTY_STRING : getString(
|
||||||
R.string.accessibility_service_master_open_title,
|
R.string.accessibility_service_primary_open_title,
|
||||||
info.getActivityInfo().loadLabel(getPackageManager()));
|
info.getActivityInfo().loadLabel(getPackageManager()));
|
||||||
|
|
||||||
switchPreference.setTitle(switchBarText);
|
switchPreference.setTitle(switchBarText);
|
||||||
|
@@ -22,9 +22,12 @@ import android.provider.Settings;
|
|||||||
|
|
||||||
import com.android.settings.core.TogglePreferenceController;
|
import com.android.settings.core.TogglePreferenceController;
|
||||||
|
|
||||||
public class MasterMonoPreferenceController extends TogglePreferenceController {
|
/**
|
||||||
|
* A toggle preference controller for Primary Mono
|
||||||
|
*/
|
||||||
|
public class PrimaryMonoPreferenceController extends TogglePreferenceController {
|
||||||
|
|
||||||
public MasterMonoPreferenceController(Context context, String preferenceKey) {
|
public PrimaryMonoPreferenceController(Context context, String preferenceKey) {
|
||||||
super(context, preferenceKey);
|
super(context, preferenceKey);
|
||||||
}
|
}
|
||||||
|
|
@@ -62,7 +62,7 @@ public class ShortcutPreference extends Preference {
|
|||||||
ShortcutPreference(Context context, AttributeSet attrs) {
|
ShortcutPreference(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
setLayoutResource(R.layout.accessibility_shortcut_secondary_action);
|
setLayoutResource(R.layout.accessibility_shortcut_secondary_action);
|
||||||
setWidgetLayoutResource(R.layout.preference_widget_master_switch);
|
setWidgetLayoutResource(R.layout.preference_widget_primary_switch);
|
||||||
setIconSpaceReserved(true);
|
setIconSpaceReserved(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -180,7 +180,7 @@ public final class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePrefe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void updateToggleServiceTitle(SwitchPreference switchPreference) {
|
protected void updateToggleServiceTitle(SwitchPreference switchPreference) {
|
||||||
switchPreference.setTitle(R.string.accessibility_daltonizer_master_switch_title);
|
switchPreference.setTitle(R.string.accessibility_daltonizer_primary_switch_title);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -70,7 +70,7 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder {
|
|||||||
if (twoTarget) {
|
if (twoTarget) {
|
||||||
if (widgetFrame != null) {
|
if (widgetFrame != null) {
|
||||||
LayoutInflater.from(parent.getContext())
|
LayoutInflater.from(parent.getContext())
|
||||||
.inflate(R.layout.preference_widget_master_switch, widgetFrame, true);
|
.inflate(R.layout.preference_widget_primary_switch, widgetFrame, true);
|
||||||
|
|
||||||
View divider = LayoutInflater.from(parent.getContext()).inflate(
|
View divider = LayoutInflater.from(parent.getContext()).inflate(
|
||||||
R.layout.preference_two_target_divider, view, false);
|
R.layout.preference_two_target_divider, view, false);
|
||||||
|
@@ -59,7 +59,7 @@ public class PrimarySwitchPreference extends RestrictedPreference {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getSecondTargetResId() {
|
protected int getSecondTargetResId() {
|
||||||
return R.layout.restricted_preference_widget_master_switch;
|
return R.layout.restricted_preference_widget_primary_switch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -33,7 +33,7 @@ import org.robolectric.RobolectricTestRunner;
|
|||||||
import org.robolectric.RuntimeEnvironment;
|
import org.robolectric.RuntimeEnvironment;
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner.class)
|
@RunWith(RobolectricTestRunner.class)
|
||||||
public class MasterMonoPreferenceControllerTest {
|
public class PrimaryMonoPreferenceControllerTest {
|
||||||
|
|
||||||
private static final int ON = 1;
|
private static final int ON = 1;
|
||||||
private static final int OFF = 0;
|
private static final int OFF = 0;
|
||||||
@@ -41,13 +41,13 @@ public class MasterMonoPreferenceControllerTest {
|
|||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private SwitchPreference mPreference;
|
private SwitchPreference mPreference;
|
||||||
private MasterMonoPreferenceController mController;
|
private PrimaryMonoPreferenceController mController;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
mContext = RuntimeEnvironment.application;
|
mContext = RuntimeEnvironment.application;
|
||||||
mPreference = new SwitchPreference(mContext);
|
mPreference = new SwitchPreference(mContext);
|
||||||
mController = new MasterMonoPreferenceController(mContext, "master_mono");
|
mController = new PrimaryMonoPreferenceController(mContext, "test_key");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
@@ -54,13 +54,13 @@ public class PrimarySwitchPreferenceTest {
|
|||||||
mHolder = PreferenceViewHolder.createInstanceForTests(inflater.inflate(
|
mHolder = PreferenceViewHolder.createInstanceForTests(inflater.inflate(
|
||||||
com.android.settingslib.R.layout.preference_two_target, null));
|
com.android.settingslib.R.layout.preference_two_target, null));
|
||||||
mWidgetView = mHolder.itemView.findViewById(android.R.id.widget_frame);
|
mWidgetView = mHolder.itemView.findViewById(android.R.id.widget_frame);
|
||||||
inflater.inflate(R.layout.restricted_preference_widget_master_switch, mWidgetView, true);
|
inflater.inflate(R.layout.restricted_preference_widget_primary_switch, mWidgetView, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void createNewPreference_shouldSetLayout() {
|
public void createNewPreference_shouldSetLayout() {
|
||||||
assertThat(mPreference.getWidgetLayoutResource())
|
assertThat(mPreference.getWidgetLayoutResource())
|
||||||
.isEqualTo(R.layout.restricted_preference_widget_master_switch);
|
.isEqualTo(R.layout.restricted_preference_widget_primary_switch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user