Add testutil to mock android.app.usage.NetworkStats

It's not possible to directly create a mocked `NetworkStats`
instance because of limitations with `NetworkStats#getNextBucket`.
As a workaround for testing, create a mock by controlling the
return values from the mocked service that provides the
`NetworkStats` data.

Test: atest FrameworksServicesTests:com.android.server.stats.pull.netstats.NetworkStatsUtilsTest
Bug: 335680025
Change-Id: I4be8420de50040781557587fba4a50b9c0587f61
1 file changed