Fix applicationContext passed to NetworkMonitor from NDK being unused.
Bug: webrtc:8769 Change-Id: I7c50f5efece88019b04f8c298f44886ca8258509 Reviewed-on: https://webrtc-review.googlesource.com/60740 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22342}
This commit is contained in:
committed by
Commit Bot
parent
bbf146587a
commit
564299a2a3
@ -110,7 +110,8 @@ public class NetworkMonitor {
|
||||
private void startMonitoring(Context applicationContext, long nativeObserver) {
|
||||
Logging.d(TAG, "Start monitoring with native observer " + nativeObserver);
|
||||
|
||||
startMonitoring(ContextUtils.getApplicationContext());
|
||||
startMonitoring(
|
||||
applicationContext != null ? applicationContext : ContextUtils.getApplicationContext());
|
||||
// The native observers expect a network list update after they call startMonitoring.
|
||||
synchronized (nativeNetworkObservers) {
|
||||
nativeNetworkObservers.add(nativeObserver);
|
||||
|
||||
Reference in New Issue
Block a user