Skip to content
Snippets Groups Projects
  1. 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
  2. Sep 27, 2023
  3. 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
  4. 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
    • Yuyang Huang's avatar
      Add newApi linter check for mDNS library · fc83170c
      Yuyang Huang authored
      The mDNS library need to be backported to some internal library which
      support minSdk 21. Therefore, updated the build rules to add the linter
      check.
      
      Bug: 296175311
      Test: TH
      Change-Id: Iae0bffa315dc6de2339a05f595b13480fa7385ae
      fc83170c
  5. Sep 08, 2023
    • Yuyang Huang's avatar
      Add comments for framework-connectivity-t-mdns-standalone-build-sources · cf25a8a7
      Yuyang Huang authored
      framework-connectivity-t-mdns-standalone-build-sources should only be
      used for building service-connectivity-mdns-standalone-build-test. Added
      comment to prevent this filegroup being used in wrong way.
      
      Test: TH
      Change-Id: I11dd390967db1a115dcadcdebc20f226ab6c0a51
      cf25a8a7
    • Motomu Utsumi's avatar
      Add java_defaults for @FlaggedApi handling · 310f11ac
      Motomu Utsumi authored
      This CL is a preparation to ignore @FlaggedApi API in udc mainline
      branch
      
      Bug: 299411828
      Test: TH
      Change-Id: If3217916b2c37ebaa7b48d8387c69cb078af9550
      310f11ac
    • Motomu Utsumi's avatar
      Prepare api directory for udc mainline branch · 5dcd1456
      Motomu Utsumi authored
      udc-extended-api directory will be used only in udc mainline branch to
      hide @FlaggedApi annotated api which is not supported in that branch
      
      Copied api directories from udc mainline branch.
      
      Bug: 299411828
      Test: TH
      Change-Id: I86023b1fb3e5f9b4b787a564303e6d2e60f74467
      5dcd1456
  6. Sep 05, 2023
    • Yuyang Huang's avatar
      Send rawOffloadPacket to OffloadEngine · 31f6e2ec
      Yuyang Huang authored
      Add the missing logic to send the rawOffloadPacket to OffloadEngine.
      
      Bug: 297314970
      Test: atest CtsNetTestCases FrameworksNetTestCases
      Change-Id: I06d7a9bb84df72808eff4f0c9df60f7e60aa2a2c
      31f6e2ec
  7. Sep 04, 2023
    • Junyu Lai's avatar
      Address review followup comments for NetworkStats · 35c69c79
      Junyu Lai authored
      This change includes:
      1. Mark groupedBy*() deprecated and throw after android U.
      2. Modify map() to mapKeysNotNull().
      3. rename clearInterfaces to withoutInterfaces and refactoring.
      4. Modify tests accordingly.
      
      Test: atest FrameworksNetTests:android.net.connectivity.android.net.NetworkStatsTest
      Fix: 296149902
      Fix: 296150018
      Change-Id: I5d97422ba957a212c0c5fbc1eee3f8b174343348
      35c69c79
  8. Aug 31, 2023
    • Remi NGUYEN VAN's avatar
      Factor out remoteauth dependencies to variables · c41daa41
      Remi NGUYEN VAN authored
      This will allow using different values for the variables without having
      merge conflicts in the dependencies list for each build rule.
      
      Bug: 295788084
      Test: m
      Change-Id: I7b64a5a01d1f8139e7ce30ce95903d71cb09de9f
      c41daa41
  9. Aug 30, 2023
    • Igor Zaslavsky's avatar
      Removing SystemApi added in aosp/2685327 · edb12a42
      Igor Zaslavsky authored
      Removing all SystemApi added in aosp/2685327 until M-2023-11 train  release
      Apis will be placed back after that
      
      Test: built successfully.
      Bug: 290092977
      API-Coverage-Bug: 294934095
      Change-Id: I12e8b21e6d21541930acdd14322156ad75b27be5
      edb12a42
  10. Aug 24, 2023
    • Igor Zaslavsky's avatar
      Add RemoteAuthService · ec344f4c
      Igor Zaslavsky authored
      Add RemoteAuthService APIs and Stubs (hide) for Settings of D2DA
      
      This CL introduces new SystemApi allow user to discover remote devices
      compatible to be registered as remote authenticators via RemoteAuthManager
      
      Design doc: go/remote-auth-manager-fishfood-design
      
      Test: built successfully.
      Bug: 290092977
      API-Coverage-Bug: 294934095
      Change-Id: Iaaae1126065fdc3db469eeb8d85ac654b8199a12
      ec344f4c
  11. Aug 23, 2023
  12. Aug 14, 2023
    • Remi NGUYEN VAN's avatar
      Add remoteauth to API owners · a2009eae
      Remi NGUYEN VAN authored
      Similarly to Nearby, remoteauth is expected to regularly need to change
      the API files.
      
      Import the existing owners file for that purpose.
      
      Test: m
      Change-Id: I4b900481df3bf505a8209e5370dc4bc4c928dbee
      a2009eae
  13. Aug 13, 2023
  14. Aug 04, 2023
    • Yuyang Huang's avatar
      Enable service offload API · 00cf7eda
      Yuyang Huang authored
      API-Coverage-Bug: 282618639
      Bug: 269240366
      Test: atest CtsNetTestCases
      Change-Id: I7ac72b675ff3715891f31bc03c453e14b1264e40
      00cf7eda
    • Yuyang Huang's avatar
      Add callbacks for service offload · 33fa4d26
      Yuyang Huang authored
      Components that can provide offload like IpClient (packet
      filter offloading) can use the API to register a callback to be notified
      when offload is necessary.
      
      Bug: 269240366
      Test: atest CtsNetTestCases
      Change-Id: I8080702f5b530001b88e79e504f4722ac01bc576
      33fa4d26
  15. Aug 01, 2023
    • Junyu Lai's avatar
      Deduplicate items after clear interface in NetworkStats · 23d89c0b
      Junyu Lai authored
      Follow-up from commit Ie60829a65d0d9b5b63ad353695a820c0586e3665,
      the interface field was cleared before returning the result to
      the caller. However, this can cause problems in the
      NetworkStats#subtract method. If the interface field is cleared,
      the findIndexHinted method can match to a wrong entry.
      This is because the keys of multiple entries will now be the
      same. This can cause the subtract result to be unexpectedly
      large and the return value of getUidStatsForTransport to be
      mismatched with the values retrieved from other APIs.
      
      Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest \
            FrameworksNetTests:android.net.connectivity.android.net.NetworkStatsTest
      Bug: 290728278
      Change-Id: I891ab29b8a2902663febc7c32b04417caf510926
      23d89c0b
    • Junyu Lai's avatar
      Refactor grouped by methods · 0b9c0835
      Junyu Lai authored
      This is a no-op refactoring, which re-write the group by methods
      to use a common method that can slice NetworkStats by a given
      lambda. This is useful for subsequent changes to slice NetworkStats
      with different conditions.
      
      Test: atest FrameworksNetTests:android.net.connectivity.android.net.NetworkStatsTest
      Bug: 290728278
      Change-Id: Ia28571021fba46fc59380798053ccdc91ddc6ae4
      0b9c0835
  16. May 15, 2023
  17. May 11, 2023
    • Paul Hu's avatar
      Remove the ServiceTypeClient after socket destroyed · f2a51ac5
      Paul Hu authored
      The ServiceTypeClient should be removed after socket destroyed
      because it's no longer used by any request. The requests will be
      matched to the newly created ServiceTypeClient.
      
      Bug: 278635632
      Test: atest FrameworksNetTests CtsNetTestCases
      Change-Id: Ia917b14d3666f3bfe8e874606a34800a4ce65c5a
      f2a51ac5
  18. Apr 12, 2023
    • Paul Hu's avatar
      Add missed NSD event name · 99fdf930
      Paul Hu authored
      Some events are missed their name in the EVENT_NAMES array and
      shows the number on dumpsys logs. Add their name to the event
      array to show correct info.
      
      Before:
       rec[0]: time=04-12 15:15:23.553 processed=DefaultState org=EnabledState dest=<null> what=21
       rec[1]: time=04-12 15:15:23.555 processed=EnabledState org=EnabledState dest=<null> what=REGISTER_SERVICE
       rec[2]: time=04-12 15:15:24.375 processed=EnabledState org=EnabledState dest=<null> what=DISCOVER_SERVICES
       rec[3]: time=04-12 15:15:25.338 processed=EnabledState org=EnabledState dest=<null> what=23
       rec[4]: time=04-12 15:15:25.342 processed=EnabledState org=EnabledState dest=<null> what=RESOLVE_SERVICE
       rec[5]: time=04-12 15:15:25.344 processed=EnabledState org=EnabledState dest=<null> what=23
       rec[6]: time=04-12 15:15:25.358 processed=EnabledState org=EnabledState dest=<null> what=UNREGISTER_SERVICE
       rec[7]: time=04-12 15:15:25.551 processed=DefaultState org=EnabledState dest=<null> what=22
      
      After:
       rec[0]: time=04-12 15:19:58.955 processed=DefaultState org=EnabledState dest=<null> what=REGISTER_CLIENT
       rec[1]: time=04-12 15:19:58.958 processed=EnabledState org=EnabledState dest=<null> what=REGISTER_SERVICE
       rec[2]: time=04-12 15:19:59.979 processed=EnabledState org=EnabledState dest=<null> what=DISCOVER_SERVICES
       rec[3]: time=04-12 15:20:00.768 processed=EnabledState org=EnabledState dest=<null> what=MDNS_DISCOVERY_MANAGER_EVENT
       rec[4]: time=04-12 15:20:00.777 processed=EnabledState org=EnabledState dest=<null> what=RESOLVE_SERVICE
       rec[5]: time=04-12 15:20:00.778 processed=EnabledState org=EnabledState dest=<null> what=MDNS_DISCOVERY_MANAGER_EVENT
       rec[6]: time=04-12 15:20:00.785 processed=EnabledState org=EnabledState dest=<null> what=UNREGISTER_SERVICE
       rec[7]: time=04-12 15:20:00.925 processed=DefaultState org=EnabledState dest=<null> what=UNREGISTER_CLIENT
      
      Test: adb shell dumpsys servicediscovery
      Bug: 275004614
      Change-Id: I9c05efc2d2993af353a2a902fd8810f53ab2cd16
      99fdf930
  19. Apr 11, 2023
    • Junyu Lai's avatar
      Check MAINLINE_NETWORK_STACK as well to make GTS can access proper stats · e68c42b8
      Junyu Lai authored
      Follow up from aosp/1933093. The test failed because certain
      devices use a flattened apex that lacks the NETWORK_STACK
      permission for sharing with the GTS apk.
      Additionally, the NetworkStatsAccess does not recognize the
      GTS apk, which holds the MAINLINE_NETWORK_STACK permission.
      
      Test: TH
      Bug: 275532605
      Change-Id: Icce80a3d3dbea4a84fbd369d9b5fbe0029ab463e
      e68c42b8
  20. Apr 10, 2023
  21. Apr 07, 2023
    • Chalard Jean's avatar
      Rename throwAboveU to throwAtLeastU · 1bfd3ccf
      Chalard Jean authored
      And address other comments on aosp/2527139
      
      Bug: 273963543
      Test: FrameworksNetTests
      Change-Id: I4328aea2881badc2be667b900b7ac2a296af1678
      1bfd3ccf
    • Chalard Jean's avatar
      Restore the null behavior of buildWifiTemplate · 843cd6ca
      Chalard Jean authored
      The old behavior was to only return those wifis that have
      a null key/subscriber ID (e.g. not carrier wifi). To keep
      backward compatibility, restore that behavior.
      
      Also only crash the old methods on devices with initial
      SDK U, because it can't be mandated that devices that
      upgrade must not call these methods.
      
      Bug: 273963543
      Test: FrameworksNetTests
      Merged-In: Iefb976ed86a732158964fae38e9e601001c2637a
      Change-Id: Iefb976ed86a732158964fae38e9e601001c2637a
      843cd6ca
  22. Apr 06, 2023
    • Chalard Jean's avatar
      Restore the null behavior of buildWifiTemplate · 4c0fb401
      Chalard Jean authored
      The old behavior was to only return those wifis that have
      a null key/subscriber ID (e.g. not carrier wifi). To keep
      backward compatibility, restore that behavior.
      
      Also only crash the old methods on devices with initial
      SDK U, because it can't be mandated that devices that
      upgrade must not call these methods.
      
      Bug: 273963543
      Test: FrameworksNetTests
      Change-Id: Iefb976ed86a732158964fae38e9e601001c2637a
      (cherry picked from commit 78f94fc15035560c279f8e9378561e60a676410a)
      4c0fb401
  23. Mar 30, 2023
    • Junyu Lai's avatar
      Do not crash when passing null into buildTemplateMobileAll · 2c12f922
      Junyu Lai authored
      Test: atest FrameworksNetTests:android.net.connectivity.android.net.NetworkTemplateTest
      Test: atest FrameworksNetTests:android.net.connectivity.android.net.netstats.NetworkTemplateTest
      Bug: 273963543
      Change-Id: I0a8f94df124147e92d35cf474b3d69d1dee6902c
      2c12f922
  24. Mar 24, 2023
  25. Mar 23, 2023
    • Remi NGUYEN VAN's avatar
      Add back @hide NetworkTemplate methods · 37c4a9f2
      Remi NGUYEN VAN authored
      Add back methods that were removed in recent refactoring
      (aosp/2286634).  Even though they are fully @hide, some usage by
      an OEM has been found on T.
      
      Test: atest; the methods should be unused except on the OEM device
      Change-Id: Icd67fb8b7e63cc131356a30a3044458ae2f5efff
      37c4a9f2
  26. Mar 22, 2023
  27. Mar 17, 2023
    • Paul Hu's avatar
      Add a CompatChange flag to enable platform backend · 2e0a88c0
      Paul Hu authored
      Apps targeting sdk < U are considered to use a legacy native
      daemon as NsdManager backend, but other apps use a
      platform-integration mDNS implementation as backend. So add a
      CompatChange flag to enable platform backend for non-legacy
      apps.
      
      Bug: 270306772
      Test: atest FrameworksNetTests CtsNetTestCases
      Change-Id: I7ba58f8a5186fb49ad5f8aeacc8b8234bef1eabe
      2e0a88c0
  28. Mar 15, 2023
    • Anton Hansson's avatar
      Use filegroup defaults for framework sources · 57f3d69f
      Anton Hansson authored
      There's now a shared defaults module for this kind of filegroup. Use
      that and remove the previously duplicated prop.
      
      Bug: 271816210
      Test: m
      Change-Id: Ia4547984a73179fdfc98c427482dd10246f9722c
      57f3d69f
  29. Mar 07, 2023
    • Aaron Huang's avatar
      Remove requireNonNull check from matchesWifiNetworkKey · 8ac11435
      Aaron Huang authored
      matchesWifiNetworkKey expects a non-null value of the
      wifiNetworkKey, however, it might be null in practice
      and the null wifiNetworkKey will be stored into disk.
      And then when the matchesWifiNetworkKey is called, the
      requireNonNull will crash the system. Thus, remove the
      requireNonNull from matchesWifiNetworkKey to avoid
      system crash and handle if the wifiNetworkKey is null
      then it should not match a template with non-empty
      mMatchWifiNetworkKeys.
      
      Check if WifiInfo contains a null network key then skip it
      to prevent adding the identity to the network identity set.
      Also, add a Log.wtf when setWifiNetworkKey(info.getNetworkKey()),
      this might be useful to catch why the wifiNetworkKey is
      null.
      
      Bug: 267815242
      Bug: 266598304
      Test: FrmeworksNetTests
      Change-Id: I9c21f7e3dca9482133c7e331741cf808105414e9
      8ac11435
  30. Mar 06, 2023
    • Cole Faust's avatar
      Compile HalfSheetUX against framework-connectivity-t.impl · 41228921
      Cole Faust authored
      HalfSheetUX uses private apis of framework-connectivity-t. It appears
      that using just "framework-connectivity-t" will compile against either
      the stubs or source of framework-connectivity-t depending on if the
      module was included in the same apex as it or not.
      
      aosp/2462194 is adding the ability to compile modules like HalfSheetUX
      outside of the context of the apex, at which point it will start
      compiling against stubs if we don't explicetly specify to use the
      implementation library.
      
      Bug: 254205429
      Test: m javac-check with aosp/2462194
      Change-Id: I1d41e47aa0e4e3d320b78b28cfc181fc30c4537c
      Merged-In: I1d41e47aa0e4e3d320b78b28cfc181fc30c4537c
      41228921
    • Cole Faust's avatar
      Compile HalfSheetUX against framework-connectivity-t.impl · c944f10f
      Cole Faust authored
      HalfSheetUX uses private apis of framework-connectivity-t. It appears
      that using just "framework-connectivity-t" will compile against either
      the stubs or source of framework-connectivity-t depending on if the
      module was included in the same apex as it or not.
      
      aosp/2462194 is adding the ability to compile modules like HalfSheetUX
      outside of the context of the apex, at which point it will start
      compiling against stubs if we don't explicetly specify to use the
      implementation library.
      
      Bug: 254205429
      Test: m javac-check with aosp/2462194
      Change-Id: I1d41e47aa0e4e3d320b78b28cfc181fc30c4537c
      Merged-In: I1d41e47aa0e4e3d320b78b28cfc181fc30c4537c
      c944f10f
    • Paul Hu's avatar
      Migrate reigster service callback backend · 30bd70d1
      Paul Hu authored
      registerServiceInfoCallback currently only sends updates for
      addresses added, but does not handle removes (expiration) and
      TXT/SRV record updates. Thus, migrate its backend to
      MdnsDiscoveryManager which can support the expiration update.
      
      Bug: 266030646
      Test: atest FrameworksNetTests CteNetTestCases
      Change-Id: I72add213935dc1beacb6277007868ad30bd89c00
      30bd70d1
Loading