Commit graph android_packages_modules_Co.../framework
Message SHA1
Merge "Filter out excluded routes in LinkProperties" am: ac8935bee7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1619104

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

Taras Antoshchuk   authored and   Automerger Merge Worker   commited 2022-04-13 12:45:04 +00:00
bb8601a015
Merge "Filter out excluded routes in LinkProperties"
Taras Antoshchuk   authored and   Gerrit Code Review   commited 2022-04-13 12:29:24 +00:00
ac8935bee7
Merge "Add protection for setLocalRoutesExcludedForVpn" am: 620ea6f1fc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2019875

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

Chiachang Wang   authored and   Automerger Merge Worker   commited 2022-04-13 04:36:03 +00:00
24e279166f
Merge "Add protection for setLocalRoutesExcludedForVpn"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-04-13 04:19:42 +00:00
620ea6f1fc
Filter out excluded routes in LinkProperties
Gate presence of excluded routes in LinkProperties on target sdk T.

Bug: 186082280
Test: atest LinkPropertiesTest
Change-Id: If8fdb468a0a4968c5f2a878b7aacfeb4f7d9a9e5

Taras Antoshchuk   commited 2022-04-13 01:17:56 +02:00
30d41e59bc
Merge changes from topic "MDns_AIDL" am: 09475308b7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2049246

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

Paul Hu   authored and   Automerger Merge Worker   commited 2022-04-07 02:42:02 +00:00
06e59627bb
Add MDnsManager
- Have MDnsManager to manage mdns native service binder call.
- Register it as a system service for NsdService.
- NsdService will use aidl to communicate with mdns, so add the
  relevant lib to framework-connectivity
- Add jarjar rule for mdns-aidl-interface classes.

Bug: 209894875
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: Ibc8b726c01a15015b450caf94d0afed570117b7f

paulhu   commited 2022-04-04 15:02:17 +00:00
541b72d03b
Merge "Support QosCallback with UDP socket" am: 2304205a58
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2010317

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

Sewook Seo   authored and   Automerger Merge Worker   commited 2022-03-30 20:19:43 +00:00
19100e4ab4
Merge "Support QosCallback with UDP socket"
Sewook Seo   authored and   Gerrit Code Review   commited 2022-03-30 20:01:45 +00:00
2304205a58
Merge "Add @RequiresPermission for setUnderlyingNetworks" am: 41ed965e68
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1912735

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

Lucas Lin   authored and   Automerger Merge Worker   commited 2022-03-29 16:24:37 +00:00
4f06481872
Merge "Add @RequiresPermission for setUnderlyingNetworks"
Lucas Lin   authored and   Gerrit Code Review   commited 2022-03-29 15:34:17 +00:00
41ed965e68
Improve JavaDoc for FirewallRule constants am: 011a7f51c1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2046447

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

markchien   authored and   Automerger Merge Worker   commited 2022-03-29 08:45:55 +00:00
04b2f3c7df
Improve JavaDoc for FirewallRule constants
Bug: 226946569
Test: TH
Change-Id: I8366bd58194e24da7ea74bf398aae196482d0151

markchien   commited 2022-03-29 12:28:25 +08:00
011a7f51c1
Merge "Api review: change updateFirewallRule to setUidFirewallRule" am: 3d4de57752
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2045104

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

Treehugger Robot   authored and   Automerger Merge Worker   commited 2022-03-29 04:04:12 +00:00
ff33b2e819
Merge "Api review: change updateFirewallRule to setUidFirewallRule"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-03-29 03:41:02 +00:00
3d4de57752
Support QosCallback with UDP socket
Add a constructor for QosSocketInfo using DatagramSocket.

Bug: 203146631
Test: atest & verified on LTE test equipment
Change-Id: I85c091a65610a96d721e4f0b07631867cda4db8a

sewookseo   commited 2022-03-29 02:38:05 +00:00
82657d70d7
Merge history of ConnectivityT
Renamed files/directories:
ConnectivityT/service/Android.bp --> service-t/Sources.bp
ConnectivityT/framework-t/Android.bp --> framework-t/Sources.bp
ConnectivityT/framework-t/aidl-export --> framework/aidl-export
ConnectivityT/service --> service-t
ConnectivityT/framework-t --> framework-t
ConnectivityT/tests --> tests
ConnectivityT/OWNERS --> (removed)

BUG: 222234190
TEST: TH
Ignore-AOSP-First: Move with history done per-branch
Merged-In: I81893df9f327abb84f1561b2b33027a2d23a4d65
Merged-In: I67c703e3f7aa9d5787f032a79ed62e45412baf4f
Change-Id: I27a91f1a94f9d807f92762436f533c4b0d0114d5

