Also move CollectionUtils which is a dependency.
NetworkCapabilitiesUtils is needed in BatteryStatsImpl, which is in
frameworks/base/core, so it uses the framework-common library.
The current framework-common target cannot use androidx annotations due
to users of this filegroup. This is being addressed in another change;
use android.annotation annotations in the meantime.
Bug: 174436414
Test: m
Change-Id: Ie188572a6db7c1bea37550a3410d7d828409a902
Adjusting visibility to accomodate migration of
frameworks/opt/net/wifi to packages/modules/Wifi.
BUG: 137323948
Test: TH
Change-Id: Iee3f2dc6fc5f3262fa9e81626a3e15a3226e4ab7
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
Add paths to visibility needed for tests.
Soong allows specifying paths w/o validation. Once the
migration is complete, we can remove the old path in
visibility rules.
BUG: 137323948
Test: TH
Merged-In: Id19c650246a8f3d55d7b6a874840a6eebcd9eb17
Change-Id: I68de6a67b978ed5a2e721adf41329af349076696
Exempt-From-Owner-Approval: Cleanup CL
This fixes failures in CtsNetTestCases, where
TestableNetworkCallback.TAG cannot be used because
it uses kotlin-reflect.
Change-Id: I7e76fe224b1098c967665275eac24fcac08fca23
Fixes: 176047509
Test: atest CtsNetTestCasesLatestSdk
The packages/modules/Connectivity project contains module code that can
depend on net-utils-device-common or net-utils-framework-common.
Bug: 171540887
Test: m
Change-Id: Ie754e3f55d78aabff4cef2da3a2a94a1204bd5e5
per b/167962976#comment10, following project directories are being
moved under platform/packages/modules/Connectivity/...
cts/test/net --> packages/modules/Connectivity/tests/cts/net
cts/tests/tests/tethering -> packages/modules/Connectivity/tests/cts/tethering
cts/hostsidetests/net -> packages/modules/Connectivity/tests/cts/hostside
BUG: 167962976
Test: TH & Local Build
Exempt-From-Owner-Approval: PS.1 +2d by Lorenzo. fixing tab (+2 not sticky)
Change-Id: I4e13620ea16b74712a917737607bc3ed38c11cd9
Revert "Use new test utilities from frameworks/libs/net"
Revert submission 1440811-iputils_constants_move
Reason for revert: Likely broke build in b/170438226
Reverted Changes:
Ic382d24e7:Move NetworkStackConstants to frameworks/libs/net
I0d938e296:Use new test utilities from frameworks/libs/net
Change-Id: I5e41daa85af39cfab4261ddf790c2008b2630c15
The class only contains constants that should be shareable between
different modules and tests.
Bug: 168868607
Test: m
Change-Id: Ic382d24e73697d85d29fa226692bd0d64ffa0f1f
Add an ArpResponder based on a generic PacketResponder class, and a
TestHttpServer based on NanoHttpd.
Test: tests based on these utilities
Bug: 160617623
Bug: 160656765
Change-Id: I50b872a8b23e8df997e8f62f0adc7c0256c4d74d
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
DnsResolverTest required DnsPacket to parse DNS answer, and the
DnsPacket class is provided by system previously.
However, DnsPacket was moved to here with changed package,
which has no backward-compatibility and might cause
NoClassDefFoundError. To solve this problem, build the DnsResolverTest with
DnsPacket directly.
Test: build
Test: atest DnsResolverTest
Bug: 150952393
(clean cherry-pick from internal branch)
Merged-In: I463fd58173cee55a210fa6c6b8c9b0d5a74b7906
Change-Id: I463fd58173cee55a210fa6c6b8c9b0d5a74b7906
The filegroups here were set up without an explicit path. As a result,
the files within were incorrectly considered part of the
"src_frameworkcommon.android.net.utils" package by droidstubs'
filter_packages filter (and thus not fed into droidstubs).
This CL fixes the filegroups by adding an explicit path to where the
package tree starts for each of them, such that the path-based
package filter in droidstubs can work correctly.
Also @hide the classes which otherwise would now be considered exposed
API by droidstubs.
Bug: 151160048
Test: make checkapi
Change-Id: I969fc9846294a42554233cffda725797ee0185f4
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
DnsSdTxtRecord is @hide, thus need to statically
link it into framework-wifi.
Bug: 135998869
Test: boots up and connects to wifi
Merged-In: Ic5f7decfdbc3116a15fe8da3841cc7620105996d
Change-Id: Ic5f7decfdbc3116a15fe8da3841cc7620105996d
(clean cherry-pick from internal branch)
Safer for wifi to just include the sources that it needs. Then there is
no accidental risk of un-jar-jar'ed classes showing up in it's
namespace.
Bug: 135998869
Test: Compiles
Merged-In: I2532f640fbebd4ca82be7bbb63744bcad653ac34
Change-Id: I2532f640fbebd4ca82be7bbb63744bcad653ac34
(clean cherry-pick from internal branch)
f/b/services/net should be allowed, not just f/b/services.
Test: Dependent change using the build rule builds
Bug: 138306002
Merged-In: Ide48e637df6e1c21cd7c0c688e3fef2ba1c97deb
Change-Id: Ide48e637df6e1c21cd7c0c688e3fef2ba1c97deb
(clean cherry-pick from internal branch)
The libraries need to build as system_current since they will be used in
modules that should build against that SDK.
As notable changes, NetworkFactory stops using a common BASE for
handler messages, as no message ID is shared with other handlers (all
public messages numbers are for receiving only). It also indexes
NetworkRequests by using the request itself in the request table; this
is fine because .equals() / .hashCode() are implemented properly, and
no request can be used that has the same ID but differences in other
members.
Test: built, flashed, WiFi and telephony working
Test: atest FrameworksNetTests FrameworksWifiTests \
FrameworksTelephonyTests
Bug: 138306002
Merged-In: I2ea2be0039b67ba34fc26e62bdb839ab7d42300c
Change-Id: I2ea2be0039b67ba34fc26e62bdb839ab7d42300c
(clean cherry-pick from internal branch)
A separate target is necessary for telephony as it needs to jarjar
included classes.
Test: atest FrameworksNetTests FrameworksWifiTests \
FrameworksTelephonyTests
Bug: 138306002
Change-Id: I4b7f79fc43fe5820c94226662bee0216b61fc599
Merged-In: I4b7f79fc43fe5820c94226662bee0216b61fc599
(clean cherry-pick from internal branch)
net-utils-services-common-srcs for files in src_servicescommon
and library net-utils-services-common could be used in services.jar
or modules.
Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksTelephonyTests
Change-Id: I5043a34100e9ef26148e3a0c1743363d063a3604
Merged-In: I5043a34100e9ef26148e3a0c1743363d063a3604
(clean cherry-pick from internal branch)
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