Adds a summary to the (screen) Magnification preference for the main A11y Settings page.
This helps differentiate this from other magnification tools. Reuses (and slightly modifies) the `magnification_feature_summary` string which was not used by any existing code. This helps ensure the existing localizations should be close enough, until L10n translators have time to update based on the new shorter version. Bug: 303499185 Test: ToggleScreenMagnificationPreferenceFragmentTest Test: Open Settings > Accessibility, observe summary Change-Id: If5ee4f937bbd655b425d4767ad8bbcef08dbe345
This commit is contained in:
@@ -629,7 +629,9 @@ public class ToggleScreenMagnificationPreferenceFragmentTest {
|
||||
assertThat(
|
||||
ToggleScreenMagnificationPreferenceFragment.getServiceSummary(mContext).toString())
|
||||
.isEqualTo(
|
||||
mContext.getString(R.string.accessibility_summary_shortcut_enabled));
|
||||
mContext.getString(R.string.preference_summary_default_combination,
|
||||
mContext.getText(R.string.accessibility_summary_shortcut_enabled),
|
||||
mContext.getText(R.string.magnification_feature_summary)));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -639,7 +641,10 @@ public class ToggleScreenMagnificationPreferenceFragmentTest {
|
||||
assertThat(
|
||||
ToggleScreenMagnificationPreferenceFragment.getServiceSummary(mContext).toString())
|
||||
.isEqualTo(
|
||||
mContext.getString(R.string.generic_accessibility_feature_shortcut_off));
|
||||
mContext.getString(R.string.preference_summary_default_combination,
|
||||
mContext.getText(
|
||||
R.string.generic_accessibility_feature_shortcut_off),
|
||||
mContext.getText(R.string.magnification_feature_summary)));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -650,7 +655,10 @@ public class ToggleScreenMagnificationPreferenceFragmentTest {
|
||||
|
||||
assertThat(
|
||||
ToggleScreenMagnificationPreferenceFragment.getServiceSummary(mContext).toString())
|
||||
.isEqualTo(mContext.getString(R.string.accessibility_summary_shortcut_enabled));
|
||||
.isEqualTo(
|
||||
mContext.getString(R.string.preference_summary_default_combination,
|
||||
mContext.getText(R.string.accessibility_summary_shortcut_enabled),
|
||||
mContext.getText(R.string.magnification_feature_summary)));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -662,7 +670,10 @@ public class ToggleScreenMagnificationPreferenceFragmentTest {
|
||||
assertThat(
|
||||
ToggleScreenMagnificationPreferenceFragment.getServiceSummary(mContext).toString())
|
||||
.isEqualTo(
|
||||
mContext.getString(R.string.generic_accessibility_feature_shortcut_off));
|
||||
mContext.getString(R.string.preference_summary_default_combination,
|
||||
mContext.getText(
|
||||
R.string.generic_accessibility_feature_shortcut_off),
|
||||
mContext.getText(R.string.magnification_feature_summary)));
|
||||
}
|
||||
|
||||
private void putStringIntoSettings(String key, String componentName) {
|
||||
|
||||
Reference in New Issue
Block a user