aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IabBinder.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-31 02:44:46 -0500
committerGitHub <noreply@github.com>2017-12-31 02:44:46 -0500
commit725d6a99a07f91f940a07e6b49dd6224a6aa32d1 (patch)
tree4e0b1b3b9ffe9b5aef3c8d0f154ea9ab1058fd5e /app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IabBinder.kt
parent3076d9a97c203497aec1415d8ac6037d10eebb46 (diff)
downloadfrost-725d6a99a07f91f940a07e6b49dd6224a6aa32d1.tar.gz
frost-725d6a99a07f91f940a07e6b49dd6224a6aa32d1.tar.bz2
frost-725d6a99a07f91f940a07e6b49dd6224a6aa32d1.zip
Enhancement/proguard (#589)
* Add error log * Rewrite logger
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IabBinder.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IabBinder.kt12
1 files changed, 6 insertions, 6 deletions
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 64fc9cb8..00f99878 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
@@ -58,13 +58,13 @@ abstract class IabBinder : FrostBilling {
bp = null
}
- override fun onBillingInitialized() = L.i("IAB initialized")
+ override fun onBillingInitialized() = L.i { "IAB initialized" }
- override fun onPurchaseHistoryRestored() = L.d("IAB restored")
+ override fun onPurchaseHistoryRestored() = L.d { "IAB restored" }
override fun onProductPurchased(productId: String, details: TransactionDetails?) {
bp.doAsync {
- L.i("IAB $productId purchased")
+ L.i { "IAB $productId purchased" }
val listing = weakRef.get()?.getPurchaseListingDetails(productId) ?: return@doAsync
val currency = try {
Currency.getInstance(listing.currency)
@@ -127,7 +127,7 @@ class IabSettings : IabBinder() {
override fun onBillingError(errorCode: Int, error: Throwable?) {
super.onBillingError(errorCode, error)
- L.e("Billing error $errorCode ${error?.message}")
+ L.e { "Billing error $errorCode ${error?.message}" }
}
/**
@@ -136,7 +136,7 @@ class IabSettings : IabBinder() {
override fun restorePurchases() {
bp.doAsync {
val load = weakRef.get()?.loadOwnedPurchasesFromGoogle() ?: return@doAsync
- L.d("IAB settings load from google $load")
+ L.d { "IAB settings load from google $load" }
uiThread {
if (!(weakRef.get()?.isPurchased(FROST_PRO) ?: return@uiThread)) {
if (Prefs.pro) activity.playStoreNoLongerPro()
@@ -174,7 +174,7 @@ class IabMain : IabBinder() {
restored = true
bp.doAsync {
val load = weakRef.get()?.loadOwnedPurchasesFromGoogle() ?: false
- L.d("IAB main load from google $load")
+ L.d { "IAB main load from google $load" }
onComplete {
if (!(weakRef.get()?.isPurchased(FROST_PRO) ?: false)) {
if (Prefs.pro) activity.playStoreNoLongerPro()