summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2017-08-17 19:23:08 +0900
committerLorenzo Colitti <lorenzo@google.com>2017-08-19 10:12:05 +0900
commitf1912ca49ac0f5bcdad063a7c042153ba791145d (patch)
treefb57a8fedcb219224f8d44796c3998c383961cdc /tools/aapt2/java/JavaClassGenerator_test.cpp
parent9f0baa94ca28f67e162d3ad04ca6d0e17ee5e314 (diff)
Add tether offload traffic to interface stats as well.
Currently, we only count add tethering traffic to per-UID stats, but not to total data usage (i.e., dev and XT stats). This is correct for software tethering, because all software forwarded packets are already included in interface counters, but it is incorrect for hardware offload, because such packets do not increment interface counters. To fix this: 1. Add an argument to ITetheringStatsProvider#getTetherStats to indicate whether per-UID stats are requested. For clarity, define integer constants STATS_PER_IFACE and STATS_PER_UID to represent these operations. 2. Make NetdTetheringStatsProvider return stats only if per-UID stats are requested. (Otherwise tethering traffic would be double-counted). 3. Make OffloadController's stats provider return the same stats regardless of whether per-UID stats were requested or not. 4. Make NetworkStatsService add non-per-UID tethering stats to the dev and XT snapshots. The per-UID snapshots were already correctly adding in per-UID stats. (cherry picked from commit 5356a35c3bcfcdf2d184c620af6bfbf9bddf35c5) Bug: 29337859 Bug: 32163131 Test: runtest frameworks-net Test: runtest frameworks-telephony Change-Id: I325b13d50e88841dfb0db4c35e7e27f163ee72fe Merged-In: I4e8e923d68dce1a4a68608dbd6c75a91165aa4ee
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions