- Add a new API to get the network ID range of IPSec tunnel
interface.
- Use the new API in IpSecServiceTest to make sure the result is
the same. Follow-up commit will change the logic in
IpSecService#reserveNetId(), the modified test can ensure the
correctness of the new change.
Bug: 172183305
Test: atest FrameworksNetTests:IpSecServiceTest
Change-Id: Ic605e48941fc9d6482cdcd01a8adcdc9b6d586a6
This is a generic way to request networks that has different
subId but belongs to the same carrier. For example, cellular
networks with different SIM card, or carrier Wifi that
provided by the operator.
Test: atest NetworkCapabilitiesTest#testSubIds
Test: m doc-comment-check-docs -j
Test: atest CtsNetTestCases
Bug: 175662146
Change-Id: Ifca766f5acc73c285948d6251ec31506d9bb0bcb
Rename StringNetworkSpecifier to EthernetNetworkSpecifier (its only
production user), and make it module-lib API.
The original StringNetworkSpecifier file is actually kept to satisfy
some invalid dependencies; it will be removed separately.
This allows specifying an Ethernet interface with a non-deprecated API:
until this change the only way to do so would be to use
NetworkRequest#setSpecifier(String), which is deprecated.
Similarly, add the TestNetworkSpecifier API for TestNetworkManager, to
replace previous usage of StringNetworkSpecifier. TestNetworkManager is
module API, so TestNetworkSpecifier should be module API too. This
allows tests to request the test interface specifically, without using
the deprecated NetworkRequest#setSpecifier(String).
Bug: 179329291
Test: m
Merged-In: Iee569f5c8bbdc4bc979610e1191308281f3d4620
Change-Id: Iee569f5c8bbdc4bc979610e1191308281f3d4620
Slog should not be used in unbundled jars as it is a hidden API; use the
standard Log utility instead.
Bug: 172050541
Test: m
Change-Id: I54b2b99b2aedbb5194e9ec24068d2f2ce46d67fc
Preconditions.checkNotNull is deprecated to be replaced by
Objects.requireNonNull, and other methods can easily be replaced by
inline checks.
Preconditions is an internal API class that should not be used by
unbundled jars.
Bug: 177046265
Test: m
Change-Id: If14a75439ff332c927dc4114ae0eecb89f53c6c7
The NetworkType annotation is a hidden telephony symbol, and should be
kept hidden as annotations are disallowed by API guidelines.
Remove its usage in NetworkInfo as users of annotated constants that
build against API stubs are expected not to use the annotation.
Bug: 182451544
Test: m
Change-Id: I6658c1faa147c527c989b87d67f1af166c488dde
INVALID_RESOURCE_ID is a hidden API so its usage should be avoided.
The current usage is for an unused parameter, so just use a literal instead.
Bug: 182451544
Change-Id: I066d9c34f735434adee4ee72e8a7fe1ceb900c3c
Test: m
ParseException is a public API class used to support Connectivity APIs,
so it should be in the same API surface as connectivity.
Bug: 181512874
Test: m
Change-Id: Ie1213de0d0facc8f409f7b4c2553abb382e4afbf
The constructor is a hidden API, and used in a code path that can
never happen.
Replace it with a thrown exception (which should never be thrown either).
Bug: 170598012
Change-Id: Ie2c671c1a75accb8e94b08de9901d14b72caaf7e
Test: m
ConnectivityService is going to become a mainline module, and
it will not able to use hidden method anymore. Using PlatformProperties
as a static library instead of hidden API.
Bug: 170917042
Test: atest FrameworksNetTests
Merged-In: I3a3deca5d2e0f690db8c0061de2db2217376d268
Change-Id: I3a3deca5d2e0f690db8c0061de2db2217376d268
This is needed for FrameworksNetTests because it inculdes
service-connectivity. Without this library, the service-connectivity
is already jarjar-ed which will cause the util classes couldn't be
found when running the tests. So let the tests inculde the pre-jarjar
version and service-connectivity applies the jarjar to this library.
Bug: 177046265
Test: FrameworksNetTests
Change-Id: I1acd95ff9bec99b918646e8ec3a57f3ef156e2ca
Merged-In: I1acd95ff9bec99b918646e8ec3a57f3ef156e2ca
Socket.getFileDescriptor$ is a hidden API. Instead, replace it with
ParcelDescriptor.fromSocket, which was created to handle such use-cases.
Bug: 170598012
Change-Id: I9e218e4ec29d2b7fe5d2faeb1c2e1cafc63dc923
Test: m
* changes:
[Telephony] Use TelephonyCallback instead of PhoneStateListener part1
[PhoneStateListener] Redesign PhoneStateListener: Use TelephonyCallback
Create the ServiceConnectivityResources package, which contains
resources Connectivity unbundled from platform resources.
Migrate the first few resources from ConnectivityService that have no
RRO in AOSP. To avoid boot time impact, avoid loading the resources in
the ConnectivityService constructor.
Bug: 182125649
Test: atest FrameworksNetTests
Change-Id: I77ac6f4303c54acc96f16e18ef02add30298ff3d
Rename StringNetworkSpecifier to EthernetNetworkSpecifier (its only
production user), and make it module-lib API.
The original StringNetworkSpecifier file is actually kept to satisfy
some invalid dependencies; it will be removed separately.
This allows specifying an Ethernet interface with a non-deprecated API:
until this change the only way to do so would be to use
NetworkRequest#setSpecifier(String), which is deprecated.
Similarly, add the TestNetworkSpecifier API for TestNetworkManager, to
replace previous usage of StringNetworkSpecifier. TestNetworkManager is
module API, so TestNetworkSpecifier should be module API too. This
allows tests to request the test interface specifically, without using
the deprecated NetworkRequest#setSpecifier(String).
Bug: 179329291
Test: m
Change-Id: Iee569f5c8bbdc4bc979610e1191308281f3d4620
Since the redesign of PhoneStateListener, use TelephonyCallback to get the callback of EVENT_*
Bug: 167684594
Test: make
Change-Id: Ia3b777b12142b104b5798804f50b34748f9bf28c
Merged-In: Ia3b777b12142b104b5798804f50b34748f9bf28c
Connectivity is becoming a mainline module in S but mainline
modules are not allowed to use non-formal APIs. Thus, replace
non-formal API Inet[4|6]Address#ANY to
NetworkStackConstants#IPV[4|6]_ADDR_ANY.
Bug: 181756157
Test: FrameworksNetTests
Change-Id: Id4d2fc551c1384f549a586e87ab68356ba05b995
The data class supports a ConnectivityManager API, so it should be
together with the ConnectivityManager API surface.
Bug: 181512874
Test: m
Change-Id: I5642486ea0febcb08cadcbd4cd3f0c6056deae0e
The connection service will become the main line module.
It is difficult to include BitUtils in the module. and so
Move the hidden API needed in BitUtils to NetworkCapabilitiesUtils.
Bug: 170598012
Test: atest ConnectivityServiceTest
atest NetworkCapabilitiesTest
atest DnsUtilsTest
Change-Id: Ibc81827e25a54fc3ff94f78d810fe4f5073e3a98
This is needed for FrameworksNetTests because it inculdes
service-connectivity. Without this library, the service-connectivity
is already jarjar-ed which will cause the util classes couldn't be
found when running the tests. So let the tests inculde the pre-jarjar
version and service-connectivity applies the jarjar to this library.
Bug: 177046265
Test: FrameworksNetTests
Change-Id: I1acd95ff9bec99b918646e8ec3a57f3ef156e2ca