Add PerUidCounter
The class keeps track of the counters under different uid,
fire exception if the counter exceeded the specified maximum
value.
This is reimplemented and generalized based on the one
inside ConnectivityService.
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.PerUidCounterTest
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.net.module.util.PerUidCounterTest
Bug: 229103088
Change-Id: I7dfb16342e3ca4eab45bb40f2e1355981e04b44b
2 files changed
tree: d91c4aa0c190cbd8f4daf203f46ff4f3a889d592
- staticlibs/