mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-20 17:57:29 +00:00
Add null handling for backup subscriptions.
This commit is contained in:
@@ -164,8 +164,13 @@ class InAppPaymentRecurringContextJob private constructor(
|
||||
val subscription = activeSubscription.activeSubscription
|
||||
|
||||
if (subscription == null) {
|
||||
warning("Subscription is null. Retrying later.")
|
||||
throw InAppPaymentRetryException()
|
||||
if (inAppPayment.type == InAppPaymentType.RECURRING_BACKUP) {
|
||||
warning("Backup subscription is null.")
|
||||
throw Exception()
|
||||
} else {
|
||||
warning("${inAppPayment.type} Subscription is null. Retrying later.")
|
||||
throw InAppPaymentRetryException()
|
||||
}
|
||||
}
|
||||
|
||||
handlePossibleFailedPayment(inAppPayment, activeSubscription, subscription)
|
||||
|
||||
Reference in New Issue
Block a user