Commit Graph

7 Commits

Author SHA1 Message Date
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