Skip to content
Snippets Groups Projects
  1. Dec 21, 2023
  2. Dec 20, 2023
  3. Dec 19, 2023
    • Tongbo Liu's avatar
      Add mcts tag to MainlineCTS networking test modules which is used for build... · 199357ba
      Tongbo Liu authored
      Add mcts tag to MainlineCTS networking test modules which is used for build all the mainline CTS tests.
      
      Bug: 316436957
      
      Change-Id: I0e7ab773075fb0dfd154dde45a710d1c1823c914
      199357ba
    • Motomu Utsumi's avatar
      Updates doTestAllowedUids to wait network Lost · 2ee2498b
      Motomu Utsumi authored
      doTestAllowedUids did not wait the network disconnect and this made the
      test flaky since doTestAllowedUids saw the network from the previous
      doTestAllowedUids.
      This CL update doTestAllowedUids to wait network Lost
      
      Before this CL, test failed 6 times in 1000 tries.
      After this CL, test does not fail in 1000 tries.
      
      Test: atest testAllowedUids --iterations 1000
      Bug: 312206245
      Change-Id: I270a230c15dfd2c44ba29f203bc55c0f47649e98
      2ee2498b
    • Yuyang Huang's avatar
      Add multi-subtype support to NsdService · 170d42f1
      Yuyang Huang authored
      Allow client to register multi-subtype using comma separate format like:
      "_997._tcp,_test1,_test2,_test3"
      
      Bug: 315085895
      Test: TH
      Change-Id: Ibd27e42cb9e7a0274d1d8df3f6f3a00786e4a237
      170d42f1
  4. Dec 18, 2023
    • Junyu Lai's avatar
      Remove sdk level check when calling getDataSaverEnabled · 8df4b700
      Junyu Lai authored
      Follow-up from aosp/2856948, the data saver status value is
      filled by ConnectivityService before Android V. Thus, calling
      BpfNetMapsReader#getDataSaverEnabled() is a legit use case, which
      should not trigger log.wtf.
      
      Remove the check accordingly.
      
      Test: TH
      Bug: 314858283
      Fix: 316839561
      Change-Id: I90c85ab98fbefd1f99ec799a4eec8d1d0cfd47b0
      8df4b700
    • 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
  5. Dec 13, 2023
    • Lorenzo Colitti's avatar
      Don't add LOCAL_NETWORK as forbidden capability · 22941b38
      Lorenzo Colitti authored
      This causes the module to crash on rollback because the current
      production code does not consider LOCAL_NETWORK to be a valid
      capability.
      
      Change-Id: Idf57d72c384b41b483098c4c302738072ebf7f90
      Test: TH
      Fix: 313030307
      22941b38
  6. Dec 12, 2023
  7. Dec 11, 2023
  8. Dec 08, 2023
    • Junyu Lai's avatar
      [BR14] Tracker Data Saver status in ConnectivityService · 38c7503a
      Junyu Lai authored
      BYPASS_INCLUSIVE_LANGUAGE_REASON=Using public API
      Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSBpfNetMapsTest
            (on U and V devices respectively)
      Bug: 297836825
      Fix: 314858283
      
      Change-Id: Ibeac8cd3a33468c6539234255328affc6b3f8ffe
      38c7503a
  9. Dec 07, 2023
    • Paul Hu's avatar
      Replace MdnsPointerRecord contructor usage for queries · 516e27f9
      Paul Hu authored
      This is a test only change, replacing the MdnsPointerRecord
      constructor usage for queries with the new version.
      
      Bug: 312657709
      Test: atest FrameworksNetTests
      Change-Id: Ie9e51df78bfc27090503b861c5ac979201f10608
      516e27f9
    • Motomu Utsumi's avatar
      Update testAllowedUids to follow revert of canSeeAllowedUids · 85cbe604
      Motomu Utsumi authored
      aosp/2854709 reverted canSeeAllowedUids change done by aosp/2405720.
      But aosp/2854709 did not update testAllowedUids and broke
      testAllowedUids since cts can no longer see allowedUids.
      This CL updates testAllowedUids to skip some test cases.
      
      Followup CLs will allow ownerUid to see allowedUids again and re-enable
      test cases.
      
      Bug: 315112049
      Test: TH
      Change-Id: I1e4ca09ad15b6150182325cbfda1548e5fec79d1
      85cbe604
  10. Dec 06, 2023
  11. Dec 04, 2023
    • Yang Sun's avatar
      Add support for setsockoptBytes · f2987b8b
      Yang Sun authored
      Test: atest FrameworksNetTests:android.net.connectivity.android.net.NetworkUtilsTest
      Change-Id: I3d94172fa8a42e2ab8ba4caf80d5caaa11fac703
      f2987b8b
  12. Dec 01, 2023
    • Yuyang Huang's avatar
      Add support to update the registered service in place · e5cba9cb
      Yuyang Huang authored
      The current implementation of MdnsAdvertiser doesn't support updating an
      existing registration. For an update request, the client needs to
      unregister it first, which will trigger an exit message and then
      register again, which will trigger an announcement message. There are
      some clients that don't want to trigger the exit and announcement
      message every time. This CL adds the API to support that use case.
      
      Bug: 309372239
      Test: TH
      Change-Id: Iabe69a987a11104090082e01969e7595f05504e8
      e5cba9cb
    • Motomu Utsumi's avatar
      Revert^2 "Update NetworkAgent#register to compatible with old NetworkAgentTest" · 3c589176
      Motomu Utsumi authored
      This reverts commit db884c9a.
      
      Reason for revert: reason of aosp/2849874 revert is solved by aosp/2854408
      
      Change-Id: Ic5ffddf2f811c0d2c359f292c3b44b833bae5eaa
      3c589176
  13. Nov 30, 2023
    • Nick Wille's avatar
      Revert "Update NetworkAgent#register to compatible with old NetworkAgentTest" · db884c9a
      Nick Wille authored
      This reverts commit 1e7c4a49.
      
      This change is a suspect for causing test breakages, it may or may not be reverted.
      
      Bug: 314087796
      
      Reason for revert: 314087796
      
      Change-Id: If0a1c1e2d0e260319cf64b2d00828638abebb7fe
      db884c9a
    • Motomu Utsumi's avatar
      Revert canSeeAllowedUids for ownerUid · eb4a1968
      Motomu Utsumi authored
      aosp/2405720 allowed network owner uid to see allowed uids
      But this breaked old cts.
      This CL reverts the behavior for network owner uid.
      
      Bug: 312093253
      Bug: 313025186
      Bug: 312196228
      Test: TH
      Change-Id: Iaa732d22f67ecce7678e68bb8b20cec526116dc9
      eb4a1968
    • Motomu Utsumi's avatar
      Update NetworkAgent#register to compatible with old NetworkAgentTest · 1e7c4a49
      Motomu Utsumi authored
      aosp/2792436 updated NetworkAgent and NetworkAgentTest.
      But the NetworkAgent change was not compatible with the old
      NetworkAgentTest.
      This CL makes NetworkAgent change to compatible with the old
      NetworkAgentTest.
      
      aosp/2851330 will update NetworkAgentTest to support NetworkAgent change
      done in aosp/2792436.
      Once the old cts is EOL, workaround in NetworkAgentTest and NetworkAgent
      can be removed.
      
      Bug: 310124646
      Test: atest NetworkAgentTest
      Change-Id: Ic99b0ab72526a9ba22653f5bb132214ef0814440
      1e7c4a49
  14. Nov 29, 2023
    • Yuyang Huang's avatar
      Log bpf rc file if it differs from the template files. · 41557553
      Yuyang Huang authored
      Check if the bpf loader rc file is differs from the template files when
      ConnectivityService starts. Use Log.wtf() to log the file if there is a
      diff.
      
      Bug: 312638861
      Test: TH
      Change-Id: I0b9ed9962ad0954a051a17b01357d04a0e655ff4
      41557553
    • Yuyang Huang's avatar
      Update registerOffloadEngine() permission check · d5896e77
      Yuyang Huang authored
      Update registerOffloadEngine() permission check to check the
      DEVICE_POWER permission in U. This change is required to allow the
      android TV device to access the API in U because the
      REGISTER_NSD_OFFLOAD_ENGINE permission can not be backported.
      
      Bug: 313546516
      Test: TH
      Change-Id: I84b80d102a34487ad54719a86eb525b319e2fd8b
      d5896e77
  15. Nov 28, 2023
    • Mike Yu's avatar
      Replace useTls with mode in PrivateDnsConfig · 9738b477
      Mike Yu authored
      In PrivateDnsConfig class, `useTls` is replaced with `mode`.
      This CL a corresponding change.
      
      Bug: 240259333
      Test: atest ConnectivityCoverageTests
      Change-Id: I60c53e52f287fc7fa05543603a62632d934bb2e6
      9738b477
    • Hansen Kurli's avatar
      Remove unused Vpn Dependency methods in VpnTest. · b27602c8
      Hansen Kurli authored
      Vpn.Dependencies contains methods used for legacy VPNs that are
      now unused. Remove them.
      
      Bug: 161776767
      Test: atest FrameworksNetTests
      Change-Id: I68bbb3e519f5558f9006f680df79ae8073e196cd
      b27602c8
  16. Nov 24, 2023
    • Remi NGUYEN VAN's avatar
      Prompt user to add data on mobile portals · 3f2ff2e3
      Remi NGUYEN VAN authored
      On mobile networks it is more likely that the user needs to top up or
      get a mobile data subscription, rather than "sign in" as the previous
      messaging was suggesting.
      Following feedback from interaction designers / UX writers, change the
      strings to be more appropriate for the most common use-case.
      
      Bug: 153673376
      Test: atest FrameworksNetTests
            manual test on mobile network force-detecting a portal.
      Change-Id: I5b4d4a17fd507d8cf3c9863cf23b5fedb258852e
      3f2ff2e3
  17. Nov 23, 2023
    • Junyu Lai's avatar
      Relax testValidation pass condition · 9273ae0f
      Junyu Lai authored
      The issue arises when the network becomes validated based on the
      isCaptivePortal success with HTTPS, even though the HTTP probe
      hasn't been executed yet. Given that there is no way to ensure
      HTTP probe was sent in this case, the pass condition should be
      relaxed, allowing a single https query instead of expecting both.
      
      Test: atest FrameworksNetIntegrationTests:ConnectivityServiceIntegrationTest#testValidation \
            --rerun-until-failure 100
            (With hardcoded sleep when starting HTTP probe)
      Fix: 303351630
      Change-Id: I580e9a3a868cd0b3395a20ace27b006529475312
      9273ae0f
  18. Nov 22, 2023
    • Chiachang Wang's avatar
      Reset the LISTEN_ACTIVITY_TIMEOUT_MS timer · 67f19ea6
      Chiachang Wang authored
      This is a clean up commit to address TODO for resetting the
      LISTEN_ACTIVITY_TIMEOUT_MS timer as aosp/2188755 was shipped.
      
      Fix: 252972908
      Test: atest CtsNetTestCases
      Change-Id: Ibc1a1c68883a3772729f24b01f9dc8d3cc37c1eb
      67f19ea6
  19. Nov 21, 2023
    • Jean Chalard's avatar
      Revert "Prioritize non-slices over slices" · 6121a765
      Jean Chalard authored
      This reverts commit 14499f01.
      
      Reason for revert: b/312408745
      
      Change-Id: I8b03799fe6e0e256263240909ee7446c178bf508
      6121a765
    • Paul Hu's avatar
      Add Thread#join to guarantee the termination of the thread · 0788d8ee
      Paul Hu authored
      Also add MonitorThreadLeak annotation to check thread leak.
      
      Test: atest ConnectivityCoverageTests --test-filter mdns*
      Change-Id: Ie47f30360e36784428173f6cc87a4a6b09826405
      0788d8ee
    • 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
  20. Nov 20, 2023
Loading