android_packages_modules_Co.../tests/common/java/android/net/netstats
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lorenzo Colitti ec2fbb7159 Don't clobber existing history entries.
Currently, adding a history to a NetworkStatsCollection.Builder
will overwrite any history that was previously passed in with the
same key. This breaks the importer (which is the primary/only
caller of this code), because the importer re-uses the same
NetworkStatsCollection object to import multiple files.

Instead, simply add any passed-in entries after the ones that
were already there. Require the caller to pass in entries in
order, because NetworkStatsHistory internally assumes that
entris are always sorted.

Bug: 230289468
Test: manually verified this unbreaks the importer
Change-Id: Ic8647ff28fca78d579d5f759f96a864877f8158b
Merged-In: Ic8647ff28fca78d579d5f759f96a864877f8158b
  (pure cherry-picked from ag/18453213)
2022-05-24 11:37:42 +08:00
..
NetworkStatsApiTest.kt Do not verify field count in tests used in CTS 2022-01-18 16:55:32 +09:00
NetworkStatsCollectionTest.kt Remove NetworkIdentitySet usage in CTS 2022-05-02 14:59:51 +09:00
NetworkStatsHistoryTest.kt Don't clobber existing history entries. 2022-05-24 11:37:42 +08:00
NetworkTemplateTest.kt Add test for NetworkTemplate.Builder#setRoaming(int) 2022-03-10 15:00:49 +00:00