Skip to content

Commit

Permalink
+ 4.7.2 fixed 网络太慢导致支付设置页面加载超时
Browse files Browse the repository at this point in the history
  • Loading branch information
eritpchy committed Jun 15, 2023
1 parent 2617c3e commit eba1917
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 33 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.2"
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,12 @@ 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;
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.2",
"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.2-ci/riru-module-xfingerprint-pay-alipay-v4.7.2-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.2",
"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.2-ci/riru-module-xfingerprint-pay-qq-v4.7.2-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.2",
"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.2-ci/riru-module-xfingerprint-pay-taobao-v4.7.2-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.2",
"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.2-ci/riru-module-xfingerprint-pay-unionpay-v4.7.2-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.2",
"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.2-ci/riru-module-xfingerprint-pay-wechat-v4.7.2-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.2",
"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.2-ci/zygisk-module-xfingerprint-pay-alipay-v4.7.2-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.2",
"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.2-ci/zygisk-module-xfingerprint-pay-qq-v4.7.2-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.2",
"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.2-ci/zygisk-module-xfingerprint-pay-taobao-v4.7.2-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.2",
"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.2-ci/zygisk-module-xfingerprint-pay-unionpay-v4.7.2-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.2",
"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.2-ci/zygisk-module-xfingerprint-pay-wechat-v4.7.2-release.zip",
"changelog": "https://raw.githubusercontent.com/eritpchy/FingerprintPay/main/CHANGELOG.md"
}

0 comments on commit eba1917

Please sign in to comment.