Set underlying network as soon as VPN tries using the network

This commit sets the VPN underlying network as soon as VPN
tries using the network.

The existing code sets the VPN underlying network when the
IKE susccessfully migrates to the network. If the migration
fails, the underlying network in the NetworkCapabilities will
stay in the previous network which does not match the system
default network. Also, this will be a confusing information
for apps if apps get the underlying network from the NC of the
VPN network.

Bug: 289606688
Test: atest FrameworksNetTests
Change-Id: I9c3f50f4ea8241f9b51ebea2e097a0085dc2c17d
1 file changed