3efa85704e2fc7a0b0f27bd3bc8f9d3be9050795
When a user purchases Brave Origin on one device and later switches to a new device (or reinstalls), the local preferences are empty and the Origin menu always shows the purchase screen instead of the settings screen. This adds a verifyPurchase() method to BraveOriginSubscriptionPrefs that queries Google Play for an existing Origin purchase and restores the local preferences (purchase token, product ID, package name) if one is found. The query is triggered during BraveActivity.finishNativeInitialization() only when the local subscription pref is not already active, so it doesn't run unnecessarily for users who already have their purchase recorded locally. Toasts are suppressed during the startup query to avoid showing billing error messages on devices without Google Play, and re-enabled when the purchase screen is opened. Resolves: https://github.com/brave/brave-browser/issues/53405
…
…
…
…
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%