OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 network_info_by_handle_.clear(); | 306 network_info_by_handle_.clear(); |
307 for (NetworkInformation network : network_infos) { | 307 for (NetworkInformation network : network_infos) { |
308 OnNetworkConnected_w(network); | 308 OnNetworkConnected_w(network); |
309 } | 309 } |
310 } | 310 } |
311 | 311 |
312 rtc::AdapterType AndroidNetworkMonitor::GetAdapterType( | 312 rtc::AdapterType AndroidNetworkMonitor::GetAdapterType( |
313 const std::string& if_name) { | 313 const std::string& if_name) { |
314 auto iter = adapter_type_by_name_.find(if_name); | 314 auto iter = adapter_type_by_name_.find(if_name); |
315 if (iter == adapter_type_by_name_.end()) { | 315 if (iter == adapter_type_by_name_.end()) { |
| 316 LOG(LS_WARNING) << "Get adapter type for an unknown interface: " << if_name; |
316 return rtc::ADAPTER_TYPE_UNKNOWN; | 317 return rtc::ADAPTER_TYPE_UNKNOWN; |
317 } | 318 } |
318 return iter->second; | 319 return iter->second; |
319 } | 320 } |
320 | 321 |
321 rtc::NetworkMonitorInterface* | 322 rtc::NetworkMonitorInterface* |
322 AndroidNetworkMonitorFactory::CreateNetworkMonitor() { | 323 AndroidNetworkMonitorFactory::CreateNetworkMonitor() { |
323 return new AndroidNetworkMonitor(); | 324 return new AndroidNetworkMonitor(); |
324 } | 325 } |
325 | 326 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)( | 359 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)( |
359 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor, | 360 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor, |
360 jint network_handle) { | 361 jint network_handle) { |
361 AndroidNetworkMonitor* network_monitor = | 362 AndroidNetworkMonitor* network_monitor = |
362 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor); | 363 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor); |
363 network_monitor->OnNetworkDisconnected( | 364 network_monitor->OnNetworkDisconnected( |
364 static_cast<NetworkHandle>(network_handle)); | 365 static_cast<NetworkHandle>(network_handle)); |
365 } | 366 } |
366 | 367 |
367 } // namespace webrtc_jni | 368 } // namespace webrtc_jni |
OLD | NEW |