Commit Graph

6408 Commits

Author SHA1 Message Date
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
Paul Hu
32942299d3 Merge "Centralize nsd associated files" 2021-12-02 01:14:07 +00:00
Yan Yan
fee736f47c Support configuring VcnUnderlyingNetworkPriority in VcnGatwayConnectionConfig
Bug: 206044122
Test: atest FrameworksVcnTests(new tests)
Test: atest CtsVcnTestCases
Change-Id: I5cd2982fcbfe5ce4ee36edb91f1f9f9b55d28d9a
2021-12-01 10:34:02 -08:00
Yan Yan
0376684dea Create VcnCellUnderlyingNetworkPriority
Create VcnCellUnderlyingNetworkPriority to allow VCN callers
to configure network prioritization.

Bug: 206044122
Test: atest FrameworksVcnTests(new tests)
Test: atest CtsVcnTestCases
Change-Id: Ia7f44c5f956ff75c39e20d9761f1bd5c987644ee
2021-12-01 10:33:49 -08:00
Yan Yan
cc09b29e59 Merge "Create VcnUnderlyingNetworkPriority and the subclass for Wifi" 2021-12-01 18:23:23 +00:00
Etan Cohen
2ef9ee0af2 NetworkScoreManager deprecation: documentation fixes per API council request
Bug: 208506915
Test: well, docs aren't generated for SystemAPI
Change-Id: I06ad99e7c0212024067b8f0ef95f3df6abe407b8
2021-12-01 07:27:07 +00:00
Yan Yan
629cb6935e Create VcnUnderlyingNetworkPriority and the subclass for Wifi
Create VcnUnderlyingNetworkPriority and VcnWifiUnderlyingNetworkPriority
to allow VCN callers to configure network prioritization.

Bug: 206044122
Test: atest FrameworksVcnTests(new tests)
Test: atest CtsVcnTestCases
Change-Id: I540f826176c7085780be93e42fdbc3ff0ad537d7
2021-11-30 16:55:55 -08:00
Etan Cohen
def47e0e27 [NETREC] Deprecate NetRec
Bug: 194534319
Test: builds
Change-Id: I4583fa7d9700bab80e5606f9f4aad6b162f8bf47
2021-11-29 17:49:13 +00:00
paulhu
4e690dd40d Centralize nsd associated files
Move all nsd associated files include framework, service and test
to package/Nsd first. After clear all hidden API dependencies, we
can easily migrate these files into connectivity mainline module.

Bug: 206893064
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: Id26f471a10fe7882e31ccc2dbb73219461f00dbd
2021-11-29 23:08:06 +08:00
Treehugger Robot
bf424ed534 Merge "[MS06] Add carrier template fields into cloud backup/restore" 2021-11-26 05:07:26 +00:00
Junyu Lai
4af17682d4 [MS06] Add carrier template fields into cloud backup/restore
NetworkTemplate with MATCH_CARRIER can be created in NPMS,
and can be backup by SettingsBackupAgent. However, since
the meteredness is not stored in the backup. After incorrectly
deducing from match rule, meteredness always becomes
METERED_ALL after restoring from backup.

This change also adds debug log if any non-persistable template
is being backed up.

Test: TH, dedicated test is included in the follow-up CL.
Bug: 204830222

Change-Id: I865b1d6e571ed998a75b776f01afc7c2534af2dc
2021-11-26 03:04:37 +00:00
Remi NGUYEN VAN
d627d9b1ba Merge "Remove AsyncChannel usage in NsdManager" 2021-11-22 05:58:15 +00:00
Maciej Żenczykowski
d94c963551 replace R + 1 with S
Test: TreeHugger
Bug: 170424293
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic28aa1a568bbd0b6d4f06abb7294415afd695fff
2021-11-10 18:16:42 -08:00
Remi NGUYEN VAN
a9d48f666a Remove AsyncChannel usage in NsdManager
Replace AsyncChannel with two AIDL interfaces: INsdManagerCallback and
INsdServiceConnector.

This will be helpful to move NsdManager into a module, avoiding the
dependency on the hidden AsyncChannel utility.

Bug: 190249673
Test: atest FrameworksNetTests CtsNetTestCases:NsdManagerTest
Change-Id: Id9e8feb95cbb5ba16f00893f6c3f37fced3358c1
2021-11-04 17:59:51 +09:00
Les Lee
f9520f6d7d Fix normalize doesn't work on carrier template
From android 12, the subscriberId is being used for different network
types. For instances:
The TYPE_WIFI with subscriberId means that it is a merged wifi network.
The TYPE_CARRIER means that the network associate to specific carrier
network (subscriberId).

So remove the check "isMatchRuleMobile" and only check whether subscriberId
is being used in NetworkTemplate or not.

Bug: 194939211
Test: atest -c NetworkTemplateTest
Change-Id: I80c9f887cf8b4714716d657da92ed273a532ce27
2021-11-04 14:12:09 +08:00