Commit Graph

892 Commits

Author SHA1 Message Date
Paul Duffin
7bd2d108ea Prepare for keeping concrete overrides of abstract methods
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
2023-10-10 17:11:25 +01:00
Treehugger Robot
06453bd65a Merge "OWNERS: master -> main" into main am: 66f39a5667
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2765565

Change-Id: I5ded059a17bb94d816f4eb9b3d1041a842c78a94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 20:48:00 +00:00
Maciej Żenczykowski
13e2ff7717 OWNERS: master -> main am: a1ab4aaeb5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2765545

Change-Id: Ia9cedb7d9937c0d45fa8421e36ed865bc3aece62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 20:45:24 +00:00
Treehugger Robot
66f39a5667 Merge "OWNERS: master -> main" into main 2023-09-27 19:31:13 +00:00
Maciej Żenczykowski
9ec09ec315 OWNERS: master -> main
Change-Id: I7912bf91841a4260d0a1eec022a6a832b312321d
2023-09-27 19:29:11 +00:00
Maciej Żenczykowski
a1ab4aaeb5 OWNERS: master -> main
Change-Id: Iad7d1818d1959024d5fd1fc8810d2b7ce0f06e40
2023-09-27 19:29:09 +00:00
Igor Zaslavsky
2d8debe62c Merge "Park RemoteAuth Manager and Service" into main am: f0afc53836
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2759205

Change-Id: I6e3f1ddf1d6c7f8e645a327f59e666851ccb4918
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-26 18:20:50 +00:00
Igor Zaslavsky
e336586353 Park RemoteAuth Manager and Service
Limit the amount of parked code built into Connectivity module

Test: built successfully.
Bug: 300522527
Change-Id: I87d7516011c469aa89fc7e67cf03c4ee8aa1bb9b
2023-09-22 04:09:02 +00:00
Kangping Dong
e5f1122ec9 Merge "[Thread] initial Thread network service" into main am: 01e6dadd1f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2721333

Change-Id: I5b1dad9c40dcade78c352265164da0992a3fcb0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-19 11:29:17 +00:00
Kangping Dong
01e6dadd1f Merge "[Thread] initial Thread network service" into main 2023-09-19 11:25:37 +00:00
Yuyang Huang
8992911f24 Merge "Add newApi linter check for mDNS library" into main am: 365cf0a393
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2718538

Change-Id: I6e392853943db3ff509bc25a4055367774e65cae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-13 06:17:54 +00:00
Yuyang Huang
365cf0a393 Merge "Add newApi linter check for mDNS library" into main 2023-09-13 05:55:51 +00:00
Kangping Dong
1cec48f3c0 [Thread] initial Thread network service
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
2023-09-12 21:48:57 +08:00
Yuyang Huang
fc83170c70 Add newApi linter check for mDNS library
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
2023-09-12 19:01:21 +09:00
Motomu Utsumi
b2597e6ad5 Merge changes If3217916,I86023b1f into main am: c6dc826c22
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2745020

Change-Id: I3c59e96e5686f75f2beb1fc62811744ea05951e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-12 08:51:57 +00:00
Motomu Utsumi
c6dc826c22 Merge changes If3217916,I86023b1f into main
* changes:
  Add java_defaults for @FlaggedApi handling
  Prepare api directory for udc mainline branch
2023-09-12 08:25:42 +00:00
Motomu Utsumi
e7b496fcb6 Merge "Merge remote-tracking branch 'remotes/aosp/tmp_libs_net_move' into libs_net_move_merge" into main am: 55850dccbf
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2745599

Change-Id: Icc1d7a4e4b2c0ed9f55fd2472a100723ade6a847
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-11 10:53:38 +00:00
Motomu Utsumi
55850dccbf Merge "Merge remote-tracking branch 'remotes/aosp/tmp_libs_net_move' into libs_net_move_merge" into main 2023-09-11 10:06:56 +00:00
Motomu Utsumi
c480039309 Merge remote-tracking branch 'remotes/aosp/tmp_libs_net_move' into libs_net_move_merge
frameworks/libs/net/common ->
packages/modules/Connectivity/staticlibs

frameworks/libs/net/client-libs ->
packages/modules/Connectivity/staticlbs/client-libs

Test: TH
Bug: 296014682
Change-Id: I5dc78f0c4653e20312ab3d488b1e69262dbb9840
2023-09-11 11:53:46 +09:00
Treehugger Robot
63b9d4a04c Merge "Address review followup comments for NetworkStats" into main am: 8df4d76aa2
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2723093

Change-Id: I0a517bfebe79a8a5b69cb726b5a9200bc669685a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-08 21:21:19 +00:00
Treehugger Robot
8df4d76aa2 Merge "Address review followup comments for NetworkStats" into main 2023-09-08 20:11:03 +00:00
Yuyang Huang
be5914df05 Merge "Add comments for framework-connectivity-t-mdns-standalone-build-sources" into main am: 29c616d76e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2745718

Change-Id: I3a81e640a42a2ecc28df7d1146f55e5e66f48928
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-08 09:18:23 +00:00
Yuyang Huang
cf25a8a766 Add comments for framework-connectivity-t-mdns-standalone-build-sources
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
2023-09-08 14:51:08 +09:00
Motomu Utsumi
310f11acfe Add java_defaults for @FlaggedApi handling
This CL is a preparation to ignore @FlaggedApi API in udc mainline
branch

