mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-06 02:35:41 +08:00
Update YukiHookAPI
This commit is contained in:
@@ -271,10 +271,10 @@ class HookEntry : YukiHookXposedInitProxy {
|
||||
drawable = iconDrawable
|
||||
).also { pair ->
|
||||
/** 得到图标圆角 */
|
||||
val sRadius = sRadiusField.of<Float>(it)
|
||||
val sRadius = sRadiusField.ofFloat(it)
|
||||
|
||||
/** 得到缩放大小 */
|
||||
val sNfSize = sNfSizeField.of<Int>(it)
|
||||
val sNfSize = sNfSizeField.ofInt(it)
|
||||
/** 在主线程设置图标 */
|
||||
it.post { it.setImageDrawable(roundUtil.invoke(pair.first, sRadius, sNfSize, sNfSize, it.context)) }
|
||||
}
|
||||
@@ -306,7 +306,7 @@ class HookEntry : YukiHookXposedInitProxy {
|
||||
}.get(it.method {
|
||||
name = "getInstance"
|
||||
param(ContextClass)
|
||||
}.get().invoke(context)).invoke<Boolean>(drawable) ?: false
|
||||
}.get().invoke(context)).callBoolean(drawable)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -137,7 +137,7 @@ val colorOSVersion
|
||||
get() = safeOf(default = "无法获取") {
|
||||
(classOf(name = "com.oplus.os.OplusBuild").let {
|
||||
it.field { name = "VERSIONS" }.ignoredError().of<Array<String>>()
|
||||
?.get((it.method { name = "getOplusOSVERSION" }.ignoredError().get().invoke<Int>() ?: 23) - 1)
|
||||
?.get(it.method { name = "getOplusOSVERSION" }.ignoredError().get().callInt() - 1)
|
||||
} ?: findPropString(
|
||||
key = "ro.system.build.fingerprint", default = "无法获取"
|
||||
).split("ssi:")[1].split("/")[0].trim()) + " ${Build.DISPLAY}"
|
||||
|
Reference in New Issue
Block a user