Commit Graph

6459 Commits

Author SHA1 Message Date
Treehugger Robot
a6d19a4b0b Merge "Add constants of VpnManager events" am: 3cca242ec3 am: b4c82c6f3a am: af3813a332 am: b7260a552a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899036

Change-Id: I88680d5e269e912099919f0693d172e2317942cf
2022-01-13 20:49:53 +00:00
Treehugger Robot
3cca242ec3 Merge "Add constants of VpnManager events" 2022-01-13 19:40:03 +00:00
lucaslin
7cb77f7347 Add constants of VpnManager events
Bug: 191413541
Test: N/A
Change-Id: I1db1419d701940ba74b59f61d510878f08e64c91
2022-01-13 08:19:14 +00:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
James Mattis
3099eade93 Merge "Making NetworkCapabilities @NonNull" am: 1f21e4acf4 am: e8fb563c9a am: ff27afbc45 am: 05426db34d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1941593

Change-Id: I113520a4859c4b5b2bb375346a440ba0cd46126a
2022-01-12 18:35:27 +00:00
Bernardo Rufino
331be9a643 Revert "Migrate unsafe parcel APIs in framework-minus-apex"
This reverts commit 90bb3709dc.

Reason for revert: b/214053959

Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12 17:44:44 +00:00
James Mattis
1f21e4acf4 Merge "Making NetworkCapabilities @NonNull" 2022-01-12 17:43:22 +00:00
Taras Antoshchuk
739eaf1cb9 Merge "Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."" am: bc8f256721 am: 8c3fa67bbd am: 3dafac7b7c am: 0b4f3bd970
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938732

Change-Id: Ie70c2e45055fbc85d083c94f510e6c223ac8dcf1
2022-01-12 16:15:15 +00:00
Taras Antoshchuk
bc8f256721 Merge "Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."" 2022-01-12 15:27:30 +00:00
Benedict Wong
d29b133e24 Merge changes Ib7d51cf1,I92bd2831 am: 179826efdc am: 934206376c am: 1cf64f23de am: 00429ea809
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909600

Change-Id: If73744bfb0bb0b2c11a7fa859f7057e69fd36805
2022-01-12 06:42:01 +00:00
Benedict Wong
179826efdc Merge changes Ib7d51cf1,I92bd2831
* changes:
  Expose APIs to configure underlying network priority
  Update setter/getters to configure underlying network priority
2022-01-12 05:21:03 +00:00
Jean Chalard
ea803f670f Merge "Add documentation about VpnProfile#setExcludeLocalRoutes" am: 649c2ea2d2 am: 95535fcf1d am: 9cc469b54e am: 5524a9c92c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1944533

Change-Id: I53e9d50dd0aafb847c4d2abec1c8932965c56987
2022-01-12 02:47:50 +00:00
Jean Chalard
649c2ea2d2 Merge "Add documentation about VpnProfile#setExcludeLocalRoutes" 2022-01-12 01:30:41 +00:00
Chiachang Wang
c8aec5f1a2 Merge "Only set excludeLocalRoutes in the bypassable VpnProfile" am: b70a0862ff am: bfc4c06f12 am: f1f4773f49 am: 8f7da779d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1944537

Change-Id: I224709966a9ae453c90f3f40e391ab8c844ec708
2022-01-11 14:47:28 +00:00
Chiachang Wang
657656b460 Only set excludeLocalRoutes in the bypassable VpnProfile
fromVpnProfile() will be called in the system server directly.
If the input VpnProfile does not set excludeLocalRoute with a
bypassable VPN, it will crash system server. Thus, only set
the excludeLocalRoutes in the bypassable VpnProfile.

Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I311cc7e3c46ab4f6721f477f227e76ba4c0712f6
2022-01-11 13:46:47 +00:00
Chiachang Wang
bac69433f6 Merge "Allow excludeLocalRoutes set only in bypassable profile" am: eaa3fc76a8 am: e6c1b94120 am: 9d00b2224a am: 3c0d514eab
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938237

Change-Id: I501199d6a3095aceefd7ea9e31e96af3d651efb4
2022-01-11 10:06:20 +00:00
Chiachang Wang
eaa3fc76a8 Merge "Allow excludeLocalRoutes set only in bypassable profile" 2022-01-11 08:56:38 +00:00
Chalard Jean
8f6bd923f9 Add documentation about VpnProfile#setExcludeLocalRoutes
The security implications of this API have to be clarified.

