Commit Graph

6112 Commits

Author SHA1 Message Date
Lucas Lin
c4d7b9bc36 Merge "Expose TYPE_VPN_* constants" am: d2b8d781f8 am: 1fd78110a4 am: 9c617a1829
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625559

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic2cab78f0920e5805c27b14bef10417d6e018e94
2021-03-11 03:07:13 +00:00
Lucas Lin
d2b8d781f8 Merge "Expose TYPE_VPN_* constants" 2021-03-11 01:30:02 +00:00
lucaslin
62b2252831 Expose TYPE_VPN_* constants
Expose TYPE_VPN_* constants so that connectivity mainline module
can access them.

Bug: 172183305
Test: atest FrameworksNetTests
Change-Id: Ic8d46a392f3deda5983c52b43585707fa2c98f57
2021-03-10 16:57:57 +08:00
Yan Yan
18f2e80fec Merge changes from topic "ike-params" am: a8d51aac66 am: c9e8841bad am: 417108425e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1608535

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I107255ab19d3407f4d7006a01a9a478daa4136ee
2021-03-10 05:18:08 +00:00
Yan Yan
a8d51aac66 Merge changes from topic "ike-params"
* changes:
  Support converting VcnControlPlaneIkeConfig to/from PersistableBundle
  Support converting IKE Options to/from PersistableBundle
  Support converting IkeConfigRequest to/from PersistableBundle
  Support converting IkeAuthEapConfig to/from PersistableBundle
  Support converting IkeAuthDigitalSignConfig to/from PersistableBundle
  Support converting IkeAuthConfig to/from PersistableBundle
  Support converting IkeSessionParams to/from PersistableBundle
2021-03-10 02:31:36 +00:00
Remi NGUYEN VAN
fe73dc1faf Merge "Remove unused buildNetworkIdentity" am: f182642b86 am: eef71ecf11 am: b61beb575e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622670

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifd1c5f5fc46131f6e5b586b76505e7f666547e96
2021-03-10 00:54:43 +00:00
Remi NGUYEN VAN
020348499e Merge "Add Ethernet, TestNetworkSpecifier API" into sc-dev 2021-03-09 22:43:46 +00:00
Remi NGUYEN VAN
7f8fae2b3a Remove unused buildNetworkIdentity
The overload using a NetworkState is now unused.

Bug: 174123988
Change-Id: I22f2d2fffd2d70c08097d3217f01393ff8e75ab5
Test: m
2021-03-09 09:31:21 +00:00
Remi NGUYEN VAN
6d98157012 Add Ethernet, TestNetworkSpecifier API
Rename StringNetworkSpecifier to EthernetNetworkSpecifier (its only
production user), and make it module-lib API.
The original StringNetworkSpecifier file is actually kept to satisfy
some invalid dependencies; it will be removed separately.

This allows specifying an Ethernet interface with a non-deprecated API:
until this change the only way to do so would be to use
NetworkRequest#setSpecifier(String), which is deprecated.

Similarly, add the TestNetworkSpecifier API for TestNetworkManager, to
replace previous usage of StringNetworkSpecifier. TestNetworkManager is
module API, so TestNetworkSpecifier should be module API too. This
allows tests to request the test interface specifically, without using
the deprecated NetworkRequest#setSpecifier(String).

Bug: 179329291
Test: m
Change-Id: Iee569f5c8bbdc4bc979610e1191308281f3d4620
2021-03-09 07:46:48 +00:00
Remi NGUYEN VAN
facfd3bede Merge "Move OemNetworkPreferences to Connectivity" am: 23cca12865 am: 819f20feea am: 8ad13e49a0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620981

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I60a24c0fc878737e120414fe85786faacb425b09
2021-03-08 10:42:05 +00:00
Remi NGUYEN VAN
f9a30cfa4c Move OemNetworkPreferences to Connectivity
The data class supports a ConnectivityManager API, so it should be
together with the ConnectivityManager API surface.

