Commit graph

4,005 commits

Message SHA1
Merge "Make structs in StructTest accessible from Struct" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2023-08-29 10:44:51 +00:00
fefde209df
Make structs in StructTest accessible from Struct
After link Struct statically into framework-connectivity,
the structs in StructTest are no longer accessible from Struct
because Struct is loaded by bootclasspath classloader.
Make classes and members public for accessing from Struct.

Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.net.module.util.StructTest
Bug: 297836825
Change-Id: I3b1f466f10247306c84d6cac0d7402353770fac4

Junyu Lai   commited 2023-08-29 10:33:38 +08:00
e2eff036ed
Merge "Move ArpPacket.java to frameworks/libs/net" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2023-08-24 07:12:27 +00:00
62a016e514
Merge "Add libnetd_utils_headers cc_library_headers" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-08-24 06:39:11 +00:00
2330eae94d
Move ArpPacket.java to frameworks/libs/net
Bug: 281639507
Test: TH
Change-Id: Ic0d273695d3f0f85a0ec56337a9d12d77b60ea3b

Yuyang Huang   commited 2023-08-24 12:48:02 +09:00
6acc55e129
Add class to help Kotlin to pass nullable to java @NonNull for testing
Follow up CL for aosp/2700076

Bug: 296972712
Test: build with aosp/2688146
Change-Id: Ib582ef41f34baf0bb896e32d681843358f928c87

Motomu Utsumi   commited 2023-08-23 13:01:29 +09:00
7bca2922b8
Add libnetd_utils_headers cc_library_headers
There is a module that specifies libnetdutils/include from include_dirs
which is not recommended.
Using the cc_library_headers makes it easy to move
frameworks/libs/net to packages/modules/Connectivity.

Bug: 296014682
Test: m

Change-Id: Ia52ede9787009102ebf626fcb3b337511b0a809f

Motomu Utsumi   commited 2023-08-22 19:16:12 +09:00
68cd731381
Merge "BpfMap.h - hide getMap()" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-08-22 00:32:09 +00:00
1ef814da95
BpfMap.h - hide getMap()
This leaks (what should be) an internal only fd.

There's still multiple uses of getMap() left in:
  common/native/bpf_headers/BpfMapTest.cpp

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I87a36f3f935ba9148ae4456fc6bf14b0e04f6038

Maciej Żenczykowski   commited 2023-08-21 19:53:04 +00:00
12c0ea929c
Merge "Fix kotlin nullable errors in net-test-utils and NetworkStaticLibTests" into main
Colin Cross   authored and   Gerrit Code Review   commited 2023-08-21 19:04:15 +00:00
1d1c0e7282
Merge "BpfMap.h - add 3 using statements" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-08-21 17:20:17 +00:00
ef136ebfa1
Merge "BpfMap.java - remove getNextRawKey()" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-08-21 17:15:32 +00:00
82ae7ff289
Merge "BpfMap.java - remove getRawValue()" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-08-21 17:15:14 +00:00
4ed5e9e497
Merge "BpfMap - slightly simplify isEmpty()" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-08-21 17:14:55 +00:00
2bb8c5cd27
Merge "Rename to isTetheringFeatureEnabled" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-08-21 03:17:38 +00:00
656c77f4f0
Merge "Address review comments in aosp/2677976" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2023-08-21 02:34:01 +00:00
bdbcc0cc30
BpfMap.h - add 3 using statements
in particular base::Result is needlessly verbose

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ide0de9acec79b9aeeaff7ec92270304907bd10d4

Maciej Żenczykowski   commited 2023-08-20 23:33:46 +00:00
eb1eb69f86
BpfMap.java - remove getRawValue()
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6903a29773ee4782c0f2ae64561e1c0fdcba618f

Maciej Żenczykowski   commited 2023-08-20 14:05:43 +00:00
b6a23b1504
BpfMap.java - remove getNextRawKey()
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ida62d346c1d6df800b5d45b67de60e945ac2b4c8

Maciej Żenczykowski   commited 2023-08-20 13:01:13 +00:00
2c87b82603
BpfMap - slightly simplify isEmpty()
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9b93224ec2d4ff717d5e39c3ad50e63ac73f5f7c

Maciej Żenczykowski   commited 2023-08-20 12:03:26 +00:00
910cf4da9b
Merge "Improve test logs using TrackRecord backtrace" into main
Patrick Rohr   authored and   Gerrit Code Review   commited 2023-08-18 22:32:51 +00:00
10fe61b520
Improve test logs using TrackRecord backtrace
eventuallyExpect methods should print the received callbacks since
poll() was called for better debugging.

