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
Test: FrameworksIkeTests, CtsIkeTestCases
2 files changed