Fix some system maybe not found Rect class in "onDarkChanged" method of NotificationIconAreaController class in SystemUIHooker

This commit is contained in:
2023-02-01 23:53:55 +08:00
parent 2289e3a5bf
commit e47359dfe9

View File

@@ -61,6 +61,7 @@ import com.highcapable.yukihookapi.hook.factory.*
import com.highcapable.yukihookapi.hook.log.loggerD import com.highcapable.yukihookapi.hook.log.loggerD
import com.highcapable.yukihookapi.hook.log.loggerW import com.highcapable.yukihookapi.hook.log.loggerW
import com.highcapable.yukihookapi.hook.type.android.* import com.highcapable.yukihookapi.hook.type.android.*
import com.highcapable.yukihookapi.hook.type.defined.VagueType
import com.highcapable.yukihookapi.hook.type.java.BooleanType import com.highcapable.yukihookapi.hook.type.java.BooleanType
import com.highcapable.yukihookapi.hook.type.java.FloatType import com.highcapable.yukihookapi.hook.type.java.FloatType
import com.highcapable.yukihookapi.hook.type.java.IntType import com.highcapable.yukihookapi.hook.type.java.IntType
@@ -747,7 +748,7 @@ object SystemUIHooker : YukiBaseHooker() {
injectMember { injectMember {
method { method {
name = "onDarkChanged" name = "onDarkChanged"
param(RectClass, FloatType, IntType) param(VagueType, FloatType, IntType)
} }
afterHook { afterHook {
field { name = "mNotificationIcons" }.get(instance).cast<ViewGroup>()?.also { field { name = "mNotificationIcons" }.get(instance).cast<ViewGroup>()?.also {