OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 network_info_by_handle_.clear(); | 323 network_info_by_handle_.clear(); |
324 for (NetworkInformation network : network_infos) { | 324 for (NetworkInformation network : network_infos) { |
325 OnNetworkConnected_w(network); | 325 OnNetworkConnected_w(network); |
326 } | 326 } |
327 } | 327 } |
328 | 328 |
329 rtc::AdapterType AndroidNetworkMonitor::GetAdapterType( | 329 rtc::AdapterType AndroidNetworkMonitor::GetAdapterType( |
330 const std::string& if_name) { | 330 const std::string& if_name) { |
331 auto iter = adapter_type_by_name_.find(if_name); | 331 auto iter = adapter_type_by_name_.find(if_name); |
332 if (iter == adapter_type_by_name_.end()) { | 332 if (iter == adapter_type_by_name_.end()) { |
| 333 LOG(LS_WARNING) << "Get adapter type for an unknown interface: " << if_name; |
333 return rtc::ADAPTER_TYPE_UNKNOWN; | 334 return rtc::ADAPTER_TYPE_UNKNOWN; |
334 } | 335 } |
335 return iter->second; | 336 return iter->second; |
336 } | 337 } |
337 | 338 |
338 rtc::NetworkMonitorInterface* | 339 rtc::NetworkMonitorInterface* |
339 AndroidNetworkMonitorFactory::CreateNetworkMonitor() { | 340 AndroidNetworkMonitorFactory::CreateNetworkMonitor() { |
340 return new AndroidNetworkMonitor(); | 341 return new AndroidNetworkMonitor(); |
341 } | 342 } |
342 | 343 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)( | 376 JOW(void, NetworkMonitor_nativeNotifyOfNetworkDisconnect)( |
376 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor, | 377 JNIEnv* jni, jobject j_monitor, jlong j_native_monitor, |
377 jint network_handle) { | 378 jint network_handle) { |
378 AndroidNetworkMonitor* network_monitor = | 379 AndroidNetworkMonitor* network_monitor = |
379 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor); | 380 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor); |
380 network_monitor->OnNetworkDisconnected( | 381 network_monitor->OnNetworkDisconnected( |
381 static_cast<NetworkHandle>(network_handle)); | 382 static_cast<NetworkHandle>(network_handle)); |
382 } | 383 } |
383 | 384 |
384 } // namespace webrtc_jni | 385 } // namespace webrtc_jni |
OLD | NEW |