In Android 10 additional restrictions were required to access the
subscriberId. The NetworkStatsManager has several methods that accept
a subscriberId of the mobile network for which usage should be queried.
This commit updates the docs for these methods to reference the new
access restrictions and offer null as an option to obtain the usage
for all mobile networks.
Fixes: 157871064
Test: m docs
Change-Id: I95c730c9418fced6312eb3ba4e0d69e6299f3ded
This patch addresses the followings,
- Pass Looper to NetworkStatsSubscriptionsMonitor constructor
- Replace Looper with TestLooper in unit test
- Assert fail if result of condition check is not expected.
Bug: 154080205
Test: atest FrameworksNetTests:com.android.server.net.NetworkStatsServiceTest
atest FrameworksNetTests:com.android.server.net.NetworkStatsSubscriptionsMonitorTest
Change-Id: Ibcaba2b38af80cc0ec9a4e428a3b3a1538bc4325
Add ContentObserver to observe the status of
NETSTATS_COMBINE_SUBTYPE_ENABLED to determine that
NetworkStatsSubscriptionsMonitor start or stop
monitoring data usage per RAT type changes.
Bug: 154080515
Test: atest NetworkStatsServiceTest#testDynamicWatchForNetworkRatTypeChanges
Change-Id: I272d589633c9186b45753228b05aa0b40b7c7b89
Bug: 154080205
Test: atest FrameworksNetTests:com.android.server.net.NetworkStatsSubscriptionsMonitorTest
(copy from ag/11788484 but getActiveAndHiddenSubscriptionIdList() since it's renamed
in internal)
Change-Id: Ia162f36efe96d90b2f6f70190d9fa855bba34484
Merged-In: I4ef3f1ab2e5ea1322133edd80db3ccd0022e9c91
am skip reason: Change-Id I289d935f84b616ed857ef4c5a7427d57c282d00c with SHA-1 9d862381bb is in history
Change-Id: Ie4ef1dcf72a003b1b2427bcaa759b1ee859db83c
am skip reason: Change-Id I0121a4ac7ee824adc5930bab786d550b2f00b05b with SHA-1 c7d0224c75 is in history
Change-Id: Id17c744ef0e967217c297d86c5296d4b450e2e8e
am skip reason: Change-Id Ia171b7797cdc99367064d0649bf1293c71579941 with SHA-1 5c9097c9e0 is in history
Change-Id: I7ce328aa8cacaec55e782257c645249be83878c3
am skip reason: Change-Id I289d935f84b616ed857ef4c5a7427d57c282d00c with SHA-1 e454f35a39 is in history
Change-Id: I308d86910c877702cda6d0f3093c66700c68a862
am skip reason: Change-Id I289d935f84b616ed857ef4c5a7427d57c282d00c with SHA-1 e454f35a39 is in history
Change-Id: I9e2e5b2862a2a381c437669427c0ef02a3905dc4
This should no longer be needed after all the cleanups.
Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I289d935f84b616ed857ef4c5a7427d57c282d00c
Merged-In: I289d935f84b616ed857ef4c5a7427d57c282d00c
This is due to the previous addition of the ip6tables raw PREROUTING
drop rules for incoming ipv6 clat traffic pre-translation to ipv4.
Since we no longer double account, we no longer need these fixups.
Test: atest bpf_module_test clatd_test libbpf_android_test libnetdbpf_test
netd_integration_test netd_unit_test netdutils_test
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia171b7797cdc99367064d0649bf1293c71579941
Merged-In: Ia171b7797cdc99367064d0649bf1293c71579941
This should no longer be needed after all the cleanups.
Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I289d935f84b616ed857ef4c5a7427d57c282d00c
This is due to the previous addition of the ip6tables raw PREROUTING
drop rules for incoming ipv6 clat traffic pre-translation to ipv4.
Since we no longer double account, we no longer need these fixups.
Test: atest bpf_module_test clatd_test libbpf_android_test libnetdbpf_test
netd_integration_test netd_unit_test netdutils_test
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia171b7797cdc99367064d0649bf1293c71579941
am skip reason: Change-Id I297fcad0a83bd8c32c0fa6c6a77d83b42cd8c428 with SHA-1 7e81d01799 is in history
Change-Id: I037af6678f822a955299dbb75897bfa5f3620793
am skip reason: Change-Id I297fcad0a83bd8c32c0fa6c6a77d83b42cd8c428 with SHA-1 7e81d01799 is in history
Change-Id: Icfae270ec371428c1e6bc391098aad0f7c7fc850
am skip reason: Change-Id I297fcad0a83bd8c32c0fa6c6a77d83b42cd8c428 with SHA-1 7e81d01799 is in history
Change-Id: I28154da3f37d182efd5b65c4c1169690f50e5731