From 93d52400ac4236479cc13dd7c667ef17aeb8c80b Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Fri, 24 Aug 2012 14:30:03 -0700 Subject: [PATCH] Fixed issue with reporting purchase token to server --- .../com/todoroo/astrid/actfm/sync/ActFmSyncService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java index ad5e8c35b..5aa03c5ed 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java @@ -962,7 +962,9 @@ public final class ActFmSyncService { String purchaseToken = Preferences.getStringValue(BillingConstants.PREF_PURCHASE_TOKEN); String productId = Preferences.getStringValue(BillingConstants.PREF_PRODUCT_ID); try { - actFmInvoker.invoke("premium_update_android", "purchase_token", purchaseToken, "product_id", productId); + if (!checkForToken()) + throw new ActFmServiceException("Not logged in", null); + actFmInvoker.invoke("premium_update_android", "purchase_token", purchaseToken, "product_id", productId, "token", token); Preferences.setBoolean(BillingConstants.PREF_NEEDS_SERVER_UPDATE, false); if (onSuccess != null) onSuccess.run();