mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 17:59:51 +02:00
Catch exceptions during consuming purchases
This commit is contained in:
parent
b85f585d7e
commit
9d6289bbbc
1 changed files with 8 additions and 2 deletions
|
@ -165,8 +165,14 @@ class ActivityPurchaseModel(application: Application): AndroidViewModel(applicat
|
|||
|
||||
runAsync {
|
||||
lock.withLock {
|
||||
Checkout.forApplication(billing).startAsync().use {
|
||||
it.requests.consumeAsync(purchase.token)
|
||||
try {
|
||||
Checkout.forApplication(billing).startAsync().use {
|
||||
it.requests.consumeAsync(purchase.token)
|
||||
}
|
||||
} catch (ex: Exception) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Log.w(LOG_TAG, "consumePurchaseAsync() failed", ex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue