Commit graph

111,665 commits

Message SHA1
Don't perform entitlement checks on invalid subscription IDs
Bug: 414252282
Test: TH
Flag: EXEMPT bugfix
Change-Id: I9bd208cf9e59bcfad03108c85dd7bfeb10aeff56

Chalard Jean   authored and   Yuyang Huang   commited 2025-07-22 12:27:16 +09:00
bf34d61b8d
Merge "Use Log.e for procfs file read errors" into main
Jimi Chen   authored and   Android (Google) Code Review   commited 2025-07-18 01:09:45 -07:00
4e4f2e6da6
Use Log.e for procfs file read errors
Log.wtf implies a catastrophic, unrecoverable failure. Failures to read
procfs files (e.g., due to permissions or non-existence) are better
represented by Log.e as they are often recoverable or expected under
certain conditions, and not always indicative of a fatal application state.

Flag: EXEMPT mainline
Bug: 429012888
Test: TH
Change-Id: I717d46d4c3802ac478e80d2a9dd28c79a9ebc5f7

Jimi Chen   commited 2025-07-18 06:11:15 +00:00
83298a7b5d
Merge "Add beta flag for lnp developer opt in" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-07-17 16:32:04 -07:00
0f7a594c0d
Merge "Use beta flag for bluetoothTetheringRandomizedAddress" into main
Motomu Utsumi   authored and   Android (Google) Code Review   commited 2025-07-17 15:35:10 -07:00
5286486f3b
Add beta flag for lnp developer opt in
Bug: 369821572
Test: m
Flag: com.android.tethering.mainline.beta.lnp_developer_opt_in
Change-Id: I99884977a82f9a5a4c530edd6d3474dfeb2a3a52

Hao Liu   commited 2025-07-17 21:37:37 +00:00
ece0d94d7f
Use beta flag for bluetoothTetheringRandomizedAddress
Bug: 287177081
Test: TH
Flag: com.android.tethering.mainline.beta.bluetooth_tethering_randomized_address
Change-Id: I1de9f4bb15c8423f09381a0c7513f0d7ebf80856

Motomu Utsumi   authored and   Hao Liu   commited 2025-07-17 21:30:07 +00:00
4b4f3018a5
Fix permissions in RestoreEthernetRule
The previous runAsShell calls adopted permissions spuriously. This
change fixes runAsShell to consistently adopt the correct permission
for the respective API call.

Also calls setEthernetEnabled() no matter what the current state is at
the end of the test (as there is no harm in doing so).

Test: TH
Flag: EXEMPT mainline
Change-Id: Ib11b889148213b160567cf0a3b9ea72b5b0c851e

Patrick Rohr   commited 2025-07-17 13:54:12 -07:00
ac29211362
Reapply "Fix EthernetManagerTest"
This reverts commit f28878b120.

Reason for revert: The original change was incompatible with
ag/34622357. Reapplying the fixed CL.

Bug: 432497516
Change-Id: I1b19b3336a4c938ef1adbd12c50a11903d373194

Patrick Rohr   commited 2025-07-17 11:32:44 -07:00
bdee78a22e
Revert "Fix EthernetManagerTest"
This reverts commit e9dcc62d2d.

Reason for revert:  DroidMonitor: reverting due to http://b/432497516. I will verify through ABTD before revert submission. 

https://buganizer.corp.google.com/issues/432497516#comment6

Bug: 432497516
Change-Id: I4773c0493137367cb0d4167eab535e0d827956ee

Liana Kazanova (xWF)   commited 2025-07-17 11:22:23 -07:00
f28878b120
Merge changes I6fb98e87,I3f61b474 into main
* changes:
  Delete unused TestInterfaceStateListener
  Reset EthernetManagerTest to reintroduce InterfaceStateListener

Patrick Rohr   authored and   Android (Google) Code Review   commited 2025-07-17 09:33:42 -07:00
7134b8ca22
NetBpfLoad: templatize readSectionByName
This is a cherry-pick of ag/34620710 to NetBpfLoad

Test: TH
Flag: EXEMPT no-op
Bug: 428792764
Change-Id: I651d7661e0a1a4dd4aa23a116ee2e211a31505f0

