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

Commit d0f3055b authored by Chiachang Wang's avatar Chiachang Wang Committed by Automerger Merge Worker
Browse files

Merge changes from topics "nonAutoIPSelection", "preferredIpProtocol" am:...

Merge changes from topics "nonAutoIPSelection", "preferredIpProtocol" am: ec59bee3 am: a7083f38 am: 084f3b83 am: c20b839c

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2483095



Change-Id: If04549183bc8ae8f3f007fb7814a49688e10fe10
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 54f44943 c20b839c
Loading
Loading
Loading
Loading
+16 −4
Original line number Original line Diff line number Diff line
@@ -3558,10 +3558,22 @@ public class Vpn {
                    + mCurrentToken
                    + mCurrentToken
                    + " to network "
                    + " to network "
                    + underlyingNetwork);
                    + underlyingNetwork);
            final int ipVersion = mProfile.isAutomaticIpVersionSelectionEnabled()

                    ? guessEspIpVersionForNetwork() : ESP_IP_VERSION_AUTO;
            final int ipVersion;
            final int encapType = mProfile.isAutomaticIpVersionSelectionEnabled()
            final int encapType;
                    ? guessEspEncapTypeForNetwork() : ESP_ENCAP_TYPE_AUTO;
            if (mProfile.isAutomaticIpVersionSelectionEnabled()) {
                ipVersion = guessEspIpVersionForNetwork();
                encapType = guessEspEncapTypeForNetwork();
            } else if (mProfile.getIkeTunnelConnectionParams() != null) {
                ipVersion = mProfile.getIkeTunnelConnectionParams()
                        .getIkeSessionParams().getIpVersion();
                encapType = mProfile.getIkeTunnelConnectionParams()
                        .getIkeSessionParams().getEncapType();
            } else {
                ipVersion = ESP_IP_VERSION_AUTO;
                encapType = ESP_ENCAP_TYPE_AUTO;
            }

            final int keepaliveDelaySeconds;
            final int keepaliveDelaySeconds;
            if (mProfile.isAutomaticNattKeepaliveTimerEnabled()) {
            if (mProfile.isAutomaticNattKeepaliveTimerEnabled()) {
                keepaliveDelaySeconds = guessNattKeepaliveTimerForNetwork();
                keepaliveDelaySeconds = guessNattKeepaliveTimerForNetwork();