Bug: 181512874
Test: m
Change-Id: I5642486ea0febcb08cadcbd4cd3f0c6056deae0e
2021-03-08 09:26:41 +09:00
Remi NGUYEN VAN
1623f60d39 Merge "Move NetworkState to Connectivity" am: d0355e1be2 am: e878fb157a am: 161b1278f7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620379

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icea1247fd498e8661cb8cba68d34a443004a246d
2021-03-05 12:32:57 +00:00
Junyu Lai
f2a3d989a0 Merge "[FUI23] Remove getNetworkQuotaInfo" am: 0bb7932183 am: 6da7e8ca6c am: 26050067a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1614982

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ideacbf9babef892b5906717ab7778e861a5698bd
2021-03-05 12:31:36 +00:00
Remi NGUYEN VAN
d0355e1be2 Merge "Move NetworkState to Connectivity" 2021-03-05 10:27:57 +00:00
Junyu Lai
0bb7932183 Merge "[FUI23] Remove getNetworkQuotaInfo" 2021-03-05 10:05:06 +00:00
Treehugger Robot
f34a8e1bb2 Merge "[FUI22] Support getAllNetworkStateSnapshot" am: 4c73e05c1d am: 1e1379b245 am: ee3fc01443
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1614779

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52f8339bd1cda35a3f26f28fd3c0165f6f6ff91e
2021-03-05 07:10:46 +00:00
Treehugger Robot
34fe7c1b58 Merge "Make VCN network policy listener oneway" am: dd2877eabe am: 6a95ca0b62 am: 00b31c836d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1619899

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1fce372f232d97b9df5e61c020bcc2932a77292e
2021-03-05 07:07:54 +00:00
Yan Yan
b84834df76 Merge "Revert "Use VERSION_CODES.S instead of VERSION_CODES.R + 1"" am: aef89adfdc am: b331ee3ff7 am: 84047d72cf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1619903

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9c4a57e4a54410dc5a86bdfed009b42c74c088c7
2021-03-05 05:22:50 +00:00
Treehugger Robot
4c73e05c1d Merge "[FUI22] Support getAllNetworkStateSnapshot" 2021-03-05 05:16:43 +00:00
Treehugger Robot
dd2877eabe Merge "Make VCN network policy listener oneway" 2021-03-05 04:25:22 +00:00
Janis Danisevskis
421c5739ea Merge "Keystore 2.0: Make VPN Keystore 2.0 ready." 2021-03-05 02:57:34 +00:00
Yan Yan
aef89adfdc Merge "Revert "Use VERSION_CODES.S instead of VERSION_CODES.R + 1"" 2021-03-05 02:30:21 +00:00
Yan Yan
713ec685cb Revert "Use VERSION_CODES.S instead of VERSION_CODES.R + 1"
This reverts commit 7f13ec417e.

Reason for revert:
1. The BUILD_VERSIONS.S is 1000, and thus it will prevent
   the code from requiring new algorithms on devices whose
   first sdk is 31 (e.g. cuttlefish), though these devices
   should be treated as first launched with SDK S.
2. It will break #testValidationForAlgosAddedInS, because
   the test code is using BUILD_VERSIONS.R to gate the test,
   which is inconsistent with the implementation.

Bug: 181887451
Test: atest IpSecAlgorithmTest
Change-Id: I5cd717c5ebd6086ae5cf9abf76311ae4fca0c6e9
2021-03-05 00:15:15 +00:00
Remi NGUYEN VAN
eb02d4969c Move NetworkState to Connectivity
NetworkState is becoming an internal implementation class, with
NetworkStateSnapshot replacing it as a proper API. Considering this it
belongs inside Connectivity.

