Correct the NetworkStatsServiceTest
BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
MobileRadioPowerCalculatorTest NetworkStatsServiceTest
CTS-Coverage-Bug: 213437796
Change-Id: I47dc377a5cce7d8a0029dc808ad0f46e651764b1
Add extra field in NativeNetworkConfig to allow CS to notify
netd whether the local traffic should be excluded from the VPN
network.
Bug: 184750836
Test: atest FrameworksNetworkTests
Change-Id: If230fe7057722c80a09433673ac3cec857f7a7a5
NetworkStatsService is using INetworkManagementService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 209738761
Test: atest NetworkStatsServiceTest
Change-Id: Ieda3c3382fa61411587c5b390bbecb2a2524844b
OnSubscriptionsChangedListenerHandler(Looper looper) is
hidden, there is no way to pass a looper to it in the test.
This change partially revert aosp/1340040 to fix hidden
API dependency. And will use a different approach to address
this problem in later stages.
Test: atest NetworkStatsSubscriptionMonitorTest
Bug: 204830222
Bug: 213280079
Change-Id: Ie17f04cd9f174f2895bde4607bbd7a9a92181a96
Currently, the test didn't mock data usage of the month.
Thus, when asserting remaining budget, the calculation
always assumes there is no used data, hence wrong budget
value is expected. See #getRemainingDailyBudget.
This change makes data usage of this month includes the
bytes used today. And adjust the policy limit accordingly.
Test: atest MultipathPolicyTrackerTest
Bug: 204830222
Change-Id: I3ca6505f8d502047485ba3676f16fbc474117cc1
1. Used SSID to be a wifi network identity can't separate wifi
data usage when there are two different network with same SSID.
Use a new usage key from in WifiInfo to replace wifi SSID to
solve this issue.
2. To support to query wifi usage per configured Wifi network.
Adding matchWifiNetworkKeys in NetworkTemplate to support querying
multi networkKeys wifi data usage since each configured Wifi
network configuration might be used to connect different Wifi
network.
a. Replaced wording SSID with key of the wifi network
b. Add mock to handle get wifi network key from WifiInfo
c. Add null/empty set unit test to verify matchWifiNetworkKeys
Bug: 197520752
Bug: 126299427
Test: atest -c NetworkTemplateTest
Test: atest -c NetworkStatsServiceTest
Test: atest -c NetworkPolicyManagerServiceTest
Change-Id: Id7d66f6548dd1b4e657db8d7427213293618b406
Add API to allow network agent to set whether the local traffic
is excluded from the network. This commit is nonfunctional
currently but only storing the boolean inside the NAI.
Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I3799216ac8fdf22eb4bcabc6c6136d8edbf69360
Subscriber Id Match Rules won't be exposed as system Api.
Any caller who references NetworkTemplate#SUBSCRIBER_ID_MATCH_RULE_*
should use the one in NetworkStatsUtils instead.
And remove the need of the constants as soon as possible.
Test: atest NetworkPolicyManagerServiceTest \
FrameworksNetTests
Bug: 204830222
Change-Id: I363a4440f85f1ca818eaf1125e45b141dd6f0e55
Added NET_CAPABILITY_MMTEL to indicate a network
support MMTEL (Multimedia telephony). This is for
IMS service to request an IMS network that supports
voice or PS (VoPS for 4G, VoNR for 5G).
This was previously submitted as aosp/1927841, but
which got reverted due to breaking the mainline
build, which uses the pre-built module.
Bug: 210774375
Test: atest ConnectivityServiceTest
Change-Id: If8b691ff4999a4dbf54e7567d9ca74d743dc5ded
NetworkStatsAccess is using DevicePolicyManagerInternal APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Bug: 207100745
Test: atest NetworkStatsAccessTest
Change-Id: I0430ed2c47e5a695206cb660e3971ddab6c467dd
These files are needed for the data migration util system Api
interfaces. Thus, they need to be moved into frameworks folder.
This change also set the @IgnoreUpTo annotation to S, since
these tests are testing purely platform code on S- devices which
is not really necessary for MTS. Also the tests are still covered
by the unit tests, since they are always verifying HEAD.
Test: TH
Bug: 197717846
Change-Id: I93c19b4860864c724be9f9f889ee2173f4605198
NsdSettings has been removed from NsdService, so the test needs
to update accordingly.
Bug: 206702844
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I23b6323b2d870746737370b9a3fc90e530e3d2ed
The interface IpSecServiceConfiguration is refactored to static
class Dependencies. Refine the tests to use Dependencies.
Bug: 204153604
Test: FrameworksNetTests
Change-Id: Ie2b79b1d948a19f64600ed9ea3b60b192dd92dfd
PermissionMonitor only saves netd network permissions by appId.
Then apply same permision to uids which are same appId. But
UIDS_ALLOWED_ON_RESTRICTED_NETWORKS can allow single uid has
restricted network permission. Thus, save the netd network
permissions by uid that can apply different permission to each
uid.
Bug: 192431153
Test: atest FrameworksNetTests
Change-Id: I942cbe0fa30758a7497c47a1b684ed70c4e3b09e
Update the tests to use the newer NsdManager based on Binder interfaces
instead of AsyncChannel.
Bug: 190249673
Test: atest NsdManagerTest NsdServiceTest
Change-Id: I0991b598331e335a0bc211f010da7f034fb2441b