summaryrefslogtreecommitdiff
path: root/core/java/android/util/SparseSetArray.java
Commit message (Collapse)AuthorAgeFilesLines
* Snooze NMS ManagedServices per user id, not globallyMatías Hernández2023-01-181-0/+5
| | | | | | | | | Listeners are bound and registered per user, so snoozing should be that way as well. Test: atest ManagedServicesTest (and manually) Fixes: 147075801 Fixes: 167152273 Change-Id: Ia61816518aa00f8a89f22e79ffdc048f3066541d
* [SparseSetArray] optimize copy constructorSongchun Fan2022-05-161-4/+1
| | | | | | BUG: 232347307 Test: atest android.util.SparseSetArrayTest Change-Id: Ie046f557098ddc168b86523700cc06feede97e5e
* Merge "Consolidate launch time change notifications." into tm-devTreeHugger Robot2022-04-081-0/+14
|\
| * Consolidate launch time change notifications.Kweku Adams2022-04-061-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Track pending estimated launch time changes in a single Set so that we avoid sending repeat notifications for a single package. Bug: 227796747 Test: atest CtsUsageStatsTestCases:UsageStatsTest Test: atest FrameworksCoreTests:android.util.SparseSetArrayTest Test: atest FrameworksMockingServicesTests:PrefetchControllerTest Test: atest FrameworksMockingServicesTests:UserUsageStatsServiceTest Change-Id: I671c97e4e4110d0a1c76a8f6400dfe8c1e5055dc
* | Revert "Revert "[AppsFilter] read-only interface for snapshots""Songchun Fan2022-04-061-1/+20
|/ | | | | | | | | | | | | | | | This reverts commit 2e06c6008e595b9b167f3463431d9dcdb16687bb. Reason for revert: fixing the boot time regression Provides a read-only interface that is used by computer and snapshots. It fixes the data conflicts when AppsFilter is changed while a snapshot is taken. Test: atest AppsFilterTest Test: atest com.android.server.utils.WatcherTest Test: m RUN_ERROR_PRONE=true framework services.core |& grep AppsFilter BUG: 218411030 Change-Id: I06624ea79ff85160488a6c7863213b0c44fe2154
* Revert "[AppsFilter] read-only interface for snapshots"Songchun Fan2022-03-311-18/+1
| | | | | | | | This reverts commit 8cb3e6aac93147287bcb9fa41a284b1745d47c75. Reason for revert: boot time regression Change-Id: I5e6dc8e80d33256cf7dd8c0d5f1415373fba9048
* [AppsFilter] read-only interface for snapshotsSongchun Fan2022-03-281-1/+18
| | | | | | | | | | | | Provides a read-only interface that is used by computer and snapshots. It fixes the data conflicts when AppsFilter is changed while a snapshot is taken. This requires a watchable class for SparseSetArray. Test: atest AppsFilterTest Test: atest com.android.server.utils.WatcherTest Test: m RUN_ERROR_PRONE=true framework services.core |& grep AppsFilter BUG: 218411030 Change-Id: Ib9d13537b6cec911b2a189aea828e9baec650585
* Fixes SparseSetArray#add return logicPatrick Baumann2020-01-161-2/+2
| | | | | | | | | Docs state that adding a key value pair that already exists will return false, else true. The actual behavior is reverse. This change fixes that. Test: atest AppStateTrackerTest Change-Id: I2593f2ba22b5972cccb1c0b3dc5aabb4ed65a023
* Fix documentation in SparseSetArray.Kweku Adams2019-12-131-7/+7
| | | | | | | | | | | "n" in SparseSetArray is actually the key, not the index. "index" is used as a parameter name in this class wherever it actually is the index. Using index in documentation in the wrong places gives users the wrong understanding. Bug: N/A Test: N/A Change-Id: I239a653347dab4ea1a00c6d709aac06a98012a46
* Fix QuotaController job spam throttling.Kweku Adams2019-04-221-0/+7
| | | | | | | | | | | | | | 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
* A brave new world for window insets (5/n)Jorim Jaggi2018-12-211-0/+7
| | | | | | | | | | | | 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
* Do not throttle EXEMPT apps on battery saverMakoto Onuki2018-01-251-0/+98
- Also keep track of # of callback calls and their duration and print them in dumpsys. Example: Stats: UID_STATE_CHANGED: count=141, total=31.9ms, avg=0.226ms RUN_ANY_CHANGED: count=0, total=0.0ms, avg=0.000ms ALL_UNWHITELISTED: count=0, total=0.0ms, avg=0.000ms ALL_WHITELIST_CHANGED: count=0, total=0.0ms, avg=0.000ms TEMP_WHITELIST_CHANGED: count=28, total=14.9ms, avg=0.532ms EXEMPT_CHANGED: count=2, total=4.7ms, avg=2.370ms FORCE_ALL_CHANGED: count=6, total=1.1ms, avg=0.178ms FORCE_APP_STANDBY_FEATURE_FLAG_CHANGED: count=0, total=0.0ms, avg=0.000ms Bug: 70565111 Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java Test: atest CtsBatterySavingTestCases Test: atest CtsJobSchedulerTestCases Test: atest CtsAlarmManagerTestCases Change-Id: Ie4983456dd60f7115a15ee25a8d1bf5c078dac74