@@ -43,6 +43,7 @@ import android.os.UserHandle
4343import androidx.annotation.RequiresApi
4444import com.highcapable.betterandroid.system.extension.component.registerReceiver
4545import com.highcapable.betterandroid.system.extension.tool.SystemVersion
46+ import com.highcapable.kavaref.KavaRef.Companion.asResolver
4647import com.highcapable.kavaref.KavaRef.Companion.resolve
4748import com.highcapable.kavaref.extension.classOf
4849import com.highcapable.kavaref.extension.lazyClass
@@ -158,9 +159,9 @@ internal object AppParasitics {
158159 name = " currentActivityThread"
159160 emptyParameters()
160161 }?.invoke()
161- val currentScope = current?.resolve ()?.optional(silent = true )
162+ val currentScope = current?.asResolver ()?.optional(silent = true )
162163 val mBoundApplication = currentScope?.firstFieldOrNull { name = " mBoundApplication" }?.get()
163- val appScope = mBoundApplication?.resolve ()?.optional(silent = true )
164+ val appScope = mBoundApplication?.asResolver ()?.optional(silent = true )
164165 appScope?.firstFieldOrNull { name = " appInfo" }?.get<ApplicationInfo >()
165166 }
166167
@@ -402,7 +403,7 @@ internal object AppParasitics {
402403 if (YukiXposedModule .isXposedEnvironment) runCatching {
403404 if (currentPackageName == YukiXposedModule .modulePackageName)
404405 return YLog .innerE(" You cannot inject module resources into yourself" )
405- hostResources.assets.resolve ()
406+ hostResources.assets.asResolver ()
406407 .processor(AndroidHiddenApiBypassResolver .get())
407408 .optional(silent = true )
408409 .firstMethodOrNull {
@@ -457,17 +458,17 @@ internal object AppParasitics {
457458 .optional(silent = true )
458459 .firstFieldOrNull { name = " sCurrentActivityThread" }
459460 ?.get()
460- val instrumentation = sCurrentActivityThread?.resolve ()
461+ val instrumentation = sCurrentActivityThread?.asResolver ()
461462 ?.processor(AndroidHiddenApiBypassResolver .get())
462463 ?.optional(silent = true )
463464 ?.firstMethodOrNull { name = " getInstrumentation" }
464465 ?.invoke<Instrumentation >() ? : error(" Could not found Instrumentation in ActivityThread" )
465- sCurrentActivityThread.resolve ()
466+ sCurrentActivityThread.asResolver ()
466467 .processor(AndroidHiddenApiBypassResolver .get())
467468 .optional(silent = true )
468469 .firstFieldOrNull { name = " mInstrumentation" }
469470 ?.set(InstrumentationDelegate .wrapper(instrumentation))
470- val mH = sCurrentActivityThread.resolve ()
471+ val mH = sCurrentActivityThread.asResolver ()
471472 .processor(AndroidHiddenApiBypassResolver .get())
472473 .optional(silent = true )
473474 .firstFieldOrNull { name = " mH" }
0 commit comments