Skip to content
Snippets Groups Projects
  1. Jan 29, 2024
    • Handa Wang's avatar
      [mdns] add API support for custom hostname · 1c2be6b3
      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
      1c2be6b3
  2. Jan 26, 2024
    • Yang Sun's avatar
      Add setEnabled API · 0797d9d5
      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
      0797d9d5
  3. Jan 25, 2024
    • Kangping Dong's avatar
      [mdns] add API for discovery with subtype · 97d6aeb3
      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
      97d6aeb3
    • Jihoon Kang's avatar
      Specify aconfig_declaration modules in java_sdk_library · 49bbfc92
      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
      49bbfc92
  4. Jan 18, 2024
    • Junyu Lai's avatar
      Fix incorrect nullability annotations · 6da1c703
      Junyu Lai authored
      Some callers of openSessionInternal could have null package name.
      Update nullability annotations accordingly.
      
      Test: TH
      Bug: N/A
      Change-Id: Ifafafcd64612c99e5174364a010ec95415702b0d
      6da1c703
  5. Jan 16, 2024
    • Kangping Dong's avatar
      [Thread] add error code ERROR_UNKNOWN for forward compatibility · 2c83e2fc
      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
      2c83e2fc
  6. Dec 27, 2023
    • Ken Chen's avatar
      Stop registering native mdns service · 80c9f6f3
      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
      80c9f6f3
  7. Dec 26, 2023
    • Junyu Lai's avatar
      [AF03] Adopt FastDataInput · da6020a3
      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
      da6020a3
    • Handa Wang's avatar
      implement Thread Border Router e2e integration test · 806f5a1b
      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
      806f5a1b
    • Yuyang Huang's avatar
      Introduce NsdManager API for in-place service updates without re-announcement. · 86d083f3
      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
      86d083f3
  8. Dec 21, 2023
    • Junyu Lai's avatar
      [AF02.1] Support read by FastDataInput in the NetworkStatsRecorder · 2dce848e
      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
      2dce848e
  9. Dec 18, 2023
    • Kangping Dong's avatar
      [mdns] add service-side impl for subtypes advertising · 5af24b65
      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
      5af24b65
    • Kangping Dong's avatar
      [mdns] add support for advertising subtypes · 6d618d77
      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
      6d618d77
  10. Dec 12, 2023
  11. Dec 05, 2023
    • Junyu Lai's avatar
      [AF01] Move NetworkStatsCollection comparison code to NetworkStatsCollection · 77f84a40
      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
      77f84a40
  12. Dec 04, 2023
  13. Nov 28, 2023
    • Motomu Utsumi's avatar
      Add FlaggedAPI annotation to NSD offload APIs · ce23d846
      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
      ce23d846
  14. Nov 21, 2023
    • Paul Hu's avatar
      Fix the memory leak in nsd tests · 27662f0c
      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
      27662f0c
  15. Nov 20, 2023
  16. Nov 16, 2023
  17. Nov 13, 2023
  18. Nov 08, 2023
    • Kangping Dong's avatar
      [Thread] move createRandomDataset to ThreadNetworkController · af4f1f57
      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
      af4f1f57
    • Kangping Dong's avatar
      Add Thread team to owners of the API files · 310b801b
      Kangping Dong authored
      Similar to the Neary and RemoteAuth team, the Thread team will need to update the API files.
      
      Change-Id: I488aae7610e337f14df01f1c6f51f042f11bd450
      310b801b
    • Kangping Dong's avatar
      [Thread] add ThreadNetworkController APIs · b1c75dbe
      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
      b1c75dbe
  19. Nov 07, 2023
    • Anton Hansson's avatar
      Baseline issues that were previously suppressed · d8e40b32
      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
      d8e40b32
    • Adrian Roos's avatar
      Connectivity: enforce FlaggedApi · 4126d9b7
      Adrian Roos authored
      Bug: 297362755
      Test: m checkapi
      Merged-In: I25ad2cb4472e52297a455256b5749a90f31ca6b9
      Change-Id: I25ad2cb4472e52297a455256b5749a90f31ca6b9
      4126d9b7
  20. Nov 02, 2023
  21. Oct 25, 2023
  22. Oct 24, 2023
    • Kangping Dong's avatar
      [Thread] flagging Android Thread APIs · 75aa4856
      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
      75aa4856
  23. Oct 13, 2023
  24. Oct 12, 2023
    • Paul Duffin's avatar
      Add additional overriding methods to signature files · b3c3f2e9
      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
      b3c3f2e9
  25. Oct 10, 2023
    • Paul Duffin's avatar
      Prepare for keeping concrete overrides of abstract methods · 7bd2d108
      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
      7bd2d108
  26. Sep 27, 2023
  27. Sep 22, 2023
    • Igor Zaslavsky's avatar
      Park RemoteAuth Manager and Service · e3365863
      Igor Zaslavsky authored
      Limit the amount of parked code built into Connectivity module
      
      Test: built successfully.
      Bug: 300522527
      Change-Id: I87d7516011c469aa89fc7e67cf03c4ee8aa1bb9b
      e3365863
  28. Sep 12, 2023
    • Kangping Dong's avatar
      [Thread] initial Thread network service · 1cec48f3
      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
      1cec48f3
Loading