798e2ea7a0d1c451904216dc39e00cae7aa2e2e0
When we call into `BraveVpnPrefUtils.setPrefModel`, this function invokes a method or two that `assert` they're being called on the UI thread. As a result, previously, the VPN would fail to start in debug builds as a result of the assertion and could possibly have been causing breakage in Release builds. Additionally, a couple of functions have had a null-check added which causes them to return without doing anything. Prior to this commit, an exception would be thrown immediately when passed to `setString` which then resulted in the function not doing anything anyway - along with negatively impacting any code further up the call chain that didn't handle the exception. There was also a problem with the VpnServerSelectionActivity wherein a member of the class implemented AutoCloseable but was not being closed in all cases which then resulted in a runtime exception because the object detected it was freeing its resources by being finalized. A missing close() has been added and we also handle onDestroy() to close the object there too.
…
…
…
…
…
Brave Core
Brave Core is a set of changes, APIs, and scripts used for customizing Chromium to make the Brave browser. Please also check https://github.com/brave/brave-browser
Follow @brave on Twitter for important announcements.
Resources
Community
You can ask questions and interact with the community in the following locations:
- Brave Community
communitychannel on Brave Software's Slack
Languages
C++
36.9%
HTML
31.6%
Swift
9.4%
TypeScript
9%
Java
4.8%
Other
8.1%