From 4c78f9e28de02cc9fb24dd7279de5dcad57222ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Ritzl?= Date: Tue, 28 Jul 2020 08:31:09 +0200 Subject: [PATCH] Update IapGooglePlay.java --- .../src/java/com/defold/iap/IapGooglePlay.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/extension-iap/src/java/com/defold/iap/IapGooglePlay.java b/extension-iap/src/java/com/defold/iap/IapGooglePlay.java index dded5eb..fe6cd64 100644 --- a/extension-iap/src/java/com/defold/iap/IapGooglePlay.java +++ b/extension-iap/src/java/com/defold/iap/IapGooglePlay.java @@ -71,17 +71,12 @@ public class IapGooglePlay implements PurchasesUpdatedListener { public void stop() { Log.d(TAG, "stop()"); - this.activity.runOnUiThread(new Runnable() { - @Override - public void run() { - if (billingClient.isReady()) { - billingClient.endConnection(); - } - } - }); + if (billingClient.isReady()) { + billingClient.endConnection(); + } } - public String toISO8601(final Date date) { + private String toISO8601(final Date date) { String formatted = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(date); return formatted.substring(0, 22) + ":" + formatted.substring(22); }