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
tree: 67b5255a5189e269b81dd32d412c038c934f9e43
  1. Android.bp
  2. OWNERS
  3. PREUPLOAD.cfg
  4. README.md
  5. TEST_MAPPING
  6. apex/
  7. api/
  8. jarjar-rules-shared.txt
  9. src/
  10. tests/
README.md

IKEv2 Library for Android

Introduction

This IKEv2 library is an in-process client library implementing the IKEv2 protocol as well as extensions necessary for the support of IWLAN. It is designed to work in a non-privileged fashion on top of the Android IPsec API surface.