mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-06 10:45:49 +08:00
Merge code
This commit is contained in:
@@ -484,7 +484,7 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
}
|
}
|
||||||
beforeHook {
|
beforeHook {
|
||||||
/** 是否移除 */
|
/** 是否移除 */
|
||||||
if (firstArgs as Int == 7 && prefs.getBoolean(REMOVE_CHANGECP_NOTIFY)) resultNull()
|
if (firstArgs<Int>() == 7 && prefs.getBoolean(REMOVE_CHANGECP_NOTIFY)) resultNull()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -508,7 +508,7 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
name = "isGrayscaleOplus"
|
name = "isGrayscaleOplus"
|
||||||
param(ImageViewClass, OplusContrastColorUtilClass.clazz)
|
param(ImageViewClass, OplusContrastColorUtilClass.clazz)
|
||||||
}
|
}
|
||||||
replaceAny { (firstArgs as? ImageView?)?.let { isGrayscaleIcon(it.context, it.drawable) } }
|
replaceAny { firstArgs<ImageView>()?.let { isGrayscaleIcon(it.context, it.drawable) } }
|
||||||
}.ignoredHookingFailure()
|
}.ignoredHookingFailure()
|
||||||
}
|
}
|
||||||
/** 替换状态栏图标 */
|
/** 替换状态栏图标 */
|
||||||
@@ -615,11 +615,11 @@ class HookEntry : YukiHookXposedInitProxy {
|
|||||||
if (iconDatas.takeIf { e -> e.isNotEmpty() }
|
if (iconDatas.takeIf { e -> e.isNotEmpty() }
|
||||||
?.filter { e -> e.packageName == newPkgName }
|
?.filter { e -> e.packageName == newPkgName }
|
||||||
.isNullOrEmpty()
|
.isNullOrEmpty()
|
||||||
) IconAdaptationTool.pushNewAppSupportNotify(firstArgs as Context, newPkgName)
|
) IconAdaptationTool.pushNewAppSupportNotify(firstArgs()!!, newPkgName)
|
||||||
}
|
}
|
||||||
Intent.ACTION_PACKAGE_REMOVED ->
|
Intent.ACTION_PACKAGE_REMOVED ->
|
||||||
IconAdaptationTool.removeNewAppSupportNotify(
|
IconAdaptationTool.removeNewAppSupportNotify(
|
||||||
firstArgs as Context,
|
context = firstArgs()!!,
|
||||||
packageName = it.data?.schemeSpecificPart ?: ""
|
packageName = it.data?.schemeSpecificPart ?: ""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user