Accessibility Service & Shortcut Redesign - Primary action - toggle button design

Implements DividerSwitchPreference to replace ToggleSwitch

Bug: 142528112
Test: Manual test

Change-Id: I0d80d16bfa941f7ee333a2c5680a25a26c42809d
This commit is contained in:
menghanli
2020-02-03 22:12:45 +08:00
parent da645144e0
commit 6eb3912f31
17 changed files with 246 additions and 156 deletions

View File

@@ -25,7 +25,14 @@ import com.android.settings.R;
import com.google.common.collect.ImmutableSet;
/** For accessibility services that target SDK <= Q. */
/**
* Fragment that only allowed hardware {@link UserShortcutType} for shortcut to open.
*
* <p>The child {@link ToggleAccessibilityServicePreferenceFragment} shows the actual UI for
* providing basic accessibility service setup.
*
* <p>For accessibility services that target SDK <= Q.
*/
public class LegacyAccessibilityServicePreferenceFragment extends
ToggleAccessibilityServicePreferenceFragment {
@@ -38,7 +45,6 @@ public class LegacyAccessibilityServicePreferenceFragment extends
mShortcutPreference.setSummary(hardwareTitle);
mShortcutPreference.setSettingsVisibility(View.GONE);
// Only allowed hardware PreferredShortcutType in this fragment.
setAllowedPreferredShortcutType(UserShortcutType.HARDWARE);
}