Return "not implemented" error from BindSocketToNetwork properly.
Previously, was only checking the Android SDK version. But it also needs to check for the presence of the connectivity manager service. BUG=webrtc:7026 Review-Url: https://codereview.webrtc.org/2697943002 Cr-Commit-Position: refs/heads/master@{#16631}
This commit is contained in:
@ -114,6 +114,12 @@ public class NetworkMonitor {
|
||||
nativeNetworkObservers.remove(nativeObserver);
|
||||
}
|
||||
|
||||
// Called by the native code to determine if network binding is supported
|
||||
// on this platform.
|
||||
private boolean networkBindingSupported() {
|
||||
return autoDetector != null && autoDetector.supportNetworkCallback();
|
||||
}
|
||||
|
||||
// Called by the native code to get the Android SDK version.
|
||||
private static int androidSdkInt() {
|
||||
return Build.VERSION.SDK_INT;
|
||||
|
||||
@ -469,6 +469,10 @@ public class NetworkMonitorAutoDetect extends BroadcastReceiver {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean supportNetworkCallback() {
|
||||
return connectivityManagerDelegate.supportNetworkCallback();
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows overriding the ConnectivityManagerDelegate for tests.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user