Commit Graph

6 Commits

Author SHA1 Message Date
Edgar Wang
cd74f76a43 Remove restricted icon in SettingsMainSwitchBar
- display disable status directly
- click disabled MainSwitchBar will show devicepolicy dialog
- make sure BT and location use MainSwitchBar correctly

Bug: 260406688
Test: manual
Change-Id: I8bb57213eec6dd5e991af580e1a06ebf8a867c28
2023-04-26 14:06:22 +08:00
Edgar Wang
81aaba00e7 Change preference value changed metrics log format
- Pass metric category into SharedPreferenceLogger
- Update MainSwitchBar metric log format

Bug: 246483846
Test: Robotest

Change-Id: I91c7b89ee35ae4922aea0d8c998f7d0e33365da2
2022-11-14 18:05:42 +08:00
Stanley Wang
9b6ead8de7 SettingsMainSwitchPreference should display the restricted icon
if it is restricted.

- Use the RestrictedPreferenceHelper to check the restricted state.

Fix: 179245126
Test: rebotest and see the UI
Change-Id: I3c0e3bd0f3596d6fa548b6f8f10e4d12e7e50c9a
2021-05-31 14:49:48 +08:00
Julia Reynolds
5166e3939d Allow SettingsMainSwitchBars to be disabled
Test: manual, looking at notification settings
Fixes: 182859292
Change-Id: I06db2a0984b0dcbf71a69fc8f58e54b4670652a8
2021-03-16 14:55:18 -04:00
Edgar Wang
7eeca8bc65 Refactor MainSwitchBar
- Extract RestrictedLockUtils related things to SettingsMainSwitchBar

Bug: 180226735
Test: robotest
Change-Id: I694cdb181c137bd2f22cc1d4e466f7e203f8c0e2
2021-03-09 03:02:05 +00:00
Stanley Wang
b87ddba6cd Use SettingsLib's MainSwitchBar to replace SwitchBar in Settings.
To log Settings metrics, the MainSwitch extends MainSwitchBar and
replace the SwitchBar in SettingsActivity.

Bug: 175181773
Test: Run robotest and apply the widget in Settings and see the ui

Change-Id: I3add3702e9058ad9192b5172c7cf0e2ccfb55a70
2021-01-14 22:48:31 +08:00