mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-07 03:05:44 +08:00
Update YukiHookAPI
This commit is contained in:
@@ -72,8 +72,8 @@ tasks.whenTaskAdded {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'de.robv.android.xposed:api:82'
|
compileOnly 'de.robv.android.xposed:api:82'
|
||||||
implementation 'com.highcapable.yukihookapi:api:1.0.6'
|
implementation 'com.highcapable.yukihookapi:api:1.0.65'
|
||||||
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.0.6'
|
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.0.65'
|
||||||
implementation 'com.github.tiann:FreeReflection:3.1.0'
|
implementation 'com.github.tiann:FreeReflection:3.1.0'
|
||||||
implementation "com.github.topjohnwu.libsu:core:3.1.2"
|
implementation "com.github.topjohnwu.libsu:core:3.1.2"
|
||||||
implementation 'androidx.annotation:annotation:1.3.0'
|
implementation 'androidx.annotation:annotation:1.3.0'
|
||||||
|
@@ -271,10 +271,10 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
drawable = iconDrawable
|
drawable = iconDrawable
|
||||||
).also { pair ->
|
).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)) }
|
it.post { it.setImageDrawable(roundUtil.invoke(pair.first, sRadius, sNfSize, sNfSize, it.context)) }
|
||||||
}
|
}
|
||||||
@@ -306,7 +306,7 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
}.get(it.method {
|
}.get(it.method {
|
||||||
name = "getInstance"
|
name = "getInstance"
|
||||||
param(ContextClass)
|
param(ContextClass)
|
||||||
}.get().invoke(context)).invoke<Boolean>(drawable) ?: false
|
}.get().invoke(context)).callBoolean(drawable)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -137,7 +137,7 @@ val colorOSVersion
|
|||||||
get() = safeOf(default = "无法获取") {
|
get() = safeOf(default = "无法获取") {
|
||||||
(classOf(name = "com.oplus.os.OplusBuild").let {
|
(classOf(name = "com.oplus.os.OplusBuild").let {
|
||||||
it.field { name = "VERSIONS" }.ignoredError().of<Array<String>>()
|
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(
|
} ?: findPropString(
|
||||||
key = "ro.system.build.fingerprint", default = "无法获取"
|
key = "ro.system.build.fingerprint", default = "无法获取"
|
||||||
).split("ssi:")[1].split("/")[0].trim()) + " ${Build.DISPLAY}"
|
).split("ssi:")[1].split("/")[0].trim()) + " ${Build.DISPLAY}"
|
||||||
|
Reference in New Issue
Block a user