+ case "proxy_through_orbot":
+ // Get a handle for `settingsActivity`.
+ Activity settingsActivity = getActivity();
+
+ // Update the proxy. The default is `false`
+ if (sharedPreferences.getBoolean("proxy_through_orbot", false)) { // Orbot proxies on localhost port 8118.
+ OrbotProxyHelper.setProxy(MainWebViewActivity.privacyBrowserContext, settingsActivity, "localhost", "8118");
+ } else { // Disable the proxy by setting the host to `null` and the port to `0`.
+ OrbotProxyHelper.setProxy(MainWebViewActivity.privacyBrowserContext, settingsActivity, "", "0");
+ }
+