For VPN network, use the underlying network type as its type.
This is for Android. BUG=webrtc:6748 Review-Url: https://codereview.webrtc.org/2522073003 Cr-Commit-Position: refs/heads/master@{#15218}
This commit is contained in:
@ -288,6 +288,12 @@ public class NetworkMonitorAutoDetect extends BroadcastReceiver {
|
||||
}
|
||||
|
||||
NetworkState networkState = getNetworkState(network);
|
||||
if (networkState.connected && networkState.getNetworkType() == ConnectivityManager.TYPE_VPN) {
|
||||
// If a VPN network is in place, we can find the underlying network type via querying the
|
||||
// active network info thanks to
|
||||
// https://android.googlesource.com/platform/frameworks/base/+/d6a7980d
|
||||
networkState = getNetworkState();
|
||||
}
|
||||
ConnectionType connectionType = getConnectionType(networkState);
|
||||
if (connectionType == ConnectionType.CONNECTION_NONE) {
|
||||
// This may not be an error. The OS may signal a network event with connection type
|
||||
|
||||
Reference in New Issue
Block a user