fix:3386: fix crash on OrbotService start, avoid always-on VPN option.
Description
Since eOS 3.0 , AdvancedPrivacy crash loop on startup if VPN always-on option is toggled ON for IpScrambling feature. Which cause automatic reboot and unusable phone.
Related sentry issue: https://murena-sas.sentry.io/releases/foundation.e.advancedprivacy%402.10.3%2B2010003/?issuesType=all&project=4504355889938432
Technical details
With enabled always-on option, Android start the "VPN service" automatically. Threading optimizations in AdvancedPrivacyApplication leads to initialize the Orbot Prefs modules after that OrbotService make use of it, causing the crash.
Tests
Best test to conduct would be to upgrade a failing eOS3.0 with a new rom containing this fix.
We should observe that the always on option is now unavailble, and no more crashes !
Issues
https://gitlab.e.foundation/e/os/backlog/-/issues/3386
10 commandments of code review
Summary by CodeRabbit
-
Chores
- Improved initialization of privacy components for enhanced reliability.
- Updated service metadata to clarify VPN service capabilities.