Add the settings content observer for shortcut preference.
Root cause: Didn't update the UI when settings value chagned. Next: Add the settings content observer. Bug: 155837154 Test: manual test Change-Id: Icee0bb50f88987ea6c8a0be59bd936628a32ca1e
This commit is contained in:
@@ -467,7 +467,8 @@ public class ToggleScreenMagnificationPreferenceFragment extends
|
||||
showDialog(DialogEnums.MAGNIFICATION_EDIT_SHORTCUT);
|
||||
}
|
||||
|
||||
private void updateShortcutPreferenceData() {
|
||||
@Override
|
||||
protected void updateShortcutPreferenceData() {
|
||||
// Get the user shortcut type from settings provider.
|
||||
mUserShortcutType = getUserShortcutTypeFromSettings(getPrefContext());
|
||||
if (mUserShortcutType != UserShortcutType.EMPTY) {
|
||||
@@ -489,7 +490,8 @@ public class ToggleScreenMagnificationPreferenceFragment extends
|
||||
mShortcutPreference.setTitle(title);
|
||||
}
|
||||
|
||||
private void updateShortcutPreference() {
|
||||
@Override
|
||||
protected void updateShortcutPreference() {
|
||||
final int shortcutTypes = getUserShortcutTypes(getPrefContext(), UserShortcutType.SOFTWARE);
|
||||
mShortcutPreference.setChecked(
|
||||
hasMagnificationValuesInSettings(getPrefContext(), shortcutTypes));
|
||||
|
||||
Reference in New Issue
Block a user