This change switches from primarily using unwanted(NOT_VCN_MANAGED) to
list-of-subIds. This opens the door for a soft-start, predicated on the
VCN-exposed networks not populating their respective subId fields.
Allowing the potential for soft-start means that the VCN can exit safe
mode without carrier app intervention, when all requested configurations
are active.
Bug: 183174340
Test: atest FrameworksVcnTests
Change-Id: I57ecf4f5f04dc5d15589b17d647661674595b872
- ConnectivityManager will be a part of mainline module, so its
hidden API cannot be called by external caller.
- There is no need to listen onNetworkSuspended() and
onNetworkResumed() because if the network is suspended, then
NET_CAPABILITY_NOT_SUSPENDED will be removed and
onCapabilitiesChanged() will be called and the network capabilities
will be different from the previous one. And when the network is
resumed, NET_CAPABILITY_NOT_SUSPENDED will be added back to the
network capabilities. So the current design can be simplified.
Bug: 182963397
Test: atest FrameworksVcnTests
Change-Id: Ib8f8ea1c95503c946b8229670512af2db8be3165
Merged-In: Ib8f8ea1c95503c946b8229670512af2db8be3165
(cherry-picked from ag/13927656)
This change registers listeners for package installs and uninstalls,
ensuring that changes to app install statuses are reflected in the VCN
Bug: 183465258
Test: atest FrameworksVcnTests
Change-Id: I8d2afd351208cac12392bf945439845cc521b7ec
This change ensures that carrier privileges for the right packages are
always checked.
Bug: 183465199
Test: atest FrameworksVcnTests
Change-Id: If46c660e54870529868a7b4b1e271c9009b81d45
Per API Council feedback, VcnStatusCallback#onVcnStatusChanged is
renamed to VcnStatusCallback#onStatusChanged.
Bug: 182345902
Test: atest FrameworksVcnTests CtsVcnTestCases
Change-Id: Ie0277c5f053e1802aa98240618a9d9e8aa6d9d09
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
* changes:
TransportInfo: Add a generic redaction mechanism
Revert "Revert "Expose uids related APIs in NetworkRequest and N..."
Revert^2 "Replace the usage of UidRange"
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
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
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
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 a96ec13821)
* 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
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
* 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
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
This change ensures the IKE configs are used with the correct network
Bug: 163604823
Test: FrameworksVcnTests
Change-Id: Ieb2a9b202204577f6e6969ef30245baed6382aa6
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
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
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
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
* 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
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
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
* 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
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
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
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