The previous approach was more error-prone (required a try-catch block) because it fetched the app version name at runtime. The new approach instead uses Gradle's buildConfig feature to fetch it safely from Gradle at compile time. This helps simplify the code and aligns with the approach that OrbotService already uses to obtain the Tor version.
The previous approach was more error-prone (required a try-catch block) because it fetched the app version name at runtime. The new approach instead uses Gradle's
buildConfig
feature to fetch it safely from Gradle at compile time. This helps simplify the code and aligns with the approach that OrbotService already uses to obtain the Tor version.