From cf4b8d183b14e2b213b5c2d2279ec7612fdbb31d Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 17 May 2023 11:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=80=E4=BA=9B=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E5=AF=86=E9=92=A5=E7=9B=B8=E5=85=B3=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cocos/platform/CCApplication.h | 2 -- .../android/CCApplication-android.cpp | 4 ---- cocos/platform/android/java/.project | 11 ++++++++++ cocos/platform/android/jni/JniImp.cpp | 10 --------- cocos/platform/android/jni/JniImp.h | 2 -- .../js-bindings/manual/jsb_global.cpp | 22 ------------------- 6 files changed, 11 insertions(+), 40 deletions(-) diff --git a/cocos/platform/CCApplication.h b/cocos/platform/CCApplication.h index 74d8e5a..3665ad9 100644 --- a/cocos/platform/CCApplication.h +++ b/cocos/platform/CCApplication.h @@ -201,8 +201,6 @@ public: void copyTextToClipboard(const std::string &text); - void showQRCode(const std::string &content, const std::string &title, const std::string &val); - void toWallet(const std::string &url); void saveKeyLocal(const std::string &account, const std::string &key); diff --git a/cocos/platform/android/CCApplication-android.cpp b/cocos/platform/android/CCApplication-android.cpp index 57502be..ebe9f88 100644 --- a/cocos/platform/android/CCApplication-android.cpp +++ b/cocos/platform/android/CCApplication-android.cpp @@ -294,10 +294,6 @@ void Application::copyTextToClipboard(const std::string &text) } -void Application::showQRCode(const std::string &content, const std::string &title, const std::string &val) { - showRestoreQRJNI("", content, title, val); -} - void Application::toWallet(const std::string &url) { toWalletJNI(url); } diff --git a/cocos/platform/android/java/.project b/cocos/platform/android/java/.project index 9a978af..7f18b42 100644 --- a/cocos/platform/android/java/.project +++ b/cocos/platform/android/java/.project @@ -30,4 +30,15 @@ com.android.ide.eclipse.adt.AndroidNature org.eclipse.jdt.core.javanature + + + 1684288042113 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/cocos/platform/android/jni/JniImp.cpp b/cocos/platform/android/jni/JniImp.cpp index f4095d0..b228c43 100644 --- a/cocos/platform/android/jni/JniImp.cpp +++ b/cocos/platform/android/jni/JniImp.cpp @@ -663,21 +663,11 @@ void showWebPageJNI(const std::string& funid, const std::string& content) JniHelper::callStaticVoidMethod(JCSDK, "showWebPage", funid, content); } -void showRestoreQRJNI(const std::string& funid, const std::string& content, const std::string& title, const std::string& oid) -{ - JniHelper::callStaticVoidMethod(JCSDK, "showRestoreQR", funid, content, title, oid); -} - void scanQRCodeJNI(const std::string& funid, const std::string& title) { JniHelper::callStaticVoidMethod(JCSDK, "scanQRCode", funid, title); } -void loadRestoreKeyJNI(const std::string& funid, const std::string& oid) -{ - JniHelper::callStaticVoidMethod(JCSDK, "loadRestoreKey", funid, oid); -} - void signWithGoogleJNI(const std::string& funid) { JniHelper::callStaticVoidMethod(JCSDK, "signWithGoogle", funid); diff --git a/cocos/platform/android/jni/JniImp.h b/cocos/platform/android/jni/JniImp.h index 927e72c..2807f5f 100644 --- a/cocos/platform/android/jni/JniImp.h +++ b/cocos/platform/android/jni/JniImp.h @@ -36,10 +36,8 @@ extern void exitApplication(); extern std::string getApkPathJNI(); extern std::string getPackageNameJNI(); void showQRCodeJNI(const std::string& funid, const std::string& content); -void showRestoreQRJNI(const std::string& funid, const std::string& content, const std::string& title, const std::string& id); void scanQRCodeJNI(const std::string& funid, const std::string& title); void showWebPageJNI(const std::string& funid, const std::string& url); -void loadRestoreKeyJNI(const std::string& funid, const std::string& oid); void signWithGoogleJNI(const std::string& funid); void signWithAppleJNI(const std::string& funid); void signWithTiktokJNI(const std::string& funid); diff --git a/cocos/scripting/js-bindings/manual/jsb_global.cpp b/cocos/scripting/js-bindings/manual/jsb_global.cpp index 63154f3..98c7183 100644 --- a/cocos/scripting/js-bindings/manual/jsb_global.cpp +++ b/cocos/scripting/js-bindings/manual/jsb_global.cpp @@ -838,27 +838,6 @@ static bool JSB_scanQRCode(se::State& s) } SE_BIND_FUNC(JSB_scanQRCode) -static bool JSB_restoreKey(se::State& s) -{ - const auto& args = s.args(); - size_t argc = args.size(); - CC_UNUSED bool ok = true; - if (argc > 1) { - std::string funid; - ok = seval_to_std_string(args[0], &funid); - SE_PRECONDITION2(ok, false, "funid is invalid!"); - std::string oid; - ok = seval_to_std_string(args[1], &oid); - SE_PRECONDITION2(ok, false, "oid is invalid!"); - loadRestoreKeyJNI(funid, oid); - return true; - } - - SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 2); - return false; -} -SE_BIND_FUNC(JSB_restoreKey) - static bool JSB_signWithGoogle(se::State& s) { const auto& args = s.args(); @@ -1379,7 +1358,6 @@ bool jsb_register_global_variables(se::Object* global) __jsbObj->defineFunction("copyTextToClipboard", _SE(JSB_copyTextToClipboard)); #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) __jsbObj->defineFunction("scanQRCode", _SE(JSB_scanQRCode)); - __jsbObj->defineFunction("restoreKey", _SE(JSB_restoreKey)); __jsbObj->defineFunction("signWithGoogle", _SE(JSB_signWithGoogle)); __jsbObj->defineFunction("signWithApple", _SE(JSB_signWithApple)); __jsbObj->defineFunction("signWithTikTok", _SE(JSB_signWithTiktok));