Skip to content
Snippets Groups Projects
Commit 3ab1cc55 authored by clairehurst's avatar clairehurst Committed by Beatriz Rizental
Browse files

fixup! TB 42247: Android helpers for the TorProvider

Bug 43576: Connection Assist on Android Fast Follows (Bug 41188)
Rename to regions
parent fda185fa
No related branches found
No related tags found
1 merge request!1507Rebase Tor Browser onto 136.0a1
......@@ -58,7 +58,7 @@ public class TorAndroidIntegration implements BundleEventListener {
private static final String EVENT_START_AGAIN = "GeckoView:Tor:StartAgain";
private static final String EVENT_QUICKSTART_GET = "GeckoView:Tor:QuickstartGet";
private static final String EVENT_QUICKSTART_SET = "GeckoView:Tor:QuickstartSet";
private static final String EVENT_COUNTRY_NAMES_GET = "GeckoView:Tor:CountryNamesGet";
private static final String EVENT_REGION_NAMES_GET = "GeckoView:Tor:RegionNamesGet";
private static final String CONTROL_PORT_FILE = "/control-ipc";
private static final String SOCKS_FILE = "/socks-ipc";
......@@ -722,13 +722,13 @@ public class TorAndroidIntegration implements BundleEventListener {
return EventDispatcher.getInstance().queryVoid(EVENT_QUICKSTART_SET, bundle);
}
public interface CountryNamesGetter {
void onValue(GeckoBundle regions);
public interface RegionNamesGetter {
void onValue(GeckoBundle regionNames);
}
public void countryNamesGet(CountryNamesGetter countryNamesGetter) {
EventDispatcher.getInstance().queryBundle(EVENT_COUNTRY_NAMES_GET).then(countryNames -> {
countryNamesGetter.onValue(countryNames);
public void regionNamesGet(RegionNamesGetter regionNamesGetter) {
EventDispatcher.getInstance().queryBundle(EVENT_REGION_NAMES_GET).then(regionNames -> {
regionNamesGetter.onValue(regionNames);
return new GeckoResult<Void>();
});
}
......
......@@ -45,7 +45,7 @@ const ListenedEvents = Object.freeze({
startAgain: "GeckoView:Tor:StartAgain",
quickstartGet: "GeckoView:Tor:QuickstartGet",
quickstartSet: "GeckoView:Tor:QuickstartSet",
countryNamesGet: "GeckoView:Tor:CountryNamesGet",
regionNamesGet: "GeckoView:Tor:RegionNamesGet",
});
class TorAndroidIntegrationImpl {
......@@ -205,7 +205,7 @@ class TorAndroidIntegrationImpl {
case ListenedEvents.quickstartSet:
lazy.TorConnect.quickstart = data.enabled;
break;
case ListenedEvents.countryNamesGet:
case ListenedEvents.regionNamesGet:
callback?.onSuccess(lazy.TorConnect.getRegionNames());
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment