Commit d070608a authored by Matthew Finkel's avatar Matthew Finkel
Browse files

Bug 25741 - TBA: Do not register Stumbler listener at start up

parent cafe43af
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -96,7 +96,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;
@@ -1011,9 +1012,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
@@ -1074,6 +1079,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);
            }
        }