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
Parse the entire RTM_NEWADDR message instead of only parsing the nlmsg
header and Ifaddr header. Besides, that would be better to know which IP
address will be returned from kernel via netlink message, that's IPv4
and IPv6 loopback addresses.
Test: atest NetworkStaticLibTests
Change-Id: I3a01137db4a7774fa30ebdec5a1711697991b9fe
Enable the strict_updatability_linting here first as a prior
commit to enable strict_updatability_linting in connectivity
modules.
Bug: 188851968
Test: m lint-check ; atest NetworkStaticLibTests
Change-Id: Idac98a1c85bf5bb86269b1daad2b444cfb58db8a
1. Separate bpf and struct libraries from netlink library.
2. Rename bpfmap jni library to respect its java side library.
3. Add README to explain the rules of adding shared jni library.
4. Also allow packages/modules/Connectivity to use bpf library.
Bug: 205088391
Test: atest TetheringTests
atest CtsTetheringTest
atest TetheringPrivilegedTests
atest ConnectivityCoverageTests
Change-Id: I6e668818bede63b241cd901c0967f401613ddaf6
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
The net test utils are used for unit tests exercising connectivity code,
and need access to its hidden APIs.
Bug: 182859030
Test: atest NetworkStaticLibTests
Ignore-AOSP-First: needs manual cherry-picks
Change-Id: I33273e5c1cc2731443f0fd745ce526473a704520
LocationPermissionChecker was written to be used by multiple
connectivity modules, so it belongs in the frameworks/libs/net library.
The file is moved as-is with minor modifications in the test to avoid
usage of the privileged ActivityManager.getCurrentUser API.
Bug: 181837977
Test: atest NetworkStaticLibTests
Change-Id: I80cff14c06c3cab3e8f3bd1978c2951c4a3317c6
Split DeviceConfig and collections-related utilities to CollectionUtils
and DeviceConfigUtils in frameworks/libs/net.
Also add implementations for contains(array, value), to avoid usage of
internal non-API utils.
The original tests are based on mockito-extended, so also add to
NetworkStackTests as a dependency. This also requires setting the test
app as debuggable in its manifest.
Bug: 17454103
Test: atest NetworkStaticLibTests
Change-Id: Ie9bed66a08b7370ebe50d0a7240b788f8b31aa77
jarjar should be applied on the final artifact (android_test,
android_app, java_library that goes into an apex), not on any
intermediate (android_library etc).
Bug: 171670016
Test: atest NetworkStaticTests
atest TetheringCoverageTests
atest NetworkCoverageTests
Change-Id: I86a15133112c555e08275efbde99e68315aa6bc2
These files used to be in the network stack directory, but the libs
directory is a much more suitable place for them.
Also fix a typo : ConcurrentIntepreter → ConcurrentInterpreter
Also move {FdEvents,Packet}Reader to internal annotations. That's
what they should have been using in the first place anyway.
Note that this does not fix preupload issues reported by
checkstyle to make review easier. The fixes are in a followup
patch to this one.
Test: checkbuild
Change-Id: I675077fd42cbb092c0e6bd56571f2fc022e582fd
The classes should not be picked up from frameworks/base, as they are
part of several mainline modules.
Bug: 151052811
Test: m; manual: flashed, wifi and telephony working
Test: atest NetworkStackCoverageTests
(clean cherry-pick from internal branch)
Merged-In: I2b3dcf2e238be047147232769602df56894dc6b1
Change-Id: I2b3dcf2e238be047147232769602df56894dc6b1
Share the tests with TetheringCoverageTests because
tethering module use net-utils-framework-common.
Remove unused static library. Currently we do not implement any
unit test for net-utils-services-common. "net-utils-services-common"
can be back when we add new test for it.
Bug: 148636687
Test: atest NetworkStaticLibTests
atest TetheringCoverageTests
Change-Id: I2f3a94b2ba50cd4d73303961bf1661a3091ab033
Currently, NetworkStaticLibTests tests the class files that are
on the bootclasspath of the device. This makes running these
tests slow and/or confusing, because the framework must be
rebuilt and the device flashed before running the tests, and if
this is not done, the old code will be tested instead.
Instead, jarjar the tests so the test can be run without updating
the device.
Bug: 142892223
Test: atest NetworkStaticLibTests passes on device that does not have the library
Change-Id: I6a0dbebddbd0b64e2722078345ffe6b0c0a1801e
Add a network static library for common utilities. This
library could be used by all mainline modules. Initially
create LinkPropertiesUtils and MacAddressUtils.
Bug: 139268426
Bug: 135998869
Bug: 138306002
Test: build lib pass
atest NetworkStaticLibTests
Change-Id: I8f79e4f836819ac83007acffb55103e5d69873e0