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

Commit 528c63e5 authored by Lucas Lin's avatar Lucas Lin Committed by Gerrit Code Review
Browse files

Merge "Set underlying networks into NetworkCapabilities directly"

parents 8787386e c7b5ac03
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1270,6 +1270,9 @@ public class Vpn {
            capsBuilder.addCapability(NET_CAPABILITY_NOT_METERED);
        }

        capsBuilder.setUnderlyingNetworks((mConfig.underlyingNetworks != null)
                ? Arrays.asList(mConfig.underlyingNetworks) : null);

        mNetworkCapabilities = capsBuilder.build();
        mNetworkAgent = new NetworkAgent(mContext, mLooper, NETWORKTYPE /* logtag */,
                mNetworkCapabilities, lp,
@@ -1290,8 +1293,6 @@ public class Vpn {
        } finally {
            Binder.restoreCallingIdentity(token);
        }
        mNetworkAgent.setUnderlyingNetworks((mConfig.underlyingNetworks != null)
                ? Arrays.asList(mConfig.underlyingNetworks) : null);
        updateState(DetailedState.CONNECTED, "agentConnect");
    }