Commit graph android_packages_modules_Co.../framework
Message SHA1
Merge "Revert "Revert "[BR07.1] Expose setDataSaverEnabled from Connect..."" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2023-10-25 01:59:12 +00:00
0cfaea8d98
Revert "Revert "[BR07.1] Expose setDataSaverEnabled from Connect..."
Revert submission 2799494-revert-2745215-npmsbpf-OBOPDXREUI

Reason for revert: Need to 1. Merge API first. 2. Wait for prebuilt. 3. Merge the caller.

Reverted changes: /q/submissionid:2799494-revert-2745215-npmsbpf-OBOPDXREUI

Change-Id: Icd5f3d40595a0d2a221b016cec70568bf3597c16

Junyu Lai   commited 2023-10-24 07:30:23 +00:00
df210365fe
Revert "[BR07.1] Expose setDataSaverEnabled from ConnectivityManager"
Revert submission 2745215-npmsbpf

DroidMonitor: Potential culprit for Bug 307256512 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.


Reason for revert: 307256512

Reverted changes: /q/submissionid:2745215-npmsbpf

Change-Id: I27119a7484453d1369bbdf71ad2479edec7d664f

Jordan Silva   authored and   Gerrit Code Review   commited 2023-10-23 13:23:01 +00:00
457ae0f00f
[BR01.1] Support BpfNetMapsReader
A helper class to *read* java BpfMaps. This is designed to
provide direct bpf access in the caller process through
ConnectivityManager APIs.

The change also removes any statical link to
net-utils-device-common-struct from service-connectivity.
This is because net-utils-device-common-struct is already
included in framework-connectivity. Including it again in
service-connectivity would create a r8 build fail by circular
dependency.

Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.net.module.util.StructTest
Test: atest FrameworksNetTests:android.net.connectivity.android.net.BpfNetMapsReaderTest
Bug: 297836825
Change-Id: I7a6d2eb816d0dc7343167bddd672806b199f44fe

Junyu Lai   commited 2023-10-23 20:11:02 +08:00
626045a601
Correct LINT path on UidOwnerMatchType
UidOwnerMatchType Java definition moved from BpfNetMaps.java to
BpfNetMapsConstants.java in change I6d7ea044e43180.

Bug: 297836825
Test: presubmit
Change-Id: I4fc28406750cac9143ea47e9304b455ab616d462

Ken Chen   commited 2023-10-21 01:47:05 +00:00
cf25a54909
[BR07.1] Expose setDataSaverEnabled from ConnectivityManager
Currently, data saver switch is controlled in NPMS, which
calls into NetworkManagementService and netd when switching
status. In netd, BandwidthController manipulates the
bw_data_saver chain to control the overall behavior.

However, this code are all platform implementation, which
are not updatable. In order to migrate data saver switch
from iptables to bpf, this API is needed for Connectivity to
change the implementation to directly write bpf in later
patches.

Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Test: atest FrameworksServicesTests:NetworkManagementServiceTest
Bug: 297836825
Change-Id: I71fa41ca739fef8e191fba91b02758ad5f732d5c

Junyu Lai   commited 2023-10-19 17:43:44 +08:00
c279f1830e
Reapply "Add LocalNetworkConfig"
This reverts commit 6eea22b18c.

Change-Id: I0a2cef4ee992577674c92ecd384dc6f4361afa02

Chalard Jean   commited 2023-10-18 15:50:02 +09:00
f9d0e3e94f
Revert "Add LocalNetworkConfig"
Revert submission 2777667

Reason for revert: DroidMonitor-triggered revert due to breakage, bug b/305187495

Reverted changes: /q/submissionid:2777667

Bug: 305187495

Change-Id: Iae4ef936a4c111ae5668e539ce4cdbbb14c811f4

Anton Kulakov   commited 2023-10-13 15:18:55 +00:00
6eea22b18c
Merge "Add additional overriding methods to signature files" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-10-13 15:05:40 +00:00
d2d3b5dd88
Add LocalNetworkConfig
This doesn't do anything at this patchset, but the whole
pipe from the agent to ConnectivityService is built.

LocalNetworkInfo will be the name of the public information
sent in callbacks to clients.

Test: CSLocalAgentTests
Change-Id: I70e133031ef3b0aaf6c3e59ccc2ad895c66d339c

Chalard Jean   commited 2023-10-13 14:40:45 +09:00
fa21cafc1c
Add additional overriding methods to signature files
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

Paul Duffin   commited 2023-10-12 19:21:07 +01:00
b3c3f2e9d0
Add hidden constants for communicating about local network agents
Test: FrameworksNetTests
Change-Id: Ic490fee6ee70d74acff0a290199b2946817173d0

Chalard Jean   commited 2023-10-12 13:30:49 +09:00
d6f4efb1a8
Merge changes Ibb8d33b7,Ie168fe1f,I9f699b63 into main
* changes:
  Prepare exposing Network{Request,Caps}.forbiddenCapabilities
  Add a keep connected for test reason
  Improvements to CSTest : legacy type, wait for LOST, permissions

