diff --git a/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/core/finder/classes/DexClassFinder.kt b/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/core/finder/classes/DexClassFinder.kt index e6ba0f94..84ed37c8 100644 --- a/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/core/finder/classes/DexClassFinder.kt +++ b/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/core/finder/classes/DexClassFinder.kt @@ -94,6 +94,7 @@ class DexClassFinder @PublishedApi internal constructor( * @return [SharedPreferences] */ private fun Context.currentSp(versionName: String? = null, versionCode: Long? = null) = + @Suppress("DEPRECATION") getSharedPreferences(packageManager?.getPackageInfo(packageName, PackageManager.GET_META_DATA) ?.let { "${CACHE_FILE_NAME}_${versionName ?: it.versionName}_${versionCode ?: PackageInfoCompat.getLongVersionCode(it)}" } ?: "${CACHE_FILE_NAME}_unknown", diff --git a/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/xposed/channel/YukiHookDataChannel.kt b/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/xposed/channel/YukiHookDataChannel.kt index 519b92a8..5d73cef7 100644 --- a/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/xposed/channel/YukiHookDataChannel.kt +++ b/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/xposed/channel/YukiHookDataChannel.kt @@ -444,8 +444,10 @@ class YukiHookDataChannel private constructor() { * @param key 键值名称 * @return [ChannelDataWrapper]<[T]> or null */ - private fun Intent.getDataWrapper(key: String) = - runCatching { extras?.getSerializable(key + keyNonRepeatName) as? ChannelDataWrapper }.getOrNull() + private fun Intent.getDataWrapper(key: String) = runCatching { + @Suppress("DEPRECATION") + extras?.getSerializable(key + keyNonRepeatName) as? ChannelDataWrapper + }.getOrNull() /** * [ChannelData]<[T]> 转换为 [ChannelDataWrapper]<[T]> 实例 diff --git a/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/delegate/caller/HandlerDelegateCaller.kt b/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/delegate/caller/HandlerDelegateCaller.kt index a62a4a89..cd2cdfd0 100644 --- a/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/delegate/caller/HandlerDelegateCaller.kt +++ b/yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/delegate/caller/HandlerDelegateCaller.kt @@ -78,6 +78,7 @@ object HandlerDelegateCaller { cast()?.also { intent -> IntentClass.field { name = "mExtras" }.ignored().get(intent).cast() ?.classLoader = AppParasitics.currentApplication?.classLoader + @Suppress("DEPRECATION") if (intent.hasExtra(ActivityProxyConfig.proxyIntentName)) set(intent.getParcelableExtra(ActivityProxyConfig.proxyIntentName)) } @@ -91,6 +92,7 @@ object HandlerDelegateCaller { cast()?.also { intent -> IntentClass.field { name = "mExtras" }.ignored().get(intent).cast() ?.classLoader = AppParasitics.currentApplication?.classLoader + @Suppress("DEPRECATION") if (intent.hasExtra(ActivityProxyConfig.proxyIntentName)) intent.getParcelableExtra(ActivityProxyConfig.proxyIntentName).also { subIntent -> if (Build.VERSION.SDK_INT >= 31)