1. Correct the API annotation.
2. The entry deletion failure causes the exception in cleanTestMap().
3. Use AtomicInteger to be the counter in the lambda.
Test: atest BpfMapTest
Change-Id: I4a56038881a38bda993ef5303b71f0e2a99f03d1
Move BaseNetdUnsolicitedEventListener to frameworks/libs/net and
create a new library - netd-client for using.
Also remove netd_aidl_interface-unstable-java since netd-client
links to the stable one.
Bug: 174837473
Test: Manual test and check the log.
Change-Id: Id65142b8c13a6cccbfe387d4ab757967497546e6
Add the connectivity service JAR to the tethering APEX.
This change should not be released in monthly updates until the
modularization work is done, so will be reverted in module release
branches.
This rolls forward the change. The original topic was reverted because
of a bad merged-in clause; this is fixed and re-verified in this topic.
Test: Boot, wifi connects and has internet access
Bug: 171540887
Change-Id: Ib0ac49609e444a53a6fee4575f5078e15f364eef
Revert "Set setCurrentProxyScriptUrl as public"
Revert submission 1532910-connectivity_jar_in_apex
Reason for revert: Breaks boot tests: b/176969905
Reverted Changes:
Ie41a5b569:Set setCurrentProxyScriptUrl as public
Id7b6a4664:Move service-connectivity to the tethering APEX
Ia7cb83834:Add service-connectivity to tethering APEX
Change-Id: I9f31d4810a92e620f02cc8d24bdf18fe28001a2b
Add the connectivity service JAR to the tethering APEX.
This change should not be released in monthly updates until the
modularization work is done, so will be reverted in module release
branches.
Test: Boot, wifi connects and has internet access
Bug: 171540887
Merged-In: Ic496cd62be8c90928ccc619519ebe517beea78f0
Change-Id: Ia7cb83834b854e8c495c4ef17ec69ad032509208
Use two oneway binder interfaces instead.
The interfaces post messages to handlers as was implemented before, but
provide a more strictly defined interface, with less hops between
NetworkAgent, AsyncChannel, and ConnectivityService.
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Merged-In: Ica51d0179bcb3b4e314d2c3e85709aead6ca5657
Change-Id: Ica51d0179bcb3b4e314d2c3e85709aead6ca5657
mForwardedDownstreams is the set of downstreams who wanted upstream.
In other word, it don't contains localOnly tethering(e.g. local only
hotspot, wifi p2p tethering). Changing the list from mForwardedDownstreams
to mNotifyList make both tethered and localOnly tethering have connected
clients callback.
Bug: 172290164
Test: atest TetheringTests
Change-Id: I58fdb28efc616b00d63a1c237ea93aee4d8f2dcd
All callbacks in the class use the DEFAULT_TIMEOUT_MS, except for this recently
added test.
The test is currently flaky in various branches.
Fixes: 174716714
Fixes: 174691729
Change-Id: I9f4446bb83eb4402c912292ac31d46e1d2cb6a52
Test: TH
The tests should just be run on any change in packages/modules/Connectivity,
not just changes in the CTS package.
Change-Id: I1c86c402f39a8a9b84e7422445df289c3ea7842f
Test: TEST_MAPPING needs to be verified by TH
Currently, when an agent calls setUnderlyingNetworks, the
transports of the network are hardcoded to TRANSPORT_VPN only.
This is being fixed in another CL in this topic. The new code
reports the same transports sent by the agent.
This test registers an agent with TRANSPORT_TEST|TRANSPORT_VPN.
Update the test to expect both transports in the callbacks it
receives.
Bug: 173331190
Test: passes when run with other CL in topic
Change-Id: Iede61d74fa02a4fec1f345f6d18835c1acab7337
- Use a more realistic routing config (instead of a LinkAddress
with prefix length 0, an address with a mask of 32 and a
default route).
- Use InetAddresses to parse IP addresses since it's a public API.
- Import the NET_CAPABILITY_xxx and TRANSPORT_xxx constants for
readability.
Bug: 173331190
Test: test-only change
Change-Id: I9703d7dd5781f60fb3d531267d3f5370cbccd64f
Drops use of deprecated API in libnativehelper and uses a common
helper that will be stable across releases.
Bug: 158749603
Test: m
Change-Id: Ic1a1811ffb9a1c207f562a180417e99df31e3502
The CL that introduced testSetUnderlyingNetworks allowed tests to
pass in NetworkCapabilities when registering an agent, but
incorrectly always set the agent's capabilities anyway. This
resulted in testSetUnderlyingNetworks registering an agent with
TRANSPORT_VPN and NET_CAPABILITY_NOT_VPN.
Fix this by ensuring that createNetworkAgent either uses the
passed-in capabilities unmodified, or creates its own. Assert
that the test VPN network does not have NET_CAPABILITY_NOT_VPN.
While I'm at it, remove the manual unregistration of the callback
by using the registerNetworkCallback helper method.
Also add a little bit of extra test coverage.
Bug: 173331190
Test: test-only change
Change-Id: I114d876a1b2bf5344dd7c6fa23862df1c0a412c3
Also reorganize the files to have one toplevel CTS owners file, and only
additional owners in subdirectories.
Change-Id: I28ce193896e1ade2034589327805870774a4d608
Test: m
* changes:
Add OWNERS for packages/modules/Connectivity.
Add repo hooks for packages/modules/Connectivity.
Add a .gitignore in packages/modules/Connectivity.
Specify the owners here instead of including them from other
places (e.g., frameworks/base, NetworkStack) because we hope that
this project will eventually contain all the code.
Test: none
Change-Id: I82811a9758480f16654145c4d55ef784be09de2b
We were running cp to create a file and then running a command to read
the file. However were weren't waiting for the cp to finish (or,
indeed, start), so occasionally the read would fail saying the file
didn't exist.
Also added some logging, because diagnosing failure without it is
painful. Also simplify & improve file closing logic.
Some of this was previously submitted on internal master as change
I1c875102f0cce32cbbe2e3b36de913741c9abb92, but I've reverted that in
favor of this.
Bug: 168216494
Test: atest CtsNetTestCases:android.net.cts.NetworkWatchlistTest
Change-Id: I46a9db8b7a1885a9829f00bbd3233b863cfd1f5d