Skip to content

Commit 79d6a5b

Browse files
committed
+ 4.7.3 fixed 网络太慢导致支付设置页面加载超时
1 parent 2617c3e commit 79d6a5b

14 files changed

+57
-38
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion 14
1010
targetSdkVersion 30
1111
versionCode 23
12-
versionName "4.7.1"
12+
versionName "4.7.3"
1313
buildConfigField "String", "APP_PRODUCT_NAME", "\"FingerprintPay\""
1414
}
1515

app/src/main/java/com/surcumference/fingerprint/plugin/AlipayBasePlugin.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.surcumference.fingerprint.BuildConfig;
2525
import com.surcumference.fingerprint.Lang;
2626
import com.surcumference.fingerprint.R;
27+
import com.surcumference.fingerprint.util.ActivityViewObserver;
2728
import com.surcumference.fingerprint.util.AlipayVersionControl;
2829
import com.surcumference.fingerprint.util.ApplicationUtils;
2930
import com.surcumference.fingerprint.util.BlackListUtils;
@@ -57,6 +58,7 @@ public class AlipayBasePlugin {
5758

5859
private boolean mIsViewTreeObserverFirst;
5960
private int mAlipayVersionCode;
61+
private ActivityViewObserver mSettingPageEnteredObserver;
6062

6163
private int getAlipayVersionCode(Context context) {
6264
if (mAlipayVersionCode != 0) {
@@ -75,8 +77,21 @@ protected void onActivityCreated(Activity activity) {
7577
}
7678
int alipayVersionCode = getAlipayVersionCode(activity);
7779
if (alipayVersionCode >= 773 /** 10.3.80.9100 */ && activityClzName.contains(".FBAppWindowActivity")) {
78-
Task.onMain(500, () -> doSettingsMenuInject_10_1_38(activity));
79-
Task.onMain(1000, () -> doSettingsMenuInject_10_1_38(activity));
80+
81+
ActivityViewObserver activityViewObserver = mSettingPageEnteredObserver;
82+
if (activityViewObserver != null) {
83+
activityViewObserver.stop();
84+
mSettingPageEnteredObserver = null;
85+
}
86+
activityViewObserver = new ActivityViewObserver(activity);
87+
activityViewObserver.setViewIdentifyText("支付密码", "支付密碼", "Payment Password");
88+
activityViewObserver.start(100, (observer, view) -> doSettingsMenuInject_10_1_38(activity));
89+
mSettingPageEnteredObserver = activityViewObserver;
90+
ActivityViewObserver finalActivityViewObserver = activityViewObserver;
91+
Task.onBackground(30000, () -> {
92+
mSettingPageEnteredObserver = null;
93+
finalActivityViewObserver.stop();
94+
});
8095
} else if (activityClzName.contains(".MySettingActivity")) {
8196
Task.onMain(100, () -> doSettingsMenuInject_10_1_38(activity));
8297
} else if (activityClzName.contains(".UserSettingActivity")) {

app/src/main/java/com/surcumference/fingerprint/util/ActivityViewObserver.java

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class ActivityViewObserver {
1818
private WeakReference<Activity> mActivityRef;
1919
private boolean mRunning = false;
2020
private String mViewIdentifyType;
21-
private String mViewIdentifyText;
21+
private String[] mViewIdentifyTexts;
2222

2323
public ActivityViewObserver(Activity weakRefActivity) {
2424
this.mActivityRef = new WeakReference<>(weakRefActivity);
@@ -28,13 +28,13 @@ public void setViewIdentifyType(String viewIdentifyType) {
2828
this.mViewIdentifyType = viewIdentifyType;
2929
}
3030

31-
public void setViewIdentifyText(String viewIdentifyText) {
32-
this.mViewIdentifyText = viewIdentifyText;
31+
public void setViewIdentifyText(String ...viewIdentifyTexts) {
32+
this.mViewIdentifyTexts = viewIdentifyTexts;
3333
}
3434

3535
public void start(long loopMSec, IActivityViewListener listener) {
36-
if (TextUtils.isEmpty(this.mViewIdentifyType) && TextUtils.isEmpty(this.mViewIdentifyText)) {
37-
throw new IllegalArgumentException("Error: ViewIdentifyType or ViewIdentifyText not set");
36+
if (TextUtils.isEmpty(this.mViewIdentifyType) && (mViewIdentifyTexts == null || mViewIdentifyTexts.length == 0)) {
37+
throw new IllegalArgumentException("Error: ViewIdentifyType or ViewIdentifyTexts not set");
3838
}
3939
if (mRunning) {
4040
return;
@@ -84,11 +84,15 @@ private void task(long loopMSec, IActivityViewListener listener) {
8484
break;
8585
}
8686
}
87-
String viewIdentifyText = this.mViewIdentifyText;
88-
if (!TextUtils.isEmpty(viewIdentifyText)) {
89-
ViewUtils.getChildViews((ViewGroup) decorView, viewIdentifyText, viewList);
90-
if (viewList.size() > 0) {
91-
break;
87+
String[] viewIdentifyTexts = this.mViewIdentifyTexts;
88+
if (viewIdentifyTexts != null) {
89+
for (String viewIdentifyText: this.mViewIdentifyTexts) {
90+
if (!TextUtils.isEmpty(viewIdentifyText)) {
91+
ViewUtils.getChildViews((ViewGroup) decorView, viewIdentifyText, viewList);
92+
if (viewList.size() > 0) {
93+
break;
94+
}
95+
}
9296
}
9397
}
9498
}

release/update_riru_alipay.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "4.7.1",
2+
"version": "4.7.3",
33
"versionCode": "23",
4-
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/riru-module-xfingerprint-pay-alipay-v4.7.1-release.zip",
4+
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/riru-module-xfingerprint-pay-alipay-v4.7.3-release.zip",
55
"changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md"
66
}

release/update_riru_qq.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "4.7.1",
2+
"version": "4.7.3",
33
"versionCode": "23",
4-
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/riru-module-xfingerprint-pay-qq-v4.7.1-release.zip",
4+
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/riru-module-xfingerprint-pay-qq-v4.7.3-release.zip",
55
"changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md"
66
}

release/update_riru_taobao.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "4.7.1",
2+
"version": "4.7.3",
33
"versionCode": "23",
4-
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/riru-module-xfingerprint-pay-taobao-v4.7.1-release.zip",
4+
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/riru-module-xfingerprint-pay-taobao-v4.7.3-release.zip",
55
"changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md"
66
}

release/update_riru_unionpay.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "4.7.1",
2+
"version": "4.7.3",
33
"versionCode": "23",
4-
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/riru-module-xfingerprint-pay-unionpay-v4.7.1-release.zip",
4+
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/riru-module-xfingerprint-pay-unionpay-v4.7.3-release.zip",
55
"changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md"
66
}

release/update_riru_wechat.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "4.7.1",
2+
"version": "4.7.3",
33
"versionCode": "23",
4-
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/riru-module-xfingerprint-pay-wechat-v4.7.1-release.zip",
4+
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/riru-module-xfingerprint-pay-wechat-v4.7.3-release.zip",
55
"changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md"
66
}

release/update_zygisk_alipay.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "4.7.1",
2+
"version": "4.7.3",
33
"versionCode": "23",
4-
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/zygisk-module-xfingerprint-pay-alipay-v4.7.1-release.zip",
4+
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/zygisk-module-xfingerprint-pay-alipay-v4.7.3-release.zip",
55
"changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md"
66
}

release/update_zygisk_qq.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "4.7.1",
2+
"version": "4.7.3",
33
"versionCode": "23",
4-
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.1-ci/zygisk-module-xfingerprint-pay-qq-v4.7.1-release.zip",
4+
"zipUrl": "https://github.com/eritpchy/FingerprintPay/releases/download/4.7.3-ci/zygisk-module-xfingerprint-pay-qq-v4.7.3-release.zip",
55
"changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md"
66
}

0 commit comments

Comments
 (0)