diff --git a/README.md b/README.md index 112dea8157..785c1f571f 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,7 @@ HyperCeiler 已停止维护 Android 11-12 的 MIUI ROM,如需使用请停留[ - [「Android」 by Android Open Source Project, Google Inc.](https://source.android.google.cn/license) - [「AndroidHiddenApiBypass」 by LSPosed](https://github.com/LSPosed/AndroidHiddenApiBypass) - [「AndroidX」 by Android Open Source Project, Google Inc.](https://github.com/androidx/androidx) +- [「AutoSEffSwitch」 by 焕晨 HChen](https://github.com/HChenX/AutoSEffSwitch) - [「AntiAntiDefraud」 by MinaMichita](https://github.com/MinaMichita/AntiAntiDefraud) - [「Auto NFC」 by GSWXXN](https://github.com/GSWXXN/AutoNFC) - [「BypassSignCheck」 by Weverses](https://github.com/Weverses/BypassSignCheck) diff --git a/README_en-US.md b/README_en-US.md index 9b2a059e92..2f784e4aac 100644 --- a/README_en-US.md +++ b/README_en-US.md @@ -112,6 +112,7 @@ Note: When the translation progress of the new language is greater than or equal - [「Android」 by Android Open Source Project, Google Inc.](https://source.android.google.cn/license) - [「AndroidHiddenApiBypass」 by LSPosed](https://github.com/LSPosed/AndroidHiddenApiBypass) - [「AndroidX」 by Android Open Source Project, Google Inc.](https://github.com/androidx/androidx) +- [「AutoSEffSwitch」 by 焕晨 HChen](https://github.com/HChenX/AutoSEffSwitch) - [「AntiAntiDefraud」 by MinaMichita](https://github.com/MinaMichita/AntiAntiDefraud) - [「Auto NFC」 by GSWXXN](https://github.com/GSWXXN/AutoNFC) - [「BypassSignCheck」 by Weverses](https://github.com/Weverses/BypassSignCheck) diff --git a/README_pt-BR.md b/README_pt-BR.md index b81aff7fcc..717b869d01 100644 --- a/README_pt-BR.md +++ b/README_pt-BR.md @@ -112,6 +112,7 @@ Observação: Quando o progresso da tradução do novo idioma for maior ou igual - [「Android」 por Android Open Source Project, Google Inc.](https://source.android.google.cn/license) - [「AndroidHiddenApiBypass」 por LSPosed](https://github.com/LSPosed/AndroidHiddenApiBypass) - [「AndroidX」 por Android Open Source Project, Google Inc.](https://github.com/androidx/androidx) +- [「AutoSEffSwitch」 by 焕晨 HChen](https://github.com/HChenX/AutoSEffSwitch) - [「AntiAntiDefraud」 por MinaMichita](https://github.com/MinaMichita/AntiAntiDefraud) - [「Auto NFC」 por GSWXXN](https://github.com/GSWXXN/AutoNFC) - [「BypassSignCheck」 por Weverses](https://github.com/Weverses/BypassSignCheck) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/SecurityCenterT.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/SecurityCenterT.java index 29ecd9cda5..3d64162e16 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/SecurityCenterT.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter/SecurityCenterT.java @@ -29,6 +29,7 @@ import com.sevtinge.hyperceiler.module.hook.securitycenter.IsSbnBelongToActiveBubbleApp; import com.sevtinge.hyperceiler.module.hook.securitycenter.NewBoxBlur; import com.sevtinge.hyperceiler.module.hook.securitycenter.PowerSaver; +import com.sevtinge.hyperceiler.module.hook.securitycenter.PrivacyThumbnailBlur; import com.sevtinge.hyperceiler.module.hook.securitycenter.RemoveConversationBubbleSettingsRestriction; import com.sevtinge.hyperceiler.module.hook.securitycenter.RemoveOpenAppConfirmationPopup; import com.sevtinge.hyperceiler.module.hook.securitycenter.ScLockApp; @@ -129,6 +130,7 @@ public void handleLoadPackage() { mPrefsMap.getBoolean("security_center_unlock_s_resolution") || mPrefsMap.getBoolean("security_center_unlock_enhance_contours"); + initHook(new PrivacyThumbnailBlur(), mPrefsMap.getBoolean("security_center_privacy_thumbnail_blur")); initHook(new PowerSaver(), mPrefsMap.getBoolean("security_center_power_saver")); initHook(new NewBoxBlur(), mPrefsMap.getBoolean("security_center_newbox_custom_enable")); initHook(BlurSecurity.INSTANCE, mPrefsMap.getBoolean("se_enable")); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/PrivacyThumbnailBlur.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/PrivacyThumbnailBlur.java new file mode 100644 index 0000000000..8acd275c97 --- /dev/null +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/PrivacyThumbnailBlur.java @@ -0,0 +1,47 @@ +package com.sevtinge.hyperceiler.module.hook.securitycenter; + +import android.content.Context; + +import com.sevtinge.hyperceiler.module.base.BaseTool; +import com.sevtinge.hyperceiler.module.base.dexkit.DexKit; +import com.sevtinge.hyperceiler.module.base.dexkit.IDexKit; + +import org.luckypray.dexkit.DexKitBridge; +import org.luckypray.dexkit.query.FindMethod; +import org.luckypray.dexkit.query.matchers.ClassMatcher; +import org.luckypray.dexkit.query.matchers.MethodMatcher; + +import java.lang.reflect.AnnotatedElement; +import java.lang.reflect.Method; +import java.util.Arrays; + +public class PrivacyThumbnailBlur extends BaseTool { + @Override + public void doHook() { + Method method = (Method) DexKit.getDexKitBridge("ptb", new IDexKit() { + @Override + public AnnotatedElement dexkit(DexKitBridge bridge) throws ReflectiveOperationException { + return bridge.findMethod(FindMethod.create() + .matcher(MethodMatcher.create() + .declaredClass(ClassMatcher.create() + .usingStrings("miui_recents_privacy_thumbnail_blur") + ) + .paramTypes(Context.class, String.class, boolean.class) + ) + ).singleOrNull().getMethodInstance(lpparam.classLoader); + } + }); + + hookMethod(method, new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); + if (Arrays.stream(stackTraceElements).noneMatch(stackTraceElement -> + stackTraceElement.getClassName().equals("PrivacyThumbnailBlurSettings") + )) { + param.setResult(null); + } + } + }); + } +} diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index ae4cbebfd1..2509cbdb59 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -1443,6 +1443,7 @@ 管理应用获取手机号并一键登录 应用锁乱序 PIN 禁止妙享省电 + 禁止自启模糊预览图 禁止在通过小米妙享镜像流转屏幕时开启省电模式 随机更改应用锁 PIN 键盘顺序 解锁智能调节补光灯亮度 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2df3a76532..fe628cf3be 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1413,6 +1413,7 @@ Manage the application to obtain the mobile phone number and log in with one click Applock out of order PIN Magic Share doesn\'t save power + Disable self-starting blurred preview images Disable power saving mode when screen mirroring via Mi Smart Hub Randomly change app lock PIN keypad sequence Unlock Adjust fill light brightness automatically diff --git a/app/src/main/res/xml/prefs_about_use.xml b/app/src/main/res/xml/prefs_about_use.xml index 95831aa310..1bcef3ba54 100644 --- a/app/src/main/res/xml/prefs_about_use.xml +++ b/app/src/main/res/xml/prefs_about_use.xml @@ -30,6 +30,13 @@ android:action="android.intent.action.VIEW" android:data="https://github.com/androidx/androidx" /> + + + diff --git a/app/src/main/res/xml/security_center_other.xml b/app/src/main/res/xml/security_center_other.xml index 2b487edaed..3a2cab098d 100644 --- a/app/src/main/res/xml/security_center_other.xml +++ b/app/src/main/res/xml/security_center_other.xml @@ -54,6 +54,11 @@ android:summary="@string/security_center_power_saver_desc" android:title="@string/security_center_power_saver" /> + +