Motomu Utsumi   commited 2025-07-17 08:51:27 -07:00
99a7b7388e
NetBpfLoad: Refactor map/prog data copying to use a single memcpy
This is a no-op because the data in the ".android_maps"/"progs" section
is an array of struct bpf_map_def/bpf_prog_def.

Test: TH
Flag: EXEMPT no-op
Bug: 428792764
Change-Id: I80bd8c72c68b5359cf1b16ed5d4739a854169d7f

Motomu Utsumi   commited 2025-07-17 08:50:51 -07:00
8073ad8606
NetBpfLoad: less copies
This is a cherry-pick of ag/34620709 to NetBpfLoad

Test: TH
Flag: EXEMPT no-op
Bug: 428792764
Change-Id: Ia5aaa30cab71a2051b6c787824798958f2dee3f5

Motomu Utsumi   commited 2025-07-17 08:49:51 -07:00
1ae10a006e
Fix EthernetManagerTest
This patch fixes EthernetManagerTest as follows:
(1) testEnableDisableInterface_disableEnableEthernet
    Fix the test error when USB interface is present and treated as
    ethernet interfaces.
(2) testRemoveInterface_disableEnableEthernet
    Fix the error When tethering interface already presents.

Bug: 427055553
Test: atest ConnectivityCoverageTests
Flag: EXEMPT mainline

Change-Id: I2a31f3f0434b35e9ebe96b4f7003e5a9be0d3e81

Chuwei He   commited 2025-07-17 14:50:26 +09:00
e9dcc62d2d
Delete unused TestInterfaceStateListener
Test: TH
Flag: EXEMPT mainline
Change-Id: I6fb98e87ca1aa460aca6d08cbdd5ddcaaaee55de

Patrick Rohr   commited 2025-07-16 11:21:08 -07:00
3563cc1725
Reset EthernetManagerTest to reintroduce InterfaceStateListener
The previous changes to move EthernetStateListener and
InterfaceStateListener introduced 2 separate ArrayTrackRecords. This
test explicitly uses a single TrackRecord for both callbacks, so their
respective ordering can be tested.

This change resets EthernetManagerTest to the last known good state
(57fdd00cc7).

Test: TH
Flag: EXEMPT mainline
Change-Id: I3f61b474ff900ff44a366ed3ebd20f4d83f6bf7b

Patrick Rohr   commited 2025-07-16 11:21:08 -07:00
576677cc5e
Merge changes I332c8d43,I340bcb77 into main
* changes:
  Simplify APF IGMPv3 general query offload test
  refactor: Lazy load IP addresses for APF tests

Jimi Chen   authored and   Android (Google) Code Review   commited 2025-07-16 07:38:59 -07:00
5904ce1431
Simplify APF IGMPv3 general query offload test
Reduce the number of multicast addresses used in
`test_igmpv3_general_query_offload` to simplify the test case and
focus on the core functionality.

Flag: EXEMPT mainline
Bug: 419427388
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV6Test
Change-Id: I332c8d43bd89a444728ed7ebde3f4e064e4e39aa

Jimi Chen   commited 2025-07-16 04:31:44 +00:00
e42fb901b9
refactor: Lazy load IP addresses for APF tests
Previously, IPv4 and IPv6 addresses were retrieved in `ApfTestBase.setup_class`,
which meant all APF tests assumed the presence of both.

This change refactors `ApfTestBase` to introduce dedicated methods:
- `get_and_expect_ipv4_addresses_exist()`
- `get_and_expect_ipv6_addresses_exist()`

These methods now handle the retrieval and assertion of IP addresses.
Individual test cases in `ApfV6Test` are updated to call these methods
only when the respective address type is required for the specific test
scenario.

This improves test robustness by ensuring tests only depend on the
necessary IP addresses, allowing for more precise test setup and failure
reporting. Additionally, the doze mode activation is reordered to occur
after initial network setup.

Flag: EXEMPT mainline
Bug: 419427388
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV6Test
Change-Id: I340bcb77fe66cc9927dcd58e5899cdf9a4375daa

Jimi Chen   commited 2025-07-16 04:31:40 +00:00
419e088796
Merge "Ignore RtNetlinkMessage with null or empty interface names" into main
Chuwei He   authored and   Android (Google) Code Review   commited 2025-07-15 20:47:39 -07:00
27013988a7
Merge "Add metrics for QUIC connection close" into main
Motomu Utsumi   authored and   Android (Google) Code Review   commited 2025-07-15 20:32:42 -07:00
e5d4a0fca3
Merge "NetBpfLoad: don't print multiline log_buf on user builds" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-07-15 20:05:23 -07:00
0298e7f4b7
Merge "bpf: remove zero uid hack" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-07-15 20:05:22 -07:00
792f685d65
Merge changes I9114d27c,I8e8f62ed into main
* changes:
  bpf: rename 'maps' section to '.android_maps'
  NetBpfLoad: remove support for .o wide bpfloader_{min,max}_ver

Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-07-15 20:05:20 -07:00
ef77e34e39
Merge "bpf: remove size_of_bpf_{map,prog}_def" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-07-15 19:39:44 -07:00
0c01e5f0a8
Ignore RtNetlinkMessage with null or empty interface names
This patch checks if interface name is null or empty for
RtNetlinkMessage and ignores the message if it is.

Bug: 429497348
Test: build
Flag: EXEMPT bugfix
Change-Id: I6000f5442f341f152b7fbd235affded0fa56fe50

Chuwei He   commited 2025-07-15 18:43:07 -07:00
16c8fd1166
Merge "Disconnect a network if it's suspended for 5 minutes for wear" into main
Hongyi Zhang   authored and   Android (Google) Code Review   commited 2025-07-15 18:09:56 -07:00
29ae4e7b43
NetBpfLoad: don't print multiline log_buf on user builds
These tend to be huge (because they can contain the full bpf disassembly)
but not very worthwhile, because they often result in logs being rate
limitted, and thus we miss out on the useful information.

This is particularly true for user builds on non-Google devices
installing the production signed tethering apex mainline module.

We're better off seeing more of the other log lines...

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie25a60c2e602772ab0de2050e7964f0202ff2685

Maciej Żenczykowski   commited 2025-07-15 15:00:25 -07:00
f125992b27
bpf: remove zero uid hack
Not needed any more, since no more loader vs .o version skew.

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6c0b9ff2683809f3e732ec950bc91cf87040642f

Maciej Żenczykowski   commited 2025-07-15 14:46:10 -07:00
cb0433611e
bpf: rename 'maps' section to '.android_maps'
For libbpf compatibility we will want to have a 'normal' looking
.maps section & an android-only .android_maps section.

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9114d27c408cb084626ec1151826ae722797296f

Maciej Żenczykowski   commited 2025-07-15 14:43:49 -07:00
b27d2137d6
NetBpfLoad: remove support for .o wide bpfloader_{min,max}_ver
This is not needed, as this is now simply hard coded (along with the
.o names themselves) inside of NetBpfLoad.cpp itself - see loadAllObjects().

Even if it wasn't, we're better off using the per-map & per-program
limits instead.  These will already cause all maps/programs to be skipped...

(The only reason to have a global per .o one was to solve
.o vs loader version skew issues, which we can no longer have)

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8e8f62ed3534d54dd3382df53637f76bb72dab5e

Maciej Żenczykowski   commited 2025-07-15 14:40:11 -07:00
c4a1cae939
bpf: remove size_of_bpf_{map,prog}_def
No longer needed, since there is no longer any possibility of .o vs loader version skew.

'git grep size_of_bpf_' finds nothing

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iba7799b5670008dfceeebca10fa42c3f6bd3273e

Maciej Żenczykowski   commited 2025-07-15 14:28:59 -07:00
b345ffb23d
Merge changes Ie9ccb374,I3cf8ae1c,Ie8026c51 into main
* changes:
  bpf/progs/netd.h: use defines for some map SIZE constants
  bpf/progs/netd: remove DATA_SAVER_ENABLED_MAP_SIZE constant
  bpf/progs/netd: remove some constants

Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-07-15 13:57:05 -07:00
d3fb5d7137
Merge "bpf/progs/netd.h: remove obsolete comment" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-07-15 13:54:45 -07:00
d44038be18
Merge "Prepare to move VCN: Add visibilities for tests" into main
Yan Yan   authored and   Android (Google) Code Review   commited 2025-07-15 13:09:27 -07:00
a5b6808587
bpf/progs/netd.h: use defines for some map SIZE constants
This is better for libbpf...

