mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Ignore mismatch state if FREE tier user has GPB sub.
Co-authored-by: jeffrey-signal <jeffrey@signal.org>
This commit is contained in:
committed by
Jeffrey Starke
parent
9777aa411c
commit
04923487c4
@@ -300,6 +300,11 @@ class BackupStateObserver(
|
||||
SignalStore.backup.subscriptionStateMismatchDetected = false
|
||||
}
|
||||
|
||||
SignalStore.backup.backupTier == MessageBackupTier.FREE -> {
|
||||
Log.i(TAG, "[getNetworkBackupState][subscriptionMismatchDetected] User is on the free tier, has no signal subscription, and has a google play subscription. Clearing mismatch.")
|
||||
SignalStore.backup.subscriptionStateMismatchDetected = false
|
||||
}
|
||||
|
||||
else -> {
|
||||
Log.w(TAG, "[getNetworkBackupState][subscriptionMismatchDetected] Hit unexpected subscription mismatch state: signal:false, google:true")
|
||||
return BackupState.NotFound
|
||||
|
||||
@@ -180,10 +180,16 @@ class BackupSubscriptionCheckJob private constructor(parameters: Parameters) : C
|
||||
"Valid cancel state. Clearing mismatch. (isGooglePlayBillingCanceled: true, hasActiveSignalSubscription: $hasActiveSignalSubscription, isSignalSubscriptionFailedOrCanceled: $isSignalSubscriptionFailedOrCanceled",
|
||||
true
|
||||
)
|
||||
SignalStore.backup.subscriptionStateMismatchDetected = false
|
||||
return Result.success()
|
||||
} else if (hasActivePurchase && !hasActiveSignalSubscription && SignalStore.backup.backupTier == MessageBackupTier.FREE) {
|
||||
Log.i(TAG, "Mismatched state but user has no Signal Service subscription and is on the free tier. Clearing flag.", true)
|
||||
|
||||
SignalStore.backup.subscriptionStateMismatchDetected = false
|
||||
return Result.success()
|
||||
} else {
|
||||
Log.w(TAG, "State mismatch: (hasActivePaidBackupTier: $hasActivePaidBackupTier, hasActiveSignalSubscription: $hasActiveSignalSubscription, hasActivePurchase: $hasActivePurchase). Setting mismatch value and exiting.", true)
|
||||
|
||||
SignalStore.backup.subscriptionStateMismatchDetected = true
|
||||
return Result.success()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user