Bug 43408: Android implementation for TorConnect.quickstart in place of TorSettings.getSettings
Merge Info
Issues
Resolves
Merging
Target Branches
-
tor-browser
-!fixups
totor-browser
-specific commits, new features, security backports -
base-browser
andmullvad-browser
-!fixups
tobase-browser
-specific commits, new features to be shared withmullvad-browser
, and security backports-
⚠️ IMPORTANT: Please list thebase-browser
-specific commits which need to be cherry-picked to thebase-browser
andmullvad-browser
branches here
-
Target Channels
-
Alpha: esr128-14.5 -
Stable: esr128-14.0 -
Legacy: esr115-13.5
Backporting
Timeline
-
No Backport (preferred): patchset for the next major stable -
Immediate: patchset needed as soon as possible (fixes CVEs, 0-days, etc) -
Next Minor Stable Release: patchset that needs to be verified in nightly before backport -
Eventually: patchset that needs to be verified in alpha before backport
(Optional) Justification
-
Security update: patchset contains a security fix (be sure to select the correct item in Timeline) -
Censorship event: patchset enables censorship circumvention -
Critical bug-fix: patchset fixes a bug in core-functionality -
Consistency: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc -
Sponsor required: patchset required for sponsor -
Localization: typos and other localization changes that should be also in the release branch -
Other: please explain
Issue Tracking
-
Link resolved issues with appropriate Release Prep issue for changelog generation
Review
Request Reviewer
-
Request review from an applications developer depending on modified system: -
NOTE: if the MR modifies multiple areas, please
/cc
all the relevant reviewers (since Gitlab only allows 1 reviewer) - accessibility : henry
- android : clairehurst, dan
- build system : boklm
- extensions : ma1
- firefox internals (XUL/JS/XPCOM) : jwilde, ma1
- fonts : pierov
- frontend (implementation) : henry
- frontend (review) : donuts, morgan
- localization : henry, pierov
- macOS : clairehurst, dan
- nightly builds : boklm
- rebases/release-prep : dan, ma1, pierov, morgan
- security : jwilde, ma1
- signing : boklm, morgan
- updater : pierov
- windows : jwilde, morgan
- misc/other : pierov, morgan
-
NOTE: if the MR modifies multiple areas, please
Change Description
Added TorConnect.quickstart in place of TorSettings.getSettings.quickstart (which was removed). Added a QuickstartViewModel that holds quickstart. It interacts with TorIntegrationAndroid.Java. Added quickstart functionality in TorIntegrationAndroid.Java, TorAndroidIntegration.sys.mjs, and TorConnect.sys.mjs based on @pierov's recommendations and code snippets.
Removed unneeded QuickStartPreference wrapper for SwitchPreference in favor of directly using a SwitchPreference and modifying its behavior in SettingsFragment. It was getting in the way of getting a quickstartViewModel instance and should be easier to follow now.
How Tested
A rebuild of GeckoView with this branch is required. To build Fenix after rebuilding GeckoView
- Checkout branch and do a clean build of GeckoView with
make clobber && make config && make GeckoView
from tools/geckoview/. Doing a clean build may or may not be necessary to run the final product, but was needed in development - Now we'll need to make sure the old GeckoView caches are cleared. If using android studio to build Fenix, File > Invalidate Caches > INVALIDATE AND RESTART. I didn't test building Fenix from the terminal. If building from the terminal, I'm not sure if this step is necessary or how to do the terminal equivalent
- Android studio may fail to sync with Gradle, hit "try again" and it should work
- Build Fenix and run app
Once the app is installed and running test that the quickstart toggles and quickstart functionality generally works as expected, i.e.
- The quickstart toggles on the bootstrap screen and settings screen stay in sync and generally work as one would expect
- That turning quickstart on makes the app automatically connect on boot (after at least one successful connection) and that turning it off disables this behavior
- That on restart the setting persists, that after turning it on or off and restarting, it stays on or off respectfully (note that there is currently still an issue with the toggle animating to on after restarting the app even though it should just start "on". I suspect this issue will go away once we integrate TorConnect's TorConnectStage in place of TorController's TorConnectState since the quickstart data will be coming from the same place as everything else