There is U32 added in frameworks/libs/net. Use shared one to avoid
duplicated code.
Bug: 215095957
Test: m
Change-Id: I861bc2f65ea947a908de2ec83e9b137d3342c8ce
Currently if wifi, usb and bluetooth tethering is not supported,
isTetheringSupported would return false. Then ethernet, ncm tethering
and wifi p2p would also not be supported anymore. Make
isTetheringSupported respect all tethering downstreams after T.
Also remove redundant code:
1. tethering always has upstream configuration, checking whether has
upstream configuration for isTetheringSupported is useless.
2. Remove TetheringDependencies#isTetheringSupported because it don't
have any caller.
Test: atest TetheringTests
Change-Id: I3db5ce410c064d37c9e9e704fce2a2b68705834e
In /packages/modules/common/sdk/ModuleDefaults.bp file, some
apex_defaults are added to provide common parameters corresponding to
Q, R, S, and T releases.
(Refer to CL link for above mentioned change -
https://android-review.googlesource.com/c/platform/packages/modules/common/+/2005890?forceReload=true)
This CL is using the apex_default corresponding to R release for the
com.google.android.tethering module.
Bug: 172589606
Test: USE_RBE=true m
Since there are no runtime changes, successful code build is enough for
testing.
Change-Id: I4b3b3d6add96da1ee4421227996b54f7b96bc2c2
This is a no-op CL that passing whole TetheringConfiguration to IpServer
to reduce the number of IpServer constructor parameters.
Bug: 170056953
Test: atest TetheringTests
Change-Id: I4ec17f7ecaefd7f275139ad9c7f7551635b192c9
The tether_enable_select_all_prefix_ranges is added from M2020-12
for quick roll back the feature. Since feature is landed over a year
without any problem, remove the flag now.
Bug: 171269957
Test: atest TetheringTests
Change-Id: I3ef414a47dd0a1f80ea2d378601ccd7c14067318
* changes:
Update API files to unhide MATCH_PROXY.
Update tests for NetworkStats code move.
Add setPollForce to module API
Add JNI stats libraries to apex Android.bp
Add JNI stats libraries to connectivity
[MS62.2] Add NetworkStatsService into service initializer
[MS54.8] Add hiddenapi-unsupported-t.txt to apex Android.bp
[MS54.3] Move NetworkStats to updatable sources
This is separated from ag/16766427 to avoid merge
conflict at downstream branches. For some downstream branches,
the library does not exist and this part is commented out.
Bug: 197717846
Test: atest FrameworksNetTests
Merged-In: Idb6da7ce678fbb3f4839604726cbdbdf223144c1
Merged-In: Iae44344701a3267110e5cbf271120201134d59e5
Change-Id: I9d7f6cea1cdb3c8117e677d8c204e3985295ada0
This is separated from ag/16657723 to avoid merge
conflict at downstream branches. For some downstream branches,
the library does not exist and this part is commented out.
Test: TH
Bug: 197717846
Merged-In: I4eeb7ea9cfc3139991caf0fc22474e0052a0391c
Merged-In: I33e0d699086c87ce8e940036c9a52908bbbcf6c5
Change-Id: I031e5687fa47594b50ca1b40570e01cdec356827
This CL builds NetworkStats related codes with the
connectivity module instead of platform.
Test: TH
Bug: 197717846
Change-Id: I4eeb7ea9cfc3139991caf0fc22474e0052a0391c
Merged-In: I4eeb7ea9cfc3139991caf0fc22474e0052a0391c
In scenarios where linkproperties event is received on default internet
callback, linkproperties are cached and network state is updated with
new link properties but Tethering class is notified about the change.
Later when event is received on mobile request or listen all cb, since
the network state is already updated with these linkproperties, change
in link properties will not be notified. This results in tethering
failures where the ip addresses of the tethering interface will not be
updated.
This change handles this issue by triggering the link properties change
in all scenarios.
Update the correponding test case as well.
Tests: Builds, Boots, TetheringTests
Bug: 216281561
Change-Id: I7452ed07d2665843c86141764b71aab0c00417fe
Used for reducing the increasing amount of helper in the
follow-up commits.
Tether4Key, Tether4Value ConntrackEvent need many arguments to build
a testing instance. Any new argument combination may require a new
helper. It is hard to compare the difference while reading the code.
Test: atest BpfCoordinatorTest
Change-Id: I5af6ce9609b97d124227750cd1c5337796982c58
This is preparation for tetherOffloadRule4Clear test.
- Upstream interface can be set {null, cellular (rawip), wifi (ether)}
- Allow that add up to two downstream interfaces which has one client
on each of them.
- Change mBpfDownstream4Map and mBpfUpstream4Map from mocked instance
to TestBpfMap for further rule check.
- Remove startPolling() from initBpfCoordinatorForRule4() because
upstream information is updated by updateUpstreamNetworkState now.
Test: atest TetheringCoverageTests
Change-Id: Ibc1f68131410b7cec379ab4e310b90ad85f25d31
The test assume the first tethering upstream would be test network. But
if there are mutiple networks available, this is a wrong assumption
because of race condtion. If tethering choose upstream while wifi or
celluar is available but test network may not available for tethering yet
(it depend on the NetworkCallback from ConnenectivityService), the first
upstream may not be the test network.
Bug: 215224286
Test: atest EthernetTetheringTest
Change-Id: Idfa972008643f1fb5119179383b06e2c8f65c667
Parse the dumpsys output strings to check that the IPv4 UDP
forwarding rule is added by the UDP conntrack event on
the tethering interface.
Test: atest EthernetTetheringTest
Change-Id: I2f04af72e51ca6b7a37ba51daa4f5125cb11144c
The allowlist will now be in the apex instead.
Test: boots && check permissions.xml is bundled
Bug: 190375768
Change-Id: Ia7434cba54d2b51479e52323f22c7f454499991d