Cleanup deprecated functions in AccessibilityUtil
Flag: EXEMPT code cleanup Bug: 367414968 Test: atest com.android.settings.accessibility Change-Id: If69a964720fc91ce0ad3661f956c4818f4f2f9dd
This commit is contained in:
@@ -72,6 +72,7 @@ import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Base class for accessibility fragments with toggle, shortcut, some helper functions
|
||||
@@ -685,13 +686,12 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment
|
||||
}
|
||||
|
||||
final int shortcutTypes = getUserPreferredShortcutTypes();
|
||||
if (preference.isChecked()) {
|
||||
AccessibilityUtil.optInAllValuesToSettings(getPrefContext(), shortcutTypes,
|
||||
mComponentName);
|
||||
final boolean isChecked = preference.isChecked();
|
||||
getPrefContext().getSystemService(AccessibilityManager.class).enableShortcutsForTargets(
|
||||
isChecked, shortcutTypes,
|
||||
Set.of(mComponentName.flattenToString()), getPrefContext().getUserId());
|
||||
if (isChecked) {
|
||||
showDialog(DialogEnums.LAUNCH_ACCESSIBILITY_TUTORIAL);
|
||||
} else {
|
||||
AccessibilityUtil.optOutAllValuesFromSettings(getPrefContext(), shortcutTypes,
|
||||
mComponentName);
|
||||
}
|
||||
mShortcutPreference.setSummary(getShortcutTypeSummary(getPrefContext()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user