mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Fully check result code when processing purchase results.
This commit is contained in:
@@ -252,7 +252,10 @@ class BackupStateObserver(
|
||||
if (SignalStore.backup.subscriptionStateMismatchDetected) {
|
||||
Log.d(TAG, "[getNetworkBackupState][subscriptionStateMismatchDetected] A mismatch was detected.")
|
||||
|
||||
val hasActiveGooglePlayBillingSubscription = when (val purchaseResult = AppDependencies.billingApi.queryPurchases()) {
|
||||
val purchaseResult = AppDependencies.billingApi.queryPurchases()
|
||||
Log.d(TAG, "[getNetworkBackupState][subscriptionStateMismatchDetected] queryPurchase result: $purchaseResult")
|
||||
|
||||
val hasActiveGooglePlayBillingSubscription = when (purchaseResult) {
|
||||
is BillingPurchaseResult.Success -> {
|
||||
Log.d(TAG, "[getNetworkBackupState][subscriptionStateMismatchDetected] Found a purchase: $purchaseResult")
|
||||
purchaseResult.isAcknowledged && purchaseResult.isAutoRenewing
|
||||
|
||||
Reference in New Issue
Block a user