Address API council feedback, add getters to NetworkStateSnapshot
instead of exposing the bare fields directly.
(cherry picked from ag/14233655)
Bug: 183972826
Test: FrameworksNetTests
Merged-In: Id1707753b42ae88d2b95e4bd00a792609434e4f5
Change-Id: Id1707753b42ae88d2b95e4bd00a792609434e4f5
This change contains necessary modification in NPMS and NSS
to send warning bytes to NetworkStatsProvider. But since
no any provider has been upgraded to handle such parameter.
Thus, no behavior change is made in this patch.
Test: atest NetworkPolicyManagerServiceTest NetworkStatsServiceTest
Test: atest NetworkPolicyManagerServiceTest#testStatsProviderWarningAndLimitReached
Bug: 149467454
Bug: 170699770
Bug: 170179169
Merged-In: I6c4863030c36328db571294fd12a40e59864def5
Change-Id: I6c4863030c36328db571294fd12a40e59864def5
(cherry-picked from ag/13982166)
To have better control and race-free of set data warning
to tether offload hardware, an interface of set warning and
limit at the same time in the NetworkStatsProvider is needed.
This is a no-op change which expose such interface with minimum
changes in service side to get build pass. The implementation
would be included in follow-up patches.
Test: atest NetworkStatsServiceTest
Test: atest NetworkPolicyManagerServiceTest
Test: atest GtsNetworkStackHostTestCases
Test: m doc-comment-check-docs
Bug: 149467454
Bug: 170699770
Bug: 170179169
Merged-In: I6ee661497f7dedb871c85786d1950cab951d8aa2
Change-Id: I6ee661497f7dedb871c85786d1950cab951d8aa2
(cherry-picked from ag/13959436)
Address API council feedback, add getters to NetworkStateSnapshot
instead of exposing the bare fields directly.
Bug: 183972826
Test: FrameworksNetTests
Change-Id: Id1707753b42ae88d2b95e4bd00a792609434e4f5
Address API review feedback, add getters to UnderlyingNetworkInfo
instead of exposing fields.
Instead of wasting memory by converting this into an array, have
migrateTun take a List<String>. In turn, tunAdjustmentInit should
also take a List<String>.
Bug: 183972554
Test: atest android.net.UnderlyingNetworkInfoTest
Change-Id: Id59744097208d91298a25ef110ade91a9cf291a1
Carrier merged wifi network is a specific cerrier wifi network
which provides the same user experience as mobile.
To support data usage accounting for carrier merged wifi,
the change provide several APIs in NetworkTemplate:
1. extend buildTemplateWifi so it could be used for matching
wifi networks with subscriber Id (IMSI).
2. add buildTemplateCarrier to let
NetworkPolicyManagerService creates a single policy for
a given carrier regardless of network type.
Bug: 176396812
Test: atest -c NetworkTemplateTest
Test: atest -c NetworkStatsServiceTest
Test: Manual Test with test code on mobile and wifi network.
1. buildTemplateCarrier includes the carrier wifi and
mobile usage
2. buildTemplateWifi can get carrier wifi usage and support the
filter via subscriberId
Change-Id: I667b4adf3eec0bdd3a7385109dd8c1fae8e7be32
This commit resolves the dependency under batterystatstests,
servicestests and coretests with hidden connectivity module codes.
Because of connectivity modularization work, the hidden connectivity
methods are not accessible outside modules. Update tests with
alternative ways.
Bug: 182859030
Test: atest
Change-Id: I8294ae4167ee5f95137e0be0f7464429ed3f3322
As API review feedback, rename Build#VERSION#FIRST_SDK_INT to
Build#VERSION#DEVICE_INITIAL_SDK_INT. As well as update all usage
in frameworks and tests.
Bug: 184735771
Test: m
Change-Id: I72660959cb4e638a8e80fcf2f4e96ea172969f44
This change fixes IpConfigStore dependencies on framework-connectivity
hidden APIs.
- Use the version of SystemApi to new RouteInfo.
- Inline the implementation of isIPv4Default() directly because
isDefaultRoute() is a public API so it can be used in this class.
(cherry-picked from ag/13945685)
Bug: 178777253
Test: FrameworksServicesTests:IpConfigStoreTest
Merged-In: I5ed1bc8bc8bee5b0c795fd8577a2d64628998e51
Change-Id: I5ed1bc8bc8bee5b0c795fd8577a2d64628998e51
IpConfiguration and StaticIpConfiguration are included
in framework-connectivity which cannot have external
hidden API usages dependencies on them. IpConfiguration
and StaticIpConfiguration provide builder and getter
methods for the fields of the objects which are formal APIs.
So, replace the usages in IpConfigStore with those formal
APIs to remove the dependencies.
(cherry-picked from ag/13929104)
Bug: 178777253
Test: FrameworksServicesTests:IpConfigStoreTest
Merged-In: Ie9e6af0efe2c39667bb8faa1e3a498b1f61e1432
Change-Id: Ie9e6af0efe2c39667bb8faa1e3a498b1f61e1432
When Wi-Fi SSID is null in NetworkCapabilities,
get Wi-Fi SSID from connection info (WifiInfo) which is non-null design.
Bug: 176396812
Test: FrameworksNetTests NetworkPolicyManagerServiceTest
Change-Id: I59c7d8f7e176d0c6bb100721269f3f6165f0ca21