From 55e08aed747563a8b73b570b2cb1145dbab331e8 Mon Sep 17 00:00:00 2001 From: qiuguohua Date: Wed, 11 Dec 2024 22:45:54 +0800 Subject: [PATCH] Fix isFeatureSupported returning incorrect results --- native/vendor/google/billing/GoogleBillingHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/vendor/google/billing/GoogleBillingHelper.cpp b/native/vendor/google/billing/GoogleBillingHelper.cpp index 694e6b4ac9a..bba57835b14 100644 --- a/native/vendor/google/billing/GoogleBillingHelper.cpp +++ b/native/vendor/google/billing/GoogleBillingHelper.cpp @@ -208,9 +208,9 @@ void GoogleBillingHelper::acknowledgePurchase(int tag, int callbackId, Acknowled BillingResult* GoogleBillingHelper::isFeatureSupported(int tag, const std::string& feature) { auto* env = JniHelper::getEnv(); cc::JniMethodInfo t; - if (cc::JniHelper::getStaticMethodInfo(t, JCLS_BILLING, "isFeatureSupported", "(Ljava/lang/String;)Lcom/android/billingclient/api/BillingResult;")) { + if (cc::JniHelper::getStaticMethodInfo(t, JCLS_BILLING, "isFeatureSupported", "(ILjava/lang/String;)Lcom/android/billingclient/api/BillingResult;")) { jstring jFeature = cc::StringUtils::newStringUTFJNI(env, feature); - jobject obj = t.env->CallStaticObjectMethod(t.classID, t.methodID, jFeature); + jobject obj = t.env->CallStaticObjectMethod(t.classID, t.methodID, tag, jFeature); return cc::JniBilling::toBillingResult(env, obj); } return nullptr;