Remi NGUYEN VAN   commited 2022-03-25 11:02:45 +00:00
700ffc994f
Api review: change updateFirewallRule to setUidFirewallRule
Bug: 218494748
Test: TH

Change-Id: I52a02ebe109b687359f579c16fded4af3c9cd242
Merged-In: I52a02ebe109b687359f579c16fded4af3c9cd242

markchien   commited 2022-03-25 18:49:08 +08:00
3c04e66da0
Move the DscpPolicy status constants and IntDef to NetworkAgent.
As requested by API council.

Also fix lint errors in the test.

Fix: 217366078
Test: existing tests modified in this CL
Change-Id: I8f7cd0e78bf29aeb52ec6a08a5d635d25fa2205d

Lorenzo Colitti   commited 2022-03-25 01:06:46 +09:00
fbe1576139
Rename destroyAndAwaitReplacement to unregisterAfterReplacement.
Rename requested by API council.

Fix: 224764301
Test: existing CTS tests updated
Change-Id: Ibab9c9cd64bf0dde1e22705e81cff11d356fc719

Lorenzo Colitti   commited 2022-03-24 01:12:26 +09:00
a63e2341d6
Add @RequiresPermission for setUnderlyingNetworks
setUnderlyingNetworks() is mainly for the NetworkAgents who hold
the NETWORK_FACTORY to set its underlying networks.

And the underlying networks are only visible and useful for the
caller of getNetworkCapabilities() or the receiver of
onCapabilitiesChanged() who hold one of NETWORK_FACTORY,
NETWORK_SETTINGS and MAINLINE_NETWORK_STACK permissions.
Otherwise, the underlying networks field will be cleard before
sending.

Bug: 205738644
Test: atest CtsNetTestCases:ConnectivityManagerTest
      atest CtsHostsideNetworkTests:HostsideVpnTests
      atest FrameworksNetTests
Change-Id: Ife7630d9676a31ee5ab977cb1b87aec3b6fd7080

lucaslin   commited 2022-03-22 18:15:09 +08:00
69e1aa9117
Fix proto invalid write type
While dumpProtoLocked is called, InvalidProtocolBufferException
occurred because types are mismatched between platform side and
module side.

netstats.proto was moved into connectivity module, both the
platform(incident.proto) and the module uses protoc-gen-javastream
to generate the Java classes from it. It should be fine since
platform includes the source of the proto, and jarjar the generated
classess in the module to avoid conflict with platform.

Bug: 218566849
Test: adb shell incident 3001
      adb shell dumpsys netstats --proto
      atest CtsIncidentHostTestCases:IncidentdTest#testIncidentReportDumpAuto
Change-Id: I09cae385050e569b1da98ad7de0e226b13ee6895
Merged-In: I09cae385050e569b1da98ad7de0e226b13ee6895

Aaron Huang   commited 2022-03-22 15:07:15 +08:00
dac7e4b84a
Merge changes from topic "QosCallbackException"
* changes:
  CTS test for QosCallbackException
  Expose constructor of Exceptions.

Sewook Seo   authored and   Gerrit Code Review   commited 2022-03-19 00:35:28 +00:00
7a4fcf4ed1
Expose constructor of Exceptions.
Exposing constructor of Exceptions for test purpose.

CTS-Coverage-Bug: 224059548
BUG: 215240597
BUG: 216368595
Test: build
Change-Id: I20af104a891e94873715ab46ecabc3e775638c8c

sewookseo   commited 2022-03-17 18:05:56 +00:00
e7c481452e
Add a method to create a TAP interface without bringing it up.
In S, the behaviour of createTunInterface and createTapInterface
changed so that they bring up the interface before returning it.
This makes it difficult to test code that brings interfaces up
itself, such as IpClient or EthernetManager, because the tests
cannot predict whether that code will see the interface up
or not. This leads to flaky tests and can even make it impossible
to reliably test some behaviour.

Add a method that allows the caller to specify whether to bring
up the interface or not.

Test: new codepath tested by other CL in topic
Test: existing codepaths already well-covered
Change-Id: I0f7698f4dad132f201db4203e65a78c6af564ab2

Lorenzo Colitti   authored and   Xiao Ma   commited 2022-03-17 13:42:34 +00:00
333d5e52f5
Rename setAccessUids to setAllowedUids
Bug: 217725769
Test: ConnectivityServiceTest CtsNetTestCases
Change-Id: Ic8a3f91553d1462b7f54259c467fb90a950bdd59
Merged-In: I8860fbb353eedf5d01e9dc248e4d765046bd562c

