* changes:
Remove VPN info arrays from NetworkStats(Observer|Recorder)
NetworkStatsFactory: Take VPNs into account for network/battery stats
Remove duplicate line in clat_simple test file
Remove unused lastStats parameter
Revert "Revert "Take all VPN underlying networks into account when migrating traffic for""
am: a63b604929 -s ours
am skip reason: change_id Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80 with SHA1 6988872c91 is in history
Change-Id: Idbcfe381f246a6d9c7e9ef3c51150f6f2a065230
am: 990438b35b -s ours
am skip reason: change_id Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80 with SHA1 6988872c91 is in history
Change-Id: Iad5f4f152115dd4cbb31dbe7e37b3aea0b6ce071
am: 08793a3b64 -s ours
am skip reason: change_id Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80 with SHA1 6988872c91 is in history
Change-Id: I9094b83959e1f75f90edac095060240c129b73b0
This mostly serves to unindent code to make it locally more
readable. It is a functional no-op.
Bug: 135043192
Test: atest FrameworksNetTests
Merged-In: Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80
Change-Id: I80bebcd04c277f6e4b0665fe1253b2309e3bc535
(cherry picked from commit e1f5759319a4559b3cf89029449878dc56f92bb7)
This mostly serves to unindent code to make it locally more
readable. It is a functional no-op.
Bug: 135043192
Test: atest FrameworksNetTests
Change-Id: Iad0e9a28670e96a3c953518a0d0ccd77e2f2fa80
PARTIAL and NO_INTERNET may happen in the real world for
those transport types that provide internet. These two
notification types should be reasonable notificaitons, not a
terrible failure as the log. For Q, it may be too risky to
display more notifications with other information instead of
SSID. Thus, suppress the wtf log for these two notifications.
Bug: 135043192
Test: atest FrameworksNetTests
Change-Id: I35f3718fa93b403858587d918f0bc596f6c92f3e
Merged-In: I91b92249dc7905aadbc59df50c3bc6da30a8590e
Merged-In: Ia1c2a765b0fb0cc8d440c02533bdc15774a5a3ef
(cherry picked from commit ed0a54bd07ea1c9072459bafeaf796eaa4dad4c5)
This change removes the now-unused VPN arrays in the network stats
observer and recorder classes. These are always null values in every
call site.
Bug: 113122541
Bug: 120145746
Bug: 129264869
Bug: 134244752
Test: FrameworksNetTest passing
Test: Manual tests show data usage fixes maintained.
Change-Id: Ieb8645acc400fdaeb0df7092c5369b96f9f35af9
This change fixes detailed UID stats to ensure network and battery stats
both take VPNs into account. NetworkStatsFactory is being made aware of
VPNs enabled, and the full set of underlying networks present.
Since traffic can only be migrated over a NetworkStats delta, NSF
maintains a NetworkStats snapshot across all UIDs/ifaces/tags.
This snapshot gets updated whenever NSF records a new snapshot
(based on various hooks such as VPN updating its underlying networks,
network getting lost, etc.), or NetworkStatsService's
getDetailedUidStats() method being called.
This change widens the scope of the existing mPersistentSnapshot lock,
renaming it to mPersistentDataLock, and ensures that TUN migrations are
not done in parallel. Additionally, mVpnInfos is updated via
pointer-swapping, to reduce the scope of the mPersistentDataLock.
The safety of this change is predicated on:
1. NetworkStatsFactory lock not held, so services cannot deadlock through
the cyclical lock.
2. The broadening of the scope of the lock in NetworkStatsFactory has no
threading implications, as it is always the last (leaf node) lock held,
and therefore is impossible to have lock inversion.
Additionally, to ensure VPNs work with 464xlat, the VPN info passed to
the NetworkStatsFactory includes all underlying interfaces, instead of
only passing the first one.
This (partially) re-applies changes from:
aosp/972848: Add one more test for VPN usage stats.
aosp/972847: Addressing comments for http://ag/7700679.
aosp/885338: NetworkStatsService: Fix getDetailedUidStats to take VPNs
into account.
Co-developed with: Varun Anand <vaanand@google.com>
Bug: 113122541
Bug: 120145746
Bug: 129264869
Bug: 134244752
Test: FrameworksNetTest passing
Test: Manual tests show data usage fixes maintained.
Change-Id: I6466ec1411fc5ed6954125d27d353b6cd1be719e
This change removes a redundant line in the xt_qtaguid_with_clat test
file.
Bug: 134244752
Test: FrameworksNetTest passing
Change-Id: I87deb82ba960102b617ab27362e8c5899fa478f8
Wrap a part of factoryReset with Binder.withCleanCallingIdentity() so
that it doesn't crash thinking that a different uid connected to the
network stack.
Test: build, manual
Change-Id: Iea246a4c1939a4e7e35434137051835ece81d92f
Wrap a part of factoryReset with Binder.withCleanCallingIdentity() so
that it doesn't crash thinking that a different uid connected to the
network stack.
Bug: 135029349
Test: build, manual
Change-Id: Iea246a4c1939a4e7e35434137051835ece81d92f
PARTIAL and NO_INTERNET may happen in the real world for
those transport types that provide internet. These two
notification types should be reasonable notificaitons, not a
terrible failure as the log. For Q, it may be too risky to
display more notifications with other information instead of
SSID. Thus, suppress the wtf log for these two notifications.
Bug: 135043192
Test: atest FrameworksNetTests
Change-Id: I35f3718fa93b403858587d918f0bc596f6c92f3e
am: e16dc7932b -s ours
am skip reason: change_id Ibdaad3a4cbf0d8ef1ed53cfab1e454b9b878bae9 with SHA1 4c94d3051d is in history
Change-Id: I48f805c08d46e03a837173f59f411506c9748951
am: 39f9c1c212 -s ours
am skip reason: change_id Ibdaad3a4cbf0d8ef1ed53cfab1e454b9b878bae9 with SHA1 4c94d3051d is in history
Change-Id: I47d22d76e3525efc7771e6b514ebadc9b2c75e22