OSDN Git Service

Use delta reads for per uid traffic stats
authorChenbo Feng <fengc@google.com>
Thu, 10 Jan 2019 22:48:54 +0000 (14:48 -0800)
committerChenbo Feng <fengc@google.com>
Tue, 22 Jan 2019 21:50:35 +0000 (13:50 -0800)
commitb29a6166e00481251b7eeee315cd2197bb6a8c7c
tree31d044ab8bb3158e7702ea9ebdb20e96c6e58853
parenta24ced9e9bff3fe4b5af9411c7e773b54f1bb093
Use delta reads for per uid traffic stats

For the detailed network stats of each uid and tag, the native
implementation provides delta read instead of consistent stats
data since boot. Every time the readNetworkStatsDetail function gets
called, the data pulled will be cleared. We will keep a persistent data
since boot in NetworkStatsService instead.

Fixed some checkstyle complains in related files as well.

Bug: 79171384
Test: android.app.usage.cts.NetworkUsageStatsTest
      NetworkStatsServiceTest
Change-Id: I50bcf278739135081d522e50b0e88d76fd9ab131
core/java/com/android/internal/net/NetworkStatsFactory.java