Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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");
}
......
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