aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-23 00:02:48 -0700
committerAllan Wang <me@allanwang.ca>2017-07-23 00:02:48 -0700
commita623b7de106b5894ffe037cf0e27c71e235962d7 (patch)
treeb8ee7d76cc65372845a96929e6175ed8346fe912
parent219d168bb642d56911715c54e76b2146ddfed58d (diff)
downloadfrost-a623b7de106b5894ffe037cf0e27c71e235962d7.tar.gz
frost-a623b7de106b5894ffe037cf0e27c71e235962d7.tar.bz2
frost-a623b7de106b5894ffe037cf0e27c71e235962d7.zip
Remove async call
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABBinder.kt24
1 files changed, 10 insertions, 14 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 b597717b..0572166f 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
@@ -151,20 +151,16 @@ class IABMain : IABBinder() {
* given that this is only called with bp is ready
*/
override fun restorePurchases() {
- if (restored) return
- synchronized(this) {
- if (restored || bp == null) return
- restored = true
- doAsync {
- val load = bp!!.loadOwnedPurchasesFromGoogle()
- L.d("IAB main load from google $load")
- if (!bp!!.isPurchased(FROST_PRO)) {
- if (Prefs.pro) uiThread { activity!!.playStoreNoLongerPro() }
- } else {
- if (!Prefs.pro) uiThread { activity!!.playStoreFoundPro() }
- }
- onDestroyBilling()
- }
+ if (restored || bp == null) return
+ restored = true
+ val load = bp!!.loadOwnedPurchasesFromGoogle()
+ L.d("IAB main load from google $load")
+ if (!bp!!.isPurchased(FROST_PRO)) {
+ if (Prefs.pro) activity!!.playStoreNoLongerPro()
+ } else {
+ if (!Prefs.pro) activity!!.playStoreFoundPro()
}
+ onDestroyBilling()
+
}
} \ No newline at end of file