Commit Graph

6422 Commits

Author SHA1 Message Date
Chiachang Wang
e920dac785 Merge "Add configuration whether to exclude local traffic in the VPN" am: 80178db312 am: 0ea8189d38 am: 4974ca5f52 am: ba123cee70
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926899

Change-Id: I431fe80bf87637e50f1cf3023ac59cad9bc8a05c
2021-12-28 08:24:16 +00:00
Chiachang Wang
80178db312 Merge "Add configuration whether to exclude local traffic in the VPN" 2021-12-28 07:45:20 +00:00
Chiachang Wang
de8c621832 Add configuration whether to exclude local traffic in the VPN
Add a extra variable to store whether the local traffic is
exempted from the VPN.

Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I70301901c2374ded9fdf179d0ce64e7bb2d7b1ab
2021-12-28 11:14:01 +08:00
Junyu Lai
e30047b059 Merge "[MS15.1] Remove get/setSubscriberIdMatchRule dependencies" am: d159c1ead7 am: d0c50a49e0 am: 157b8f7a3a am: 5dddce9aa2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926944

Change-Id: I3fc3b45ac97b1f3a60cba1f2700fe7dcd73ad43b
2021-12-23 02:17:58 +00:00
James Mattis
a170912070 Merge changes from topic "railway_stub" am: 9ff27e5802 am: 8a24cce6d2 am: 0b5a0881f3 am: 11a5ed05ef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1923578

Change-Id: Ibfca187222fca09418668466c3e1b0c19b4d47d4
2021-12-23 02:05:09 +00:00
Junyu Lai
d159c1ead7 Merge "[MS15.1] Remove get/setSubscriberIdMatchRule dependencies" 2021-12-23 01:35:00 +00:00
James Mattis
e350f54f94 aidl and Parcelable defintions for eth management
aidl and Parcelable definitions neccessary for internal network
management APIs as related to ethernet interfaces.

Bug: 210485380
Test: make, flash and boot
Change-Id: I5908d21564014c56282dad001da441f5b900b523
2021-12-22 11:10:58 -08:00
Junyu Lai
ed26feb95c [MS15.1] Remove get/setSubscriberIdMatchRule dependencies
Subscriber Id Match Rule won't be exposed as system Api.
Callers should use Builder#setSubscriberIds or
NetworkTemplate#getSubscriberIds to set/get the Subscriber
Ids filter. An empty set in the paremter or return value
represents the intention of matching any Subscriber Ids.

Test: atest NetworkPolicyManagerServiceTest \
      FrameworksNetTests
Bug: 204830222

Change-Id: I12c54280b44c71e4737e82859dfe869794cc9c29
2021-12-22 09:50:44 +00:00
Treehugger Robot
17832397d1 Merge "[MS14] Move isPersistable to NetworkPolicy" am: f421f1dd68 am: 3c4a90eda1 am: 3dd00d784f am: fe17ca0a4b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925762

Change-Id: I63fab97dc3c78143854055427c939aa1f6d674c3
2021-12-21 17:24:02 +00:00
Martijn Coenen
c8de979930 Revert "Added a new network capability MMTEL" am: bcfe8037e2 am: 39beeb7b45 am: 7992c40489 am: 8e2325ad42
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1928147

Change-Id: I80959a07d7b7a9a0e7065887da6d180f588c6cb9
2021-12-21 12:29:53 +00:00
Treehugger Robot
3605f59131 Merge changes from topic "mmtel_capability" am: 4b07c1b401 am: 6ab83e6216 am: 764e5d7fae am: 2e7981b69c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1927643

Change-Id: If7b902a414a9dc88fea2d8269747015d57ec28f5
2021-12-21 12:28:54 +00:00
Martijn Coenen
bcfe8037e2 Revert "Added a new network capability MMTEL"
Revert "Added a new network capability MMTEL"

Revert submission 1927643-mmtel_capability

Reason for revert: b/211586152
Reverted Changes:
Ifea8b1e40:Added a new network capability MMTEL
I38655bef2:Added a new network capability MMTEL
I837606d9e:Added setup/tear down data support
I2c7b291fe:Added a new network capability MMTEL

Change-Id: Ifd818ba06bc8c6a10bf0393243443d049e5d7503
2021-12-21 11:24:01 +00:00
Junyu Lai
96a19bcaba [MS14] Move isPersistable to NetworkPolicy
Since the NetworkTemplate serialization is done in the platform
code. To decide whether the template is persistable should be
also inside the platform along with the serialization logic.

Test: atest NetworkPolicyTest
Bug: 204830222
Change-Id: I15d17dda77e6a3e1ae11275915e3d2f6e2888639
2021-12-21 10:05:47 +00:00
Jack Yu
f705cb8db6 Added a new network capability MMTEL
Added NET_CAPABILITY_MMTEL to indicate a network
support MMTEL (Multimedia telephony). This is for
IMS service to request an IMS network that supports
voice or PS (VoPS for 4G, VoNR for 5G).

Bug: 210774375
Test: atest ConnectivityServiceTest
Change-Id: I2c7b291fee3450f588a282f7a252c183c374becf
(cherry picked from commit 1e6438b43a13c27d0f939ec417dc0a84597fe935)
2021-12-16 22:55:52 +00:00
Ayush Sharma
7fd1f1cc2d Merge "Revert "Add APIs that allow to exclude routes from VPN"" am: da37e0f471 am: d48a67e944 am: 05fad87223 am: e41e71aca7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1927301

Change-Id: I2d6f52d4c11e8b3064f816a4a125ada8b344866c
2021-12-16 15:55:07 +00:00
Xiao Ma
d7db702350 Merge "Move Ethernet related files to f/b/packages/ConnectivityT." am: 23b9aec38e am: 7fbed57e5f am: a4ac725170 am: 6aa5b56fe4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1922218

Change-Id: Iad8c9f7597e60682c5b241b5ebacb9d1aad81dcd
2021-12-16 15:30:08 +00:00
Ayush Sharma
da37e0f471 Merge "Revert "Add APIs that allow to exclude routes from VPN"" 2021-12-16 15:01:30 +00:00
Ayush Sharma
487b2e645a Revert "Add APIs that allow to exclude routes from VPN"
Revert "Suppress NewApi warnings for @SystemApi -> public APIs"

Revert "Add VpnServiceBuilderShim for VpnService.Builder"

Revert submission 1551943-vpn-impl

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=mainline_modules_x86_64-userdebug&lkgb=8007224&lkbb=8008168&fkbb=8007902 >, bug b/210979001
Reverted Changes:
I0e7aa077a:Add VpnServiceBuilderShim for VpnService.Builder
Ib12f5ab39:Suppress NewApi warnings for @SystemApi -> public ...
I59b9185cf:Unhide RouteInfo#getType and related fields
Ie5b62b2b2:Unhide IpPrefix(InetAddress, int)
I993a32d40:Add CTS tests for exclude VPN routes APIs
Ib24b2d3fb:Suppress NewApi warnings for @SystemApi -> public ...
Ic3b10464a:Add APIs that allow to exclude routes from VPN

Change-Id: I89209357ab4bb206d206adcf9fd6d3498ce6ef4c
BUG: 210979001
2021-12-16 14:40:13 +00:00
Xiao Ma
23b9aec38e Merge "Move Ethernet related files to f/b/packages/ConnectivityT." 2021-12-16 14:12:39 +00:00
Taras Antoshchuk
37479d8fcf Merge "Add APIs that allow to exclude routes from VPN" am: 55f030225b am: 1e2f898c30 am: 0cfd695f07 am: a5d20fcf3c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1619406

Change-Id: I6d0a62140e6d8c525bbf0114b52c3b196a97b9d4
2021-12-16 12:05:50 +00:00
Taras Antoshchuk
55f030225b Merge "Add APIs that allow to exclude routes from VPN" 2021-12-16 11:13:33 +00:00
Xiao Ma
dfed81ffde Move Ethernet related files to f/b/packages/ConnectivityT.
ethernet-service is going to be moved into Connectivity mainline module.
Move all ethernet related files in f/b/ to f/b/packages/ConnectivityT so
that it's easier to migrate these files to Connectivity module finally
after clearing the hidden API usages. Below files to be moved:

Ethernet framework related files:
    - EthernetManager.java
    - EthernetNetworkSpecifier.java
    - IEthernetManager.aidl
    - IEthernetServiceListener.aidl
    - ITetheredInterfaceCallback.aidl

Ethernet service related files:
    - IpConfigStore.java(EthernetConfigStore has dependency on the class)

For the ethernet-service related files, keep it as-is temproraliy and
fix the hiden API dependencies in f/opt/net/ethernet/. After this work
is done, then migrating the whole of ethernet folder to Connectivity
module completely.

This CL also fixes some minor errors of code style format to pass the
code style check.

Bug: 210586283
Test: build pass
      atest FrameworksNetTests
      atest EthernetServiceTests
Change-Id: Ib359d29d5221105f648bc4194c6d6dbe4cc6e3e5
2021-12-16 06:59:08 +00:00
Bernardo Rufino
90bb3709dc Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
2021-12-15 18:21:38 +00:00
Treehugger Robot
a172e37813 Merge "Move IpSec associated files to f/b/packages/ConnectivityT" am: 58093bfdec am: 2f8e4526e5 am: 7e305e3242 am: a7ec763cfe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909906

Change-Id: Ia4864df8c20e460a5fe743856e7a9f42f8c6be6b
2021-12-14 09:43:19 +00:00
Aaron Huang
a09ac8b57b Move IpSec associated files to f/b/packages/ConnectivityT
IpSecService is going to be moved into Connectivity mainline module.
Move all ipsec associated files to packages/ConnectivityT so that
it can be easily migrate these files to connectivity module after
clearing the hidden API usages.

Bug: 204153604
Test: build pass
      FrameworksNetTests
      CtsNetTestCases
Change-Id: I562b47f18e345988a2638cf886f86818f9144b91
2021-12-14 14:06:44 +08:00
Taras Antoshchuk
59073f0652 Add APIs that allow to exclude routes from VPN
Add new methods to VpnService.Builder that allow to specify network
routes that should bypass the VPN. Implemented by using RTN_THROW
routes.

Bug: 186082280
Test: atest HostsideVpnTests
Test: atest VpnServiceBuilderTest
Change-Id: Ic3b10464a53a8b56334589acec8f27acdc180ff7
2021-12-13 11:11:00 +01:00
Junyu Lai
456b39de58 Merge "[MS01] Move NetworkTemplate cloud backup functions to NetworkPolicy" am: 40eb40302d am: 895f993439 am: 522e497231 am: b2afbc4490
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1878037

Change-Id: I9a4e8607e9500f427bfad716ddbce0bacd468fd8
2021-12-10 23:20:41 +00:00
Treehugger Robot
79779fcb69 Merge changes from topic "ms07-movestats" am: 942c713c9d am: 6d0a6803c9 am: f626e66561 am: 4e59f54c9e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1895044

Change-Id: Ie8b9eefca78493204ae2d83c1e051f4c2788b5c5
2021-12-10 19:43:44 +00:00
Zhomart Mukhamejanov
1f8b0e54af Merge "Add javadoc to NetworkStats related classes." am: e51a1d0254 am: daa3f0519a am: 7c457bff70 am: a7d3cbaa43
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1917019

Change-Id: Ifcd393b558059c2d153dc2a419b3fe7617004830
2021-12-10 16:26:46 +00:00
Junyu Lai
650ee7a1d1 [MS01] Move NetworkTemplate cloud backup functions to NetworkPolicy
Since NetworkTemplate will be moved into the mainline module.
It is necessary to remove hidden BackupUtil usage from
NetworkTemplate. Also, it is also a hazard to maintain
compatibility for byte buffer interfaces.

Thus, move out these cloud backup functions to NetworkPolicy
to address these concerns.

Test: atest NetworkPolicyTest NetworkPolicyManagerServiceTest
Bug: 204830222
Change-Id: I3ec55f7e419ea13db535acff2457d8e7aaebdce8
2021-12-10 16:11:09 +00:00
Junyu Lai
d82296cf33 [MS08] Move NetworkStats files to f/b/package/ConnectivityT
NetworkStatsService is going to be moved into ConnectivityService
module. Move all related files to packages/ConnectivityT so that
it can be easily migrate these files to connectivity module
after clearing the hidden API usages.

Bug: 197717846
Test: TH
Change-Id: Iead00832b5eb7b1dc40a92027c5a14ae8316b16c
2021-12-10 16:11:08 +00:00
Zhomart Mukhamejanov
e51a1d0254 Merge "Add javadoc to NetworkStats related classes." 2021-12-10 15:21:07 +00:00
Zhomart Mukhamejanov
4de1f6f5a6 Add javadoc to NetworkStats related classes.
Bug: n/a
Test: n/a
Change-Id: If7f4d68ea89adbcbc02c1e0a06a11f6330f5d8f3
2021-12-09 21:28:05 -08:00
Treehugger Robot
d6f843fbc0 Merge "Support parsing VcnGatewayConnectionConfig without UnderlyingNetworkPriorities" am: 1a0f225c83 am: b3a9bce506 am: 17506ed19f am: 5c00b98f7d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1915377

Change-Id: I5bbaf07d75472983c85816e294c62a8f7e13eaa3
2021-12-09 03:03:14 +00:00
Treehugger Robot
1a0f225c83 Merge "Support parsing VcnGatewayConnectionConfig without UnderlyingNetworkPriorities" 2021-12-09 01:56:52 +00:00
Yan Yan
45133d552c Merge "Update #hashCode & #equals with mUnderlyingNetworkPriorities" am: 9df3f48cb0 am: dcd0583719 am: eaba1a12dc am: a45347b812
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1914192

