Provides TC ID for accessibility framework feature for "about" and "learn more" part

Goal: Improve readability which is a bit difficult because of string concatenation for accurate translation.
Root cause: In some locales, framework features name would be a word rather than a product name. Hence it need to be in the different position in a sentence.
Solution: Use whole sentence to translate instead of concatenating the string could solve this issue.

Bug: 185478543
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityFooterPreferenceControllerTest
Change-Id: Id198805329be9c773df87f38a074ae956e4d0cdb
This commit is contained in:
menghanli
2021-07-09 13:29:26 +08:00
parent 7cbff10736
commit bae720ffc3
12 changed files with 303 additions and 81 deletions

View File

@@ -95,7 +95,20 @@ public class ToggleScreenMagnificationPreferenceFragment extends
removeDialog(DialogEnums.EDIT_SHORTCUT);
mShortcutPreference.setSummary(getShortcutTypeSummary(getPrefContext()));
};
return super.onCreateView(inflater, container, savedInstanceState);
final View view = super.onCreateView(inflater, container, savedInstanceState);
updateFooterPreference();
return view;
}
private void updateFooterPreference() {
final String title = getPrefContext().getString(
R.string.accessibility_screen_magnification_about_title);
final String learnMoreContentDescription = getPrefContext().getString(
R.string.accessibility_screen_magnification_footer_learn_more_content_description);
mFooterPreferenceController.setIntroductionTitle(title);
mFooterPreferenceController.setupHelpLink(getHelpResource(), learnMoreContentDescription);
mFooterPreferenceController.displayPreference(getPreferenceScreen());
}
@Override