Merge "Make the VPN notice connectivity changes on stacked interfaces." into mnc-dev

This commit is contained in:
Lorenzo Colitti
2015-07-03 02:37:41 +00:00
committed by Android (Google) Code Review

View File

@@ -1135,7 +1135,7 @@ public class Vpn {
final ConnectivityManager cm = ConnectivityManager.from(mContext);
for (Network network : cm.getAllNetworks()) {
final LinkProperties lp = cm.getLinkProperties(network);
if (lp != null && mOuterInterface.equals(lp.getInterfaceName())) {
if (lp != null && lp.getAllInterfaceNames().contains(mOuterInterface)) {
final NetworkInfo networkInfo = cm.getNetworkInfo(network);
if (networkInfo != null) mOuterConnection.set(networkInfo.getType());
}