More changes for the exact alarm permission
Adding a deny list option, which changes the default grant state of the
permission to denied. This means now alarm manager is the source of
truth of the permission state and exposes an API that clients like
Settings should call.
Also using the same API to cap the minimum standby-bucket
for apps with this permission to WORKING_SET.
Adding an app to the deny list may mean revocation of its permission, in
which case its exact alarms will be removed.
Meanwhile, performed some long needed refactoring on the remove methods,
so they re-use common code and are easier to maintain.
Also, changing strings for the Settings UI to be clearer.
Test: atest FrameworksMockingServicesTests:com.android.server.alarm
atest CtsAlarmManagerTestCases
Bug: 171306433
Bug: 130444055
Bug: 181894091
Bug: 181152252
Change-Id: I9410f988343800b7322963fecf3eafac9561b093
9 files changed