Merge "Prevent going through unnecessary networks" am: 836af202e0 am: 7039b0ca8a am: c65f31e0db

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436691

Change-Id: Ide84627fb0e0f04edb7b9078fe3c6dc42bcd5202
This commit is contained in:
Chiachang Wang
2020-10-07 10:02:13 +00:00
committed by Automerger Merge Worker

View File

@@ -2761,7 +2761,10 @@ public class Vpn {
final LinkProperties lp = cm.getLinkProperties(network);
if (lp != null && lp.getAllInterfaceNames().contains(mOuterInterface)) {
final NetworkInfo networkInfo = cm.getNetworkInfo(network);
if (networkInfo != null) mOuterConnection.set(networkInfo.getType());
if (networkInfo != null) {
mOuterConnection.set(networkInfo.getType());
break;
}
}
}
}