File tree Expand file tree Collapse file tree 4 files changed +25
-13
lines changed
app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui Expand file tree Collapse file tree 4 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,16 @@ package com.sevtinge.hyperceiler.module.hook.systemui
2121import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
2222import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
2323import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
24- import com.sevtinge.hyperceiler.module.base.BaseHook
24+ import com.sevtinge.hyperceiler.module.base.*
25+ import com.sevtinge.hyperceiler.utils.devicesdk.*
2526
2627object DisableBottomBar : BaseHook() {
2728 override fun init () {
28- val clazzMiuiBaseWindowDecoration =
29+ val clazzMiuiBaseWindowDecoration = if (isMoreAndroidVersion(35 )) {
30+ loadClass(" com.android.wm.shell.multitasking.miuimultiwinswitch.miuiwindowdecor.MiuiBottomDecoration" , lpparam.classLoader)
31+ } else {
2932 loadClass(" com.android.wm.shell.miuimultiwinswitch.miuiwindowdecor.MiuiBaseWindowDecoration" , lpparam.classLoader)
33+ }
3034
3135 clazzMiuiBaseWindowDecoration.methodFinder().filterByName(" createBottomCaption" ).first()
3236 .createHook {
Original file line number Diff line number Diff line change @@ -4,13 +4,16 @@ import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
44import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
55import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
66import com.sevtinge.hyperceiler.module.base.*
7+ import com.sevtinge.hyperceiler.utils.devicesdk.*
78
89
910object DisableInfinitymodeGesture : BaseHook() {
1011 override fun init () {
11- loadClass(
12- " com.android.wm.shell.miuifreeform.MiuiInfinityModeSizesPolicy" ,
13- ).methodFinder().filterByName(" isForbiddenWindow" ).single().createHook {
12+ if (isMoreAndroidVersion(35 )) {
13+ loadClass(" com.android.wm.shell.multitasking.miuiinfinitymode.MiuiInfinityModeSizesPolicy" , lpparam.classLoader)
14+ } else {
15+ loadClass(" com.android.wm.shell.miuifreeform.MiuiInfinityModeSizesPolicy" , lpparam.classLoader)
16+ }.methodFinder().filterByName(" isForbiddenWindow" ).single().createHook {
1417 returnConstant(true )
1518 }
1619 }
Original file line number Diff line number Diff line change @@ -21,17 +21,17 @@ package com.sevtinge.hyperceiler.module.hook.systemui
2121import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
2222import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
2323import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
24- import com.sevtinge.hyperceiler.module.base.BaseHook
24+ import com.sevtinge.hyperceiler.module.base.*
2525import com.sevtinge.hyperceiler.utils.devicesdk.*
2626
2727// by ljlvink
2828object DisableMiuiMultiWinSwitch : BaseHook() {
2929 override fun init () {
30- loadClass(
31- if (isMoreAndroidVersion( 35 )) " com.android.wm.shell.multitasking.miuimultiwinswitch.miuiwindowdecor.MiuiDotView"
32- else " com.android.wm.shell.miuimultiwinswitch.miuiwindowdecor.MiuiDotView " ,
33- lpparam.classLoader
34- ) .methodFinder()
30+ if (isMoreAndroidVersion( 35 )) {
31+ loadClass( " com.android.wm.shell.multitasking.miuimultiwinswitch.miuiwindowdecor.MiuiDotView" , lpparam.classLoader)
32+ } else {
33+ loadClass( " com.android.wm.shell.miuimultiwinswitch.miuiwindowdecor.MiuiDotView " , lpparam.classLoader)
34+ } .methodFinder()
3535 .filterByName(" onDraw" )
3636 .single().createHook {
3737 returnConstant(null )
Original file line number Diff line number Diff line change @@ -21,12 +21,17 @@ package com.sevtinge.hyperceiler.module.hook.systemui
2121import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
2222import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
2323import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
24- import com.sevtinge.hyperceiler.module.base.BaseHook
24+ import com.sevtinge.hyperceiler.module.base.*
25+ import com.sevtinge.hyperceiler.utils.devicesdk.*
2526
2627// by ljlvink
2728object RemoveMiuiMultiWinSwitch : BaseHook() {
2829 override fun init () {
29- loadClass(" com.android.wm.shell.miuimultiwinswitch.miuiwindowdecor.MiuiBaseWindowDecoration" , lpparam.classLoader).methodFinder()
30+ if (isMoreAndroidVersion(35 )) {
31+ loadClass(" com.android.wm.shell.multitasking.miuimultiwinswitch.miuiwindowdecor.MiuiBaseWindowDecoration" , lpparam.classLoader)
32+ } else {
33+ loadClass(" com.android.wm.shell.miuimultiwinswitch.miuiwindowdecor.MiuiBaseWindowDecoration" , lpparam.classLoader)
34+ }.methodFinder()
3035 .filterByName(" shouldHideCaption" )
3136 .single().createHook {
3237 returnConstant(true )
You can’t perform that action at this time.
0 commit comments