Chalard Jean   authored and   Sooraj Sasindran   commited 2022-03-16 17:58:20 +00:00
de665266cd
Merge "Use int array for included and excluded uids"
Sooraj Sasindran   authored and   Gerrit Code Review   commited 2022-03-16 17:56:08 +00:00
2ccbfe9d8f
Merge changes from topic "ethernet_mainline"
* changes:
  Fix the NPE thrown when starting Ethernet service in OS lower than T.
  Remove the stub ethernet service from Connectivity module.
  Update hidden API files for EthernetManager API move.
  Provide a stub ethernet service to build in sc-mainline-prod.
  Build ethernet framework source into framework-connectivity-tiramisu

Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-16 16:03:30 +00:00
6dde8ac532
Use int array for included and excluded uids
Use int array for included and excluded uids so that uses
same data type as in PreferentialNetworkServiceConfig

Bug: 217365439
Test: ran connectivity service unit tests
Change-Id: I9ac7e6498df2fd20b8397b2c110296e019c7389e

Sooraj Sasindran   commited 2022-03-16 07:19:11 +00:00
4904176454
Merge "API review: Additional comment for QosSession."
Sewook Seo   authored and   Gerrit Code Review   commited 2022-03-15 10:10:27 +00:00
c8fadc5cde
Merge "Add a NetworkAgent API to indicate that a network will be replaced."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-03-15 04:44:16 +00:00
9f6e6c4e27
Build ethernet framework source into framework-connectivity-tiramisu
- move ethernet APIs, build it into framework-connectivity-tiramisu
- start ethernet service from ConnectivityServiceInitializer
- fix EthernetManager dependnecy in Tethering module
- fix EthernetNetworkSpecifier dependency in framework-connectivity
- fix the ethernet related config resource

Bug: 210586283
Test: m
Test: atest FrameworksNetTests EthernetServiceTests
Change-Id: I54857b8517649048a343c72797668394d5225766
Merged-In: I54857b8517649048a343c72797668394d5225766

Xiao Ma   commited 2022-03-14 14:06:35 +00:00
0a171c006c
Add a NetworkAgent API to indicate that a network will be replaced.
This is useful for link layers that disconnect but know they will
reconnect to a similar network soon, and do not want the device
to switch to another network until the reconnect happens. An
example is wifi switching to another network that is on a
different subnet without the device switching to cellular data.

This works by immediately destroying the network, so the link
layer can reuse the same interface name for the new network. It
would be possible to delay destroying the network until the new
network connects, but in practice this does not seem useful,
because the if the link layer reuses the interface, then the
interface will be undergoing reconfiguration, and will likely
not be usable for app traffic.

This CL also moves the call to onNetworkDestroyed into
destroyNativeNetwork. This is needed to ensure that the new
API calls onNetworkDestroyed even though most teardown
operations have not happened. This causes onNetworkDestroyed to
happen before the netId is marked free, but that shouldn't cause
any behavioural changes because netId allocation is an
implementation detail of ConnectivityService and is not
observable by apps or system components.

Bug: 216567577
Test: builds, boots
Test: atest FrameworksNetTests FrameworksNetIntegrationTests
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest
Test: atest CtsNetTestCases:android.net.cts.NetworkAgentTest#testDestroyAndAwaitReplacement
Change-Id: I9f9e022fef66b31a29cce560413321075e992756

Lorenzo Colitti   commited 2022-03-14 21:52:37 +09:00
ffa2ed3d1c
Merge "Rename redactNetworkCapabilitiesForPackage and update its javadoc"
Lucas Lin   authored and   Gerrit Code Review   commited 2022-03-14 08:05:08 +00:00
ba61dca57c
API review: Additional comment for QosSession.
Additional comment on getSessionId in QosSession.

Bug: 216368595
Test: build
Change-Id: I0575253ef490e3d456e69816d52075c2d10813f0

sewookseo   authored and   Sewook Seo   commited 2022-03-10 22:28:15 +00:00
5f703feca1
Add protection for setLocalRoutesExcludedForVpn
setLocalRoutesExcludedForVpn() was added in T for local route
exclusion in VPN. It relies on the behavior change in netd which
is inside platform and will not be updated with mainline update.

Add protection on setLocalRoutesExcludedForVpn to prevent the
API misused on SDK before T.

Bug: 223356811
Test: atest FrameworksNetTests
Change-Id: Ic2927f5c335ddd0c3defd4c377542ce6907ab435

