Skip to content

Commit b41897f

Browse files
committed
Modify suppress some warn lint checking in DexClassFinder, HandlerDelegateCaller, YukiHookDataChannel
1 parent 9e1a6f2 commit b41897f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/core/finder/classes/DexClassFinder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class DexClassFinder @PublishedApi internal constructor(
9494
* @return [SharedPreferences]
9595
*/
9696
private fun Context.currentSp(versionName: String? = null, versionCode: Long? = null) =
97+
@Suppress("DEPRECATION")
9798
getSharedPreferences(packageManager?.getPackageInfo(packageName, PackageManager.GET_META_DATA)
9899
?.let { "${CACHE_FILE_NAME}_${versionName ?: it.versionName}_${versionCode ?: PackageInfoCompat.getLongVersionCode(it)}" }
99100
?: "${CACHE_FILE_NAME}_unknown",

yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/xposed/channel/YukiHookDataChannel.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,10 @@ class YukiHookDataChannel private constructor() {
444444
* @param key 键值名称
445445
* @return [ChannelDataWrapper]<[T]> or null
446446
*/
447-
private fun <T> Intent.getDataWrapper(key: String) =
448-
runCatching { extras?.getSerializable(key + keyNonRepeatName) as? ChannelDataWrapper<T> }.getOrNull()
447+
private fun <T> Intent.getDataWrapper(key: String) = runCatching {
448+
@Suppress("DEPRECATION")
449+
extras?.getSerializable(key + keyNonRepeatName) as? ChannelDataWrapper<T>
450+
}.getOrNull()
449451

450452
/**
451453
* [ChannelData]<[T]> 转换为 [ChannelDataWrapper]<[T]> 实例

yukihookapi/src/main/java/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/delegate/caller/HandlerDelegateCaller.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ object HandlerDelegateCaller {
7878
cast<Intent?>()?.also { intent ->
7979
IntentClass.field { name = "mExtras" }.ignored().get(intent).cast<Bundle?>()
8080
?.classLoader = AppParasitics.currentApplication?.classLoader
81+
@Suppress("DEPRECATION")
8182
if (intent.hasExtra(ActivityProxyConfig.proxyIntentName))
8283
set(intent.getParcelableExtra(ActivityProxyConfig.proxyIntentName))
8384
}
@@ -91,6 +92,7 @@ object HandlerDelegateCaller {
9192
cast<Intent?>()?.also { intent ->
9293
IntentClass.field { name = "mExtras" }.ignored().get(intent).cast<Bundle?>()
9394
?.classLoader = AppParasitics.currentApplication?.classLoader
95+
@Suppress("DEPRECATION")
9496
if (intent.hasExtra(ActivityProxyConfig.proxyIntentName))
9597
intent.getParcelableExtra<Intent>(ActivityProxyConfig.proxyIntentName).also { subIntent ->
9698
if (Build.VERSION.SDK_INT >= 31)

0 commit comments

Comments
 (0)