Fix inconsistent shortcut strings on accessibility setting and edit dialog

Root cause: Base class provides an override function for accessibility settings shortcut preference. But, it cannot update to the edit dialog.
Solution: Refine the resilience function and base class apply into accessibility settings shortcut preference and edit dailog.

Bug: 228830417
Test: Manual testing on all accessibility page and edit dialog
Change-Id: I84bc63a39cd9cfa7e12944dff20ee6b92879008d
This commit is contained in:
menghanli
2022-04-15 08:00:36 +08:00
committed by Menghan Li
parent 3ed73b7b2d
commit 50520c2d3f
7 changed files with 18 additions and 26 deletions

View File

@@ -185,8 +185,8 @@ public final class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePrefe
}
@Override
protected void updateShortcutTitle(ShortcutPreference shortcutPreference) {
shortcutPreference.setTitle(R.string.accessibility_daltonizer_shortcut_title);
protected CharSequence getShortcutTitle() {
return getText(R.string.accessibility_daltonizer_shortcut_title);
}
@Override