summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/net/android_network_library_impl.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/android/net/android_network_library_impl.cc b/android/net/android_network_library_impl.cc
index 8e4aa0e..8f000f1 100644
--- a/android/net/android_network_library_impl.cc
+++ b/android/net/android_network_library_impl.cc
@@ -120,8 +120,9 @@ void AndroidNetworkLibraryImpl::InitWithApplicationContext(JNIEnv* env,
jobject context) {
// Currently ignoring |context| as it is not needed (but remains in signature
// for API consistency with the equivalent method on class AndroidOS).
- net::AndroidNetworkLibrary::RegisterSharedInstance(
- new AndroidNetworkLibraryImpl(env));
+ if (!net::AndroidNetworkLibrary::GetSharedInstance())
+ net::AndroidNetworkLibrary::RegisterSharedInstance(
+ new AndroidNetworkLibraryImpl(env));
}
AndroidNetworkLibraryImpl::AndroidNetworkLibraryImpl(JNIEnv* env)