Test: atest EthernetManagerTest
Change-Id: Ia08abf2436b050a7e319b9f70694ce3d132b4fc3

Patrick Rohr   commited 2023-08-18 09:35:13 -07:00
5bf2947997
Merge "TrackRecord: add a method to return callbacks since last poll" into main
Patrick Rohr   authored and   Gerrit Code Review   commited 2023-08-18 14:10:21 +00:00
0622dafd75
Address review comments in aosp/2677976
This commit address the follow-up review comments
in aosp/2677976.

Fix: 296150560
Test: atest FrameworksNetTests NetworkStaticLibTests
Change-Id: I0ff4cef8585e2ae496447c4d37e072c1de281775

chiachangwang   authored and   Chiachang Wang   commited 2023-08-18 08:13:27 +00:00
3b64739d81
Rename to isTetheringFeatureEnabled
DeviceConfigUtils has isFeatureEnabled for NetworkStack and Tethering
which were confusing since the difference was only the arguments.
This CL renames isFeatureEnabled for Tethering module to
isTetheringFeatureEnabled to avoid confusion.

Bug: 279108992
Test: m
Change-Id: I16e8e4f6c0080d73533ce8bd36adfa7038347500

Motomu Utsumi   commited 2023-08-17 19:00:22 +09:00
c046ac418e
Merge "UpsideDownCake is now 34" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-08-17 06:18:22 +00:00
27d5411011
Merge "Rename to isTetheringFeatureNotChickenedOut" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-08-17 06:12:36 +00:00
396605364c
Baseline NewApi issues
NewApi was recently updated to support linting methods in
the system, module_lib, and system_server sdks, and was
demoted to a warning due to the new issues it finds.
Baseline all the new issues that NewApi can be made an error
again.

These cls were generated automatically by a script that
copied the NewApi issues from the reference baselines.

Bug: 268261262
Test: m lint-check
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b6d6bf359ca53d41a08b7e2af86f7a080e2b5741)
Merged-In: I31beadf91173116b9750fe6f132a4f979a2e0d9a
Change-Id: I31beadf91173116b9750fe6f132a4f979a2e0d9a

Cole Faust   authored and   Android Build Cherrypicker Worker   commited 2023-08-17 04:42:53 +00:00
de112b6109
UpsideDownCake is now 34
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8bc31011a242dddb401273b5b6505b49b649ae67)
Merged-In: Ic36cad45118f0220e44279a8b6ac89d22c3319d3
Change-Id: Ic36cad45118f0220e44279a8b6ac89d22c3319d3

Alex Buynytskyy   authored and   Android Build Cherrypicker Worker   commited 2023-08-17 04:07:50 +00:00
57bd2e41e9
Rename to isTetheringFeatureNotChickenedOut
Expected use case of isTetheringFeatureForceDisabled was
`enabled = !isTetheringFeatureForceDisabled`, which is error prune.
So this CL renames to isTetheringFeatureNotChickenedOut and updates to
return true if the feature is not disabled.
If the feature is enabled by default and disabled by flag push (kill
switch), isTetheringFeatureNotChickenedOut should be used.

Bug: 279108992
Test: m
Change-Id: I5f85c24032bae298831bbf042874a63ea2c9b75f

Motomu Utsumi   commited 2023-08-17 02:18:22 +00:00
aad6281844
Merge "Fix DevSdkIgnoreRule for Q-" into main
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2023-08-14 03:15:37 +00:00
f3bd5e5a0a
Fix DevSdkIgnoreRule for Q-
UnboundedSdkLevel stopped working on Q as it now depends on Set.of,
which is an R+ API. Arguably this should be fixed as its minSdk is still
29, but long-term UnboundedSdkLevel may drop Q support as modules now
only need to support R+.

Avoid using UnboundedSdkLevel on Q- in DevSdkIgnoreRule: this avoids the
above problem, and also makes it compatible with even older builds,
which may happen in GTS.

Bug: 292868272
Test: all tests using this rule
Change-Id: I5e1559d841398a6c6763283f32c9f766a3661e21

Remi NGUYEN VAN   commited 2023-08-10 16:24:48 +09:00
a6e8a281a4
TrackRecord: add a method to return callbacks since last poll
This change adds a backtrace() method which returns a list of events
that were received since the last time a user called poll() on a
ReadHead. This is particularly useful for logging observed events while
a poll was in progress that did not end up matching an event.

Test: atest EthernetManagerTest
Change-Id: If019cf9eb5e3e9268c5e6b74edbd8f49959cc71c

