Build IkeSessionParams from PersistableBundle without Context
This CL adds another Builder constructor and allows building
IkeSessionParams without providing a Context. This CL can
support making IkeSessionParams from PersistableBundle without
requring a Context.
There will be a followup CL to deprecate the Builder constructor
that requires a Context and to expose the new constructor.
Previously the Context was used to get a ConnectivityManager and
check the network state when building IkeSessionParams. However
it is unnecessary because an active network should not be required
until IKE client starts the packet exchanges. Also requiring a
Context to build IkeSessionParams makes it hard to store
IkeSessionParams in a Parcelable object like VcnConfig
Bug: 163604823
Test: FrameworksIkeTests, CtsIkeTestCases
Change-Id: If281f574c247b415f1b3bb38eb4264b9a68bd4be
2 files changed