webrtc/sdk/android/native_unittests
Jonas Oreland 02293096f9 Reset all maps in AndroidNetworkMonitor Start()/Stop()
This cl/ fixes another race condition with the recent additions
to NetworkMonitorAutoDetect (getAllNetworksFromCache).

The getAllNetworksFromCache-feature uses the by the Android team
preferred way of enumerating networks, i.e to register network listeners.

Th recent fix to add IsAdapterAvailable, https://webrtc-review.googlesource.com/c/src/+/257400
contained a bug in that the adapter_type_by_name_ map was not
reset either on disconnect or Start/Stop.

This cl/ addresses that including unit test.
It also de-obfuscates NetworkMonitor so that it always
calls NotifyOfActiveNetworkList on startMonitoring even
if list.size() == 0. This should not matter but makes
code easier to understand.

Bug: webrtc:13741
Change-Id: I438b877eebf769a8b2e7292b697ef1c0a349b24f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258721
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36530}
2022-04-12 09:28:57 +00:00
..
audio_device Add timestamps to AudioDeviceBuffer::SetRecordedBuffer 2022-01-31 12:32:58 +00:00
codecs Rename ..BitrateThresholds to ..BitrateLimits. 2019-07-03 14:50:46 +00:00
org/webrtc Require 16x16 alignment when using HardwareVideoEncoder for encoding. 2021-10-08 13:15:12 +00:00
peerconnection Remove usage of INFO alias for LS_INFO in log messages 2021-11-04 13:46:17 +00:00
stacktrace Adopt absl::string_view in rtc_base/log_sinks 2022-03-14 12:47:55 +00:00
video Mass refactoring: Change JNI #includes to use full paths (webrtc/). 2019-06-26 08:23:14 +00:00
android_network_monitor_unittest.cc Reset all maps in AndroidNetworkMonitor Start()/Stop() 2022-04-12 09:28:57 +00:00
application_context_provider.cc Mass refactoring: Change JNI #includes to use full paths (webrtc/). 2019-06-26 08:23:14 +00:00
application_context_provider.h Use JavaAudioDeviceModule as default 2019-03-04 13:44:33 +00:00
DEPS Add unit tests for Android audio device module 2018-04-12 09:27:45 +00:00
java_types_unittest.cc Mass refactoring: Change JNI #includes to use full paths (webrtc/). 2019-06-26 08:23:14 +00:00
test_jni_onload.cc Implements JavaToNativeStringMap and adds tests for native API. 2018-02-09 10:34:44 +00:00