From 77234df1b4ae49978ae37183175ac980021f9cf1 Mon Sep 17 00:00:00 2001 From: Oleksii Tkachenko Date: Wed, 24 Jul 2024 13:18:02 +0000 Subject: [PATCH] move isPriceChangeConfirmation flag check --- .../playbilling/provider/PaymentActivity.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/playbilling/src/main/java/com/google/androidbrowserhelper/playbilling/provider/PaymentActivity.java b/playbilling/src/main/java/com/google/androidbrowserhelper/playbilling/provider/PaymentActivity.java index b15b0dbe..60baf582 100644 --- a/playbilling/src/main/java/com/google/androidbrowserhelper/playbilling/provider/PaymentActivity.java +++ b/playbilling/src/main/java/com/google/androidbrowserhelper/playbilling/provider/PaymentActivity.java @@ -63,6 +63,9 @@ public void onCreate(@Nullable Bundle savedInstanceState) { fail("Could not parse SKU."); return; } + if (mMethodData.isPriceChangeConfirmation) { + fail("Price change confirmation flow is not supported"); + } /** * Note that we have temporarily disabled the IMMEDIATE_WITHOUT_PRORATION mode @@ -114,15 +117,7 @@ private void onSkusQueried(BillingResult result, List skus) { SkuDetails sku = skus.get(0); - if (mMethodData.isPriceChangeConfirmation) { - launchPriceChangeConfirmationFlow(sku); - } else { - launchPaymentFlow(sku); - } - } - - private void launchPriceChangeConfirmationFlow(SkuDetails sku) { - fail("Price change confirmation flow is not supported"); + launchPaymentFlow(sku); } private void launchPaymentFlow(SkuDetails sku) {