Merge setQuietModeEnabled and trySetQuietModeDisabled into one API
This is the first step to introduce a public API to toggle work mode.
All the callers actually have the similar bit of logic like this:
if (workModeOn) {
trySetQuietModeDisabled(..)
} else {
setQuietModeEnabled(...)
}
So, let's merge them into one API.
Test: Quick Settings -> Toggle work mode
Test: Settings -> Work profile settings -> Toggle work mode
Test: Turn off work mode -> Settings -> Turn on work mode in the suggestion
Test: Turn on work mode through tapping on work app
TODO: Allow foreground default Launcher to call the API
TODO: Allow privileged apps to call the API
TODO: Remove @hide
TODO: Write a CTS to toggle the work mode once it is public API
BUG: 70212757
Change-Id: Ibcdd43458c236eca929c5f934fea61be2e2be863
5 files changed