Commit Graph

11 Commits

Author SHA1 Message Date
Chun-Ku Lin
919019ca56 [Flag cleanup] edit_shortcuts_in_full_screen is always on now
- Cleaned up the code that won't be executed when the flag is on
- Remove unused resources

Bug: 300302098
Test: Manually verify the user can change the shortcut type, and the
changes are saved
Test: atest com.android.settings.accessibility
Flag: EXEMPT removing com.android.settings.accessibility.edit_shortcuts_in_full_screen

Change-Id: I1e32b724ca3da909feda55e20fb1d51dc4680c09
2024-07-25 22:49:02 +00:00
Daniel Norman
8ce099c2cd Remove usages of bugfix flag cleanup_accessibility_warning_dialog.
Flag has been in Trunkfood for over a month.

Includes one mechanical refactor to move a method from a now-removed
file into a private method in the class that uses it: createDisableDialog

(This flag guarded a preliminary cleanup and minor bug fix for
b/303511250, but the actual feature for b/303511250 is tracked in a
different flag 'skip_accessibility_warning_dialog_for_trusted_services')

Bug: 303511250
Test: existing tests in Presubmit (no change to behavior)
Change-Id: Iccf439adb2806e988310f503fb3891a6bd022054
2024-03-19 23:05:07 +00:00
Daniel Norman
126de9691a Use A11yManagerService to check if the A11yService warning is required.
Bug: 303511250
Test: m RunSettingsRoboTests ROBOTEST_FILTER=ToggleAccessibilityServicePreferenceFragmentTest
Change-Id: Ibef748bd82ba166e377be0611df113ac09d052bc
2023-11-28 01:54:21 +00:00
Daniel Norman
77db500fcb Tech debt cleanup: Consolidates A11yService warning dialog.
Both frameworks/base and the Settings app define almost-identical copies
of a warning dialog shown when enabling an accessibility service.
The frameworks/base version was used for contexts outside of Settings
(e.g. while editing the volume key shortcut after triggering it with
2+ features already enabled) while the Settings version was used in
the Settings app.

This change replaces version used in Settings with the version defined
in frameworks/base.

The warning dialog's functionality is tested in
AccessibilityServiceWarningTest in frameworks/base.

Feature flag:
`adb shell device_config override accessibility android.view.accessibility.deduplicate_accessibility_warning_dialog true`

Bug: 303511250
Test: atest AccessibilityServiceWarningTest
Test: existing A11ySettings robotests
Change-Id: Iad2f13040d53d82a4afb0353fae3ac355b5548d6
2023-11-10 18:38:53 +00:00
Stanley Wang
86cc0579f3 Replace the SwitchBar with MainSwitch.
- Update wi-fi calling switch.
- Update the switches in Accessibility

Fix: 178673860
Fix: 177968565
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: Id10e6a110f418ea500a2eaf3c54752bef4f36507
2021-02-23 16:21:52 +08:00
menghanli
de1258f9cf 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
2020-04-29 13:44:54 +08:00
menghanli
919e555a51 ShortcutPreference Toggle design.
- For target SDK < 30 app show as preference item to trigger shortcut on/off.
- For target SDK >= 30 app show two item: the left one can edit shortcut and the right one be a on/off trigger button.

The design is reference from WIFI setting which has similar comportment.

Bug: 148989269
Test: Test result in Buganizer.

Change-Id: I815206d9e885c01bf3e6445820176aed4a743323
2020-03-03 17:31:27 +08:00
menghanli
6eb3912f31 Accessibility Service & Shortcut Redesign - Primary action - toggle button design
Implements DividerSwitchPreference to replace ToggleSwitch

Bug: 142528112
Test: Manual test

Change-Id: I0d80d16bfa941f7ee333a2c5680a25a26c42809d
2020-02-07 20:49:13 +08:00
jasonwshsu
4605005374 Accessibility shortcut secondary action - correct invisible type fragment checkbox logic
- checkbox logic need to follow shortcutPreference checked status

Bug: 142530063
Test: manual
Change-Id: Ibc079f116c16b6e1c32b573de693b4a23388858c
2020-01-15 20:29:23 +08:00
jasonwshsu
5469cffa58 Accessibility shortcut secondary action - Invisible type fragment need to handle AccessibilityServiceState
- InvisibleToggleAccessibilityServicePreferenceFragment need to set
AccessibilityServiceState according to ShortcutPreference checkbox's stauts.

Bug: 142530063
Test: manual
Change-Id: I9ff21b66ebf72a51e62a958e3e391624c7925c27
2020-01-13 15:22:50 +08:00
jasonwshsu
3d94a57d97 Accessibility shortcut secondary action - divide different fragment for different fragment type
Different accessibility service fragment type have different UI.
- AccessibilityServiceFragmentType.LEGACY will use LegacyAccessibilityServicePreferenceFragment
- AccessibilityServiceFragmentType.INVISIBLE will use InvisibleToggleAccessibilityServicePreferenceFragment
- AccessibilityServiceFragmentType.INTUITIVE will use ToggleAccessibilityServicePreferenceFragment

Bug: 142530063
Test: Manual
Change-Id: Ib32a4f97514450e5c0d29e99c22935efecf8b6df
2019-12-26 11:40:11 +08:00