Revert "Android: Generate JNI code for androidnetworkmonitor_jni"
This reverts commit 768e1c0ea1f2077675df31915132a0557aca400e. Reason for revert: Breaks AppRTCMobile. Original change's description: > Android: Generate JNI code for androidnetworkmonitor_jni > > Bug: webrtc:8278 > Change-Id: I8447b2de5ec2610760f7112b6f86e54d94325322 > Reviewed-on: https://webrtc-review.googlesource.com/24520 > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#20796} TBR=magjed@webrtc.org,sakal@webrtc.org Change-Id: I45f8d19abd81386872b7c095ac7eca21fa06077c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:8278,webrtc:8556 Reviewed-on: https://webrtc-review.googlesource.com/24622 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20800}
This commit is contained in:
committed by
Commit Bot
parent
eeb2765f6c
commit
522c1bc6bb
@ -63,7 +63,6 @@ public class NetworkMonitor {
|
||||
/**
|
||||
* Returns the singleton instance.
|
||||
*/
|
||||
@CalledByNative
|
||||
public static NetworkMonitor getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new NetworkMonitor();
|
||||
@ -78,11 +77,12 @@ public class NetworkMonitor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the native code.
|
||||
*
|
||||
* Enables auto detection of the current network state based on notifications
|
||||
* from the system. Note that this requires the embedding app have the
|
||||
* platform ACCESS_NETWORK_STATE permission.
|
||||
*/
|
||||
@CalledByNative
|
||||
private void startMonitoring(long nativeObserver) {
|
||||
Logging.d(TAG, "Start monitoring from native observer " + nativeObserver);
|
||||
nativeNetworkObservers.add(nativeObserver);
|
||||
@ -96,7 +96,7 @@ public class NetworkMonitor {
|
||||
updateObserverActiveNetworkList(nativeObserver);
|
||||
}
|
||||
|
||||
@CalledByNative
|
||||
// Called by the native code.
|
||||
private void stopMonitoring(long nativeObserver) {
|
||||
Logging.d(TAG, "Stop monitoring from native observer " + nativeObserver);
|
||||
nativeNetworkObservers.remove(nativeObserver);
|
||||
@ -106,13 +106,13 @@ public class NetworkMonitor {
|
||||
}
|
||||
}
|
||||
|
||||
// Returns true if network binding is supported on this platform.
|
||||
@CalledByNative
|
||||
// Called by the native code to determine if network binding is supported
|
||||
// on this platform.
|
||||
private boolean networkBindingSupported() {
|
||||
return autoDetector != null && autoDetector.supportNetworkCallback();
|
||||
}
|
||||
|
||||
@CalledByNative
|
||||
// Called by the native code to get the Android SDK version.
|
||||
private static int androidSdkInt() {
|
||||
return Build.VERSION.SDK_INT;
|
||||
}
|
||||
@ -215,16 +215,9 @@ public class NetworkMonitor {
|
||||
return connectionType != ConnectionType.CONNECTION_NONE;
|
||||
}
|
||||
|
||||
@NativeClassQualifiedName("webrtc::jni::AndroidNetworkMonitor")
|
||||
private native void nativeNotifyConnectionTypeChanged(long nativePtr);
|
||||
|
||||
@NativeClassQualifiedName("webrtc::jni::AndroidNetworkMonitor")
|
||||
private native void nativeNotifyOfNetworkConnect(long nativePtr, NetworkInformation networkInfo);
|
||||
|
||||
@NativeClassQualifiedName("webrtc::jni::AndroidNetworkMonitor")
|
||||
private native void nativeNotifyOfNetworkDisconnect(long nativePtr, long networkHandle);
|
||||
|
||||
@NativeClassQualifiedName("webrtc::jni::AndroidNetworkMonitor")
|
||||
private native void nativeNotifyOfActiveNetworkList(
|
||||
long nativePtr, NetworkInformation[] networkInfos);
|
||||
|
||||
|
||||
@ -62,11 +62,6 @@ public class NetworkMonitorAutoDetect extends BroadcastReceiver {
|
||||
public IPAddress(byte[] address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
@CalledByNative("IPAddress")
|
||||
private byte[] getAddress() {
|
||||
return address;
|
||||
}
|
||||
}
|
||||
|
||||
/** Java version of NetworkMonitor.NetworkInformation */
|
||||
@ -82,26 +77,6 @@ public class NetworkMonitorAutoDetect extends BroadcastReceiver {
|
||||
this.handle = handle;
|
||||
this.ipAddresses = addresses;
|
||||
}
|
||||
|
||||
@CalledByNative("NetworkInformation")
|
||||
private IPAddress[] getIpAddresses() {
|
||||
return ipAddresses;
|
||||
}
|
||||
|
||||
@CalledByNative("NetworkInformation")
|
||||
private ConnectionType getConnectionType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@CalledByNative("NetworkInformation")
|
||||
private long getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
@CalledByNative("NetworkInformation")
|
||||
private String getName() {
|
||||
return name;
|
||||
}
|
||||
};
|
||||
|
||||
static class NetworkState {
|
||||
|
||||
Reference in New Issue
Block a user