From f5394badad02671dc0de181ab63b9a9bfbe9fd59 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 18 Aug 2017 20:25:41 -0700 Subject: Misc 2 (#191) * Add further checks for iab and remove generic error dialog * Theme all snackbars * Add dynamic media action tile --- app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABBinder.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABBinder.kt') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABBinder.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABBinder.kt index 7f6e8a6d..8aa3bcde 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABBinder.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABBinder.kt @@ -110,7 +110,7 @@ abstract class IABBinder : FrostBilling { } val a = activity ?: return - if (!BillingProcessor.isIabServiceAvailable(a) || !bp.isOneTimePurchaseSupported) + if (!BillingProcessor.isIabServiceAvailable(a) || !bp.isInitialized || !bp.isOneTimePurchaseSupported) a.playStorePurchaseUnsupported() else bp.purchase(a, FROST_PRO) @@ -127,7 +127,7 @@ class IABSettings : IABBinder() { override fun onBillingError(errorCode: Int, error: Throwable?) { super.onBillingError(errorCode, error) - activity?.playStoreGenericError(null) + L.e("Billing error $errorCode ${error?.message}") } /** -- cgit v1.2.3