Skip to content

Access TorConnect.quickstart separately from TorSettings.getSettings on Android

In !1342 (merged) we moved the TorSettings.quickstart.enabled setting to TorConnect.quickstart instead.

The main reason is because TorConnect and about:torconnect may need to read the quickstart setting prior to TorSettings initialisation.

For backward compatibility with the android implementation the GeckoView:Tor:SettingsGet request will still return the quickstart.enabled property in the settings object, and similarly GeckoView:Tor:SettingsReady and GeckoView:Tor:SettingsChanged will also include the same. And the latter event will also be triggered for any changes in TorConnect.quickstart.

Eventually, the android implementation should probably remove this compatibility layer and fetch TorConnect.quickstart directly and listen to its change in value separately.

If this was done, it would also mean that android's tor connect UI, which can control TorConnect.quickstart, could be loaded as soon as TorConnect.init returns. I.e. it could call TorConnect.init without first awaiting TorSettings.init, and it wouldn't need to wait for the GeckoView:Tor:SettingsChanged event.

/cc @dan @clairehurst @pierov

OSZAR »