diff options
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/iab')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt | 12 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IabBinder.kt | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt index 71c6df36..15d707a9 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt @@ -15,7 +15,7 @@ import com.pitchedapps.frost.utils.* */ private fun playStoreLog(text: String) { - L.e(Throwable(text), "IAB Play Store Exception") + L.e(Throwable(text)) { "IAB Play Store Exception" } } /** @@ -30,7 +30,7 @@ private fun Activity.playRestart() { fun Activity?.playStoreNoLongerPro() { Prefs.pro = false - L.d("IAB No longer pro") + L.d { "IAB No longer pro" } frostAnswers { logPurchase(PurchaseEvent() .putCustomAttribute("result", "no longer pro") @@ -49,7 +49,7 @@ fun Activity?.playStoreNoLongerPro() { fun Activity?.playStoreFoundPro() { Prefs.pro = true - L.d("Found pro") + L.d { "Found pro" } if (this == null) return materialDialogThemed { title(R.string.found_pro) @@ -62,7 +62,7 @@ fun Activity?.playStoreFoundPro() { } fun Activity.playStorePurchaseUnsupported() { - L.d("Play store not found") + L.d { "Play store not found" } materialDialogThemed { title(R.string.uh_oh) content(R.string.play_store_unsupported) @@ -75,7 +75,7 @@ fun Activity.playStorePurchaseUnsupported() { } fun Activity.playStorePurchasedSuccessfully(key: String) { - L.d("Play store purchased $key successfully") + L.d { "Play store purchased $key successfully" } materialDialogThemed { title(R.string.play_thank_you) content(R.string.play_purchased_pro) @@ -86,7 +86,7 @@ fun Activity.playStorePurchasedSuccessfully(key: String) { } fun Activity.purchaseRestored() { - L.d("Purchase restored") + L.d { "Purchase restored" } materialDialogThemed { title(R.string.play_thank_you) content(R.string.purchases_restored_with_pro) 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() |