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