Skip to content

Commit

Permalink
Partial optimization
Browse files Browse the repository at this point in the history
Signed-off-by: mu7220 <[email protected]>
  • Loading branch information
lingqiqi5211 committed Feb 24, 2024
1 parent 8e17ae8 commit 8da6556
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ HyperCeiler 已停止维护 Android 11-12 的 MIUI ROM,除系统框架、系
| 搜狗输入法小米版 | com.sohu.inputmethod.sogou.xiaomi |
| 天气 | com.miui.weather2 |
| 互联互通服务 (投屏) | com.milink.service |
| 跨屏协同服务 (MIUI+ Beta 版) | com.xiaomi.mirror |
| 外部存储设备 | com.android.externalstorage |
| 息屏与锁屏编辑 (万象息屏) | com.miui.aod |
| 文件管理 | com.android.fileexplorer |
Expand Down Expand Up @@ -136,6 +137,7 @@ HyperCeiler 已停止维护 Android 11-12 的 MIUI ROM,除系统框架、系
- [「HyperSmartCharge」 by buffcow](https://github.com/buffcow/HyperSmartCharge)
- [「Kotlin」 by JetBrains](https://github.com/JetBrains/kotlin)
- [「MaxFreeForm」 by YifePlayte](https://github.com/YifePlayte/MaxFreeForm)
- [「MediaControl-BlurBg」 by YuKongA](https://github.com/YuKongA/MediaControl-BlurBg)
- [「Miui Feature」 by MoralNorm](https://github.com/moralnorm/miui_feature)
- [「MiuiHomeR」 by qqlittleice](https://github.com/qqlittleice/MiuiHome_R)
- [「MIUI IME Unlock」 by RC1844](https://github.com/RC1844/MIUI_IME_Unlock)
Expand Down
2 changes: 2 additions & 0 deletions README_en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ HyperCeiler has stopped maintaining the MIUI ROM of Android 11-12, except for th
| Sogou Keyboard for MIUI | com.sohu.inputmethod.sogou.xiaomi |
| Weather | com.miui.weather2 |
| Cast | com.milink.service |
| MIUI+ | com.xiaomi.mirror |
| External Storage | com.android.externalstorage |
| Always-on display | com.miui.aod |
| File Manager | com.android.fileexplorer |
Expand Down Expand Up @@ -136,6 +137,7 @@ You can provide translations for the HyperCeiler project [here](https://crwd.in/
- [「HyperSmartCharge」 by buffcow](https://github.com/buffcow/HyperSmartCharge)
- [「Kotlin」 by JetBrains](https://github.com/JetBrains/kotlin)
- [「MaxFreeForm」 by YifePlayte](https://github.com/YifePlayte/MaxFreeForm)
- [「MediaControl-BlurBg」 by YuKongA](https://github.com/YuKongA/MediaControl-BlurBg)
- [「Miui Feature」 by MoralNorm](https://github.com/moralnorm/miui_feature)
- [「MiuiHomeR」 by qqlittleice](https://github.com/qqlittleice/MiuiHome_R)
- [「MIUI IME Unlock」 by RC1844](https://github.com/RC1844/MIUI_IME_Unlock)
Expand Down
2 changes: 2 additions & 0 deletions README_pt-BR.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ O HyperCeiler deixou de ser mantido em ROM MIUI para o Android 11-12, exceto par
| Sogou Keyboard for MIUI | com.sohu.inputmethod.sogou.xiaomi |
| Clima | com.miui.weather2 |
| Transmitir | com.milink.service |
| Serviços de interconectividade de dispositivos | com.xiaomi.mirror |
| Armazenamento externo | com.android.externalstorage |
| Tela ambiente | com.miui.aod |
| Arquivos | com.android.fileexplorer |
Expand Down Expand Up @@ -136,6 +137,7 @@ O <b>HyperCeiler</b> usa alguns ou todos os projetos a seguir, graças ao apoio
- [「HyperSmartCharge」 por buffcow](https://github.com/buffcow/HyperSmartCharge)
- [「Kotlin」 por JetBrains](https://github.com/JetBrains/kotlin)
- [「MaxFreeForm」 por YifePlayte](https://github.com/YifePlayte/MaxFreeForm)
- [「MediaControl-BlurBg」 por YuKongA](https://github.com/YuKongA/MediaControl-BlurBg)
- [「Miui Feature」 por MoralNorm](https://github.com/moralnorm/miui_feature)
- [「MiuiHomeR」 por qqlittleice](https://github.com/qqlittleice/MiuiHome_R)
- [「MIUI IME Unlock」 por RC1844](https://github.com/RC1844/MIUI_IME_Unlock)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ public class ViewWifiPasswordHook extends BaseHook {
public void init() {
int titleId = R.string.system_settings_wifipassword_btn_title;
int dlgTitleId = R.string.system_settings_wifi_password_dlgtitle;

hookAllMethods("com.android.settings.wifi.SavedAccessPointPreference", lpparam.classLoader, "onBindViewHolder", new MethodHook() {
@Override
@SuppressLint("DiscouragedApi")
protected void after(MethodHookParam param) throws Throwable {
protected void after(MethodHookParam param) {
View view = (View) XposedHelpers.getObjectField(param.thisObject, "mView");
int btnId = view.getResources().getIdentifier("btn_delete", "id", "com.android.settings");
Button button = view.findViewById(btnId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,22 @@ import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
import com.sevtinge.hyperceiler.module.base.BaseHook
import com.sevtinge.hyperceiler.utils.devicesdk.isAndroidVersion
import com.sevtinge.hyperceiler.utils.devicesdk.isMoreAndroidVersion
import de.robv.android.xposed.XposedHelpers
import de.robv.android.xposed.XposedHelpers.getAdditionalInstanceField
import de.robv.android.xposed.XposedHelpers.setAdditionalInstanceField

object LockScreenDoubleTapToSleep : BaseHook() {
val className by lazy {
if (isAndroidVersion(34)) {
loadClass("com.android.systemui.shade.NotificationsQuickSettingsContainer")
} else {
loadClass("com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer")
}
}

override fun init() {
val className by lazy {
if (isMoreAndroidVersion(34)) {
loadClass("com.android.systemui.shade.NotificationsQuickSettingsContainer", lpparam.classLoader)
} else {
loadClass("com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer", lpparam.classLoader)
}
}

className.methodFinder()
.filterByName("onFinishInflate")
.single().createHook {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<item>com.xiaomi.barrage</item>
<item>com.xiaomi.joyose</item>
<item>com.xiaomi.market</item>
<item>com.xiaomi.mirror</item>
<item>com.xiaomi.misettings</item>
<item>com.xiaomi.mtb</item>
<item>com.xiaomi.NetworkBoost</item>
Expand Down

0 comments on commit 8da6556

Please sign in to comment.