fixup! Update dependencies

Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
William Brawner 2020-06-10 10:20:55 -07:00
parent d538111651
commit c3821fbfc9

View file

@ -67,8 +67,8 @@ class SupportActivity : AppCompatActivity(), BillingClientStateListener, Purchas
return super.onOptionsItemSelected(item) return super.onOptionsItemSelected(item)
} }
override fun onBillingSetupFinished(result: BillingResult?) { override fun onBillingSetupFinished(result: BillingResult) {
if (result?.responseCode != BillingClient.BillingResponseCode.OK) { if (result.responseCode != BillingClient.BillingResponseCode.OK) {
return return
} }
@ -78,7 +78,7 @@ class SupportActivity : AppCompatActivity(), BillingClientStateListener, Purchas
.build() .build()
billingClient.querySkuDetailsAsync(skuDetails) { skuDetailsResponse, skuDetailsList -> billingClient.querySkuDetailsAsync(skuDetails) { skuDetailsResponse, skuDetailsList ->
// Process the result. // Process the result.
if (skuDetailsResponse?.responseCode != BillingClient.BillingResponseCode.OK || skuDetailsList.isNullOrEmpty()) { if (skuDetailsResponse.responseCode != BillingClient.BillingResponseCode.OK || skuDetailsList.isNullOrEmpty()) {
return@querySkuDetailsAsync return@querySkuDetailsAsync
} }
@ -104,7 +104,7 @@ class SupportActivity : AppCompatActivity(), BillingClientStateListener, Purchas
billingClient.startConnection(this) billingClient.startConnection(this)
} }
override fun onPurchasesUpdated(result: BillingResult?, purchases: MutableList<Purchase>?) { override fun onPurchasesUpdated(result: BillingResult, purchases: MutableList<Purchase>?) {
purchases?.forEach { purchase -> purchases?.forEach { purchase ->
val consumeParams = ConsumeParams.newBuilder() val consumeParams = ConsumeParams.newBuilder()
.setPurchaseToken(purchase.purchaseToken) .setPurchaseToken(purchase.purchaseToken)