From 2653ae0ef7874febb5add4fc9c58e8d0232ac529 Mon Sep 17 00:00:00 2001 From: Matthew Finkel Date: Wed, 25 Apr 2018 01:55:44 +0000 Subject: [PATCH] Bug 25741 - TBA: Do not register Stumbler listener at start up --- .../base/java/org/mozilla/gecko/GeckoApp.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java index 372687705234e..b9ef91830cb1e 100644 --- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java @@ -95,7 +95,8 @@ import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.mozilla.geckoview.GeckoViewBridge; -import org.mozilla.mozstumbler.service.mainthread.SafeReceiver; +// SafeReceiver excluded at compile-time +//import org.mozilla.mozstumbler.service.mainthread.SafeReceiver; import java.io.File; import java.util.ArrayList; @@ -1001,9 +1002,13 @@ public abstract class GeckoApp extends GeckoActivity // Tell Stumbler to register a local broadcast listener to listen for preference intents. // We do this via intents since we can't easily access Stumbler directly, // as it might be compiled outside of Fennec. - final Intent stumblerIntent = new Intent(getApplicationContext(), SafeReceiver.class); - stumblerIntent.setAction(INTENT_REGISTER_STUMBLER_LISTENER); - getApplicationContext().sendBroadcast(stumblerIntent); + // Tor Browser: We don't want Fennec using or receiving Stumbler + // SafeReceiver excluded at compile-time + //if (!AppConstants.isTorBrowser()) { + // final Intent stumblerIntent = new Intent(getApplicationContext(), SafeReceiver.class); + // stumblerIntent.setAction(INTENT_REGISTER_STUMBLER_LISTENER); + // getApplicationContext().sendBroadcast(stumblerIntent); + //} // Did the OS locale change while we were backgrounded? If so, // we need to die so that Gecko will re-init add-ons that touch @@ -1061,6 +1066,7 @@ public abstract class GeckoApp extends GeckoActivity final String uri = getURIFromIntent(intent); if (!TextUtils.isEmpty(uri)) { // Start a speculative connection as soon as Gecko loads. + // XXX TBA: Check this doesn't leak, and is blocked by Tor bootstrap GeckoThread.speculativeConnect(uri); } } -- GitLab