From 180f57324073864e1f95351e833dd4a4e4ee6d0d Mon Sep 17 00:00:00 2001 From: Christian Lavallee Date: Mon, 16 Mar 2020 07:54:25 -0400 Subject: [PATCH] Fix returned error code when already owned Fixes #234 --- .../InAppBillingImplementation.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/Plugin.InAppBilling.Android/InAppBillingImplementation.cs b/src/Plugin.InAppBilling.Android/InAppBillingImplementation.cs index efe15e5..fa66110 100644 --- a/src/Plugin.InAppBilling.Android/InAppBillingImplementation.cs +++ b/src/Plugin.InAppBilling.Android/InAppBillingImplementation.cs @@ -506,16 +506,10 @@ public static void HandleActivityResult(int requestCode, Result resultCode, Inte return; } - if(resultCode == Result.Canceled && tcsPurchase != null && !tcsPurchase.Task.IsCompleted) - { - tcsPurchase.SetException(new InAppBillingPurchaseException(PurchaseError.UserCancelled)); - return; - } - - if(data == null) - { - return; - } + if (data == null) + { + return; + } int responseCode = data.GetIntExtra(RESPONSE_CODE, 0);