From 5bb571dc403b4384111ae987ed7b44aaef76ace0 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Tue, 6 Nov 2018 14:42:04 +0100 Subject: A brave new world for window insets (5/n) Implement controlWindowInsetsAnimation Based on the leashes we have on the client, and the insets the client has requested, we are able to move the surfaces around such that the resulting insets will match what the client requested. Bug: 118118435 Change-Id: I0616e53455a6544aaf374c1b0eb10e258aced21d --- core/java/android/util/SparseSetArray.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/java/android/util/SparseSetArray.java') diff --git a/core/java/android/util/SparseSetArray.java b/core/java/android/util/SparseSetArray.java index d100f12ed026..680e85fa2ba8 100644 --- a/core/java/android/util/SparseSetArray.java +++ b/core/java/android/util/SparseSetArray.java @@ -54,6 +54,13 @@ public class SparseSetArray { return set.contains(value); } + /** + * @return the set of items at index n + */ + public ArraySet get(int n) { + return mData.get(n); + } + /** * Remove a value from index n. * @return TRUE when the value existed at the given index and removed, FALSE otherwise. -- cgit v1.2.3 From 7d6a31c15411ca88a8232467671520c55a30eba6 Mon Sep 17 00:00:00 2001 From: Kweku Adams Date: Tue, 16 Apr 2019 17:05:30 -0700 Subject: 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 --- core/java/android/util/SparseSetArray.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/java/android/util/SparseSetArray.java') 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 @@ -43,6 +43,13 @@ public class SparseSetArray { return false; } + /** + * Removes all mappings from this SparseSetArray. + */ + public void clear() { + mData.clear(); + } + /** * @return whether a value exists at index n. */ -- cgit v1.2.3