diff options
| author | Aaron Huang <huangaaron@google.com> | 2022-05-10 13:52:58 +0800 |
|---|---|---|
| committer | Aaron Huang <huangaaron@google.com> | 2022-05-13 15:17:30 +0800 |
| commit | 4d38375188549734cd07f2b31489df8511f75067 (patch) | |
| tree | fbac5581c699f6aee3befda39389901acc4ba916 /tests/unit/java/android/net/NetworkStatsCollectionTest.java | |
| parent | b479f79cabf29e8dfcbd6a2bff410a4078754709 (diff) | |
Exclude PID for rate-limited
rate-limited would include PID in current design, which means that
an app can ignore the rate-limits by creating a process (a new PID)
every time. Thus, maintain mOpenSessionCallsPerUid for rate-limits
and OpenSessionKey for debugging.
Also, there's no rate-limit for SYSTEM_UID so if the uid is SYSTEM_UID,
the mLastStatsSessionPoll should not be updated. Otherwise, it may
cause an app to be rate-limited to do a query after a system user
polled.
Test: adb shell dumpsys netstats and check the output
Bug: 228081549
Change-Id: I69cc1f3990c9960347691256ed4cb500f9bb48b2
(cherry picked from commit 8d5907fc13bd6238a2eaa56c1d80488c42a2d564)
Merged-In: I69cc1f3990c9960347691256ed4cb500f9bb48b2
Diffstat (limited to 'tests/unit/java/android/net/NetworkStatsCollectionTest.java')
0 files changed, 0 insertions, 0 deletions
