Loading src/com/android/settings/accessibility/AccessibilitySettings.java +3 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,9 @@ public class AccessibilitySettings extends DashboardFragment implements // Observe changes from accessibility selection menu shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); if (android.view.accessibility.Flags.a11yQsShortcut()) { shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_QS_TARGETS); } shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_STICKY_KEYS); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SLOW_KEYS); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BOUNCE_KEYS); Loading src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java +3 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,9 @@ public abstract class AccessibilityShortcutPreferenceFragment extends Restricted final List<String> shortcutFeatureKeys = new ArrayList<>(); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); if (android.view.accessibility.Flags.a11yQsShortcut()) { shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_QS_TARGETS); } mSettingsContentObserver = new AccessibilitySettingsContentObserver(new Handler()); mSettingsContentObserver.registerKeysToObserverCallback(shortcutFeatureKeys, key -> { updateShortcutPreferenceData(); Loading src/com/android/settings/accessibility/ColorAndMotionFragment.java +3 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,9 @@ public class ColorAndMotionFragment extends DashboardFragment { mShortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED); mShortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); mShortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS); if (android.view.accessibility.Flags.a11yQsShortcut()) { mShortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_QS_TARGETS); } if (Flags.forceInvertColor()) { mShortcutFeatureKeys.add(ToggleForceInvertPreferenceController.SETTINGS_KEY); } Loading src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java +3 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,9 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment final List<String> shortcutFeatureKeys = new ArrayList<>(); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); if (android.view.accessibility.Flags.a11yQsShortcut()) { shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_QS_TARGETS); } return shortcutFeatureKeys; } Loading src/com/android/settings/gestures/OneHandedSettingsUtils.java +15 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,8 @@ public class OneHandedSettingsUtils { Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS); static final Uri HARDWARE_SHORTCUT_ENABLED_URI = Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); static final Uri QS_SHORTCUT_ENABLED_URI = Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_QS_TARGETS); public enum OneHandedTimeout { NEVER(0), SHORT(4), MEDIUM(8), LONG(12); Loading Loading @@ -254,6 +256,16 @@ public class OneHandedSettingsUtils { if (!TextUtils.isEmpty(targetsHW) && targetsHW.contains(ONE_HANDED_MODE_TARGET_NAME)) { return true; } if (android.view.accessibility.Flags.a11yQsShortcut()) { // Checks QS_SHORTCUT_KEY final String targetsQs = Settings.Secure.getStringForUser(context.getContentResolver(), Settings.Secure.ACCESSIBILITY_QS_TARGETS, sCurrentUserId); if (!TextUtils.isEmpty(targetsQs) && targetsQs.contains(ONE_HANDED_MODE_TARGET_NAME)) { return true; } } return false; } Loading Loading @@ -301,6 +313,9 @@ public class OneHandedSettingsUtils { resolver.registerContentObserver(SHOW_NOTIFICATION_ENABLED_URI, true, this); resolver.registerContentObserver(SOFTWARE_SHORTCUT_ENABLED_URI, true, this); resolver.registerContentObserver(HARDWARE_SHORTCUT_ENABLED_URI, true, this); if (android.view.accessibility.Flags.a11yQsShortcut()) { resolver.registerContentObserver(QS_SHORTCUT_ENABLED_URI, true, this); } } @Override Loading Loading
src/com/android/settings/accessibility/AccessibilitySettings.java +3 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,9 @@ public class AccessibilitySettings extends DashboardFragment implements // Observe changes from accessibility selection menu shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); if (android.view.accessibility.Flags.a11yQsShortcut()) { shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_QS_TARGETS); } shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_STICKY_KEYS); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SLOW_KEYS); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BOUNCE_KEYS); Loading
src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragment.java +3 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,9 @@ public abstract class AccessibilityShortcutPreferenceFragment extends Restricted final List<String> shortcutFeatureKeys = new ArrayList<>(); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); if (android.view.accessibility.Flags.a11yQsShortcut()) { shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_QS_TARGETS); } mSettingsContentObserver = new AccessibilitySettingsContentObserver(new Handler()); mSettingsContentObserver.registerKeysToObserverCallback(shortcutFeatureKeys, key -> { updateShortcutPreferenceData(); Loading
src/com/android/settings/accessibility/ColorAndMotionFragment.java +3 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,9 @@ public class ColorAndMotionFragment extends DashboardFragment { mShortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED); mShortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); mShortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS); if (android.view.accessibility.Flags.a11yQsShortcut()) { mShortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_QS_TARGETS); } if (Flags.forceInvertColor()) { mShortcutFeatureKeys.add(ToggleForceInvertPreferenceController.SETTINGS_KEY); } Loading
src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java +3 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,9 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment final List<String> shortcutFeatureKeys = new ArrayList<>(); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS); shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); if (android.view.accessibility.Flags.a11yQsShortcut()) { shortcutFeatureKeys.add(Settings.Secure.ACCESSIBILITY_QS_TARGETS); } return shortcutFeatureKeys; } Loading
src/com/android/settings/gestures/OneHandedSettingsUtils.java +15 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,8 @@ public class OneHandedSettingsUtils { Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS); static final Uri HARDWARE_SHORTCUT_ENABLED_URI = Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); static final Uri QS_SHORTCUT_ENABLED_URI = Settings.Secure.getUriFor(Settings.Secure.ACCESSIBILITY_QS_TARGETS); public enum OneHandedTimeout { NEVER(0), SHORT(4), MEDIUM(8), LONG(12); Loading Loading @@ -254,6 +256,16 @@ public class OneHandedSettingsUtils { if (!TextUtils.isEmpty(targetsHW) && targetsHW.contains(ONE_HANDED_MODE_TARGET_NAME)) { return true; } if (android.view.accessibility.Flags.a11yQsShortcut()) { // Checks QS_SHORTCUT_KEY final String targetsQs = Settings.Secure.getStringForUser(context.getContentResolver(), Settings.Secure.ACCESSIBILITY_QS_TARGETS, sCurrentUserId); if (!TextUtils.isEmpty(targetsQs) && targetsQs.contains(ONE_HANDED_MODE_TARGET_NAME)) { return true; } } return false; } Loading Loading @@ -301,6 +313,9 @@ public class OneHandedSettingsUtils { resolver.registerContentObserver(SHOW_NOTIFICATION_ENABLED_URI, true, this); resolver.registerContentObserver(SOFTWARE_SHORTCUT_ENABLED_URI, true, this); resolver.registerContentObserver(HARDWARE_SHORTCUT_ENABLED_URI, true, this); if (android.view.accessibility.Flags.a11yQsShortcut()) { resolver.registerContentObserver(QS_SHORTCUT_ENABLED_URI, true, this); } } @Override Loading