Bug: 174123988
Test: m
Change-Id: I201f1a07c50d9da31e33f5c207875da8863ef57c
2021-03-05 08:56:55 +09:00
Yan Yan
f8bce7ede4 Support converting VcnControlPlaneIkeConfig to/from PersistableBundle
Bug: 163604823
Test: FrameworksVcnTests(new tests added)
Change-Id: I38d066949d1543dc6b53a9e00ab6c1d1bd820c5f
2021-03-04 14:19:42 -08:00
Yan Yan
3d9908aa99 Support converting IKE Options to/from PersistableBundle
Bug: 163604823
Test: FrameworksVcnTests(add new tests)
Change-Id: I28cad3cf4d8ccccb8233f76c631db3a302eb320b
2021-03-04 14:15:57 -08:00
Yan Yan
85414c1c24 Support converting IkeConfigRequest to/from PersistableBundle
Bug: 163604823
Test: FrameworksVcnTests(add new tests)
Change-Id: I9a0f7ad91de41749fdf05629bf86bdb010ba13fb
2021-03-04 14:15:42 -08:00
Yan Yan
c3da07fb9c Support converting IkeAuthEapConfig to/from PersistableBundle
Bug: 163604823
Test: FrameworksVcnTests(add new tests)
Change-Id: Ifaddd113d9267664404d75b7e4e5410622bf5d7b
2021-03-04 14:13:32 -08:00
Yan Yan
848568a3ce Support converting IkeAuthDigitalSignConfig to/from PersistableBundle
Bug: 163604823
Test: FrameworksVcnTests(add new tests)
Change-Id: I62cdf4cb0297a394e0c97973e621b5c051ab0192
2021-03-04 13:30:48 -08:00
Yan Yan
ad1715a7d4 Merge changes I65dbc509,I1e338d9c,Ib4a0ed69,Iac7077b4,I9c53d425, ... am: 067b3dffa4 am: df66b72918 am: a688d224cf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1603710

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I11b6770287f670ec3cd9b53339377f0a4cabf14e
2021-03-04 21:01:31 +00:00
Cody Kesting
229a7dbe28 Merge changes from topic "vcn-status-cb" am: dcaf81ebff am: e37cfaa9f1 am: e4b29c4f11
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1597023

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8a248225ce7c7f8090224c873767330b1202234d
2021-03-04 21:00:54 +00:00
Yan Yan
2f0f6b575c Support converting IkeAuthConfig to/from PersistableBundle
Bug: 163604823
Test: FrameworksVcnTests(add new tests)
Change-Id: I97d9a7db423711dbccea412b96f069fe1dbd2779
2021-03-04 12:37:43 -08:00
Yan Yan
067b3dffa4 Merge changes I65dbc509,I1e338d9c,Ib4a0ed69,Iac7077b4,I9c53d425, ...
* changes:
  Support converting IKE ID to/from PersistableBundle
  Support converting EAP-TTLS to/from PersistableBundle
  Support converting EAP-SIM, AKA and AKA' to/from PersistableBundle
  Support converting EapSessionConfig to/from PersistableBundle
  Support converting TunnelModeConfigRequest to/from PersistableBundle
  Support converting TunnelModeChildSessionParams to/from PersistableBundle
  Support converting ChildSaProposal to/from PersistableBundle
  Support converting IkeSaProposal to/from PersistableBundle
2021-03-04 18:30:17 +00:00
Cody Kesting
dcaf81ebff Merge changes from topic "vcn-status-cb"
* changes:
  Call VcnStatusCallback#onVcnStatusChanged on register.
  Remove VcnStatusCallback#onEnteredSafemode().
  Expose APIs for VcnStatusCallback.
2021-03-04 18:09:40 +00:00
junyulai
52facd7e3a [FUI23] Remove getNetworkQuotaInfo
Currently, getNetworkQuotaInfo in NetworkPolicyManagerService
uses NetworkState class, which will not be available after
ConnectivityService moved to mainline module.

Thus, to remove the usage of NetworkState, remove this function
since:
  1. There is no internal usage and the function only prints
     debug log.
  2. It is non-SDK API which annotated with maxTargetSdk = 30,
     callers should not expect it will continoue to work in next
     Android release.
  3. go/nonsdk-dash shows zero usage statistics.

Test: TH
Bug: 174123988
Change-Id: I450964a692b85f3ba89bf9f847e8089ee2445bda
2021-03-04 18:41:09 +08:00
junyulai
6c280634c7 [FUI22] Support getAllNetworkStateSnapshot
Currently, ConnectivityService has getAllNetworkState but it is
not ideal to expose as system API since the plan is to get rid
of NetworkState. Thus, create a new one that returns
NetworkStateSnapshot to fulfill the needs.

Note the original getAllNetworkState cannot be deleted now since
it has @UnsupportedAppUsage annotation.

Test: atest FrameworksNetTests
Bug: 174123988
Change-Id: Icddd434552b0e9ecbc8299e7242ec88cf3145aca
2021-03-04 18:41:09 +08:00
Janis Danisevskis
8cd7953577 Keystore 2.0: Make VPN Keystore 2.0 ready.
* Use public stable API to load certificates from keystore.
* Also use grants to allow racoon to use keystore keys without
  special exceptions in keystore.
* Use LegacyProfileStore instead of Keystore for storing VPN profiles.

Bug: 175068876
Bug: 171305607
Test: atest android.net.cts.Ikev2VpnTest
      atest android.net.cts.IpSecManagerTest
      atest com.android.server.connectivity.VpnTest
      atest com.android.server.ConnectivityServiceTest
