Skip to content
Snippets Groups Projects
  1. Feb 15, 2024
  2. Feb 13, 2024
    • Yahav Nussbaum's avatar
      Introduce Powered Off Finding API · c712a571
      Yahav Nussbaum authored
      Bug: 307898240
      Test: atest CtsNearbyFastPairTestCases
      Test: atest NearbyIntegrationPrivilegedTests
      Test: atest NearbyIntegrationUntrustedTests
      Change-Id: I57b37ea796c0791d72fec931f731a0143e816dac
      c712a571
  3. Feb 08, 2024
    • Remi NGUYEN VAN's avatar
      Allow more characters in subtypes · 629234ce
      Remi NGUYEN VAN authored
      Allow all printable ASCII characters in subtypes, instead of only the
      set of characters allowed in service types.
      
      This is still more restrictive than what the spec allows, but allowing
      random bytes would be harder to manage (especially when displaying the
      subtypes in logs for example) and there is no known use-case for it.
      Having the NsdManager API impose more restrictions is probably also best
      for apps to minimize interoperability problems.
      
      Bug: 324377460
      Test: atest
      Change-Id: Id75879a1c3ea6af8d7995b0e8e0dcc06e7160a0a
      629234ce
  4. Feb 01, 2024
    • Junyu Lai's avatar
      Rename check*Permission* to has*Permission · 71b51538
      Junyu Lai authored
      The check*Permission methods are a bit error-prone because people
      can forget to check the return value and expect that they behave
      like the enforce* methods. This was pointed out before in some bugs.
      
      This change adds @CheckResult annotation to enforce linter warning
      and rename methods accordingly.
      
      Test: TH
      Fix: 279691948
      Change-Id: Ibb0df6540fe0ed40289bb190b790130daaa2f763
      71b51538
  5. Jan 31, 2024
    • Aditya Choudhary's avatar
      [DON'T BLOCK] Test ownership migration rules · 01b5ede2
      Aditya Choudhary authored
      This CL is created as a best effort to migrate test targets
      to the new android ownership model. If you find incorrect or unnecessary
      attribution in this CL, please create a separate CL to fix that.
      
      For more details please refer to the link below,
      <add g3 doc link>
      
      Bug: 304529413
      Test: N/A
      Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5
      Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5
      01b5ede2
  6. Jan 30, 2024
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. Dec 12, 2023
  17. 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
  18. Dec 04, 2023
  19. 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
  20. 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
  21. Nov 20, 2023
  22. Nov 16, 2023
  23. Nov 13, 2023
  24. 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
  25. 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
  26. Nov 02, 2023
  27. Oct 25, 2023
  28. 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
  29. Oct 13, 2023
Loading