Patrick Rohr   commited 2023-08-09 05:26:36 -07:00
533af6d72d
Move RFC7421_PREFIX_LENGTH from NetworkConstants to NetworkStackConstants.
NetworkStack module imports RFC7421_PREFIX_LENGTH constant from
filegroup services-connectivity-shared-srcs, to get rid of this
dependency, move the constants to NetworkStackConstants.

Bug: 290885904
Test: TH
Change-Id: I0e8f068856c8843121273e0b598097d82b8465d5

Xiao Ma   commited 2023-08-09 18:08:10 +09:00
a95710dd60
Fix kotlin nullable errors in net-test-utils and NetworkStaticLibTests
Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

Bug: 294110802
Test: builds
Change-Id: I2a2c91188b64619fca190a9bd7812d32f9610abd

Colin Cross   commited 2023-08-08 14:26:10 -07:00
d91c89ba51
Merge "Add constants for clat and v6 fragmentation" into main
Jean Chalard   authored and   Gerrit Code Review   commited 2023-08-07 05:21:57 +00:00
d51371bc8b
Add helpers method to SharedLog
Bug: 294326360
Test: atest FrameworksNetTests
Change-Id: Ib8ba3e9a556a70de28813465396c6609b7c22333

Yuyang Huang   commited 2023-08-06 17:34:58 +09:00
783d4fb4f6
Merge "Add isFeatureSupported and isTetheringFeatureForceDisabled methods" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2023-08-03 06:58:28 +00:00
cc5c2a648a
Merge "Add resolvePkgPrefix() method" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2023-08-03 06:58:20 +00:00
f870ae3120
Add isFeatureSupported and isTetheringFeatureForceDisabled methods
Add isFeatureSupported helper method to check whether
a specific feature is supported. This is useful when a specific
module version is required on a cross module feature, e.g.
a connectivity feauture requires to work with a older
networkstack module.

This commit also adds isTetheringFeatureForceDisabled() method
as a method that refers to DeviceConfig which can be controlled
to explicitly disabled.

Bug: 291870956
Test: atest FrameworksNetTests NetworkStaticLibTests
Change-Id: I511d00663e2378c36b4ca017db4b88d88f650852

chiachangwang   commited 2023-08-02 13:12:14 +00:00
1637730010
Merge "Use requestNetwork for mobile data, not a callback" into main
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2023-08-02 07:09:04 +00:00
547c94d171
Merge "Add DomainsUtils class to encode/decode domain names." into main
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2023-08-02 00:58:40 +00:00
fa33ba6f3d
Use requestNetwork for mobile data, not a callback
On devices that do not have always active mobile data, it needs
to be requested for onAvailable to be called.

Change-Id: Ic814684bcd06389c013a6e6636487d9b47627901
Test: TH

Remi NGUYEN VAN   commited 2023-08-01 08:48:32 +00:00
837837e0fe
Merge "Add Ipv6PktInfo (in6_pktinfo) struct." into main
Xiao Ma   authored and   Gerrit Code Review   commited 2023-08-01 05:46:23 +00:00
d0d7f2aa3c
Add resolvePkgPrefix() method
This is a no-op refactor change to create resolvePkgPrefix()
helper method to prevent code duplication for the follow up
commit.

Bug: 291870956
Test: atest NetworkStaticLibTests
Change-Id: I8deea97acdb793dfa076ce55f7f2c3eb0b224461

chiachangwang   commited 2023-07-31 14:01:24 +00:00
9835a4eae0
Merge "Make SkipPresubmit annotation visible by HostsideVpnTests" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2023-07-28 02:06:17 +00:00
3416eae310
Merge "Remove truth lib denpendency temporarily due to code coverage regression." into main
Patrick Rohr   authored and   Gerrit Code Review   commited 2023-07-27 16:27:00 +00:00
ea6b69dcec
Add Ipv6PktInfo (in6_pktinfo) struct.
in6_pktinfo structure specifies the source IPv6 address and interface
for an outgoing packet(used with UDP or RAW socket), we can specify the
IPV6_PKTINFO ancillary data on sendmsg() with this structure to set the
source address (e.g. a global IPv6 address).

Bug: 293393743
Test: TH
Change-Id: I2bd8ea6fcdb7398db9b3a54243c81ca27e832e45

Xiao Ma   commited 2023-07-27 15:17:24 +09:00
80dbd06f64
Remove truth lib denpendency temporarily due to code coverage regression.
Bug: 291341416
Test: atest NetworkStaticLibTests
Change-Id: Id8fac2ff76dab174761fbc48d0599bcce81918ed

Xiao Ma   commited 2023-07-27 12:12:41 +09:00
9e9bc97317
Merge "Add an annotation for @SkipMainlinePresubmit" into main
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2023-07-27 02:13:22 +00:00
7035b4418d