mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-12 11:21:18 +08:00
Fix AlwaysDisplayTime on newer version miuihome (#215)
Fix AlwaysDisplayTime on newer version miuihome
This commit is contained in:
@@ -8,8 +8,18 @@ import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
|
||||
object AlwaysDisplayTimeForS : HookRegister() {
|
||||
|
||||
override fun init() {
|
||||
try {
|
||||
findMethod("com.miui.home.launcher.Workspace") {
|
||||
name == "isScreenHasClockGadget" && parameterCount == 1
|
||||
name == "isScreenHasClockGadget"
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
findMethod("com.miui.home.launcher.Workspace") {
|
||||
name == "isScreenHasClockWidget"
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
findMethod("com.miui.home.launcher.Workspace") {
|
||||
name == "isClockWidget"
|
||||
}
|
||||
}.hookBefore {
|
||||
hasEnable("home_time") {
|
||||
it.result = false
|
||||
|
||||
Reference in New Issue
Block a user