Skip to content
Snippets Groups Projects
Commit e5f7ab7a authored by akwizgran's avatar akwizgran
Browse files

Disable the Tor plugin by default.

parent eb8ea1a3
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ package net.sf.briar.plugins.tor;
import java.util.concurrent.Executor;
import org.h2.util.StringUtils;
import net.sf.briar.api.android.AndroidExecutor;
import net.sf.briar.api.lifecycle.ShutdownManager;
import net.sf.briar.api.plugins.PluginExecutor;
......@@ -17,6 +19,9 @@ public class TorPluginFactory implements DuplexPluginFactory {
public DuplexPlugin createPlugin(@PluginExecutor Executor pluginExecutor,
AndroidExecutor androidExecutor, Context appContext,
ShutdownManager shutdownManager, DuplexPluginCallback callback) {
// This plugin is not enabled by default
String enabled = callback.getConfig().get("enabled");
if(StringUtils.isNullOrEmpty(enabled)) return null;
return new TorPlugin(pluginExecutor, callback, POLLING_INTERVAL);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment