From c010e1cb96eb1baa53e7a938b5af349d07a87b7d Mon Sep 17 00:00:00 2001 From: Matthew Finkel Date: Thu, 26 Apr 2018 22:22:51 +0000 Subject: [PATCH] Bug 25741 - TBA: Disable GeckoNetworkManager The browser should not need information related to the network interface or network state, tor should take care of that. --- .../src/main/java/org/mozilla/geckoview/GeckoRuntime.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java index 6023e25123989..804b8f0000e9c 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java @@ -118,14 +118,18 @@ public final class GeckoRuntime implements Parcelable { Log.d(LOGTAG, "Lifecycle: onResume"); // Monitor network status and send change notifications to Gecko // while active. - GeckoNetworkManager.getInstance().start(GeckoAppShell.getApplicationContext()); + if (BuildConfig.TOR_BROWSER_VERSION != "") { + GeckoNetworkManager.getInstance().start(GeckoAppShell.getApplicationContext()); + } } @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE) void onPause() { Log.d(LOGTAG, "Lifecycle: onPause"); // Stop monitoring network status while inactive. - GeckoNetworkManager.getInstance().stop(); + if (BuildConfig.TOR_BROWSER_VERSION != "") { + GeckoNetworkManager.getInstance().stop(); + } } } -- GitLab