commit | fd05b019c5630bb9302a0572882688481045f874 | [log] [tgz] |
---|---|---|
author | Kweku Adams <kwekua@google.com> | Tue Nov 12 12:06:37 2019 -0800 |
committer | Kweku Adams <kwekua@google.com> | Tue Jan 07 11:16:05 2020 -0800 |
tree | 7779c2887e1e42bde37cefa62dcea7ed981442fb | |
parent | 2a4b15a30f8b8ac70fb67b499249d49c1d5ea311 [diff] |
Add CountQuotaTracker. This adds a utility class that can track instantaneous app behavior and manages count quotas for the owning system. A system service just needs to create a tracker, set the limits, and call the relevant APIs to determine what to do for each behavior. JobScheduler will use it to prevent apps from calling JobScheduler.schedule() too often. Bug: 135764360 Test: atest CountQuotaTrackerTest Change-Id: Iacd4286bd7f4ab3fc428d8e2ec573671b287f225