Chiachang Wang   commited 2022-03-10 15:46:38 +08:00
9987665d78
Merge "Split updateMeteredNetwork{Allow, Deny}List into add and remove"
Mark Chien   authored and   Gerrit Code Review   commited 2022-03-09 05:00:58 +00:00
cc29690fc1
Split updateMeteredNetwork{Allow, Deny}List into add and remove
Split the updateXXX methods into an addXXX and removeXXX instead of using
a boolean parameter to indicate whether the uid should be added or removed

Bug: 218494748
Test: atest FrameworksNetTests
Change-Id: I868cf35c8f51b25d8719e618c6c48a5cd642da7f

markchien   commited 2022-03-09 11:17:27 +08:00
e46042b833
Merge "Remove ConnectivityManager swapActiveStatsMap API"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-03-08 06:31:23 +00:00
5635d505e0
Merge "API review: Addional documentation for QosFilter"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-03-07 09:45:13 +00:00
3b45bca306
API review: Addional documentation for QosFilter
Improve API document for matchecLocalAddress & matchesRemoteAddress

Bug: 188798655
Test: Build
Change-Id: Ic74e34469677364d3b1aa1fbf802f12c66b22461

sewookseo   authored and   Sewook Seo   commited 2022-03-07 06:56:11 +00:00
4aac074872
Remove ConnectivityManager swapActiveStatsMap API
swapActiveStatsMap is temporary added for the NetworkStatsFactory to
call BpfNetMaps#swapActiveStatsMap in tethering mainline module. Now
NetworkStatsFactory already be mainlined, calling BpfNetMaps#swapActiveStatsMap
directly.

Bug: 218494448
Test: atest ConnectivityCoverageTests
      atest FrameworksNetTests
Change-Id: I3358e4ac5fb7ed0964273afdbccd1b4128ca7645

markchien   commited 2022-03-07 12:25:47 +08:00
49e944cc1c
Merge "Rename getVpnRequiresValidation to isVpnValidationRequired"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-03-03 00:10:54 +00:00
978370cb9c
Rename redactNetworkCapabilitiesForPackage and update its javadoc
The API won't modify the passed NetworkCapabilities and
LinkProperties, but redactNetworkCapabilitiesForPackage and
redactLinkPropertiesForPackage sound like they will. To reduce
the confusion, rename the API with prefix "getRedacted".
Also modify the javadoc to describe more about what the API will
do if the given UID doesn't have location permission.

Bug: 220367512
Test: atest CtsNetTestCases
Change-Id: I964f1062da1ae96df9b369b911486da1379b8a19

lucaslin   commited 2022-03-02 10:56:57 +08:00
d2b0613814
Rename getVpnRequiresValidation to isVpnValidationRequired
Update API name from getVpnRequiresValidation to
isVpnValidationRequired according to API review feedback.

Test: atest FrameworksNetTests
Bug: 220129160
Change-Id: I1025f4c35b320c14e872eaffd7ed82658a5f3d0c

Chiachang Wang   commited 2022-03-02 01:02:45 +00:00
7ec6ae74c8
Rename framework-connectivity-tiramisu to framework-connectivity-t
Bug: 215434166
Test: build, flash, device boot to home.
Merged-In: I9ebedf8813cbfa30d979bc35a3b2306715be682b
Change-Id: I9ebedf8813cbfa30d979bc35a3b2306715be682b

paulhu   commited 2022-03-01 09:44:21 +08:00
537f72061a
Merge changes from topic "ms52-movenetstats"
* changes:
  Update API files to unhide MATCH_PROXY.
  Update tests for NetworkStats code move.
  Add setPollForce to module API
  Add JNI stats libraries to apex Android.bp
  Add JNI stats libraries to connectivity
  [MS62.2] Add NetworkStatsService into service initializer
  [MS54.8] Add hiddenapi-unsupported-t.txt to apex Android.bp
  [MS54.3] Move NetworkStats to updatable sources

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-02-28 05:32:23 +00:00
cebdfba1bb
[MS54.3] Move NetworkStats to updatable sources
This CL builds NetworkStats related codes with the
connectivity module instead of platform.

Test: TH
Bug: 197717846
Change-Id: I4eeb7ea9cfc3139991caf0fc22474e0052a0391c
Merged-In: I4eeb7ea9cfc3139991caf0fc22474e0052a0391c

Junyu Lai   commited 2022-02-28 03:24:19 +00:00
eb6f4bef96
Fix rate limit API review comments
Follow up to aosp/1955583 to fix some review comments.

Test: builds
Bug: 219739904
Change-Id: Ie85dc72eb3bb6eda26b655a64eae0d7c0d8bf143

Patrick Rohr   commited 2022-02-18 09:47:49 +00:00
ca7e578f7e
Merge "Add KeepalivePacketData toString()"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-02-15 10:54:37 +00:00
c05d86b850