diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2018-02-27 22:47:01 +0900 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2018-03-05 15:48:23 +0900 |
commit | 2df4c7d72223316de47d5ea968c807f0220031aa (patch) | |
tree | 6ec865fd711df5fe1b5fd53fedf71147883ffef0 /tools/aapt2/java/JavaClassGenerator.cpp | |
parent | 1451124f86c70b70eeb6908dd9a8248f9e8e2ea6 (diff) |
Minor cleanups to NetworkStats interface tracking.
Currently, when a network goes into CONNECTED state, we call
updateLinkProperties and then notifyIfacesChangedForNetworkStats.
The latter is unnecessary, as there are exactly two cases:
1. networkAgent.linkProperties != null: updateLinkProperties will
call notifyIfacesChangedForNetworkStats, because oldLp is null
and networkAgent.linkProperties is not null.
2. networkAgent.linkProperties is null: there is no need to call
notifyIfacesChangedForNetworkStats, because no interfaces were
added or removed. When they are, updateLinkProperties will be
called again.
Removing the call to notifyIfacesChangedForNetworkStats avoids
a stats poll, which is a minor performance improvement.
Also, remove the NetworkStatsService code to do asynchronous
interface updates, since it has no callers.
Bug: 72107146
Test: builds, boots
Test: runtest frameworks-net
Change-Id: I9337ea26c0505a1c66ceda01254b68e25cd7972c
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions