Commit Graph

3043 Commits

Author SHA1 Message Date
Mark Chien
1f86f34466 Merge "Don't run EthernetTetheringTest if Ethernet is not supported" am: df41b36fc9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2646401

Change-Id: I3ce36cee0cd7ff869c865966238dd588dfbd51cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-04 09:21:38 +00:00
Mark Chien
df41b36fc9 Merge "Don't run EthernetTetheringTest if Ethernet is not supported" 2023-07-04 09:12:34 +00:00
Mark
dc581e6c8f Don't run EthernetTetheringTest if Ethernet is not supported
Bug: 288844185
Test: atest CtsTetheringTest
Change-Id: Ie918a0657ab17900437918f7ae99f7aa2539052c
2023-07-03 09:25:18 +00:00
Mark Chien
8f6265f0fd Merge "EthernetTetheringTest: test RFC 7050 prefix64 discovery" am: 7376fe0714
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2435314

Change-Id: Ib7d8ad65d865d9fecdd86bd92442dbdae2da4d4c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 08:40:02 +00:00
Hungming Chen
05ecb5c19e EthernetTetheringTest: test RFC 7050 prefix64 discovery
Reply ipv4only.arpa AAAA query with Pref64::WKA for applying test
prefix64 to LinkProperties of test network.
See Nat464Xlat#setNat64PrefixFromDns.

Currently, the test prefix64 is applied directly in test network
initialization. In order to increase the NAT64 test coverage,
the integration test starts to reply prefix64 discovery DNS query
for testing the RFC 7050 prefix discovery.

These clat related tests are still expected to pass since this
prefix64 source change:
- testTetherClatIcmp
- testTetherClatUdp
- testTetherClatTcp

Bug: 259888307
Test: atest EthernetTetheringTest
Change-Id: Ic94ce997dd0b1d718a1074850c01ea90298cc1c3
2023-06-26 15:51:25 +00:00
Mark Chien
03e5787619 Merge "Move buildXXXPacket methods into TetheringTester" am: 5cebcf7d64
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2616793

Change-Id: I3c485a14f75ac217996a35c3d2c5afc53810d1c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-26 02:46:20 +00:00
Mark Chien
5cebcf7d64 Merge "Move buildXXXPacket methods into TetheringTester" 2023-06-26 02:16:20 +00:00
Mark
4845823f48 Move buildXXXPacket methods into TetheringTester
Move all EthernetTetheringTest buildXXXPacket util into TetheringTester
and make them static public.

Bug: 259888307
Test: atest EthernetTetheringTest
Change-Id: Ice5252c1adfdb98dfaf815f48ac4603711317f65
2023-06-22 07:12:49 +00:00
Mark Chien
1cae54c574 Merge "Tethering: ignore duplicate upstream changed event" am: c2e434bbc7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2390555

Change-Id: I11393382d6f7940e6959f289bdaae77161fb3d9d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-19 15:42:09 +00:00
Mark Chien
c2e434bbc7 Merge "Tethering: ignore duplicate upstream changed event" 2023-06-19 15:03:48 +00:00
Hungming Chen
fc52868213 Tethering: ignore duplicate upstream changed event
Different network objects with the same network ID should be
treated as the same network.

chooseUpstreamType compares the current upstream and new upstream
by object (comparison operator) instead of network id
(Network#equals). This implies that different objects with the
same network id still trigger upstream changed report.

Since this commit, reportUpstreamChanged is only called when upsteam
has really changed (connected, switched or disconnected) in
chooseUpstreamType. In previous code, reportUpstreamChanged is also
called if EVENT_ON_CAPABILITIES is called when the upstream is the
same but its capabilities changed.

The NotificationUpdater#onUpstreamCapabilitiesChanged method only
needs to be called by chooseUpstreamType when it chooses a new
upstream. If the upstream remains the same but its capabilities
change, the EVENT_ON_CAPABILITIES will call
onUpstreamCapabilitiesChanged.

Bug: 243516306
Test: atest TetheringTest
Change-Id: I009383a61a5fabd249ba78fcffd524a5bbe4602e
2023-06-19 06:51:03 +00:00
Mark Chien
824bbf3e5d Merge "Add testIpv4AddressForSapAndLohsConcurrency test case" am: f4ef96c62f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2561990

Change-Id: Iff92c6596f90d8ca3733fbf14834a882dd165ed5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-17 10:16:41 +00:00
Mark
cb1fe1a622 Add testIpv4AddressForSapAndLohsConcurrency test case
A test to verify that SAP and LOHS can use different IPv4
addresses if they are both enabled.

Bug: 233175023
Test: atest TetheringTest
Change-Id: I40f0f35221a76e6593cc8d04e9f2b25df8c27c87
2023-06-17 04:04:14 +00:00
Mark Chien
1b66c3b1f3 Merge "Add testConnectedClientsForSapAndLohsConcurrency test case" am: c23fb4f1ea
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2561930

Change-Id: Ie22f4a1e1a23c1654c0b26e76e8798733cb6f8b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 17:40:02 +00:00
Mark
639866b45a Add testConnectedClientsForSapAndLohsConcurrency test case
A test to confirm that connected clients are updated when SAP
and LOHS are enabled simultaneously.

Bug: 233175023
Test: atest TetheringTest
Change-Id: I920f02e5b2ad137af529776141d51b6c83b8ea5b
2023-06-16 09:09:10 +00:00
Bill Yi
5fba518a42 Merge "Import translations. DO NOT MERGE ANYWHERE" 2023-06-08 03:11:48 +00:00
Xiao Ma
0bb54e8354 Merge "Add NetworkStackModuleTest annotation on the specific test case." am: 1eb19caf40
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2609074

Change-Id: I3b3194123a459ed69366e6f9377f0c9c373ae51d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-05 02:18:00 +00:00
Bill Yi
8fadf1e7d3 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I648bb906f2fd3452518358a93c590807a11d21e0
2023-06-04 15:21:23 -07:00
Xiao Ma
161b70c587 Add NetworkStackModuleTest annotation on the specific test case.
EthernetTetheringTest#testTetherZeroLengthDhcpPacket requires the latest
NetworkStack module, otherwise, the test will fail due to the loss of
the fix. Apply @NetworkStackModuleTest to exclude this testcase from
target test suite CtsTetheringTestLatestSdk.

Bug: 283200648
Test: atest CtsTetheringTestLatestSdk
Change-Id: Iebfb043e2b71427a6feaf90788fe79b6ab6b678d
2023-06-01 18:16:24 +09:00
Anton Hansson
1397a101ac Use new soong support to install privapp xml
This allows better overriding of it in the variants of this apex
that have a different package name.

Bug: 242509786
Test: build google tethering, diff before & after
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:91442c93fb8d7f67bf90faab0552428ff07f0452)
Merged-In: I84c53458686f70408ec759df854f5fcdee9cdaed
Change-Id: I84c53458686f70408ec759df854f5fcdee9cdaed
2023-05-29 17:15:52 +00:00
Anton Hansson
31c3bb58fa Use new soong support to install privapp xml
This allows better overriding of it in the variants of this apex
that have a different package name.

Bug: 242509786
Test: build google tethering, diff before & after
Change-Id: I84c53458686f70408ec759df854f5fcdee9cdaed
2023-05-29 14:45:52 +00:00
Anton Hansson
1386e0adab Merge "Stop Tethering requiring NetworkStack" am: 92c28d43a1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2606726

Change-Id: If54a275ccb755101db9ca6086361a8b349ee0b23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-29 14:01:55 +00:00
Anton Hansson
92c28d43a1 Merge "Stop Tethering requiring NetworkStack" 2023-05-29 13:24:39 +00:00
Anton Hansson
1525118302 Stop Tethering requiring NetworkStack
It leads to complexity when Tethering is overridden, because the
required attribute must be duplicated for all the variants.

Require NetworkStack be explicitly installed instead.

Bug: 242509786
Test: m
Change-Id: Ideaecf88418901e2c86271166be24f6b7e498a20
2023-05-29 10:08:08 +00:00
Mark Chien
cac9dfc474 Merge changes I46a4b3ee,I01b0a6ab am: 3045fe697b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2489359

Change-Id: Ibdaf026a4e6e7adef441a420521588bf714e7dd8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 16:28:50 +00:00
Mark
49649c9aea Support SAP and LOHS enabled at the same time
Use type + scope as key to build cached address map so that
SAP (key: TETHERING_WIFI + INTERNET) and LOHS
(key: TETHERING_WIFI + LOCAL) can use different address.

Bug: 233175023
Test: atest TetheringTests
Change-Id: I46a4b3ee919628092b7540202a43d79f407b09b6
2023-05-25 08:31:33 +00:00
Mark
ae3abdfa4b Allow SAP and LOHS wifi clients exist at the same time
This change store localOnly wifi clients in its own field so that
tethered and localOnly hotspot clients can exist at the same time.

Currently, there are no tethered and localOnly hotspot clients at
the same time because PrivateAddressCoordinator does not support
SAP + LOHS. A follow-up change will be made to allow this.

When both SAP and LOHS are enabled, the SAP and LOHS clients from
TetheringEventCallback#onClientsChanged are all TETHERING_WIFI.
Currently, there is no way for the listeners to distinguish between
SAP and LOHS clients.

Bug: 233175023
Test: atest TetheringTests
Change-Id: I01b0a6abb084f7135f7825e0c5303e49c16a4c39
2023-05-25 08:31:06 +00:00
Mark
3465af508e Add mDesiredServingState field in BaseServingState am: 3ec851ef03
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2597611

Change-Id: Ieab6191366b9f285d63ad38f3c2d9fc6ec6ae1c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 03:25:31 +00:00
Mark
3ec851ef03 Add mDesiredServingState field in BaseServingState
As the suggestion from:
https://android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/2489359/9/Tethering/src/android/net/ip/IpServer.java#b1176

Make BaseServingState an abstract class to prevent it from being used
directly. Additionally, move the handleNewPrefixRequest method into
BaseServingState because it is the only class that uses it.
To avoid TetheredState and LocalHotspotState from having to implement
their own enter function, add the mDesiredInterfaceState field to
BaseServingState.

Bug: 233175023
Test: atest TetheringTests
Change-Id: I03269c37e666345efb0c61039a2bb213f223a5a2
2023-05-24 17:00:41 +00:00
Mark Chien
b16017a2ba Merge "Add verifyHotspotClientUpdate helper function" am: adc6ab5c45
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2546510

Change-Id: I9b90a1dd99a70c859e6d38ccde0afbffb3e38b2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 07:20:29 +00:00
Mark Chien
adc6ab5c45 Merge "Add verifyHotspotClientUpdate helper function" 2023-05-18 05:57:39 +00:00
Treehugger Robot
a7c4d2b79e Merge "Import translations. DO NOT MERGE ANYWHERE" into udc-mainline-prod 2023-05-17 17:18:30 +00:00
Mark Chien
fcafa571e4 Merge "Fix entitlement recheck fail in U" am: 65a73dbf78
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2584338

Change-Id: I95800285efd60e7e42d5cb4d2cbece8e2ba054c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 06:46:44 +00:00
Mark Chien
65a73dbf78 Merge "Fix entitlement recheck fail in U" 2023-05-17 05:54:39 +00:00
Xiao Ma
25421709d7 Merge "Update the integration test to verify zero-length DHCP packet." am: 5a44770232
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2554931

Change-Id: Iae59ec5cb8f27942ac637f4c72bc47f430976a0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 02:05:16 +00:00
Xiao Ma
5a44770232 Merge "Update the integration test to verify zero-length DHCP packet." 2023-05-17 01:12:52 +00:00
Bill Yi
53482b2232 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: If701b699dc2b3031d418b282b64ba5287da314c5
2023-05-16 16:51:49 -07:00
Treehugger Robot
21e7d0fa6b Merge "remove out-of-process flag" am: ad5ee4b578
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2590185

Change-Id: I5387736f5d258a4500aaf395f456c9acc4902431
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 21:46:46 +00:00
Mark
e86fb5ef56 Fix entitlement recheck fail in U
Starting with U, only explicit intents will be allowed to
launch non-exported internal components. Set package name
to entitlement recheck intent so that the intent could be
delivered to tethering itself successfully.

Bug: 278482046
Test: atest TetheringTests
      manual verify entitlement recheck work in U
Change-Id: Ife30eee13fe39509ccb5786d2a76fbb7baa022a8
2023-05-16 07:59:32 +00:00
Maciej Żenczykowski
2da7535246 remove out-of-process flag
The logic dealing with in vs out-of-process tethering flags
was added in aosp/master once it was already not merging to tm-dev,
thus ending up only in udc-dev, it was later removed in aosp/master,
and then cherrypicked to udc-dev.

As such there is no shipping version of the bpfloader
(besides early U developer previews and betas)
with this requirement.

This will make September+ releases of the tethering apex incompatible
with U developer previews and betas 1 and 2.

(ie. any U build not including https://googleplex-android-review.git.corp.google.com/c/platform/system/bpf/+/23214402
which was merged into udc-dev on May 14th @ 18:00)

This change has a dependency on
https://googleplex-android-review.git.corp.google.com/c/platform/vendor/google/modules/TetheringGoogle/+/23243439

Test: TreeHugger
Bug: 279942846
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I52d0ea706a8e2cb5c37874ed54f199035c14966c
2023-05-15 19:29:20 +00:00
Maciej Żenczykowski
1aff5199fb remove inprocess tethering am: 024cbc3418
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2587329

Change-Id: I471243dbc8e0a05ee97b621974d9669066ec006f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 17:16:33 +00:00
Xiao Ma
d5020111ce Update the integration test to verify zero-length DHCP packet.
DHCP packet listener doesn't close socket any more upon receiving a
zero-length DHCP packet with a fix, instead, just ignore the zero-length
packet and continue reading. Also update the integration test logic to
verify the new behavior, i.e. we can send DHCPDISCOVER from a second device
with different mac address to verify the upstream DHCP server doesn't close
the listening socket, and then we will receive the response from server e.g.
DHCPOFFER packet.

Bug: 269692093
Test: atest TetheringIntegrationTests
Change-Id: I183da43ce5a6511714d293318fe6c60ea55999c0
2023-05-15 13:27:16 +00:00
Maciej Żenczykowski
024cbc3418 remove inprocess tethering
(unused leftover cruft)

Test: TreeHugger
Bug: 279942846
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia66e4795a4544330aaf499fff8defb07248f5edd
2023-05-13 22:13:44 +00:00
Patrick Rohr
8ed50ac94f Merge changes from topic "delete-cronet-disabled-support" am: f128ba3461
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2585017

Change-Id: I279564943ffe7fb956b00cb2a25acdcab8a20cf3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 23:20:46 +00:00
Patrick Rohr
46c2f0abfb cronet: delete option to disable cronet in tm-mainline-prod am: 2e3e2955b8
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2585016

Change-Id: I0f233d837cd3332916f42325716ae5df89304a08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 23:20:43 +00:00
Patrick Rohr
f128ba3461 Merge changes from topic "delete-cronet-disabled-support"
* changes:
  cronet: Move cronet defaults to framework/Android.bp
  cronet: delete option to disable cronet in tm-mainline-prod
2023-05-12 22:37:29 +00:00
Patrick Rohr
2e3e2955b8 cronet: delete option to disable cronet in tm-mainline-prod
With the release cut of the July train and the recent automerger
cutover, tm-mainline-prod is now officially an abandoned branch.

This change deletes (most) infrastructure that was put in place to
disable cronet on tm-mainline-prod.

Test: builds
Change-Id: I078f2114b736a634f08d8f704c19beb2224ef645
2023-05-12 10:15:01 -07:00
Patrick Rohr
740b1d4ac3 cronet: Move cronet defaults to framework/Android.bp
Since cronet has moved out of the tethering jar.

Test: TH
Change-Id: Ibf476c0afd72863b26188dae6838825e6762976a
2023-05-12 10:15:01 -07:00
Bill Yi
f36add4c8f Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: If51142dee1460c6ef6ddd7213dcd0dc606199fa2
2023-05-09 23:36:55 -07:00
Maciej Żenczykowski
c5033b0190 Merge "remove inprocess tethering" am: e95ec4afa7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2565793

Change-Id: I4bcce0a03ff3f22a6b5d4439d21cdbaf12b968bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-05 21:22:38 +00:00