summaryrefslogtreecommitdiff
path: root/core/java/android/util/SparseSetArray.java
diff options
context:
space:
mode:
authorKweku Adams <kwekua@google.com>2019-04-16 17:05:30 -0700
committerKweku Adams <kwekua@google.com>2019-04-22 11:06:15 -0700
commit7d6a31c15411ca88a8232467671520c55a30eba6 (patch)
tree50287a1f65e7d5700e43427d46bca603c1ad54c6 /core/java/android/util/SparseSetArray.java
parent0727797765fecf8a1b22172a720be311bfdcfa65 (diff)
Fix QuotaController job spam throttling.
QuotaController was inadvertently updating all Timers for a particular user whenever any process state crossed the FOREGROUND_SERVICE threshold, instead of only updating the Timer for the specific UID. Also adding more data to QuotaController's dump to make future debugging easier. Bug: 129117282 Test: atest com.android.server.job.controllers.QuotaControllerTest Test: atest CtsJobSchedulerTestCases Change-Id: Ic8d9e6478e61cc62318ae5651f0526e41a71de8d
Diffstat (limited to 'core/java/android/util/SparseSetArray.java')
-rw-r--r--core/java/android/util/SparseSetArray.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/util/SparseSetArray.java b/core/java/android/util/SparseSetArray.java
index 680e85fa2ba8..c1873d76f46f 100644
--- a/core/java/android/util/SparseSetArray.java
+++ b/core/java/android/util/SparseSetArray.java
@@ -44,6 +44,13 @@ public class SparseSetArray<T> {
}
/**
+ * Removes all mappings from this SparseSetArray.
+ */
+ public void clear() {
+ mData.clear();
+ }
+
+ /**
* @return whether a value exists at index n.
*/
public boolean contains(int n, T value) {