Skip to content

Commit

Permalink
Added flag for billing disconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-pravinrajmohan committed Nov 20, 2023
1 parent ef1a9fd commit d59c1c9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,15 @@ class BillingClientManager(context: Context) : PurchasesUpdatedListener {
connectionError: (CBException) -> Unit
) = object :
BillingClientStateListener {
var hasResponded: Boolean = false

override fun onBillingServiceDisconnected() {
Log.i(javaClass.simpleName, "onBillingServiceDisconnected")
status(false)
if (hasResponded) {
Log.i(javaClass.simpleName, "onBillingServiceDisconnected broadcaster")
status(false)
}
hasResponded = true
}

override fun onBillingSetupFinished(billingResult: BillingResult) {
Expand Down

0 comments on commit d59c1c9

Please sign in to comment.