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