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
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.
Exempt-From-Owner-Approval: Owners OOO, change approved by team members
Ignore-AOSP-First: merge conflicts in dependent changes
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
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
Original-Change: https://android-review.googlesource.com/1531561
Merged-In: I58fdb28efc616b00d63a1c237ea93aee4d8f2dcd
Change-Id: I58fdb28efc616b00d63a1c237ea93aee4d8f2dcd
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
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
Merged-In: Ic1a1811ffb9a1c207f562a180417e99df31e3502
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 jarjar com.android.net.module.util* to
com.android.networkstack.tethering.util*.
Bug: 171670016
Test: atest TetheringCoverageTests
Change-Id: I3bde9ad3c41adf36da99bd944303d88ce992201c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473223
Compare with original change, this change also add visibility
rules for packages/modules/Connectivity/Tethering in new file
(tests/Android.bp).
Merged-In: I3f1d7019f1a12647b78630a412df3adf03e9e95a
Change-Id: I40c22e2f39d795abfd961a3f797e510e51c8ed7c