mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-10-23 02:49:23 +08:00
Update YukiHookAPI
This commit is contained in:
@@ -552,12 +552,12 @@ class SystemUIHooker : YukiBaseHooker() {
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 修复并替换新版本 ColorOS 原生灰度图标色彩判断*/
|
||||
/** 修复并替换新版本 ColorOS 原生灰度图标色彩判断 */
|
||||
NotificationUtilsClass.hook {
|
||||
injectMember {
|
||||
method {
|
||||
name = "isGrayscaleOplus"
|
||||
param(ImageViewClass, OplusContrastColorUtilClass.clazz)
|
||||
param(ImageViewClass, OplusContrastColorUtilClass)
|
||||
}
|
||||
replaceAny { firstArgs<ImageView>()?.let { isGrayscaleIcon(it.context, it.drawable) } }
|
||||
}.ignoredHookingFailure()
|
||||
@@ -567,7 +567,7 @@ class SystemUIHooker : YukiBaseHooker() {
|
||||
injectMember {
|
||||
method {
|
||||
name = "getIconDescriptor"
|
||||
param(NotificationEntryClass.clazz, BooleanType)
|
||||
param(NotificationEntryClass, BooleanType)
|
||||
}
|
||||
afterHook {
|
||||
IconBuilderClass.clazz.field { name = "context" }
|
||||
@@ -652,7 +652,7 @@ class SystemUIHooker : YukiBaseHooker() {
|
||||
}
|
||||
/** 记录实例 */
|
||||
injectMember {
|
||||
constructor { param(ContextClass, ViewClass, ExpandableNotificationRowClass.clazz) }
|
||||
constructor { param(ContextClass, ViewClass, ExpandableNotificationRowClass) }
|
||||
afterHook { notificationViewWrappers.add(instance) }
|
||||
}
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ import android.widget.TextView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.highcapable.yukihookapi.annotation.DoNotUseField
|
||||
import com.highcapable.yukihookapi.annotation.CauseProblemsApi
|
||||
import com.highcapable.yukihookapi.hook.factory.method
|
||||
import com.highcapable.yukihookapi.hook.type.android.LayoutInflaterClass
|
||||
|
||||
@@ -71,7 +71,7 @@ class DialogBuilder(val context: Context, private val isUseBlackTheme: Boolean)
|
||||
|
||||
private var dialogInstance: Dialog? = null // 对话框实例
|
||||
|
||||
@DoNotUseField
|
||||
@CauseProblemsApi
|
||||
var customLayoutView: View? = null // 自定义布局
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user