Fix InvisibleToggle type service does not turn on or turn off correctly when edit shortcut dialog.

Root cause: service status is not updated after the shortcut status
changed.

Next: Add callback to update the service status

Bug: 155157599
Test: Manual test
Change-Id: I286a04d43066c787304c54eb7b0dfdac5728b6ac
This commit is contained in:
menghanli
2020-04-29 07:13:56 +08:00
parent 6f482cef09
commit de1258f9cf
3 changed files with 23 additions and 2 deletions

View File

@@ -381,7 +381,8 @@ public class ToggleScreenMagnificationPreferenceFragment extends
return shortcut.getType();
}
private void callOnAlertDialogCheckboxClicked(DialogInterface dialog, int which) {
@Override
protected void callOnAlertDialogCheckboxClicked(DialogInterface dialog, int which) {
updateUserShortcutType(/* saveChanges= */ true);
optInAllMagnificationValuesToSettings(getPrefContext(), mUserShortcutType);
optOutAllMagnificationValuesFromSettings(getPrefContext(), ~mUserShortcutType);