There are only three calls to this method, and two of them
are with a list of 1 address which means it's simpler inlined.
The last call will be replaced with calls to RouteController
in a followup, meaning we addRoutesToLocalNetwork can be removed.
Test: RouterAdvertisementDaemonTest
NetdUtilsTest
Change-Id: I3b6ee1db40f09954b336321000735a66306bf000
Mainline no longer supports Q.
These files were recently moved into p/m/C as part of a refactor.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0f06ace921db6c79d63c0048bdb73d167ff606cf
Adding a class that has maintains no-op implementation for all methods
in INetdEventListener to allow extending in a compatible way across
projects
Test: Builds, boots
Bug: 265742148
Change-Id: I46327d78a3685848e06f7a369e238d2952410296
Since ethernet-service related files are going to be moved into
Connectivity module. To deal with InterfaceConfiguration dependency
in EthernetTracker, use InterfaceConfigurationParcel instead, which
returns from NetdUtils API directly. Adding a new method hasFlag in
NetdUtils to replace the original InterfaceConfiguration.hasFlag,
that's invisible to the Connectivity module.
Bug: 210586283
Test: atest NetdStaticLibTests --iterations
Change-Id: I16fcbfb8f36c8632a8267ce55cdcbd78ea6edd1a
This reverts commit d654277abfa0abd1268acc6db1753536509e41c8.
Reason for revert: Re-landing changes not related to postsubmit failure
Change-Id: I72fd6b908deeb293f1f3a342f006515029972089
Revert "Add VpnServiceBuilderShim for VpnService.Builder"
Revert submission 1551943-vpn-impl
Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=mainline_modules_x86_64-userdebug&lkgb=8007224&lkbb=8008168&fkbb=8007902 >, bug b/210979001
Reverted Changes:
I0e7aa077a:Add VpnServiceBuilderShim for VpnService.Builder
Ib12f5ab39:Suppress NewApi warnings for @SystemApi -> public ...
I59b9185cf:Unhide RouteInfo#getType and related fields
Ie5b62b2b2:Unhide IpPrefix(InetAddress, int)
I993a32d40:Add CTS tests for exclude VPN routes APIs
Ib24b2d3fb:Suppress NewApi warnings for @SystemApi -> public ...
Ic3b10464a:Add APIs that allow to exclude routes from VPN
Change-Id: I5b918dbf4293168c2a02cfe1c0f6ca8342b3195c
BUG: 210979001
Android Lint doesn't handle API change from @SystemApi to public API
correctly (see b/193460475). We have to manually suppress those
warnings for now.
This CL suppresses warnings related to:
- IpPrefix(InetAddress, int)
- RouteInfo#getType
Bug: 186082280
Test: presubmit
Change-Id: Ib24b2d3fb21b86bd9e3555316a5a5bcb94434c00
These classes used to live as a static utility in the
NetworkStack module, but that's not the right place for
them.
The point of this patch is to *not* require topics, as
any change in this space will very quickly spin out of
control and become unmanageable. As such, this starts
with creating equivalent classes in a single, easier to
manage change. Followup changes will migrate users of
the old classes to use these ones instead. Finally, the
old classes can be removed. This way, work can be
broken down into separate changes and be checked in
little by little, rather than one huge topic with many
changes doing everything in one go, which is unlikely
to be manageable.
There are no code changes from the originals, but a
number of reorganizations, most of them unavoidable.
• Vertical spacing (these classes fix it)
• Package names/imports are adjusted
• Added @hide on NetlinkMonitor
• Move all contents of RouteUtils to NetdUtils, because
all methods depend on INetd, and some of the targets
do not/cannot depend on netd-client
• Restrict the files used by the filegroup
net-utils-framework-wifi-common-srcs, since that
target does not necessarily provide all dependencies
to all its users.
• Don't move NetworkMonitorUtils, since it depends on
SdkLevel, and net-utils-framework-common-srcs is
using **/*.java. It would have been possible to list
explicitly all files actually necessary in this
filegroup, but NetworkMonitorUtils is actually only
used by the networking modules and not the framework.
Eventually it should move but it doesn't have to
be in this patch, which is complicated enough as
it is.
• RouteUtils is now empty, because some new methods
will be added to it soon and it is less expensive
to keep it empty than to remove it now and add it
again later.
• Merge NetdUtils, and unify the constants.
Some changes to satisfy checkstyle :
• Remove unused imports
• Reorder modifiers in InterfaceController
• Remove {} in IpNetworkMonitor
• Remove redundant public modifier in IpNetworkMonitor
• Add javadoc to a few methods
• Add whitespace around | in InterfaceParams
However, don't rename members in IpNeighborMonitor
like checkstyle would prefer because this would make
migration to this more involved.
Test: NetworkStaticLibsTests NetdStaticLibTests
Change-Id: I439121cba5d7ea95aa4d6c80ea25207c316880a0
Allow all Connectivity test subpackages to use the targets,
so that the visibility does not need to be updated when test suites
are reorganized inside Connectivity.
Bug: 187935317
Test: m
Change-Id: I99d1ec954ebe313e553443a9f081d54d7a5f12c1
We are enabling a new lint check where the min sdk != compile sdk.
It has produced a lot of errors and adding the baseline file(s)
allows us to continue work without introducing more problems.
Bug: 150847901
Test: m lint-check
Change-Id: I2c38dac481685470af8be115d867953325e75d94
Merged-In: I2c38dac481685470af8be115d867953325e75d94
Some files which will be inside mainline module depend on
NetworkManagementService to talk to netd, but after they become
a part of mainline module, they cannot access @hide API of
NetworkManagementService.
So create a NetdUtils to help them to talk to netd.
Bug: 170598012
Test: atest CtsNetTestCasesLatestSdk NetdStaticLibTests
Change-Id: I8bee1204b9533b70844da0b3768427438fd0c890
Move BaseNetdUnsolicitedEventListener from tethering module to
frameworks/libs/net and have a new library for it.
Tethering module can still use BaseNetdUnsolicitedEventListener
through netd-client and ConnectivityService and Nat464Xlat also
can use it when both of them are under frameworks/base.
Bug: 174837473
Test: Manual test and check the log.
Change-Id: I44dff1c7639e50b8f20b54c6d5733139b20e2986