Jean Chalard   authored and   Gerrit Code Review   commited 2023-10-12 02:14:52 +00:00
02193c0cce
Prepare exposing Network{Request,Caps}.forbiddenCapabilities
This is useful going forward in particular because there will
be a default forbidden capability for LOCAL_NETWORKS. This
means it will be useful to be able to remove it.

It is also generally useful and we have been wanting to open
this API to the public, so this is a good opportunity to do so.

Test: new tests for NetworkRequest
      NetworkCapabilitiesTest already has tests because it
      already was @SystemApi
Change-Id: Ibb8d33b799f2d274326fd9cd0b05a2c33a18032a

Chalard Jean   commited 2023-10-11 17:02:52 +09:00
cf7dbcae41
Add a keep connected for test reason
This has been sorely needed for a while. Instead of filing requests
for each of your networks in a CSTest, which is fiddly at best and
sometimes almost impossible (because you can't single out the network),
you can now add this flag and be done with it.

Test: CSKeepConnectedTest
Change-Id: Ie168fe1f3a17de035fdf05e3d6580d3262a3448e

Chalard Jean   commited 2023-10-11 17:02:52 +09:00
c517fb1247
Improvements to CSTest : legacy type, wait for LOST, permissions
• Make sure all Agents have a legacy type. This is necessary to
  avoid crashes in LegacyNetworkTracker
• Wait for LOST when disconnecting a network
• Make sure the test package sees its own permissions (importantly
  it can't see background networks otherwise, because it lacks
  CHANGE_NETWORKING_STATE)

Test: in the followup
Change-Id: I9f699b6372a8fe0d5bcd5310d8f35f72e48a6c61

Chalard Jean   commited 2023-10-11 17:02:51 +09:00
026ca940d9
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

Paul Duffin   commited 2023-10-10 17:11:25 +01:00
7bd2d108ea
Merge "wear proxy behind portal" into main am: 6aec2583cd
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2762234

Change-Id: Ib5c5489b6abdf3427ccfa2112908b6d42ffd9961
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Andriy Naborskyy   authored and   Automerger Merge Worker   commited 2023-09-27 17:54:22 +00:00
f891a01eb5
Merge "wear proxy behind portal" into main
Andriy Naborskyy   authored and   Gerrit Code Review   commited 2023-09-27 17:39:30 +00:00
6aec2583cd
Merge "cronet: Remove unused cronet_disabled api directory" into main am: 3f4bf87af6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2745214

Change-Id: I10e69b8c4bb209f83ad63f7fe4c64898c9a69e69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Motomu Utsumi   authored and   Automerger Merge Worker   commited 2023-09-27 08:11:04 +00:00
54aacd4bed
Merge "cronet: Remove unused cronet_disabled api directory" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-09-27 07:42:45 +00:00
3f4bf87af6
wear proxy behind portal
Do not avoid captive portal on wear proxy network; keep network agent
after detecting portal.

Bug: 291112432
Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.ConnectivityServiceTest
Change-Id: I8f6669da62ebd76b6a46d2aec9b3ea563a08cb5e

Andriy Naborskyy   commited 2023-09-27 07:28:05 +00:00
d032dd42ea
Merge "Add test for downstream tethering" into main am: dba0dbc7ec
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2606668

Change-Id: I251696b855e7f971ac740eb70fa86a4158f15c58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2023-09-13 02:09:58 +00:00
ac88cd6df9
Merge "Add test for downstream tethering" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-09-13 01:01:32 +00:00
dba0dbc7ec
Add test for downstream tethering
Add end-to-end testing for testing NsdManager advertising and
discovering works fine with downstream tethering interfaces.

Bug: 281639507
Test: atest NsdManagerTest
Change-Id: I5a66423f216cfe0c82db5128502c885980ab264b

Yuyang Huang   commited 2023-09-12 17:53:37 +09:00
fca402abed
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>

Motomu Utsumi   authored and   Automerger Merge Worker   commited 2023-09-12 08:51:57 +00:00
b2597e6ad5
Merge changes If3217916,I86023b1f into main
* changes:
  Add java_defaults for @FlaggedApi handling
  Prepare api directory for udc mainline branch

Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-09-12 08:25:42 +00:00
c6dc826c22
Merge changes I0afdda02,I1c47f616 into main am: 5f730c6ab5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2460069

Change-Id: I7f6aedf1424751e067e4396016bc525393381487
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Jean Chalard   authored and   Automerger Merge Worker   commited 2023-09-11 19:00:06 +00:00
da62c511c0
Merge changes I0afdda02,I1c47f616 into main
* changes:
  Implement ConnectivityStateMetrics sample
  Add base classes for common ConnectivityService tests.

Jean Chalard   authored and   Gerrit Code Review   commited 2023-09-11 11:32:06 +00:00
5f730c6ab5
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>

Motomu Utsumi   authored and   Automerger Merge Worker   commited 2023-09-11 10:53:38 +00:00
e7b496fcb6
Implement ConnectivityStateMetrics sample
Test: ConnectivitySampleMetricsTest
Change-Id: I0afdda023208c3f8620cb5b89add66448af596d7

Chalard Jean   commited 2023-09-11 17:12:46 +09:00
f95e2de35a
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

Motomu Utsumi   commited 2023-09-11 11:53:46 +09:00
c480039309
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

Motomu Utsumi   commited 2023-09-08 14:47:03 +09:00
310f11acfe
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

Motomu Utsumi   commited 2023-09-08 11:42:21 +09:00
5dcd14569e
cronet: Remove unused cronet_disabled api directory
Test: TH
Change-Id: I183ae6cb802c84e36763215d80e90d4444e38e67

Motomu Utsumi   commited 2023-09-07 16:36:48 +09:00
eaf2db01bb
Merge "Created empty framework-location non-updatable module" into main am: e695330a89
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2727717

Change-Id: Ib8717d99a76d86c3f2795ac56f5f6fbfcd8d45ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Mark White   authored and   Automerger Merge Worker   commited 2023-08-31 17:08:15 +00:00
7cba34582c
Merge "Created empty framework-location non-updatable module" into main
Mark White   authored and   Gerrit Code Review   commited 2023-08-31 16:00:53 +00:00
e695330a89
Created empty framework-location non-updatable module
Bug: 289776578
Test: CtsLocationCoarseTestCases CtsLocationFineTestCases CtsLocationGnssTestCases CtsLocationNoneTestCases CtsLocationPrivilegedTestCases

Change-Id: Ia57b9f10c8f506877003adf1d9b6e7201654921b

Mark White   commited 2023-08-30 20:44:07 +00:00
e4d44639cb
Merge "Split BpfNetMaps constants and utilities into standalone classes" into main am: 50a7ecccf1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2720877

Change-Id: Iffedb0a57c83be761ed01d89ca819f8ec0db1656
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Junyu Lai   authored and   Automerger Merge Worker   commited 2023-08-29 11:16:17 +00:00
597b05f5a0
Merge "Split BpfNetMaps constants and utilities into standalone classes" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2023-08-29 10:44:51 +00:00
50a7ecccf1
Split BpfNetMaps constants and utilities into standalone classes
This is a no-op refactoring that splits constants and utility
methods into standalone classes which will be shared with
a bpf reader class in subsequent CLs.

NO_IFTTT=No-op refactoring

Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.BpfNetMapsTest
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.net.module.util.StructTest

Bug: 297836825
Change-Id: I6d7ea044e43180ae001573009a166be74ebe6a5d

Junyu Lai   commited 2023-08-29 08:20:10 +00:00
29b7b6385a
Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: Iff29b090c0b41d0103997a80788f09c2602df074
Change-Id: I5b03523defc88ffbc3aeab9ac8a29b4ca5a11f57

Xin Li   commited 2023-08-25 13:52:17 -07:00
4a6c653160
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

Igor Zaslavsky   commited 2023-08-24 17:50:11 +00:00
ec344f4c18
Also bundle Cronet telemetry jar
Bug: 284972285
Test: m & atest NetHttpTests
Change-Id: Id24fa826f617187722b329821dae9d9548bf218b

Stefano Duo   commited 2023-08-21 16:51:08 +01:00
2a90733b08
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

Yuyang Huang   commited 2023-08-04 19:22:15 +09:00
33fa4d268c
RemoteAuth Boilerplate
Stub out code and test directories

BUG: 290094832
Test: atest FrameworksNetTests RemoteAuthUnitTests
Change-Id: I850242640f32bea3d46febcde5f3719619b1ea07

Casey Borders   authored and   Salil Rajadhyaksha   commited 2023-07-31 21:41:26 +00:00
13a35ea213
Address comment from ag/12107302
Test: trivial doc-only change
Bug: 140807677
Change-Id: I57440e8b54709a2f0e8c875d30f2c295fa3e1f3d

Chalard Jean   commited 2023-07-27 17:29:18 +09:00
f8d1d6c4f9
NetworkCapabilities: initialize ALL_VALID_CAPABILITIES without loop
This change also removes the MIN_NET_CAPABILITY constant that is not
actually used and can always be re-added in the future (though, I would
imagine that NetworkCapabilities will not be deprecated / removed in
numerical order).

Test: TH
Change-Id: I97ccbc9e915eb74a0ef52c576e16fc8ce8d5b646

Patrick Rohr   commited 2023-07-19 14:24:00 -07:00
7a042d869f
Merge "Deduplicate the isIpv6ULA implementation." into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-07-19 02:25:20 +00:00
4b19802eee
Deduplicate the isIpv6ULA implementation.
Leverage the ConnectivityUtils#isIPv6ULA implementation which is also
accessible for modules, to deduplicate the implementation.

Bug: 183601771
Test: TH
Change-Id: I0943cd76f95e2f54d619015231f68b326194c8b9

Xiao Ma   commited 2023-07-18 20:04:43 +09:00
a74b0066e0