summaryrefslogtreecommitdiff
path: root/tests/vcn
AgeCommit message (Collapse)Author
2021-03-22Rename VcnStatusCallback#onVcnStatusChanged.Cody Kesting
Per API Council feedback, VcnStatusCallback#onVcnStatusChanged is renamed to VcnStatusCallback#onStatusChanged. Bug: 182345902 Test: atest FrameworksVcnTests CtsVcnTestCases Change-Id: Ie0277c5f053e1802aa98240618a9d9e8aa6d9d09
2021-03-22Reevaluate VcnGatewayConnections on receiving new configs.Cody Kesting
This CL updates Vcn.java to reevaluate its VcnGatewayConnections when it receives a new VcnConfig. This may result in VcnGatewayConnections being torn down (if their VcnGatewayConnectionConfig is not in the updated VcnConfig) or established (if a NetworkRequest matches a new VcnGatewayConnectionConfig). Bug: 181815405 Test: atest FrameworksVcnTests CtsVcnTestCases Change-Id: I7da60f60e972bd968e1ff4fe416fb9a1d3309a18
2021-03-21Merge changes from topics ↵Treehugger Robot
"revert-1645768-revert-1626206-replaceUidRange-MSYTKFNGUE-HIUTVTIGIR", "ti_redaction" * changes: TransportInfo: Add a generic redaction mechanism Revert "Revert "Expose uids related APIs in NetworkRequest and N..." Revert^2 "Replace the usage of UidRange"
2021-03-19TransportInfo: Add a generic redaction mechanismRoshan Pius
This replaces the existing mechanism for redacting location sensitive fields with a more extensible mechanism. Currently supported redactions are for the following permissions: i. ACCESS_FINE_LOCATION ii. LOCAL_MAC_ADDRESS iii. NETWORK_SETTINGS Also, removed WifiInfo from ConnectivityServiceTest to reduce cross dependencies on wifi code. Bug: 156867433 Bug: 162602799 Test: atest android.net Test: atest com.android.server Change-Id: I2bb980c624667a55c1383f13ab71b9b97ed6eeab
2021-03-18Merge "Hide required underlying caps APIs"Benedict Wong
2021-03-17Hide required underlying caps APIsBenedict Wong
VCN underlying network capabilities should be transport-dependent in order to allow using anything other than the INTERNET capability for VCN types that support wifi offload. Specifically, if underlying network capabilities are not transport-dependent, and Wifi only ever supports the INTERNET capability, the VCN is unable to utilize wifi offload together with requiring NET_CAPABILITY_IMS or NET_CAPABILITY_CBS, since the IMS or CBS capability would be required for both cellular and wifi underlying networks. Until such time as a per-transport capability set is allowed, hide the exposedCapability pieces, and document that all underlying networks MUST have INTERNET capability in order to be used. Bug: 182219992 Test: atest FrameworksVcnTests Test: atest CtsVcnTestCases Change-Id: I50d7f1be42e0e001f1413a3d5fe8aa4b7afec223
2021-03-17Merge "Move LocationPermissionChecker to libs/net"Remi NGUYEN VAN
2021-03-15[NS01] Add NetworkScoreChalard Jean
As attested by numerous TODOs in the code, a new way of representing network quality and policy is needed instead of an int. An int representing the quality of the network requires all parties using it to know how all other parties are using it, and implementation details about the decision algorithm. For all intents and purposes, the selection is left to individual network factories who try to achieve a desired result while piecing together all possible states of the system. As the number of such cases and desires increases, this becomes both intractable and unmaintainable. Indeed, at this time in the codebase nobody can really predict exactly how a given change in score will affect selection across the board, and it is essentially impossible to figure out the behavior of network selection by inspecting the code because the moving parts are scattered throughout the entire codebase. Having an object encapsulating policy and quality values will let us centralize the selection and make it again possible to maintain without knowledge of all behaviors of all network factories. It will also provide better guarantees of respecting policy, and allow bugfixes that were not possible before because they'd touch too many parts of the code. Test: FrameworksNetTests FrameworksWifiTests NetworkStackTests Change-Id: I3185a6412b9b659798faf0c6882699e9c63cc115
2021-03-12Merge "Update Policy Listener API naming."Cody Kesting
2021-03-11Update Policy Listener API naming.Cody Kesting
This CL changes the policy listener API to be VcnNetworkPolicyChangeListener (it was previously VcnNetworkPolicyListener) per API Council guidance. This CL also requires permission NETWORK_FACTORY for removing registered policy listeners. Bug: 181562364 Test: atest FrameworksVcnTests Change-Id: I026eaefa62d8f64b9180fc182a7cf0605d83bf97 Merged-In: I026eaefa62d8f64b9180fc182a7cf0605d83bf97 (cherry picked from commit a96ec13821b9888b4a1b8232e808b74b5449d2c8)
2021-03-10Merge changes Iad296830,I826711bb,Ieb2a9b20,I6b688b00Benedict Wong
* changes: Declare VCN exposed networks as NOT_VCN_MANAGED Allow underlying cell without unwanted NOT_VCN_MANAGED capability Override network and use config IKE session Remove usage of hidden Connectivity APIs
2021-03-10Declare VCN exposed networks as NOT_VCN_MANAGEDBenedict Wong
This change marks VCN-exposed networks as generic use, NOT_VCN_MANAGED networks. This is the result of changes to the default NetworkCapability set, where NOT_VCN_MANAGED was removed from the default capabilities. Bug: 182212201 Test: atest FrameworksVcnTests Change-Id: Iad296830201d7317537fac6bea53c79d4e41cae3
2021-03-10Merge changes from topic "ike-params"Yan Yan
* 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-09Allow underlying cell without unwanted NOT_VCN_MANAGED capabilityBenedict Wong
This change updates the UnderlyingNetworkTracker to rely on the TelephonyNetworkSpecifier for selecting underlying networks. This ensures that there is always a cellular NetworkRequest filed for Cellular to bring up an underlying Network. Bug: 182211364 Test: FrameworksVcnTests Change-Id: I826711bb671440054c2090793315a5f1d57596c0
2021-03-09Override network and use config IKE sessionBenedict Wong
This change ensures the IKE configs are used with the correct network Bug: 163604823 Test: FrameworksVcnTests Change-Id: Ieb2a9b202204577f6e6969ef30245baed6382aa6
2021-03-09Specify exposed capabilities for VCN gateway connection errors.Cody Kesting
This CL updates VCN error callbacks to return the exposed capabilities for a gateway connection for identification purposes. Previously, the required underlying capabilities were returned (which are not meaningful to the caller for identification purposes). Bug: 182281888 Test: atest FrameworksVcnTests Change-Id: Ic62bd0b524f24f2577d9abc7635112a6419d35ed
2021-03-09Move LocationPermissionChecker to libs/netRemi NGUYEN VAN
LocationPermissionChecker was written to be used by multiple connectivity modules, so it belongs in the frameworks/libs/net library. The file is moved as-is with minor modifications in the test to avoid usage of the privileged ActivityManager.getCurrentUser API. Bug: 181837977 Test: atest NetworkStaticLibTests Change-Id: I63bce35ba87c45138b3aaf6244367e982dfec455
2021-03-08Exit Safe Mode when a VCN gets new configs.Cody Kesting
This CL updates VCN instances to exit Safe Mode when they receive a new VcnConfig. When a VCN exits Safe Mode, they will re-register a request listener to receive all cached requests and start the needed VcnGatewayConnections. Bug: 179429339 Test: atest FrameworksVcnTests Change-Id: Id1c2dc287e1ec56f37821cf0ae77f066f22d22bb
2021-03-08Notify VcnStatusCallbacks for VCN start/stop.Cody Kesting
This CL updates VcnManagementService to notify VcnStatusCallbacks when a VCN is started or stopped. VcnStatusCallbacks will also be notified for config changes that cause a VCN to exit Safe Mode. Bug: 180659281 Test: atest FrameworksVcnTests Change-Id: I4168c868185880621333855dfcb51e46cb662741
2021-03-04Support converting VcnControlPlaneIkeConfig to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(new tests added) Change-Id: I38d066949d1543dc6b53a9e00ab6c1d1bd820c5f
2021-03-04Support converting IKE Options to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: I28cad3cf4d8ccccb8233f76c631db3a302eb320b
2021-03-04Support converting IkeConfigRequest to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: I9a0f7ad91de41749fdf05629bf86bdb010ba13fb
2021-03-04Support converting IkeAuthEapConfig to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: Ifaddd113d9267664404d75b7e4e5410622bf5d7b
2021-03-04Support converting IkeAuthDigitalSignConfig to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: I62cdf4cb0297a394e0c97973e621b5c051ab0192
2021-03-04Support converting IkeAuthConfig to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: I97d9a7db423711dbccea412b96f069fe1dbd2779
2021-03-04Merge changes I65dbc509,I1e338d9c,Ib4a0ed69,Iac7077b4,I9c53d425, ...Yan Yan
* 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-03Call VcnStatusCallback#onVcnStatusChanged on register.Cody Kesting
This CL updates VcnMangementService to notify VcnStatusCallbacks on registration with the current status of the VCN for the specified subscription group. Bug: 180659281 Test: atest FrameworksVcnTests Change-Id: Id2c74e855fa12d21d292ee94a72ad047f2d56aca
2021-03-03Remove VcnStatusCallback#onEnteredSafemode().Cody Kesting
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-03Merge changes Ib439bde4,I5bc0fe94,I72abf1e2,Id1813bcbBenedict Wong
* changes: Call setUnderlyingNetwork to complete VCN MOBIKE Rename isRunning to isQuitting, and flip all booleans Notify Vcn of VcnGatewayConnection quits Allow NETWORK_LOST disconnections to retry
2021-03-02Call setUnderlyingNetwork to complete VCN MOBIKEBenedict Wong
This change updates the underlying network for the VCN in order to ensure full MOBIKE switches are handled. Bug: 169788130 Test: atest FrameworksVcnTests Change-Id: Ib439bde4217beeb28f425c08ed9f3376dfe0033c
2021-03-02Rename isRunning to isQuitting, and flip all booleansBenedict Wong
Per code reviews, this may increase readability Bug: 179944275 Test: atest FrameworksVcnTests Change-Id: I5bc0fe946b8da870a8e89f6e07b1d1ade5865710
2021-03-01Notify Vcn of VcnGatewayConnection quitsBenedict Wong
This change updates the Vcn when any GatewayConnection StateMachine quits, removing it from the map of active GatewayConnections, and triggering a re-evaluation of all existing NetworkRequests. This may (in the event of a updated policy) result in an immediate restart. Bug: 179944275 Test: atest FrameworksVcnTests Change-Id: I72abf1e270a772760a17a03173d5a110e15bd01d
2021-03-01Allow NETWORK_LOST disconnections to retryBenedict Wong
This change adds the ability for disconnection requests to specify whether the full VcnGatewayConnection should be torn down. This is useful in cases where the cause is an ephemeral failure, and can be restarted at some later point (eg an underlying network appears, or a new NetworkRequest is filed that brings the VCN up.) Bug: 179944275 Test: atest FrameworksVcnTests Change-Id: Id1813bcbbb80541be97cc383ea9d1fe08554b7ae
2021-03-01Merge "Support converting IkeTrafficSelector to/from PersistableBundle"Yan Yan
2021-03-01Support converting IKE ID to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: I65dbc509f23334df2f22d6c4658e31acc9bef787
2021-03-01Support converting EAP-TTLS to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: I1e338d9c8940636b38f4725787de30fbbc1323ec
2021-03-01Support converting EAP-SIM, AKA and AKA' to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: Ib4a0ed69b57df10c5ede9524d0b03f4f03d68919
2021-03-01Support converting EapSessionConfig to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: Iac7077b4ca37dfc07055aac5b3a8118610a27999
2021-03-01Support converting TunnelModeConfigRequest to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: I9c53d4252edb0e8816c84d280b48c4725bd0edc8
2021-03-01Support converting TunnelModeChildSessionParams to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(add new tests) Change-Id: I4d27ac37ce750930cefa73de25e5deea74591d0e
2021-03-01Support converting ChildSaProposal to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(new tests added) Change-Id: I726a29a65b10b23718fe3b1658d70a8b84cfd2de
2021-03-01Support converting IkeSaProposal to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(new tests added) Change-Id: I108e5a946296f65bbe92549464aa68a2ec453659
2021-02-23Support converting IkeTrafficSelector to/from PersistableBundleYan Yan
Bug: 163604823 Test: FrameworksVcnTests(new tests added) Change-Id: I7b2613d62fa555c3c1eb125a1d971771b954e9ca
2021-02-22Notify VcnStatusCallback#onVcnStatusChanged for Safe Mode.Cody Kesting
This CL updates VcnManagementService to notify callbacks when VCNs enter Safe Mode via #onVcnStatusChanged. Callbacks were previously notified via #onEnteredSafeMode - however, VcnStatusCallbacks were changed to provide more status information by defining onVcnStatusChanged(int) per API Council feedback. Bug: 1597023 Test: atest FrameworksVcnTests Change-Id: I34ef76ec29f4369390449b70b37bc3cf99c09c77
2021-02-22Define VcnStatusCallback#onVcnStatusChanged.Cody Kesting
This CL defines VcnStatusCallback#onVcnStatusChanged for notifying VcnStatusCallbacks when the status of their specified subscription group changes. Specifically, status codes will be provided to notify callbacks when a VCN is started, stopped, enters Safe Mode, and when there are no matching VCNs. Bug: 180659281 Test: atest FrameworksVcnTests Change-Id: Icf686c3da6c5bdeeab88f60495d2ad438fa15692
2021-02-18Change Exception class references to use Class.getName().Cody Kesting
This CL updates references to fully qualified Exception names (such as "java.lang.RuntimeException") to get the Exception name through the Exception's Class Object (e.g. RuntimeException.class.getName()). Bug: 163433613 Test: atest FrameworksVcntests Change-Id: I1ceccedda0a513a8c41caaef752d9f0005eceac0
2021-02-18Define VcnNetworkPolicyListener for VCN transports.Cody Kesting
This CL defines VcnNetworkPolicyListener and VCN Network policy functions for VcnManager. Specifically, VcnNetworkPolicyListeners should be added and removed by Network factories as they bring up and teardown data Networks. VcnNetworkPolicyListeners are used by VcnManagementService to notify transports when they should re-query for their updated VcnNetworkPolicyResults - done via VcnManager#applyVcnNetworkPolicy. Policy results inform transports what the current NetworkCapabilities are based on their VCN policy, and also whether the transport should teardown and restart. Bug: 177020190 Test: atest FrameworksVcnTests Change-Id: Ide2c73025f4ffceabf7955f219a79be5a9bdc0d9
2021-02-18Merge changes I0cadd145,I3be3cac4,I9ea6e9e8Cody Kesting
* changes: Correct comment for safe mode alarm in VcnGatewayConnection. Implement VCN error callback use. Define VcnStatusCallback#onGatewayConnectionError callback.
2021-02-18Merge "Add VcnUnderlyingNetworkSpecifier"Benedict Wong
2021-02-17Implement VCN error callback use.Cody Kesting
This CL updates VcnGatewayConnection to notify VcnManagementService (through Vcn) when errors occur with a gateway. VcnManagementService then notifies registered, permissioned VcnStatusCallbacks via Bug: 163433613 Test: atest FrameworksVcnTests Change-Id: I3be3cac4b591b19a0b0075767fde0ba2eb6e12a2