Test: TreeHugger
Flag: EXEMPT mainline / comment only
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie9ccb37498b89e638fba1e48535d1108536080f1

Maciej Żenczykowski   commited 2025-07-15 12:24:16 -07:00
2175105039
bpf/progs/netd: remove DATA_SAVER_ENABLED_MAP_SIZE constant
(only needed by test, but this is really just a single boolean)

Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3cf8ae1ca474ccd3feba6d6346428a46c3020122

Maciej Żenczykowski   commited 2025-07-15 12:20:24 -07:00
00c01a6e8f
bpf/progs/netd: remove some constants
These aren't used anywhere else, furthermore switching to libbpf
would require these to become #define's.

Let's just hard code them instead.

Test: TreeHugger
Flag: EXEMPT mainline / comment only
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie8026c519e90800f59b5b7ad3826c7902243d5ac

Maciej Żenczykowski   commited 2025-07-15 12:20:16 -07:00
5bbc1d73f0
bpf/progs/netd.h: remove obsolete comment
We haven't done a good job of keeping this comment relevant...
might as well just delete it.

Test: N/A
Flag: EXEMPT mainline / comment only
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia822ce214cf3d35e10c71f0fe84280a354b1b8c0

Maciej Żenczykowski   commited 2025-07-15 12:15:18 -07:00
a5c7c58e0a
Merge "Prepare to move VCN: Define utility lib for framework VCN" into main
Yan Yan   authored and   Android (Google) Code Review   commited 2025-07-15 11:34:09 -07:00
1867ae1471
Disconnect a network if it's suspended for 5 minutes for wear
The suspension state is designed to be a transient state. Implement an
enforcement to disconnect the network after staying at this state for 5
minutes. This can avoid apps unnecessarily waking up the device for
network activities even when there's no network actually connected.

Test: unit tests. Locally tested with a signal blocking bag.
Bug: 404570281
Flag: EXEMPT mainline
Change-Id: I1427a72402f7ec64eda537a89c86768466a72328

Hongyi Zhang   commited 2025-07-15 09:39:37 -07:00
3dcb3c5890
Add metrics for QUIC connection close
Test: QuicConnectionCloserTest
Flag: EXEMPT mainline
Bug: 311792075
Change-Id: I2bd9108c1f8af89824bf48767fcca9a1e1d57831

Motomu Utsumi   commited 2025-07-15 17:10:56 +09:00
504fe27b86
Merge "Pass bluetoothUseRandomAddress via RoutingCoordinator constructor" into main
Motomu Utsumi   authored and   Android (Google) Code Review   commited 2025-07-14 22:47:19 -07:00
1cdb0a5609
Merge "Store filter replies info in ListenerInfo" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-07-14 21:40:13 -07:00
7525976e12
Merge "Search for the satellite opt-in flag in disabled services" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-07-14 20:41:48 -07:00
c5cda84789
Merge "Revert^2 "Fix onActiveDataSubscriptionIdChanged is not received in multi SIM mode"" into main
Jimi Chen   authored and   Android (Google) Code Review   commited 2025-07-14 20:15:39 -07:00
46115b3d07
Pass bluetoothUseRandomAddress via RoutingCoordinator constructor
This refactoring changes how the bluetoothUseRandomAddress flag is
accessed.

PrivateAddressCoordinator is in a library used by multiple mainline
modules(Tethering, NetworkStack, CaptivePortal, WiFi) and cannot
directly read a Tethering mainline beta flag.

To fix this, the flag's value is now passed down through constructors.

An alternative solution would be to split the Java library for each module,
but with this solution, a single utility class cannot be shared.

This commit is a no-op as the passed value is hardcoded to false.

Test: TH
Flag: EXEMPT refactor
Bug: 287177081
Change-Id: I5f2174ee94b55e7a7298b9742221d6e6c3c5cac5

Motomu Utsumi   commited 2025-07-15 11:20:01 +09:00
323d22a497
Merge "Remove wrong comment" into main
Yuyang Huang   authored and   Android (Google) Code Review   commited 2025-07-14 18:56:54 -07:00
4bf572734a
Merge "Ignore null or empty interface names in EthernetTracker." into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-07-14 18:36:27 -07:00
28e3c12b24