Merged-In: I27975113896ea137260a9f94a34fb1c3ca173fe3
Change-Id: I27975113896ea137260a9f94a34fb1c3ca173fe3
2021-03-03 22:14:41 -08:00
Benedict Wong
58467f3fab Make VCN network policy listener oneway
This change ensures that all VCN callbacks and interfaces are
asynchronous, ensuring that the systemserver does not get deadlocked.

Bug: 180968965
Test: atest FrameworksVcnTests
Change-Id: I551137420bbd561ad53a6c06c8f91306901e51f4
2021-03-03 20:37:26 -08:00
Sudheer Shanka
ae0fa6d359 Merge "Add new network process capability." 2021-03-04 03:02:49 +00:00
Yan Yan
67b0387dc7 Support converting IkeSessionParams to/from PersistableBundle
Bug: 163604823
Test: Will be verified in the followup commit
Change-Id: Ia8b97a4cd070a9144f955d48447e1ca2e604801b
2021-03-03 18:47:41 -08:00
Janis Danisevskis
f778d605b5 Merge "Keystore 2.0: Make VPN Keystore 2.0 ready." into sc-dev 2021-03-03 22:28:41 +00:00
Yan Yan
306b326b6e Merge "Use VERSION_CODES.S instead of VERSION_CODES.R + 1" am: b9fdfa8270 am: a5d4ead8ed am: f69232e88b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1606597

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I057bfdf8528b6f801fd5eb7d0757f19e81efa9a0
2021-03-03 20:22:42 +00:00
Automerger Merge Worker
f50a92f410 Merge "Merge "Adding additional docs for OemNetworkPreferences" am: 1258b5fec3 am: a9daf47946" into rvc-qpr-dev-plus-aosp am: 29ad2f4b42
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1606593

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iba0f7e0c3a883d23901283b7fbfe822cdbae4ca6
2021-03-03 20:21:31 +00:00
Cody Kesting
5d623992e9 Remove VcnStatusCallback#onEnteredSafemode().
This CL removes VcnStatusCallback#onEnteredSafeMode(). This method was
previously used to notify callbacks when their VCN entered Safe Mode.
However, this is not needed now that
VcnStatusCallback#onVcnStatusChanged(int) is defined.

Bug: 1597023
Test: atest FrameworksVcnTests
Change-Id: I8e47de9bf6763cd38025a552bee710673dddf843
2021-03-03 10:08:50 -08:00
Cody Kesting
9f925c5fc9 Expose APIs for VcnStatusCallback.
This CL exposes the APIs needed to define VcnStatusCallback as well as
register and unregister them. VcnStatusCallbacks should be registered by
Carrier Apps to receive VCN-related status updates for their configured
VCNs. Potential status updates include a VCN entering safe mode or an
error with an underlying Network.

Bug: 163433613
Test: atest FrameworksVcnTests
Change-Id: I1bf01139d4feea71f650acdbf98c6634c66acbbf
2021-03-03 10:08:49 -08:00
Yan Yan
b9fdfa8270 Merge "Use VERSION_CODES.S instead of VERSION_CODES.R + 1" 2021-03-03 18:04:52 +00:00
James Mattis
1258b5fec3 Merge "Adding additional docs for OemNetworkPreferences" 2021-03-03 17:25:01 +00:00
Janis Danisevskis
4ba2f0c690 Keystore 2.0: Make VPN Keystore 2.0 ready.
* Use public stable API to load certificates from keystore.
* Also use grants to allow racoon to use keystore keys without
  special exceptions in keystore.
* Use LegacyProfileStore instead of Keystore for storing VPN profiles.

Bug: 175068876
Bug: 171305607
Test: atest android.net.cts.Ikev2VpnTest
      atest android.net.cts.IpSecManagerTest
      atest com.android.server.connectivity.VpnTest
      atest com.android.server.ConnectivityServiceTest
Change-Id: I27975113896ea137260a9f94a34fb1c3ca173fe3
2021-03-02 22:56:44 -08:00
Yan Yan
b461146ffb Merge "Support new IpSecAlgorithm AUTH_AES_CMAC" am: 8c7f74fa35 am: d57ace3aa4 am: 2b5329cf52
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579251

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2477f98c4aeaa6059944a204cc14db5b6fb5fc63
2021-03-02 21:35:55 +00:00
Treehugger Robot
4ed07ba929 Merge "[FUI09] Expose NetworkStateSnapshot as system API" am: 4dd42cdd5f am: 8203ac16dc am: 343ddc51b9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536708

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I41be29daeba58378ab374c346684a3d205f0d7c9
2021-03-02 21:10:48 +00:00