Bug: 299411828
Test: TH
Change-Id: If3217916b2c37ebaa7b48d8387c69cb078af9550
2023-09-08 14:47:03 +09:00
Motomu Utsumi
5dcd14569e Prepare api directory for udc mainline branch
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
2023-09-08 11:42:21 +09:00
Yuyang Huang
74c5b24801 Merge "Send rawOffloadPacket to OffloadEngine" into main am: a337d95cc4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2730493

Change-Id: If3a845d966fca2377bc3977e39a0e39cb1756c6e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 01:00:06 +00:00
Yuyang Huang
31f6e2eccb Send rawOffloadPacket to OffloadEngine
Add the missing logic to send the rawOffloadPacket to OffloadEngine.

Bug: 297314970
Test: atest CtsNetTestCases FrameworksNetTestCases
Change-Id: I06d7a9bb84df72808eff4f0c9df60f7e60aa2a2c
2023-09-05 08:51:04 +00:00
Remi NGUYEN VAN
baa2a7f3ab Merge "Factor out remoteauth dependencies to variables" into main am: 9bfa7ac0b9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2705538

Change-Id: Ia639995902ec219d333b60680868b6e59ed32169
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05 05:24:23 +00:00
Junyu Lai
35c69c7986 Address review followup comments for NetworkStats
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
2023-09-04 18:01:14 +08:00
Remi NGUYEN VAN
c41daa4106 Factor out remoteauth dependencies to variables
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
2023-08-31 19:08:17 +09:00
Igor Zaslavsky
378d54c4d5 Merge "Removing SystemApi added in aosp/2685327" into main am: e423ae1076
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2733765

Change-Id: I78bc441c765538098017916007b443671cb95fd6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-31 10:07:08 +00:00
Igor Zaslavsky
edb12a4234 Removing SystemApi added in aosp/2685327
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
2023-08-30 21:17:28 +00:00
Xin Li
4a6c653160 Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: Iff29b090c0b41d0103997a80788f09c2602df074
Change-Id: I5b03523defc88ffbc3aeab9ac8a29b4ca5a11f57
2023-08-25 13:52:17 -07:00
Igor Zaslavsky
ec344f4c18 Add RemoteAuthService
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
2023-08-24 17:50:11 +00:00
Kangping Dong
0dc49df9a4 Merge "[Thread] move Thread into com.android.tethering" into main 2023-08-23 08:37:38 +00:00
Kangping Dong
e7fef8938a [Thread] move Thread into com.android.tethering
Bug: 296211911
Change-Id: Ifd4f7cd06f1aeaba739d27d2328e89031ca73235
2023-08-23 14:28:50 +08:00
Maciej Żenczykowski
359dacfd26 Merge "remove unused TcpTx/RxPackets java & jni constants" into main 2023-08-18 14:49:40 +00:00
Maciej Żenczykowski
b4870c4ce2 Merge "simplify tcpTx/RxPackets" into main 2023-08-18 14:45:56 +00:00
Remi NGUYEN VAN
0a49f9619f Merge "Add remoteauth to API owners" into main 2023-08-15 01:55:11 +00:00
Remi NGUYEN VAN
a2009eaeec Add remoteauth to API owners
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
2023-08-14 20:06:03 +09:00
Maciej Żenczykowski
6f0ec43200 remove unused TcpTx/RxPackets java & jni constants
(is this a valid change from hiddenapi perspective?)

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2dc1c54c56a628770149382f1e25b90a71f62167
2023-08-13 09:32:33 +00:00
Maciej Żenczykowski
66645a8d68 simplify tcpTx/RxPackets
On T+ this is mainline code, and the bpf program (netd.c)
does not support collecting tcp specific stats.

(note: this *is* a behaviour change, as it currently
just always returns 0, but UNSUPPORTED/-1 seems to make
more sense)

Test: TreeHugger
Bug: 294604315
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifda15e67d9167a2be98ab6f4e3817ff7c0bb3fea
2023-08-13 09:31:53 +00:00
Yuyang Huang
00cf7eda31 Enable service offload API
API-Coverage-Bug: 282618639
Bug: 269240366
Test: atest CtsNetTestCases
Change-Id: I7ac72b675ff3715891f31bc03c453e14b1264e40
2023-08-04 19:24:01 +09:00
Yuyang Huang
33fa4d268c Add callbacks for service offload
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
2023-08-04 19:22:15 +09:00
Junyu Lai
23d89c0bbf Deduplicate items after clear interface in NetworkStats
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
2023-08-01 13:38:26 +08:00
Junyu Lai
0b9c0835b9 Refactor grouped by methods
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
2023-08-01 11:32:04 +08:00
Paul Hu
adbb21630d Merge "Remove the ServiceTypeClient after socket destroyed" am: 6f47b7d501 am: 8bdeebe280 am: a512de7f99
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2564390

Change-Id: I7527c465e11c6b1d5a5dec8b7729df2e0d7188c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 13:43:21 +00:00
Paul Hu
f2a51ac5f8 Remove the ServiceTypeClient after socket destroyed
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
2023-05-11 15:17:21 +08:00
Junyu Lai
8666042a78 Merge changes from topic "statsaccess" am: 9d25241337 am: a5b62b7439
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2528763

Change-Id: I858dd58dbd2c9ed415c52b12fce09f748c844fbd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-14 10:57:50 +00:00
Junyu Lai
9d25241337 Merge changes from topic "statsaccess"
* changes:
  Check MAINLINE_NETWORK_STACK as well to make GTS can access proper stats
  Move checkAnyPermissionOf to PermissionUtils
2023-04-14 09:54:49 +00:00