Change-Id: Ieabef02a7cea41f299f4743586722077a946f1c6
2021-12-09 00:08:00 +00:00
Yan Yan
eae9b5d0c4 Support parsing VcnGatewayConnectionConfig without UnderlyingNetworkPriorities
This commit fixes the NullPointerException issue in converting a
PersistableBundle without UnderlyingNetworkPriorities to a
VcnGatewayConnectionConfig, by adding a null check and building
the VcnGatewayConnectionConfig with the default
UnderlyingNetworkPriority list.

Bug: 209142575
Test: atest FrameworksVcnTests (new tests), CtsVcnTestCases
Change-Id: I888d2994c86ba250c3fc9ee1851dccb5e6ef3e77
2021-12-08 12:23:28 -08:00
Yan Yan
9df3f48cb0 Merge "Update #hashCode & #equals with mUnderlyingNetworkPriorities" 2021-12-08 20:15:08 +00:00
Benedict Wong
49a9b619a1 Merge "Add additional IPsec owners" am: c532fc2bde am: ac7bb16ec5 am: 868dc92b01 am: 9557ff9a7b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1910230

Change-Id: Ib3bdddb48e02267bf119576b65840ceceb1be601
2021-12-08 08:18:19 +00:00
Benedict Wong
c532fc2bde Merge "Add additional IPsec owners" 2021-12-08 06:58:55 +00:00
Yan Yan
d3a7de1333 Update #hashCode & #equals with mUnderlyingNetworkPriorities
Update VcnGatewayConnectionConfig to consider
mUnderlyingNetworkPriorities in #hashCode and #equals methods

Rename #setAllowedPlmnIds and #getAllowedPlmnIds
to #setAllowedOperatorPlmnIds and #getAllowedOperatorPlmnIds

Bug: 206044122
Test: atest FrameworksVcnTests(new tests), CtsVcnTestCases
Change-Id: Id16d88024bbb7ef275da0304f2dde1413a18de10
2021-12-07 19:18:05 -08:00
Benedict Wong
c22b15d026 Add additional IPsec owners
Test: Owners file updates only, no code changes.
Change-Id: Ib395c7982525416386f1de395cd0f9fe038fac25
2021-12-07 21:35:18 +00:00
Yan Yan
fcb499b805 Merge "Calculate priority based on caller configurations" am: 36a25527b4 am: 1f79b0cb09 am: 6d347ca8f6 am: 7428a74af7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1906130

Change-Id: I5883e12a215a647b20c0199a5463d79b64617242
2021-12-07 19:26:54 +00:00
Yan Yan
36a25527b4 Merge "Calculate priority based on caller configurations" 2021-12-07 18:10:47 +00:00
Yan Yan
738ed7b7b2 Calculate priority based on caller configurations
Update NetworkPriorityClassifier to calculate priority
according to the VcnUnderlyingNetworkPriority list
configured in VcnGatewayConnectionConfig

Bug: 206044122
Test: atest FrameworksVcnTests(new)
Test: atest CtsVcnTestCses
Change-Id: I55afa916af44db655a568aae2488877f2c177d59
2021-12-06 18:52:23 -08:00
TreeHugger Robot
b3b4df95f6 Merge "NetworkScoreManager deprecation: documentation fixes per API council request" 2021-12-04 03:32:35 +00:00
Yan Yan
a2997303dd Merge changes I5cd2982f,Ia7f44c5f am: 8d6d8dcc4f am: 0ec026914a am: 88d3ad7f03 am: 919a6ef2bf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1902413

Change-Id: Icb691f8a500a6599518036ac77e5343205cc0079
2021-12-02 21:00:26 +00:00
Yan Yan
8d6d8dcc4f Merge changes I5cd2982f,Ia7f44c5f
* changes:
  Support configuring VcnUnderlyingNetworkPriority in VcnGatwayConnectionConfig
  Create VcnCellUnderlyingNetworkPriority
2021-12-02 19:17:33 +00:00
Paul Hu
0ebac1f535 Merge "Centralize nsd associated files" am: 32942299d3 am: 9238a7c49e am: 80425b7eeb am: 29bccff63b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1895244

Change-Id: Ic43cd5dc4ab9f0b98af3750d610cc48dd8860423
2021-12-02 18:48:56 +00:00
Yan Yan
7b7245a6ca Merge "Create VcnUnderlyingNetworkPriority and the subclass for Wifi" am: cc09b29e59 am: 5d69a99ee6 am: a3c6f3bb50 am: 205b8fca07
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1901036

Change-Id: I57e218e05f26f5d4a31e63e30ca3d5e242333fd1
2021-12-02 18:47:35 +00:00