Skip to content

Commit

Permalink
+ 4.7.3 fixed 网络太慢导致支付设置页面加载超时
Browse files Browse the repository at this point in the history
  • Loading branch information
eritpchy committed Jun 15, 2023
1 parent 2617c3e commit 79d6a5b
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 38 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -57,6 +58,7 @@ public class AlipayBasePlugin {

private boolean mIsViewTreeObserverFirst;
private int mAlipayVersionCode;
private ActivityViewObserver mSettingPageEnteredObserver;

private int getAlipayVersionCode(Context context) {
if (mAlipayVersionCode != 0) {
Expand All @@ -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")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class ActivityViewObserver {
private WeakReference<Activity> mActivityRef;
private boolean mRunning = false;
private String mViewIdentifyType;
private String mViewIdentifyText;
private String[] mViewIdentifyTexts;

public ActivityViewObserver(Activity weakRefActivity) {
this.mActivityRef = new WeakReference<>(weakRefActivity);
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions release/update_riru_alipay.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions release/update_riru_qq.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions release/update_riru_taobao.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions release/update_riru_unionpay.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions release/update_riru_wechat.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions release/update_zygisk_alipay.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions release/update_zygisk_qq.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions release/update_zygisk_taobao.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions release/update_zygisk_unionpay.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions release/update_zygisk_wechat.json
Original file line number Diff line number Diff line change
@@ -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"
}
10 changes: 5 additions & 5 deletions riru/flash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 79d6a5b

Please sign in to comment.