Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b7e6fd49 authored by Tony Mak's avatar Tony Mak
Browse files

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
parent 5c9d8019
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment