diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e55dbf0d..b736beca 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -352,3 +352,15 @@ tasks.whenTaskAdded { this.dependsOn(tasks.getByName("checkTargetNativeLibsRelease")) } } + +tasks.withType().all { + if (name.contains("release", true)) { + kotlinOptions { + freeCompilerArgs = freeCompilerArgs + listOf( + "-Xno-call-assertions", + "-Xno-receiver-assertions", + "-Xno-param-assertions", + ) + } + } +} diff --git a/app/src/main/java/me/singleneuron/hook/MessageStyleNotification.kt b/app/src/main/java/me/singleneuron/hook/MessageStyleNotification.kt index 639639de..62872a6e 100644 --- a/app/src/main/java/me/singleneuron/hook/MessageStyleNotification.kt +++ b/app/src/main/java/me/singleneuron/hook/MessageStyleNotification.kt @@ -242,7 +242,7 @@ object MessageStyleNotification : CommonDelayAbleHookBridge(SyncUtils.PROC_ANY) Activity::class.java, Boolean::class.javaPrimitiveType, object : XC_MethodReplacement() { - override fun replaceHookedMethod(param: MethodHookParam): Any { + override fun replaceHookedMethod(param: MethodHookParam): Any? { val id = Thread.currentThread().id val unhook = if (param.args[1] as Boolean && (param.args[0] as Activity).isLaunchedFromBubble