ConnectivityService would be centralized location for deciding local
network so for this effort adding isLocalRoute parameter to RouteInfoParcel
Bug: 394308861
Test: Manually tested.
Test: atest ConnectivityCoverageTests
Flag: EXEMPT Using device config kill-switch
Change-Id: I3ed34f96af1cbd7d8645a6c19e696a75525ce68a
RoutingCoordinatorService's {add,remove,update}Route methods
all end up calling netd's *RouteParcel methods.
Make callers explicitly generate and pass in the parcel to the
manager class instead of having them pass in a RouteInfo and
having the service class convert the RouteInfo to a parcel.
Also remove the {add,remove,update}Route methods from
RoutingCoordinatorManager since they are unused.
This is a no-op refactor that simplifies upcoming changes.
RoutingCoordinator is not a stable interface and is not used
across the platform/mainline boundary, so there are no version
skew considerations.
Bug: 394308861
Test: atest ConnectivityCoverageTests
Flag: EXEMPT no-op refactor
Change-Id: Iedf4c9bc28c3fc8c289db421857acddc8c694990
Lorenzo Colitticommited 2025-08-06 15:57:36 +09:00
The ByteOrder should be encoded by the field, not by the writeToBytes()
method. To fix this, a LegacyStruct is introduced which continues to
expose writeToBytes(ByteOrder) during the transition. This approach
helpfully creates a compile error when converting a Struct class back to
inheriting from Struct for all call sites of writeToBytes(ByteOrder).
Test: TH
Flag: EXEMPT mainline
Change-Id: I3b28c53ce3e884e59760744838b3518596de5c75
This is a preparation CL before moving VCN code from frameworks/base
to p/m/Connectivity/
This CL defines a utility lib so that the VCN framework code can
use HexDump. With HexDump, VCN will define another lib for the IPsec
module.
Bug: 379938062
Flag: EXEMPT; pure refactoring
Test: FrameworksIkeTests, CtsIkeTestCases
Change-Id: I9bc8b37779315841c2a93328942d073b6bf40808
Before moving VCN code, add the new code locations to the
"visibility" fields of Connectivity dependencies.
Bug: 379938062
Flag: EXEMPT; visibility changes
Test: presubmit
Change-Id: I904c601de2b17a9c0460eebde90622963f233567
Add socket destroying methods by address and permission to InetDiagMessage
to move that functions to ConnectivityService from Netd.
Bug: 373280981
Bug: 331139818
Flag: android.net.platform.flags.connectivity_service_destroy_socket
Test: atest NetworkStaticLibTests
Test: device test
Change-Id: I3c2136df5dfd618d1c757c07bce2b4211b807237
IPv4 addresses will be converted as v4-mapped-v6 address while
writting it to byte form. v4-mapped-v6 addresses in byte form will be
parsed to Inet4Address while converting it back.
Bug: 392509494
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.StructTest
Flag: EXEMPT refactor
Change-Id: Ia906d2cae7bb7402ff937da267c2552431b2d0f7
net-utils-device-common says:
This library shouldn't be used anymore (no class should be added), and
per-user libraries like net-utils-service-connectivity or
net-utils-framework-wifi should be used instead.
Therefore, this patch adds a new net-utils-networkstack.
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I8073ea019a9c306ce75424303e8a30bb39580b29
Because some APIs in RealtimeScheduler are higher than the min
SDK version for the standalone MDNS build, an abstract class is
required to allow the standalone MDNS build to pass.
Bug: 366373064
Test: atest FrameworksNetTests NsdManagerTest
m service-connectivity-mdns-standalone-build-test
Change-Id: I0b3ac7b4f8dfceeb3dd81e6a5f368b5d57927c41
Mockito extended tends to cause all kinds of issues due to the way it
injects itself into the bytecode of framework classes instead of
creating subclasses.
Use non-extended mockito as it is not actually necessary for current
tests.
Test: atest
Change-Id: Id2874309cce2778c4405b852df9a3ae816c4abcb
This reverts commit a481dc184f.
Reason for revert: Update this change to ensure proper closure of the timerfd object.
Change-Id: I14530ba77a39c77b4c7af6855ec77ba4907ab9f9
Bluetooth apex name has changed from com.android.btservices to
com.android.bt. We now need to update the reference in the code.
Bug: 383863941
Flag: Exempt build infra
Test: m .
Change-Id: I92167eb785858565d28b1e72b3b98150378975a6
William Escandecommited 2025-01-09 12:25:16 -08:00
This reverts commit 3d51a99dc8.
Reason for revert: Does not close the timerfd object properly, which may cause a memory leak.
Change-Id: I25d7da13591696c9dfda60ee0fdd2574dbcdf337
Timerfd can provide more accurate delayed callbacks than
Handler#postDelayed because it accounts for the time the device
spends in deep sleep. Using timerfd allows for more precise query
timing, which reduces the possibility of TTL expiration caused
by inaccurate delayed callbacks.
Bug: 366373064
Test: atest FrameworksNetTests NsdManagerTest
Change-Id: I980ec8fd43f63976ef5387bb57c7ed70a1b68d82
This patch exposes Connectivity libraries to allow migrating VCN to
its own non-updatable framework and service libraries. It also
creates a utility library for VCN.
Bug: 369703242
Test: atest FrameworksVcnTests && atest CtsVcnTestCases
Flag: EXEMPT no functional change
Change-Id: I1981f1cc824dcf426a76a0af8e4e3460fccb754e
Create a helper class in Java to provide easy access to timerfd
JNI methods.
Bug: 366373064
Test: atest NetworkStaticLibTests
Change-Id: Iea09cd29e2a6ed837ece30c512393be2e27e8c2e
Introduced FrameworkConnectivityStatsLog within the
framework-connectivity module. This enables logging of metrics, such as
terrible error events, from components residing in the bootclasspath.
Test: manual
Change-Id: I478d957b06721b35135a45dbbcda72a2c3e9f9ce
Having framework-connectivity-shared-srcs in net-utils-all-srcs is risky because it's also adds classes to other modules like WiFi.
Bug: 376587883
Change-Id: I829cc6f1e9865e6a5fc23ddcfa8d6f45aac27e06
* changes:
Update unit tests to reflect the changes to RoutingCoordinator and PrivateAddressCoordinator
Move PrivateAddressCoordinator from Tethering to staticlibs
Refator IpServer to allocate IPv4 address via RoutingCoordinatorManager API
Introduce PrivateAddressCoordinator methods at RoutingCoordinatorManager
Treehugger Robotauthored and Gerrit Code Reviewcommited 2024-10-17 01:28:02 +00:00
This CL moves PrivateAddressCoordinator from Tethering to staticlibs
so that RoutingCooridnatorService can create an instance of
PrivateAddressCoordinator.
Bug: 350699020
Change-Id: I13ccd515972243719465c1c9ab844f802bc8884b
If dumping MdnsDiscoveryManager is not executed on the handler
thread, it may not complete in time because the dump task is
performed on the handler thread. Therefore, use
HandlerUtils#runWithScissorsForDump to ensure the dump service
is completed.
Test: dumpsys servicediscovery
Change-Id: Ifbb972fe7a83677b7cdcc97bb6c5c099ce56bb8f
modules should specify the submodule of java_sdk_library that the module
actually depends on
Test: CI
Bug: 358613520
Change-Id: I0367068c901df98483f6cf95160d3e7801881b0a
In the current design, NetworkStats.addEntry is used within a
loop to create a NetworkStats instance from entries. This results
in a large memory footprint because the addEntry() method clones
the original NetworkStats instance each time it is called.
This change utilizes the newly created API to add a list of
entries at once. This approach only clones the instance once,
thereby reducing the required memory footprint.
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.NetworkStatsUtilsTest#testPublicStatsToAndroidNetStats
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.net.module.util.NetworkStatsUtilsTest
(on S device)
Test: atest ConnectivityCoverageTests:com.android.testutils.NetworkStatsUtilsTest
(on S device)
Bug: 335680025
Change-Id: I5c635613ed3ba34d840ee71b6bef21d10105df0d
- Add comments clarifying the use cases of
net-utils-framework-connectivity and net-utils-service-connectivity
- Apply stricter visibility for the staticlibs
Bug: 357803496
Test: CI
Change-Id: I0d13b436976c3194c0fe350a905a8edf3e4df73a
`net-utils-connectivity-apks` has the dependency on
`net-utils-non-bootclasspath-aidl`, to make sure the CaptivePortalLogin
apk module still can use `net-utils-connectivity-apks`, expand the
`net-utils-non-bootclasspath-aidl` to support apk module in platform.
Bug: 329361366
Test: TH
Change-Id: I6d2f723fdc28037ed40072565d93b4307d7f5a45
CaptivePortalLogin module also require the static lib
net-utils-tethering, rename it to net-utils-connectivity-apks for more
usage scope.
Bug: 329361366
Test: TH
Change-Id: Id68255fec9b1586f445bbd7bf290df3403e4ca11
Moved common DNS label comparison functions from MdnsUtils.java to
DnsUtils.java within the staticlib to facilitate reuse by both
Connectivity and NetworkStack modules.
Test: TH
Change-Id: Ie839c5621d2c4b74e41987a0c6d1141d0d6e24f8
net-utils-services-common used to include modules-utils-build as a
static lib, but this has the issues of forcing lib depending on it to
also have the modules-utils-build.
When trying to add this lib to a framework library within the same apex,
it fail the StrictJavaPackagesTest.
By moving the responsibilities to link it to the caller we no longer
have the initial issue
Bug: 343121936
Test: Build target using net-utils-services-common
Test: atest StrictJavaPackagesTest
Flag: Exempt simple dependency fix
Change-Id: I96137c177e9c38d39243eedd1729e7626b4cdcdf
William Escandecommited 2024-07-10 14:26:50 -07:00
This is not used outside core networking modules and because it's not
jarjar'd, is not safe to use outside core networking modules anyway.
Change-Id: I1d8dfb0191b94e64ba3e7062f3a547348d9b0403
Test: TH
Lorenzo Colitticommited 2024-07-05 08:34:37 +00:00
This CL introduces net-utils-framework-connectivity, net-utils-tethering
and net-utils-service-connectivity as staticlibs.
- net-utils-framework-connectivity will be used by
framework-connectivity-pre-jarjar.
- net-utils-service-connectivity and net-utils-tethering are the
static liraries used by service-connectivity-pre-jarjar and Tethering
respectively.
Bug: 350699020
Test: CI
Change-Id: I4dbb2b0de905a576cfcf24d2d5d1f1a261d2bd68
This should speed up BPF map reads by returning the cached value
without needing a system call.
Bug: 343166906
Test: added parameterization to BpfMapTest
Change-Id: Ifc0c5baa80f6d46356434c249749e87fe2f9ec6c
Lorenzo Colitticommited 2024-06-05 06:48:27 +00:00
* Struct.java is removed from net-utils-device-common-bpf and
net-utils-device-common-struct's source list
* Created a lib net-utils-device-common-struct-base for Struct.java
* Updated libs that require Struct.java to include
net-utils-device-common-struct-base.
* Replaced net-utils-multicast-forwarding-structs with
net-utils-device-common-struct in service-connectivity
Bug: 323503345
Test: build tethering module.
Change-Id: I3f60715c3d8043b7569db7612dee9d4fa1ccba59
This commit removes the unused library visibility.
The "frameworks/base/packages/Connectivity" folder is the
temporary folder for modulizing the connectivity codes. There is
no such need now.
Test: m
Change-Id: Ia2890fe64c1bc369fcb90be645263bc56c98a7b2