Do not count defaultOrConfiguredNetwork in #hashCode or #equals

defaultOrConfiguredNetwork should not be counted in @hashCode()
or @equals() because it only reflects the device status at the
IkeSessionParams creation time. The real default network may change
after IkeSessionParams is created.

Also defaultOrConfiguredNetwork is only resolved if caller constructs
IkeSessionParams with a Context or a ConnectivityManager. If we
create two IkeSessionParams with same parameters but one with a
Context, the other without a Context or ConnectivityManager,
counting defaultOrConfiguredNetwork in @hashCode() and #equals()
will make these two objects not equal, which does not make sense.

Bug: 163604823
Test: FrameworksIkeTests(new tests added)
Change-Id: I1e6846e52b45ed5079df411d673e94e1fd8efc80
2 files changed
tree: f7bde55cf87bf8448778e0f670494d649a557036
  1. Android.bp
  3. PREUPLOAD.cfg
  6. apex/
  7. api/
  8. jarjar-rules-shared.txt
  9. jarjar-rules-test.txt
  10. src/
  11. tests/

IKEv2 Library for Android


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.