From 79d6a5b0fbb69b0c4ffb17dbf9d2aa5a060f6ffa Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 15 Jun 2023 23:00:37 +0800 Subject: [PATCH] =?UTF-8?q?+=204.7.3=20fixed=20=E7=BD=91=E7=BB=9C=E5=A4=AA?= =?UTF-8?q?=E6=85=A2=E5=AF=BC=E8=87=B4=E6=94=AF=E4=BB=98=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8A=A0=E8=BD=BD=E8=B6=85=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 +- .../fingerprint/plugin/AlipayBasePlugin.java | 19 +++++++++++++-- .../util/ActivityViewObserver.java | 24 +++++++++++-------- release/update_riru_alipay.json | 4 ++-- release/update_riru_qq.json | 4 ++-- release/update_riru_taobao.json | 4 ++-- release/update_riru_unionpay.json | 4 ++-- release/update_riru_wechat.json | 4 ++-- release/update_zygisk_alipay.json | 4 ++-- release/update_zygisk_qq.json | 4 ++-- release/update_zygisk_taobao.json | 4 ++-- release/update_zygisk_unionpay.json | 4 ++-- release/update_zygisk_wechat.json | 4 ++-- riru/flash.sh | 10 ++++---- 14 files changed, 57 insertions(+), 38 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a30e333..5c367f1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { minSdkVersion 14 targetSdkVersion 30 versionCode 23 - versionName "4.7.1" + versionName "4.7.3" buildConfigField "String", "APP_PRODUCT_NAME", "\"FingerprintPay\"" } diff --git a/app/src/main/java/com/surcumference/fingerprint/plugin/AlipayBasePlugin.java b/app/src/main/java/com/surcumference/fingerprint/plugin/AlipayBasePlugin.java index 5e89d07..626a186 100644 --- a/app/src/main/java/com/surcumference/fingerprint/plugin/AlipayBasePlugin.java +++ b/app/src/main/java/com/surcumference/fingerprint/plugin/AlipayBasePlugin.java @@ -24,6 +24,7 @@ import com.surcumference.fingerprint.BuildConfig; import com.surcumference.fingerprint.Lang; import com.surcumference.fingerprint.R; +import com.surcumference.fingerprint.util.ActivityViewObserver; import com.surcumference.fingerprint.util.AlipayVersionControl; import com.surcumference.fingerprint.util.ApplicationUtils; import com.surcumference.fingerprint.util.BlackListUtils; @@ -57,6 +58,7 @@ public class AlipayBasePlugin { private boolean mIsViewTreeObserverFirst; private int mAlipayVersionCode; + private ActivityViewObserver mSettingPageEnteredObserver; private int getAlipayVersionCode(Context context) { if (mAlipayVersionCode != 0) { @@ -75,8 +77,21 @@ protected void onActivityCreated(Activity activity) { } int alipayVersionCode = getAlipayVersionCode(activity); if (alipayVersionCode >= 773 /** 10.3.80.9100 */ && activityClzName.contains(".FBAppWindowActivity")) { - Task.onMain(500, () -> doSettingsMenuInject_10_1_38(activity)); - Task.onMain(1000, () -> doSettingsMenuInject_10_1_38(activity)); + + ActivityViewObserver activityViewObserver = mSettingPageEnteredObserver; + if (activityViewObserver != null) { + activityViewObserver.stop(); + mSettingPageEnteredObserver = null; + } + activityViewObserver = new ActivityViewObserver(activity); + activityViewObserver.setViewIdentifyText("支付密码", "支付密碼", "Payment Password"); + activityViewObserver.start(100, (observer, view) -> doSettingsMenuInject_10_1_38(activity)); + mSettingPageEnteredObserver = activityViewObserver; + ActivityViewObserver finalActivityViewObserver = activityViewObserver; + Task.onBackground(30000, () -> { + mSettingPageEnteredObserver = null; + finalActivityViewObserver.stop(); + }); } else if (activityClzName.contains(".MySettingActivity")) { Task.onMain(100, () -> doSettingsMenuInject_10_1_38(activity)); } else if (activityClzName.contains(".UserSettingActivity")) { diff --git a/app/src/main/java/com/surcumference/fingerprint/util/ActivityViewObserver.java b/app/src/main/java/com/surcumference/fingerprint/util/ActivityViewObserver.java index 948d165..2c3330e 100644 --- a/app/src/main/java/com/surcumference/fingerprint/util/ActivityViewObserver.java +++ b/app/src/main/java/com/surcumference/fingerprint/util/ActivityViewObserver.java @@ -18,7 +18,7 @@ public class ActivityViewObserver { private WeakReference mActivityRef; private boolean mRunning = false; private String mViewIdentifyType; - private String mViewIdentifyText; + private String[] mViewIdentifyTexts; public ActivityViewObserver(Activity weakRefActivity) { this.mActivityRef = new WeakReference<>(weakRefActivity); @@ -28,13 +28,13 @@ public void setViewIdentifyType(String viewIdentifyType) { this.mViewIdentifyType = viewIdentifyType; } - public void setViewIdentifyText(String viewIdentifyText) { - this.mViewIdentifyText = viewIdentifyText; + public void setViewIdentifyText(String ...viewIdentifyTexts) { + this.mViewIdentifyTexts = viewIdentifyTexts; } public void start(long loopMSec, IActivityViewListener listener) { - if (TextUtils.isEmpty(this.mViewIdentifyType) && TextUtils.isEmpty(this.mViewIdentifyText)) { - throw new IllegalArgumentException("Error: ViewIdentifyType or ViewIdentifyText not set"); + if (TextUtils.isEmpty(this.mViewIdentifyType) && (mViewIdentifyTexts == null || mViewIdentifyTexts.length == 0)) { + throw new IllegalArgumentException("Error: ViewIdentifyType or ViewIdentifyTexts not set"); } if (mRunning) { return; @@ -84,11 +84,15 @@ private void task(long loopMSec, IActivityViewListener listener) { break; } } - String viewIdentifyText = this.mViewIdentifyText; - if (!TextUtils.isEmpty(viewIdentifyText)) { - ViewUtils.getChildViews((ViewGroup) decorView, viewIdentifyText, viewList); - if (viewList.size() > 0) { - break; + String[] viewIdentifyTexts = this.mViewIdentifyTexts; + if (viewIdentifyTexts != null) { + for (String viewIdentifyText: this.mViewIdentifyTexts) { + if (!TextUtils.isEmpty(viewIdentifyText)) { + ViewUtils.getChildViews((ViewGroup) decorView, viewIdentifyText, viewList); + if (viewList.size() > 0) { + break; + } + } } } } diff --git a/release/update_riru_alipay.json b/release/update_riru_alipay.json index 00a413c..c133d88 100644 --- a/release/update_riru_alipay.json +++ b/release/update_riru_alipay.json @@ -1,6 +1,6 @@ { - "version": "4.7.1", + "version": "4.7.3", "versionCode": "23", - "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/riru-module-xfingerprint-pay-alipay-v4.7.1-release.zip", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/riru-module-xfingerprint-pay-alipay-v4.7.3-release.zip", "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" } \ No newline at end of file diff --git a/release/update_riru_qq.json b/release/update_riru_qq.json index 18c8c99..0029272 100644 --- a/release/update_riru_qq.json +++ b/release/update_riru_qq.json @@ -1,6 +1,6 @@ { - "version": "4.7.1", + "version": "4.7.3", "versionCode": "23", - "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/riru-module-xfingerprint-pay-qq-v4.7.1-release.zip", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/riru-module-xfingerprint-pay-qq-v4.7.3-release.zip", "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" } \ No newline at end of file diff --git a/release/update_riru_taobao.json b/release/update_riru_taobao.json index d96e0f5..2f71013 100644 --- a/release/update_riru_taobao.json +++ b/release/update_riru_taobao.json @@ -1,6 +1,6 @@ { - "version": "4.7.1", + "version": "4.7.3", "versionCode": "23", - "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/riru-module-xfingerprint-pay-taobao-v4.7.1-release.zip", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/riru-module-xfingerprint-pay-taobao-v4.7.3-release.zip", "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" } \ No newline at end of file diff --git a/release/update_riru_unionpay.json b/release/update_riru_unionpay.json index 69ad8c6..83f6134 100644 --- a/release/update_riru_unionpay.json +++ b/release/update_riru_unionpay.json @@ -1,6 +1,6 @@ { - "version": "4.7.1", + "version": "4.7.3", "versionCode": "23", - "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/riru-module-xfingerprint-pay-unionpay-v4.7.1-release.zip", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/riru-module-xfingerprint-pay-unionpay-v4.7.3-release.zip", "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" } \ No newline at end of file diff --git a/release/update_riru_wechat.json b/release/update_riru_wechat.json index 2bad890..8b6fcdb 100644 --- a/release/update_riru_wechat.json +++ b/release/update_riru_wechat.json @@ -1,6 +1,6 @@ { - "version": "4.7.1", + "version": "4.7.3", "versionCode": "23", - "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/riru-module-xfingerprint-pay-wechat-v4.7.1-release.zip", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/riru-module-xfingerprint-pay-wechat-v4.7.3-release.zip", "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" } \ No newline at end of file diff --git a/release/update_zygisk_alipay.json b/release/update_zygisk_alipay.json index f00f109..190443f 100644 --- a/release/update_zygisk_alipay.json +++ b/release/update_zygisk_alipay.json @@ -1,6 +1,6 @@ { - "version": "4.7.1", + "version": "4.7.3", "versionCode": "23", - "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/zygisk-module-xfingerprint-pay-alipay-v4.7.1-release.zip", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/zygisk-module-xfingerprint-pay-alipay-v4.7.3-release.zip", "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" } \ No newline at end of file diff --git a/release/update_zygisk_qq.json b/release/update_zygisk_qq.json index 9c08a40..f9fa21c 100644 --- a/release/update_zygisk_qq.json +++ b/release/update_zygisk_qq.json @@ -1,6 +1,6 @@ { - "version": "4.7.1", + "version": "4.7.3", "versionCode": "23", - "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/zygisk-module-xfingerprint-pay-qq-v4.7.1-release.zip", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/zygisk-module-xfingerprint-pay-qq-v4.7.3-release.zip", "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" } \ No newline at end of file diff --git a/release/update_zygisk_taobao.json b/release/update_zygisk_taobao.json index dc54575..a2f7b5f 100644 --- a/release/update_zygisk_taobao.json +++ b/release/update_zygisk_taobao.json @@ -1,6 +1,6 @@ { - "version": "4.7.1", + "version": "4.7.3", "versionCode": "23", - "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/zygisk-module-xfingerprint-pay-taobao-v4.7.1-release.zip", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/zygisk-module-xfingerprint-pay-taobao-v4.7.3-release.zip", "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" } \ No newline at end of file diff --git a/release/update_zygisk_unionpay.json b/release/update_zygisk_unionpay.json index f52483b..db43f77 100644 --- a/release/update_zygisk_unionpay.json +++ b/release/update_zygisk_unionpay.json @@ -1,6 +1,6 @@ { - "version": "4.7.1", + "version": "4.7.3", "versionCode": "23", - "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/zygisk-module-xfingerprint-pay-unionpay-v4.7.1-release.zip", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/zygisk-module-xfingerprint-pay-unionpay-v4.7.3-release.zip", "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" } \ No newline at end of file diff --git a/release/update_zygisk_wechat.json b/release/update_zygisk_wechat.json index 62abd94..1c972d1 100644 --- a/release/update_zygisk_wechat.json +++ b/release/update_zygisk_wechat.json @@ -1,6 +1,6 @@ { - "version": "4.7.1", + "version": "4.7.3", "versionCode": "23", - "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/zygisk-module-xfingerprint-pay-wechat-v4.7.1-release.zip", + "zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/zygisk-module-xfingerprint-pay-wechat-v4.7.3-release.zip", "changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md" } \ No newline at end of file diff --git a/riru/flash.sh b/riru/flash.sh index 36bf9be..797cdc1 100755 --- a/riru/flash.sh +++ b/riru/flash.sh @@ -3,13 +3,13 @@ set -e cd ${0%/*} bash ./build.sh :module:flashRelease ./src/gradle/qq.gradle Zygisk -bash ./build.sh :module:flashRelease ./src/gradle/qq.gradle Riru +#bash ./build.sh :module:flashRelease ./src/gradle/qq.gradle Riru bash ./build.sh :module:flashRelease ./src/gradle/alipay.gradle Zygisk -bash ./build.sh :module:flashRelease ./src/gradle/alipay.gradle Riru +#bash ./build.sh :module:flashRelease ./src/gradle/alipay.gradle Riru bash ./build.sh :module:flashRelease ./src/gradle/taobao.gradle Zygisk -bash ./build.sh :module:flashRelease ./src/gradle/taobao.gradle Riru +#bash ./build.sh :module:flashRelease ./src/gradle/taobao.gradle Riru bash ./build.sh :module:flashRelease ./src/gradle/wechat.gradle Zygisk -bash ./build.sh :module:flashRelease ./src/gradle/wechat.gradle Riru +#bash ./build.sh :module:flashRelease ./src/gradle/wechat.gradle Riru bash ./build.sh :module:flashRelease ./src/gradle/unionpay.gradle Zygisk -bash ./build.sh :module:flashRelease ./src/gradle/unionpay.gradle Riru +#bash ./build.sh :module:flashRelease ./src/gradle/unionpay.gradle Riru adb shell "rm -f /data/local/tmp/lib*.debug.dex" \ No newline at end of file