3 Commits

Author SHA1 Message Date
Hd
a82de55694 fix: throw null receiver when singleton is null on Android 9 (#112) 2025-08-25 19:42:57 +08:00
59c4b9870b chore: bump dependencies 2025-08-24 03:02:07 +08:00
Hd
bab5068484 fix: check origin return value is an issue with type Any (#111)
* fix: check origin return value is an issue with type Any

* refactor: replace to modern usage

---------

Co-authored-by: fankesyooni <qzmmcn@163.com>
2025-08-19 19:46:46 +08:00
3 changed files with 21 additions and 17 deletions

View File

@@ -61,15 +61,15 @@ libraries:
version: 1.0.1
com.highcapable.hikage:
hikage-core:
version: 1.0.1
version: 1.0.2
hikage-compiler:
version: 1.0.0
version: 1.0.1
hikage-extension:
version: 1.0.0
version: 1.0.1
hikage-widget-androidx:
version: 1.0.0
version: 1.0.1
hikage-widget-material:
version: 1.0.0
version: 1.0.1
com.highcapable.betterandroid:
ui-component:
version: 1.0.8

View File

@@ -26,6 +26,7 @@
package com.highcapable.yukihookapi.hook.core
import com.highcapable.kavaref.extension.classOf
import com.highcapable.kavaref.extension.isNotSubclassOf
import com.highcapable.yukihookapi.YukiHookAPI
import com.highcapable.yukihookapi.hook.bean.HookClass
@@ -545,6 +546,7 @@ class YukiMemberHookCreator internal constructor(private val packageParam: Packa
*/
private fun checkingReturnType(origin: Class<*>?, target: Class<*>?) {
if (origin == null || target == null) return
if (origin == classOf<Any>()) return
origin.toJavaPrimitiveType().also { o ->
target.toJavaPrimitiveType().also { t ->
if (o isNotSubclassOf t && t isNotSubclassOf o)

View File

@@ -509,6 +509,7 @@ internal object AppParasitics {
?.optional(silent = true)
?.firstFieldOrNull { name = "IActivityTaskManagerSingleton" }
?.get()
singleton?.let {
SingletonClass.resolve()
.processor(AndroidHiddenApiBypassResolver.get())
.optional(silent = true)
@@ -520,6 +521,7 @@ internal object AppParasitics {
mInstance2?.let {
mInstanceResolver2.set(IActivityManagerProxyImpl.createWrapper(IActivityTaskManagerClass, it))
}
}
isActivityProxyRegistered = true
}.onFailure { YLog.innerE("Activity Proxy initialization failed because got an exception", it) }
}