- Jan 29, 2024
-
-
Handa Wang authored
This commit adds support of regsitering a service with a custom hostname. This is required to enable Advertising Proxy feature for Thread devices. For example: ``` NsdServiceInfo info = new NsdServiceInfo(); info.setServiceName("My Service"); info.setServiceType("_test._tcp"); info.setHostname("MyHost"); info.setHostAddresses(List.of(address1, address2)); nsdManager.registerService(info, PROTOCOL_DNS_SD, listener); ``` This CL also adds two new error codes for service/host registration conflict: `FAILURE_SERVICE_NAME_CONFLICT` and `FAILURE_HOST_NAME_CONFLICT`. Bug: 284904661 Test: atest CtsNetTestCases FrameworksNetTests Change-Id: I2fb974c38d851ba99144a18c7047084bbd61b938
-
- Jan 26, 2024
-
-
Yang Sun authored
setEnabled API is added to ThreadNetworkController, this can be used by applications with privileged permission to set Thread to enable/disabled state. The Thread enabled state can be subscribed with ThreadNetworkController#registerStateCallback. When Thread is disabled, the join/scheduleMigration APIs will fail with ERROR_THREAD_DISABLED. When Thread is disabling, all commands will fail with ERROR_BUSY. Bug: 299243765 Test: atest CtsThreadNetworkTestCases:android.net.thread.cts.ThreadNetworkControllerTest Change-Id: Ifa7845bf1d5664ecd31ce74e24b3a839f92bba13
-
- Jan 25, 2024
-
-
Kangping Dong authored
This commit adds support of discovering services with explicit subtype. With this change, a service can be discovered with subtype with: ``` nsdManager.discoverServices( new DiscoveryRequest.Builder("_http._tcp", PROTOCOL_DNS_SD) .setSubtype("_printer").build(), executor, listener); ``` Bug: 265095929 Test: atest CtsNetTestCases FrameworksNetTests Change-Id: Iba76283a003cf2d52a8c26e1de872c3e8e433350
-
Jihoon Kang authored
java_sdk_library modules should specify the aconfig_declarations modules in order to generate the exportable stubs (i.e. the stubs that exclude the disabled aconfig flags) by providing the information about the aconfig flag values. The exportable stubs will be used when generating the module sdk snapshots and to generate the hiddenapi flags, in order to prevent exposing the disabled apis in runtime. Test: m framework-connectivity-t Bug: 317290555 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:60b21f877f88a6848ee6d0f0e5316362714b9d25) Merged-In: Ieb8f41921054ed6f62db2edfc7d695ba0a2a0055 Change-Id: Ieb8f41921054ed6f62db2edfc7d695ba0a2a0055
-
- Jan 18, 2024
-
-
Junyu Lai authored
Some callers of openSessionInternal could have null package name. Update nullability annotations accordingly. Test: TH Bug: N/A Change-Id: Ifafafcd64612c99e5174364a010ec95415702b0d
-
- Jan 16, 2024
-
-
Kangping Dong authored
This is per the go/android-api-guidelines#return-error: ``` Make sure your chosen error handling option gives you the flexibility to introduce new error types in the future. For @IntDef, that means including an OTHER or UNKNOWN value - when returning a new code, you can check the caller's targetSdkVersion to avoid returning an error code the application doesn't know about. For exceptions, have a common superclass that your exceptions implement, so that any code that handles that type will also catch and handle subtypes. ``` Bug: 320403080 Change-Id: I2ee663b75107dac6d84fa697f449fa0424128fde
-
- Dec 27, 2023
-
-
Ken Chen authored
NsdService switched from Netd native solution to Java solution on Android U. MDNS service provided by Netd will be removed from Android V. 1. Stop registering native mdns service from V. 2. Stop startDaemon() in NsdManager from V. 3. As a double safety, return early in NsdService methods that call the native mdns service when platform version is V+. 4. Modify NsdManagerTest to cover V+ behavior. Bug: 298594687 Test: Build. Presubmit. Change-Id: Ifdac8f7a44aa57d93d453ba482ec473a2b531452
-
- Dec 26, 2023
-
-
Junyu Lai authored
FastDataInput for reading persistent data is currently disabled by default. This functionality will be gradually enabled through A/B experiments to assess its impact. One-shot boot time increase up to 10 second is one expected outcome in worst case. Currently, the persistent data was loaded when the first caller query it, but in this change it will be done twice in the boot stage due to the needs of doing comparison. Test: adb shell dumpsys netstats Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest Test: manual test against data points under benchmark/assets/dataset Bug: 313841499 Change-Id: Ia927bd115de5453ca3ee22104f3efbf44a55c2b8
-
Handa Wang authored
This implements a basic border routing test case (ping) and demonstrates a valid test environment for Thread Border Router test cases. Later we can add more packet verifications and more test cases. Bug: 295843010 Test: atest android.net.ThreadBorderRouterTest Change-Id: Ifb9b6d45539143a227c2bc0ed69b5c3167ef9acd
-
Yuyang Huang authored
This commit builds upon CL aosp/2817455 by adding a new NsdManager API to update registered services directly, eliminating the need for exit and re-announcement messages. This preserves compatibility with existing apps without requiring an API bump. If an app registers a service with the same listener and NsdServiceInfo, it's treated as an update request. Bug: 309372239 Test: TH Change-Id: Ib84ddf0d92e757eaef225f3e32f5223bc50c8fd6
-
- Dec 21, 2023
-
-
Junyu Lai authored
This increased reading performance by 35% while running benchmark tests. But the feature is not enabled in the production code until the service turns it on. Test: atest ConnectivityBenchmarkTests Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.NetworkStatsCollectionTest Bug: 313841499 Change-Id: Ic827e6c4848cc31d46d62aa93993b483114a1f12
-
- Dec 18, 2023
-
-
Kangping Dong authored
This is the servide-side impl of the subtypes advertising added in aosp/2608627. See that CL for more backgrounds. Bug: 265095929 Test: atest CtsNetTestCases FrameworksNetTests Change-Id: I3d6f96822ac89d12fe29c00f688d848297c25787
-
Kangping Dong authored
This commit adds support of advertising and discovering services with subtypes. With this change, client can publish a new service with subtypes with code: ``` NsdServiceInfo info = new NsdServiceInfo(); info.setServiceName("My Service"); info.setServiceType("_meshcop._udp"); info.setSubtypes(Set.of("_abc")); nsdManager.registerService(info, PROTOCOL_DNS_SD, listener); ``` Bug: 265095929 Test: atest CtsNetTestCases FrameworksNetTests Change-Id: Ia83182e2d43002243d1ef4357d14a8056d7da14b
-
- Dec 12, 2023
- Dec 05, 2023
-
-
Junyu Lai authored
This is a no-op refactoring to move the ultility method to a common place to be referenced outside NetworkStatsService in later patches. Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest Bug: 313841499 Change-Id: Ib0ef40d87486bf3d8d5b3f97c77291a00c0378ac
-
- Dec 04, 2023
-
-
Motomu Utsumi authored
Test: TH Change-Id: Icd3c87a7da9b45e5341a1a2ead68f0a9809591bb
-
- Nov 28, 2023
-
-
Motomu Utsumi authored
These APIs were released via SDK extension but they need to have FlaggedAPI annotation to avoid being released by quarterly release. Note that this CL does not contain udc-extended-api change. Once com.android.net.flags.register_nsd_offload_engine_api is marked as released API, APIs with this annotations should be visible in udc-mainline-prod API .txt files. Bug: 301713539 Test: TH Change-Id: I32b58ec64c1f599f48bc89b189ed24ac1717a1d7
-
- Nov 21, 2023
-
-
Paul Hu authored
The NsdManager constructor creates a new thread, which is not intended to be closed. However, the test in NsdMangerTest and NsdServiceTest create a new NsdManager instance, resulting in a large number of threads running during the tests. This can lead to an out-of-memory error for the tests. To resolve this issue, use the common singleton thread ConnectivityThread to handle tasks from the various instances. Fix: 308544734 Test: atest ConnectivityCoverageTests --test-filter Nsd* Change-Id: I1908a2bb1bd20da8e0498353bca26f7e89e16626
-
- Nov 20, 2023
-
-
Ken Chen authored
MDNS native support from Netd is stopped in V. Bug: 298594687 Bug: 312092770 Test: run CtsNetTestCasesMaxTargetSdk30 on V, no fatal exception. Change-Id: I3774288cdf5b82e6aeeee7ee2d030fdc524e1aa8
-
- Nov 16, 2023
-
-
Ivo Kay authored
Test: atest FrameworksNetTests CtsNetTestCases Bug: 307217169 Change-Id: I006e3191a8c6100af3d2906d5d37f4e38a3db519
-
- Nov 13, 2023
-
-
Kangping Dong authored
Per API council review suggestions in b/309952666, add the same permission requirements for the unregister APIs. Bug: 309952666 Test: atest CtsThreadNetworkTestCases Change-Id: Idc481c7676ddc5d748fe7803f74dd63981186c09
-
- Nov 08, 2023
-
-
Kangping Dong authored
This commit renames `createRandomDataset` to `createRandomizedDataset` and moves this method to ThreadNetworkController class. The reason for moving this method is that we rely on the service side to know which channels are currently supported by this device and there is no safe way for ActiveOperationalDataset to created a randomized full dataset by its own. Moving this method to ThreadNetworkController also allows us to support future platform-dependend configurations. Bug: 308117328 Bug: 307939803 Change-Id: I0b0b7b727c3b326ab59bb1299ace15df1ff1ad5e
-
Kangping Dong authored
Similar to the Neary and RemoteAuth team, the Thread team will need to update the API files. Change-Id: I488aae7610e337f14df01f1c6f51f042f11bd450
-
Kangping Dong authored
The ThreadNetworkController class provides APIs for managing the Thread network, for example, attach to a specific network, form a network with given dataset or update/migrate an existing network. Bug: 262683651 Test: atest CtsThreadNetworkTestCases Change-Id: Ib3c267d2c81a8c3c7772ed3c9cd2092487cc941a
-
- Nov 07, 2023
-
-
Anton Hansson authored
java_sdk_library has previously internally disabled a few legitimate issues. As this is being un-done for modules, add baselines for the pre-existing issues. Bug: 306806877 Test: m checkapi Merged-In: Ie764d33196675e1482f30ecfd3d6d22b7fa25c27 Change-Id: Ie764d33196675e1482f30ecfd3d6d22b7fa25c27
-
Adrian Roos authored
Bug: 297362755 Test: m checkapi Merged-In: I25ad2cb4472e52297a455256b5749a90f31ca6b9 Change-Id: I25ad2cb4472e52297a455256b5749a90f31ca6b9
-
- Nov 02, 2023
-
-
Motomu Utsumi authored
Test: m checkapi in udc-mainlnine branch Change-Id: I9baa1b1537b4ceb1ac9696da2026fffd71c58067
-
- Oct 25, 2023
-
-
Kangping Dong authored
Per the API review council, the classes should be "final" by default Bug: 301076593 Test: build && atest CtsThreadNetworkTestCases Change-Id: I85f0b4fabe5b1bcec2be052620b38a07c58181d7
-
Kangping Dong authored
Design doc: go/thread-android-api Android FR: b/235016403 Bug: 262683651 Change-Id: Icbd4ee4150e3fd78df627c2e726c259e7ee50871
-
- Oct 24, 2023
-
-
Kangping Dong authored
This commit declares the initial "thread_enabled" feature flag and use this to flag all existing and future Thread system APIs with @FlaggedApi Bug: 301473012 Test: build Change-Id: I43f64ce38f7fd0806733b21c4f393e4563e6a467
-
- Oct 13, 2023
-
-
Anton Hansson authored
EthernetManager is @SystemApi, so cannot be referenced from public API. Bug: 303184203 Test: m docs Change-Id: Ib5cc07c89b4ecfdeae704da131ebb307816e35fa
-
- Oct 12, 2023
-
-
Paul Duffin authored
This change adds overriding methods that are essential to compile the stubs generated from the signature files. More information and the background for this change is available at go/add-overriding-one-pager. Test: m checkapi Bug: 299366704 Change-Id: Idba307148fd9afa87bfb7e0c89e00d9bd97ec204
-
- Oct 10, 2023
-
-
Paul Duffin authored
Currently, metalava will discard concrete overrides of abstract methods from the API signature files which causes problems when attempting to generate stubs from those files and also discards information that may be important in API reviews. This change is the first step in the process of changing that behavior. This change hard codes the current behavior for discarding the concrete overrides (`add-additional-overrides=no`) into those signature files that will (or are likely) to be affected by the change in behavior. That allows the default behavior to be changed for all the other files without affecting these. Follow up changes will remove the hard coding from the signature files and will update the contents which will include the concrete overrides of the abstract methods. More information and the background for this change is available at go/add-overriding-one-pager. Test: m checkapi Bug: 299366704 Change-Id: I52c5bbe2e3bbd36019fe44fcb0b2d19876a5a869
-
- Sep 27, 2023
-
-
Maciej Żenczykowski authored
Change-Id: I7912bf91841a4260d0a1eec022a6a832b312321d
-
Maciej Żenczykowski authored
Change-Id: Iad7d1818d1959024d5fd1fc8810d2b7ce0f06e40
-
- Sep 22, 2023
-
-
Igor Zaslavsky authored
Limit the amount of parked code built into Connectivity module Test: built successfully. Bug: 300522527 Change-Id: I87d7516011c469aa89fc7e67cf03c4ee8aa1bb9b
-
- Sep 12, 2023
-
-
Kangping Dong authored
This commit sets up the initial Thread network service for the Android Thread feature which allows an Android device to create a Thread network and being a Border Router. See https://www.threadgroup.org/What-is-Thread for background of Thread. See b/235016403 for the Android Thread feature request. Test: lunch aosp_cf_x86_64_tv-userdebug m && launch_cvd atest CtsThreadNetworkTestCases Bug: 262683651 Change-Id: Ie1bb23084531f67165ec068ea3ca39592dbc01d1
-