Skip to content
Commit fae5b698 authored by lucaslin's avatar lucaslin Committed by Lucas Lin
Browse files

Clear the information of the underlying network

The NetworkCapabilities and LinkProperties of the underlying
network should be cleared when there is a new underlying network.

Currently, Vpn.java only clear both NetworkCapabilities and
LinkProperties of the underlying when onLost() is called or when
the VPN is disconnected. But onLost() won't be fired if the device
is connected to mobile data first, then connects to wifi later.
For this case, both mUnderlyingNetworkCapabilities and mUnderlyingLinkProperties keep the old value until onLinkPropertiesChanged() and onNetworkCapabilitiesChanged() are
called.

Test: atest FrameworksNetTests
Change-Id: I5caa1e0217190062eb84a064bb1bb3aff725dd66
parent b963d9a0
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