Allow power-allowlisted apps to schedule alarm-clocks
They can already use a lot of APIs to perform work in the background and it simplifies the logic handling permission state changes and the return value of canScheduleExactAlarms. The major changes in behavior are: 1. Allowlisted apps can schedule unlimited alarm-clock alarms. This should be the same as pre-S behavior. 2. If they happen to get the permission revoked, due to whatever reason: user revocation, deny list, or app update, their alarm-clock alarms will stay safe like their other exact alarms. 3. The API canScheduleExactAlarms is now true to its name: It returns true even if the app is allowlisted. Test: atest CtsAlarmManagerTestCases:ExactAlarmsTest atest FrameworksMockingServicesTests:AlarmManagerServiceTest BYPASS_INCLUSIVE_LANGUAGE_REASON=Existing APIs Bug: 191716678 Bug: 190625528 Change-Id: I420694455f50aac10cf49cd43ff3b98575d86e9f
Loading
Please register or sign in to comment