The utilities help using ConnectivityService in tests, and will be used
to write integration tests for ConnectivityService.
Test: atest FrameworksNetTests
Change-Id: Ie895ad05139cd5768d3d8a9bd5589d72571f47e6
In addition, make mMergedSubscriberIds a list to fit usage of multi-SIM
devices.
Bug: 135105735
Bug: 137137221
Test: manual
Change-Id: I364262559789112f35b88f4c298463bf4af2e82a
am: a22218b772 -s ours
am skip reason: change_id I8ebbefbe4df00e40f4896a17fa52c8438d41286e with SHA1 9bf1e821f5 is in history
Change-Id: Ia244b8a8529dbb267ff28a76c643e283d3feab26
am: 0741d47a2d -s ours
am skip reason: change_id I8ebbefbe4df00e40f4896a17fa52c8438d41286e with SHA1 96fe3f5ff6 is in history
Change-Id: I87c4f2a4d66b6f190c95a28219a75d290cb3cfd0
am: 84f11755d6 -s ours
am skip reason: change_id I8ebbefbe4df00e40f4896a17fa52c8438d41286e with SHA1 96fe3f5ff6 is in history
Change-Id: I9678ef008af3682687fe692cf98bb78e46f09748
am: e6e7d93808 -s ours
am skip reason: change_id I8ebbefbe4df00e40f4896a17fa52c8438d41286e with SHA1 96fe3f5ff6 is in history
Change-Id: I78ea7922a88791b43eb0c8bc337443f128213c63
am: 2c74b2e5d8 -s ours
am skip reason: change_id I8ebbefbe4df00e40f4896a17fa52c8438d41286e with SHA1 96fe3f5ff6 is in history
Change-Id: Ia76c06513e23c4052262c8ac4c7212a548267a8c
am: 2c74b2e5d8 -s ours
am skip reason: change_id I8ebbefbe4df00e40f4896a17fa52c8438d41286e with SHA1 e5e15aee20 is in history
Change-Id: If50b9304e64a5d4c18c78d933c121d428d660d61
am: e7424f5646 -s ours
am skip reason: change_id I8ebbefbe4df00e40f4896a17fa52c8438d41286e with SHA1 e5e15aee20 is in history
Change-Id: Ie5da6e781d039900cb44c596424338946a359713
am: 96fe3f5ff6 -s ours
am skip reason: change_id I8ebbefbe4df00e40f4896a17fa52c8438d41286e with SHA1 e5e15aee20 is in history
Change-Id: I179221edf5fe58a1b4b747bd51f86a569ed051b4
Interface stats on stacked interfaces is usually clatd. For
xt_qtaguid supported device, the stats is already accounted
against its final egress interface by the kernel.
Framework side does not need to handle stats on statcked
interface at all.
However, on devices that support BPF offload, xlat464
packets are seen by the iptables rules as arriving on stack
interface only. Thus, add stack interface into accounting is
needed.
Bug: 136193260
Test: 1. atest FrameworksNetTests
2. atest android.app.usage.cts.NetworkUsageStatsTest
3. manual test on ipv6-only wifi network
Merged-In: I8ebbefbe4df00e40f4896a17fa52c8438d41286e
Change-Id: I8ebbefbe4df00e40f4896a17fa52c8438d41286e
(cherry-pick from aosp/1009306)
(cherry picked from commit feb79bd0d7c5ecc7ac5ba9f54ed2d51ee9fd7e74)
Interface stats on stacked interfaces is usually clatd. For
xt_qtaguid supported device, the stats is already accounted
against its final egress interface by the kernel.
Framework side does not need to handle stats on statcked
interface at all.
However, on devices that support BPF offload, xlat464
packets are seen by the iptables rules as arriving on stack
interface only. Thus, add stack interface into accounting is
needed.
Bug: 136193260
Test: 1. atest FrameworksNetTests
2. atest android.app.usage.cts.NetworkUsageStatsTest
3. manual test on ipv6-only wifi network
Merged-In: I8ebbefbe4df00e40f4896a17fa52c8438d41286e
Change-Id: I8ebbefbe4df00e40f4896a17fa52c8438d41286e
(cherry-pick from aosp/1009306)
Interface stats on stacked interfaces is usually clatd. For
xt_qtaguid supported device, the stats is already accounted
against its final egress interface by the kernel.
Framework side does not need to handle stats on statcked
interface at all.
However, on devices that support BPF offload, xlat464
packets are seen by the iptables rules as arriving on stack
interface only. Thus, add stack interface into accounting is
needed.
Bug: 136193260
Test: 1. atest FrameworksNetTests
2. atest android.app.usage.cts.NetworkUsageStatsTest
3. manual test on ipv6-only wifi network
Change-Id: I8ebbefbe4df00e40f4896a17fa52c8438d41286e
NetworkStatsFactory is owned by NetworkStatsService, and any
accesses to NSF data should go through NSS.
Test: atest FrameworksNetTests
Change-Id: Idbd0dbbaeb11313f63474e7ec0e01f974349fc89
NetworkStatsService is the only consumer of the data coming from
NetworkStatsFactory, but the factory itself is instantiated and
owned by NetworkManagementService.
Move it into NetworkStatsService instead.
Test: atest FrameworksNetTests
Change-Id: I52df1e545c646927952579da22845a12d1d7563b
This ensures the constructor takes the necessary lock before
accessing memmber variables.
Bug: 113122541
Test: atest FrameworksNetTests
Change-Id: Ibd324ed922c738b8d77d4eb74f45b75c6645bdc7
NetworkStatsService uses an internal boolean to know when it has
started for the purpose of preventing access to other internal
variables before they are initialized.
However that boolean is set to true in systemReady() non-atomically
with respect to the initialization of the other variables it guards,
which can cause the system server to crash.
This patch fixes this concurrency bug by moving setting the internal
boolean flag and the variable it guards in one atomic synchronized
block.
This patch also removes code checking if bandwidth control is enabled,
because this is now always true.
Bug: 132767673
Test: Compiled.
Change-Id: Ia089b5767ce271d669879c975508654d4dd03429
am: 85c6ebcce9 -s ours
am skip reason: change_id If2ef8d8f038f32c8cf974aa02cfc1dc7e44dbad3 with SHA1 d749767f44 is in history
Change-Id: I2081b6633b1d0f61bff7531a082e0b6856c23b5b
am: f80234a9b0 -s ours
am skip reason: change_id If2ef8d8f038f32c8cf974aa02cfc1dc7e44dbad3 with SHA1 d749767f44 is in history
Change-Id: I5b525feb1e7df2a89dea4f38b521973ccaac0746
This change inlines the logic from readNetworkStatsDetailInternal, and
reduces reundant checks in mUseBpfStats
Bug: 113122541
Test: atest FrameworksNetTests run, passing
Merged-In: If2ef8d8f038f32c8cf974aa02cfc1dc7e44dbad3
Change-Id: If7d41052115ed145da8a610d676f6ed33c8d5e63
(cherry picked from commit 8c9d8c5e05cd35a340c4224c61f7fa9e95b5c861)