Test: comment-only change
Change-Id: Ifa42dfcda961f7645db7da99a307216d8fe21dca
2022-01-11 16:03:59 +09:00
Taras Antoshchuk
fe5a57e8c4 Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."
Revert "Revert "Revert "Revert "Add VpnServiceBuilderShim for Vp..."

Revert submission 1941195-revert-1931760-reland-vpn-impl-part-2-WGARECSJEM

Reason for revert: fixed merge conflict with aosp/1938197
Reverted Changes:
Ic25e5e4ea:Revert^2 "Revert "Add CTS tests for exclude VPN ro...
Ic72cafcf5:Revert "Revert "Revert "Add APIs that allow to exc...
I53802190a:Revert "Revert "Revert "Add VpnServiceBuilderShim ...

Change-Id: Id3e5f698cf8965fa8386a98bed1fd0170a9e0344
2022-01-10 10:20:29 +00:00
James Mattis
085d59ba47 Making NetworkCapabilities @NonNull
Updating InternalNetworkUpdateRequest to require non-null network
capabilities.

Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: I660d039166451c22ffe5b5e603c649a43b71ebf1
2022-01-08 17:16:24 -08:00
Yan Yan
ac9a6b935f Merge "Rename VcnUnderlyingNetworkPrioirty to VcnUnderlyingNetworkTemplate" am: 60ad179dff am: 6ca0ac41d5 am: 4b5fa75804 am: 62654e3ab8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1923190

Change-Id: I62258729b41a476bbde283f74a68c3829a886af9
2022-01-07 23:36:53 +00:00
Yan Yan
60ad179dff Merge "Rename VcnUnderlyingNetworkPrioirty to VcnUnderlyingNetworkTemplate" 2022-01-07 22:49:41 +00:00
Matt Buckley
2952c72239 Merge "Revert "Revert "Revert "Add APIs that allow to exclude routes fr..."" am: f7a327e8d5 am: 086cbfd1bf am: 366582cbae am: c83c35b7fd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1941194

Change-Id: Ie4bdc7876ab2bc61aff66d1b3c8a72748b3117ad
2022-01-07 18:58:22 +00:00
Matt Buckley
f7a327e8d5 Merge "Revert "Revert "Revert "Add APIs that allow to exclude routes fr..."" 2022-01-07 17:48:45 +00:00
Matt Buckley
7153b105e7 Revert "Revert "Revert "Add APIs that allow to exclude routes fr..."
Revert "Revert "Revert "Add VpnServiceBuilderShim for VpnService..."

Revert submission 1931760-reland-vpn-impl-part-2

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=test_suites_x86_64&lkgb=8053795&lkbb=8053908&fkbb=8053828, bug b/213588956.
BUG: b/213588956
Reverted Changes:
Ic8ed8fce7:Revert "Revert "Add CTS tests for exclude VPN rout...
I07104340a:Revert "Revert "Add VpnServiceBuilderShim for VpnS...
I7c69b7244:Revert "Revert "Add APIs that allow to exclude rou...

Change-Id: Ic72cafcf5c7e2c62236f1cef61b0764882bacaad
2022-01-07 17:44:52 +00:00
Taras Antoshchuk
ddb46412b6 Merge "Revert "Revert "Add APIs that allow to exclude routes from VPN""" am: f4177e94ee am: 464eb8bc19 am: accf4c69a5 am: c159f90aa8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1931085

Change-Id: I5336589d5ddee73e626c6924d48b9b9cfb126a44
2022-01-07 17:21:35 +00:00
Taras Antoshchuk
f4177e94ee Merge "Revert "Revert "Add APIs that allow to exclude routes from VPN""" 2022-01-07 16:27:12 +00:00
Chiachang Wang
f9868455f9 Allow excludeLocalRoutes set only in bypassable profile
If excludeLocalRoutes is set, it means the VPN is not fully-routed.
The bypassable bit should also be set to reflect the behavior
in the VPN profile. Thus, verify it in the constructor to ensure
the behavior.

Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I5d2c7bea2e0d5e77f9241c1efc295b3929e1dae3
2022-01-07 02:32:12 +00:00
Yan Yan
451df7d904 Expose APIs to configure underlying network priority
This commit expose VcnUnderlyingNetworkTemplate classes
and methods to configure those objects in VcnGatewayConnectionConfig.

Those APIs allow callers to configure the underlying network priority
for VCN gateway when VCN is doing route selection. Callers can
construct VcnUnderlyingNeworkTemplate with network requirements and
then set VcnUnderlyingNeworkTemplate list from most preffered to least
preffered in VcnGatewayConnectionConfig.

Bug: 205343355
CTS-Coverage-Bug: 209498272
Test: atest FrameworksVcnTests, CtsVcnTestCases
Test: make update-api
Change-Id: Ib7d51cf1ce562a1acbcb767ec569d7e11c861a1d
2022-01-06 14:51:54 -08:00
Yan Yan
1161a591e7 Update setter/getters to configure underlying network priority
- Update setters for configuring meteredness, roaming and
  opportunistic to take an int instead of a boolean
- Update NetworkPriorityClassifier and tests accordingly

Bug: 206044122
Test: atest FrameworksVcnTests, CtsVcnTestCases
Change-Id: I92bd2831cc42d634d73b842c42d18fa93a4ed46c
2022-01-06 10:52:39 -08:00
Yan Yan
a9eec89e4b Rename VcnUnderlyingNetworkPrioirty to VcnUnderlyingNetworkTemplate
Rename the classes' names as well as the test files.

Bug: 206044122
Test: atest FrameworksVcnTests, CtsVcnTestCases
Change-Id: I19d13acf0e46921a7254a39dff2af332c36ab2b2
2022-01-06 10:52:26 -08:00
Taras Antoshchuk
5b1d7c2ead Revert "Revert "Add APIs that allow to exclude routes from VPN""
This reverts commit 487b2e645a.

Reason for revert: failing build target configuration is fixed

Change-Id: I7c69b7244b4262336e427e4c671aaebb70ddc6ed
2022-01-06 14:49:02 +00:00
Junyu Lai
fb715a951d Merge changes from topics "ms34-tm", "ms40-clock" am: beb9fb3cc8 am: 08c51b04ca am: d312550ff8 am: f23caacaf1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1914533

Change-Id: I7db7bdf217c982ef6011a948b68d238c54e2a47e
2022-01-06 14:39:44 +00:00
Junyu Lai
64c6943777 [MS09] Expose NetworkTemplate APIs which are needed by NetworkPolicy
This change also remove getWifiNetworkKey which should not be exposed
as system API.

Test: atest NetworkTemplateTest
Bug: 204830222
Change-Id: I924f62025a8672167f778ff790cd208c74eed878
2022-01-06 09:22:52 +00:00
Les Lee
d3f1e95245 Merge "wifi data usage: replaced Wi-Fi SSID with a Wi-Fi network key" am: d9862a4d0c am: 154dceeb32 am: 3e524035b9 am: 2e7e0c7894
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1916817

Change-Id: I9e3bc289ac8c3da842e03acd6b7a205371375ab5
2022-01-03 13:12:06 +00:00
Les Lee
d9862a4d0c Merge "wifi data usage: replaced Wi-Fi SSID with a Wi-Fi network key" 2022-01-03 12:36:49 +00:00
Les Lee
6ca5c25bf4 wifi data usage: replaced Wi-Fi SSID with a Wi-Fi network key
1. Used SSID to be a wifi network identity can't separate wifi
data usage when there are two different network with same SSID.
Use a new usage key from WifiInfo to replace wifi SSID to solve
this issue.

2. To support to query wifi usage per configured Wifi network.
Adding matchWifiNetworkKeys in NetworkTemplate to support querying
multi networkKeys wifi data usage since each configured Wifi
network configuration might be used to connect different Wifi
network. (Replace mNetworkId with mMatchWifiNetworkKeys)

3. Updated callers who were using NetworkTemplate constructor.

4. Fixed SortedSet null order case. The null subscriberId is a
valid input for matchSubscriberIds.

5. Replaced ArrayUtils with CollectionUtils.

Bug: 197520752
Bug: 126299427
Test: atest -c NetworkTemplateTest
Test: atest -c NetworkStatsServiceTest
Test: atest -c NetworkPolicyManagerServiceTest
Test: atest -c NetworkPolicyTest
Change-Id: Ie20e7fb56597817901be4ce1d2a7afcbc9ded0c6
2022-01-03 15:13:00 +08:00
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