Commit graph android_packages_modules_Co.../framework
Message SHA1
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
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
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
* 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
* 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
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
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
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
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
NetworkCapabilities: convert ALL_VALID_CAPABILITIES to long
ALL_VALID_CAPABILITIES should be a long, since there are now 35 NetworkCapabilities that are stored in a bitfield.

This caused NetworkCapabilities to be lost during parceling.

Bug: 291160389
Test: TH
Change-Id: Ia021ba5fd2094fdaec87446c73de2037c920c4f1

Patrick Rohr   commited 2023-07-18 02:35:32 +00:00
200bd72898
Revert^2 "Connectivity: Depend on new httpclient targets"
6333cc4899

Change-Id: I683818ac77e688b4a62b594000bb235a23cbe6df

Stefano Duo   commited 2023-07-17 14:52:16 +00:00
2cf46934c5
Revert "Connectivity: Depend on new httpclient targets"
Revert submission 2647150-httpclient-wrapper

Reason for revert: ndk build break (b/291449552)

Reverted changes: /q/submissionid:2647150-httpclient-wrapper

Change-Id: Ic90a625d105e8ad310eb93758a776ff5b764f67a

Stefano Duo   authored and   Gerrit Code Review   commited 2023-07-17 08:44:56 +00:00
6333cc4899
Connectivity: Depend on new httpclient targets
Bug: 288886953
Change-Id: I23d883cb7d20696651c4bcf309f06cd3dfad397d

Stefano Duo   commited 2023-07-07 14:39:56 +01:00
0fb7f7b787
Correct typo variable
Bug: 196453719
Test: atest FrameworksNetTests
Change-Id: I97604d077433f4c5505912f9cbebab77a43fb548

chiachangwang   authored and   Chiachang Wang   commited 2023-06-15 01:43:07 +00:00
980e767188
Add helper method to generate a v6 NAT-T keepalive packet
This is a part of preliminary work for sending a v6 NAT-T
keepalive packet in a v6 only network. This commit
release the constraint on constructing a v6 NAT-T keepalive
packet.

Bug: 196453719
Test: Manually connect to v6 only network and check if the
      keepalive packets are sent with subsequent commit
Test: atest FrameworksNetTests with the updated test
Change-Id: I9dc96e840265c5dee6b9e3ef2b3901a0aeb4ff9e

chiachangwang   commited 2023-06-13 11:50:13 +00:00
c18f0bbbb3
Set DF flag on NAT-T keepalive packet
This commit
- Set the DF flag on the NAT-T keepalive packet
- Add comment for TTL value
- Do some cleanups

Bug: 196453719
Test: m
Change-Id: I401ae52d8f16e43120210cdea223fd251d53ea3b

chiachangwang   authored and   Chiachang Wang   commited 2023-06-07 02:05:27 +00:00
c6a2f6faf5
Make a v4 nattKeepalivePacket helper method
This is a preparation change for the subsequent changes to
separate the logic for constructing a v4 NAT-T keepalive
packets to a dedicated method.

Bug: 196453719
Test: atest FrameworksNetTests
Change-Id: If72b4875e65a547bbf90367eacce7b145358006a

chiachangwang   authored and   Chiachang Wang   commited 2023-06-07 02:05:10 +00:00
df347448a1
Fix a bug where the PAC proxy port is not set correctly.
Test: new test for this behavior in the preliminary change
Test: FrameworksNetTests NetworkStackTests
Fixes: 138810051
Fixes: 140610528
Change-Id: I95a979d232fb60ece2e33e972bf5d66d20357a1f

Aaron Huang   authored and   Chalard Jean   commited 2023-06-05 20:24:59 +09:00
9fe47bee09
Merge "DO not throw exception for ERROR_NO_SUCH_SLOT error"
Chiachang Wang   authored and   Gerrit Code Review   commited 2023-05-23 07:13:52 +00:00
95336cf4fc
DO not throw exception for ERROR_NO_SUCH_SLOT error
There are multiple independent reasons a keepalive can stop. Some
are software (e.g. the app stops the keepalive) and some are hardware
(e.g. the SIM card gets removed). Therefore, there is a very low
probability that both of these happen at the same time, which would
result in the first stop attempt returning SUCCESS and the second
stop attempt returning NO_SUCH_SLOT. Such a race condition can be
ignored with a log, not to crash the system. Change to wtf log so
that the issue could still be visible since this implies possible
bugs in the system.

Also update the javadoc for SocketKeepalive.ERROR_NO_SUCH_SLOT.

Bug: 281484381
Test: atest FrameworksNetTests
Change-Id: I316a2193fc7302b04e074ff0b03dc43946fe5ce6

chiachangwang   commited 2023-05-23 05:08:45 +00:00
75673ba502
Merge "Improve doc for CSM#setGlobalProxy"
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-05-23 04:04:45 +00:00
b92d8ccd39
LinkProperties: use ordered comparison for P-CSCFs - only on U+
to make sure a mainline update doesn't break devices in the field

