mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-05 10:15:33 +08:00
更新 YukiHookAPI
This commit is contained in:
@@ -65,8 +65,8 @@ dependencies {
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
|
||||
compileOnly 'de.robv.android.xposed:api:82'
|
||||
implementation 'com.highcapable.yukihookapi:api:1.0.2'
|
||||
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.0.2'
|
||||
implementation 'com.highcapable.yukihookapi:api:1.0.3'
|
||||
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.0.3'
|
||||
implementation 'com.geyifeng.immersionbar:immersionbar:3.2.0'
|
||||
implementation 'com.geyifeng.immersionbar:immersionbar-ktx:3.2.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
||||
|
@@ -44,7 +44,6 @@ import com.fankes.coloros.notify.hook.factory.isAppNotifyHookOf
|
||||
import com.fankes.coloros.notify.param.IconPackParams
|
||||
import com.fankes.coloros.notify.utils.*
|
||||
import com.fankes.coloros.notify.utils.drawable.drawabletoolbox.DrawableBuilder
|
||||
import com.highcapable.yukihookapi.YukiHookAPI
|
||||
import com.highcapable.yukihookapi.annotation.xposed.InjectYukiHookWithXposed
|
||||
import com.highcapable.yukihookapi.hook.bean.VariousClass
|
||||
import com.highcapable.yukihookapi.hook.factory.configs
|
||||
@@ -306,20 +305,16 @@ class HookEntry : YukiHookXposedInitProxy {
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 修复并替换新版本 ColorOS 原生灰度图标色彩判断
|
||||
* TODO 这里有一个 [YukiHookAPI] 捕捉异常错误后面填坑
|
||||
*/
|
||||
if (OplusContrastColorUtilClass.hasClass)
|
||||
NotificationUtilsClass.hook {
|
||||
injectMember {
|
||||
method {
|
||||
name = "isGrayscaleOplus"
|
||||
param(ImageViewClass, OplusContrastColorUtilClass.clazz)
|
||||
}
|
||||
replaceAny { (firstArgs as? ImageView?)?.let { isGrayscaleIcon(it.context, it.drawable) } }
|
||||
/** 修复并替换新版本 ColorOS 原生灰度图标色彩判断*/
|
||||
NotificationUtilsClass.hook {
|
||||
injectMember {
|
||||
method {
|
||||
name = "isGrayscaleOplus"
|
||||
param(ImageViewClass, OplusContrastColorUtilClass.clazz)
|
||||
}
|
||||
}
|
||||
replaceAny { (firstArgs as? ImageView?)?.let { isGrayscaleIcon(it.context, it.drawable) } }
|
||||
}.ignoredHookingFailure()
|
||||
}
|
||||
/** 替换状态栏图标 */
|
||||
IconManagerClass.hook {
|
||||
injectMember {
|
||||
|
Reference in New Issue
Block a user