mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-26 04:33:36 +00:00
Add checks to skip check job if we have a pending or pre-pending transaction.
This commit is contained in:
committed by
Jeffrey Starke
parent
b88097a6ae
commit
93815a0504
@@ -103,6 +103,18 @@ class BackupSubscriptionCheckJob private constructor(parameters: Parameters) : C
|
||||
return Result.success()
|
||||
}
|
||||
|
||||
if (SignalDatabase.inAppPayments.hasPrePendingRecurringTransaction(InAppPaymentType.RECURRING_BACKUP)) {
|
||||
Log.i(TAG, "A backup redemption is in the pre-pending state. Clearing mismatch and skipping check job.", true)
|
||||
SignalStore.backup.subscriptionStateMismatchDetected = false
|
||||
return Result.success()
|
||||
}
|
||||
|
||||
if (SignalDatabase.inAppPayments.hasPendingBackupRedemption()) {
|
||||
Log.i(TAG, "A backup redemption is pending. Clearing mismatch and skipping check job.", true)
|
||||
SignalStore.backup.subscriptionStateMismatchDetected = false
|
||||
return Result.success()
|
||||
}
|
||||
|
||||
val purchase: BillingPurchaseResult = AppDependencies.billingApi.queryPurchases()
|
||||
Log.i(TAG, "Retrieved purchase result from Billing api: $purchase", true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user