Test: TreeHugger
Bug: 268479036
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iadcd861509d31b3ed6352d452a159cd89af479dd

Maciej Żenczykowski   commited 2023-05-18 05:57:51 +00:00
f7939fa8d1
Merge "Fix agents disconnecting in SUSPENDED state."
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-05-17 01:59:18 +00:00
ec4511c8aa
Fix agents disconnecting in SUSPENDED state.
Network state is not changed to disconnected when a networkagent
is disconnected and network state is SUSPENDED.

So the function requiresClat return true. Clat is not stoped.

Bug: 277682237
Test: atest FrameworksNetTests

Change-Id: I5edfcf64aca5d2d34325d722dd29fab41bcf2600

wangshengrjxtjcb   authored and   Motomu Utsumi   commited 2023-05-16 16:35:03 +09:00
fd5d3d90e1
Merge "LinkProperties: use ordered comparison for P-CSCFs."
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-05-15 17:32:01 +00:00
7428de995b
cronet: Move cronet defaults to framework/Android.bp
Since cronet has moved out of the tethering jar.

Test: TH
Change-Id: Ibf476c0afd72863b26188dae6838825e6762976a

Patrick Rohr   commited 2023-05-12 10:15:01 -07:00
740b1d4ac3
LinkProperties: use ordered comparison for P-CSCFs.
P-CSCF list is ordered list. Two lists with same servers but
in different order are not equal. Use proper comparison.

The P-CSCF address is a kind of entry point (proxy) of Server
for IMS transaction between device and IMS Server.  It can have
multiple addresses as a list. Even if the same addresses have
different orders, it is assumed that the server order has changed.

Bug: 268479036
Test: TreeHugger
Change-Id: Ia1884f37739a20d871dd0024cc72cb18c083dc8e

Maciej Żenczykowski   commited 2023-05-07 13:14:15 +00:00
b0fc6627a6
Merge "Expose internal representation of transport types."
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-05-02 06:43:07 +00:00
c745e52e04
Move ConnectivityResources to service-connectivity
The ConnectivityResources class is only usable with QUERY_ALL_PACKAGES
permission, so it is not generally usable in framework-connectivity. It
is also backed by the ServiceConnectivityResources APK, which is
intended as resources for service-connectivity.

Move the class to service-connectivity and update callers. CTS needs a
way to determine the supported keepalive count as it used the
resources from KeepaliveUtils as @hide API, so provide a
ConnectivityManager @hide API for testing.

Bug: 279108992
Test: atest
Change-Id: I3c9a77c580b5ab87c922c32778bce15dc33b4d1d

Remi NGUYEN VAN   authored and   Motomu Utsumi   commited 2023-04-28 19:18:39 +09:00
bee2ee14f3
Expose internal representation of transport types.
Add getTransportTypesInternal as a hidden api for internal callers. This
will be used for any metrics that need to store the transport types of a
network.

Bug: 273451360
Test: atest FrameworksNetTests
Change-Id: I527638e5408e7971a450135345e7e51b6125d665

Hansen Kurli   commited 2023-04-26 13:09:35 +00:00
13189e957d
Merge changes I33bc80cc,Ie84e2cd4
* changes:
  EthernetManagerTest: update tests that bring up tap without carrier
  TestNetworkService: use IFF_NO_CARRIER to bring up iface without carrier

Treehugger Robot   authored and   Gerrit Code Review   commited 2023-04-20 18:01:28 +00:00
fd402476f1
Merge "switch to classic bpf macros"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-04-19 19:37:02 +00:00
ea07e4dff2
Move cronet to framework-connectivity
aosp/2384137 added cronet to framework-tethering.
But framework-connectivity is a better place to put cronet since
cronet does not work on R devices (b/270049141) and
framework-tethering is R+, framework-connectivity is S+.

Followup CLs will move some modules (e.g. CronetJavaPrejarjarDefaults)
that use the branch dependent soong variables to framework/Android.bp

Test: TH
Bug: 278070640
Change-Id: I6bc10116759fb9e083c02147908e53022dab740a

Motomu Utsumi   commited 2023-04-19 11:32:12 +09:00
73e2e87d56
switch to classic bpf macros
Note: this switches
  com_android_networkstack_tethering_util_setupIcmpFilter
over to relative cbpf which in turn is called from:
  com_android_networkstack_tethering_util_setupNaSocket
  com_android_networkstack_tethering_util_setupNsSocket
and tested by p/m/C's:
  TetheringUtilsTest.java - testIcmpSocketFilters()

Test: TreeHugger, atest TetheringUtilsTest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I22a5ea8f8e3b879a37fe4acd84f61020661eaa71

Maciej Żenczykowski   commited 2023-04-19 00:06:15 +00:00
32b46a4d36
Merge "Separate events usage for starting socket keepalives"
Chiachang Wang   authored and   Gerrit Code Review   commited 2023-04-17 02:32:00 +00:00
2cf6b2c4fd