Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 42d38ded authored by lucaslin's avatar lucaslin Committed by Hansen Kurli
Browse files

Clear the VPN network preference when error happens

This commit does
- Clear the VPN network preference before the Ikev2VpnRunner
  becomes stale.
- Clear the VPN network preference when the retry delay is higher
  than 5s. The clean work is not suitable for NETWORK_LOST error
  since there might be a window when the underlying network is
  back but the VPN is not connected yet. So keep the rule when
  the underlying network is lost.
- Reset the VPN network preference when starting a new IKE
  session. The rule might be set twice(One is in the constructor,
  and the other is in startOrMigrateIkeSession()) when the IKEv2
  VPN is the first time launched. There is no harm since
  ConnectivityService will always clear the old rule first then
  adding the new rule, which means it's ok for the caller to set
  the same rule multiple times and ConnectivityService can handle
  it well.

Bug: 231749077
Test: atest FrameworksNetTests
Change-Id: I2664b5fb4151e12d2531e950885bcb18e46b23c6
parent 3b84c2ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment