Files
brave-core/android
Serg 3efa85704e [Android] Restore Origin purchase on app startup for device change scenario (#34495)
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
2026-03-05 16:38:37 -05:00
..