summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramStore.java
diff options
context:
space:
mode:
authorSuprabh Shukla <suprabh@google.com>2020-10-08 21:34:01 -0700
committerSuprabh Shukla <suprabh@google.com>2020-10-13 01:36:50 -0700
commitbd8f2ea6973a5f01628b312bd390aab72631fe07 (patch)
tree35b7d686e68909fa1e118cff068dd64d155ccd04 /rs/java/android/renderscript/ProgramStore.java
parent50c75788c8449a214288997377c6717c7465cd09 (diff)
Adding a policy mechanism to control alarms
Alarms now keep track of their deliverability per different throttling policies. Each policy can dictate a time such that the alarm cannot expire any earlier than that. The ultimate delivery start is then calculated as the latest of these times. This makes it simpler to manage different throttling policies separately. Adding two policies to start: 1. Requester policy: This defines the time when the caller requested the alarm to go off. For an alarm with FLAG_IDLE_UNTIL, this is adjusted to be before the next WAKE_FROM_IDLE. This is an exceptional case as this alarm is supposed to be exempt from all the other policies. 2. App-standby policy: This defines the time when the caller app is going to be in quota as per its app-standby-bucket. The delivery end is chosen to the delivery start or (requester policy time + the supplied window), whichever is later. Also, fixed some bugs related to idle-until-time not getting snapped to the next wake-from-idle time in some cases. Test: atest FrameworksMockingServicesTests:\ com.android.server.alarm atest CtsAlarmManagerTestCases atest CtsAppTestCases:AlarmManagerTest Bug: 170279979 Change-Id: Ib7fac90fe4804b624568ca4c6eba7a4cbc8a8aad
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions