Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 553f66e2 authored by Andreas Huber's avatar Andreas Huber
Browse files

Instantiate a NetworkChangeNotifier to have chromium transparently handle interface

changes.

Change-Id: If48d2934ce29d68b9c31a1d120fe8f134f277a33
parent 95068be1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ namespace android {
static Mutex gNetworkThreadLock;
static base::Thread *gNetworkThread = NULL;
static scoped_refptr<net::URLRequestContext> gReqContext;
static scoped_ptr<net::NetworkChangeNotifier> gNetworkChangeNotifier;

static void InitializeNetworkThreadIfNecessary() {
    Mutex::Autolock autoLock(gNetworkThreadLock);
@@ -52,6 +53,8 @@ static void InitializeNetworkThreadIfNecessary() {

        gReqContext = new SfRequestContext;

        gNetworkChangeNotifier.reset(net::NetworkChangeNotifier::Create());

        net::AndroidNetworkLibrary::RegisterSharedInstance(
                new SfNetworkLibrary);
    }